mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-08 20:59:30 -06:00
add import Control.Monad when generating .hs with GADTs
This commit is contained in:
@@ -51,7 +51,7 @@ grammar2haskell opts name gr = foldr (++++) [] $
|
|||||||
derivingClause
|
derivingClause
|
||||||
| dataExt = "deriving (Show,Data)"
|
| dataExt = "deriving (Show,Data)"
|
||||||
| otherwise = "deriving Show"
|
| 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"]
|
| dataExt = ["import Data.Data"]
|
||||||
| otherwise = []
|
| otherwise = []
|
||||||
pgfImports | pgf2 = ["import PGF2 hiding (Tree)", "", "showCId :: CId -> String", "showCId = id"]
|
pgfImports | pgf2 = ["import PGF2 hiding (Tree)", "", "showCId :: CId -> String", "showCId = id"]
|
||||||
|
|||||||
Reference in New Issue
Block a user