mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-22 19:22:50 -06:00
revived GADT generation
This commit is contained in:
@@ -49,14 +49,15 @@ haskPreamble name =
|
|||||||
[
|
[
|
||||||
"module " ++ name ++ " where",
|
"module " ++ name ++ " where",
|
||||||
"",
|
"",
|
||||||
"import PGF",
|
"import PGF hiding (Tree)",
|
||||||
|
"import qualified PGF",
|
||||||
"----------------------------------------------------",
|
"----------------------------------------------------",
|
||||||
"-- automatic translation from GF to Haskell",
|
"-- automatic translation from GF to Haskell",
|
||||||
"----------------------------------------------------",
|
"----------------------------------------------------",
|
||||||
"",
|
"",
|
||||||
"class Gf a where",
|
"class Gf a where",
|
||||||
" gf :: a -> Tree",
|
" gf :: a -> PGF.Tree",
|
||||||
" fg :: Tree -> a",
|
" fg :: PGF.Tree -> a",
|
||||||
"",
|
"",
|
||||||
predefInst "GString" "String" "unStr" "mkStr",
|
predefInst "GString" "String" "unStr" "mkStr",
|
||||||
"",
|
"",
|
||||||
|
|||||||
Reference in New Issue
Block a user