Skip to content
Open
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
4 changes: 4 additions & 0 deletions Data/CaseInsensitive/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ module Data.CaseInsensitive.Internal ( CI

-- from base:
import Control.Applicative (Applicative)
import Data.Aeson ( FromJSON, parseJSON )
import Data.Bool ( (||) )
import Data.Char ( Char, toLower )
import Data.Eq ( Eq, (==) )
Expand Down Expand Up @@ -141,6 +142,9 @@ instance Hashable s => Hashable (CI s) where
instance NFData s => NFData (CI s) where
rnf (CI o f) = o `deepseq` f `deepseq` ()

instance (FromJSON s, FoldCase s) => FromJSON (CI s) where
parseJSON = fmap mk . parseJSON

--------------------------------------------------------------------------------
-- Folding (lowering) cases
--------------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions case-insensitive.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Library
, text >= 0.3
, deepseq >= 1.1
, hashable >= 1.0
, aeson >= 1.0
if !impl(ghc >= 8.0)
build-depends: semigroups >= 0.18
exposed-modules: Data.CaseInsensitive, Data.CaseInsensitive.Unsafe
Expand Down