diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aeb26a4..30c5eb4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ on: jobs: cabal: name: cabal / ghc-${{matrix.ghc}} / ${{ matrix.os }} - continue-on-error: ${{ matrix.ghc == '9.10.1' }} + continue-on-error: ${{ matrix.ghc == '9.14.1' }} runs-on: ${{ matrix.os }} strategy: matrix: @@ -18,15 +18,12 @@ jobs: - macOS-latest cabal: ["latest"] ghc: - - "9.0.2" - - "9.2.8" - "9.4.8" - - "9.6.6" - - "9.8.2" - - "9.10.1" - exclude: - - os: macOS-latest - ghc: "9.0.2" + - "9.6.7" + - "9.8.4" + - "9.10.3" + - "9.12.4" + - "9.14.1" steps: - uses: actions/checkout@v4 @@ -68,11 +65,11 @@ jobs: matrix: stack: ["latest"] resolver: - - "--resolver lts-19" # GHC 9.0.2 - - "--resolver lts-20" # GHC 9.2.8 - "--resolver lts-21" # GHC 9.4.8 - - "--resolver lts-22" # GHC 9.6.6 - - "--resolver nightly" # GHC 9.8.2 + - "--resolver lts-22" # GHC 9.6.7 + - "--resolver lts-23" # GHC 9.8.4 + - "--resolver lts-24" # GHC 9.10.3 + - "--resolver nightly" # GHC 9.12.4 steps: - uses: actions/checkout@v4 diff --git a/password-aeson/password-aeson.cabal b/password-aeson/password-aeson.cabal index 40b1663..04e133e 100644 --- a/password-aeson/password-aeson.cabal +++ b/password-aeson/password-aeson.cabal @@ -38,7 +38,6 @@ library base >= 4.9 && < 5 , aeson >= 0.2 , password-types < 2 - , text ghc-options: -Wall default-language: @@ -58,10 +57,6 @@ test-suite doctests , base-compat , doctest , password - , password-aeson - , QuickCheck - , quickcheck-instances - , template-haskell default-language: Haskell2010 @@ -81,7 +76,6 @@ test-suite password-aeson-tasty , aeson , quickcheck-instances , tasty - -- , tasty-hunit , tasty-quickcheck , text default-language: diff --git a/password-aeson/src/Data/Password/Aeson.hs b/password-aeson/src/Data/Password/Aeson.hs index 05adc05..3451d95 100644 --- a/password-aeson/src/Data/Password/Aeson.hs +++ b/password-aeson/src/Data/Password/Aeson.hs @@ -3,6 +3,7 @@ {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TypeOperators #-} +{-# LANGUAGE UndecidableInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-| @@ -24,7 +25,12 @@ See the "Data.Password.Types" module for more information. module Data.Password.Aeson (ExposedPassword (..)) where import Data.Aeson (FromJSON(..), ToJSON(..)) -import Data.Password.Types +import Data.Password.Types ( + mkPassword, + unsafeShowPassword, + Password, + PasswordHash (PasswordHash), + ) import GHC.TypeLits (TypeError, ErrorMessage(..)) -- $setup @@ -52,9 +58,9 @@ instance FromJSON Password where parseJSON = fmap mkPassword . parseJSON type ErrMsg = 'Text "Warning! Tried to convert plain-text Password to JSON!" - ':$$: 'Text " This is likely a security leak. Please make sure whether this was intended." - ':$$: 'Text " If this is intended, please use 'unsafeShowPassword' before converting to JSON" - ':$$: 'Text "" + :$$: 'Text " This is likely a security leak. Please make sure whether this was intended." + :$$: 'Text " If this is intended, please use 'unsafeShowPassword' before converting to JSON" + :$$: 'Text "" -- | Type error! Do not use 'toJSON' on a 'Password'! instance TypeError ErrMsg => ToJSON Password where diff --git a/password-http-api-data/password-http-api-data.cabal b/password-http-api-data/password-http-api-data.cabal index d8bb414..3d89926 100644 --- a/password-http-api-data/password-http-api-data.cabal +++ b/password-http-api-data/password-http-api-data.cabal @@ -38,7 +38,6 @@ library base >= 4.9 && < 5 , http-api-data , password-types < 2 - , text ghc-options: -Wall default-language: @@ -58,10 +57,6 @@ test-suite doctests , base-compat , doctest , password - , password-http-api-data - , QuickCheck - , quickcheck-instances - , template-haskell default-language: Haskell2010 @@ -81,7 +76,6 @@ test-suite password-http-api-data-tasty , http-api-data , quickcheck-instances , tasty - -- , tasty-hunit , tasty-quickcheck default-language: Haskell2010 diff --git a/password-http-api-data/src/Data/Password/HttpApiData.hs b/password-http-api-data/src/Data/Password/HttpApiData.hs index 630fc6f..da09d00 100644 --- a/password-http-api-data/src/Data/Password/HttpApiData.hs +++ b/password-http-api-data/src/Data/Password/HttpApiData.hs @@ -1,5 +1,6 @@ {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} +{-# LANGUAGE UndecidableInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-| @@ -32,9 +33,9 @@ import Web.HttpApiData (FromHttpApiData(..), ToHttpApiData(..)) -- >>> import Web.HttpApiData (parseUrlPiece) type ErrMsg = 'Text "Warning! Tried to convert plain-text Password to HttpApiData!" - ':$$: 'Text " This is likely a security leak. Please make sure whether this was intended." - ':$$: 'Text " If this is intended, please use 'unsafeShowPassword' before converting to HttpApiData" - ':$$: 'Text "" + :$$: 'Text " This is likely a security leak. Please make sure whether this was intended." + :$$: 'Text " If this is intended, please use 'unsafeShowPassword' before converting to HttpApiData" + :$$: 'Text "" -- | This instance allows a 'Password' to be created with functions like -- 'Web.HttpApiData.parseUrlPiece' or 'Web.HttpApiData.parseQueryParam'. diff --git a/password-persistent/password-persistent.cabal b/password-persistent/password-persistent.cabal index 102a073..3fde189 100644 --- a/password-persistent/password-persistent.cabal +++ b/password-persistent/password-persistent.cabal @@ -58,10 +58,6 @@ test-suite doctests , base-compat , doctest , password - , password-persistent - , QuickCheck - , quickcheck-instances - , template-haskell default-language: Haskell2010 diff --git a/password-persistent/src/Data/Password/Persistent.hs b/password-persistent/src/Data/Password/Persistent.hs index 429db93..befcdc1 100644 --- a/password-persistent/src/Data/Password/Persistent.hs +++ b/password-persistent/src/Data/Password/Persistent.hs @@ -6,6 +6,7 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TypeOperators #-} +{-# LANGUAGE UndecidableInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-| @@ -46,9 +47,9 @@ import GHC.TypeLits (TypeError, ErrorMessage(..)) -- >>> import Database.Persist.Class (PersistField(toPersistValue)) type ErrMsg = 'Text "Warning! Tried to convert plain-text Password to PersistValue!" - ':$$: 'Text " This is likely a security leak. Please make sure whether this was intended." - ':$$: 'Text " If this is intended, please use 'unsafeShowPassword' before converting to PersistValue." - ':$$: 'Text "" + :$$: 'Text " This is likely a security leak. Please make sure whether this was intended." + :$$: 'Text " If this is intended, please use 'unsafeShowPassword' before converting to PersistValue." + :$$: 'Text "" -- | This instance allows a 'PasswordHash' to be stored as a field in a database using -- "Database.Persist". diff --git a/password-types/password-types.cabal b/password-types/password-types.cabal index 78138b8..183de57 100644 --- a/password-types/password-types.cabal +++ b/password-types/password-types.cabal @@ -57,10 +57,6 @@ test-suite doctests base >=4.9 && <5 , base-compat , doctest - , password-types - , QuickCheck - , quickcheck-instances - , template-haskell default-language: Haskell2010 diff --git a/stack.yaml b/stack.yaml index b1e1183..023c880 100644 --- a/stack.yaml +++ b/stack.yaml @@ -17,7 +17,7 @@ # # resolver: ./custom-snapshot.yaml # resolver: https://example.com/snapshots/2018-01-01.yaml -resolver: lts-22.38 +resolver: lts-24.36 # User packages to be built. # Various formats can be used as shown in the example below. diff --git a/stack.yaml.lock b/stack.yaml.lock index a32fa82..0117b48 100644 --- a/stack.yaml.lock +++ b/stack.yaml.lock @@ -1,7 +1,7 @@ # This file was autogenerated by Stack. # You should not edit this file by hand. # For more information, please see the documentation at: -# https://docs.haskellstack.org/en/stable/lock_files +# https://docs.haskellstack.org/en/stable/topics/lock_files packages: - completed: @@ -13,7 +13,7 @@ packages: hackage: crypton-1.0.1 snapshots: - completed: - sha256: 0964f3e2c04e21abf42e271490e6974bc923aac2f2fd595fcb53ad0c237dbed1 - size: 720034 - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/22/38.yaml - original: lts-22.38 + sha256: a6882445afe04fd38791656e3667b491d92b9c27bcf18cda7e01c73016e828ee + size: 728959 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/24/36.yaml + original: lts-24.36