mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-04 16:52:50 -06:00
Founding the newly structured GF2.0 cvs archive.
This commit is contained in:
48
src/GF/Canon/GFC.hs
Normal file
48
src/GF/Canon/GFC.hs
Normal file
@@ -0,0 +1,48 @@
|
||||
module GFC where
|
||||
|
||||
import AbsGFC
|
||||
import PrintGFC
|
||||
import qualified Abstract as A
|
||||
|
||||
import Ident
|
||||
import Option
|
||||
import Zipper
|
||||
import Operations
|
||||
import qualified Modules as M
|
||||
|
||||
import Char
|
||||
|
||||
-- canonical GF. AR 10/9/2002 -- 9/5/2003 -- 21/9
|
||||
|
||||
type Context = [(Ident,Exp)]
|
||||
|
||||
type CanonGrammar = M.MGrammar Ident Flag Info
|
||||
|
||||
type CanonModInfo = M.ModInfo Ident Flag Info
|
||||
|
||||
type CanonModule = (Ident, CanonModInfo)
|
||||
|
||||
type CanonAbs = M.Module Ident Option Info
|
||||
|
||||
data Info =
|
||||
AbsCat A.Context [A.Fun]
|
||||
| AbsFun A.Type A.Term
|
||||
|
||||
| ResPar [ParDef]
|
||||
| ResOper CType Term -- global constant
|
||||
| CncCat CType Term Printname
|
||||
| CncFun CIdent [ArgVar] Term Printname
|
||||
| AnyInd Bool Ident
|
||||
deriving (Show)
|
||||
|
||||
type Printname = Term
|
||||
|
||||
-- some printing ----
|
||||
|
||||
{-
|
||||
prCanonModInfo :: (Ident,CanonModInfo) -> String
|
||||
prCanonModInfo = printTree . info2mod
|
||||
|
||||
prGrammar :: CanonGrammar -> String
|
||||
prGrammar = printTree . grammar2canon
|
||||
-}
|
||||
Reference in New Issue
Block a user