Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 10 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions password-aeson/password-aeson.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ library
base >= 4.9 && < 5
, aeson >= 0.2
, password-types < 2
, text
ghc-options:
-Wall
default-language:
Expand All @@ -58,10 +57,6 @@ test-suite doctests
, base-compat
, doctest
, password
, password-aeson
, QuickCheck
, quickcheck-instances
, template-haskell
default-language:
Haskell2010

Expand All @@ -81,7 +76,6 @@ test-suite password-aeson-tasty
, aeson
, quickcheck-instances
, tasty
-- , tasty-hunit
, tasty-quickcheck
, text
default-language:
Expand Down
14 changes: 10 additions & 4 deletions password-aeson/src/Data/Password/Aeson.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}

{-|
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions password-http-api-data/password-http-api-data.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ library
base >= 4.9 && < 5
, http-api-data
, password-types < 2
, text
ghc-options:
-Wall
default-language:
Expand All @@ -58,10 +57,6 @@ test-suite doctests
, base-compat
, doctest
, password
, password-http-api-data
, QuickCheck
, quickcheck-instances
, template-haskell
default-language:
Haskell2010

Expand All @@ -81,7 +76,6 @@ test-suite password-http-api-data-tasty
, http-api-data
, quickcheck-instances
, tasty
-- , tasty-hunit
, tasty-quickcheck
default-language:
Haskell2010
7 changes: 4 additions & 3 deletions password-http-api-data/src/Data/Password/HttpApiData.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}

{-|
Expand Down Expand Up @@ -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'.
Expand Down
4 changes: 0 additions & 4 deletions password-persistent/password-persistent.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@ test-suite doctests
, base-compat
, doctest
, password
, password-persistent
, QuickCheck
, quickcheck-instances
, template-haskell
default-language:
Haskell2010

Expand Down
7 changes: 4 additions & 3 deletions password-persistent/src/Data/Password/Persistent.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}

{-|
Expand Down Expand Up @@ -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".
Expand Down
4 changes: 0 additions & 4 deletions password-types/password-types.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ test-suite doctests
base >=4.9 && <5
, base-compat
, doctest
, password-types
, QuickCheck
, quickcheck-instances
, template-haskell
default-language:
Haskell2010

Expand Down
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 5 additions & 5 deletions stack.yaml.lock
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
Loading