From 7dfa1842859b408d0eadd4d79a5b1ce0267a13b2 Mon Sep 17 00:00:00 2001 From: bringert Date: Wed, 30 Nov 2005 20:27:01 +0000 Subject: [PATCH] Added bind operators, do-notation, a cons operator and list sytnax. --- src/Transfer/Syntax/Abs.hs | 117 +++-- src/Transfer/Syntax/Doc.tex | 81 ++- src/Transfer/Syntax/Layout.hs | 2 +- src/Transfer/Syntax/Lex.hs | 12 +- src/Transfer/Syntax/Lex.x | 4 +- src/Transfer/Syntax/Par.hs | 904 ++++++++++++++++++++-------------- src/Transfer/Syntax/Par.y | 71 ++- src/Transfer/Syntax/Print.hs | 62 ++- src/Transfer/Syntax/Skel.hs | 17 + src/Transfer/Syntax/Syntax.cf | 67 +-- src/Transfer/SyntaxToCore.hs | 38 +- transfer/examples/test.tr | 4 +- transfer/lib/list.tr | 31 -- transfer/lib/maybe.tr | 24 - transfer/lib/prelude.tr | 63 ++- 15 files changed, 929 insertions(+), 568 deletions(-) delete mode 100644 transfer/lib/list.tr delete mode 100644 transfer/lib/maybe.tr diff --git a/src/Transfer/Syntax/Abs.hs b/src/Transfer/Syntax/Abs.hs index 357053d65..0817b78d1 100644 --- a/src/Transfer/Syntax/Abs.hs +++ b/src/Transfer/Syntax/Abs.hs @@ -24,6 +24,8 @@ data LetDef_ type LetDef = Tree LetDef_ data Case_ type Case = Tree Case_ +data Bind_ +type Bind = Tree Bind_ data VarOrWild_ type VarOrWild = Tree VarOrWild_ data FieldType_ @@ -53,9 +55,12 @@ data Tree :: * -> * where ELet :: [LetDef] -> Exp -> Tree Exp_ ECase :: Exp -> [Case] -> Tree Exp_ EIf :: Exp -> Exp -> Exp -> Tree Exp_ + EDo :: [Bind] -> Exp -> Tree Exp_ EAbs :: VarOrWild -> Exp -> Tree Exp_ EPi :: VarOrWild -> Exp -> Exp -> Tree Exp_ EPiNoVar :: Exp -> Exp -> Tree Exp_ + EBind :: Exp -> Exp -> Tree Exp_ + EBindC :: Exp -> Exp -> Tree Exp_ EOr :: Exp -> Exp -> Tree Exp_ EAnd :: Exp -> Exp -> Tree Exp_ EEq :: Exp -> Exp -> Tree Exp_ @@ -64,6 +69,7 @@ data Tree :: * -> * where ELe :: Exp -> Exp -> Tree Exp_ EGt :: Exp -> Exp -> Tree Exp_ EGe :: Exp -> Exp -> Tree Exp_ + EListCons :: Exp -> Exp -> Tree Exp_ EAdd :: Exp -> Exp -> Tree Exp_ ESub :: Exp -> Exp -> Tree Exp_ EMul :: Exp -> Exp -> Tree Exp_ @@ -74,6 +80,7 @@ data Tree :: * -> * where EProj :: Exp -> Ident -> Tree Exp_ ERecType :: [FieldType] -> Tree Exp_ ERec :: [FieldValue] -> Tree Exp_ + EList :: [Exp] -> Tree Exp_ EVar :: Ident -> Tree Exp_ EType :: Tree Exp_ EStr :: String -> Tree Exp_ @@ -81,6 +88,8 @@ data Tree :: * -> * where EMeta :: Tree Exp_ LetDef :: Ident -> Exp -> Exp -> Tree LetDef_ Case :: Pattern -> Exp -> Tree Case_ + BindVar :: VarOrWild -> Exp -> Tree Bind_ + BindNoVar :: Exp -> Tree Bind_ VVar :: Ident -> Tree VarOrWild_ VWild :: Tree VarOrWild_ FieldType :: Ident -> Exp -> Tree FieldType_ @@ -116,9 +125,12 @@ composOpM f t = case t of ELet letdefs exp -> return ELet `ap` mapM f letdefs `ap` f exp ECase exp cases -> return ECase `ap` f exp `ap` mapM f cases EIf exp0 exp1 exp2 -> return EIf `ap` f exp0 `ap` f exp1 `ap` f exp2 + EDo binds exp -> return EDo `ap` mapM f binds `ap` f exp EAbs varorwild exp -> return EAbs `ap` f varorwild `ap` f exp EPi varorwild exp0 exp1 -> return EPi `ap` f varorwild `ap` f exp0 `ap` f exp1 EPiNoVar exp0 exp1 -> return EPiNoVar `ap` f exp0 `ap` f exp1 + EBind exp0 exp1 -> return EBind `ap` f exp0 `ap` f exp1 + EBindC exp0 exp1 -> return EBindC `ap` f exp0 `ap` f exp1 EOr exp0 exp1 -> return EOr `ap` f exp0 `ap` f exp1 EAnd exp0 exp1 -> return EAnd `ap` f exp0 `ap` f exp1 EEq exp0 exp1 -> return EEq `ap` f exp0 `ap` f exp1 @@ -127,6 +139,7 @@ composOpM f t = case t of ELe exp0 exp1 -> return ELe `ap` f exp0 `ap` f exp1 EGt exp0 exp1 -> return EGt `ap` f exp0 `ap` f exp1 EGe exp0 exp1 -> return EGe `ap` f exp0 `ap` f exp1 + EListCons exp0 exp1 -> return EListCons `ap` f exp0 `ap` f exp1 EAdd exp0 exp1 -> return EAdd `ap` f exp0 `ap` f exp1 ESub exp0 exp1 -> return ESub `ap` f exp0 `ap` f exp1 EMul exp0 exp1 -> return EMul `ap` f exp0 `ap` f exp1 @@ -137,9 +150,12 @@ composOpM f t = case t of EProj exp i -> return EProj `ap` f exp `ap` f i ERecType fieldtypes -> return ERecType `ap` mapM f fieldtypes ERec fieldvalues -> return ERec `ap` mapM f fieldvalues + EList exps -> return EList `ap` mapM f exps EVar i -> return EVar `ap` f i LetDef i exp0 exp1 -> return LetDef `ap` f i `ap` f exp0 `ap` f exp1 Case pattern exp -> return Case `ap` f pattern `ap` f exp + BindVar varorwild exp -> return BindVar `ap` f varorwild `ap` f exp + BindNoVar exp -> return BindNoVar `ap` f exp VVar i -> return VVar `ap` f i FieldType i exp -> return FieldType `ap` f i `ap` f exp FieldValue i exp -> return FieldValue `ap` f i `ap` f exp @@ -162,9 +178,12 @@ composOpFold zero combine f t = case t of ELet letdefs exp -> foldr combine zero (map f letdefs) `combine` f exp ECase exp cases -> f exp `combine` foldr combine zero (map f cases) EIf exp0 exp1 exp2 -> f exp0 `combine` f exp1 `combine` f exp2 + EDo binds exp -> foldr combine zero (map f binds) `combine` f exp EAbs varorwild exp -> f varorwild `combine` f exp EPi varorwild exp0 exp1 -> f varorwild `combine` f exp0 `combine` f exp1 EPiNoVar exp0 exp1 -> f exp0 `combine` f exp1 + EBind exp0 exp1 -> f exp0 `combine` f exp1 + EBindC exp0 exp1 -> f exp0 `combine` f exp1 EOr exp0 exp1 -> f exp0 `combine` f exp1 EAnd exp0 exp1 -> f exp0 `combine` f exp1 EEq exp0 exp1 -> f exp0 `combine` f exp1 @@ -173,6 +192,7 @@ composOpFold zero combine f t = case t of ELe exp0 exp1 -> f exp0 `combine` f exp1 EGt exp0 exp1 -> f exp0 `combine` f exp1 EGe exp0 exp1 -> f exp0 `combine` f exp1 + EListCons exp0 exp1 -> f exp0 `combine` f exp1 EAdd exp0 exp1 -> f exp0 `combine` f exp1 ESub exp0 exp1 -> f exp0 `combine` f exp1 EMul exp0 exp1 -> f exp0 `combine` f exp1 @@ -183,9 +203,12 @@ composOpFold zero combine f t = case t of EProj exp i -> f exp `combine` f i ERecType fieldtypes -> foldr combine zero (map f fieldtypes) ERec fieldvalues -> foldr combine zero (map f fieldvalues) + EList exps -> foldr combine zero (map f exps) EVar i -> f i LetDef i exp0 exp1 -> f i `combine` f exp0 `combine` f exp1 Case pattern exp -> f pattern `combine` f exp + BindVar varorwild exp -> f varorwild `combine` f exp + BindNoVar exp -> f exp VVar i -> f i FieldType i exp -> f i `combine` f exp FieldValue i exp -> f i `combine` f exp @@ -212,9 +235,12 @@ instance Show (Tree c) where ELet letdefs exp -> opar n . showString "ELet" . showChar ' ' . showsPrec 1 letdefs . showChar ' ' . showsPrec 1 exp . cpar n ECase exp cases -> opar n . showString "ECase" . showChar ' ' . showsPrec 1 exp . showChar ' ' . showsPrec 1 cases . cpar n EIf exp0 exp1 exp2 -> opar n . showString "EIf" . showChar ' ' . showsPrec 1 exp0 . showChar ' ' . showsPrec 1 exp1 . showChar ' ' . showsPrec 1 exp2 . cpar n + EDo binds exp -> opar n . showString "EDo" . showChar ' ' . showsPrec 1 binds . showChar ' ' . showsPrec 1 exp . cpar n EAbs varorwild exp -> opar n . showString "EAbs" . showChar ' ' . showsPrec 1 varorwild . showChar ' ' . showsPrec 1 exp . cpar n EPi varorwild exp0 exp1 -> opar n . showString "EPi" . showChar ' ' . showsPrec 1 varorwild . showChar ' ' . showsPrec 1 exp0 . showChar ' ' . showsPrec 1 exp1 . cpar n EPiNoVar exp0 exp1 -> opar n . showString "EPiNoVar" . showChar ' ' . showsPrec 1 exp0 . showChar ' ' . showsPrec 1 exp1 . cpar n + EBind exp0 exp1 -> opar n . showString "EBind" . showChar ' ' . showsPrec 1 exp0 . showChar ' ' . showsPrec 1 exp1 . cpar n + EBindC exp0 exp1 -> opar n . showString "EBindC" . showChar ' ' . showsPrec 1 exp0 . showChar ' ' . showsPrec 1 exp1 . cpar n EOr exp0 exp1 -> opar n . showString "EOr" . showChar ' ' . showsPrec 1 exp0 . showChar ' ' . showsPrec 1 exp1 . cpar n EAnd exp0 exp1 -> opar n . showString "EAnd" . showChar ' ' . showsPrec 1 exp0 . showChar ' ' . showsPrec 1 exp1 . cpar n EEq exp0 exp1 -> opar n . showString "EEq" . showChar ' ' . showsPrec 1 exp0 . showChar ' ' . showsPrec 1 exp1 . cpar n @@ -223,6 +249,7 @@ instance Show (Tree c) where ELe exp0 exp1 -> opar n . showString "ELe" . showChar ' ' . showsPrec 1 exp0 . showChar ' ' . showsPrec 1 exp1 . cpar n EGt exp0 exp1 -> opar n . showString "EGt" . showChar ' ' . showsPrec 1 exp0 . showChar ' ' . showsPrec 1 exp1 . cpar n EGe exp0 exp1 -> opar n . showString "EGe" . showChar ' ' . showsPrec 1 exp0 . showChar ' ' . showsPrec 1 exp1 . cpar n + EListCons exp0 exp1 -> opar n . showString "EListCons" . showChar ' ' . showsPrec 1 exp0 . showChar ' ' . showsPrec 1 exp1 . cpar n EAdd exp0 exp1 -> opar n . showString "EAdd" . showChar ' ' . showsPrec 1 exp0 . showChar ' ' . showsPrec 1 exp1 . cpar n ESub exp0 exp1 -> opar n . showString "ESub" . showChar ' ' . showsPrec 1 exp0 . showChar ' ' . showsPrec 1 exp1 . cpar n EMul exp0 exp1 -> opar n . showString "EMul" . showChar ' ' . showsPrec 1 exp0 . showChar ' ' . showsPrec 1 exp1 . cpar n @@ -233,6 +260,7 @@ instance Show (Tree c) where EProj exp i -> opar n . showString "EProj" . showChar ' ' . showsPrec 1 exp . showChar ' ' . showsPrec 1 i . cpar n ERecType fieldtypes -> opar n . showString "ERecType" . showChar ' ' . showsPrec 1 fieldtypes . cpar n ERec fieldvalues -> opar n . showString "ERec" . showChar ' ' . showsPrec 1 fieldvalues . cpar n + EList exps -> opar n . showString "EList" . showChar ' ' . showsPrec 1 exps . cpar n EVar i -> opar n . showString "EVar" . showChar ' ' . showsPrec 1 i . cpar n EType -> showString "EType" EStr str -> opar n . showString "EStr" . showChar ' ' . showsPrec 1 str . cpar n @@ -240,6 +268,8 @@ instance Show (Tree c) where EMeta -> showString "EMeta" LetDef i exp0 exp1 -> opar n . showString "LetDef" . showChar ' ' . showsPrec 1 i . showChar ' ' . showsPrec 1 exp0 . showChar ' ' . showsPrec 1 exp1 . cpar n Case pattern exp -> opar n . showString "Case" . showChar ' ' . showsPrec 1 pattern . showChar ' ' . showsPrec 1 exp . cpar n + BindVar varorwild exp -> opar n . showString "BindVar" . showChar ' ' . showsPrec 1 varorwild . showChar ' ' . showsPrec 1 exp . cpar n + BindNoVar exp -> opar n . showString "BindNoVar" . showChar ' ' . showsPrec 1 exp . cpar n VVar i -> opar n . showString "VVar" . showChar ' ' . showsPrec 1 i . cpar n VWild -> showString "VWild" FieldType i exp -> opar n . showString "FieldType" . showChar ' ' . showsPrec 1 i . showChar ' ' . showsPrec 1 exp . cpar n @@ -270,9 +300,12 @@ johnMajorEq (FieldPattern i pattern) (FieldPattern i_ pattern_) = i == i_ && pat johnMajorEq (ELet letdefs exp) (ELet letdefs_ exp_) = letdefs == letdefs_ && exp == exp_ johnMajorEq (ECase exp cases) (ECase exp_ cases_) = exp == exp_ && cases == cases_ johnMajorEq (EIf exp0 exp1 exp2) (EIf exp0_ exp1_ exp2_) = exp0 == exp0_ && exp1 == exp1_ && exp2 == exp2_ +johnMajorEq (EDo binds exp) (EDo binds_ exp_) = binds == binds_ && exp == exp_ johnMajorEq (EAbs varorwild exp) (EAbs varorwild_ exp_) = varorwild == varorwild_ && exp == exp_ johnMajorEq (EPi varorwild exp0 exp1) (EPi varorwild_ exp0_ exp1_) = varorwild == varorwild_ && exp0 == exp0_ && exp1 == exp1_ johnMajorEq (EPiNoVar exp0 exp1) (EPiNoVar exp0_ exp1_) = exp0 == exp0_ && exp1 == exp1_ +johnMajorEq (EBind exp0 exp1) (EBind exp0_ exp1_) = exp0 == exp0_ && exp1 == exp1_ +johnMajorEq (EBindC exp0 exp1) (EBindC exp0_ exp1_) = exp0 == exp0_ && exp1 == exp1_ johnMajorEq (EOr exp0 exp1) (EOr exp0_ exp1_) = exp0 == exp0_ && exp1 == exp1_ johnMajorEq (EAnd exp0 exp1) (EAnd exp0_ exp1_) = exp0 == exp0_ && exp1 == exp1_ johnMajorEq (EEq exp0 exp1) (EEq exp0_ exp1_) = exp0 == exp0_ && exp1 == exp1_ @@ -281,6 +314,7 @@ johnMajorEq (ELt exp0 exp1) (ELt exp0_ exp1_) = exp0 == exp0_ && exp1 == exp1_ johnMajorEq (ELe exp0 exp1) (ELe exp0_ exp1_) = exp0 == exp0_ && exp1 == exp1_ johnMajorEq (EGt exp0 exp1) (EGt exp0_ exp1_) = exp0 == exp0_ && exp1 == exp1_ johnMajorEq (EGe exp0 exp1) (EGe exp0_ exp1_) = exp0 == exp0_ && exp1 == exp1_ +johnMajorEq (EListCons exp0 exp1) (EListCons exp0_ exp1_) = exp0 == exp0_ && exp1 == exp1_ johnMajorEq (EAdd exp0 exp1) (EAdd exp0_ exp1_) = exp0 == exp0_ && exp1 == exp1_ johnMajorEq (ESub exp0 exp1) (ESub exp0_ exp1_) = exp0 == exp0_ && exp1 == exp1_ johnMajorEq (EMul exp0 exp1) (EMul exp0_ exp1_) = exp0 == exp0_ && exp1 == exp1_ @@ -291,6 +325,7 @@ johnMajorEq (EApp exp0 exp1) (EApp exp0_ exp1_) = exp0 == exp0_ && exp1 == exp1_ johnMajorEq (EProj exp i) (EProj exp_ i_) = exp == exp_ && i == i_ johnMajorEq (ERecType fieldtypes) (ERecType fieldtypes_) = fieldtypes == fieldtypes_ johnMajorEq (ERec fieldvalues) (ERec fieldvalues_) = fieldvalues == fieldvalues_ +johnMajorEq (EList exps) (EList exps_) = exps == exps_ johnMajorEq (EVar i) (EVar i_) = i == i_ johnMajorEq EType EType = True johnMajorEq (EStr str) (EStr str_) = str == str_ @@ -298,6 +333,8 @@ johnMajorEq (EInt n) (EInt n_) = n == n_ johnMajorEq EMeta EMeta = True johnMajorEq (LetDef i exp0 exp1) (LetDef i_ exp0_ exp1_) = i == i_ && exp0 == exp0_ && exp1 == exp1_ johnMajorEq (Case pattern exp) (Case pattern_ exp_) = pattern == pattern_ && exp == exp_ +johnMajorEq (BindVar varorwild exp) (BindVar varorwild_ exp_) = varorwild == varorwild_ && exp == exp_ +johnMajorEq (BindNoVar exp) (BindNoVar exp_) = exp == exp_ johnMajorEq (VVar i) (VVar i_) = i == i_ johnMajorEq VWild VWild = True johnMajorEq (FieldType i exp) (FieldType i_ exp_) = i == i_ && exp == exp_ @@ -327,39 +364,46 @@ instance Ord (Tree c) where index (ELet _ _) = 16 index (ECase _ _) = 17 index (EIf _ _ _) = 18 - index (EAbs _ _) = 19 - index (EPi _ _ _) = 20 - index (EPiNoVar _ _) = 21 - index (EOr _ _) = 22 - index (EAnd _ _) = 23 - index (EEq _ _) = 24 - index (ENe _ _) = 25 - index (ELt _ _) = 26 - index (ELe _ _) = 27 - index (EGt _ _) = 28 - index (EGe _ _) = 29 - index (EAdd _ _) = 30 - index (ESub _ _) = 31 - index (EMul _ _) = 32 - index (EDiv _ _) = 33 - index (EMod _ _) = 34 - index (ENeg _) = 35 - index (EApp _ _) = 36 - index (EProj _ _) = 37 - index (ERecType _) = 38 - index (ERec _) = 39 - index (EVar _) = 40 - index (EType ) = 41 - index (EStr _) = 42 - index (EInt _) = 43 - index (EMeta ) = 44 - index (LetDef _ _ _) = 45 - index (Case _ _) = 46 - index (VVar _) = 47 - index (VWild ) = 48 - index (FieldType _ _) = 49 - index (FieldValue _ _) = 50 - index (Ident _) = 51 + index (EDo _ _) = 19 + index (EAbs _ _) = 20 + index (EPi _ _ _) = 21 + index (EPiNoVar _ _) = 22 + index (EBind _ _) = 23 + index (EBindC _ _) = 24 + index (EOr _ _) = 25 + index (EAnd _ _) = 26 + index (EEq _ _) = 27 + index (ENe _ _) = 28 + index (ELt _ _) = 29 + index (ELe _ _) = 30 + index (EGt _ _) = 31 + index (EGe _ _) = 32 + index (EListCons _ _) = 33 + index (EAdd _ _) = 34 + index (ESub _ _) = 35 + index (EMul _ _) = 36 + index (EDiv _ _) = 37 + index (EMod _ _) = 38 + index (ENeg _) = 39 + index (EApp _ _) = 40 + index (EProj _ _) = 41 + index (ERecType _) = 42 + index (ERec _) = 43 + index (EList _) = 44 + index (EVar _) = 45 + index (EType ) = 46 + index (EStr _) = 47 + index (EInt _) = 48 + index (EMeta ) = 49 + index (LetDef _ _ _) = 50 + index (Case _ _) = 51 + index (BindVar _ _) = 52 + index (BindNoVar _) = 53 + index (VVar _) = 54 + index (VWild ) = 55 + index (FieldType _ _) = 56 + index (FieldValue _ _) = 57 + index (Ident _) = 58 compareSame (Module imports decls) (Module imports_ decls_) = mappend (compare imports imports_) (compare decls decls_) compareSame (Import i) (Import i_) = compare i i_ compareSame (DataDecl i exp consdecls) (DataDecl i_ exp_ consdecls_) = mappend (compare i i_) (mappend (compare exp exp_) (compare consdecls consdecls_)) @@ -379,9 +423,12 @@ instance Ord (Tree c) where compareSame (ELet letdefs exp) (ELet letdefs_ exp_) = mappend (compare letdefs letdefs_) (compare exp exp_) compareSame (ECase exp cases) (ECase exp_ cases_) = mappend (compare exp exp_) (compare cases cases_) compareSame (EIf exp0 exp1 exp2) (EIf exp0_ exp1_ exp2_) = mappend (compare exp0 exp0_) (mappend (compare exp1 exp1_) (compare exp2 exp2_)) + compareSame (EDo binds exp) (EDo binds_ exp_) = mappend (compare binds binds_) (compare exp exp_) compareSame (EAbs varorwild exp) (EAbs varorwild_ exp_) = mappend (compare varorwild varorwild_) (compare exp exp_) compareSame (EPi varorwild exp0 exp1) (EPi varorwild_ exp0_ exp1_) = mappend (compare varorwild varorwild_) (mappend (compare exp0 exp0_) (compare exp1 exp1_)) compareSame (EPiNoVar exp0 exp1) (EPiNoVar exp0_ exp1_) = mappend (compare exp0 exp0_) (compare exp1 exp1_) + compareSame (EBind exp0 exp1) (EBind exp0_ exp1_) = mappend (compare exp0 exp0_) (compare exp1 exp1_) + compareSame (EBindC exp0 exp1) (EBindC exp0_ exp1_) = mappend (compare exp0 exp0_) (compare exp1 exp1_) compareSame (EOr exp0 exp1) (EOr exp0_ exp1_) = mappend (compare exp0 exp0_) (compare exp1 exp1_) compareSame (EAnd exp0 exp1) (EAnd exp0_ exp1_) = mappend (compare exp0 exp0_) (compare exp1 exp1_) compareSame (EEq exp0 exp1) (EEq exp0_ exp1_) = mappend (compare exp0 exp0_) (compare exp1 exp1_) @@ -390,6 +437,7 @@ instance Ord (Tree c) where compareSame (ELe exp0 exp1) (ELe exp0_ exp1_) = mappend (compare exp0 exp0_) (compare exp1 exp1_) compareSame (EGt exp0 exp1) (EGt exp0_ exp1_) = mappend (compare exp0 exp0_) (compare exp1 exp1_) compareSame (EGe exp0 exp1) (EGe exp0_ exp1_) = mappend (compare exp0 exp0_) (compare exp1 exp1_) + compareSame (EListCons exp0 exp1) (EListCons exp0_ exp1_) = mappend (compare exp0 exp0_) (compare exp1 exp1_) compareSame (EAdd exp0 exp1) (EAdd exp0_ exp1_) = mappend (compare exp0 exp0_) (compare exp1 exp1_) compareSame (ESub exp0 exp1) (ESub exp0_ exp1_) = mappend (compare exp0 exp0_) (compare exp1 exp1_) compareSame (EMul exp0 exp1) (EMul exp0_ exp1_) = mappend (compare exp0 exp0_) (compare exp1 exp1_) @@ -400,6 +448,7 @@ instance Ord (Tree c) where compareSame (EProj exp i) (EProj exp_ i_) = mappend (compare exp exp_) (compare i i_) compareSame (ERecType fieldtypes) (ERecType fieldtypes_) = compare fieldtypes fieldtypes_ compareSame (ERec fieldvalues) (ERec fieldvalues_) = compare fieldvalues fieldvalues_ + compareSame (EList exps) (EList exps_) = compare exps exps_ compareSame (EVar i) (EVar i_) = compare i i_ compareSame EType EType = EQ compareSame (EStr str) (EStr str_) = compare str str_ @@ -407,6 +456,8 @@ instance Ord (Tree c) where compareSame EMeta EMeta = EQ compareSame (LetDef i exp0 exp1) (LetDef i_ exp0_ exp1_) = mappend (compare i i_) (mappend (compare exp0 exp0_) (compare exp1 exp1_)) compareSame (Case pattern exp) (Case pattern_ exp_) = mappend (compare pattern pattern_) (compare exp exp_) + compareSame (BindVar varorwild exp) (BindVar varorwild_ exp_) = mappend (compare varorwild varorwild_) (compare exp exp_) + compareSame (BindNoVar exp) (BindNoVar exp_) = compare exp exp_ compareSame (VVar i) (VVar i_) = compare i i_ compareSame VWild VWild = EQ compareSame (FieldType i exp) (FieldType i_ exp_) = mappend (compare i i_) (compare exp exp_) diff --git a/src/Transfer/Syntax/Doc.tex b/src/Transfer/Syntax/Doc.tex index b8940a398..d2a1fd559 100644 --- a/src/Transfer/Syntax/Doc.tex +++ b/src/Transfer/Syntax/Doc.tex @@ -46,10 +46,10 @@ The reserved words used in Syntax are the following: \\ \begin{tabular}{lll} {\reserved{Type}} &{\reserved{case}} &{\reserved{data}} \\ -{\reserved{derive}} &{\reserved{else}} &{\reserved{if}} \\ -{\reserved{import}} &{\reserved{in}} &{\reserved{let}} \\ -{\reserved{of}} &{\reserved{rec}} &{\reserved{sig}} \\ -{\reserved{then}} &{\reserved{where}} & \\ +{\reserved{derive}} &{\reserved{do}} &{\reserved{else}} \\ +{\reserved{if}} &{\reserved{import}} &{\reserved{in}} \\ +{\reserved{let}} &{\reserved{of}} &{\reserved{rec}} \\ +{\reserved{sig}} &{\reserved{then}} &{\reserved{where}} \\ \end{tabular}\\ The symbols used in Syntax are the following: \\ @@ -58,12 +58,14 @@ The symbols used in Syntax are the following: \\ {\symb{;}} &{\symb{:}} &{\symb{\{}} \\ {\symb{\}}} &{\symb{{$=$}}} &{\symb{(}} \\ {\symb{)}} &{\symb{\_}} &{\symb{{$-$}{$>$}}} \\ -{\symb{$\backslash$}} &{\symb{{$|$}{$|$}}} &{\symb{\&\&}} \\ +{\symb{{$<$}{$-$}}} &{\symb{$\backslash$}} &{\symb{{$>$}{$>$}{$=$}}} \\ +{\symb{{$>$}{$>$}}} &{\symb{{$|$}{$|$}}} &{\symb{\&\&}} \\ {\symb{{$=$}{$=$}}} &{\symb{/{$=$}}} &{\symb{{$<$}}} \\ {\symb{{$<$}{$=$}}} &{\symb{{$>$}}} &{\symb{{$>$}{$=$}}} \\ -{\symb{{$+$}}} &{\symb{{$-$}}} &{\symb{*}} \\ -{\symb{/}} &{\symb{\%}} &{\symb{.}} \\ -{\symb{?}} & & \\ +{\symb{::}} &{\symb{{$+$}}} &{\symb{{$-$}}} \\ +{\symb{*}} &{\symb{/}} &{\symb{\%}} \\ +{\symb{.}} &{\symb{[}} &{\symb{]}} \\ +{\symb{?}} &{\symb{,}} & \\ \end{tabular}\\ \subsection*{Comments} @@ -146,6 +148,7 @@ All other symbols are terminals.\\ {\nonterminal{Exp}} & {\arrow} &{\terminal{let}} {\terminal{\{}} {\nonterminal{ListLetDef}} {\terminal{\}}} {\terminal{in}} {\nonterminal{Exp}} \\ & {\delimit} &{\terminal{case}} {\nonterminal{Exp}} {\terminal{of}} {\terminal{\{}} {\nonterminal{ListCase}} {\terminal{\}}} \\ & {\delimit} &{\terminal{if}} {\nonterminal{Exp}} {\terminal{then}} {\nonterminal{Exp}} {\terminal{else}} {\nonterminal{Exp}} \\ + & {\delimit} &{\terminal{do}} {\terminal{\{}} {\nonterminal{ListBind}} {\nonterminal{Exp}} {\terminal{\}}} \\ & {\delimit} &{\nonterminal{Exp1}} \\ \end{tabular}\\ @@ -169,6 +172,16 @@ All other symbols are terminals.\\ & {\delimit} &{\nonterminal{Case}} {\terminal{;}} {\nonterminal{ListCase}} \\ \end{tabular}\\ +\begin{tabular}{lll} +{\nonterminal{Bind}} & {\arrow} &{\nonterminal{VarOrWild}} {\terminal{{$<$}{$-$}}} {\nonterminal{Exp}} \\ + & {\delimit} &{\nonterminal{Exp}} \\ +\end{tabular}\\ + +\begin{tabular}{lll} +{\nonterminal{ListBind}} & {\arrow} &{\emptyP} \\ + & {\delimit} &{\nonterminal{Bind}} {\terminal{;}} {\nonterminal{ListBind}} \\ +\end{tabular}\\ + \begin{tabular}{lll} {\nonterminal{Exp2}} & {\arrow} &{\terminal{$\backslash$}} {\nonterminal{VarOrWild}} {\terminal{{$-$}{$>$}}} {\nonterminal{Exp}} \\ & {\delimit} &{\terminal{(}} {\nonterminal{VarOrWild}} {\terminal{:}} {\nonterminal{Exp}} {\terminal{)}} {\terminal{{$-$}{$>$}}} {\nonterminal{Exp}} \\ @@ -182,56 +195,68 @@ All other symbols are terminals.\\ \end{tabular}\\ \begin{tabular}{lll} -{\nonterminal{Exp3}} & {\arrow} &{\nonterminal{Exp4}} {\terminal{{$|$}{$|$}}} {\nonterminal{Exp3}} \\ +{\nonterminal{Exp3}} & {\arrow} &{\nonterminal{Exp3}} {\terminal{{$>$}{$>$}{$=$}}} {\nonterminal{Exp4}} \\ + & {\delimit} &{\nonterminal{Exp3}} {\terminal{{$>$}{$>$}}} {\nonterminal{Exp4}} \\ & {\delimit} &{\nonterminal{Exp4}} \\ \end{tabular}\\ \begin{tabular}{lll} -{\nonterminal{Exp4}} & {\arrow} &{\nonterminal{Exp5}} {\terminal{\&\&}} {\nonterminal{Exp4}} \\ +{\nonterminal{Exp4}} & {\arrow} &{\nonterminal{Exp5}} {\terminal{{$|$}{$|$}}} {\nonterminal{Exp4}} \\ & {\delimit} &{\nonterminal{Exp5}} \\ \end{tabular}\\ \begin{tabular}{lll} -{\nonterminal{Exp5}} & {\arrow} &{\nonterminal{Exp6}} {\terminal{{$=$}{$=$}}} {\nonterminal{Exp6}} \\ - & {\delimit} &{\nonterminal{Exp6}} {\terminal{/{$=$}}} {\nonterminal{Exp6}} \\ - & {\delimit} &{\nonterminal{Exp6}} {\terminal{{$<$}}} {\nonterminal{Exp6}} \\ - & {\delimit} &{\nonterminal{Exp6}} {\terminal{{$<$}{$=$}}} {\nonterminal{Exp6}} \\ - & {\delimit} &{\nonterminal{Exp6}} {\terminal{{$>$}}} {\nonterminal{Exp6}} \\ - & {\delimit} &{\nonterminal{Exp6}} {\terminal{{$>$}{$=$}}} {\nonterminal{Exp6}} \\ +{\nonterminal{Exp5}} & {\arrow} &{\nonterminal{Exp6}} {\terminal{\&\&}} {\nonterminal{Exp5}} \\ & {\delimit} &{\nonterminal{Exp6}} \\ \end{tabular}\\ \begin{tabular}{lll} -{\nonterminal{Exp6}} & {\arrow} &{\nonterminal{Exp6}} {\terminal{{$+$}}} {\nonterminal{Exp7}} \\ - & {\delimit} &{\nonterminal{Exp6}} {\terminal{{$-$}}} {\nonterminal{Exp7}} \\ +{\nonterminal{Exp6}} & {\arrow} &{\nonterminal{Exp7}} {\terminal{{$=$}{$=$}}} {\nonterminal{Exp7}} \\ + & {\delimit} &{\nonterminal{Exp7}} {\terminal{/{$=$}}} {\nonterminal{Exp7}} \\ + & {\delimit} &{\nonterminal{Exp7}} {\terminal{{$<$}}} {\nonterminal{Exp7}} \\ + & {\delimit} &{\nonterminal{Exp7}} {\terminal{{$<$}{$=$}}} {\nonterminal{Exp7}} \\ + & {\delimit} &{\nonterminal{Exp7}} {\terminal{{$>$}}} {\nonterminal{Exp7}} \\ + & {\delimit} &{\nonterminal{Exp7}} {\terminal{{$>$}{$=$}}} {\nonterminal{Exp7}} \\ & {\delimit} &{\nonterminal{Exp7}} \\ \end{tabular}\\ \begin{tabular}{lll} -{\nonterminal{Exp7}} & {\arrow} &{\nonterminal{Exp7}} {\terminal{*}} {\nonterminal{Exp8}} \\ - & {\delimit} &{\nonterminal{Exp7}} {\terminal{/}} {\nonterminal{Exp8}} \\ - & {\delimit} &{\nonterminal{Exp7}} {\terminal{\%}} {\nonterminal{Exp8}} \\ +{\nonterminal{Exp7}} & {\arrow} &{\nonterminal{Exp8}} {\terminal{::}} {\nonterminal{Exp7}} \\ & {\delimit} &{\nonterminal{Exp8}} \\ \end{tabular}\\ \begin{tabular}{lll} -{\nonterminal{Exp8}} & {\arrow} &{\terminal{{$-$}}} {\nonterminal{Exp8}} \\ +{\nonterminal{Exp8}} & {\arrow} &{\nonterminal{Exp8}} {\terminal{{$+$}}} {\nonterminal{Exp9}} \\ + & {\delimit} &{\nonterminal{Exp8}} {\terminal{{$-$}}} {\nonterminal{Exp9}} \\ & {\delimit} &{\nonterminal{Exp9}} \\ \end{tabular}\\ \begin{tabular}{lll} -{\nonterminal{Exp9}} & {\arrow} &{\nonterminal{Exp9}} {\nonterminal{Exp10}} \\ +{\nonterminal{Exp9}} & {\arrow} &{\nonterminal{Exp9}} {\terminal{*}} {\nonterminal{Exp10}} \\ + & {\delimit} &{\nonterminal{Exp9}} {\terminal{/}} {\nonterminal{Exp10}} \\ + & {\delimit} &{\nonterminal{Exp9}} {\terminal{\%}} {\nonterminal{Exp10}} \\ & {\delimit} &{\nonterminal{Exp10}} \\ \end{tabular}\\ \begin{tabular}{lll} -{\nonterminal{Exp10}} & {\arrow} &{\nonterminal{Exp10}} {\terminal{.}} {\nonterminal{Ident}} \\ +{\nonterminal{Exp10}} & {\arrow} &{\terminal{{$-$}}} {\nonterminal{Exp10}} \\ & {\delimit} &{\nonterminal{Exp11}} \\ \end{tabular}\\ \begin{tabular}{lll} -{\nonterminal{Exp11}} & {\arrow} &{\terminal{sig}} {\terminal{\{}} {\nonterminal{ListFieldType}} {\terminal{\}}} \\ +{\nonterminal{Exp11}} & {\arrow} &{\nonterminal{Exp11}} {\nonterminal{Exp12}} \\ + & {\delimit} &{\nonterminal{Exp12}} \\ +\end{tabular}\\ + +\begin{tabular}{lll} +{\nonterminal{Exp12}} & {\arrow} &{\nonterminal{Exp12}} {\terminal{.}} {\nonterminal{Ident}} \\ + & {\delimit} &{\nonterminal{Exp13}} \\ +\end{tabular}\\ + +\begin{tabular}{lll} +{\nonterminal{Exp13}} & {\arrow} &{\terminal{sig}} {\terminal{\{}} {\nonterminal{ListFieldType}} {\terminal{\}}} \\ & {\delimit} &{\terminal{rec}} {\terminal{\{}} {\nonterminal{ListFieldValue}} {\terminal{\}}} \\ + & {\delimit} &{\terminal{[}} {\nonterminal{ListExp}} {\terminal{]}} \\ & {\delimit} &{\nonterminal{Ident}} \\ & {\delimit} &{\terminal{Type}} \\ & {\delimit} &{\nonterminal{String}} \\ @@ -264,6 +289,12 @@ All other symbols are terminals.\\ {\nonterminal{Exp1}} & {\arrow} &{\nonterminal{Exp2}} \\ \end{tabular}\\ +\begin{tabular}{lll} +{\nonterminal{ListExp}} & {\arrow} &{\emptyP} \\ + & {\delimit} &{\nonterminal{Exp}} \\ + & {\delimit} &{\nonterminal{Exp}} {\terminal{,}} {\nonterminal{ListExp}} \\ +\end{tabular}\\ + \end{document} diff --git a/src/Transfer/Syntax/Layout.hs b/src/Transfer/Syntax/Layout.hs index 08e4ba980..fbe2eb936 100644 --- a/src/Transfer/Syntax/Layout.hs +++ b/src/Transfer/Syntax/Layout.hs @@ -10,7 +10,7 @@ import Data.Maybe (isNothing, fromJust) -- local parameters topLayout = True -layoutWords = ["let","where","of","rec","sig"] +layoutWords = ["let","where","of","rec","sig","do"] layoutStopWords = ["in"] -- layout separators diff --git a/src/Transfer/Syntax/Lex.hs b/src/Transfer/Syntax/Lex.hs index 3a6305200..1aa85c3c8 100644 --- a/src/Transfer/Syntax/Lex.hs +++ b/src/Transfer/Syntax/Lex.hs @@ -24,18 +24,18 @@ import GHC.Exts import GlaExts #endif alex_base :: AlexAddr -alex_base = AlexA# "\x01\x00\x00\x00\x15\x00\x00\x00\x39\x00\x00\x00\x3a\x00\x00\x00\x18\x00\x00\x00\x19\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00\x44\x00\x00\x00\x45\x00\x00\x00\x1b\x00\x00\x00\x1c\x00\x00\x00\x1d\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x13\x00\x00\x00\x14\x00\x00\x00\x16\x00\x00\x00\x17\x00\x00\x00\xd6\xff\xff\xff\x2f\x00\x00\x00\x9c\x00\x00\x00\x00\x00\x00\x00\x17\x01\x00\x00\xd5\x00\x00\x00\x33\x00\x00\x00"# +alex_base = AlexA# "\x01\x00\x00\x00\x15\x00\x00\x00\x39\x00\x00\x00\x3a\x00\x00\x00\x18\x00\x00\x00\x19\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00\x44\x00\x00\x00\x45\x00\x00\x00\x1b\x00\x00\x00\x1c\x00\x00\x00\x1d\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x26\x00\x00\x00\x13\x00\x00\x00\x14\x00\x00\x00\x17\x00\x00\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\xd9\xff\xff\xff\x30\x00\x00\x00\x9c\x00\x00\x00\x00\x00\x00\x00\x17\x01\x00\x00\xd5\x00\x00\x00\x34\x00\x00\x00"# alex_table :: AlexAddr -alex_table = AlexA# "\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\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\x0d\x00\xff\xff\x17\x00\xff\xff\xff\xff\x0e\x00\x14\x00\xff\xff\x0e\x00\x0e\x00\x0e\x00\x0e\x00\xff\xff\x05\x00\x0e\x00\x10\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x0e\x00\x0e\x00\x11\x00\x0f\x00\x12\x00\x0e\x00\xff\xff\x04\x00\xff\xff\xff\xff\x03\x00\x03\x00\x09\x00\x09\x00\x09\x00\x0b\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x0e\x00\xff\xff\xff\xff\x0e\x00\xff\xff\x0d\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x13\x00\x0e\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\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\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\xff\xff\xff\xff\xff\xff\x06\x00\x07\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x17\x00\xff\xff\x00\x00\x00\x00\x15\x00\x17\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\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\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\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\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x18\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x00\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\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\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\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\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\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\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"# +alex_table = AlexA# "\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\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\x0d\x00\xff\xff\x19\x00\xff\xff\xff\xff\x0e\x00\x16\x00\xff\xff\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x05\x00\x0e\x00\x13\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x14\x00\x0e\x00\x0f\x00\x12\x00\x11\x00\x0e\x00\xff\xff\x04\x00\xff\xff\xff\xff\x03\x00\x03\x00\x09\x00\x09\x00\x09\x00\x0b\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0e\x00\x0e\x00\x10\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x00\x00\x0e\x00\x00\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\xff\xff\x0e\x00\xff\xff\x0d\x00\x0e\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x09\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x15\x00\x0e\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\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\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\xff\xff\xff\xff\xff\xff\x06\x00\x07\x00\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x19\x00\xff\xff\x00\x00\x00\x00\x17\x00\x19\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\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\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x19\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\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x1a\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x00\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\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\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\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\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\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\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"# alex_check :: AlexAddr -alex_check = AlexA# "\xff\xff\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x2d\x00\x0a\x00\x0a\x00\x2d\x00\x2d\x00\x2d\x00\x2d\x00\x2d\x00\x2d\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x3d\x00\x3d\x00\x7c\x00\x3d\x00\x3d\x00\x26\x00\xff\xff\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x20\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2d\x00\x2d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\x7d\x00\x7d\x00\x27\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xd7\x00\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x22\x00\xf7\x00\xff\xff\xff\xff\x5f\x00\x27\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\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\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\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\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\x5c\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xff\xff\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\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\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\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\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\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\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"# +alex_check = AlexA# "\xff\xff\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x2d\x00\x0a\x00\x0a\x00\x2d\x00\x2d\x00\x2d\x00\x2d\x00\x2d\x00\x2d\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x3d\x00\x3d\x00\x3e\x00\x2d\x00\x3d\x00\x7c\x00\x26\x00\x3e\x00\xff\xff\x3a\x00\xff\xff\x3d\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x20\x00\x3d\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\x2d\x00\x2d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\x7d\x00\x7d\x00\x27\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xd7\x00\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x22\x00\xf7\x00\xff\xff\xff\xff\x5f\x00\x27\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\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\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\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\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\x5c\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xff\xff\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\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\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\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\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\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\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"# alex_deflt :: AlexAddr -alex_deflt = AlexA# "\x15\x00\xff\xff\x02\x00\x02\x00\xff\xff\xff\xff\x0a\x00\xff\xff\x0a\x00\x0a\x00\x0a\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x17\x00\xff\xff\xff\xff"# +alex_deflt = AlexA# "\x17\x00\xff\xff\x02\x00\x02\x00\xff\xff\xff\xff\x0a\x00\xff\xff\x0a\x00\x0a\x00\x0a\x00\x0a\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\x19\x00\xff\xff\xff\xff"# -alex_accept = listArray (0::Int,25) [[],[],[(AlexAccSkip)],[(AlexAccSkip)],[],[(AlexAcc (alex_action_3))],[(AlexAccSkip)],[(AlexAccSkip)],[],[],[],[],[(AlexAcc (alex_action_3))],[(AlexAccSkip)],[(AlexAcc (alex_action_3))],[(AlexAcc (alex_action_3))],[(AlexAcc (alex_action_3))],[(AlexAcc (alex_action_3))],[(AlexAcc (alex_action_3))],[],[],[(AlexAcc (alex_action_4))],[(AlexAcc (alex_action_5))],[],[],[(AlexAcc (alex_action_6))]] +alex_accept = listArray (0::Int,27) [[],[],[(AlexAccSkip)],[(AlexAccSkip)],[],[(AlexAcc (alex_action_3))],[(AlexAccSkip)],[(AlexAccSkip)],[],[],[],[],[(AlexAcc (alex_action_3))],[(AlexAccSkip)],[(AlexAcc (alex_action_3))],[(AlexAcc (alex_action_3))],[(AlexAcc (alex_action_3))],[(AlexAcc (alex_action_3))],[(AlexAcc (alex_action_3))],[(AlexAcc (alex_action_3))],[(AlexAcc (alex_action_3))],[],[],[(AlexAcc (alex_action_4))],[(AlexAcc (alex_action_5))],[],[],[(AlexAcc (alex_action_6))]] {-# LINE 34 "Transfer/Syntax/Lex.x" #-} tok f p s = f p s @@ -84,7 +84,7 @@ eitherResIdent tv s = treeFind resWords | s > a = treeFind right | s == a = t -resWords = b "in" (b "derive" (b "case" (b "Type" N N) (b "data" N N)) (b "if" (b "else" N N) (b "import" N N))) (b "sig" (b "of" (b "let" N N) (b "rec" N N)) (b "where" (b "then" N N) N)) +resWords = b "import" (b "derive" (b "case" (b "Type" N N) (b "data" N N)) (b "else" (b "do" N N) (b "if" N N))) (b "rec" (b "let" (b "in" N N) (b "of" N N)) (b "then" (b "sig" N N) (b "where" N N))) where b s = B s (TS s) unescapeInitTail :: String -> String diff --git a/src/Transfer/Syntax/Lex.x b/src/Transfer/Syntax/Lex.x index 556ecd2b0..faa30740c 100644 --- a/src/Transfer/Syntax/Lex.x +++ b/src/Transfer/Syntax/Lex.x @@ -16,7 +16,7 @@ $i = [$l $d _ '] -- identifier character $u = [\0-\255] -- universal: any character @rsyms = -- reserved words consisting of special symbols - \; | \: | \{ | \} | \= | \( | \) | \_ | \- \> | \\ | \| \| | \& \& | \= \= | \/ \= | \< | \< \= | \> | \> \= | \+ | \- | \* | \/ | \% | \. | \? + \; | \: | \{ | \} | \= | \( | \) | \_ | \- \> | \< \- | \\ | \> \> \= | \> \> | \| \| | \& \& | \= \= | \/ \= | \< | \< \= | \> | \> \= | \: \: | \+ | \- | \* | \/ | \% | \. | \[ | \] | \? | \, :- "--" [.]* ; -- Toss single line comments @@ -79,7 +79,7 @@ eitherResIdent tv s = treeFind resWords | s > a = treeFind right | s == a = t -resWords = b "in" (b "derive" (b "case" (b "Type" N N) (b "data" N N)) (b "if" (b "else" N N) (b "import" N N))) (b "sig" (b "of" (b "let" N N) (b "rec" N N)) (b "where" (b "then" N N) N)) +resWords = b "import" (b "derive" (b "case" (b "Type" N N) (b "data" N N)) (b "else" (b "do" N N) (b "if" N N))) (b "rec" (b "let" (b "in" N N) (b "of" N N)) (b "then" (b "sig" N N) (b "where" N N))) where b s = B s (TS s) unescapeInitTail :: String -> String diff --git a/src/Transfer/Syntax/Par.hs b/src/Transfer/Syntax/Par.hs index b18aee0c0..a49b14702 100644 --- a/src/Transfer/Syntax/Par.hs +++ b/src/Transfer/Syntax/Par.hs @@ -133,16 +133,16 @@ happyIn24 x = unsafeCoerce# x happyOut24 :: (HappyAbsSyn ) -> ([Case]) happyOut24 x = unsafeCoerce# x {-# INLINE happyOut24 #-} -happyIn25 :: (Exp) -> (HappyAbsSyn ) +happyIn25 :: (Bind) -> (HappyAbsSyn ) happyIn25 x = unsafeCoerce# x {-# INLINE happyIn25 #-} -happyOut25 :: (HappyAbsSyn ) -> (Exp) +happyOut25 :: (HappyAbsSyn ) -> (Bind) happyOut25 x = unsafeCoerce# x {-# INLINE happyOut25 #-} -happyIn26 :: (VarOrWild) -> (HappyAbsSyn ) +happyIn26 :: ([Bind]) -> (HappyAbsSyn ) happyIn26 x = unsafeCoerce# x {-# INLINE happyIn26 #-} -happyOut26 :: (HappyAbsSyn ) -> (VarOrWild) +happyOut26 :: (HappyAbsSyn ) -> ([Bind]) happyOut26 x = unsafeCoerce# x {-# INLINE happyOut26 #-} happyIn27 :: (Exp) -> (HappyAbsSyn ) @@ -151,10 +151,10 @@ happyIn27 x = unsafeCoerce# x happyOut27 :: (HappyAbsSyn ) -> (Exp) happyOut27 x = unsafeCoerce# x {-# INLINE happyOut27 #-} -happyIn28 :: (Exp) -> (HappyAbsSyn ) +happyIn28 :: (VarOrWild) -> (HappyAbsSyn ) happyIn28 x = unsafeCoerce# x {-# INLINE happyIn28 #-} -happyOut28 :: (HappyAbsSyn ) -> (Exp) +happyOut28 :: (HappyAbsSyn ) -> (VarOrWild) happyOut28 x = unsafeCoerce# x {-# INLINE happyOut28 #-} happyIn29 :: (Exp) -> (HappyAbsSyn ) @@ -199,36 +199,66 @@ happyIn35 x = unsafeCoerce# x happyOut35 :: (HappyAbsSyn ) -> (Exp) happyOut35 x = unsafeCoerce# x {-# INLINE happyOut35 #-} -happyIn36 :: (FieldType) -> (HappyAbsSyn ) +happyIn36 :: (Exp) -> (HappyAbsSyn ) happyIn36 x = unsafeCoerce# x {-# INLINE happyIn36 #-} -happyOut36 :: (HappyAbsSyn ) -> (FieldType) +happyOut36 :: (HappyAbsSyn ) -> (Exp) happyOut36 x = unsafeCoerce# x {-# INLINE happyOut36 #-} -happyIn37 :: ([FieldType]) -> (HappyAbsSyn ) +happyIn37 :: (Exp) -> (HappyAbsSyn ) happyIn37 x = unsafeCoerce# x {-# INLINE happyIn37 #-} -happyOut37 :: (HappyAbsSyn ) -> ([FieldType]) +happyOut37 :: (HappyAbsSyn ) -> (Exp) happyOut37 x = unsafeCoerce# x {-# INLINE happyOut37 #-} -happyIn38 :: (FieldValue) -> (HappyAbsSyn ) +happyIn38 :: (Exp) -> (HappyAbsSyn ) happyIn38 x = unsafeCoerce# x {-# INLINE happyIn38 #-} -happyOut38 :: (HappyAbsSyn ) -> (FieldValue) +happyOut38 :: (HappyAbsSyn ) -> (Exp) happyOut38 x = unsafeCoerce# x {-# INLINE happyOut38 #-} -happyIn39 :: ([FieldValue]) -> (HappyAbsSyn ) +happyIn39 :: (Exp) -> (HappyAbsSyn ) happyIn39 x = unsafeCoerce# x {-# INLINE happyIn39 #-} -happyOut39 :: (HappyAbsSyn ) -> ([FieldValue]) +happyOut39 :: (HappyAbsSyn ) -> (Exp) happyOut39 x = unsafeCoerce# x {-# INLINE happyOut39 #-} -happyIn40 :: (Exp) -> (HappyAbsSyn ) +happyIn40 :: (FieldType) -> (HappyAbsSyn ) happyIn40 x = unsafeCoerce# x {-# INLINE happyIn40 #-} -happyOut40 :: (HappyAbsSyn ) -> (Exp) +happyOut40 :: (HappyAbsSyn ) -> (FieldType) happyOut40 x = unsafeCoerce# x {-# INLINE happyOut40 #-} +happyIn41 :: ([FieldType]) -> (HappyAbsSyn ) +happyIn41 x = unsafeCoerce# x +{-# INLINE happyIn41 #-} +happyOut41 :: (HappyAbsSyn ) -> ([FieldType]) +happyOut41 x = unsafeCoerce# x +{-# INLINE happyOut41 #-} +happyIn42 :: (FieldValue) -> (HappyAbsSyn ) +happyIn42 x = unsafeCoerce# x +{-# INLINE happyIn42 #-} +happyOut42 :: (HappyAbsSyn ) -> (FieldValue) +happyOut42 x = unsafeCoerce# x +{-# INLINE happyOut42 #-} +happyIn43 :: ([FieldValue]) -> (HappyAbsSyn ) +happyIn43 x = unsafeCoerce# x +{-# INLINE happyIn43 #-} +happyOut43 :: (HappyAbsSyn ) -> ([FieldValue]) +happyOut43 x = unsafeCoerce# x +{-# INLINE happyOut43 #-} +happyIn44 :: (Exp) -> (HappyAbsSyn ) +happyIn44 x = unsafeCoerce# x +{-# INLINE happyIn44 #-} +happyOut44 :: (HappyAbsSyn ) -> (Exp) +happyOut44 x = unsafeCoerce# x +{-# INLINE happyOut44 #-} +happyIn45 :: ([Exp]) -> (HappyAbsSyn ) +happyIn45 x = unsafeCoerce# x +{-# INLINE happyIn45 #-} +happyOut45 :: (HappyAbsSyn ) -> ([Exp]) +happyOut45 x = unsafeCoerce# x +{-# INLINE happyOut45 #-} happyInTok :: Token -> (HappyAbsSyn ) happyInTok x = unsafeCoerce# x {-# INLINE happyInTok #-} @@ -237,21 +267,21 @@ happyOutTok x = unsafeCoerce# x {-# INLINE happyOutTok #-} happyActOffsets :: HappyAddr -happyActOffsets = HappyA# "\x87\x02\x4a\x00\x80\x02\x00\x00\x00\x00\x00\x00\x00\x00\x65\x02\x00\x00\x9d\x02\x85\x02\x83\x02\xa2\x02\x21\x02\x00\x00\x6a\x00\x76\x02\x00\x00\x00\x00\x38\x00\xfb\xff\x61\x00\x00\x00\x00\x00\x4a\x00\x4a\x00\x8a\x02\x89\x02\x88\x02\x00\x00\x00\x00\x52\x02\x79\x02\x7c\x00\x48\x02\x00\x00\x69\x02\x5a\x02\x00\x00\x47\x02\x47\x02\x28\x02\x1f\x02\x1f\x02\x1f\x02\x20\x02\x19\x02\x00\x00\x4a\x00\x00\x00\x1e\x02\x00\x00\x21\x00\x13\x02\x08\x02\xf1\x01\xe2\x01\x61\x00\x61\x00\x61\x00\x61\x00\x61\x00\x61\x00\x61\x00\x61\x00\x61\x00\x61\x00\x61\x00\x61\x00\x61\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x21\x02\x21\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x00\x00\x4a\x00\xe7\x01\x4a\x00\xd8\x01\xc9\x01\xb6\x01\x12\x02\xa9\x01\x96\x01\x88\x01\x79\x01\x66\x01\x00\x00\x32\x01\x48\x01\x7c\x00\xfc\xff\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x12\x01\x00\x00\x00\x00\x27\x01\x00\x00\x4a\x00\x00\x00\x00\x00\xf2\x00\x4a\x00\x00\x00\xf2\x00\x4a\x00\xe9\x00\xd2\x00\x4a\x00\xcc\x00\x8f\x00\x00\x00\xd1\x00\xbf\x00\x8f\x00\xad\x00\x00\x00\xb3\x00\xab\x00\x4a\x00\x8c\x00\x00\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x74\x00\x82\x00\x00\x00\x00\x00\x76\x00\x7b\x00\x78\x00\x69\x00\x73\x00\x00\x00\x4a\x00\x00\x00\x00\x00\x8f\x00\x4a\x00\x00\x00\x4a\x00\x00\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x3e\x00\x00\x00\x3e\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x5a\x00\x55\x00\x00\x00\x1f\x00\x4a\x00\x00\x00\x00\x00\x00\x00"# +happyActOffsets = HappyA# "\x9d\x01\x30\x00\x84\x01\x00\x00\x00\x00\x00\x00\x00\x00\x7f\x01\x00\x00\x8b\x00\x00\x00\xa4\x01\xa2\x01\x89\x02\x0d\x01\xea\x00\x00\x00\x4d\x00\x86\x01\x00\x00\x00\x00\x13\x00\xff\xff\x46\x00\x30\x00\x00\x00\x00\x00\x30\x00\xad\x01\x30\x00\xac\x01\x90\x01\x8d\x01\x00\x00\x00\x00\x5d\x01\x8e\x01\xea\xff\x5e\x01\x00\x00\x8b\x01\x6d\x01\x00\x00\x5c\x01\x5c\x01\x48\x01\x4f\x01\x4f\x01\x4f\x01\x3e\x01\x00\x00\x40\x01\x4d\x01\x4c\x01\x00\x00\x30\x00\x00\x00\x60\x01\x00\x00\x07\x00\x55\x01\x4b\x01\x1b\x01\x2d\x01\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x30\x00\x46\x00\x46\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xea\x00\xea\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x30\x00\x00\x00\x30\x00\x00\x00\x30\x00\x47\x01\x13\x00\x30\x00\x46\x01\x45\x01\x43\x01\x34\x01\x29\x01\x23\x01\x26\x01\x25\x01\x12\x01\x00\x00\xc3\x00\xde\x00\xea\xff\xfc\xff\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x30\x00\xb2\x00\x00\x00\x00\x00\xdc\x00\x00\x00\x30\x00\x00\x00\x00\x00\xa8\x00\x30\x00\x00\x00\xa8\x00\x30\x00\xa7\x00\x91\x00\x30\x00\x99\x00\xb6\x00\xb7\x00\x94\x00\x60\x00\x00\x00\x00\x00\x8c\x00\x93\x00\x60\x00\x86\x00\x00\x00\x8a\x00\x82\x00\x30\x00\x00\x00\x00\x00\x30\x00\x7d\x00\x00\x00\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x51\x00\x44\x00\x00\x00\x00\x00\x69\x00\x68\x00\x6a\x00\x65\x00\x61\x00\x00\x00\x30\x00\x00\x00\x00\x00\x00\x00\x60\x00\x30\x00\x00\x00\x30\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x2f\x00\x00\x00\x2f\x00\x60\x00\x00\x00\x00\x00\x00\x00\x59\x00\x55\x00\x4a\x00\x00\x00\x24\x00\x30\x00\x00\x00\x00\x00\x00\x00"# happyGotoOffsets :: HappyAddr -happyGotoOffsets = HappyA# "\x25\x02\xf5\x01\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\x4d\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x05\x00\x7f\x02\x00\x00\x00\x00\xe5\x01\xd5\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x02\x41\x00\x00\x00\x15\x00\x00\x00\x00\x00\x3f\x00\x2b\x00\xce\x00\x68\x00\x22\x00\x71\x00\x00\x00\x00\x00\x00\x00\xc5\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x29\x00\x00\x00\x7b\x02\x77\x02\x6c\x02\x58\x02\x49\x02\x43\x02\x39\x02\x33\x02\x24\x02\x68\x02\xb0\x00\x14\x02\x05\x02\xb5\x01\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\xa5\x01\x00\x00\x95\x01\x00\x00\x85\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x00\x00\x96\x00\xa1\x02\x75\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x65\x01\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x01\x00\x00\x00\x00\x58\x00\x45\x01\x00\x00\x1b\x00\x35\x01\x00\x00\x0e\x00\x25\x01\x00\x00\x0a\x00\x00\x00\x00\x00\x00\x00\x9e\x02\x00\x00\x00\x00\x00\x00\x00\x00\x15\x01\x00\x00\x00\x00\x05\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7f\x00\x01\x00\x00\x00\xcf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf5\x00\x00\x00\x00\x00\x06\x00\xe5\x00\xfd\xff\xd5\x00\x00\x00\xcf\x00\x00\x00\x00\x00\x00\x00\xa5\x02\x00\x00\x48\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa5\x00\xc5\x00\x00\x00\x00\x00\x00\x00"# +happyGotoOffsets = HappyA# "\xfd\x00\xcf\x03\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\xbc\x00\x00\x00\x00\x00\x00\x00\xf0\x00\x08\x00\x5a\x02\xaa\x00\x00\x00\x00\x00\xac\x03\x00\x00\x89\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\x4b\x00\x00\x00\x32\x00\x00\x00\x00\x00\x39\x00\x37\x00\x20\x00\x06\x00\x21\x00\x12\x00\x00\x00\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x66\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x31\x00\x00\x00\x37\x02\x14\x02\xf1\x01\xab\x01\xce\x01\xb5\x00\x88\x01\x65\x01\x42\x01\x1f\x01\xfc\x00\xd9\x00\x15\x04\x02\x04\x43\x03\xf2\x03\xdf\x03\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\x20\x03\x00\x00\xfd\x02\x00\x00\x87\x00\x00\x00\xcd\x00\xda\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\x00\x00\x00\x75\x00\x30\x02\xb7\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x94\x02\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x71\x02\x00\x00\x00\x00\x03\x00\x4e\x02\x00\x00\x1c\x00\x2b\x02\x00\x00\x05\x00\x08\x02\x00\x00\x00\x00\x00\x00\x00\x00\x3b\x04\x00\x00\x00\x00\x00\x00\x00\x00\x0d\x02\x00\x00\x00\x00\x00\x00\x00\x00\xe5\x01\x00\x00\x00\x00\xc2\x01\x00\x00\x00\x00\x9f\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x14\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7c\x01\x00\x00\x00\x00\x00\x00\x38\x04\x59\x01\x04\x00\x36\x01\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x50\x00\x00\x00\x0a\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0b\x00\x13\x01\x00\x00\x00\x00\x00\x00"# happyDefActions :: HappyAddr -happyDefActions = HappyA# "\xf8\xff\x00\x00\x00\x00\xfd\xff\xaf\xff\xad\xff\xac\xff\x00\x00\xa1\xff\xcc\xff\xc8\xff\xc6\xff\xbf\xff\xbc\xff\xb8\xff\xb6\xff\xb4\xff\xb2\xff\xd8\xff\x00\x00\x00\x00\x00\x00\xab\xff\xae\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfc\xff\xfb\xff\x00\x00\xf7\xff\xf1\xff\x00\x00\xf9\xff\xe1\xff\xf0\xff\xfa\xff\x00\x00\x00\x00\xf8\xff\xa8\xff\xa4\xff\xd6\xff\x00\x00\x00\x00\xb7\xff\x00\x00\xcb\xff\x00\x00\xca\xff\xcb\xff\x00\x00\x00\x00\x00\x00\xb5\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\xcd\xff\xc9\xff\xc7\xff\xbd\xff\xbe\xff\xc0\xff\xc1\xff\xc2\xff\xc3\xff\xc4\xff\xc5\xff\xb9\xff\xba\xff\xbb\xff\xb3\xff\x00\x00\xaa\xff\x00\x00\x00\x00\x00\x00\x00\x00\xd5\xff\x00\x00\x00\x00\xa3\xff\x00\x00\x00\x00\xa7\xff\x00\x00\xf6\xff\x00\x00\x00\x00\xf1\xff\x00\x00\x00\x00\xf4\xff\xe3\xff\xe5\xff\xe4\xff\xe0\xff\x00\x00\x00\x00\xe2\xff\xe6\xff\x00\x00\xef\xff\x00\x00\xf2\xff\xb1\xff\xa8\xff\x00\x00\xb0\xff\xa4\xff\x00\x00\x00\x00\xd6\xff\x00\x00\x00\x00\xd2\xff\xcf\xff\x00\x00\x00\x00\xe3\xff\x00\x00\xe9\xff\xd1\xff\x00\x00\x00\x00\x00\x00\xd4\xff\x00\x00\xa5\xff\xa2\xff\xa9\xff\xa6\xff\x00\x00\xde\xff\xe1\xff\xf3\xff\x00\x00\x00\x00\xdd\xff\x00\x00\x00\x00\xdb\xff\x00\x00\xd9\xff\xda\xff\xd2\xff\x00\x00\xe1\xff\x00\x00\xce\xff\xea\xff\xd3\xff\xd0\xff\xd7\xff\xed\xff\xe7\xff\xde\xff\x00\x00\xe8\xff\xdf\xff\xdc\xff\x00\x00\xec\xff\x00\x00\xf5\xff\xed\xff\x00\x00\xee\xff\xeb\xff"# +happyDefActions = HappyA# "\xf8\xff\x00\x00\x00\x00\xfd\xff\xa4\xff\xa2\xff\xa1\xff\x00\x00\x96\xff\xc7\xff\xc2\xff\xc0\xff\xbe\xff\xb7\xff\xb5\xff\xb2\xff\xae\xff\xac\xff\xaa\xff\xa8\xff\xd7\xff\x00\x00\x00\x00\x00\x00\x95\xff\xa0\xff\xa3\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfc\xff\xfb\xff\x00\x00\xf7\xff\xf1\xff\x00\x00\xf9\xff\xe1\xff\xf0\xff\xfa\xff\x00\x00\x00\x00\xf8\xff\x9d\xff\x99\xff\xd5\xff\x00\x00\xcc\xff\x00\x00\x94\xff\x00\x00\xad\xff\x00\x00\xc6\xff\x00\x00\xc5\xff\xa4\xff\x00\x00\x00\x00\x00\x00\xab\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\xc3\xff\xc4\xff\xc8\xff\xc1\xff\xbf\xff\xb8\xff\xb9\xff\xba\xff\xbb\xff\xbc\xff\xbd\xff\xb3\xff\xb4\xff\xb6\xff\xaf\xff\xb0\xff\xb1\xff\xa9\xff\x00\x00\x9f\xff\x00\x00\xa5\xff\x95\xff\x00\x00\x00\x00\x00\x00\x00\x00\xd4\xff\x00\x00\x00\x00\x98\xff\x00\x00\x00\x00\x9c\xff\x00\x00\xf6\xff\x00\x00\x00\x00\xf1\xff\x00\x00\x00\x00\xf4\xff\xe3\xff\xe5\xff\xe4\xff\xe0\xff\x00\x00\x00\x00\xe2\xff\xe6\xff\x00\x00\xef\xff\x00\x00\xf2\xff\xa7\xff\x9d\xff\x00\x00\xa6\xff\x99\xff\x00\x00\x00\x00\xd5\xff\x00\x00\x00\x00\xcd\xff\x00\x00\x00\x00\xd1\xff\x93\xff\xca\xff\x00\x00\x00\x00\xe3\xff\x00\x00\xe9\xff\xd0\xff\x00\x00\x00\x00\xcb\xff\xd8\xff\x00\x00\x00\x00\xd3\xff\x00\x00\x9a\xff\x97\xff\x9e\xff\x9b\xff\x00\x00\xde\xff\xe1\xff\xf3\xff\x00\x00\x00\x00\xdd\xff\x00\x00\x00\x00\xdb\xff\x00\x00\xd9\xff\xce\xff\xda\xff\xd1\xff\x00\x00\xe1\xff\x00\x00\xc9\xff\xea\xff\xd2\xff\xcf\xff\xd6\xff\xed\xff\xe7\xff\xde\xff\x00\x00\xe8\xff\xdf\xff\xdc\xff\x00\x00\xec\xff\x00\x00\xf5\xff\xed\xff\x00\x00\xee\xff\xeb\xff"# happyCheck :: HappyAddr -happyCheck = HappyA# "\xff\xff\x05\x00\x06\x00\x08\x00\x08\x00\x00\x00\x00\x00\x01\x00\x02\x00\x0c\x00\x00\x00\x01\x00\x02\x00\x0c\x00\x00\x00\x00\x00\x0a\x00\x0b\x00\x13\x00\x14\x00\x0a\x00\x0b\x00\x1a\x00\x00\x00\x12\x00\x13\x00\x15\x00\x00\x00\x12\x00\x13\x00\x10\x00\x11\x00\x24\x00\x0c\x00\x00\x00\x28\x00\x28\x00\x29\x00\x2a\x00\x06\x00\x07\x00\x00\x00\x09\x00\x00\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x21\x00\x22\x00\x06\x00\x00\x00\x08\x00\x00\x00\x0a\x00\x21\x00\x22\x00\x24\x00\x25\x00\x28\x00\x00\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x01\x00\x02\x00\x06\x00\x19\x00\x1a\x00\x1b\x00\x0a\x00\x0d\x00\x0e\x00\x1f\x00\x00\x00\x04\x00\x22\x00\x01\x00\x24\x00\x25\x00\x14\x00\x02\x00\x28\x00\x29\x00\x2a\x00\x19\x00\x1a\x00\x1b\x00\x28\x00\x06\x00\x00\x00\x1f\x00\x1d\x00\x1e\x00\x22\x00\x04\x00\x24\x00\x25\x00\x06\x00\x00\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x03\x00\x1f\x00\x20\x00\x01\x00\x19\x00\x1a\x00\x06\x00\x07\x00\x08\x00\x00\x00\x05\x00\x10\x00\x11\x00\x19\x00\x1a\x00\x24\x00\x25\x00\x1f\x00\x20\x00\x28\x00\x29\x00\x2a\x00\x0d\x00\x0e\x00\x24\x00\x25\x00\x1a\x00\x05\x00\x28\x00\x29\x00\x2a\x00\x06\x00\x00\x00\x08\x00\x1c\x00\x1d\x00\x24\x00\x27\x00\x06\x00\x07\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x01\x00\x02\x00\x28\x00\x00\x00\x00\x00\x01\x00\x02\x00\x1a\x00\x28\x00\x0a\x00\x0b\x00\x08\x00\x09\x00\x04\x00\x00\x00\x01\x00\x02\x00\x24\x00\x01\x00\x0f\x00\x09\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x00\x00\x01\x00\x02\x00\x09\x00\x23\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x00\x00\x01\x00\x02\x00\x04\x00\x05\x00\x0f\x00\x00\x00\x01\x00\x02\x00\x07\x00\x14\x00\x0b\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0f\x00\x00\x00\x01\x00\x02\x00\x23\x00\x14\x00\x1e\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0f\x00\x00\x00\x01\x00\x02\x00\x23\x00\x14\x00\x28\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0f\x00\x00\x00\x01\x00\x02\x00\x23\x00\x14\x00\x21\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0f\x00\x00\x00\x01\x00\x02\x00\x23\x00\x14\x00\x28\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0f\x00\x00\x00\x01\x00\x02\x00\x23\x00\x14\x00\x03\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0f\x00\x00\x00\x01\x00\x02\x00\x23\x00\x14\x00\x28\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0f\x00\x00\x00\x01\x00\x02\x00\x23\x00\x14\x00\x02\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0f\x00\x00\x00\x01\x00\x02\x00\x23\x00\x14\x00\x28\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0f\x00\x00\x00\x01\x00\x02\x00\x23\x00\x14\x00\x04\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0f\x00\x00\x00\x01\x00\x02\x00\x23\x00\x14\x00\x01\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0f\x00\x00\x00\x01\x00\x02\x00\x23\x00\x14\x00\x02\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0f\x00\x00\x00\x01\x00\x02\x00\x23\x00\x14\x00\x04\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0f\x00\x00\x00\x01\x00\x02\x00\x23\x00\x14\x00\x01\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0f\x00\x00\x00\x01\x00\x02\x00\x23\x00\x14\x00\x04\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0f\x00\x00\x00\x01\x00\x02\x00\x23\x00\x14\x00\x01\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0f\x00\x00\x00\x01\x00\x02\x00\x23\x00\x14\x00\x02\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0f\x00\x00\x00\x01\x00\x02\x00\x23\x00\x14\x00\x03\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0f\x00\x00\x00\x01\x00\x02\x00\x23\x00\x14\x00\x18\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0f\x00\x00\x00\x01\x00\x02\x00\x23\x00\x14\x00\x02\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x00\x00\x01\x00\x02\x00\x05\x00\x23\x00\x28\x00\x07\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x00\x00\x01\x00\x02\x00\x09\x00\x03\x00\x04\x00\x05\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x00\x00\x01\x00\x02\x00\x15\x00\x16\x00\x17\x00\x00\x00\x01\x00\x02\x00\x23\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x00\x00\x01\x00\x02\x00\x26\x00\x28\x00\x20\x00\x00\x00\x01\x00\x02\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x00\x00\x01\x00\x02\x00\x01\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x00\x00\x01\x00\x02\x00\x02\x00\x00\x00\x01\x00\x02\x00\x28\x00\x28\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x00\x00\x01\x00\x02\x00\x01\x00\x00\x00\x01\x00\x02\x00\x2c\x00\x00\x00\x01\x00\x02\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x03\x00\x03\x00\x03\x00\x18\x00\x0c\x00\x0b\x00\x2c\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x00\x00\x01\x00\x02\x00\x00\x00\x01\x00\x02\x00\x00\x00\x00\x00\x09\x00\x20\x00\x28\x00\x0b\x00\x06\x00\x07\x00\x0b\x00\x08\x00\x09\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"# +happyCheck = HappyA# "\xff\xff\x05\x00\x06\x00\x00\x00\x08\x00\x00\x00\x00\x00\x08\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x23\x00\x24\x00\x00\x00\x0c\x00\x0a\x00\x00\x00\x08\x00\x09\x00\x10\x00\x11\x00\x0d\x00\x0e\x00\x06\x00\x30\x00\x08\x00\x00\x00\x21\x00\x0b\x00\x17\x00\x0c\x00\x00\x00\x10\x00\x11\x00\x04\x00\x05\x00\x23\x00\x24\x00\x2c\x00\x23\x00\x24\x00\x18\x00\x30\x00\x31\x00\x32\x00\x30\x00\x1d\x00\x00\x00\x1f\x00\x15\x00\x21\x00\x22\x00\x06\x00\x00\x00\x25\x00\x00\x00\x27\x00\x0b\x00\x00\x00\x2a\x00\x0c\x00\x2c\x00\x2d\x00\x25\x00\x26\x00\x30\x00\x31\x00\x32\x00\x25\x00\x26\x00\x18\x00\x0d\x00\x0e\x00\x00\x00\x06\x00\x1d\x00\x04\x00\x1f\x00\x00\x00\x21\x00\x22\x00\x06\x00\x30\x00\x25\x00\x01\x00\x27\x00\x08\x00\x09\x00\x2a\x00\x02\x00\x2c\x00\x2d\x00\x18\x00\x30\x00\x30\x00\x31\x00\x32\x00\x1d\x00\x03\x00\x1f\x00\x06\x00\x21\x00\x08\x00\x04\x00\x1d\x00\x01\x00\x1f\x00\x05\x00\x21\x00\x06\x00\x07\x00\x08\x00\x2c\x00\x2d\x00\x30\x00\x00\x00\x30\x00\x31\x00\x32\x00\x2c\x00\x2d\x00\x06\x00\x07\x00\x30\x00\x31\x00\x32\x00\x2f\x00\x21\x00\x05\x00\x00\x00\x01\x00\x02\x00\x04\x00\x00\x00\x01\x00\x02\x00\x21\x00\x01\x00\x2c\x00\x0a\x00\x0b\x00\x09\x00\x30\x00\x31\x00\x32\x00\x07\x00\x09\x00\x2c\x00\x0f\x00\x0c\x00\x0d\x00\x30\x00\x31\x00\x32\x00\x09\x00\x16\x00\x0a\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\x00\x00\x27\x00\x28\x00\x00\x00\x01\x00\x02\x00\x06\x00\x07\x00\x00\x00\x01\x00\x02\x00\x01\x00\x0f\x00\x04\x00\x0b\x00\x00\x00\x01\x00\x02\x00\x26\x00\x16\x00\x30\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\x29\x00\x27\x00\x28\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x30\x00\x00\x00\x01\x00\x02\x00\x0f\x00\x21\x00\x22\x00\x03\x00\x02\x00\x14\x00\x30\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\x30\x00\x27\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\x0f\x00\x03\x00\x04\x00\x05\x00\x19\x00\x1a\x00\x1b\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\x04\x00\x27\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\x0f\x00\x16\x00\x17\x00\x18\x00\x01\x00\x04\x00\x02\x00\x16\x00\x01\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\x05\x00\x27\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\x0f\x00\x01\x00\x04\x00\x02\x00\x1c\x00\x03\x00\x30\x00\x16\x00\x02\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\x07\x00\x27\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\x0f\x00\x09\x00\x1e\x00\x2b\x00\x2e\x00\x20\x00\x01\x00\x16\x00\x28\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\x30\x00\x27\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\x0f\x00\x30\x00\x02\x00\x30\x00\x01\x00\x03\x00\x34\x00\x16\x00\x03\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\x1c\x00\x27\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\x0f\x00\x03\x00\x03\x00\x0f\x00\x0e\x00\x34\x00\x30\x00\x16\x00\xff\xff\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\x28\x00\x27\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\xff\xff\x27\x00\xff\xff\xff\xff\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\xff\xff\x27\x00\x00\x00\x01\x00\x02\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\x0f\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\xff\xff\x27\x00\x00\x00\x01\x00\x02\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\x0f\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\xff\xff\x27\x00\xff\xff\xff\xff\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\xff\xff\x27\x00\xff\xff\xff\xff\xff\xff\x1f\x00\x20\x00\x21\x00\x22\x00\xff\xff\xff\xff\xff\xff\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\xff\xff\x27\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\xff\xff\xff\xff\xff\xff\xff\xff\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\xff\xff\x27\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\xff\xff\x27\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\xff\xff\x27\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\xff\xff\x27\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\xff\xff\x27\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\xff\xff\x27\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\xff\xff\x27\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\xff\xff\x27\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\xff\xff\x27\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0f\x00\x00\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\xff\xff\x27\x00\xff\xff\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x00\x00\x01\x00\x02\x00\x00\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\x0b\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\xff\xff\x12\x00\x13\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\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\x70\x00\x71\x00\x34\x00\x72\x00\x31\x00\x85\x00\x6c\x00\x6d\x00\xa4\x00\x85\x00\x6c\x00\x6d\x00\x96\x00\x5b\x00\x94\x00\x86\x00\x87\x00\x43\x00\x44\x00\x86\x00\x87\x00\x73\x00\x76\x00\x88\x00\xa6\x00\x32\x00\x5e\x00\x88\x00\x89\x00\x5c\x00\x8c\x00\x74\x00\x68\x00\x5e\x00\x04\x00\x04\x00\x1e\x00\x1f\x00\xaf\xff\xaf\xff\x55\x00\xaf\xff\x65\x00\xaf\xff\xaf\xff\xaf\xff\xaf\xff\xaf\xff\xaf\xff\xaf\xff\xaf\xff\xaf\xff\xaf\xff\xaf\xff\xaf\xff\xaf\xff\xaf\xff\xaf\xff\xaf\xff\x5f\x00\x8f\x00\x14\x00\x66\x00\x34\x00\x23\x00\x15\x00\x5f\x00\x60\x00\xaf\xff\xaf\xff\x04\x00\x97\x00\xaf\xff\xaf\xff\xaf\xff\x16\x00\x04\x00\x05\x00\x06\x00\x14\x00\x17\x00\x18\x00\x19\x00\x15\x00\x98\x00\xae\x00\x1a\x00\x61\x00\xb3\x00\x1b\x00\xb4\x00\x1c\x00\x1d\x00\x16\x00\xb5\x00\x04\x00\x1e\x00\x1f\x00\x17\x00\x18\x00\x19\x00\x04\x00\x31\x00\x61\x00\x1a\x00\x38\x00\x11\x00\x1b\x00\xaa\x00\x1c\x00\x1d\x00\x31\x00\x5b\x00\x04\x00\x1e\x00\x1f\x00\x16\x00\xa9\x00\x62\x00\x91\x00\xab\x00\x17\x00\x18\x00\x71\x00\xad\x00\x72\x00\x97\x00\xac\x00\x5c\x00\x5d\x00\x17\x00\x18\x00\x1c\x00\x1d\x00\x62\x00\x63\x00\x04\x00\x1e\x00\x1f\x00\x98\x00\x99\x00\x1c\x00\x1d\x00\x73\x00\x9d\x00\x04\x00\x1e\x00\x1f\x00\x71\x00\x24\x00\x72\x00\x28\x00\x29\x00\x74\x00\x9b\x00\x25\x00\x74\x00\x04\x00\x1e\x00\x1f\x00\x85\x00\x6c\x00\x6d\x00\x04\x00\xaf\x00\x34\x00\x05\x00\x06\x00\x73\x00\x04\x00\xad\x00\x87\x00\xb0\x00\xb6\x00\x9f\x00\x04\x00\x05\x00\x06\x00\x74\x00\xa0\x00\x35\x00\xa1\x00\x04\x00\x1e\x00\x1f\x00\x08\x00\x36\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x04\x00\x05\x00\x06\x00\xa3\x00\x12\x00\x4a\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x6b\x00\x6c\x00\x6d\x00\x20\x00\x64\x00\xb5\x00\x04\x00\x05\x00\x06\x00\x85\x00\x08\x00\x6e\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\xa3\x00\x04\x00\x05\x00\x06\x00\x12\x00\x08\x00\x8b\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\xa5\x00\x04\x00\x05\x00\x06\x00\x12\x00\x08\x00\x04\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\xa7\x00\x04\x00\x05\x00\x06\x00\x12\x00\x08\x00\x8e\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x9b\x00\x04\x00\x05\x00\x06\x00\x12\x00\x08\x00\x04\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x9d\x00\x04\x00\x05\x00\x06\x00\x12\x00\x08\x00\x94\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x8b\x00\x04\x00\x05\x00\x06\x00\x12\x00\x08\x00\x04\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x8e\x00\x04\x00\x05\x00\x06\x00\x12\x00\x08\x00\x76\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x90\x00\x04\x00\x05\x00\x06\x00\x12\x00\x08\x00\x04\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x92\x00\x04\x00\x05\x00\x06\x00\x12\x00\x08\x00\x78\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x95\x00\x04\x00\x05\x00\x06\x00\x12\x00\x08\x00\x79\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x6a\x00\x04\x00\x05\x00\x06\x00\x12\x00\x08\x00\x7a\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x80\x00\x04\x00\x05\x00\x06\x00\x12\x00\x08\x00\x7b\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x82\x00\x04\x00\x05\x00\x06\x00\x12\x00\x08\x00\x7c\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x83\x00\x04\x00\x05\x00\x06\x00\x12\x00\x08\x00\x7e\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x47\x00\x04\x00\x05\x00\x06\x00\x12\x00\x08\x00\x7f\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x35\x00\x04\x00\x05\x00\x06\x00\x12\x00\x08\x00\x80\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x2d\x00\x04\x00\x05\x00\x06\x00\x12\x00\x08\x00\x82\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x2e\x00\x04\x00\x05\x00\x06\x00\x12\x00\x08\x00\x38\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x07\x00\x04\x00\x05\x00\x06\x00\x12\x00\x08\x00\x57\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x04\x00\x05\x00\x06\x00\x7d\x00\x12\x00\x04\x00\x58\x00\x48\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x04\x00\x05\x00\x06\x00\x59\x00\x1f\x00\x20\x00\x21\x00\x49\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x04\x00\x05\x00\x06\x00\x3a\x00\x3b\x00\x3c\x00\x04\x00\x05\x00\x06\x00\x5a\x00\x4c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x04\x00\x05\x00\x06\x00\x5b\x00\x04\x00\x23\x00\x04\x00\x05\x00\x06\x00\x4d\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x4e\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x04\x00\x05\x00\x06\x00\x68\x00\x4f\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x50\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x04\x00\x05\x00\x06\x00\x6a\x00\x04\x00\x05\x00\x06\x00\x04\x00\x04\x00\x51\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x04\x00\x05\x00\x06\x00\x2a\x00\x04\x00\x05\x00\x06\x00\xff\xff\x04\x00\x05\x00\x06\x00\x4b\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x52\x00\x0f\x00\x10\x00\x11\x00\x2b\x00\x2c\x00\x2d\x00\x38\x00\x45\x00\x46\x00\xff\xff\x53\x00\x0f\x00\x10\x00\x11\x00\x54\x00\x0f\x00\x10\x00\x11\x00\x2f\x00\x0f\x00\x10\x00\x11\x00\x6b\x00\x6c\x00\x6d\x00\x6b\x00\x6c\x00\x6d\x00\x24\x00\xaf\x00\x47\x00\x23\x00\x04\x00\xa1\x00\x25\x00\x26\x00\x6e\x00\xb0\x00\xb1\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"# +happyTable = HappyA# "\x00\x00\x80\x00\x81\x00\x71\x00\x82\x00\x6b\x00\x71\x00\x3b\x00\x38\x00\xc6\xff\xae\x00\xc7\x00\xab\x00\x2c\x00\x2d\x00\x86\x00\xbc\x00\xc6\xff\x6b\x00\xc8\x00\xce\x00\x6c\x00\xa3\x00\xaf\x00\xc6\x00\x16\x00\x04\x00\x3b\x00\x6e\x00\x83\x00\x17\x00\x39\x00\xad\x00\x6e\x00\x6c\x00\x6d\x00\x24\x00\x74\x00\x72\x00\xa8\x00\x84\x00\x72\x00\x73\x00\x18\x00\x04\x00\x22\x00\x23\x00\x04\x00\x19\x00\x62\x00\x1a\x00\x69\x00\x1b\x00\x1c\x00\x16\x00\x75\x00\x1d\x00\x76\x00\x1e\x00\x17\x00\xae\x00\x1f\x00\x78\x00\x20\x00\x21\x00\x6f\x00\xa6\x00\x04\x00\x22\x00\x23\x00\x6f\x00\x70\x00\x18\x00\xaf\x00\xb0\x00\x27\x00\x38\x00\x19\x00\xcb\x00\x1a\x00\xc7\x00\x1b\x00\x1c\x00\x38\x00\x04\x00\x1d\x00\xcc\x00\x1e\x00\xc8\x00\xc9\x00\x1f\x00\xcd\x00\x20\x00\x21\x00\x18\x00\x04\x00\x04\x00\x22\x00\x23\x00\x19\x00\xc1\x00\x1a\x00\x81\x00\x1b\x00\x82\x00\xc2\x00\x19\x00\xc3\x00\x1a\x00\xc4\x00\x1b\x00\x81\x00\xc5\x00\x82\x00\x20\x00\x21\x00\x04\x00\x28\x00\x04\x00\x22\x00\x23\x00\x20\x00\x21\x00\x29\x00\x84\x00\x04\x00\x22\x00\x23\x00\xb2\x00\x83\x00\xb4\x00\x99\x00\x7c\x00\x7d\x00\xb7\x00\x04\x00\x05\x00\x06\x00\x83\x00\xb8\x00\x84\x00\xc5\x00\x9b\x00\xb9\x00\x04\x00\x22\x00\x23\x00\x99\x00\x4f\x00\x84\x00\x34\x00\x50\x00\x51\x00\x04\x00\x22\x00\x23\x00\xbb\x00\x08\x00\x9f\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x04\x00\x05\x00\x06\x00\x28\x00\x14\x00\x95\x00\x7b\x00\x7c\x00\x7d\x00\x29\x00\x2a\x00\x04\x00\x05\x00\x06\x00\xa0\x00\x34\x00\xa1\x00\x7e\x00\x04\x00\x05\x00\x06\x00\xa2\x00\x08\x00\x04\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x3b\x00\x05\x00\x06\x00\xa5\x00\x14\x00\x35\x00\x5c\x00\x10\x00\x11\x00\x12\x00\x13\x00\x04\x00\x04\x00\x05\x00\x06\x00\x91\x00\x3f\x00\x13\x00\xab\x00\x86\x00\x92\x00\x04\x00\x08\x00\x93\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x3b\x00\x05\x00\x06\x00\x04\x00\x14\x00\x56\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x04\x00\x05\x00\x06\x00\x3c\x00\x23\x00\x24\x00\x25\x00\x41\x00\x42\x00\x43\x00\x08\x00\x3d\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x04\x00\x05\x00\x06\x00\x88\x00\x14\x00\x57\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x04\x00\x05\x00\x06\x00\xcd\x00\x44\x00\x45\x00\x46\x00\x89\x00\x8b\x00\x8a\x00\x08\x00\x8c\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x04\x00\x05\x00\x06\x00\x8d\x00\x14\x00\x58\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x04\x00\x05\x00\x06\x00\xbb\x00\x8f\x00\x8e\x00\x90\x00\x3f\x00\x95\x00\x04\x00\x08\x00\x64\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x04\x00\x05\x00\x06\x00\x65\x00\x14\x00\x59\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x04\x00\x05\x00\x06\x00\xbd\x00\x66\x00\x67\x00\x69\x00\x6b\x00\x68\x00\x78\x00\x08\x00\x27\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x04\x00\x05\x00\x06\x00\x04\x00\x14\x00\x5a\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x04\x00\x05\x00\x06\x00\xbf\x00\x04\x00\x7a\x00\x04\x00\x2e\x00\x2f\x00\xff\xff\x08\x00\x30\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x04\x00\x05\x00\x06\x00\x3f\x00\x14\x00\x5b\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x04\x00\x05\x00\x06\x00\xb2\x00\x31\x00\x33\x00\x4d\x00\x4e\x00\xff\xff\x04\x00\x08\x00\x00\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x04\x00\x05\x00\x06\x00\x27\x00\x14\x00\x5e\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x04\x00\x05\x00\x06\x00\xb4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x04\x00\x05\x00\x06\x00\x00\x00\x14\x00\x00\x00\x00\x00\x5d\x00\x10\x00\x11\x00\x12\x00\x13\x00\x04\x00\x05\x00\x06\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x04\x00\x05\x00\x06\x00\x00\x00\x14\x00\x7b\x00\x7c\x00\x7d\x00\x5f\x00\x11\x00\x12\x00\x13\x00\x04\x00\x05\x00\x06\x00\xa2\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x04\x00\x05\x00\x06\x00\x00\x00\x14\x00\x7b\x00\x7c\x00\x7d\x00\x60\x00\x11\x00\x12\x00\x13\x00\x04\x00\x05\x00\x06\x00\xa5\x00\x7e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x04\x00\x05\x00\x06\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x61\x00\x11\x00\x12\x00\x13\x00\x04\x00\x05\x00\x06\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x04\x00\x05\x00\x06\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x36\x00\x11\x00\x12\x00\x13\x00\x00\x00\x00\x00\x00\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x04\x00\x05\x00\x06\x00\x00\x00\x14\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\xac\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x04\x00\x05\x00\x06\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x04\x00\x05\x00\x06\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x90\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x04\x00\x05\x00\x06\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x04\x00\x05\x00\x06\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x04\x00\x05\x00\x06\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x04\x00\x05\x00\x06\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x04\x00\x05\x00\x06\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x04\x00\x05\x00\x06\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x04\x00\x05\x00\x06\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\x00\x04\x00\x05\x00\x06\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x04\x00\x05\x00\x06\x00\x00\x00\x14\x00\x00\x00\x51\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x04\x00\x05\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x52\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x04\x00\x05\x00\x06\x00\x00\x00\x00\x00\x00\x00\x54\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x99\x00\x7c\x00\x7d\x00\x99\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x9c\x00\xbe\x00\x00\x00\x9c\x00\x9d\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\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 (2, 94) [ +happyReduceArr = array (2, 108) [ (2 , happyReduce_2), (3 , happyReduce_3), (4 , happyReduce_4), @@ -344,11 +374,25 @@ happyReduceArr = array (2, 94) [ (91 , happyReduce_91), (92 , happyReduce_92), (93 , happyReduce_93), - (94 , happyReduce_94) + (94 , happyReduce_94), + (95 , happyReduce_95), + (96 , happyReduce_96), + (97 , happyReduce_97), + (98 , happyReduce_98), + (99 , happyReduce_99), + (100 , happyReduce_100), + (101 , happyReduce_101), + (102 , happyReduce_102), + (103 , happyReduce_103), + (104 , happyReduce_104), + (105 , happyReduce_105), + (106 , happyReduce_106), + (107 , happyReduce_107), + (108 , happyReduce_108) ] -happy_n_terms = 45 :: Int -happy_n_nonterms = 36 :: Int +happy_n_terms = 53 :: Int +happy_n_nonterms = 41 :: Int happyReduce_2 = happySpecReduce_1 0# happyReduction_2 happyReduction_2 happy_x_1 @@ -677,15 +721,28 @@ happyReduction_38 (happy_x_6 `HappyStk` (EIf happy_var_2 happy_var_4 happy_var_6 ) `HappyStk` happyRest}}} -happyReduce_39 = happySpecReduce_1 15# happyReduction_39 -happyReduction_39 happy_x_1 - = case happyOut40 happy_x_1 of { happy_var_1 -> +happyReduce_39 = happyReduce 5# 15# happyReduction_39 +happyReduction_39 (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_3 of { happy_var_3 -> + case happyOut20 happy_x_4 of { happy_var_4 -> + happyIn20 + (EDo (reverse happy_var_3) happy_var_4 + ) `HappyStk` happyRest}} + +happyReduce_40 = happySpecReduce_1 15# happyReduction_40 +happyReduction_40 happy_x_1 + = case happyOut44 happy_x_1 of { happy_var_1 -> happyIn20 (happy_var_1 )} -happyReduce_40 = happyReduce 5# 16# happyReduction_40 -happyReduction_40 (happy_x_5 `HappyStk` +happyReduce_41 = happyReduce 5# 16# happyReduction_41 +happyReduction_41 (happy_x_5 `HappyStk` happy_x_4 `HappyStk` happy_x_3 `HappyStk` happy_x_2 `HappyStk` @@ -698,20 +755,20 @@ happyReduction_40 (happy_x_5 `HappyStk` (LetDef happy_var_1 happy_var_3 happy_var_5 ) `HappyStk` happyRest}}} -happyReduce_41 = happySpecReduce_0 17# happyReduction_41 -happyReduction_41 = happyIn22 +happyReduce_42 = happySpecReduce_0 17# happyReduction_42 +happyReduction_42 = happyIn22 ([] ) -happyReduce_42 = happySpecReduce_1 17# happyReduction_42 -happyReduction_42 happy_x_1 +happyReduce_43 = happySpecReduce_1 17# happyReduction_43 +happyReduction_43 happy_x_1 = case happyOut21 happy_x_1 of { happy_var_1 -> happyIn22 ((:[]) happy_var_1 )} -happyReduce_43 = happySpecReduce_3 17# happyReduction_43 -happyReduction_43 happy_x_3 +happyReduce_44 = happySpecReduce_3 17# happyReduction_44 +happyReduction_44 happy_x_3 happy_x_2 happy_x_1 = case happyOut21 happy_x_1 of { happy_var_1 -> @@ -720,8 +777,8 @@ happyReduction_43 happy_x_3 ((:) happy_var_1 happy_var_3 )}} -happyReduce_44 = happySpecReduce_3 18# happyReduction_44 -happyReduction_44 happy_x_3 +happyReduce_45 = happySpecReduce_3 18# happyReduction_45 +happyReduction_45 happy_x_3 happy_x_2 happy_x_1 = case happyOut15 happy_x_1 of { happy_var_1 -> @@ -730,20 +787,20 @@ happyReduction_44 happy_x_3 (Case happy_var_1 happy_var_3 )}} -happyReduce_45 = happySpecReduce_0 19# happyReduction_45 -happyReduction_45 = happyIn24 +happyReduce_46 = happySpecReduce_0 19# happyReduction_46 +happyReduction_46 = happyIn24 ([] ) -happyReduce_46 = happySpecReduce_1 19# happyReduction_46 -happyReduction_46 happy_x_1 +happyReduce_47 = happySpecReduce_1 19# happyReduction_47 +happyReduction_47 happy_x_1 = case happyOut23 happy_x_1 of { happy_var_1 -> happyIn24 ((:[]) happy_var_1 )} -happyReduce_47 = happySpecReduce_3 19# happyReduction_47 -happyReduction_47 happy_x_3 +happyReduce_48 = happySpecReduce_3 19# happyReduction_48 +happyReduction_48 happy_x_3 happy_x_2 happy_x_1 = case happyOut23 happy_x_1 of { happy_var_1 -> @@ -752,20 +809,52 @@ happyReduction_47 happy_x_3 ((:) happy_var_1 happy_var_3 )}} -happyReduce_48 = happyReduce 4# 20# happyReduction_48 -happyReduction_48 (happy_x_4 `HappyStk` +happyReduce_49 = happySpecReduce_3 20# happyReduction_49 +happyReduction_49 happy_x_3 + happy_x_2 + happy_x_1 + = case happyOut28 happy_x_1 of { happy_var_1 -> + case happyOut20 happy_x_3 of { happy_var_3 -> + happyIn25 + (BindVar happy_var_1 happy_var_3 + )}} + +happyReduce_50 = happySpecReduce_1 20# happyReduction_50 +happyReduction_50 happy_x_1 + = case happyOut20 happy_x_1 of { happy_var_1 -> + happyIn25 + (BindNoVar happy_var_1 + )} + +happyReduce_51 = happySpecReduce_0 21# happyReduction_51 +happyReduction_51 = happyIn26 + ([] + ) + +happyReduce_52 = happySpecReduce_3 21# happyReduction_52 +happyReduction_52 happy_x_3 + happy_x_2 + happy_x_1 + = case happyOut26 happy_x_1 of { happy_var_1 -> + case happyOut25 happy_x_2 of { happy_var_2 -> + happyIn26 + (flip (:) happy_var_1 happy_var_2 + )}} + +happyReduce_53 = happyReduce 4# 22# happyReduction_53 +happyReduction_53 (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 happyOut28 happy_x_2 of { happy_var_2 -> case happyOut20 happy_x_4 of { happy_var_4 -> - happyIn25 + happyIn27 (EAbs happy_var_2 happy_var_4 ) `HappyStk` happyRest}} -happyReduce_49 = happyReduce 7# 20# happyReduction_49 -happyReduction_49 (happy_x_7 `HappyStk` +happyReduce_54 = happyReduce 7# 22# happyReduction_54 +happyReduction_54 (happy_x_7 `HappyStk` happy_x_6 `HappyStk` happy_x_5 `HappyStk` happy_x_4 `HappyStk` @@ -773,247 +862,206 @@ happyReduction_49 (happy_x_7 `HappyStk` happy_x_2 `HappyStk` happy_x_1 `HappyStk` happyRest) - = case happyOut26 happy_x_2 of { happy_var_2 -> + = case happyOut28 happy_x_2 of { happy_var_2 -> case happyOut20 happy_x_4 of { happy_var_4 -> case happyOut20 happy_x_7 of { happy_var_7 -> - happyIn25 + happyIn27 (EPi happy_var_2 happy_var_4 happy_var_7 ) `HappyStk` happyRest}}} -happyReduce_50 = happySpecReduce_3 20# happyReduction_50 -happyReduction_50 happy_x_3 +happyReduce_55 = happySpecReduce_3 22# happyReduction_55 +happyReduction_55 happy_x_3 happy_x_2 happy_x_1 - = case happyOut27 happy_x_1 of { happy_var_1 -> + = case happyOut29 happy_x_1 of { happy_var_1 -> case happyOut20 happy_x_3 of { happy_var_3 -> - happyIn25 + happyIn27 (EPiNoVar happy_var_1 happy_var_3 )}} -happyReduce_51 = happySpecReduce_1 20# happyReduction_51 -happyReduction_51 happy_x_1 - = case happyOut27 happy_x_1 of { happy_var_1 -> - happyIn25 - (happy_var_1 - )} - -happyReduce_52 = happySpecReduce_1 21# happyReduction_52 -happyReduction_52 happy_x_1 - = case happyOut5 happy_x_1 of { happy_var_1 -> - happyIn26 - (VVar happy_var_1 - )} - -happyReduce_53 = happySpecReduce_1 21# happyReduction_53 -happyReduction_53 happy_x_1 - = happyIn26 - (VWild - ) - -happyReduce_54 = happySpecReduce_3 22# happyReduction_54 -happyReduction_54 happy_x_3 - happy_x_2 - happy_x_1 - = case happyOut28 happy_x_1 of { happy_var_1 -> - case happyOut27 happy_x_3 of { happy_var_3 -> - happyIn27 - (EOr happy_var_1 happy_var_3 - )}} - -happyReduce_55 = happySpecReduce_1 22# happyReduction_55 -happyReduction_55 happy_x_1 - = case happyOut28 happy_x_1 of { happy_var_1 -> - happyIn27 - (happy_var_1 - )} - -happyReduce_56 = happySpecReduce_3 23# happyReduction_56 -happyReduction_56 happy_x_3 - happy_x_2 - happy_x_1 +happyReduce_56 = happySpecReduce_1 22# happyReduction_56 +happyReduction_56 happy_x_1 = case happyOut29 happy_x_1 of { happy_var_1 -> - case happyOut28 happy_x_3 of { happy_var_3 -> - happyIn28 - (EAnd happy_var_1 happy_var_3 - )}} + happyIn27 + (happy_var_1 + )} happyReduce_57 = happySpecReduce_1 23# happyReduction_57 happyReduction_57 happy_x_1 - = case happyOut29 happy_x_1 of { happy_var_1 -> + = case happyOut5 happy_x_1 of { happy_var_1 -> happyIn28 - (happy_var_1 + (VVar happy_var_1 )} -happyReduce_58 = happySpecReduce_3 24# happyReduction_58 -happyReduction_58 happy_x_3 - happy_x_2 - happy_x_1 - = case happyOut30 happy_x_1 of { happy_var_1 -> - case happyOut30 happy_x_3 of { happy_var_3 -> - happyIn29 - (EEq happy_var_1 happy_var_3 - )}} +happyReduce_58 = happySpecReduce_1 23# happyReduction_58 +happyReduction_58 happy_x_1 + = happyIn28 + (VWild + ) happyReduce_59 = happySpecReduce_3 24# happyReduction_59 happyReduction_59 happy_x_3 happy_x_2 happy_x_1 - = case happyOut30 happy_x_1 of { happy_var_1 -> + = case happyOut29 happy_x_1 of { happy_var_1 -> case happyOut30 happy_x_3 of { happy_var_3 -> happyIn29 - (ENe happy_var_1 happy_var_3 + (EBind happy_var_1 happy_var_3 )}} happyReduce_60 = happySpecReduce_3 24# happyReduction_60 happyReduction_60 happy_x_3 happy_x_2 happy_x_1 - = case happyOut30 happy_x_1 of { happy_var_1 -> + = case happyOut29 happy_x_1 of { happy_var_1 -> case happyOut30 happy_x_3 of { happy_var_3 -> happyIn29 - (ELt happy_var_1 happy_var_3 + (EBindC happy_var_1 happy_var_3 )}} -happyReduce_61 = happySpecReduce_3 24# happyReduction_61 -happyReduction_61 happy_x_3 - happy_x_2 - happy_x_1 +happyReduce_61 = happySpecReduce_1 24# happyReduction_61 +happyReduction_61 happy_x_1 = case happyOut30 happy_x_1 of { happy_var_1 -> - case happyOut30 happy_x_3 of { happy_var_3 -> happyIn29 - (ELe happy_var_1 happy_var_3 - )}} + (happy_var_1 + )} -happyReduce_62 = happySpecReduce_3 24# happyReduction_62 +happyReduce_62 = happySpecReduce_3 25# happyReduction_62 happyReduction_62 happy_x_3 happy_x_2 happy_x_1 - = case happyOut30 happy_x_1 of { happy_var_1 -> + = case happyOut31 happy_x_1 of { happy_var_1 -> case happyOut30 happy_x_3 of { happy_var_3 -> - happyIn29 - (EGt happy_var_1 happy_var_3 - )}} - -happyReduce_63 = happySpecReduce_3 24# happyReduction_63 -happyReduction_63 happy_x_3 - happy_x_2 - happy_x_1 - = case happyOut30 happy_x_1 of { happy_var_1 -> - case happyOut30 happy_x_3 of { happy_var_3 -> - happyIn29 - (EGe happy_var_1 happy_var_3 - )}} - -happyReduce_64 = happySpecReduce_1 24# happyReduction_64 -happyReduction_64 happy_x_1 - = case happyOut30 happy_x_1 of { happy_var_1 -> - happyIn29 - (happy_var_1 - )} - -happyReduce_65 = happySpecReduce_3 25# happyReduction_65 -happyReduction_65 happy_x_3 - happy_x_2 - happy_x_1 - = case happyOut30 happy_x_1 of { happy_var_1 -> - case happyOut31 happy_x_3 of { happy_var_3 -> happyIn30 - (EAdd happy_var_1 happy_var_3 + (EOr happy_var_1 happy_var_3 )}} -happyReduce_66 = happySpecReduce_3 25# happyReduction_66 -happyReduction_66 happy_x_3 - happy_x_2 - happy_x_1 - = case happyOut30 happy_x_1 of { happy_var_1 -> - case happyOut31 happy_x_3 of { happy_var_3 -> - happyIn30 - (ESub happy_var_1 happy_var_3 - )}} - -happyReduce_67 = happySpecReduce_1 25# happyReduction_67 -happyReduction_67 happy_x_1 +happyReduce_63 = happySpecReduce_1 25# happyReduction_63 +happyReduction_63 happy_x_1 = case happyOut31 happy_x_1 of { happy_var_1 -> happyIn30 (happy_var_1 )} -happyReduce_68 = happySpecReduce_3 26# happyReduction_68 -happyReduction_68 happy_x_3 +happyReduce_64 = happySpecReduce_3 26# happyReduction_64 +happyReduction_64 happy_x_3 happy_x_2 happy_x_1 - = case happyOut31 happy_x_1 of { happy_var_1 -> - case happyOut32 happy_x_3 of { happy_var_3 -> + = case happyOut32 happy_x_1 of { happy_var_1 -> + case happyOut31 happy_x_3 of { happy_var_3 -> happyIn31 - (EMul happy_var_1 happy_var_3 + (EAnd happy_var_1 happy_var_3 )}} -happyReduce_69 = happySpecReduce_3 26# happyReduction_69 -happyReduction_69 happy_x_3 - happy_x_2 - happy_x_1 - = case happyOut31 happy_x_1 of { happy_var_1 -> - case happyOut32 happy_x_3 of { happy_var_3 -> - happyIn31 - (EDiv happy_var_1 happy_var_3 - )}} - -happyReduce_70 = happySpecReduce_3 26# happyReduction_70 -happyReduction_70 happy_x_3 - happy_x_2 - happy_x_1 - = case happyOut31 happy_x_1 of { happy_var_1 -> - case happyOut32 happy_x_3 of { happy_var_3 -> - happyIn31 - (EMod happy_var_1 happy_var_3 - )}} - -happyReduce_71 = happySpecReduce_1 26# happyReduction_71 -happyReduction_71 happy_x_1 +happyReduce_65 = happySpecReduce_1 26# happyReduction_65 +happyReduction_65 happy_x_1 = case happyOut32 happy_x_1 of { happy_var_1 -> happyIn31 (happy_var_1 )} -happyReduce_72 = happySpecReduce_2 27# happyReduction_72 -happyReduction_72 happy_x_2 +happyReduce_66 = happySpecReduce_3 27# happyReduction_66 +happyReduction_66 happy_x_3 + happy_x_2 happy_x_1 - = case happyOut32 happy_x_2 of { happy_var_2 -> + = case happyOut33 happy_x_1 of { happy_var_1 -> + case happyOut33 happy_x_3 of { happy_var_3 -> happyIn32 - (ENeg happy_var_2 - )} + (EEq happy_var_1 happy_var_3 + )}} -happyReduce_73 = happySpecReduce_1 27# happyReduction_73 -happyReduction_73 happy_x_1 +happyReduce_67 = happySpecReduce_3 27# happyReduction_67 +happyReduction_67 happy_x_3 + happy_x_2 + happy_x_1 + = case happyOut33 happy_x_1 of { happy_var_1 -> + case happyOut33 happy_x_3 of { happy_var_3 -> + happyIn32 + (ENe happy_var_1 happy_var_3 + )}} + +happyReduce_68 = happySpecReduce_3 27# happyReduction_68 +happyReduction_68 happy_x_3 + happy_x_2 + happy_x_1 + = case happyOut33 happy_x_1 of { happy_var_1 -> + case happyOut33 happy_x_3 of { happy_var_3 -> + happyIn32 + (ELt happy_var_1 happy_var_3 + )}} + +happyReduce_69 = happySpecReduce_3 27# happyReduction_69 +happyReduction_69 happy_x_3 + happy_x_2 + happy_x_1 + = case happyOut33 happy_x_1 of { happy_var_1 -> + case happyOut33 happy_x_3 of { happy_var_3 -> + happyIn32 + (ELe happy_var_1 happy_var_3 + )}} + +happyReduce_70 = happySpecReduce_3 27# happyReduction_70 +happyReduction_70 happy_x_3 + happy_x_2 + happy_x_1 + = case happyOut33 happy_x_1 of { happy_var_1 -> + case happyOut33 happy_x_3 of { happy_var_3 -> + happyIn32 + (EGt happy_var_1 happy_var_3 + )}} + +happyReduce_71 = happySpecReduce_3 27# happyReduction_71 +happyReduction_71 happy_x_3 + happy_x_2 + happy_x_1 + = case happyOut33 happy_x_1 of { happy_var_1 -> + case happyOut33 happy_x_3 of { happy_var_3 -> + happyIn32 + (EGe happy_var_1 happy_var_3 + )}} + +happyReduce_72 = happySpecReduce_1 27# happyReduction_72 +happyReduction_72 happy_x_1 = case happyOut33 happy_x_1 of { happy_var_1 -> happyIn32 (happy_var_1 )} -happyReduce_74 = happySpecReduce_2 28# happyReduction_74 -happyReduction_74 happy_x_2 +happyReduce_73 = happySpecReduce_3 28# happyReduction_73 +happyReduction_73 happy_x_3 + happy_x_2 happy_x_1 - = case happyOut33 happy_x_1 of { happy_var_1 -> - case happyOut34 happy_x_2 of { happy_var_2 -> + = case happyOut34 happy_x_1 of { happy_var_1 -> + case happyOut33 happy_x_3 of { happy_var_3 -> happyIn33 - (EApp happy_var_1 happy_var_2 + (EListCons happy_var_1 happy_var_3 )}} -happyReduce_75 = happySpecReduce_1 28# happyReduction_75 -happyReduction_75 happy_x_1 +happyReduce_74 = happySpecReduce_1 28# happyReduction_74 +happyReduction_74 happy_x_1 = case happyOut34 happy_x_1 of { happy_var_1 -> happyIn33 (happy_var_1 )} +happyReduce_75 = happySpecReduce_3 29# happyReduction_75 +happyReduction_75 happy_x_3 + happy_x_2 + happy_x_1 + = case happyOut34 happy_x_1 of { happy_var_1 -> + case happyOut35 happy_x_3 of { happy_var_3 -> + happyIn34 + (EAdd happy_var_1 happy_var_3 + )}} + happyReduce_76 = happySpecReduce_3 29# happyReduction_76 happyReduction_76 happy_x_3 happy_x_2 happy_x_1 = case happyOut34 happy_x_1 of { happy_var_1 -> - case happyOut5 happy_x_3 of { happy_var_3 -> + case happyOut35 happy_x_3 of { happy_var_3 -> happyIn34 - (EProj happy_var_1 happy_var_3 + (ESub happy_var_1 happy_var_3 )}} happyReduce_77 = happySpecReduce_1 29# happyReduction_77 @@ -1023,143 +1071,259 @@ happyReduction_77 happy_x_1 (happy_var_1 )} -happyReduce_78 = happyReduce 4# 30# happyReduction_78 -happyReduction_78 (happy_x_4 `HappyStk` - happy_x_3 `HappyStk` - happy_x_2 `HappyStk` - happy_x_1 `HappyStk` - happyRest) - = case happyOut37 happy_x_3 of { happy_var_3 -> +happyReduce_78 = happySpecReduce_3 30# happyReduction_78 +happyReduction_78 happy_x_3 + happy_x_2 + happy_x_1 + = case happyOut35 happy_x_1 of { happy_var_1 -> + case happyOut36 happy_x_3 of { happy_var_3 -> happyIn35 - (ERecType happy_var_3 - ) `HappyStk` happyRest} + (EMul happy_var_1 happy_var_3 + )}} -happyReduce_79 = happyReduce 4# 30# happyReduction_79 -happyReduction_79 (happy_x_4 `HappyStk` - happy_x_3 `HappyStk` - happy_x_2 `HappyStk` - happy_x_1 `HappyStk` - happyRest) - = case happyOut39 happy_x_3 of { happy_var_3 -> +happyReduce_79 = happySpecReduce_3 30# happyReduction_79 +happyReduction_79 happy_x_3 + happy_x_2 + happy_x_1 + = case happyOut35 happy_x_1 of { happy_var_1 -> + case happyOut36 happy_x_3 of { happy_var_3 -> happyIn35 - (ERec happy_var_3 - ) `HappyStk` happyRest} + (EDiv happy_var_1 happy_var_3 + )}} -happyReduce_80 = happySpecReduce_1 30# happyReduction_80 -happyReduction_80 happy_x_1 - = case happyOut5 happy_x_1 of { happy_var_1 -> +happyReduce_80 = happySpecReduce_3 30# happyReduction_80 +happyReduction_80 happy_x_3 + happy_x_2 + happy_x_1 + = case happyOut35 happy_x_1 of { happy_var_1 -> + case happyOut36 happy_x_3 of { happy_var_3 -> happyIn35 - (EVar happy_var_1 - )} + (EMod happy_var_1 happy_var_3 + )}} happyReduce_81 = happySpecReduce_1 30# happyReduction_81 happyReduction_81 happy_x_1 - = happyIn35 - (EType - ) - -happyReduce_82 = happySpecReduce_1 30# happyReduction_82 -happyReduction_82 happy_x_1 - = case happyOut6 happy_x_1 of { happy_var_1 -> - happyIn35 - (EStr happy_var_1 - )} - -happyReduce_83 = happySpecReduce_1 30# happyReduction_83 -happyReduction_83 happy_x_1 - = case happyOut7 happy_x_1 of { happy_var_1 -> - happyIn35 - (EInt happy_var_1 - )} - -happyReduce_84 = happySpecReduce_1 30# happyReduction_84 -happyReduction_84 happy_x_1 - = happyIn35 - (EMeta - ) - -happyReduce_85 = happySpecReduce_3 30# happyReduction_85 -happyReduction_85 happy_x_3 - happy_x_2 - happy_x_1 - = case happyOut20 happy_x_2 of { happy_var_2 -> - happyIn35 - (happy_var_2 - )} - -happyReduce_86 = happySpecReduce_3 31# happyReduction_86 -happyReduction_86 happy_x_3 - happy_x_2 - happy_x_1 - = case happyOut5 happy_x_1 of { happy_var_1 -> - case happyOut20 happy_x_3 of { happy_var_3 -> - happyIn36 - (FieldType happy_var_1 happy_var_3 - )}} - -happyReduce_87 = happySpecReduce_0 32# happyReduction_87 -happyReduction_87 = happyIn37 - ([] - ) - -happyReduce_88 = happySpecReduce_1 32# happyReduction_88 -happyReduction_88 happy_x_1 = case happyOut36 happy_x_1 of { happy_var_1 -> - happyIn37 - ((:[]) happy_var_1 - )} - -happyReduce_89 = happySpecReduce_3 32# happyReduction_89 -happyReduction_89 happy_x_3 - happy_x_2 - happy_x_1 - = case happyOut36 happy_x_1 of { happy_var_1 -> - case happyOut37 happy_x_3 of { happy_var_3 -> - happyIn37 - ((:) happy_var_1 happy_var_3 - )}} - -happyReduce_90 = happySpecReduce_3 33# happyReduction_90 -happyReduction_90 happy_x_3 - happy_x_2 - happy_x_1 - = case happyOut5 happy_x_1 of { happy_var_1 -> - case happyOut20 happy_x_3 of { happy_var_3 -> - happyIn38 - (FieldValue happy_var_1 happy_var_3 - )}} - -happyReduce_91 = happySpecReduce_0 34# happyReduction_91 -happyReduction_91 = happyIn39 - ([] - ) - -happyReduce_92 = happySpecReduce_1 34# happyReduction_92 -happyReduction_92 happy_x_1 - = case happyOut38 happy_x_1 of { happy_var_1 -> - happyIn39 - ((:[]) happy_var_1 - )} - -happyReduce_93 = happySpecReduce_3 34# happyReduction_93 -happyReduction_93 happy_x_3 - happy_x_2 - happy_x_1 - = case happyOut38 happy_x_1 of { happy_var_1 -> - case happyOut39 happy_x_3 of { happy_var_3 -> - happyIn39 - ((:) happy_var_1 happy_var_3 - )}} - -happyReduce_94 = happySpecReduce_1 35# happyReduction_94 -happyReduction_94 happy_x_1 - = case happyOut25 happy_x_1 of { happy_var_1 -> - happyIn40 + happyIn35 (happy_var_1 )} +happyReduce_82 = happySpecReduce_2 31# happyReduction_82 +happyReduction_82 happy_x_2 + happy_x_1 + = case happyOut36 happy_x_2 of { happy_var_2 -> + happyIn36 + (ENeg happy_var_2 + )} + +happyReduce_83 = happySpecReduce_1 31# happyReduction_83 +happyReduction_83 happy_x_1 + = case happyOut37 happy_x_1 of { happy_var_1 -> + happyIn36 + (happy_var_1 + )} + +happyReduce_84 = happySpecReduce_2 32# happyReduction_84 +happyReduction_84 happy_x_2 + happy_x_1 + = case happyOut37 happy_x_1 of { happy_var_1 -> + case happyOut38 happy_x_2 of { happy_var_2 -> + happyIn37 + (EApp happy_var_1 happy_var_2 + )}} + +happyReduce_85 = happySpecReduce_1 32# happyReduction_85 +happyReduction_85 happy_x_1 + = case happyOut38 happy_x_1 of { happy_var_1 -> + happyIn37 + (happy_var_1 + )} + +happyReduce_86 = happySpecReduce_3 33# happyReduction_86 +happyReduction_86 happy_x_3 + happy_x_2 + happy_x_1 + = case happyOut38 happy_x_1 of { happy_var_1 -> + case happyOut5 happy_x_3 of { happy_var_3 -> + happyIn38 + (EProj happy_var_1 happy_var_3 + )}} + +happyReduce_87 = happySpecReduce_1 33# happyReduction_87 +happyReduction_87 happy_x_1 + = case happyOut39 happy_x_1 of { happy_var_1 -> + happyIn38 + (happy_var_1 + )} + +happyReduce_88 = happyReduce 4# 34# happyReduction_88 +happyReduction_88 (happy_x_4 `HappyStk` + happy_x_3 `HappyStk` + happy_x_2 `HappyStk` + happy_x_1 `HappyStk` + happyRest) + = case happyOut41 happy_x_3 of { happy_var_3 -> + happyIn39 + (ERecType happy_var_3 + ) `HappyStk` happyRest} + +happyReduce_89 = happyReduce 4# 34# happyReduction_89 +happyReduction_89 (happy_x_4 `HappyStk` + happy_x_3 `HappyStk` + happy_x_2 `HappyStk` + happy_x_1 `HappyStk` + happyRest) + = case happyOut43 happy_x_3 of { happy_var_3 -> + happyIn39 + (ERec happy_var_3 + ) `HappyStk` happyRest} + +happyReduce_90 = happySpecReduce_3 34# happyReduction_90 +happyReduction_90 happy_x_3 + happy_x_2 + happy_x_1 + = case happyOut45 happy_x_2 of { happy_var_2 -> + happyIn39 + (EList happy_var_2 + )} + +happyReduce_91 = happySpecReduce_1 34# happyReduction_91 +happyReduction_91 happy_x_1 + = case happyOut5 happy_x_1 of { happy_var_1 -> + happyIn39 + (EVar happy_var_1 + )} + +happyReduce_92 = happySpecReduce_1 34# happyReduction_92 +happyReduction_92 happy_x_1 + = happyIn39 + (EType + ) + +happyReduce_93 = happySpecReduce_1 34# happyReduction_93 +happyReduction_93 happy_x_1 + = case happyOut6 happy_x_1 of { happy_var_1 -> + happyIn39 + (EStr happy_var_1 + )} + +happyReduce_94 = happySpecReduce_1 34# happyReduction_94 +happyReduction_94 happy_x_1 + = case happyOut7 happy_x_1 of { happy_var_1 -> + happyIn39 + (EInt happy_var_1 + )} + +happyReduce_95 = happySpecReduce_1 34# happyReduction_95 +happyReduction_95 happy_x_1 + = happyIn39 + (EMeta + ) + +happyReduce_96 = happySpecReduce_3 34# happyReduction_96 +happyReduction_96 happy_x_3 + happy_x_2 + happy_x_1 + = case happyOut20 happy_x_2 of { happy_var_2 -> + happyIn39 + (happy_var_2 + )} + +happyReduce_97 = happySpecReduce_3 35# happyReduction_97 +happyReduction_97 happy_x_3 + happy_x_2 + happy_x_1 + = case happyOut5 happy_x_1 of { happy_var_1 -> + case happyOut20 happy_x_3 of { happy_var_3 -> + happyIn40 + (FieldType happy_var_1 happy_var_3 + )}} + +happyReduce_98 = happySpecReduce_0 36# happyReduction_98 +happyReduction_98 = happyIn41 + ([] + ) + +happyReduce_99 = happySpecReduce_1 36# happyReduction_99 +happyReduction_99 happy_x_1 + = case happyOut40 happy_x_1 of { happy_var_1 -> + happyIn41 + ((:[]) happy_var_1 + )} + +happyReduce_100 = happySpecReduce_3 36# happyReduction_100 +happyReduction_100 happy_x_3 + happy_x_2 + happy_x_1 + = case happyOut40 happy_x_1 of { happy_var_1 -> + case happyOut41 happy_x_3 of { happy_var_3 -> + happyIn41 + ((:) happy_var_1 happy_var_3 + )}} + +happyReduce_101 = happySpecReduce_3 37# happyReduction_101 +happyReduction_101 happy_x_3 + happy_x_2 + happy_x_1 + = case happyOut5 happy_x_1 of { happy_var_1 -> + case happyOut20 happy_x_3 of { happy_var_3 -> + happyIn42 + (FieldValue happy_var_1 happy_var_3 + )}} + +happyReduce_102 = happySpecReduce_0 38# happyReduction_102 +happyReduction_102 = happyIn43 + ([] + ) + +happyReduce_103 = happySpecReduce_1 38# happyReduction_103 +happyReduction_103 happy_x_1 + = case happyOut42 happy_x_1 of { happy_var_1 -> + happyIn43 + ((:[]) happy_var_1 + )} + +happyReduce_104 = happySpecReduce_3 38# happyReduction_104 +happyReduction_104 happy_x_3 + happy_x_2 + happy_x_1 + = case happyOut42 happy_x_1 of { happy_var_1 -> + case happyOut43 happy_x_3 of { happy_var_3 -> + happyIn43 + ((:) happy_var_1 happy_var_3 + )}} + +happyReduce_105 = happySpecReduce_1 39# happyReduction_105 +happyReduction_105 happy_x_1 + = case happyOut27 happy_x_1 of { happy_var_1 -> + happyIn44 + (happy_var_1 + )} + +happyReduce_106 = happySpecReduce_0 40# happyReduction_106 +happyReduction_106 = happyIn45 + ([] + ) + +happyReduce_107 = happySpecReduce_1 40# happyReduction_107 +happyReduction_107 happy_x_1 + = case happyOut20 happy_x_1 of { happy_var_1 -> + happyIn45 + ((:[]) happy_var_1 + )} + +happyReduce_108 = happySpecReduce_3 40# happyReduction_108 +happyReduction_108 happy_x_3 + happy_x_2 + happy_x_1 + = case happyOut20 happy_x_1 of { happy_var_1 -> + case happyOut45 happy_x_3 of { happy_var_3 -> + happyIn45 + ((:) happy_var_1 happy_var_3 + )}} + happyNewToken action sts stk [] = - happyDoAction 44# (error "reading EOF!") action sts stk [] + happyDoAction 52# (error "reading EOF!") action sts stk [] happyNewToken action sts stk (tk:tks) = let cont i = happyDoAction i tk action sts stk tks in @@ -1173,40 +1337,48 @@ happyNewToken action sts stk (tk:tks) = 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 19#; - PT _ (TS "-") -> cont 20#; - PT _ (TS "*") -> cont 21#; - PT _ (TS "/") -> cont 22#; - PT _ (TS "%") -> cont 23#; - PT _ (TS ".") -> cont 24#; - PT _ (TS "?") -> cont 25#; - PT _ (TS "Type") -> cont 26#; - PT _ (TS "case") -> cont 27#; - PT _ (TS "data") -> cont 28#; - PT _ (TS "derive") -> cont 29#; - PT _ (TS "else") -> cont 30#; - PT _ (TS "if") -> cont 31#; - PT _ (TS "import") -> cont 32#; - PT _ (TS "in") -> cont 33#; - PT _ (TS "let") -> cont 34#; - PT _ (TS "of") -> cont 35#; - PT _ (TS "rec") -> cont 36#; - PT _ (TS "sig") -> cont 37#; - PT _ (TS "then") -> cont 38#; - PT _ (TS "where") -> cont 39#; - PT _ (TV happy_dollar_dollar) -> cont 40#; - PT _ (TL happy_dollar_dollar) -> cont 41#; - PT _ (TI happy_dollar_dollar) -> cont 42#; - _ -> cont 43#; + 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 ">=") -> cont 21#; + PT _ (TS "::") -> cont 22#; + PT _ (TS "+") -> cont 23#; + PT _ (TS "-") -> cont 24#; + PT _ (TS "*") -> cont 25#; + PT _ (TS "/") -> cont 26#; + PT _ (TS "%") -> cont 27#; + PT _ (TS ".") -> cont 28#; + PT _ (TS "[") -> cont 29#; + PT _ (TS "]") -> cont 30#; + PT _ (TS "?") -> cont 31#; + PT _ (TS ",") -> cont 32#; + PT _ (TS "Type") -> cont 33#; + PT _ (TS "case") -> cont 34#; + PT _ (TS "data") -> cont 35#; + PT _ (TS "derive") -> cont 36#; + PT _ (TS "do") -> cont 37#; + PT _ (TS "else") -> cont 38#; + PT _ (TS "if") -> cont 39#; + PT _ (TS "import") -> cont 40#; + PT _ (TS "in") -> cont 41#; + PT _ (TS "let") -> cont 42#; + PT _ (TS "of") -> cont 43#; + PT _ (TS "rec") -> cont 44#; + PT _ (TS "sig") -> cont 45#; + PT _ (TS "then") -> cont 46#; + PT _ (TS "where") -> cont 47#; + PT _ (TV happy_dollar_dollar) -> cont 48#; + PT _ (TL happy_dollar_dollar) -> cont 49#; + PT _ (TI happy_dollar_dollar) -> cont 50#; + _ -> cont 51#; _ -> happyError' (tk:tks) } diff --git a/src/Transfer/Syntax/Par.y b/src/Transfer/Syntax/Par.y index 5bb795c0f..313977c77 100644 --- a/src/Transfer/Syntax/Par.y +++ b/src/Transfer/Syntax/Par.y @@ -23,7 +23,10 @@ import Transfer.ErrM ')' { PT _ (TS ")") } '_' { PT _ (TS "_") } '->' { PT _ (TS "->") } + '<-' { PT _ (TS "<-") } '\\' { PT _ (TS "\\") } + '>>=' { PT _ (TS ">>=") } + '>>' { PT _ (TS ">>") } '||' { PT _ (TS "||") } '&&' { PT _ (TS "&&") } '==' { PT _ (TS "==") } @@ -32,17 +35,22 @@ import Transfer.ErrM '<=' { PT _ (TS "<=") } '>' { PT _ (TS ">") } '>=' { PT _ (TS ">=") } + '::' { PT _ (TS "::") } '+' { PT _ (TS "+") } '-' { PT _ (TS "-") } '*' { PT _ (TS "*") } '/' { PT _ (TS "/") } '%' { PT _ (TS "%") } '.' { PT _ (TS ".") } + '[' { PT _ (TS "[") } + ']' { PT _ (TS "]") } '?' { PT _ (TS "?") } + ',' { PT _ (TS ",") } 'Type' { PT _ (TS "Type") } 'case' { PT _ (TS "case") } 'data' { PT _ (TS "data") } 'derive' { PT _ (TS "derive") } + 'do' { PT _ (TS "do") } 'else' { PT _ (TS "else") } 'if' { PT _ (TS "if") } 'import' { PT _ (TS "import") } @@ -137,6 +145,7 @@ Exp :: { Exp } Exp : 'let' '{' ListLetDef '}' 'in' Exp { ELet $3 $6 } | 'case' Exp 'of' '{' ListCase '}' { ECase $2 $5 } | 'if' Exp 'then' Exp 'else' Exp { EIf $2 $4 $6 } + | 'do' '{' ListBind Exp '}' { EDo (reverse $3) $4 } | Exp1 { $1 } @@ -160,6 +169,16 @@ ListCase : {- empty -} { [] } | Case ';' ListCase { (:) $1 $3 } +Bind :: { Bind } +Bind : VarOrWild '<-' Exp { BindVar $1 $3 } + | Exp { BindNoVar $1 } + + +ListBind :: { [Bind] } +ListBind : {- empty -} { [] } + | ListBind Bind ';' { flip (:) $1 $2 } + + Exp2 :: { Exp } Exp2 : '\\' VarOrWild '->' Exp { EAbs $2 $4 } | '(' VarOrWild ':' Exp ')' '->' Exp { EPi $2 $4 $7 } @@ -173,56 +192,68 @@ VarOrWild : Ident { VVar $1 } Exp3 :: { Exp } -Exp3 : Exp4 '||' Exp3 { EOr $1 $3 } +Exp3 : Exp3 '>>=' Exp4 { EBind $1 $3 } + | Exp3 '>>' Exp4 { EBindC $1 $3 } | Exp4 { $1 } Exp4 :: { Exp } -Exp4 : Exp5 '&&' Exp4 { EAnd $1 $3 } +Exp4 : Exp5 '||' Exp4 { EOr $1 $3 } | Exp5 { $1 } Exp5 :: { Exp } -Exp5 : Exp6 '==' Exp6 { EEq $1 $3 } - | Exp6 '/=' Exp6 { ENe $1 $3 } - | Exp6 '<' Exp6 { ELt $1 $3 } - | Exp6 '<=' Exp6 { ELe $1 $3 } - | Exp6 '>' Exp6 { EGt $1 $3 } - | Exp6 '>=' Exp6 { EGe $1 $3 } +Exp5 : Exp6 '&&' Exp5 { EAnd $1 $3 } | Exp6 { $1 } Exp6 :: { Exp } -Exp6 : Exp6 '+' Exp7 { EAdd $1 $3 } - | Exp6 '-' Exp7 { ESub $1 $3 } +Exp6 : Exp7 '==' Exp7 { EEq $1 $3 } + | Exp7 '/=' Exp7 { ENe $1 $3 } + | Exp7 '<' Exp7 { ELt $1 $3 } + | Exp7 '<=' Exp7 { ELe $1 $3 } + | Exp7 '>' Exp7 { EGt $1 $3 } + | Exp7 '>=' Exp7 { EGe $1 $3 } | Exp7 { $1 } Exp7 :: { Exp } -Exp7 : Exp7 '*' Exp8 { EMul $1 $3 } - | Exp7 '/' Exp8 { EDiv $1 $3 } - | Exp7 '%' Exp8 { EMod $1 $3 } +Exp7 : Exp8 '::' Exp7 { EListCons $1 $3 } | Exp8 { $1 } Exp8 :: { Exp } -Exp8 : '-' Exp8 { ENeg $2 } +Exp8 : Exp8 '+' Exp9 { EAdd $1 $3 } + | Exp8 '-' Exp9 { ESub $1 $3 } | Exp9 { $1 } Exp9 :: { Exp } -Exp9 : Exp9 Exp10 { EApp $1 $2 } +Exp9 : Exp9 '*' Exp10 { EMul $1 $3 } + | Exp9 '/' Exp10 { EDiv $1 $3 } + | Exp9 '%' Exp10 { EMod $1 $3 } | Exp10 { $1 } Exp10 :: { Exp } -Exp10 : Exp10 '.' Ident { EProj $1 $3 } +Exp10 : '-' Exp10 { ENeg $2 } | Exp11 { $1 } Exp11 :: { Exp } -Exp11 : 'sig' '{' ListFieldType '}' { ERecType $3 } +Exp11 : Exp11 Exp12 { EApp $1 $2 } + | Exp12 { $1 } + + +Exp12 :: { Exp } +Exp12 : Exp12 '.' Ident { EProj $1 $3 } + | Exp13 { $1 } + + +Exp13 :: { Exp } +Exp13 : 'sig' '{' ListFieldType '}' { ERecType $3 } | 'rec' '{' ListFieldValue '}' { ERec $3 } + | '[' ListExp ']' { EList $2 } | Ident { EVar $1 } | 'Type' { EType } | String { EStr $1 } @@ -255,6 +286,12 @@ Exp1 :: { Exp } Exp1 : Exp2 { $1 } +ListExp :: { [Exp] } +ListExp : {- empty -} { [] } + | Exp { (:[]) $1 } + | Exp ',' ListExp { (:) $1 $3 } + + { diff --git a/src/Transfer/Syntax/Print.hs b/src/Transfer/Syntax/Print.hs index ee692bd90..cc93f4383 100644 --- a/src/Transfer/Syntax/Print.hs +++ b/src/Transfer/Syntax/Print.hs @@ -99,34 +99,41 @@ instance Print (Tree c) where ELet letdefs exp -> prPrec _i 0 (concatD [doc (showString "let") , doc (showString "{") , prt 0 letdefs , doc (showString "}") , doc (showString "in") , prt 0 exp]) ECase exp cases -> prPrec _i 0 (concatD [doc (showString "case") , prt 0 exp , doc (showString "of") , doc (showString "{") , prt 0 cases , doc (showString "}")]) EIf exp0 exp1 exp2 -> prPrec _i 0 (concatD [doc (showString "if") , prt 0 exp0 , doc (showString "then") , prt 0 exp1 , doc (showString "else") , prt 0 exp2]) + EDo binds exp -> prPrec _i 0 (concatD [doc (showString "do") , doc (showString "{") , prt 0 binds , prt 0 exp , doc (showString "}")]) EAbs varorwild exp -> prPrec _i 2 (concatD [doc (showString "\\") , prt 0 varorwild , doc (showString "->") , prt 0 exp]) EPi varorwild exp0 exp1 -> prPrec _i 2 (concatD [doc (showString "(") , prt 0 varorwild , doc (showString ":") , prt 0 exp0 , doc (showString ")") , doc (showString "->") , prt 0 exp1]) EPiNoVar exp0 exp1 -> prPrec _i 2 (concatD [prt 3 exp0 , doc (showString "->") , prt 0 exp1]) - EOr exp0 exp1 -> prPrec _i 3 (concatD [prt 4 exp0 , doc (showString "||") , prt 3 exp1]) - EAnd exp0 exp1 -> prPrec _i 4 (concatD [prt 5 exp0 , doc (showString "&&") , prt 4 exp1]) - EEq exp0 exp1 -> prPrec _i 5 (concatD [prt 6 exp0 , doc (showString "==") , prt 6 exp1]) - ENe exp0 exp1 -> prPrec _i 5 (concatD [prt 6 exp0 , doc (showString "/=") , prt 6 exp1]) - ELt exp0 exp1 -> prPrec _i 5 (concatD [prt 6 exp0 , doc (showString "<") , prt 6 exp1]) - ELe exp0 exp1 -> prPrec _i 5 (concatD [prt 6 exp0 , doc (showString "<=") , prt 6 exp1]) - EGt exp0 exp1 -> prPrec _i 5 (concatD [prt 6 exp0 , doc (showString ">") , prt 6 exp1]) - EGe exp0 exp1 -> prPrec _i 5 (concatD [prt 6 exp0 , doc (showString ">=") , prt 6 exp1]) - EAdd exp0 exp1 -> prPrec _i 6 (concatD [prt 6 exp0 , doc (showString "+") , prt 7 exp1]) - ESub exp0 exp1 -> prPrec _i 6 (concatD [prt 6 exp0 , doc (showString "-") , prt 7 exp1]) - EMul exp0 exp1 -> prPrec _i 7 (concatD [prt 7 exp0 , doc (showString "*") , prt 8 exp1]) - EDiv exp0 exp1 -> prPrec _i 7 (concatD [prt 7 exp0 , doc (showString "/") , prt 8 exp1]) - EMod exp0 exp1 -> prPrec _i 7 (concatD [prt 7 exp0 , doc (showString "%") , prt 8 exp1]) - ENeg exp -> prPrec _i 8 (concatD [doc (showString "-") , prt 8 exp]) - EApp exp0 exp1 -> prPrec _i 9 (concatD [prt 9 exp0 , prt 10 exp1]) - EProj exp i -> prPrec _i 10 (concatD [prt 10 exp , doc (showString ".") , prt 0 i]) - ERecType fieldtypes -> prPrec _i 11 (concatD [doc (showString "sig") , doc (showString "{") , prt 0 fieldtypes , doc (showString "}")]) - ERec fieldvalues -> prPrec _i 11 (concatD [doc (showString "rec") , doc (showString "{") , prt 0 fieldvalues , doc (showString "}")]) - EVar i -> prPrec _i 11 (concatD [prt 0 i]) - EType -> prPrec _i 11 (concatD [doc (showString "Type")]) - EStr str -> prPrec _i 11 (concatD [prt 0 str]) - EInt n -> prPrec _i 11 (concatD [prt 0 n]) - EMeta -> prPrec _i 11 (concatD [doc (showString "?")]) + EBind exp0 exp1 -> prPrec _i 3 (concatD [prt 3 exp0 , doc (showString ">>=") , prt 4 exp1]) + EBindC exp0 exp1 -> prPrec _i 3 (concatD [prt 3 exp0 , doc (showString ">>") , prt 4 exp1]) + EOr exp0 exp1 -> prPrec _i 4 (concatD [prt 5 exp0 , doc (showString "||") , prt 4 exp1]) + EAnd exp0 exp1 -> prPrec _i 5 (concatD [prt 6 exp0 , doc (showString "&&") , prt 5 exp1]) + EEq exp0 exp1 -> prPrec _i 6 (concatD [prt 7 exp0 , doc (showString "==") , prt 7 exp1]) + ENe exp0 exp1 -> prPrec _i 6 (concatD [prt 7 exp0 , doc (showString "/=") , prt 7 exp1]) + ELt exp0 exp1 -> prPrec _i 6 (concatD [prt 7 exp0 , doc (showString "<") , prt 7 exp1]) + ELe exp0 exp1 -> prPrec _i 6 (concatD [prt 7 exp0 , doc (showString "<=") , prt 7 exp1]) + EGt exp0 exp1 -> prPrec _i 6 (concatD [prt 7 exp0 , doc (showString ">") , prt 7 exp1]) + EGe exp0 exp1 -> prPrec _i 6 (concatD [prt 7 exp0 , doc (showString ">=") , prt 7 exp1]) + EListCons exp0 exp1 -> prPrec _i 7 (concatD [prt 8 exp0 , doc (showString "::") , prt 7 exp1]) + EAdd exp0 exp1 -> prPrec _i 8 (concatD [prt 8 exp0 , doc (showString "+") , prt 9 exp1]) + ESub exp0 exp1 -> prPrec _i 8 (concatD [prt 8 exp0 , doc (showString "-") , prt 9 exp1]) + EMul exp0 exp1 -> prPrec _i 9 (concatD [prt 9 exp0 , doc (showString "*") , prt 10 exp1]) + EDiv exp0 exp1 -> prPrec _i 9 (concatD [prt 9 exp0 , doc (showString "/") , prt 10 exp1]) + EMod exp0 exp1 -> prPrec _i 9 (concatD [prt 9 exp0 , doc (showString "%") , prt 10 exp1]) + ENeg exp -> prPrec _i 10 (concatD [doc (showString "-") , prt 10 exp]) + EApp exp0 exp1 -> prPrec _i 11 (concatD [prt 11 exp0 , prt 12 exp1]) + EProj exp i -> prPrec _i 12 (concatD [prt 12 exp , doc (showString ".") , prt 0 i]) + ERecType fieldtypes -> prPrec _i 13 (concatD [doc (showString "sig") , doc (showString "{") , prt 0 fieldtypes , doc (showString "}")]) + ERec fieldvalues -> prPrec _i 13 (concatD [doc (showString "rec") , doc (showString "{") , prt 0 fieldvalues , doc (showString "}")]) + EList exps -> prPrec _i 13 (concatD [doc (showString "[") , prt 0 exps , doc (showString "]")]) + EVar i -> prPrec _i 13 (concatD [prt 0 i]) + EType -> prPrec _i 13 (concatD [doc (showString "Type")]) + EStr str -> prPrec _i 13 (concatD [prt 0 str]) + EInt n -> prPrec _i 13 (concatD [prt 0 n]) + EMeta -> prPrec _i 13 (concatD [doc (showString "?")]) LetDef i exp0 exp1 -> prPrec _i 0 (concatD [prt 0 i , doc (showString ":") , prt 0 exp0 , doc (showString "=") , prt 0 exp1]) Case pattern exp -> prPrec _i 0 (concatD [prt 0 pattern , doc (showString "->") , prt 0 exp]) + BindVar varorwild exp -> prPrec _i 0 (concatD [prt 0 varorwild , doc (showString "<-") , prt 0 exp]) + BindNoVar exp -> prPrec _i 0 (concatD [prt 0 exp]) VVar i -> prPrec _i 0 (concatD [prt 0 i]) VWild -> prPrec _i 0 (concatD [doc (showString "_")]) FieldType i exp -> prPrec _i 0 (concatD [prt 0 i , doc (showString ":") , prt 0 exp]) @@ -167,6 +174,10 @@ instance Print [Case] where [] -> (concatD []) [x] -> (concatD [prt 0 x]) x:xs -> (concatD [prt 0 x , doc (showString ";") , prt 0 xs]) +instance Print [Bind] where + prt _ es = case es of + [] -> (concatD []) + x:xs -> (concatD [prt 0 x , doc (showString ";") , prt 0 xs]) instance Print [FieldType] where prt _ es = case es of [] -> (concatD []) @@ -177,3 +188,8 @@ instance Print [FieldValue] where [] -> (concatD []) [x] -> (concatD [prt 0 x]) x:xs -> (concatD [prt 0 x , doc (showString ";") , prt 0 xs]) +instance Print [Exp] where + prt _ es = case es of + [] -> (concatD []) + [x] -> (concatD [prt 0 x]) + x:xs -> (concatD [prt 0 x , doc (showString ",") , prt 0 xs]) diff --git a/src/Transfer/Syntax/Skel.hs b/src/Transfer/Syntax/Skel.hs index 2142cd59d..680ea1256 100644 --- a/src/Transfer/Syntax/Skel.hs +++ b/src/Transfer/Syntax/Skel.hs @@ -30,9 +30,12 @@ transTree t = case t of ELet letdefs exp -> failure t ECase exp cases -> failure t EIf exp0 exp1 exp2 -> failure t + EDo binds exp -> failure t EAbs varorwild exp -> failure t EPi varorwild exp0 exp1 -> failure t EPiNoVar exp0 exp1 -> failure t + EBind exp0 exp1 -> failure t + EBindC exp0 exp1 -> failure t EOr exp0 exp1 -> failure t EAnd exp0 exp1 -> failure t EEq exp0 exp1 -> failure t @@ -41,6 +44,7 @@ transTree t = case t of ELe exp0 exp1 -> failure t EGt exp0 exp1 -> failure t EGe exp0 exp1 -> failure t + EListCons exp0 exp1 -> failure t EAdd exp0 exp1 -> failure t ESub exp0 exp1 -> failure t EMul exp0 exp1 -> failure t @@ -51,6 +55,7 @@ transTree t = case t of EProj exp i -> failure t ERecType fieldtypes -> failure t ERec fieldvalues -> failure t + EList exps -> failure t EVar i -> failure t EType -> failure t EStr str -> failure t @@ -58,6 +63,8 @@ transTree t = case t of EMeta -> failure t LetDef i exp0 exp1 -> failure t Case pattern exp -> failure t + BindVar varorwild exp -> failure t + BindNoVar exp -> failure t VVar i -> failure t VWild -> failure t FieldType i exp -> failure t @@ -103,9 +110,12 @@ transExp t = case t of ELet letdefs exp -> failure t ECase exp cases -> failure t EIf exp0 exp1 exp2 -> failure t + EDo binds exp -> failure t EAbs varorwild exp -> failure t EPi varorwild exp0 exp1 -> failure t EPiNoVar exp0 exp1 -> failure t + EBind exp0 exp1 -> failure t + EBindC exp0 exp1 -> failure t EOr exp0 exp1 -> failure t EAnd exp0 exp1 -> failure t EEq exp0 exp1 -> failure t @@ -114,6 +124,7 @@ transExp t = case t of ELe exp0 exp1 -> failure t EGt exp0 exp1 -> failure t EGe exp0 exp1 -> failure t + EListCons exp0 exp1 -> failure t EAdd exp0 exp1 -> failure t ESub exp0 exp1 -> failure t EMul exp0 exp1 -> failure t @@ -124,6 +135,7 @@ transExp t = case t of EProj exp i -> failure t ERecType fieldtypes -> failure t ERec fieldvalues -> failure t + EList exps -> failure t EVar i -> failure t EType -> failure t EStr str -> failure t @@ -138,6 +150,11 @@ transCase :: Case -> Result transCase t = case t of Case pattern exp -> failure t +transBind :: Bind -> Result +transBind t = case t of + BindVar varorwild exp -> failure t + BindNoVar exp -> failure t + transVarOrWild :: VarOrWild -> Result transVarOrWild t = case t of VVar i -> failure t diff --git a/src/Transfer/Syntax/Syntax.cf b/src/Transfer/Syntax/Syntax.cf index 1d7083eb3..b64edb438 100644 --- a/src/Transfer/Syntax/Syntax.cf +++ b/src/Transfer/Syntax/Syntax.cf @@ -1,6 +1,6 @@ entrypoints Module, Exp ; -layout "let", "where", "of","rec", "sig" ; +layout "let", "where", "of","rec", "sig", "do" ; layout stop "in" ; layout toplevel ; @@ -56,53 +56,62 @@ separator Case ";" ; EIf. Exp ::= "if" Exp "then" Exp "else" Exp ; +EDo. Exp ::= "do" "{" [Bind] Exp "}" ; +BindVar. Bind ::= VarOrWild "<-" Exp ; +BindNoVar. Bind ::= Exp ; +terminator Bind ";" ; + EAbs. Exp2 ::= "\\" VarOrWild "->" Exp ; EPi. Exp2 ::= "(" VarOrWild ":" Exp ")" "->" Exp ; EPiNoVar. Exp2 ::= Exp3 "->" Exp ; VVar. VarOrWild ::= Ident ; VWild. VarOrWild ::= "_" ; -EOr. Exp3 ::= Exp4 "||" Exp3 ; -EAnd. Exp4 ::= Exp5 "&&" Exp4 ; +EBind. Exp3 ::= Exp3 ">>=" Exp4 ; +EBindC. Exp3 ::= Exp3 ">>" Exp4 ; -EEq. Exp5 ::= Exp6 "==" Exp6 ; -ENe. Exp5 ::= Exp6 "/=" Exp6 ; -ELt. Exp5 ::= Exp6 "<" Exp6 ; -ELe. Exp5 ::= Exp6 "<=" Exp6 ; -EGt. Exp5 ::= Exp6 ">" Exp6 ; -EGe. Exp5 ::= Exp6 ">=" Exp6 ; +EOr. Exp4 ::= Exp5 "||" Exp4 ; -EAdd. Exp6 ::= Exp6 "+" Exp7 ; -ESub. Exp6 ::= Exp6 "-" Exp7 ; +EAnd. Exp5 ::= Exp6 "&&" Exp5 ; -EMul. Exp7 ::= Exp7 "*" Exp8 ; -EDiv. Exp7 ::= Exp7 "/" Exp8 ; -EMod. Exp7 ::= Exp7 "%" Exp8 ; +EEq. Exp6 ::= Exp7 "==" Exp7 ; +ENe. Exp6 ::= Exp7 "/=" Exp7 ; +ELt. Exp6 ::= Exp7 "<" Exp7 ; +ELe. Exp6 ::= Exp7 "<=" Exp7 ; +EGt. Exp6 ::= Exp7 ">" Exp7 ; +EGe. Exp6 ::= Exp7 ">=" Exp7 ; -ENeg. Exp8 ::= "-" Exp8 ; +EListCons. Exp7 ::= Exp8 "::" Exp7 ; -EApp. Exp9 ::= Exp9 Exp10 ; +EAdd. Exp8 ::= Exp8 "+" Exp9 ; +ESub. Exp8 ::= Exp8 "-" Exp9 ; -EProj. Exp10 ::= Exp10 "." Ident ; +EMul. Exp9 ::= Exp9 "*" Exp10 ; +EDiv. Exp9 ::= Exp9 "/" Exp10 ; +EMod. Exp9 ::= Exp9 "%" Exp10 ; -ERecType. Exp11 ::= "sig" "{" [FieldType] "}" ; +ENeg. Exp10 ::= "-" Exp10 ; + +EApp. Exp11 ::= Exp11 Exp12 ; + +EProj. Exp12 ::= Exp12 "." Ident ; + +ERecType. Exp13 ::= "sig" "{" [FieldType] "}" ; FieldType. FieldType ::= Ident ":" Exp ; separator FieldType ";" ; -ERec. Exp11 ::= "rec" "{" [FieldValue] "}" ; +ERec. Exp13 ::= "rec" "{" [FieldValue] "}" ; FieldValue.FieldValue ::= Ident "=" Exp ; separator FieldValue ";" ; -EVar. Exp11 ::= Ident ; -EType. Exp11 ::= "Type" ; -EStr. Exp11 ::= String ; -EInt. Exp11 ::= Integer ; -EMeta. Exp11 ::= "?" ; - -coercions Exp 11 ; - - - +EList. Exp13 ::= "[" [Exp] "]" ; +EVar. Exp13 ::= Ident ; +EType. Exp13 ::= "Type" ; +EStr. Exp13 ::= String ; +EInt. Exp13 ::= Integer ; +EMeta. Exp13 ::= "?" ; +coercions Exp 13 ; +separator Exp "," ; diff --git a/src/Transfer/SyntaxToCore.hs b/src/Transfer/SyntaxToCore.hs index a2dcde8a2..f3e7f828d 100644 --- a/src/Transfer/SyntaxToCore.hs +++ b/src/Transfer/SyntaxToCore.hs @@ -352,22 +352,28 @@ desugar = return . map f where f :: Tree a -> Tree a f x = case x of - EIf exp0 exp1 exp2 -> ifBool <| exp0 <| exp1 <| exp2 - EPiNoVar exp0 exp1 -> EPi VWild <| exp0 <| exp1 - EOr exp0 exp1 -> andBool <| exp0 <| exp1 - EAnd exp0 exp1 -> orBool <| exp0 <| exp1 + EIf exp0 exp1 exp2 -> ifBool <| exp0 <| exp1 <| exp2 + EDo bs e -> mkDo (map f bs) (f e) + BindNoVar exp0 -> BindVar VWild <| exp0 + EPiNoVar exp0 exp1 -> EPi VWild <| exp0 <| exp1 + EBind exp0 exp1 -> appBind <| exp0 <| exp1 + EBindC exp0 exp1 -> appBindC <| exp0 <| exp1 + EOr exp0 exp1 -> andBool <| exp0 <| exp1 + EAnd exp0 exp1 -> orBool <| exp0 <| exp1 EEq exp0 exp1 -> overlBin "eq" <| exp0 <| exp1 ENe exp0 exp1 -> overlBin "ne" <| exp0 <| exp1 ELt exp0 exp1 -> overlBin "lt" <| exp0 <| exp1 ELe exp0 exp1 -> overlBin "le" <| exp0 <| exp1 EGt exp0 exp1 -> overlBin "gt" <| exp0 <| exp1 EGe exp0 exp1 -> overlBin "ge" <| exp0 <| exp1 + EListCons exp0 exp1 -> appCons <| exp0 <| exp1 EAdd exp0 exp1 -> overlBin "plus" <| exp0 <| exp1 ESub exp0 exp1 -> overlBin "minus" <| exp0 <| exp1 EMul exp0 exp1 -> overlBin "times" <| exp0 <| exp1 EDiv exp0 exp1 -> overlBin "div" <| exp0 <| exp1 EMod exp0 exp1 -> overlBin "mod" <| exp0 <| exp1 ENeg exp0 -> overlUn "neg" <| exp0 + EList exps -> mkList (map f exps) _ -> composOp f x where g <| x = g (f x) @@ -382,14 +388,28 @@ overlBin :: String -> Exp -> Exp -> Exp overlBin f e1 e2 = apply (EVar (Ident f)) [EMeta,EVar (Ident "num_Integer"),e1,e2] -- FIXME: hack, should be ? -- --- * Integers +-- * Monad -- -appIntUn :: String -> Exp -> Exp -appIntUn f e = EApp (var ("prim_"++f++"_Int")) e +mkDo :: [Bind] -> Exp -> Exp +mkDo bs e = foldr (\ (BindVar v r) x -> appBind r (EAbs v x)) e bs + +appBind :: Exp -> Exp -> Exp +appBind e1 e2 = apply (EVar (Ident "bind")) [EMeta,EMeta,EMeta,EMeta,e1,e2] + +appBindC :: Exp -> Exp -> Exp +appBindC e1 e2 = appBind e1 (EAbs VWild e2) + +-- +-- * List +-- + +mkList :: [Exp] -> Exp +mkList = foldr appCons (EApp (EVar (Ident "Nil")) EMeta) + +appCons :: Exp -> Exp -> Exp +appCons e1 e2 = apply (EVar (Ident "Cons")) [EMeta,e1,e2] -appIntBin :: String -> Exp -> Exp -> Exp -appIntBin f e1 e2 = EApp (EApp (var ("prim_"++f++"_Int")) e1) e2 -- -- * Booleans diff --git a/transfer/examples/test.tr b/transfer/examples/test.tr index 8d03f2f66..de1ee75c0 100644 --- a/transfer/examples/test.tr +++ b/transfer/examples/test.tr @@ -1 +1,3 @@ -main = ? \ No newline at end of file +import prelude + +main = x :: y :: z :: [] \ No newline at end of file diff --git a/transfer/lib/list.tr b/transfer/lib/list.tr deleted file mode 100644 index da3bcc516..000000000 --- a/transfer/lib/list.tr +++ /dev/null @@ -1,31 +0,0 @@ -import prelude -import nat - -data List : (_:Type) -> Type where - Nil : (A:Type) -> List A - Cons : (A:Type) -> A -> List A -> List A - -size : (A:Type) -> List A -> Nat -size _ (Nil _) = Zero -size A (Cons _ x xs) = Succ (size A xs) - -map : (A:Type) -> (B:Type) -> (A -> B) -> List A -> List B -map _ B _ (Nil _) = Nil B -map A B f (Cons _ x xs) = Cons B (f x) (map A B f xs) - -append : (A:Type) -> (xs:List A) -> List A -> List A -append A xs ys = foldr A (List A) (Cons A) ys xs - -concat : (A : Type) -> List (List A) -> List A -concat A = foldr (List A) (List A) (append A) (Nil A) - -foldr : (A : Type) -> (B : Type) -> (A -> B -> B) -> B -> List A -> B -foldr _ _ _ x (Nil _) = x -foldr A B f x (Cons _ y ys) = f y (foldr A B f x ys) - --- Instances: - -monad_List : Monad List -monad_list = rec return = \A -> \x -> Cons A x (Nil A) - bind = \A -> \B -> \m -> \k -> concat B (map A B k m) - diff --git a/transfer/lib/maybe.tr b/transfer/lib/maybe.tr deleted file mode 100644 index 2b7beee9a..000000000 --- a/transfer/lib/maybe.tr +++ /dev/null @@ -1,24 +0,0 @@ -import prelude - -data Maybe : Type -> Type where - Nothing : (A : Type) -> Maybe A - Just : (A : Type) -> A -> Maybe A - -fromMaybe : (A : Type) -> A -> Maybe A -> A -fromMaybe _ x Nothing = x -fromMaybe _ _ (Just x) = x - -maybe : (A : Type) -> (B : Type) -> B -> (A -> B) -> Maybe A -> A -maybe _ _ x _ Nothing = x -maybe _ _ _ f (Just x) = f x - --- Instances: - -monad_Maybe : Monad Maybe -monad_Maybe = - rec return = Just - bind = \A -> \B -> \m -> \k -> - case m of - Nothing _ -> Nothing B - Just _ x -> k x - diff --git a/transfer/lib/prelude.tr b/transfer/lib/prelude.tr index fb5f724dd..7034fbae7 100644 --- a/transfer/lib/prelude.tr +++ b/transfer/lib/prelude.tr @@ -15,7 +15,7 @@ id _ x = x -- --- The Bool type +-- The List type -- data Bool : Type where @@ -26,6 +26,46 @@ not : Bool -> Bool not b = if b then False else True +data List : (_:Type) -> Type where + Nil : (A:Type) -> List A + Cons : (A:Type) -> A -> List A -> List A + +size : (A:Type) -> List A -> Nat +size _ (Nil _) = Zero +size A (Cons _ x xs) = Succ (size A xs) + +map : (A:Type) -> (B:Type) -> (A -> B) -> List A -> List B +map _ B _ (Nil _) = Nil B +map A B f (Cons _ x xs) = Cons B (f x) (map A B f xs) + +append : (A:Type) -> (xs:List A) -> List A -> List A +append A xs ys = foldr A (List A) (Cons A) ys xs + +concat : (A : Type) -> List (List A) -> List A +concat A = foldr (List A) (List A) (append A) (Nil A) + +foldr : (A : Type) -> (B : Type) -> (A -> B -> B) -> B -> List A -> B +foldr _ _ _ x (Nil _) = x +foldr A B f x (Cons _ y ys) = f y (foldr A B f x ys) + + +-- +-- The Maybe type +-- + +data Maybe : Type -> Type where + Nothing : (A : Type) -> Maybe A + Just : (A : Type) -> A -> Maybe A + +fromMaybe : (A : Type) -> A -> Maybe A -> A +fromMaybe _ x Nothing = x +fromMaybe _ _ (Just x) = x + +maybe : (A : Type) -> (B : Type) -> B -> (A -> B) -> Maybe A -> A +maybe _ _ x _ Nothing = x +maybe _ _ _ f (Just x) = f x + + -- -- The Num class -- @@ -327,3 +367,24 @@ return _ d = d.return bind : (M : Type -> Type) -> Monad M -> (A : Type) -> (B : Type) -> M A -> (A -> M B) -> M B bind _ d = d.bind + +-- Operators: + +{- + (x >>= y) => bind ? ? ? ? x y + (x >> y) => bind ? ? ? ? x (\_ -> y) +-} + +-- Instances: + +monad_List : Monad List +monad_list = rec return = \A -> \x -> Cons A x (Nil A) + bind = \A -> \B -> \m -> \k -> concat B (map A B k m) + +monad_Maybe : Monad Maybe +monad_Maybe = + rec return = Just + bind = \A -> \B -> \m -> \k -> + case m of + Nothing _ -> Nothing B + Just _ x -> k x