Skip to content

Commit

Permalink
singletons-th: Allow building with mtl-2.3.*
Browse files Browse the repository at this point in the history
Fixes #523.
  • Loading branch information
RyanGlScott committed Nov 2, 2022
1 parent 6acdbf4 commit 5e7ae3a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions singletons-th/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Changelog for the `singletons-th` project
* Fix a bug in which the `singDecideInstances` and `showSingInstances`, as well
as `deriving Show` declarations, would not respect custom
`promotedDataTypeOrConName` options.
* Allow building with `mtl-2.3.*`.

3.1.1 [2022.08.23]
------------------
Expand Down
2 changes: 1 addition & 1 deletion singletons-th/singletons-th.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ library
hs-source-dirs: src
build-depends: base >= 4.17 && < 4.18,
containers >= 0.5,
mtl >= 2.2.1,
mtl >= 2.2.1 && < 2.4,
ghc-boot-th,
singletons == 3.0.*,
syb >= 0.4,
Expand Down
6 changes: 4 additions & 2 deletions singletons-th/src/Data/Singletons/TH/Single/Monad.hs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ import Data.Singletons.TH.Promote.Monad ( emitDecs, emitDecsM )
import Data.Singletons.TH.Util
import Language.Haskell.TH.Syntax hiding ( lift )
import Language.Haskell.TH.Desugar
import Control.Monad.Reader
import Control.Monad.Writer
import Control.Monad ( liftM2 )
import Control.Monad.IO.Class ( MonadIO )
import Control.Monad.Reader ( MonadReader(..), ReaderT(..), asks )
import Control.Monad.Writer ( MonadWriter, WriterT(..) )
import Control.Applicative

-- environment during singling
Expand Down
10 changes: 6 additions & 4 deletions singletons-th/src/Data/Singletons/TH/Util.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ import Language.Haskell.TH ( pprint )
import Language.Haskell.TH.Syntax hiding ( lift )
import Language.Haskell.TH.Desugar
import Data.Char
import Control.Monad hiding ( mapM )
import Control.Monad.Except hiding ( mapM )
import Control.Monad.Reader hiding ( mapM )
import Control.Monad.Writer hiding ( mapM )
import Control.Monad ( liftM, unless, when )
import Control.Monad.Except ( ExceptT, runExceptT, MonadError(..) )
import Control.Monad.IO.Class ( MonadIO )
import Control.Monad.Reader ( MonadReader(..), Reader, ReaderT(..) )
import Control.Monad.Trans ( MonadTrans )
import Control.Monad.Writer ( MonadWriter(..), WriterT(..), execWriterT )
import qualified Data.Map as Map
import Data.Map ( Map )
import Data.Bifunctor (second)
Expand Down

0 comments on commit 5e7ae3a

Please sign in to comment.