1
0
forked from GitHub/gf-core

Merge pull request #10 from inariksit/master

Add {-# LANGUAGE GADTs -#} to the generated Haskell file
This commit is contained in:
Inari Listenmaa
2018-10-19 16:23:16 +02:00
committed by GitHub

View File

@@ -39,7 +39,7 @@ grammar2haskell opts name gr = foldr (++++) [] $
lexical cat = haskellOption opts HaskellLexical && isLexicalCat opts cat
gId | haskellOption opts HaskellNoPrefix = id
| otherwise = ("G"++)
pragmas | gadt = ["{-# OPTIONS_GHC -fglasgow-exts #-}"]
pragmas | gadt = ["{-# OPTIONS_GHC -fglasgow-exts #-}","{-# LANGUAGE GADTs #-}"]
| otherwise = []
types | gadt = datatypesGADT gId lexical gr'
| otherwise = datatypes gId lexical gr'