Skip to content

Commit efcea12

Browse files
author
Dmitry Bogatov
committed
Relax dependencies and fix build with aeson>=2.0.0
1 parent 4e29c0d commit efcea12

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

package.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ dependencies:
2323
- base >= 4.10 && < 5
2424
- bytestring
2525
- text
26-
- aeson >= 1.4.7 && < 1.6
26+
- aeson >= 1.4.7
2727
- containers ^>= 0.6.2.1
2828
- unordered-containers ^>= 0.2.10.0
2929
- stm ^>= 2.5.0.0
30-
- polysemy ^>= 1.3.0.0
31-
- polysemy-plugin ^>= 0.2.5.0
30+
- polysemy >= 1.3.0.0
31+
- polysemy-plugin >= 0.2.5.0
3232
- monad-loops
3333
- tdlib-types ^>= 0.4.0
3434

src/TDLib/EventLoop.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{-# LANGUAGE CPP #-}
12
{-# LANGUAGE ExistentialQuantification #-}
23

34
-- | A heavyweight TDLib effect intepreter written using event loop
@@ -20,7 +21,11 @@ import Control.Monad
2021
import Control.Monad.Loops
2122
import Data.Aeson
2223
import Data.ByteString.Lazy (toStrict)
24+
#if MIN_VERSION_aeson(2,0,0)
25+
import qualified Data.Aeson.KeyMap as HM
26+
#else
2327
import qualified Data.HashMap.Strict as HM
28+
#endif
2429
import Data.IntMap.Strict (IntMap)
2530
import qualified Data.IntMap.Strict as M
2631
import Data.Maybe

0 commit comments

Comments
 (0)