Skip to content

Commit 6d338da

Browse files
committed
Minor sample fix of liftIO for GHC >= 8.0
PR mongodb-haskell#121
2 parents 82c539b + 4d0ccf8 commit 6d338da

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

doc/Example.hs

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

@@ -7,7 +8,12 @@ import Database.MongoDB (Action, Document, Document, Value, access,
78
close, connect, delete, exclude, find,
89
host, insertMany, master, project, rest,
910
select, sort, (=:))
11+
12+
#if (__GLASGOW_HASKELL__ >= 800)
13+
import Control.Monad.IO.Class (liftIO)
14+
#else
1015
import Control.Monad.Trans (liftIO)
16+
#endif
1117

1218
main :: IO ()
1319
main = do

0 commit comments

Comments
 (0)