Skip to content

Commit fa2826d

Browse files
authored
Merge pull request #196 from GrammaticalFramework/fix-code-generation
`import Control.Monad` when generating .hs with GADTs
2 parents 57dc5e9 + 9325c8f commit fa2826d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/GF/Compile/PGFtoHaskell.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ grammar2haskell opts name gr = foldr (++++) [] $
5151
derivingClause
5252
| dataExt = "deriving (Show,Data)"
5353
| otherwise = "deriving Show"
54-
extraImports | gadt = ["import Control.Monad.Identity", "import Data.Monoid"]
54+
extraImports | gadt = ["import Control.Monad.Identity", "import Control.Monad", "import Data.Monoid"]
5555
| dataExt = ["import Data.Data"]
5656
| otherwise = []
5757
pgfImports | pgf2 = ["import PGF2 hiding (Tree)", "", "showCId :: CId -> String", "showCId = id"]

0 commit comments

Comments
 (0)