mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-22 17:42:51 -06:00
95 lines
1.8 KiB
Haskell
95 lines
1.8 KiB
Haskell
module GF.Canon.GFCC.SkelGFCC where
|
|
|
|
-- Haskell module generated by the BNF converter
|
|
|
|
import GF.Canon.GFCC.AbsGFCC
|
|
import GF.Canon.GFCC.ErrM
|
|
type Result = Err String
|
|
|
|
failure :: Show a => a -> Result
|
|
failure x = Bad $ "Undefined case: " ++ show x
|
|
|
|
transCId :: CId -> Result
|
|
transCId x = case x of
|
|
CId str -> failure x
|
|
|
|
|
|
transGrammar :: Grammar -> Result
|
|
transGrammar x = case x of
|
|
Grm header abstract concretes -> failure x
|
|
|
|
|
|
transHeader :: Header -> Result
|
|
transHeader x = case x of
|
|
Hdr cid cids -> failure x
|
|
|
|
|
|
transAbstract :: Abstract -> Result
|
|
transAbstract x = case x of
|
|
Abs absdefs -> failure x
|
|
|
|
|
|
transConcrete :: Concrete -> Result
|
|
transConcrete x = case x of
|
|
Cnc cid cncdefs -> failure x
|
|
|
|
|
|
transAbsDef :: AbsDef -> Result
|
|
transAbsDef x = case x of
|
|
Fun cid type' exp -> failure x
|
|
|
|
|
|
transCncDef :: CncDef -> Result
|
|
transCncDef x = case x of
|
|
Lin cid term -> failure x
|
|
|
|
|
|
transType :: Type -> Result
|
|
transType x = case x of
|
|
Typ cids cid -> failure x
|
|
|
|
|
|
transExp :: Exp -> Result
|
|
transExp x = case x of
|
|
Tr atom exps -> failure x
|
|
|
|
|
|
transAtom :: Atom -> Result
|
|
transAtom x = case x of
|
|
AC cid -> failure x
|
|
AS str -> failure x
|
|
AI n -> failure x
|
|
AF d -> failure x
|
|
AM -> failure x
|
|
|
|
|
|
transTerm :: Term -> Result
|
|
transTerm x = case x of
|
|
R terms -> failure x
|
|
P term0 term -> failure x
|
|
S terms -> failure x
|
|
K tokn -> failure x
|
|
V n -> failure x
|
|
C n -> failure x
|
|
F cid -> failure x
|
|
FV terms -> failure x
|
|
W str term -> failure x
|
|
RP term0 term -> failure x
|
|
TM -> failure x
|
|
L cid term -> failure x
|
|
BV cid -> failure x
|
|
|
|
|
|
transTokn :: Tokn -> Result
|
|
transTokn x = case x of
|
|
KS str -> failure x
|
|
KP strs variants -> failure x
|
|
|
|
|
|
transVariant :: Variant -> Result
|
|
transVariant x = case x of
|
|
Var strs0 strs -> failure x
|
|
|
|
|
|
|