forked from turboMaCk/aeson-combinators
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make tests compatible with hashable 1.3.1.0 (turboMaCk#26)
* make tests compatible with hashable 1.3.1.0 see: commercialhaskell/stackage#5878 * update release info
- Loading branch information
Showing
7 changed files
with
70 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{-# LANGUAGE CPP #-} | ||
|
||
module Data.Aeson.Combinators.Compat ( | ||
-- * Re-exposes compatibility functions for aeson-2 | ||
|
||
-- * Backwards compatibility with KeyMap | ||
KeyMap | ||
, toHashMapText | ||
-- * Backwards compatibility with KeyMap | ||
, Key | ||
, toText, fromText | ||
) where | ||
|
||
#if (MIN_VERSION_aeson(2,0,0)) | ||
import Data.Aeson.Key (Key, toText, fromText) | ||
import Data.Aeson.KeyMap (KeyMap) | ||
import Data.Aeson.KeyMap (toHashMapText) | ||
#else | ||
import qualified Data.HashMap as HM | ||
import Data.Text (Text) | ||
|
||
|
||
type KeyMap a = HM.HashMap Text a | ||
type Key = Text | ||
|
||
-- | Aeson 2.0 compatibility function for the 'Key' type. | ||
fromText :: Text -> Text | ||
fromText = id | ||
|
||
-- | Aeson 2.0 compatibility function for the 'Key' type. | ||
toText :: Text -> Text | ||
toText = id | ||
|
||
toHashMapText :: HL.HashMap Text a -> HL.HashMap Text a | ||
toHashMapText = id | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters