1
0
forked from GitHub/gf-core

add import Control.Monad when generating .hs with GADTs

This commit is contained in:
Inari Listenmaa
2025-08-13 13:38:23 +02:00
parent 57dc5e9098
commit 9325c8f9fb

View File

@@ -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"]