optimization of RP in gfcc; syntax for lambda

This commit is contained in:
aarne
2006-10-22 11:00:38 +00:00
parent 5051093813
commit 86974ded64
7 changed files with 108 additions and 97 deletions

View File

@@ -97,6 +97,10 @@ mkTerm tr = case tr of
-- ordinary record
R rs -> C.R [mkTerm t | Ass _ t <- rs]
P t l -> C.P (mkTerm t) (C.C (mkLab l))
LI x -> C.BV $ i2i x
T _ [Cas [PV x] t] -> C.L (i2i x) (mkTerm t)
T _ cs -> error $ "improper optimization for gfcc in" +++ A.prt tr
V _ cs -> C.R [mkTerm t | t <- cs]
S t p -> C.P (mkTerm t) (mkTerm p)
@@ -268,6 +272,9 @@ term2term cgr env@(labels,untyps,typs) tr = case tr of
then R rs'
else R [Ass (L (IC "_")) (mkValCase tr), Ass (L (IC "__")) (R rs')]
P t l -> r2r tr
T ti [Cas ps@[PV _] t] -> T ti [Cas ps (t2t t)]
T _ cs0 -> case expandLinTables cgr tr of -- normalize order of cases
Ok (T ty cs) -> checkCases cs $ V ty [t2t t | Cas _ t <- cs]
_ -> K (KS (A.prt tr +++ prtTrace tr "66668"))
@@ -338,7 +345,7 @@ term2term cgr env@(labels,untyps,typs) tr = case tr of
FV ts -> ts
_ -> [tr]
valNumFV ts = case ts of
[tr] -> K (KS (A.prt tr +++ prtTrace tr "66667"))
[tr] -> EInt 66667 ----K (KS (A.prt tr +++ prtTrace tr "66667"))
_ -> FV $ map valNum ts
isStr tr = case tr of
Par _ _ -> False
@@ -398,7 +405,7 @@ optTerm tr = case tr of
C.R ts@(_:_:_) | all isK ts -> mkSuff $ optToks [s | C.K (C.KS s) <- ts]
C.R ts -> C.R $ map optTerm ts
C.P t v -> C.P (optTerm t) v
-- C.A x t -> C.A x (optTerm t)
C.L x t -> C.L x (optTerm t)
_ -> tr
where
optToks ss = prf : suffs where
@@ -434,12 +441,12 @@ addSubexpConsts tree lins =
recomp f t = case Map.lookup t tree of
Just (_,id) | fid id /= f -> C.F $ fid id -- not to replace oper itself
_ -> case t of
C.R ts -> C.R $ map (recomp f) ts
C.S ts -> C.S $ map (recomp f) ts
C.W s t -> C.W s (recomp f t)
C.P t p -> C.P (recomp f t) (recomp f p)
C.R ts -> C.R $ map (recomp f) ts
C.S ts -> C.S $ map (recomp f) ts
C.W s t -> C.W s (recomp f t)
C.P t p -> C.P (recomp f t) (recomp f p)
C.RP t p -> C.RP (recomp f t) (recomp f p)
-- C.A x t -> C.A x (recomp f t)
C.L x t -> C.L x (recomp f t)
_ -> t
fid n = C.CId $ "_" ++ show n
list = Map.toList tree
@@ -468,6 +475,10 @@ collectSubterms t = case t of
C.W s u -> do
collectSubterms u
add t
C.P p u -> do
collectSubterms p
collectSubterms u
add t
_ -> return ()
where
add t = do

View File

@@ -21,12 +21,10 @@ data Concrete =
data AbsDef =
Fun CId Type Exp
| AFl CId String
deriving (Eq,Ord,Show)
data CncDef =
Lin CId Term
| CFl CId String
deriving (Eq,Ord,Show)
data Type =
@@ -57,6 +55,8 @@ data Term =
| W String Term
| RP Term Term
| TM
| L CId Term
| BV CId
deriving (Eq,Ord,Show)
data Tokn =

View File

@@ -30,6 +30,9 @@ W. Term ::= "(" String "+" Term ")" ; -- prefix + suffix table
RP. Term ::= "(" Term "@" Term ")"; -- record parameter alias
TM. Term ::= "?" ; -- lin of metavariable
L. Term ::= "(" CId "->" Term ")" ; -- lambda abstracted table
BV. Term ::= "#" CId ; -- lambda-bound variable
KS. Tokn ::= String ;
KP. Tokn ::= "[" "pre" [String] "[" [Variant] "]" "]" ;
Var. Variant ::= [String] "/" [String] ;

File diff suppressed because one or more lines are too long

View File

@@ -166,19 +166,19 @@ happyOutTok x = unsafeCoerce# x
{-# INLINE happyOutTok #-}
happyActOffsets :: HappyAddr
happyActOffsets = HappyA# "\x0c\x01\x0c\x01\x0d\x01\x0b\x01\x32\x00\xfa\xff\x04\x01\x28\x00\x51\x00\x1a\x00\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x01\x1a\x00\x00\x00\x00\x00\x01\x01\x05\x01\x00\x00\x09\x01\xab\x00\xfe\x00\xb2\x00\xff\xff\x00\x00\x00\x00\x00\x00\x07\x01\x00\x00\xfc\x00\x1a\x00\x00\x00\x06\x00\xff\x00\x1a\x00\x00\x00\x00\x00\x02\x01\xfa\x00\x29\x00\x0f\x00\xed\xff\xfa\x00\xfa\x00\xfd\x00\xf9\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf9\x00\x00\x00\x00\x00\xf9\x00\x00\x00\x51\x00\xf9\x00\xfb\x00\xf8\x00\xf6\x00\xf7\x00\xf5\x00\xf4\x00\xf3\x00\xf2\x00\xef\x00\xea\x00\xf0\x00\xe9\x00\xe6\x00\xe5\x00\xf1\x00\xe3\x00\xee\x00\x00\x00\xed\x00\xe8\x00\xe2\x00\xe7\x00\x1a\x00\xda\x00\x00\x00\x00\x00\xec\x00\xeb\x00\xe4\x00\xd7\x00\xd8\x00\x00\x00\xdf\x00\xd5\x00\x23\x00\xe0\x00\x1a\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x00\x00\xd1\x00\x00\x00\x00\x00\x1a\x00\x1a\x00\x1a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2d\x00\x24\x00\x00\x00\x00\x00\xd1\x00\xdd\x00\xce\x00\x00\x00\x07\x00\xcd\x00\xe1\x00\x00\x00\xde\x00\x00\x00\x05\x00\x00\x00\x28\x00\x00\x00\x00\x00\xaa\x00\xdc\x00\xdb\x00\xd9\x00\x00\x00\x00\x00\x00\x00\xd4\x00\x00\x00\x00\x00\x00\x00\xc7\x00\xcc\x00\x00\x00\x00\x00"#
happyActOffsets = HappyA# "\xff\x00\xff\x00\xfc\x00\xfe\x00\xfb\x00\xfb\x00\xfb\x00\x37\x00\x4d\x00\x29\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfb\x00\x29\x00\x00\x00\x00\x00\xfa\x00\xf9\x00\x00\x00\xf8\x00\xa8\x00\xf7\x00\xae\x00\xff\xff\x00\x00\x00\x00\x00\x00\xf6\x00\x00\x00\xf5\x00\x29\x00\x00\x00\x15\x00\xf3\x00\x29\x00\xf4\x00\x00\x00\x00\x00\xf2\x00\xf1\x00\xad\x00\xad\x00\x76\x00\xf1\x00\xf1\x00\xf0\x00\xe9\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe9\x00\x00\x00\x00\x00\xe9\x00\x00\x00\x4d\x00\xe9\x00\xef\x00\xeb\x00\xe3\x00\xee\x00\xe2\x00\xe2\x00\xe8\x00\xe1\x00\xed\x00\xe0\x00\xd4\x00\xd1\x00\xec\x00\xd3\x00\xea\x00\x00\x00\xe7\x00\xce\x00\x29\x00\xce\x00\x00\x00\x00\x00\xe6\x00\xe5\x00\xe4\x00\xc8\x00\x00\x00\xdf\x00\x00\x00\xde\x00\xd2\x00\xdb\x00\xbc\x00\xdd\x00\x29\x00\x00\x00\x00\x00\x00\x00\xa7\x00\x00\x00\xc6\x00\x00\x00\x00\x00\x29\x00\x29\x00\x29\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfc\xff\x23\x00\x00\x00\x00\x00\xda\x00\x00\x00\x05\x00\xc2\x00\xdc\x00\x00\x00\xd9\x00\x00\x00\x04\x00\x37\x00\x00\x00\xa7\x00\xd8\x00\xd7\x00\xd6\x00\xd5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcc\x00\x00\x00\x00\x00\x00\x00\xc0\x00\xca\x00\x00\x00\x00\x00"#
happyGotoOffsets :: HappyAddr
happyGotoOffsets = HappyA# "\x01\x00\xd6\x00\xd3\x00\xcf\x00\xc5\x00\xa9\x00\x6b\x00\xa8\x00\xb9\x00\x93\x00\x04\x00\xf8\xff\xca\x00\xc6\x00\xc1\x00\x74\x00\x66\x00\xc0\x00\xbe\x00\xb3\x00\x00\x00\x00\x00\x00\x00\xd2\x00\x00\x00\xd2\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x62\x00\x00\x00\x50\x00\xd0\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x92\x00\x4f\x00\xc8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcb\x00\x00\x00\x00\x00\xc9\x00\x00\x00\xbd\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\xa7\x00\x00\x00\x9d\x00\x00\x00\x00\x00\x55\x00\x00\x00\x8f\x00\x9c\x00\x89\x00\x7b\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x48\x00\x00\x00\x00\x00\x72\x00\xb0\x00\x00\x00\x54\x00\x00\x00\x00\x00\x80\x00\x7c\x00\x78\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x00\xa4\x00\x00\x00\x00\x00\x3b\x00\x00\x00\x39\x00\x1d\x00\x4f\x00\x5e\x00\x00\x00\x1c\x00\x00\x00\x00\x00\x92\x00\x00\x00\x97\x00\x00\x00\x00\x00\x75\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00"#
happyGotoOffsets = HappyA# "\x95\x00\xcf\x00\xcd\x00\xcb\x00\x54\x00\xa6\x00\x09\x00\xb2\x00\xc3\x00\x92\x00\x41\x00\xf8\xff\xc1\x00\xbd\x00\xaa\x00\x27\x00\x61\x00\x96\x00\xb4\x00\x87\x00\x00\x00\x00\x00\x00\x00\xbf\x00\x00\x00\xbf\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x4b\x00\xa9\x00\x47\x00\xab\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7a\x00\x0a\x00\x72\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8d\x00\x00\x00\x00\x00\x00\x00\x7f\x00\x00\x00\x00\x00\x6c\x00\x00\x00\x5f\x00\x00\x00\x01\x00\x8e\x00\x60\x00\x38\x00\x44\x00\x00\x00\x00\x00\x00\x00\x25\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x33\x00\x70\x00\x00\x00\x11\x00\x00\x00\x00\x00\x8a\x00\x7b\x00\x77\x00\x73\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x34\x00\x0a\x00\x21\x00\x00\x00\x20\x00\x00\x00\x00\x00\x7a\x00\xa1\x00\x00\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x22\x00\x00\x00\x00\x00\x00\x00"#
happyDefActions :: HappyAddr
happyDefActions = HappyA# "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc3\xff\x00\x00\x00\x00\x00\x00\x00\x00\xbb\xff\xc9\xff\xc7\xff\xc5\xff\xc3\xff\xc0\xff\xbd\xff\xbb\xff\xbb\xff\x00\x00\xeb\xff\xb8\xff\x00\x00\x00\x00\x00\x00\x00\x00\xcc\xff\xd2\xff\xd1\xff\xbf\xff\xd4\xff\x00\x00\xc0\xff\xcd\xff\xc0\xff\x00\x00\xc0\xff\xea\xff\xe8\xff\xc2\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdb\xff\xda\xff\xd9\xff\xdc\xff\x00\x00\xd8\xff\xe9\xff\x00\x00\xdd\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc7\xff\x00\x00\x00\x00\xc3\xff\x00\x00\x00\x00\x00\x00\xbd\xff\xbb\xff\x00\x00\x00\x00\x00\x00\xc3\xff\x00\x00\xd3\xff\x00\x00\xcc\xff\xbf\xff\x00\x00\xc0\xff\xbc\xff\xba\xff\xbb\xff\xb9\xff\xb7\xff\xca\xff\xbe\xff\xd5\xff\x00\x00\x00\x00\x00\x00\xd7\xff\xd0\xff\xc1\xff\xc4\xff\xc6\xff\xc8\xff\x00\x00\x00\x00\xdf\xff\xe1\xff\x00\x00\x00\x00\x00\x00\xc5\xff\x00\x00\xc3\xff\x00\x00\xc9\xff\x00\x00\xe5\xff\x00\x00\xe2\xff\x00\x00\xe0\xff\xde\xff\xb9\xff\x00\x00\x00\x00\x00\x00\xd6\xff\xce\xff\xcf\xff\x00\x00\xe3\xff\xe4\xff\xe6\xff\xe7\xff\x00\x00\xcb\xff"#
happyDefActions = HappyA# "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc3\xff\x00\x00\x00\x00\x00\x00\x00\x00\xbb\xff\xc9\xff\xc7\xff\xc5\xff\xc3\xff\xc0\xff\xbd\xff\xbb\xff\xbb\xff\x00\x00\xeb\xff\xb8\xff\x00\x00\x00\x00\x00\x00\x00\x00\xcc\xff\xd4\xff\xd3\xff\xbf\xff\xd6\xff\x00\x00\xc0\xff\xcf\xff\xc0\xff\x00\x00\xc0\xff\x00\x00\xea\xff\xe8\xff\xc2\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\xff\xdc\xff\xdb\xff\xde\xff\x00\x00\xda\xff\xe9\xff\x00\x00\xdf\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc7\xff\x00\x00\xc3\xff\x00\x00\x00\x00\xbd\xff\xbb\xff\x00\x00\x00\x00\x00\x00\xc3\xff\xcd\xff\x00\x00\xd5\xff\x00\x00\xcc\xff\xd3\xff\xbf\xff\x00\x00\xc0\xff\xbc\xff\xba\xff\xbb\xff\xb9\xff\xb7\xff\xca\xff\xbe\xff\xd7\xff\x00\x00\x00\x00\x00\x00\x00\x00\xd9\xff\xd2\xff\xc1\xff\xc4\xff\xc6\xff\xc8\xff\x00\x00\x00\x00\xe1\xff\xe2\xff\x00\x00\xc5\xff\x00\x00\xc3\xff\x00\x00\xc9\xff\x00\x00\xe5\xff\x00\x00\x00\x00\xe0\xff\xb9\xff\x00\x00\x00\x00\x00\x00\x00\x00\xd8\xff\xd0\xff\xce\xff\xd1\xff\x00\x00\xe3\xff\xe4\xff\xe6\xff\xe7\xff\x00\x00\xcb\xff"#
happyCheck :: HappyAddr
happyCheck = HappyA# "\xff\xff\x02\x00\x08\x00\x16\x00\x00\x00\x04\x00\x05\x00\x0f\x00\x02\x00\x0a\x00\x05\x00\x1e\x00\x05\x00\x08\x00\x16\x00\x08\x00\x0a\x00\x0b\x00\x0e\x00\x07\x00\x0e\x00\x0f\x00\x1c\x00\x08\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x02\x00\x1e\x00\x18\x00\x19\x00\x1a\x00\x1c\x00\x1c\x00\x1c\x00\x0a\x00\x0b\x00\x02\x00\x03\x00\x0e\x00\x0f\x00\x02\x00\x1c\x00\x10\x00\x1e\x00\x0a\x00\x12\x00\x0d\x00\x08\x00\x0a\x00\x19\x00\x1a\x00\x12\x00\x1c\x00\x14\x00\x0b\x00\x00\x00\x08\x00\x00\x00\x0b\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1c\x00\x19\x00\x1e\x00\x00\x00\x01\x00\x19\x00\x03\x00\x00\x00\x01\x00\x1c\x00\x03\x00\x00\x00\x01\x00\x03\x00\x03\x00\x00\x00\x0d\x00\x0e\x00\x08\x00\x03\x00\x0d\x00\x0e\x00\x0a\x00\x14\x00\x0d\x00\x0e\x00\x0a\x00\x14\x00\x03\x00\x00\x00\x01\x00\x14\x00\x03\x00\x00\x00\x01\x00\x13\x00\x03\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x03\x00\x0d\x00\x0e\x00\x13\x00\x03\x00\x0d\x00\x0e\x00\x0a\x00\x14\x00\x03\x00\x00\x00\x01\x00\x14\x00\x03\x00\x00\x00\x01\x00\x13\x00\x03\x00\x00\x00\x01\x00\x13\x00\x03\x00\x0f\x00\x0d\x00\x0e\x00\x13\x00\x16\x00\x0d\x00\x0e\x00\x16\x00\x17\x00\x0d\x00\x0e\x00\x00\x00\x01\x00\x16\x00\x03\x00\x00\x00\x01\x00\x03\x00\x03\x00\x00\x00\x01\x00\x02\x00\x03\x00\x09\x00\x0d\x00\x0e\x00\x15\x00\x03\x00\x0d\x00\x0e\x00\x0b\x00\x0c\x00\x00\x00\x01\x00\x02\x00\x03\x00\x00\x00\x01\x00\x02\x00\x03\x00\x03\x00\x06\x00\x11\x00\x0b\x00\x0c\x00\x03\x00\x09\x00\x0b\x00\x0c\x00\x00\x00\x01\x00\x02\x00\x03\x00\x00\x00\x01\x00\x02\x00\x03\x00\x13\x00\x13\x00\x0f\x00\x03\x00\x0c\x00\x0f\x00\x19\x00\x19\x00\x0c\x00\x16\x00\x17\x00\x03\x00\x16\x00\x17\x00\x19\x00\x03\x00\x08\x00\x03\x00\x07\x00\x1e\x00\x01\x00\x00\x00\x12\x00\x16\x00\x15\x00\x07\x00\x11\x00\x0c\x00\x06\x00\x10\x00\x05\x00\x03\x00\x16\x00\x03\x00\x03\x00\x0c\x00\x03\x00\x01\x00\x03\x00\x07\x00\x01\x00\x11\x00\x19\x00\x10\x00\x1c\x00\x19\x00\x0c\x00\x01\x00\x01\x00\x07\x00\x07\x00\x02\x00\x04\x00\x01\x00\x1c\x00\x04\x00\xff\xff\x1c\x00\xff\xff\x15\x00\xff\xff\xff\xff\x06\x00\xff\xff\xff\xff\x1c\x00\x07\x00\xff\xff\xff\xff\x1c\x00\x1e\x00\x09\x00\xff\xff\xff\xff\x1e\x00\x1e\x00\xff\xff\xff\xff\x1c\x00\xff\xff\xff\xff\xff\xff\x1c\x00\x1e\x00\xff\xff\x1e\x00\x1c\x00\x1e\x00\x18\x00\x14\x00\x1e\x00\x1e\x00\x1a\x00\x1e\x00\x14\x00\x1e\x00\x14\x00\x19\x00\x1e\x00\x1c\x00\x16\x00\x15\x00\x17\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"#
happyCheck = HappyA# "\xff\xff\x02\x00\x00\x00\x01\x00\x03\x00\x03\x00\x0a\x00\x0f\x00\x09\x00\x05\x00\x05\x00\x0a\x00\x03\x00\x03\x00\x16\x00\x0d\x00\x0e\x00\x00\x00\x08\x00\x0a\x00\x13\x00\x19\x00\x14\x00\x02\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x13\x00\x1e\x00\x09\x00\x0a\x00\x1c\x00\x1c\x00\x0d\x00\x0e\x00\x03\x00\x02\x00\x03\x00\x12\x00\x03\x00\x07\x00\x03\x00\x02\x00\x09\x00\x18\x00\x19\x00\x1a\x00\x10\x00\x1c\x00\x09\x00\x0a\x00\x13\x00\x0a\x00\x0d\x00\x0e\x00\x13\x00\x02\x00\x13\x00\x12\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x09\x00\x00\x00\x19\x00\x1a\x00\x19\x00\x1c\x00\x12\x00\x00\x00\x01\x00\x16\x00\x03\x00\x00\x00\x01\x00\x15\x00\x03\x00\x0e\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0d\x00\x0e\x00\x09\x00\x03\x00\x0d\x00\x0e\x00\x16\x00\x14\x00\x08\x00\x00\x00\x01\x00\x14\x00\x03\x00\x00\x00\x01\x00\x03\x00\x03\x00\x0f\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x0d\x00\x0e\x00\x16\x00\x17\x00\x0d\x00\x0e\x00\x11\x00\x14\x00\x06\x00\x00\x00\x01\x00\x14\x00\x03\x00\x00\x00\x01\x00\x07\x00\x03\x00\x00\x00\x01\x00\x03\x00\x03\x00\x0f\x00\x0d\x00\x0e\x00\x03\x00\x09\x00\x0d\x00\x0e\x00\x16\x00\x17\x00\x0d\x00\x0e\x00\x00\x00\x01\x00\x16\x00\x03\x00\x00\x00\x01\x00\x03\x00\x03\x00\x00\x00\x01\x00\x1e\x00\x03\x00\x0f\x00\x0d\x00\x0e\x00\x04\x00\x05\x00\x0d\x00\x0e\x00\x16\x00\x17\x00\x0d\x00\x0e\x00\x00\x00\x01\x00\x02\x00\x03\x00\x00\x00\x01\x00\x02\x00\x03\x00\x03\x00\x01\x00\x15\x00\x0b\x00\x0c\x00\x03\x00\x09\x00\x0b\x00\x0c\x00\x00\x00\x01\x00\x02\x00\x03\x00\x00\x00\x01\x00\x02\x00\x03\x00\x13\x00\x13\x00\x12\x00\x0b\x00\x0c\x00\x00\x00\x19\x00\x19\x00\x0c\x00\x00\x00\x01\x00\x02\x00\x03\x00\x19\x00\x0c\x00\x1c\x00\x16\x00\x1e\x00\x1e\x00\x11\x00\x11\x00\x0c\x00\x14\x00\x10\x00\x07\x00\x06\x00\x05\x00\x0b\x00\x16\x00\x0b\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x01\x00\x1c\x00\x19\x00\x03\x00\x07\x00\x10\x00\x08\x00\x1c\x00\x01\x00\x01\x00\x01\x00\x15\x00\x0b\x00\x1c\x00\x04\x00\x02\x00\x01\x00\x0f\x00\x1e\x00\x1c\x00\x04\x00\x07\x00\xff\xff\x06\x00\xff\xff\xff\xff\x08\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1e\x00\x1e\x00\x1e\x00\x1e\x00\xff\xff\xff\xff\x1c\x00\xff\xff\x14\x00\x1e\x00\x18\x00\xff\xff\x14\x00\xff\xff\x14\x00\x1a\x00\xff\xff\x1e\x00\x1c\x00\x15\x00\x19\x00\x1e\x00\x16\x00\x1e\x00\x17\x00\x1c\x00\x1e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"#
happyTable :: HappyAddr
happyTable = HappyA# "\x00\x00\x3b\x00\x40\x00\x45\x00\x1b\x00\x49\x00\x4a\x00\x2d\x00\x22\x00\x37\x00\x8f\x00\xff\xff\x80\x00\x40\x00\x17\x00\x43\x00\x23\x00\x24\x00\x2e\x00\x56\x00\x25\x00\x26\x00\x28\x00\x43\x00\x16\x00\x27\x00\x38\x00\x28\x00\x22\x00\xff\xff\x56\x00\x16\x00\x27\x00\x28\x00\x28\x00\x28\x00\x23\x00\x24\x00\x3b\x00\x85\x00\x25\x00\x26\x00\x3b\x00\x28\x00\x90\x00\xff\xff\x37\x00\x80\x00\x6a\x00\x40\x00\x37\x00\x16\x00\x27\x00\x6b\x00\x28\x00\x61\x00\x86\x00\x81\x00\x43\x00\x83\x00\x30\x00\x16\x00\x27\x00\x38\x00\x28\x00\x16\x00\x27\x00\x38\x00\x28\x00\x28\x00\x16\x00\xff\xff\x1b\x00\x1c\x00\x16\x00\x1d\x00\x1b\x00\x1c\x00\x28\x00\x1d\x00\x1b\x00\x1c\x00\x40\x00\x1d\x00\x62\x00\x1e\x00\x1f\x00\x57\x00\x28\x00\x1e\x00\x1f\x00\x37\x00\x67\x00\x1e\x00\x1f\x00\x77\x00\x5a\x00\x28\x00\x5d\x00\x1c\x00\x5c\x00\x1d\x00\x1b\x00\x1c\x00\x3c\x00\x1d\x00\x16\x00\x27\x00\x38\x00\x28\x00\x28\x00\x5e\x00\x1f\x00\x7e\x00\x28\x00\x1e\x00\x1f\x00\x3b\x00\x5f\x00\x28\x00\x1b\x00\x1c\x00\x20\x00\x1d\x00\x1b\x00\x1c\x00\x3c\x00\x1d\x00\x1b\x00\x1c\x00\x6e\x00\x1d\x00\x16\x00\x86\x00\x1f\x00\x29\x00\x66\x00\x87\x00\x1f\x00\x17\x00\x8c\x00\x88\x00\x1f\x00\x1b\x00\x1c\x00\x72\x00\x1d\x00\x1b\x00\x1c\x00\x3d\x00\x1d\x00\x31\x00\x32\x00\x33\x00\x34\x00\x58\x00\x75\x00\x1f\x00\x73\x00\x74\x00\x30\x00\x1f\x00\x8d\x00\x39\x00\x31\x00\x32\x00\x33\x00\x34\x00\x31\x00\x32\x00\x33\x00\x34\x00\x3d\x00\x7c\x00\x7a\x00\x61\x00\x39\x00\x4c\x00\x3e\x00\x38\x00\x39\x00\x31\x00\x32\x00\x33\x00\x34\x00\x31\x00\x32\x00\x33\x00\x34\x00\xbb\xff\x64\x00\x16\x00\x4e\x00\x54\x00\x16\x00\xbb\xff\x16\x00\x35\x00\x17\x00\x65\x00\x40\x00\x17\x00\x18\x00\x16\x00\x4f\x00\x41\x00\x51\x00\x56\x00\xff\xff\x5b\x00\x62\x00\x2a\x00\x19\x00\x1a\x00\x43\x00\x2b\x00\x93\x00\x45\x00\x2c\x00\x47\x00\x8a\x00\x45\x00\x8b\x00\x8c\x00\x92\x00\x90\x00\x7e\x00\x69\x00\x83\x00\x70\x00\x6c\x00\x16\x00\x6e\x00\x28\x00\x16\x00\x6d\x00\x71\x00\x72\x00\x77\x00\x79\x00\x7c\x00\x7a\x00\x4c\x00\x28\x00\x4e\x00\x00\x00\x28\x00\x00\x00\x47\x00\x00\x00\x00\x00\x51\x00\x00\x00\x00\x00\x28\x00\x53\x00\x00\x00\x00\x00\x28\x00\xff\xff\x54\x00\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x28\x00\xff\xff\x00\x00\xff\xff\x28\x00\xff\xff\x56\x00\x5a\x00\xff\xff\xff\xff\x27\x00\xff\xff\x61\x00\xff\xff\x65\x00\x16\x00\xb9\xff\x28\x00\x45\x00\x47\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#
happyTable = HappyA# "\x00\x00\x3c\x00\x1b\x00\x1c\x00\x29\x00\x1d\x00\x82\x00\x2e\x00\x38\x00\x8d\x00\x7e\x00\x76\x00\x29\x00\x40\x00\x17\x00\x1e\x00\x1f\x00\x61\x00\x54\x00\x3c\x00\x3d\x00\x16\x00\x66\x00\x22\x00\x16\x00\x28\x00\x39\x00\x29\x00\x3d\x00\xff\xff\x23\x00\x24\x00\x29\x00\x29\x00\x25\x00\x26\x00\x29\x00\x3c\x00\x81\x00\x27\x00\x29\x00\x53\x00\x29\x00\x22\x00\x38\x00\x53\x00\x16\x00\x28\x00\x8e\x00\x29\x00\x23\x00\x24\x00\x7c\x00\x31\x00\x25\x00\x26\x00\x6e\x00\x3c\x00\x2a\x00\x27\x00\x16\x00\x28\x00\x39\x00\x29\x00\x38\x00\x1b\x00\x16\x00\x28\x00\x16\x00\x29\x00\x7e\x00\x1b\x00\x1c\x00\x65\x00\x1d\x00\x1b\x00\x1c\x00\x73\x00\x1d\x00\x2f\x00\x16\x00\x28\x00\x39\x00\x29\x00\x1e\x00\x1f\x00\x38\x00\x40\x00\x1e\x00\x1f\x00\x72\x00\x58\x00\x41\x00\x5b\x00\x1c\x00\x5a\x00\x5c\x00\x1b\x00\x1c\x00\x74\x00\x1d\x00\x16\x00\x16\x00\x28\x00\x39\x00\x29\x00\x5d\x00\x1f\x00\x17\x00\x8a\x00\x1e\x00\x1f\x00\x78\x00\x5e\x00\x7a\x00\x1b\x00\x1c\x00\x20\x00\x1d\x00\x1b\x00\x1c\x00\x53\x00\x1d\x00\x1b\x00\x1c\x00\x3e\x00\x1d\x00\x16\x00\x82\x00\x1f\x00\x4b\x00\x55\x00\x83\x00\x1f\x00\x17\x00\x64\x00\x84\x00\x1f\x00\x1b\x00\x1c\x00\x44\x00\x1d\x00\x1b\x00\x1c\x00\x4d\x00\x1d\x00\x1b\x00\x1c\x00\xff\xff\x1d\x00\x16\x00\x85\x00\x1f\x00\x48\x00\x49\x00\x75\x00\x1f\x00\x17\x00\x18\x00\x31\x00\x1f\x00\x32\x00\x33\x00\x34\x00\x35\x00\x32\x00\x33\x00\x34\x00\x35\x00\x3e\x00\x59\x00\x1a\x00\x8b\x00\x3a\x00\x57\x00\x3f\x00\x60\x00\x3a\x00\x32\x00\x33\x00\x34\x00\x35\x00\x32\x00\x33\x00\x34\x00\x35\x00\xbb\xff\x63\x00\x2b\x00\x39\x00\x3a\x00\x61\x00\xbb\xff\x16\x00\x51\x00\x32\x00\x33\x00\x34\x00\x35\x00\x16\x00\x69\x00\x29\x00\x19\x00\xff\xff\xff\xff\x6a\x00\x2c\x00\x36\x00\x60\x00\x2d\x00\x42\x00\x44\x00\x46\x00\x91\x00\x44\x00\x90\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8e\x00\x7c\x00\x29\x00\x16\x00\x68\x00\x80\x00\x6c\x00\x6b\x00\x29\x00\x70\x00\x71\x00\x72\x00\x46\x00\x6d\x00\x29\x00\x78\x00\x7a\x00\x4b\x00\x6e\x00\xff\xff\x29\x00\x4d\x00\x50\x00\x00\x00\x4f\x00\x00\x00\x00\x00\x51\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x29\x00\x00\x00\x57\x00\xff\xff\x53\x00\x00\x00\x60\x00\x00\x00\x64\x00\x28\x00\x00\x00\xff\xff\x29\x00\x46\x00\x16\x00\xff\xff\x44\x00\xff\xff\x48\x00\x29\x00\xb9\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#
happyReduceArr = array (20, 72) [
(20 , happyReduce_20),
@@ -332,20 +332,8 @@ happyReduction_28 (happy_x_5 `HappyStk`
(Fun happy_var_1 happy_var_3 happy_var_5
) `HappyStk` happyRest}}}
happyReduce_29 = happyReduce 4# 8# happyReduction_29
happyReduction_29 (happy_x_4 `HappyStk`
happy_x_3 `HappyStk`
happy_x_2 `HappyStk`
happy_x_1 `HappyStk`
happyRest)
= case happyOut26 happy_x_2 of { happy_var_2 ->
case happyOut23 happy_x_4 of { happy_var_4 ->
happyIn31
(AFl happy_var_2 happy_var_4
) `HappyStk` happyRest}}
happyReduce_30 = happySpecReduce_3 9# happyReduction_30
happyReduction_30 happy_x_3
happyReduce_29 = happySpecReduce_3 9# happyReduction_29
happyReduction_29 happy_x_3
happy_x_2
happy_x_1
= case happyOut26 happy_x_1 of { happy_var_1 ->
@@ -354,20 +342,8 @@ happyReduction_30 happy_x_3
(Lin happy_var_1 happy_var_3
)}}
happyReduce_31 = happyReduce 4# 9# happyReduction_31
happyReduction_31 (happy_x_4 `HappyStk`
happy_x_3 `HappyStk`
happy_x_2 `HappyStk`
happy_x_1 `HappyStk`
happyRest)
= case happyOut26 happy_x_2 of { happy_var_2 ->
case happyOut23 happy_x_4 of { happy_var_4 ->
happyIn32
(CFl happy_var_2 happy_var_4
) `HappyStk` happyRest}}
happyReduce_32 = happySpecReduce_3 10# happyReduction_32
happyReduction_32 happy_x_3
happyReduce_30 = happySpecReduce_3 10# happyReduction_30
happyReduction_30 happy_x_3
happy_x_2
happy_x_1
= case happyOut42 happy_x_1 of { happy_var_1 ->
@@ -376,8 +352,8 @@ happyReduction_32 happy_x_3
(Typ happy_var_1 happy_var_3
)}}
happyReduce_33 = happyReduce 4# 11# happyReduction_33
happyReduction_33 (happy_x_4 `HappyStk`
happyReduce_31 = happyReduce 4# 11# happyReduction_31
happyReduction_31 (happy_x_4 `HappyStk`
happy_x_3 `HappyStk`
happy_x_2 `HappyStk`
happy_x_1 `HappyStk`
@@ -388,49 +364,49 @@ happyReduction_33 (happy_x_4 `HappyStk`
(Tr happy_var_2 (reverse happy_var_3)
) `HappyStk` happyRest}}
happyReduce_34 = happySpecReduce_1 11# happyReduction_34
happyReduction_34 happy_x_1
happyReduce_32 = happySpecReduce_1 11# happyReduction_32
happyReduction_32 happy_x_1
= case happyOut35 happy_x_1 of { happy_var_1 ->
happyIn34
(trA_ happy_var_1
)}
happyReduce_35 = happySpecReduce_1 12# happyReduction_35
happyReduction_35 happy_x_1
happyReduce_33 = happySpecReduce_1 12# happyReduction_33
happyReduction_33 happy_x_1
= case happyOut26 happy_x_1 of { happy_var_1 ->
happyIn35
(AC happy_var_1
)}
happyReduce_36 = happySpecReduce_1 12# happyReduction_36
happyReduction_36 happy_x_1
happyReduce_34 = happySpecReduce_1 12# happyReduction_34
happyReduction_34 happy_x_1
= case happyOut23 happy_x_1 of { happy_var_1 ->
happyIn35
(AS happy_var_1
)}
happyReduce_37 = happySpecReduce_1 12# happyReduction_37
happyReduction_37 happy_x_1
happyReduce_35 = happySpecReduce_1 12# happyReduction_35
happyReduction_35 happy_x_1
= case happyOut24 happy_x_1 of { happy_var_1 ->
happyIn35
(AI happy_var_1
)}
happyReduce_38 = happySpecReduce_1 12# happyReduction_38
happyReduction_38 happy_x_1
happyReduce_36 = happySpecReduce_1 12# happyReduction_36
happyReduction_36 happy_x_1
= case happyOut25 happy_x_1 of { happy_var_1 ->
happyIn35
(AF happy_var_1
)}
happyReduce_39 = happySpecReduce_1 12# happyReduction_39
happyReduction_39 happy_x_1
happyReduce_37 = happySpecReduce_1 12# happyReduction_37
happyReduction_37 happy_x_1
= happyIn35
(AM
)
happyReduce_40 = happySpecReduce_3 13# happyReduction_40
happyReduction_40 happy_x_3
happyReduce_38 = happySpecReduce_3 13# happyReduction_38
happyReduction_38 happy_x_3
happy_x_2
happy_x_1
= case happyOut43 happy_x_2 of { happy_var_2 ->
@@ -438,8 +414,8 @@ happyReduction_40 happy_x_3
(R happy_var_2
)}
happyReduce_41 = happyReduce 5# 13# happyReduction_41
happyReduction_41 (happy_x_5 `HappyStk`
happyReduce_39 = happyReduce 5# 13# happyReduction_39
happyReduction_39 (happy_x_5 `HappyStk`
happy_x_4 `HappyStk`
happy_x_3 `HappyStk`
happy_x_2 `HappyStk`
@@ -451,8 +427,8 @@ happyReduction_41 (happy_x_5 `HappyStk`
(P happy_var_2 happy_var_4
) `HappyStk` happyRest}}
happyReduce_42 = happySpecReduce_3 13# happyReduction_42
happyReduction_42 happy_x_3
happyReduce_40 = happySpecReduce_3 13# happyReduction_40
happyReduction_40 happy_x_3
happy_x_2
happy_x_1
= case happyOut43 happy_x_2 of { happy_var_2 ->
@@ -460,37 +436,37 @@ happyReduction_42 happy_x_3
(S happy_var_2
)}
happyReduce_43 = happySpecReduce_1 13# happyReduction_43
happyReduction_43 happy_x_1
happyReduce_41 = happySpecReduce_1 13# happyReduction_41
happyReduction_41 happy_x_1
= case happyOut37 happy_x_1 of { happy_var_1 ->
happyIn36
(K happy_var_1
)}
happyReduce_44 = happySpecReduce_2 13# happyReduction_44
happyReduction_44 happy_x_2
happyReduce_42 = happySpecReduce_2 13# happyReduction_42
happyReduction_42 happy_x_2
happy_x_1
= case happyOut24 happy_x_2 of { happy_var_2 ->
happyIn36
(V happy_var_2
)}
happyReduce_45 = happySpecReduce_1 13# happyReduction_45
happyReduction_45 happy_x_1
happyReduce_43 = happySpecReduce_1 13# happyReduction_43
happyReduction_43 happy_x_1
= case happyOut24 happy_x_1 of { happy_var_1 ->
happyIn36
(C happy_var_1
)}
happyReduce_46 = happySpecReduce_1 13# happyReduction_46
happyReduction_46 happy_x_1
happyReduce_44 = happySpecReduce_1 13# happyReduction_44
happyReduction_44 happy_x_1
= case happyOut26 happy_x_1 of { happy_var_1 ->
happyIn36
(F happy_var_1
)}
happyReduce_47 = happySpecReduce_3 13# happyReduction_47
happyReduction_47 happy_x_3
happyReduce_45 = happySpecReduce_3 13# happyReduction_45
happyReduction_45 happy_x_3
happy_x_2
happy_x_1
= case happyOut43 happy_x_2 of { happy_var_2 ->
@@ -498,8 +474,8 @@ happyReduction_47 happy_x_3
(FV happy_var_2
)}
happyReduce_48 = happyReduce 5# 13# happyReduction_48
happyReduction_48 (happy_x_5 `HappyStk`
happyReduce_46 = happyReduce 5# 13# happyReduction_46
happyReduction_46 (happy_x_5 `HappyStk`
happy_x_4 `HappyStk`
happy_x_3 `HappyStk`
happy_x_2 `HappyStk`
@@ -511,8 +487,8 @@ happyReduction_48 (happy_x_5 `HappyStk`
(W happy_var_2 happy_var_4
) `HappyStk` happyRest}}
happyReduce_49 = happyReduce 5# 13# happyReduction_49
happyReduction_49 (happy_x_5 `HappyStk`
happyReduce_47 = happyReduce 5# 13# happyReduction_47
happyReduction_47 (happy_x_5 `HappyStk`
happy_x_4 `HappyStk`
happy_x_3 `HappyStk`
happy_x_2 `HappyStk`
@@ -524,12 +500,33 @@ happyReduction_49 (happy_x_5 `HappyStk`
(RP happy_var_2 happy_var_4
) `HappyStk` happyRest}}
happyReduce_50 = happySpecReduce_1 13# happyReduction_50
happyReduction_50 happy_x_1
happyReduce_48 = happySpecReduce_1 13# happyReduction_48
happyReduction_48 happy_x_1
= happyIn36
(TM
)
happyReduce_49 = happyReduce 5# 13# happyReduction_49
happyReduction_49 (happy_x_5 `HappyStk`
happy_x_4 `HappyStk`
happy_x_3 `HappyStk`
happy_x_2 `HappyStk`
happy_x_1 `HappyStk`
happyRest)
= case happyOut26 happy_x_2 of { happy_var_2 ->
case happyOut36 happy_x_4 of { happy_var_4 ->
happyIn36
(L happy_var_2 happy_var_4
) `HappyStk` happyRest}}
happyReduce_50 = happySpecReduce_2 13# happyReduction_50
happyReduction_50 happy_x_2
happy_x_1
= case happyOut26 happy_x_2 of { happy_var_2 ->
happyIn36
(BV happy_var_2
)}
happyReduce_51 = happySpecReduce_1 14# happyReduction_51
happyReduction_51 happy_x_1
= case happyOut23 happy_x_1 of { happy_var_1 ->
@@ -714,17 +711,17 @@ happyNewToken action sts stk (tk:tks) =
PT _ (TS "}") -> cont 5#;
PT _ (TS ":") -> cont 6#;
PT _ (TS "=") -> cont 7#;
PT _ (TS "%") -> cont 8#;
PT _ (TS "->") -> cont 9#;
PT _ (TS "?") -> cont 10#;
PT _ (TS "[") -> cont 11#;
PT _ (TS "]") -> cont 12#;
PT _ (TS "!") -> cont 13#;
PT _ (TS "$") -> cont 14#;
PT _ (TS "[|") -> cont 15#;
PT _ (TS "|]") -> cont 16#;
PT _ (TS "+") -> cont 17#;
PT _ (TS "@") -> cont 18#;
PT _ (TS "->") -> cont 8#;
PT _ (TS "?") -> cont 9#;
PT _ (TS "[") -> cont 10#;
PT _ (TS "]") -> cont 11#;
PT _ (TS "!") -> cont 12#;
PT _ (TS "$") -> cont 13#;
PT _ (TS "[|") -> cont 14#;
PT _ (TS "|]") -> cont 15#;
PT _ (TS "+") -> cont 16#;
PT _ (TS "@") -> cont 17#;
PT _ (TS "#") -> cont 18#;
PT _ (TS "/") -> cont 19#;
PT _ (TS ",") -> cont 20#;
PT _ (TS "abstract") -> cont 21#;

View File

@@ -29,8 +29,8 @@ render d = rend 0 (map ($ "") $ d []) "" where
t : "]" :ts -> showString t . showChar ']' . rend i ts
t :ts -> space t . rend i ts
_ -> id
new i = showChar '\n' . replicateS (0) (showChar ' ') . dropWhile isSpace
space t = showString t . id ----(\s -> if null s then "" else (' ':s))
new i = showChar '\n' . replicateS (2*i) (showChar ' ') . dropWhile isSpace
space t = showString t ---- . (\s -> if null s then "" else (' ':s))
parenth :: Doc -> Doc
parenth ss = doc (showChar '(') . ss . doc (showChar ')')
@@ -99,7 +99,7 @@ instance Print Header where
instance Print Abstract where
prt i e = case e of
Abs absdefs -> prPrec i 0 (concatD [doc (showString "abstract") , doc (showString "{") , prt 0 absdefs , doc (showString "}")])
Abs absdefs -> prPrec i 0 (concatD [doc (showString "abstract ") , doc (showString "{") , prt 0 absdefs , doc (showString "}")])
instance Print Concrete where
@@ -113,7 +113,6 @@ instance Print Concrete where
instance Print AbsDef where
prt i e = case e of
Fun cid type' exp -> prPrec i 0 (concatD [prt 0 cid , doc (showString ":") , prt 0 type' , doc (showString "=") , prt 0 exp])
AFl cid str -> prPrec i 0 (concatD [doc (showString "%") , prt 0 cid , doc (showString "=") , prt 0 str])
prtList es = case es of
[] -> (concatD [])
@@ -122,7 +121,6 @@ instance Print AbsDef where
instance Print CncDef where
prt i e = case e of
Lin cid term -> prPrec i 0 (concatD [prt 0 cid , doc (showString "=") , prt 0 term])
CFl cid str -> prPrec i 0 (concatD [doc (showString "%") , prt 0 cid , doc (showString "=") , prt 0 str])
prtList es = case es of
[] -> (concatD [])
@@ -163,6 +161,8 @@ instance Print Term where
W str term -> prPrec i 0 (concatD [doc (showString "(") , prt 0 str , doc (showString "+") , prt 0 term , doc (showString ")")])
RP term0 term -> prPrec i 0 (concatD [doc (showString "(") , prt 0 term0 , doc (showString "@") , prt 0 term , doc (showString ")")])
TM -> prPrec i 0 (concatD [doc (showString "?")])
L cid term -> prPrec i 0 (concatD [doc (showString "(") , prt 0 cid , doc (showString "->") , prt 0 term , doc (showString ")")])
BV cid -> prPrec i 0 (concatD [doc (showString "#") , prt 0 cid])
prtList es = case es of
[] -> (concatD [])

View File

@@ -37,13 +37,11 @@ transConcrete x = case x of
transAbsDef :: AbsDef -> Result
transAbsDef x = case x of
Fun cid type' exp -> failure x
AFl cid str -> failure x
transCncDef :: CncDef -> Result
transCncDef x = case x of
Lin cid term -> failure x
CFl cid str -> failure x
transType :: Type -> Result
@@ -78,6 +76,8 @@ transTerm x = case x of
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