diff options
| author | peb <unknown> | 2005-02-09 11:46:54 +0000 |
|---|---|---|
| committer | peb <unknown> | 2005-02-09 11:46:54 +0000 |
| commit | a0d412986305d4b45e82afde62ea48f1b06edb9d (patch) | |
| tree | bca6f55ef01469442ef55f6bd0caa511e147350f /src/GF/API/GrammarToHaskell.hs | |
| parent | 4fd0c636f8590bf800715f2598e54ccc22c99b90 (diff) | |
"Committed_by_peb"
Diffstat (limited to 'src/GF/API/GrammarToHaskell.hs')
| -rw-r--r-- | src/GF/API/GrammarToHaskell.hs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/GF/API/GrammarToHaskell.hs b/src/GF/API/GrammarToHaskell.hs index 081d533e3..61e720dd1 100644 --- a/src/GF/API/GrammarToHaskell.hs +++ b/src/GF/API/GrammarToHaskell.hs @@ -9,7 +9,9 @@ -- > CVS $Author $ -- > CVS $Revision $ -- --- (Description of the module) +-- to write a GF abstract grammar into a Haskell module with translations from +-- data objects into GF trees. Example: GSyntax for Agda. +-- AR 11/11/1999 -- 7/12/2000 -- 18/5/2004 ----------------------------------------------------------------------------- module GrammarToHaskell (grammar2haskell) where @@ -20,17 +22,13 @@ import Macros import Modules import Operations --- to write a GF abstract grammar into a Haskell module with translations from --- data objects into GF trees. Example: GSyntax for Agda. --- AR 11/11/1999 -- 7/12/2000 -- 18/5/2004 - --- the main function +-- | the main function grammar2haskell :: GFC.CanonGrammar -> String grammar2haskell gr = foldr (++++) [] $ haskPreamble ++ [datatypes gr', gfinstances gr', fginstances gr'] where gr' = hSkeleton gr --- by this you can prefix all identifiers with stg; the default is 'G' +-- | by this you can prefix all identifiers with stg; the default is 'G' gId :: OIdent -> OIdent gId i = 'G':i |
