diff options
| author | krasimir <krasimir@chalmers.se> | 2010-03-24 11:11:55 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2010-03-24 11:11:55 +0000 |
| commit | 68482aa7e9882ab8d65fb5fe261efc0e807f6dfd (patch) | |
| tree | b818f5c25002f0be2eefad441e62aa08c959cbe6 /src/compiler/GF/Compile/PGFtoLProlog.hs | |
| parent | 76d155af0eb6174e479ec6c2023554984c14106f (diff) | |
now for every category we store, in PGF, the list of functions for it in source-code order. The order matters for the termination of the exhaustive generation with dependent types.
Diffstat (limited to 'src/compiler/GF/Compile/PGFtoLProlog.hs')
| -rw-r--r-- | src/compiler/GF/Compile/PGFtoLProlog.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/GF/Compile/PGFtoLProlog.hs b/src/compiler/GF/Compile/PGFtoLProlog.hs index 3f2849d63..41d258b3b 100644 --- a/src/compiler/GF/Compile/PGFtoLProlog.hs +++ b/src/compiler/GF/Compile/PGFtoLProlog.hs @@ -12,7 +12,7 @@ import Debug.Trace grammar2lambdaprolog_mod pgf = render $ text "module" <+> ppCId (absname pgf) <> char '.' $$ space $$ - vcat [ppClauses cat fns | (cat,fs) <- Map.toList (catfuns (abstract pgf)), + vcat [ppClauses cat fns | (cat,(_,fs)) <- Map.toList (cats (abstract pgf)), let fns = [(f,fromJust (Map.lookup f (funs (abstract pgf)))) | f <- fs]] where ppClauses cat fns = @@ -23,11 +23,11 @@ grammar2lambdaprolog_mod pgf = render $ grammar2lambdaprolog_sig pgf = render $ text "sig" <+> ppCId (absname pgf) <> char '.' $$ space $$ - vcat [ppCat c hyps <> dot | (c,hyps) <- Map.toList (cats (abstract pgf))] $$ + vcat [ppCat c hyps <> dot | (c,(hyps,_)) <- Map.toList (cats (abstract pgf))] $$ space $$ vcat [ppFun f ty <> dot | (f,(ty,_,_)) <- Map.toList (funs (abstract pgf))] $$ space $$ - vcat [ppExport c hyps <> dot | (c,hyps) <- Map.toList (cats (abstract pgf))] + vcat [ppExport c hyps <> dot | (c,(hyps,_)) <- Map.toList (cats (abstract pgf))] ppCat :: CId -> [Hypo] -> Doc ppCat c hyps = text "kind" <+> ppKind c <+> text "type" |
