summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Compile
diff options
context:
space:
mode:
authorInari Listenmaa <inari.listenmaa@gmail.com>2025-08-13 14:02:53 +0200
committerGitHub <noreply@github.com>2025-08-13 14:02:53 +0200
commitfa2826d29a8a18df2a4394cbdab1261d070b5c48 (patch)
treeba01ba5a621471ee27dd4ea0ef200f8bc034abed /src/compiler/GF/Compile
parent57dc5e9098765bd82e3428fbf0d7f419e502f3e6 (diff)
parent9325c8f9fb54d1de1c16f946723a2716fd3fbd86 (diff)
Merge pull request #196 from GrammaticalFramework/fix-code-generation
`import Control.Monad` when generating .hs with GADTs
Diffstat (limited to 'src/compiler/GF/Compile')
-rw-r--r--src/compiler/GF/Compile/PGFtoHaskell.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/GF/Compile/PGFtoHaskell.hs b/src/compiler/GF/Compile/PGFtoHaskell.hs
index bc8e59f57..948e3a606 100644
--- a/src/compiler/GF/Compile/PGFtoHaskell.hs
+++ b/src/compiler/GF/Compile/PGFtoHaskell.hs
@@ -51,7 +51,7 @@ grammar2haskell opts name gr = foldr (++++) [] $
derivingClause
| dataExt = "deriving (Show,Data)"
| otherwise = "deriving Show"
- extraImports | gadt = ["import Control.Monad.Identity", "import Data.Monoid"]
+ extraImports | gadt = ["import Control.Monad.Identity", "import Control.Monad", "import Data.Monoid"]
| dataExt = ["import Data.Data"]
| otherwise = []
pgfImports | pgf2 = ["import PGF2 hiding (Tree)", "", "showCId :: CId -> String", "showCId = id"]