From 4d0ccf84eff8360e9fc544faf0cf68b3b5027384 Mon Sep 17 00:00:00 2001 From: Carlos Saltos Date: Sun, 2 May 2021 01:45:35 +0300 Subject: [PATCH] Minor sample fix of LiftIO for GHC >= 8.0 --- doc/Example.hs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/Example.hs b/doc/Example.hs index 7c09b10..bfe4350 100644 --- a/doc/Example.hs +++ b/doc/Example.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ExtendedDefaultRules #-} @@ -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