Skip to content

Commit

Permalink
Minor sample fix of LiftIO for GHC >= 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
csaltos committed May 1, 2021
1 parent 952aed5 commit 4d0ccf8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doc/Example.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ExtendedDefaultRules #-}

Expand All @@ -7,7 +8,12 @@ import Database.MongoDB (Action, Document, Document, Value, access,
close, connect, delete, exclude, find,
host, insertMany, master, project, rest,
select, sort, (=:))

#if (__GLASGOW_HASKELL__ >= 800)
import Control.Monad.IO.Class (liftIO)
#else
import Control.Monad.Trans (liftIO)
#endif

main :: IO ()
main = do
Expand Down

0 comments on commit 4d0ccf8

Please sign in to comment.