packages feed

idris (empty) → 0.1.3

raw patch · 34 files changed

+14306/−0 lines, 34 filesdep +arraydep +basedep +binarysetup-changed

Dependencies added: array, base, binary, containers, directory, epic, haskell98, ivor, mtl, old-locale, old-time, parsec, readline

Files

+ Idris/AbsSyntax.lhs view
@@ -0,0 +1,1130 @@+> {-# OPTIONS_GHC -fglasgow-exts #-}++> module Idris.AbsSyntax(module Idris.AbsSyntax, +>                        module Idris.Context) where++> import Control.Monad+> import Control.Monad.State+> import qualified Data.Map as Map+> import Debug.Trace+> import Data.Typeable+> import Data.Maybe+> import Data.List+> import Char++> import Ivor.TT+> import Ivor.Primitives++> import Idris.Context++> data Result r = Success r+>               | Failure String String Int+>     deriving (Show, Eq)+> +> instance Monad Result where+>     (Success r)   >>= k = k r+>     (Failure err fn line) >>= k = Failure err fn line+>     return              = Success+>     fail s              = Failure s "(no file)" 0+> +> instance MonadPlus Result where+>     mzero = Failure "Error" "(no file)" 0+>     mplus (Success x) _ = (Success x)+>     mplus (Failure _ _ _) y = y+> ++A program is a collection of datatype and function definitions.+We store everything directly as a 'ViewTerm' from Ivor.++> data Decl = DataDecl Datatype | Fwd Id RawTerm [CGFlag]+>           | PInclude FilePath+>           | Fun Function [CGFlag] | TermDef Id RawTerm [CGFlag] | Constructor+>           | Prf Proof+>           | LatexDefs [(Id,String)]+>           | Using [(Id, RawTerm)] [Decl] -- default implicit args+>           | Params [(Id, RawTerm)] [Decl] -- default implicit args+>           | DoUsing Id Id [Decl] -- bind and return names+>           | Idiom Id Id [Decl] -- pure and ap names+>           | CLib String | CInclude String+>           | Fixity String Fixity Int+>           | Transform RawTerm RawTerm+>           | Freeze Id+>    deriving Show++Flags for controlling compilation. In particular, some functions exist only+run compile-time function generation, so we never want to generate code+(e.g. generating foreign functiond defs).+Also, some functions should be evaluated completely before code generation+(e.g. for statically knowing the C function to compile)+Functions may be exported to C, if they have a simple type (no polymorphism, no dependencies).++> data CGFlag = NoCG | CGEval | CExport String | Inline | CGSpec [(Id, Int)]+>    deriving (Show, Eq)++User defined operators have associativity and precedence++> data Fixity = LeftAssoc | RightAssoc | NonAssoc+>    deriving (Show, Eq, Enum)++> type Fixities = [(String, (Fixity, Int))]++> data UserOps = UO { fixityDecls :: Fixities,+>                     transforms :: [(ViewTerm, ViewTerm)],+>                     frozen :: [Id] }+>              deriving Show++Function types and clauses are given separately, so we'll parse them+separately then collect them together into a list of Decls++A FunClauseP is a clause which is probably the wrong type, but instructs+the system to insert a hole for a proof that turns it into the right type.++> data ParseDecl = RealDecl Decl+>                | FunType Id RawTerm [CGFlag] String Int +>                | FunClause RawTerm [RawTerm] RawTerm [CGFlag]+>                | FunClauseP RawTerm [RawTerm] RawTerm Id+>                | WithClause RawTerm [RawTerm] Bool RawTerm [ParseDecl]+>                | ProofScript Id [ITactic]+>                | PUsing [(Id,RawTerm)] [ParseDecl]+>                | PParams [(Id, RawTerm)] [ParseDecl]+>                | PDoUsing (Id, Id) [ParseDecl]+>                | PIdiom (Id, Id) [ParseDecl]+>                | PSyntax Id [Id] RawTerm +>    deriving Show++> collectDecls :: [ParseDecl] -> Result [Decl]+> collectDecls pds = cds [] [] pds+>   where cds rds fwds ((RealDecl d):ds) = cds (d:rds) fwds ds+>         cds rds fwds ((FunType n t fl file line):ds) +>             = getClauses RPlaceholder rds fwds n (t, file, line) fl [] ds+>         cds rds fwds ((FunClause (RVar f l n) [] ret fl):ds) +>                 = cds ((TermDef n ret fl):rds) fwds ds+>         cds rds fwds ds@((FunClause app [] ret fl):_) +>             = case getFnName app of+>                 Just (n, file, line) -> +>                    case (lookup n fwds) of+>                      Nothing -> fail $ "No type declaration for " ++ show n+>                      Just (ty,fl) -> getClauses app rds fwds n (ty, file, line) fl [] ds+>                 _ -> fail $ "Invalid pattern clause"+>         cds rds fwds ((ProofScript n prf):ds)+>             = case lookup n fwds of+>                      Nothing ->+>                          cds ((Prf (Proof n Nothing prf)):rds) fwds ds+>                      Just (ty, fl) -> +>                          cds ((Prf (Proof n (Just ty) prf)):rds) fwds ds+>         cds rds fwds ((PUsing uses pds):ds) = +>                case (cds [] [] pds) of+>                   Success d ->+>                       cds ((Using uses d):rds) fwds ds+>                   failure -> failure+>         cds rds fwds ((PParams params pds):ds) = +>                case (cds [] [] pds) of+>                   Success d ->+>                       cds ((Params params d):rds) fwds ds+>                   failure -> failure+>         cds rds fwds ((PDoUsing (ub,ur) pds):ds) = +>                case (cds [] [] pds) of+>                   Success d ->+>                       cds ((DoUsing ub ur d):rds) fwds ds+>                   failure -> failure+>         cds rds fwds ((PIdiom (up,ua) pds):ds) = +>                case (cds [] [] pds) of+>                   Success d ->+>                       cds ((Idiom up ua d):rds) fwds ds+>                   failure -> failure+>         cds rds fwds ((PSyntax name args to):ds) = cds rds fwds ds -- TODO+>         cds rds fwds (d:ds) = fail $ "Invalid declaration: " ++ show d+>         cds rds fwds [] = return (reverse rds)+++>         getClauses parent rds fwds n t fl clauses ((FunClause RPlaceholder [with] ret fl'):ds)+>             = getClauses parent rds fwds n t fl clauses ((FunClause parent [with] ret fl'):ds)+>         getClauses parent rds fwds n t fl clauses ((FunClause pat withs ret fl'):ds)+>             | Just (f,l) <- isnm n (getFn pat)+>                = getClauses parent rds fwds n t fl ((n, RawClause (mkApp f l pat withs) ret):clauses) ds+>         getClauses parent rds fwds n t fl clauses ((FunClauseP RPlaceholder [with] ret mv):ds)+>             = getClauses parent rds fwds n t fl clauses ((FunClauseP parent [with] ret mv):ds)+>         getClauses parent rds fwds n t fl clauses ((FunClauseP pat withs ret mv):ds)+>             | Just (f,l) <- isnm n (getFn pat)+>                 = getClauses parent rds fwds n t fl +>                       ((n, RawClause (mkApp f l pat withs) (mkhret mv ret)):clauses) ds+>         getClauses parent rds fwds n t fl clauses ((WithClause RPlaceholder [with] prf ret fl'):ds)+>             = getClauses parent rds fwds n t fl clauses ((WithClause parent [with] prf ret fl'):ds)+>         getClauses parent rds fwds n t fl clauses ((WithClause pat withs prf scr defs):ds)+>             | Just (f,l) <- isnm n (getFn pat)+>                 = do wcl <- collectWiths (mkApp f l pat withs) rds fwds n t fl defs+>                      getClauses parent rds fwds n t fl +>                          ((n, RawWithClause (mkApp f l pat withs) prf scr wcl):clauses) ds+>         getClauses parent rds fwds n (t, _, _) fl [] ds +>                = cds ((Fwd n t fl):rds) ((n,(t,fl)):fwds) ds+>         getClauses parent rds fwds n (t,file,line) fl clauses ds =+>             cds ((Fun (Function n t (reverse clauses) file line) fl):rds) fwds ds++>         isnm n (RVar f l nm) | nm == n = Just (f,l)+>         isnm _ _ = Nothing++>         collectWiths parent rds fwds n t fl cs = +>              do cls <- getClauses parent [] [] n t fl [] cs+>                 case cls of+>                     [Fun (Function _ _ cl _ _) _] -> return (map snd cl)+>                     _ -> fail $ "Invalid with clause for " ++ show n++         collectWiths rds fwds n t fl ((FunClause pat ex rhs []):cs) =+             | (RVar n) == getFn pat+                 = RawClause (mkApp pat withs)++>         mkhret mv v = RBind (UN "value") (RLet v RPlaceholder) +>                             (RMetavar mv)++> data Datatype = Datatype {+>                           tyId :: Id,+>                           tyType :: RawTerm,+>                           tyConstructors :: [(Id, RawTerm)],+>                           tyImplicits :: [(Id, RawTerm)],+>                           tyOpts :: [TyOpt],+>                           tyFile :: String,+>                           tyLine :: Int+>                          }+>               | Latatype { tyId :: Id,+>                            tyType :: RawTerm,+>                            tyFile :: String,+>                            tyLine :: Int +>                          } -- forward declaration+>   deriving Show++> data TyOpt = NoElim | Collapsible+>   deriving (Show, Eq, Enum)++> tyHasElim dt = not (elem NoElim (tyOpts dt))+> collapsible dt = elem Collapsible (tyOpts dt)++> data Function = Function {+>                           funId :: Id,+>                           funType :: RawTerm,+>                           funClauses :: [(Id, RawClause)],+>                           funFile :: String,+>                           funLine :: Int+>                          }+>   deriving Show++> data Proof = Proof {+>                     proofId :: Id,+>                     proofType :: Maybe RawTerm,+>                     proofScript :: [ITactic]+>                    }+>   deriving Show++> getId :: Decl -> Id+> getId (Fun f _) = funId f+> getId (DataDecl d) = tyId d+> getId (TermDef n tm _) = n++Raw terms, as written by the programmer with no implicit arguments added.++> data RawTerm = RVar String Int Id+>              | RExpVar String Int Id -- variable with all explicit args+>              | RApp String Int RawTerm RawTerm+>              | RAppImp String Int Id RawTerm RawTerm -- Name the argument we make explicit+>              | RBind Id RBinder RawTerm+>              | RConst String Int Constant+>              | RPlaceholder+>              | RMetavar Id+>              | RInfix String Int Op RawTerm RawTerm+>              | RUserInfix String Int Bool String RawTerm RawTerm+>              | RDo [Do]+>              | RReturn String Int+>              | RIdiom RawTerm+>              | RPure RawTerm -- a term to apply normally inside idiom brackets+>              | RRefl+>              | RError String -- Hackety. Found an error in processing, report when you can.+>    deriving (Show, Eq)++> data RBinder = Pi Plicit Laziness RawTerm+>              | Lam RawTerm+>              | RLet RawTerm RawTerm+>    deriving (Show, Eq)++> data Plicit = Im | Ex+>    deriving (Show, Eq, Enum)++> data Laziness = Lazy | Eager+>    deriving (Show, Eq, Enum)++> data Do = DoBinding String Int Id RawTerm RawTerm+>         | DoLet String Int Id RawTerm RawTerm+>         | DoExp String Int RawTerm+>     deriving (Show, Eq)++> data ITactic = Intro [Id]+>              | Refine Id+>              | Generalise RawTerm+>              | ReflP+>              | Induction RawTerm+>              | Fill RawTerm+>              | Trivial+>              | Case RawTerm+>              | Rewrite Bool Bool RawTerm+>              | Unfold Id+>              | Compute+>              | Equiv RawTerm+>              | Believe RawTerm+>              | Use RawTerm+>              | Decide RawTerm+>              | Undo+>              | Abandon+>              | RunTactic RawTerm -- tactic computed from lib/tactics.idr+>              | Qed+>     deriving (Show, Eq)++> getLazy :: RawTerm -> [Int]+> getLazy tm = gl' 0 tm+>   where gl' i (RBind n (Pi _ Lazy _) sc) = i:(gl' (i+1) sc)+>         gl' i (RBind n (Pi Ex Eager _) sc) = gl' (i+1) sc+>         gl' i (RBind n (Pi Im Eager _) sc) = gl' i sc+>         gl' i x = []++> mkLazy :: ViewTerm -> ViewTerm+> mkLazy t = App (App (Name Unknown (name "__lazy")) Placeholder) t++> getFileLine :: RawTerm -> (String, Int)+> getFileLine (RApp f l _ _) = (f, l)+> getFileLine (RAppImp f l _ _ _) = (f, l)+> getFileLine (RVar f l _) = (f, l)+> getFileLine (RExpVar f l _) = (f, l)+> getFileLine (RInfix f l _ _ _) = (f, l)+> getFileLine (RUserInfix f l _ _ _ _) = (f, l)+> getFileLine (RConst f l _) = (f, l)+> getFileLine (RBind _ (Pi _ _ ty) _) = getFileLine ty+> getFileLine (RBind _ (Lam ty) _) = getFileLine ty+> getFileLine _ = ("(unknown)", 0)++> getFn :: RawTerm -> RawTerm+> getFn (RApp _ _ f a) = getFn f+> getFn (RAppImp _ _ _ f a) = getFn f+> getFn f = f++> getArgTypes :: RawTerm -> [(Id,RawTerm)]+> getArgTypes tm = gat tm [] where+>     gat (RBind n (Pi _ _ ty) sc) acc = gat sc ((n,ty):acc)+>     gat sc acc = reverse acc++> getRetType :: RawTerm -> RawTerm+> getRetType (RBind n (Pi _ _ ty) sc) = getRetType sc+> getRetType x = x++> getFnName f = case getFn f of+>                 (RVar f l n) -> Just (n,f,l)+>                 _ -> Nothing++> getRawArgs :: RawTerm -> [RawTerm]+> getRawArgs x = args [] x+>    where args acc (RApp _ _ f a) = args (a:acc) f+>          args acc (RAppImp _ _ _ f a) = args (a:acc) f+>          args acc f = acc++> getExplicitArgs :: RawTerm -> [RawTerm]+> getExplicitArgs x = args [] x+>    where args acc (RApp _ _ f a) = args (a:acc) f+>          args acc (RAppImp _ _ _ f a) = args acc f+>          args [] (RInfix _ _ _ x y) = [x,y]+>          args [] (RUserInfix _ _ _ _ x y) = [x,y]+>          args acc f = acc++Binders; Pi (either implicit or explicitly written), Lambda and Let with+value.++> data Constant = Num Int+>               | Str String+>               | Bo Bool+>               | Ch Char+>               | Fl Double+>               | TYPE+>               | StringType+>               | IntType+>               | FloatType+>               | CharType+>               | PtrType+>               | Builtin String -- builtin type, eg Handle or Lock+>    deriving (Eq, Ord)++> instance ViewConst Char where+>     typeof x = (name "Char")++> instance Show Constant where+>     show (Num i) = show i+>     show (Str s) = show s+>     show (Bo b) = show b+>     show (Ch c) = show c+>     show (Fl d) = show d+>     show TYPE = "#"+>     show IntType = "Int"+>     show FloatType = "Float"+>     show CharType = "Char"+>     show StringType = "String"+>     show PtrType = "Ptr"+>     show (Builtin s) = s++Operators, more precisely, are built-in functions on primitive types which both the +typechecker and compiler need to know how to run. First we have the usual set of infix +operators (plus John Major equality):++> data Op = Plus | Minus | Times | Divide | Concat | JMEq+>         | OpEq | OpLT | OpLEq | OpGT | OpGEq | OpOr | OpAnd++Then built-in functions for coercing between types++>         | ToString | ToInt+>         | IntToChar | CharToInt++Finally some primitive operations on primitive types.++>         | StringLength | StringGetIndex | StringSubstr+>         | StringHead | StringTail | StringCons+>    deriving (Eq, Enum)++> allOps = [Plus,Minus,Times,Divide,Concat,JMEq,OpEq,OpLT,OpLEq,OpGT,OpGEq]++> instance Show Op where+>     show Plus = "+"+>     show Minus = "-"+>     show Times = "*"+>     show Divide = "/"+>     show Concat = "++"+>     show JMEq = "="+>     show OpEq = "=="+>     show OpLT = "<"+>     show OpLEq = "<="+>     show OpGT = ">"+>     show OpGEq = ">="+>     show OpOr = "||"+>     show OpAnd = "&&"++> opFn Plus = (name "__addInt")+> opFn Minus = (name "__subInt")+> opFn Times = (name "__mulInt")+> opFn Divide = (name "__divInt")+> opFn Concat = (name "__concat")+> opFn JMEq = (name "Eq")+> opFn OpEq = (name "__eq")+> opFn OpLT = (name "__intlt")+> opFn OpLEq = (name "__intleq")+> opFn OpGT = (name "__intgt")+> opFn OpGEq = (name "__intgeq")+> opFn OpOr = (name "__or")+> opFn OpAnd = (name "__and")++> opFn ToInt = (name "__toInt")+> opFn ToString = (name "__toString")+> opFn CharToInt = (name "__charToInt")+> opFn IntToChar = (name "__intToChar")++> opFn StringLength = (name "__strlen")+> opFn StringGetIndex = (name "__strgetIdx")+> opFn StringSubstr = (name "__substr")+> opFn StringHead = (name "__strHead")+> opFn StringTail = (name "__strTail")+> opFn StringCons = (name "__strCons")++> useropFn fn = UN $ "__op_" ++ concat (map opC fn) where+>     opC c = "_" ++ show (fromEnum c)++Pattern clauses++> data RawClause = RawClause { lhs :: RawTerm,+>                              rhs :: RawTerm }+>                | RawWithClause { lhs :: RawTerm,+>                                  addproof :: Bool,+>                                  scrutinee :: RawTerm,+>                                  defn :: [RawClause] }+>    deriving Show++> mkApp :: String -> Int -> RawTerm -> [RawTerm] -> RawTerm+> mkApp file line f [] = f+> mkApp file line f (a:as) = mkApp file line (RApp file line f a) as++For each raw definition, we'll translate it into something Ivor will understand+with all the placeholders added. For this we'll need to know how many+implicit arguments each function has.++> data IvorFun = IvorFun {+>       ivorFName :: Maybe Name,+>       ivorFType :: (Maybe ViewTerm),+>       implicitArgs :: Int,+>       -- paramArgs :: Int,+>       ivorDef :: Maybe IvorDef,+>       rawDecl :: Decl, -- handy to keep around for display + extra data+>       funFlags :: [CGFlag],+>       lazyArgs :: [Int]+>     }+>              | IvorProblem String+>    deriving Show++Get all the pattern definitions. Get the user specified one, not the+Ivor expanded one (i.e. with the placeholders as the user specified) so+that we avoid pattern matching where the programmer didn't ask us to.++> getRawPatternDefs :: Ctxt IvorFun -> Context ->+>                      [(Name, (ViewTerm, Patterns))]+> getRawPatternDefs raw ctxt = gdefs (ctxtAlist raw) where+>     gdefs [] = []+>     gdefs ((n, IvorFun _ _ _ _ (decl@(LatexDefs _)) _ _):ds) = gdefs ds+>     gdefs ((n, IvorFun _ _ _ _ (decl@(Fixity _ _ _)) _ _):ds) = gdefs ds+>     gdefs ((n, IvorFun _ _ _ _ (decl@(Transform _ _)) _ _):ds) = gdefs ds+>     gdefs ((n, IvorFun _ _ _ _ (decl@(Freeze _)) _ _):ds) = gdefs ds+>     gdefs ((n, ifun):ds)+>        = let Just iname = ivorFName ifun in+>             case (ivorFType ifun, ivorDef ifun) of+>               (Just ty, Just (PattDef ps)) -> +>                   (iname, (ty,ps)):(gdefs ds)+>               _ -> case getPatternDef ctxt iname of+>                      Right (ty,ps) -> (iname, (ty,ps)):(gdefs ds)+>                      _ -> gdefs ds++Name definitions Ivor-side.++> data IvorDef = PattDef !Patterns -- pattern matching function+>              | ITyCon -- Type constructor+>              | IDataCon -- Data constructor+>              | SimpleDef !ViewTerm -- simple function definition+>              | DataDef !Inductive Bool -- data type definition, generate elim+>              | IProof [ITactic]+>              | Later -- forward declaration+>              | LataDef -- forward declared data+>    deriving Show++A transformation is a function converting a ViewTerm to a new form.++> data Transform = Trans String +>                        (Maybe (ViewTerm -> ViewTerm)) +>                        (Maybe TransData)++Concrete transformation data, used for rebuilding constructor transforms++> data TransData = Force (Maybe (Name, Name)) Int Name [Name] +>                        [(Name, ViewTerm)] Int+>                | Collapse Name Name ViewTerm Int+>                | Drop Name ViewTerm [Int] Int++> data Opt = NoErasure | ShowRunTime | NoSpec | Verbose+>    deriving (Show, Eq, Enum)++> data IdrisState = IState {+>       idris_context :: Ctxt IvorFun, -- function definitions+>       idris_decls :: [Decl], -- all checked declarations+>       idris_metavars :: [(Name, ViewTerm)], -- things still to prove+>       idris_options :: [Opt], -- global options+>       idris_fixities :: UserOps, -- infix operators and precedences+>       idris_transforms :: [Transform], -- optimisations+>       idris_imports :: [FilePath] -- included files+>     }++> initState :: [Opt] -> IdrisState+> initState opts = IState newCtxt [] [] opts (UO [] [] []) [] []++Add implicit arguments to a raw term representing a type for each undefined +name in the scope, returning the number of implicit arguments the resulting+type has.++We only want names which appear *in argument position*, e.g. P a we'd add a +but not P. [[We also don't want names which appear in the return type, since+they'll never be inferrable at the call site. (Not done this. Not convinced.) ]]++> addImpl :: Ctxt IvorFun -> RawTerm -> (RawTerm, Int) +> addImpl = addImpl' True [] [] Nothing++> addImplWith :: Implicit -> Ctxt IvorFun -> RawTerm -> (RawTerm, Int) +> addImplWith (Imp using params paramnames ns) = addImpl' True using params ns++Bool says whether to pi bind unknown names+Also take a mapping of names to types ('using') --- if any name we need to +bind is  in the list, use the given type. Also sort the resulting bindings +so that they are in the same order as in 'using', and appear after any+other introduced bindings.++'params' is the arguments that the current group of definitions is parameterised over.+These should be added as *explicit* arguments.++Need to do it twice, in case the first pass added names in the indices+(from using)++> addImpl' :: Bool -> [(Id, RawTerm)] -> [(Id, RawTerm)] -> Maybe Id -> Ctxt IvorFun -> +>             RawTerm -> (RawTerm, Int) +> addImpl' pi using params namespace ctxt raw' +>             = let raw = parambind params raw'+>                   (newargs, totimp) = execState (addImplB [] raw True) ([],0) in+>                   if pi then +>                      let added = pibind Im (mknew newargs) raw in+>                         if null using+>                           then (added, totimp)+>                           else let (added', totimp') = addImpl' True [] [] namespace ctxt added in+>                                (added', totimp')+>                      else (raw, totimp)+>     where addImplB :: [Id] -> RawTerm -> Bool -> State ([Id], Int) ()+>           addImplB env (RVar f l i) argpos+>               | i `elem` env = return ()+>               | Right _ <- ctxtLookup ctxt namespace i = return ()++Only do it in argument position++>               | argpos = do (nms, tot) <- get+>                             if (i `elem` nms) then return ()+>                                 else put (i:nms, tot+1)+>               | otherwise = return ()+>           addImplB env (RApp _ _ f a) argpos+>                    = do addImplB env f False+>                         addImplB env a True+>           addImplB env (RAppImp _ _ _ f a) argpos +>                    = do addImplB env f False+>                         addImplB env a True+>           addImplB env (RBind n (Pi Im _ ty) sc) argpos+>                    = do (nms, tot) <- get+>                         put (nms, tot+1)+>                         addImplB env ty argpos+>                         addImplB (n:env) sc argpos+>           addImplB env (RBind n (Pi Ex _ ty) sc) argpos+>                    = do addImplB env ty True+>                         addImplB (n:env) sc argpos+>           addImplB env (RBind n (Lam ty) sc) argpos+>                    = do addImplB env ty argpos+>                         addImplB (n:env) sc argpos+>           addImplB env (RBind n (RLet val ty) sc) argpos+>                    = do addImplB env val argpos+>                         addImplB env ty argpos+>                         addImplB (n:env) sc argpos+>           addImplB env (RInfix _ _ op l r) argpos+>                    = do addImplB env l argpos+>                         addImplB env r argpos+>           addImplB env (RUserInfix _ _ _ op l r) argpos+>                    = do addImplB env l argpos+>                         addImplB env r argpos+>           addImplB env _ _ = return ()++>           mknew :: [Id] -> [(Id, RawTerm)]+>           mknew args = map fst (sortBy ordIdx (map addTy args))++>           ordIdx (a, x) (b, y) = compare x y++>           addTy n = case lookupIdx n using of+>                        Just (t, i) -> ((n,t), i)+>                        _ -> ((n,RPlaceholder), -1)+>           pibind :: Plicit -> [(Id, RawTerm)] -> RawTerm -> RawTerm+>           pibind plicit [] raw = raw+>           pibind plicit ((n, ty):ns) raw+>                      = RBind n (Pi plicit Eager ty) (pibind plicit ns raw)++>           parambind :: [(Id, RawTerm)] -> RawTerm -> RawTerm+>           parambind xs (RBind n b@(Pi Im strict ty) sc) = RBind n b (parambind xs sc)+>           parambind xs sc = pibind Ex xs sc++Is this, or something like it, in the Haskell libraries?++> lookupIdx :: Eq a => a -> [(a,b)] -> Maybe (b, Int)+> lookupIdx x xs = li' 0 x xs+>    where li' i x [] = Nothing+>          li' i x ((y,v):ys) | x == y = Just (v, i)+>                             | otherwise = li' (i+1) x ys++Convert a raw term with all the implicit things added into an ivor term+ready for typechecking++> toIvorName :: Id -> Name+> toIvorName i = name (show i)++> fromIvorName :: Name -> Id+> fromIvorName i = UN (show i)++For desugaring do blocks and idiom brackets++> data UndoInfo = UI Id Int -- bind, bind implicit+>                    Id Int -- return, return implicit+>                    Id Int -- pure, pure implicit+>                    Id Int -- ap, ap implicit++> data ModInfo = MI Id -- namespace+>                   [(Id, RawTerm)] -- parameters++Implicit argument information; current using clause and parameters. We also need to know +the functions in the current block, and which arguments to add automatically, because the+programmer doesn't have to write them down inside the param block.++> data Implicit = Imp { impUsing :: [(Id, RawTerm)], -- 'using'+>                       params :: [(Id, RawTerm)], -- extra params+>                       paramNames :: [(Id, [Id])], -- functions and params in the current block+>                       thisNamespace :: Maybe Id+>                     }++> noImplicit = Imp [] [] [] Nothing++> addUsing :: Implicit -> Implicit -> Implicit+> addUsing (Imp a b pns ns) (Imp a' b' pns' ns') +>              = Imp (a++a') (b++b') (pns++pns') (mplus ns ns')++> addParams :: Implicit -> [(Id, RawTerm)] -> Implicit+> addParams (Imp a b pns ns) newps = Imp a (b++newps) pns ns++> addParamName :: Implicit -> Id -> Implicit+> addParamName imp@(Imp u ps pns ns) n+>     = case lookup n pns of+>          Just _ -> imp+>          Nothing -> Imp u ps ((n, (map fst ps)):pns) ns++> defDo = UI (UN "bind") 2+>            (UN "IOReturn") 1 -- IO monad+>            (UN "IOReturn") 1 -- IO applicative+>            (UN "ioApp") 2 ++> toIvor :: UndoInfo -> Id -> RawTerm -> ViewTerm+> toIvor ui fname tm = evalState (toIvorS tm) (0,1)+>   where+>     toIvorS :: RawTerm -> State (Int, Int) ViewTerm+>     toIvorS (RVar f l n) = return $ Annotation (FileLoc f l) (Name Unknown (toIvorName n))+>     toIvorS (RApp file line f a) = do f' <- toIvorS f+>                                       a' <- toIvorS a+>                                       return (Annotation (FileLoc file line) (App f' a'))+>     toIvorS (RBind (MN "X" 0) (Pi _ _ ty) sc) +>            = do ty' <- toIvorS ty+>                 sc' <- toIvorS sc+>                 (i, x) <- get+>                 put (i+1, x)+>                 return $ Forall (toIvorName (MN "X" i)) ty' sc'+>     toIvorS (RBind n (Pi _ _ ty) sc) +>            = do ty' <- toIvorS ty+>                 sc' <- toIvorS sc+>                 return $ Forall (toIvorName n) ty' sc'+>     toIvorS (RBind n (Lam ty) sc) +>            = do ty' <- toIvorS ty+>                 sc' <- toIvorS sc+>                 return $ Lambda (toIvorName n) ty' sc'+>     toIvorS (RBind n (RLet val ty) sc) +>            = do ty' <- toIvorS ty+>                 val' <- toIvorS val+>                 sc' <- toIvorS sc+>                 return $ Let (toIvorName n) ty' val' sc'+>     toIvorS (RConst _ _ c) = return $ toIvorConst c+>     toIvorS RPlaceholder = return Placeholder+>     toIvorS (RMetavar (UN "")) -- no name, so make on eup+>                 = do (i, h) <- get+>                      put (i, h+1)+>                      return $ Metavar (toIvorName (mkName fname h))+>     toIvorS (RMetavar n) = return $ Metavar (toIvorName n)+>     toIvorS (RInfix file line JMEq l r) +>                 = do l' <- toIvorS l+>                      r' <- toIvorS r+>                      return $ Annotation (FileLoc file line) +>                                 (apply (Name Unknown (opFn JMEq)) +>                                 [Placeholder, Placeholder,l',r'])+>     toIvorS (RInfix file line OpEq l r) +>                 = do l' <- toIvorS l+>                      r' <- toIvorS r+>                      return $ Annotation (FileLoc file line)+>                                 (apply (Name Unknown (opFn OpEq))+>                                 [Placeholder,l',r'])+>     toIvorS (RInfix file line op l r) +>                 = do l' <- toIvorS l+>                      r' <- toIvorS r+>                      return $ Annotation (FileLoc file line)+>                               (apply (Name Unknown (opFn op)) [l',r'])+>     toIvorS (RDo dos) = do tm <- undo ui dos+>                            toIvorS tm+>     toIvorS (RReturn f l)+>       = do let (UI _ _ ret retImpl _ _ _ _) = ui+>            toIvorS $ mkApp f l (RVar f l ret) (take retImpl (repeat RPlaceholder))+>     toIvorS (RIdiom tm) = do let tm' = unidiom ui tm+>                              toIvorS tm'+>     toIvorS (RPure t) = toIvorS t+>     toIvorS RRefl = return $ apply (Name Unknown (name "refl")) [Placeholder]+>     toIvorS (RError x) = error x+>     mkName (UN n) i = UN (n++"_"++show i)+>     mkName (MN n j) i = MN (n++"_"++show i) j++> toIvorConst (Num x) = Constant x+> toIvorConst (Str str) = Constant str+> toIvorConst (Bo True) = Name Unknown (name "true")+> toIvorConst (Bo False) = Name Unknown (name "false")+> toIvorConst (Ch c) = Constant c+> toIvorConst (Fl f) = Constant f+> toIvorConst TYPE = Star+> toIvorConst StringType = Name Unknown (name "String")+> toIvorConst IntType = Name Unknown (name "Int")+> toIvorConst FloatType = Name Unknown (name "Float")+> toIvorConst CharType = Name Unknown (name "Char")+> toIvorConst PtrType = Name Unknown (name "Ptr")+> toIvorConst (Builtin ty) = Name Unknown (name ty)++Convert a raw term to an ivor term, adding placeholders++> makeIvorTerm :: Implicit -> UndoInfo -> UserOps -> Id -> Ctxt IvorFun -> RawTerm -> ViewTerm+> makeIvorTerm using ui uo n ctxt tm +>                  = let expraw = addPlaceholders ctxt using uo tm in+>                                 toIvor ui n expraw++Add placeholders so that implicit arguments can be filled in. Also desugar user infix apps.+FIXME: I think this'll fail if names are shadowed.++> addPlaceholders :: Ctxt IvorFun -> Implicit -> UserOps -> RawTerm -> RawTerm+> addPlaceholders ctxt using (UO uo _ _) tm = ap [] tm+>     -- Count the number of args we've made explicit in an application+>     -- and don't add placeholders for them. Reset the counter if we get+>     -- out of an application+>     where ap ex (RVar f l n)+>               = case ctxtLookupName ctxt (thisNamespace using) n of+>                   Right (IvorFun _ (Just ty) imp _ _ _ _, fulln) -> +>                     let pargs = case lookup n pnames of+>                                   Nothing -> []+>                                   Just ids -> map (RVar f l) ids in+>                     mkApp f l (RVar f l fulln)+>                               ((mkImplicitArgs +>                                (map fst (fst (getBinders ty []))) imp ex) ++ pargs)+>                   _ -> RVar f l n -- FIXME: report error if ambiguous name+>           ap ex (RExpVar f l n)+>               = case ctxtLookupName ctxt (thisNamespace using) n of+>                   Right (IvorFun _ (Just ty) imp _ _ _ _, fulln) -> RVar f l fulln+>                   _ -> RVar f l n -- FIXME: report error if ambiguous name+>           ap ex (RAppImp file line n f a) = (ap ((toIvorName n,(ap [] a)):ex) f)+>           ap ex (RApp file line f a) = (RApp file line (ap ex f) (ap [] a))+>           ap ex (RBind n (Pi p l ty) sc)+>               = RBind n (Pi p l (ap [] ty)) (ap [] sc)+>           ap ex (RBind n (Lam ty) sc)+>               = RBind n (Lam (ap [] ty)) (ap [] sc)+>           ap ex (RBind n (RLet val ty) sc)+>               = RBind n (RLet (ap [] val) (ap [] ty)) (ap [] sc)+>           ap ex (RInfix file line op l r) = RInfix file line op (ap [] l) (ap [] r)+>           ap ex fix@(RUserInfix _ _ _ _ _ _)+>               = case fixFix uo fix of+>                   (RUserInfix file line _ op l r) ->+>                       ap ex (RApp file line +>                              (RApp file line (RVar file line (useropFn op)) l) r)+>                   (RError x) -> RError x+>           ap ex (RDo ds) = RDo (map apdo ds)+>           ap ex (RIdiom tm) = RIdiom (ap [] tm)+>           ap ex (RPure tm) = RPure (ap [] tm)+>           ap ex r = r++>           apdo (DoExp f l r) = DoExp f l (ap [] r)+>           apdo (DoBinding file line x t r) = DoBinding file line x (ap [] t) (ap [] r)+>           apdo (DoLet file line x t r) = DoLet file line x (ap [] t) (ap [] r)++>           pnames = paramNames using++Go through the arguments; if an implicit argument has the same name as one+in our list of explicit names to add, add it.++> mkImplicitArgs :: [Name] -> Int -> [(Name, RawTerm)] -> [RawTerm]+> mkImplicitArgs _ 0 _ = [] -- No more implicit+> mkImplicitArgs [] i ns = [] -- No more args+> mkImplicitArgs (n:ns) i imps+>      = case lookup n imps of+>          Nothing -> RPlaceholder:(mkImplicitArgs ns (i-1) imps)+>          Just v -> v:(mkImplicitArgs ns (i-1) imps)++> getBinders (Forall n ty sc) acc = (getBinders sc ((n,ty):acc))+> getBinders (Annotation _ t) acc = getBinders t acc+> getBinders sc acc = (reverse acc, sc)+++> undo :: UndoInfo -> [Do] -> State (Int, Int) RawTerm+> undo ui [] = fail "The last statement in a 'do' block must be an expression"+> undo ui [DoExp f l last] = return last+> undo ui@(UI bind bindimpl _ _ _ _ _ _) ((DoBinding file line v' ty exp):ds)+>          = -- bind exp (\v' . [[ds]])+>            do ds' <- undo ui ds+>               let k = RBind v' (Lam ty) ds'+>               return $ mkApp file line (RVar file line bind) +>                          ((take bindimpl (repeat RPlaceholder)) ++ [exp, k])+> undo ui ((DoLet file line v' ty exp):ds)+>          = do ds' <- undo ui ds+>               return $ RBind v' (RLet exp ty) ds'+> undo ui@(UI bind bindimpl _ _ _ _ _ _) ((DoExp file line exp):ds)+>          = -- bind exp (\_ . [[ds]])+>            do ds' <- undo ui ds+>               (i, h) <- get+>               put (i+1, h)+>               let k = RBind (MN "x" i) (Lam RPlaceholder) ds'+>               return $ mkApp file line (RVar file line bind) +>                          ((take bindimpl (repeat RPlaceholder)) ++ [exp, k])++-- > unret :: UndoInfo -> RawTerm -> RawTerm+-- > unret (UI _ _ ret retImpl _ _ _ _) (RApp f l (RVar _ _ (UN "return")) arg)+-- >       = mkApp f l (RVar f l ret) ((take retImpl (repeat RPlaceholder)) ++ [arg])+-- > unret ui (RApp f l x a) = RApp f l (unret ui x) (unret ui a)+-- > unret ui (RAppImp f l n x a) = RAppImp f l n (unret ui x) (unret ui a)+-- > unret ui (RInfix f l op x y) = RInfix f l op (unret ui x) (unret ui y)+-- > unret ui (RBind n (Pi pl z tm) sc) = RBind n (Pi pl z (unret ui tm)) (unret ui sc)+-- > unret ui (RBind n (Lam tm) sc) = RBind n (Lam (unret ui tm)) (unret ui sc)+-- > unret ui (RBind n (RLet tm ty) sc) = RBind n (RLet (unret ui tm) (unret ui ty)) (unret ui sc)+-- > unret ui (RUserInfix f l b n x y) = RUserInfix f l b n (unret ui x) (unret ui y)+-- > unret ui (RIdiom tm) = RIdiom (unret ui tm)+-- > unret ui (RPure tm) = RPure (unret ui tm)+-- > unret ui x = x++TODO: Get names out of UndoInfo++> unidiom :: UndoInfo -> RawTerm -> RawTerm+> unidiom ui@(UI _ _ _ _ pure pureImpl _ _) (RApp file line f (RPure x)) +>         = mkApp file line (RVar file line pure)+>                ((take pureImpl (repeat RPlaceholder)) ++ [mkApp file line f [x]])+> unidiom ui@(UI _ _ _ _ pure pureImpl _ _) (RApp file line f RPlaceholder) +>         = mkApp file line (RVar file line pure)+>                ((take pureImpl (repeat RPlaceholder)) ++ [mkApp file line f [RPlaceholder]])+> unidiom ui@(UI _ _ _ _ _ _ ap apImpl) (RApp file line f x) +>              = mkApp file line (RVar file line ap)+>                     ((take apImpl (repeat RPlaceholder)) +++>                     [unidiom ui f, x])+> unidiom ui@(UI _ _ _ _ pure pureImpl _ _) x +>              = let (file, line) = getFileLine x in+>               mkApp file line (RVar file line pure)+>                     ((take pureImpl (repeat RPlaceholder)) ++ [x])++> testCtxt = addEntry newCtxt Nothing (UN "Vect") undefined++> dump :: Ctxt IvorFun -> String+> dump ctxt = concat $ map dumpFn (ctxtAlist ctxt)+>   where dumpFn (_,IvorFun n ty imp def _ _ _) =+>             show n ++ " : " ++ show ty ++ "\n" +++>             "   " ++ show imp ++ " implicit\n" +++>             show def ++ "\n\n"++> mkRName n = UN (show n)++> getOp v allops +>     = let ops = mapMaybe (\x -> if opFn x == v +>                                 then Just x +>                                 else Nothing) allops+>          in if null ops then Nothing+>                         else Just (head ops)++Convert an ivor term back to a raw term, for pretty printing purposes.+Use the context to decide which arguments to make implicit++FIXME: If a name is bound locally, don't add implicit args.++> unIvor :: Ctxt IvorFun -> ViewTerm -> RawTerm+> unIvor ctxt tm = unI tm [] where++Built-in constants firsts++>     unI (Name _ v) []+>         | v == name "Int" = RConst "[val]" 0 IntType+>         | v == name "String" = RConst "[val]" 0 StringType+>     unI (Name _ v) [x,y]+>         | v == name "refl" = RApp "[val]" 0 RRefl y++Now built-in operators++>     unI (Name _ v) [_,_,x,y]+>         | v == opFn JMEq = RInfix "[val]" 0 JMEq x y+>     unI (Name _ v) [_,x,y]+>         | v == opFn OpEq = RInfix "[val]" 0 OpEq x y+>     unI (Name _ v) [x,y]+>         | Just op <- getOp v allOps = RInfix "[val]" 0 op x y+>     unI (Name _ v) args +>        = case ctxtLookup ctxt Nothing (mkRName v) of+>            Right fdata -> mkImpApp "[val]" 0 (implicitArgs fdata) +>                                   (argNames (ivorFType fdata)) (RVar "[val]" 0 (mkRName v)) args+>            _ -> unwind (RVar "[val]" 0 (mkRName v)) args+>     unI (App f a) args = unI f ((unI a []):args)+>     unI (Lambda v ty sc) args = unwind (RBind (mkRName v) (Lam (unI ty [])) (unI sc [])) args+>     unI (Forall v ty sc) args = unwind (RBind (mkRName v) (Pi Ex Eager (unI ty [])) (unI sc [])) args+>     unI (Let v ty val sc) args = unwind (RBind (mkRName v) +>                                          (RLet (unI val []) (unI ty [])) +>                                          (unI sc [])) args+>     unI Star [] = RConst "[val]" 0 TYPE+>     unI (Constant c) [] = let try f = fmap (RConst "[val]" 0 . f) $ cast c+>                           in  fromJust $ msum [try Num, try Str, try Ch, try Fl]+>     unI (Annotation _ x) args = unI x args++>     unwind = mkImpApp "[val]" 0 0 []++> argNames :: Maybe ViewTerm -> [Id]+> argNames Nothing = []+> argNames (Just ty) = an ty where+>     an (Forall n ty sc) = (mkRName n):(an sc)+>     an (Annotation _ t) = an t+>     an x = []++> mkImpApp :: String -> Int -> Int -> [Id] -> RawTerm -> [RawTerm] -> RawTerm+> mkImpApp file line i (n:ns) tm (a:as) +>      | i>0 = mkImpApp file line (i-1) ns (RAppImp file line n tm a) as+>      | otherwise = mkImpApp file line 0 ns (RApp file line tm a) as+> mkImpApp file line _ _ tm (a:as) = mkImpApp file line 0 [] (RApp file line tm a) as+> mkImpApp _ _ _ _ tm _ = tm+++Show a raw term; either show or hide implicit arguments according to+boolean flag (true for showing them)++> showImp :: Bool -> RawTerm -> String+> showImp imp tm = showP 10 tm where+>     showP p (RVar _ _ (UN "__Unit")) = "()"+>     showP p (RVar _ _ (UN "__Empty")) = "_|_"+>     showP p (RVar _ _ i) = case (getOpName i) of+>                              (True, o) -> "(" ++ o ++ ")"+>                              (False, o) -> o+>     showP p RRefl = "refl"+>     showP p (RApp _ _ f a) = bracket p 1 $ showP 1 f ++ " " ++ showP 0 a+>     showP p (RAppImp _ _ n f a)+>           | imp = bracket p 1 $ showP 1 f ++ " {"++show n ++ " = " ++ showP 0 a ++ "} "+>           | otherwise = showP 1 f+>     showP p (RBind n (Lam ty) sc)+>           = bracket p 2 $ +>             "\\ " ++ show n ++ " : " ++ showP 10 ty ++ " => " ++ showP 10 sc+>     showP p (RBind n (Pi im _ ty) sc)+>           | internal n && not imp -- hack for spotting unused names quickly!+>              = bracket p 2 $ showP 1 ty ++ " -> " ++ showP 10 sc+>           | otherwise+>              = bracket p 2 $+>                ob im ++ show n ++ " : " ++ showP 10 ty ++ cb im ++ " -> " +++>                showP 10 sc+>        where ob Im = "{"+>              ob Ex = "("+>              cb Im = "}"+>              cb Ex = ")"+>              internal (UN ('_':'_':_)) = True+>              internal (MN _ _) = True+>              internal _ = False+>     showP p (RBind n (RLet val ty) sc)+>           = bracket p 2 $+>             "let " ++ show n ++ " : " ++ showP 10 ty ++ " = " ++ showP 10 val+>                    ++ " in " ++ showP 10 sc+>     showP p (RConst _ _ c) = show c+>     showP p (RInfix _ _ op l r) = bracket p 5 $+>                                   showP 4 l ++ show op ++ showP 4 r+>     showP _ x = show x+>     bracket outer inner str | inner>outer = "("++str++")"+>                             | otherwise = str++> showVT :: Ctxt IvorFun -> ViewTerm -> String+> showVT ivs t = showImp False (unIvor ivs t)++If we haven't got a line number for an error message, pick where the definition+starts as a best guess.++> guessContext :: IvorFun -> TTError -> TTError+> guessContext _ e@(ErrContext _ _) = e+> guessContext ifn e = case (ivorFType ifn) of+>                        Just (Annotation (FileLoc f l) _) ->+>                            ErrContext (f ++ ":" ++ show l ++ ":") e+>                        _ -> e -- ErrContext (show (ivorFType ifn)) e++> idrisError :: Ctxt IvorFun -> TTError -> String+> idrisError ivs (CantUnify x y) = "Can't unify " ++ (showVT ivs x) ++ " and " ++ +>                                                    (showVT ivs y)+> idrisError ivs (Message str) = str+> idrisError ivs (Unbound clause clty rhs rhsty names) +>                = "Unbound names in " ++ showVT ivs rhs ++ +>                  " : " ++ showVT ivs clty +++>                  "  " ++ show names+> idrisError ivs (NoSuchVar n) = "No such variable as " ++ show n+> idrisError ivs (CantInfer n tm) = "Can't infer value for " ++ show n ++ " in " ++ (showVT ivs tm)+> idrisError ivs (ErrContext s e) = s ++ idrisError ivs e++> getOpName (UN ('_':'_':'o':'p':'_':op)) = (True, showOp op) where+>          showOp ('_':cs) = case span isDigit cs of+>                               (op, rest) -> toEnum (read op) : showOp rest+>          showOp _ = ""+> getOpName s = (False, show s)++Correct the precedences in a user defined infix operator term using Dijkstra's+Shunting Yard algorithm.++> fixFix :: Fixities -> RawTerm -> RawTerm+> fixFix ops top@(RUserInfix f l b op x y) +>            = let toks = tok top +>                  shunted = shunt ops [] toks in+>                  rebuild [] shunted+> fixFix ops x = x++> data OpTok = Op String Int String+>            | OTm RawTerm+>            | OpenB+>            | CloseB+>   deriving Show++> tok (RUserInfix f l False op x y) +>         = tok x ++ ((Op f l op):tok y)+> tok (RUserInfix f l True op x y) +>         = OpenB:(tok x ++ (Op f l op):tok y) ++ [CloseB]+> tok x = [OTm x]++> shunt :: Fixities -> [OpTok] -> [OpTok] -> [OpTok]+> shunt ops stk (OTm x:toks) = OTm x:(shunt ops stk toks)+> shunt ops stk (op@(Op f l _):toks) +>           = let (stk', out) = prec [] stk op in+>                 out ++ shunt ops stk' toks+>    where prec out (op2@(Op f2 l2 o2):opstk) op1@(Op f1 l1 o1)+>              = case (lookup o1 ops, lookup o2 ops) of+>                   (Just (LeftAssoc, prec1), Just (assoc2, prec2))+>                      -> if (prec1<=prec2) then +>                               prec (op2:out) opstk op1+>                             else +>                               (op1:op2:opstk, reverse out)+>                   (Just (RightAssoc, prec1), Just (assoc2, prec2))+>                      -> if (prec1<prec2) then +>                               prec (op2:out) opstk op1+>                             else +>                               (op1:op2:opstk, reverse out)+>                   (Nothing, Nothing) -> (opstk, OTm (RError (f1 ++ ":" ++ show l1 ++ ":unknown operators " ++ show o1 ++ " and " ++ show o2)):out)+>                   (Nothing, _) -> (opstk, OTm (RError (f1 ++ ":" ++ show l1 ++ ":unknown operator " ++ show o1)):out)+>                   (_, Nothing) -> (opstk, OTm (RError (f2 ++ ":" ++ show l2 ++ ":unknown operator " ++ show o2)):out)+>          prec out opstk op1 = (op1:opstk, reverse out)++> shunt ops stk (OpenB:toks) = shunt ops (OpenB:stk) toks+> shunt ops stk (CloseB:toks) = let (stk',out) = popToLeft [] stk in+>                                   out ++ shunt ops stk' toks+>    where popToLeft out (OpenB:stk) = (stk, reverse out)+>          popToLeft out (x:stk) = popToLeft (x:out) stk+>          popToLeft out [] = error "Can't happen, no left paren"+> shunt ops (x:stk) [] = x:(shunt ops stk [])+> shunt ops [] [] = []++> rebuild :: [RawTerm] -> [OpTok] -> RawTerm+> rebuild stk (OTm x:xs) = rebuild (x:stk) xs+> rebuild (x:y:stk) (Op f l op:xs) +>       = rebuild ((RUserInfix f l True op y x):stk) xs+> rebuild (x:[]) [] = x+> rebuild stk xs = error $ "Can't happen: rebuild " ++ show (stk, xs)++Old version:+++Only need to worry if the left term is not bracketed. Otherwise leave it alone.+Also need to sort out inner ops first.++ fixFix ops top@(RUserInfix f l b op x y)+     = let fixed = fixFix' ops top in -- (RUserInfix f l b op x y)+           if (fixed==top) then fixed else fixFix ops fixed+ fixFix ops x = x++++++> fixFix' ops top@(RUserInfix file line _ opr +>                 (RUserInfix _ _ False opl a b) c) = +>     case (lookup opl ops, lookup opr ops) of+>       (Just (assocl, precl), Just (assocr, precr)) ->+>         doFix assocl precl assocr precr a opl b opr c+>       (Nothing, Nothing) -> RError $ file ++ ":" ++ show line ++ ":unknown operators " ++ show opl ++ " and " ++ show opr+>       (Nothing, _) -> RError $ file ++ ":" ++ show line ++ ":unknown operator " ++ show opl+>       (_, Nothing) -> RError $ file ++ ":" ++ show line ++ ":unknown operator " ++ show opr+>  where+>    doFix al pl ar pr a opl b opr c +>          | pr > pl = mkOp False opl (fixFix' ops a) (fixFix' ops (mkOp False opr b c))+>          | pr < pl = mkOp False opr (fixFix' ops (mkOp False opl a b)) (fixFix' ops c)++In the following cases, change the top level operator, put explicit brackets in, then+rewrite the whole thing again. Termination guaranteed since the size of the expression+we check (i.e. the non-bracketed part) is smaller.++>          | pr == pl && al == LeftAssoc && ar == LeftAssoc+>                    = fixFix ops $ mkOp False opr (mkOp True opl a b) c+>          | pr == pl && al == RightAssoc && ar == RightAssoc+>                    = fixFix ops $ mkOp False opl a (mkOp True opr b c)+>          | otherwise = RError $ file ++ ":" ++ show line ++ ":ambiguous operators, please add brackets"++>    mkOp t op l r = RUserInfix file line t op l r+++Everything else, we ony work at the top level.++> fixFix' _ x = x
+ Idris/Compiler.lhs view
@@ -0,0 +1,349 @@+> {-# OPTIONS_GHC -fglasgow-exts #-}++> module Idris.Compiler(comp, addTransforms) where++> import Idris.AbsSyntax+> import Idris.PMComp+> import Idris.LambdaLift+> import Idris.ConTrans+> import Idris.SCTrans+> import Idris.Lib+> import Ivor.TT hiding (transform)++> import System+> import System.IO+> import System.Environment+> import System.Directory+> import Monad+> import Debug.Trace++Get every definition from the context. Convert them all to simple case+trees. Ignore constructors, types, etc. Simple definitions are, of course, +already simple case trees.++> addTransforms :: IdrisState -> Context -> IdrisState+> addTransforms ist ctxt +>      = let raw = idris_context ist+>            erasure = not $ NoErasure `elem` (idris_options ist) +>            ctrans = makeConTransforms raw ctxt+>            atrans = makeArgTransforms raw ctxt ctrans+>            trans = if erasure then makeIDTransforms raw ctxt atrans+>                       else [] in+>              ist { idris_transforms = trans }++> comp :: IdrisState -> Context -> Id -> FilePath -> IO Bool+> comp ist ctxt nm ofile +>          = do let raw = idris_context ist+>               let decls = idris_decls ist+>               let erasure = not $ NoErasure `elem` (idris_options ist)+>               let pdefs = getCompileDefs raw ctxt+>               let trans = idris_transforms ist+>               let vtrans = transforms (idris_fixities ist)+>               let pcomp = map (pmCompDef raw ctxt erasure trans vtrans) pdefs+>               let declouts = filter (/="") (map epicDecl decls)+>               let clink = filter (/="") (map epicLink decls)+>               let scs = map (\ (n, inl, sc) -> (n, inl, transformSC erasure sc)) +>                           $ allSCs pcomp+>               catch (do compileAll raw ctxt ofile erasure clink declouts scs+>                         return True)+>                     (\e -> do putStrLn "Compilation error"+>                               print e+>                               return False)+>    where allSCs [] = []+>          allSCs ((x,gen,(args,def)):xs) +>                       = -- trace (show (x,def)) $+>                         let lifted = lambdaLift ctxt ist x args def+>                             scfuns = map (\ (n,args,sc) -> +>                                          (n, scFun ctxt ist (fromIvorName n) args sc)) lifted+>                             xs' = allSCs xs in+>                             mkGen gen scfuns ++ xs'+>          mkGen gen ((n, d):ds) = (n,gen,d):(mkGen True ds)+>          mkGen gen [] = []++Convert top level declarations to epic output.+This is just for the directives to link in C headers, .o file, etc.++> epicDecl :: Decl -> String+> epicDecl (CInclude i) = "%include " ++ show i+> epicDecl _ = ""++> epicLink :: Decl -> String+> epicLink (CLib l) = l+> epicLink _ = ""++Get all the definitions we want to compile (i.e., skipping NoCG ones)++Get the user specified pattern definition, if it exists, not the Ivor+expanded one (i.e. with the placeholders as the user specified) so+that we avoid pattern matching where the programmer didn't ask us to.++> getCompileDefs :: Ctxt IvorFun -> Context -> [(Name, (ViewTerm, Patterns))]+> getCompileDefs raw ctxt = defs' [] (ctxtAlist raw) +>    where alldefs = map getOrig (getAllPatternDefs ctxt)+>          defs' acc [] = dropAll acc alldefs+>          defs' acc ((n,ifun):ds) +>              = let flags = funFlags ifun +>                    inm = toIvorName n in+>                case (NoCG `elem` flags) of+>                     True -> {- trace ("Not compiling " ++ show n) -}+>                                defs' (inm:acc) ds+>                     _ -> defs' acc ds+>          dropAll drops [] = []+>          dropAll drops ((n,def):ds) | n `elem` drops = dropAll drops ds+>                                     | otherwise = (n,def):(dropAll drops ds)+>          getOrig (n, (ty, ps)) = (n, (ty, ps))++                  = case ctxtLookup raw (mkRName n) of+                      (Just ifun) ->+                          case (ivorDef ifun) of+                            PattDef ps' -> (n, (ty, (mergePats ps ps')))+                            _ -> (n, (ty, ps))+                      _ -> (n, (ty, ps))++> mergePats :: Patterns -> Patterns -> Patterns+> mergePats (Patterns ps) (Patterns ps') = Patterns (mp ps ps')+>   where+>     mp [] [] = []+>     mp ((PClause a _ r):ps) ((PClause a' _ r'):ps') =+>             (PClause a' [] r):(mp ps ps')++> pmCompDef :: Ctxt IvorFun -> Context -> +>              Bool -> -- erasure on+>              [Transform] -> -- optimisations+>              [(ViewTerm, ViewTerm)] -> -- user level transforms+>              (Name, (ViewTerm, Patterns)) -> +>              (Name, Bool, ([Name], SimpleCase))+> pmCompDef raw ctxt erase ctrans vtrans (n, (ty,ps)) +> --    = let flags = getFlags n raw in+> --          case ((NoCG `elem` flags), (CGEval `elem` flags)) of +> --             (True, _) -> trace ("Not compiling " ++ show n) (n, [])+> --             (False, False)e -> +>       =  let transpm = transform ctxt ctrans vtrans n ps +>              gen = isAuxPattern ctxt n+>              compiledp = pmcomp raw ctxt erase n ty transpm in+>              -- trace (if n == name "copyRecInt" then show n ++ "\n" ++ show compiledp else "")+>              (n, gen, compiledp)++     where getFlags n raw = case ctxtLookup raw n of+                              Just i -> funFlags i+                              Nothing -> []+++> compileAll :: Ctxt IvorFun -> Context -> FilePath -> Bool ->+>               [String] -> -- options to pass to epic+>               [String] -> -- raw epic output+>               [(Name, Bool, SCFun)] -> IO ()+> compileAll raw ctxt ofile erasure clink outputs scs = do+>      (efile, eH) <- tempfile+>      prel <- readLibFile defaultLibPath "Prelude.e"+>      hPutStrLn eH prel+>      mapM_ (hPutStrLn eH) outputs+>      mapM_ (writeDef eH erasure) scs+>      hClose eH+>      let cmd = "epic " ++ efile ++ " -o " ++ ofile ++ " " +++>                concat (map (' ':) clink)+>      exit <- system cmd+>      -- removeFile efile+>      if (exit /= ExitSuccess) +>         then fail "EPIC FAIL"+>         else return ()++> quotename [] = ""+> quotename ('[':cs) = "_OB_"++quotename cs+> quotename (']':cs) = "_CB_"++quotename cs+> quotename (c:cs) = c:(quotename cs)++> writeDef :: Handle -> Bool -> (Name, Bool, SCFun) -> IO ()+> writeDef h erasure (n,gen,(SCFun scopts args def)) = do+>   when (gen || elem SCInline scopts) $ hPutStr h "%inline "+>   when (elem SCStrict scopts) $ hPutStr h "%strict "+>   maybe (return ()) (\ c -> hPutStrLn h ("export " ++ show c ++ " ")) (getEName scopts)+>   hPutStrLn h (show n ++ " (" ++ list args ++ ") -> Any = \n" +++>                writeSC n erasure def)+>    where list [] = ""+>          list [a] = quotename (show a) ++ " : Any"+>          list (x:xs) = quotename (show x) ++ " : Any, " ++ list xs++Write out a constructor name, turning constructors of IO commands into+the relevant IO operation++> writeSC :: Name -> Bool -> SCBody -> String+> writeSC fname erasure b = writeSC' b where++>   list [] = ""+>   list [a] = writeSC' a+>   list (x:xs) = writeSC' x ++ ", " ++ list xs++>   writeSC' (SVar n) = quotename (show n)+>   writeSC' (SCon n i) = writeCon n i ++ "()"+>   writeSC' (SApp (SCon n i) (fn:args:[]))+>     | n == name "Foreign" = writeFCall fn erasure args fname+>   writeSC' (SApp (SCon n i) (_:args))+>     | n == name "WhileAcc" = writeCon n i ++ "(" ++ list args ++ ")"+>   writeSC' (SApp (SCon n i) args) = writeCon n i ++ "(" ++ list args ++ ")"++Fork is a special case, because its argument needs to be evaluated lazily+or it'll be evaluated by the time we run the thread!++>   writeSC' (SApp (SVar n) [arg])+>     | n == name "fork" =+>         "fork(lazy("++writeSC' arg++"))"++TMP HACK until we do coercions on primitives properly++>     | n == name "__toInt" =+>         "__epic_toInt(" ++ writeSC' arg ++ ")"+>     | n == name "__toString" =+>         "__epic_toString(" ++ writeSC' arg ++ ")"+>     | n == name "__charToInt" =+>         writeSC' arg+>     | n == name "__intToChar" =+>         writeSC' arg+>     | n == name "__strlen" =+>         "__epic_strlen(" ++ writeSC' arg ++ ")"+>     | n == name "unsafeNative" =+>         "__epic_native(" ++ writeSC' arg ++ ")"++HACK for explicit laziness, and marking effectfullness++>   writeSC' (SApp (SVar lazy) [_,v])+>     | lazy == name "__lazy" =+>         "lazy(" ++ writeSC' v ++ ")"+>   writeSC' (SApp (SVar effect) [_,v])+>     | effect == name "__effect" =+>         "%effect(" ++ writeSC' v ++ ")"++Epic has if/then/else, so just use that++>   writeSC' (SApp (SVar ite) [_,v,SLazy t,SLazy e])+>     | ite == name "if_then_else" =+>         writeSC' (SIf v t e)+>   writeSC' (SApp (SVar ite) [_,v,t,e])+>     | ite == name "if_then_else" =+>         writeSC' (SIf v t e)++HACK for string equality++>   writeSC' (SApp (SVar n) [arg1, arg2])+>     | n == name "__strEq" =+>         "__epic_streq("++writeSC' arg1++", " ++ writeSC' arg2 ++ ")"+>     | n == name "__strLT" =+>         "__epic_strlt("++writeSC' arg1++", " ++ writeSC' arg2 ++ ")"++>     | n == name "__strCons" =+>         "__epic_strcons("++writeSC' arg1++", " ++ writeSC' arg2 ++ ")"++>   writeSC' (SApp (SVar n) [arg1])+>     | n == name "__strHead" =+>         "__epic_strhead("++writeSC' arg1++ ")"+>     | n == name "__strTail" =+>         "__epic_strtail("++writeSC' arg1++ ")"++>   writeSC' (SApp b args) = "(" ++ writeSC' b ++")(" ++ list args ++ ")"+>       where list [] = ""+>             list [a] = writeSC' a+>             list (x:xs) = writeSC' x ++ ", " ++ list xs+>   writeSC' (SLet n val b) = "let " ++ show n ++ " : Any = " ++ writeSC' val+>                          ++ " in ("  ++ writeSC' b ++ ")"+>   writeSC' (SCCase b alts) = "case " ++ writeSC' b ++ " of { " ++ +>                              writeAlts fname erasure alts+>                             ++ "}"+>   writeSC' (SIf x t e) = "(if (" ++ writeSC' x ++ ") then (" +++>                          writeSC' t ++ ") else (" ++ writeSC' e ++ "))"+>   writeSC' (SIfZero x t e) = "(if (" ++ writeSC' x ++ "==0) then (" +++>                          writeSC' t ++ ") else (" ++ writeSC' e ++ "))"+>   writeSC' (SInfix op l r) = boolOp erasure op (writeOp op (writeSC' l) (writeSC' r))+>   writeSC' (SConst c) = writeConst c+>   writeSC' (SLazy b) = "lazy(" ++ writeSC' b ++ ")"+>   writeSC' SUnit = "%unused"+>   writeSC' SError = "error \"error\""++> writeCon :: Name -> Int -> String+> writeCon n i+>   | n == name "PutStr" = "__epic_putStr"+>   | n == name "GetStr" = "__epic_readStr"+>   | n == name "NewRef" = "__epic_newRef"+>   | n == name "ReadRef" = "__epic_readRef"+>   | n == name "WriteRef" = "__epic_writeRef"+>   | n == name "NewLock" = "__epic_newLock"+>   | n == name "DoLock" = "__epic_doLock"+>   | n == name "DoUnlock" = "__epic_doUnlock"+>   | n == name "Fork" = "__epic_fork"+>   | n == name "Within" = "__epic_within"+>   | n == name "While" = "%while"+>   | n == name "WhileAcc" = "%while"+>   | otherwise = "Con " ++ show i++> writeOp Concat l r = "__epic_append(" ++ l ++", " ++ r ++")"+> writeOp op l r = "(" ++ l ++ ") " ++ show op ++ " (" ++ r ++ ")"++> boolOp erasure op c = if (not erasure) && (retBool op) then+>                   "__epic_bool(" ++ c ++ ")" else c+>    where retBool OpLT = True+>          retBool OpEq = True+>          retBool OpLEq = True+>          retBool OpGT = True+>          retBool OpGEq = True+>          retBool _ = False++> writeAlts n e [] = ""+> writeAlts n e [a] = writeAlt n e a+> writeAlts n e (x:xs) = writeAlt n e x ++ " | " ++ writeAlts n e xs++> writeAlt n e (SAlt _ t args b) = "Con " ++ show t ++ " (" ++ list args ++ ") -> "+>                                ++ writeSC n e b+>    where list [] = ""+>          list [a] = show a ++ ":Any"+>          list (x:xs) = show x ++ ":Any, " ++ list xs+> writeAlt n e (SDefault b) = "Default -> " ++ writeSC n e b+> writeAlt n e _ = "Default -> error \"unhandled case in " ++ show n ++ "\""++Chars are just treated as Ints by the compiler, so convert here.++> writeConst (Ch c) = show $ fromEnum c+> writeConst c = show c++> writeFCall :: SCBody -> Bool -> SCBody -> Name -> String+> writeFCall (SApp (SCon ffun _) [SConst (Str fname),argtys,retty]) e arglist topname = +>     "foreign " ++ fToEpic retty ++ " " ++ show fname ++ +>               " (" ++ build (zip (extract arglist) (extract argtys)) ++ ")"+>     where build [] = ""+>           build [(x,ty)] = writeSC topname e x ++ ":" ++ (fToEpic ty)+>           build ((x,ty):xs) = writeSC topname e x ++ ":" ++ (fToEpic ty) ++ +>                               ", " ++ build xs++This'll work for FArgList and List, because the penultimate is always the +element and last is always the tail. Should therefore also work before and+after forcing optimisation...++>           extract (SCon _ 0) = []+>           extract (SApp (SCon _ 0) _) = []+>           extract (SApp (SCon _ 1) args) = (last (init args)):+>                                               (extract (last args))+>           extract x = error (show x)+>           exTy arg = fToEpic arg++> writeFCall _ _ _ _ = error "Ill-formed foreign function call"+++Convert a constructor application of type 'FType' to an epic type. Just do+this on tag, we know the type. Check 'FType' in io.idr.++> fToEpic :: SCBody -> String+> fToEpic (SCon _ 0) = "Unit"+> fToEpic (SCon _ 1) = "Int"+> fToEpic (SCon _ 2) = "String"+> fToEpic (SCon _ 3) = "Ptr"+> fToEpic _ = "Any" -- idris data type++> tempfile :: IO (FilePath, Handle)+> tempfile = do env <- environment "TMPDIR"+>               let dir = case env of+>                               Nothing -> "/tmp"+>                               (Just d) -> d+>               openTempFile dir "idris"++> environment :: String -> IO (Maybe String)+> environment x = catch (do e <- getEnv x+>                           return (Just e))+>                       (\_ -> return Nothing)
+ Idris/ConTrans.lhs view
@@ -0,0 +1,539 @@+> {-# OPTIONS_GHC -fglasgow-exts #-}++Apply Forcing/Detagging/Collapsing optimisations from Edwin Brady's thesis.++> module Idris.ConTrans(makeConTransforms, makeArgTransforms, makeIDTransforms,+>                       applyTransforms, transform, rebuildTrans) where++> import Idris.AbsSyntax+> import Ivor.TT hiding (transform)+> import qualified Ivor.ViewTerm(transform)++> import Maybe+> import List++> import Debug.Trace++Algorithm is approximately:++1. Make sure all constructors are fully applied. This means all transformations+will be uniform whether on LHS or RHS of pattern defs.+Also it means that any constructors which aren't fully applied on the LHS+of a pattern turn into '_' patterns. This is fine...+2. Generate transformation rules as ViewTerm transformations by applying+forcing, detagging and collapsing to every data structure.+3. Apply rules on LHS and RHS of all definitions.++Do all this before any pattern match compilation or lambda lifting.++To do this uniformly, turn a pattern def into an application of the lhs, +then turn it back into a pclause++Also apply user level transforms (vts) at this stage.++Throughout, we don't care about the bound arguments in a PClause any more,+so just ignore them.++> transform :: Context -> [Transform] -> [(ViewTerm, ViewTerm)] -> +>              Name -> Patterns -> Patterns+> transform ctxt ts vts n (Patterns ps) = Patterns $ (map doTrans ps)+>    where doTrans (PClause args _ ret) +>              = let lhs = apply (Name Unknown n) args+>                    lhs' = applyTransforms ctxt (filter lhsSafe ts) lhs+>                    ret' = applyTransforms ctxt ts (allTrans vts ret)+>                    args' = getFnArgs lhs' in+>                    PClause args' [] ret'+>          doTrans (PWithClause prf args scr (Patterns pats))+>              = let pats' = Patterns $ (map doTrans pats)+>                    lhs = apply (Name Unknown n) args+>                    lhs' = applyTransforms ctxt ts lhs+>                    scr' = applyTransforms ctxt ts scr+>                    args' = getFnArgs lhs' in+>                    PWithClause prf args' scr' pats'++HACK: better to have a flag when building the transform. FIXME!++>          lhsSafe (Trans nm _ _) = not (isSuffixOf "_ID" nm)++> allTrans ts tm = foldl (\tm (l,r) -> Ivor.ViewTerm.transform l r tm) tm ts++Look at all the definitions in the context, and make the relevant constructor+transformations for forcing, detagging and collapsing.++HACK: We do three passes, to pick up collapsible things from the last pass to +help. This still won't get everything right.+If Ivor returned things in the order they were defined this wouldn't+be necessary - better fix Ivor.++> makeConTransforms :: Ctxt IvorFun -> Context -> [Transform]+> makeConTransforms raw ctxt +>    = let pass1 = mkT' (getAllInductives ctxt) [] []+>          pass2 = mkT' (getAllInductives ctxt) [] pass1 in+>          mkT' (getAllInductives ctxt) [] pass2+>   where mkT' [] acc p1 = acc+>         mkT' (x:xs) acc p1 = mkT' xs ((makeTransform ctxt x (p1++acc))++acc) p1++Apply the constructor transforms before making the function transforms+so that we don't needlessly keep arguments dropped by forcing.++> makeArgTransforms :: Ctxt IvorFun -> Context -> [Transform] -> [Transform]+> makeArgTransforms raw ctxt ctrans +>    = let pass1 = mkP' (getRawPatternDefs raw ctxt) ctrans []+>          pass2 = mkP' (getRawPatternDefs raw ctxt) ctrans pass1 in+>          mkP' (getRawPatternDefs raw ctxt) ctrans pass2+>   where mkP' [] acc p1 = acc+>         mkP' (x:xs) acc p1 +>              = mkP' xs ((makePTransform raw ctxt (ctrans++p1++acc) x)++acc) p1++Look for functions which have become identity functions as a result of previous+transforms++> makeIDTransforms :: Ctxt IvorFun -> Context -> [Transform] -> [Transform]+> makeIDTransforms raw ctxt trans+>    = mkP' (getRawPatternDefs raw ctxt) trans+>   where mkP' [] acc = acc+>         mkP' (x:xs) acc +>              = mkP' xs ((makeIDTransform raw ctxt (trans++acc) x)++acc)++Make all the transformations for a type++Step 1. Forcing+   On each constructor, find namess that appear constructor +   guarded in that constructor's return type. Any argument with these+   names is forceable.+   If the type of the argument is collapsible, it's also forceable.++   If there's only one constructor left, of the form C x, transform it to just x.+   (Relies on totality)++Step 2: Detagging+   Check if there is an argument position in the return type which has a+   different constructor at the head on each constructor. If so,+   remove the tags on all constructor.+Step 3: Collapsing+   If the only remaining arguments in all constructors are recursive (i.e.+   return the type we're working with) or themselves collapsible, +   translate all to Unit.+   If this doesn't apply, undo step 2.++Using the transforms so far (in acc) - we can also eliminate arguments+which are themselves collapsible.++> makeTransform :: Context -> (Name, Inductive) -> [Transform] -> [Transform]+> makeTransform ctxt (n, ity) acc+>    = let cons = constructors ity+>          detagin = (map (getFnArgs.getReturnType) (map snd cons))+>          forceable = nub (map (\ (x,y) -> (x, force ctxt y acc, Ivor.TT.getArgTypes y)) cons)+>          detaggable = pdisjoint ctxt detagin+>          recursive = nub (map (\ (x,y) -> (x, recArgs n y acc, Ivor.TT.getArgTypes y)) cons)+>          collapsible = detaggable && all droppedAll (combine forceable recursive)+>          nattable = isNat forceable recursive+>               in+>          -- trace (show n ++ " " ++ show (nattable) ++ " " ++ show (forceable, recursive)) $ -- FORCING \n\t" ++ show forceable) +>            if collapsible then+>                map (collapseTrans n) cons+>                else mapMaybe (forceTrans nattable (length cons)) forceable++Combine assumes constructors are in each list in the same order. Since they+were built the same way, this is okay. Just combines the forceable and+recursive arguments, so we can see if this gets all of them++>   where combine [] [] = []+>         combine ((con, d, all):cs) ((con',d',all'):cs')+>             | con == con' = (con, nub (d++d'), all):(combine cs cs')+>         droppedAll (con, d, args) = length d == length args++Horrible hack, sorry. It's an easy way to tell if a constructor is +from a collapsible type...++> isCollapsible x t = (show x++"_COLLAPSE") `elem` (transNames t)+> transNames = map tname+>    where tname (Trans n _ _) = n++> isNat :: [(Name, [Name], [(Name, ViewTerm)])] ->+>          [(Name, [Name], [(Name, ViewTerm)])] ->+>           Maybe (Name, Name)+> isNat force recs = nt' force recs [] where+>     nt' [] [] acc = nattable' (sortBy cmprec acc)+>     nt' ((f, fargs, targs):fs) ((r, rargs, _):rs) acc+>     -- we know f = r, from how they were built+>          = nt' fs rs ((f, length targs, length fargs, length rargs):acc)+>     cmprec (_,_,_,x) (_,_,_,y) = compare x y++Ordered by number of recursive arguments+If there's two constructors, one with 0 recursive arguments and all others +force, one with 1 recursive argument and all others force, it can be +transformed to Nat.++> nattable' :: [(Name, Int, Int, Int)] -> Maybe (Name, Name)+> nattable' [(z, ztot, zforce, 0), (s, stot, sforce, 1)]+>       | (ztot==zforce) && (stot-1 == sforce) +>            = Just (z, s)+> nattable' _ = Nothing++> collapseTrans :: Name -> (Name, ViewTerm) -> Transform+> collapseTrans n (c, ty) = Trans ((show n)++"_COLLAPSE")+>                            (Just (mkCollapseTrans n c ty (length (Ivor.TT.getArgTypes ty))))+>                            (Just (Collapse n c ty (length (Ivor.TT.getArgTypes ty))))++> mkCollapseTrans n c ty num = mkCollapse num+>    where mkCollapse num tm+>             | Name nty con <- getApp tm+>                 = let args = getFnArgs tm in+>                       if con == c && length args == num then+>                          Placeholder -- lose the lot+>                          else tm+>          mkCollapse _ tm = tm++> forceTrans :: Maybe (Name, Name) -> Int ->+>               (Name, [Name], [(Name, ViewTerm)]) -> Maybe Transform+> forceTrans Nothing _ (x, [], _) = Nothing+> forceTrans nat ncons (n, forced, tys)+>      = Just (Trans ((show n)++"_FORCE") (Just (mkForceTrans nat ncons n forced tys (length tys))) (Just (Force nat ncons n forced tys (length tys))))++If a term is n applied to (length tys) arguments, change it to+n applied to arguments minus the ones in forceable positions++> mkForceTrans nat ncons n forced tys num = mkForce num+>    where mkForce num tm+>             | Name nty con <- getApp tm+>                 = let fn = getApp tm+>                       args = getFnArgs tm +>                       nargs = zip (map fst tys) args in+>                   if con == n && length args == num then+>                       let app = forceapply ncons (Name nty (newname nat con)) +>                                       (map snd (filter notForced nargs)) in+>                           -- trace (show (app, con, nargs)) +>                           app+>                       else tm+>          mkForce _ tm = tm+>          forceapply 1 _ [x] = x+>          forceapply _ n args = apply n args+>          notForced (f, tm) = not (f `elem` forced)+>          newname Nothing n = n++If the type has the shape of a Nat, transform the constructors.++>          newname (Just (z, s)) n | n == z = name "O"+>                                  | n == s = name "S"++Given a constructor type, return all the names bound in it which+need not be stored (i.e. need not be bound)++> force :: Context -> ViewTerm -> [Transform] -> [Name]+> force ctxt tm acc = let rt = getReturnType tm+>                         atypes = Ivor.TT.getArgTypes tm+>                         rtargs = getFnArgs rt in+>                         nub $ concat (map conGuarded rtargs) ++ +>                            (map fst (filter collapse atypes))+>     where isVar n | elem n boundnames = True+>                   | otherwise =+>                       case nameType ctxt n of+>                         Right _ -> False+>                         _ -> True+>           boundnames = map fst (Ivor.TT.getArgTypes tm)+>           conGuarded t = cg [] t+>           cg acc (Name Bound x) | isVar x = x:acc -- variable name+>           cg acc (Name Free x) | isVar x = x:acc -- variable name+>           cg acc (Name DataCon _) = acc+>           cg acc (Name t x) = []+>           cg acc (App f a) = cg (acc++(cg [] a)) f+>           cg acc _ = []+>           collapse (n, ty)+>                | Name _ apn <- getApp ty+>                     = isCollapsible apn acc+>           collapse _ = False++Given a constructor type, return all the names bound in it which+are to recursive arguments of the datatype.+(TODO: Higher order recursive arguments too.)++> recArgs :: Name -> ViewTerm -> [Transform] -> [Name]+> recArgs tyname tm trans = map fst (filter isRec (Ivor.TT.getArgTypes tm))+>     where isRec (n, ty)+>                 | Name _ apn <- getApp ty+>                    = apn == tyname || isCollapsible apn trans+>           isRec _ = False+++Return whether constructor types are pairwise disjoint in their indices+--- takes a list of indices for each constructor++> pdisjoint :: Context -> [[ViewTerm]] -> Bool+> pdisjoint c [] = True+> pdisjoint c [x] = True+> pdisjoint c (x:xs) = pdisjoint c xs && (pdisjointWith x xs)+>   where pdisjointWith x [] = True+>         pdisjointWith x (y:ys) = disjoint (zip x y) && pdisjointWith x ys++Is there an argument position with a different constructor at the head?++>         disjoint xs = or (map disjointCon xs)+>         disjointCon (x, y)+>              | Name _ xn <- getApp x+>              , Name _ yn <- getApp y+>                 = case (nameType c xn, nameType c yn) of+>                     (Right DataCon, Right DataCon) -> +>                         if (xn /= yn) then True+>                            else disjoint (zip (getFnArgs x) (getFnArgs y)) +>                     _ -> False+>         disjointCon _ = False++If an argument position is a placeholder in all clauses in the idris+definition, and the corresponding argument position in the Ivor definition+is either a pattern or unused (modulo recursion), do this to it:++[[x]] => x +[[complex term]] => _++> getPlaceholders :: Context -> Name -> Patterns -> Patterns -> [Int]+> getPlaceholders ctxt n (Patterns ps) (Patterns ivps) +>        = getPlPos (noDiscriminate [0..(args ps)-1] ps) ps ivps+>    where+>      getPlPos acc [] [] = acc+>      getPlPos acc ((PClause args _ r):ps) ((PClause args' _ r'):ps')+>            = getPlPos (filter (plArg args args' r') acc) ps ps'+>      getPlPos acc ((PWithClause _ args _ _):ps) ((PClause args' _ r'):ps')+>            = getPlPos (filter (plArg args args' r') acc) ps ps'+>      getPlPos acc (_:ps) (_:ps')+>            = getPlPos acc ps ps'++>      plArg args args' r' x +>            = x<length args && args!!x == Placeholder && recGuard x n r' (namesIn (args'!!x))+>      args ((PClause args _ r):_) = length args+>      args ((PWithClause _ args _ (Patterns rest)):_) = length args+>      args [] = 0++Remove argument positions from the list where those arguments are needed+to discriminate. i.e., make sure the patterns are still pairwise disjoint +after removing them.++>      noDiscriminate :: [Int] -> [PClause] -> [Int]+>      noDiscriminate phs ps = indiscriminate phs (map pargs ps)+>          where pargs (PClause args _ _) = args+>                pargs (PWithClause _ args _ _) = args++Drop argument x, from all patterns, see if they are still pairwise disjoint.+If so, x can remain a placeholder position.++>      indiscriminate (x:xs) pats +>         = let pats' = map (blot x) pats+>               ok = pdisjoint ctxt pats' in+>              if ok then x:(indiscriminate xs pats') -- remove+>                    else indiscriminate xs pats -- don't remove+>      indiscriminate [] _ = []++>      blot i xs = take (i-1) xs ++ Placeholder:(drop (i+1) xs)++>      recGuard :: Int -> Name -> ViewTerm -> [Name] -> Bool++z must be used only as part of the ith argument to a call to fn. Anywhere+else, it can't be dropped.++>      recGuard i fn ret zs = and (map (recGuard' i fn ret) zs)+>      recGuard' i fn ret z +>          | Left _ <- nameType ctxt z+>        = let res = rgOK ret in+>           -- trace ("GUARD " ++ show (i,fn,z,ret,res)) +>            res                    +>        where rgOK ap@(App f a) = nthOK (getApp ap) (getFnArgs ap)+>              rgOK (Name _ x) = x /= z+>              rgOK (Lambda _ _ sc) = rgOK sc+>              rgOK (Let _ _ val sc) = rgOK val && rgOK sc+>              rgOK _ = True++>              nthOK (Name _ x) args+>                    | x == fn = and (map nOK (zip [0..] args))+>              nthOK f args = rgOK f && (and (map rgOK args))+>              nOK (argno, arg) | argno == i = True+>              nOK (_,arg) = rgOK arg+>      recGuard' i fn ret z = True++-          trace ("GUARD OK " ++ show (i,fn,tm,ret)) True++True -- Complex term, just drop it.++> makePTransform :: Ctxt IvorFun -> Context -> [Transform] ->+>                   (Name, (ViewTerm, Patterns)) -> [Transform]+> makePTransform raw ctxt ctrans (n, (ty, patsin)) +>   = let pats = transform ctxt ctrans [] n patsin in+>       case getPatternDef ctxt n of+>        Right (_, idpatsin) ->+>            let idpats = transform ctxt ctrans [] n idpatsin+>                numargs = args pats+>                placeholders = getPlaceholders ctxt n pats idpats in +>             -- trace (show (placeholders, n)) $+>                if (null placeholders) +>                 then []+>                 else [Trans (show n ++ "_dropargs") +>                             (Just (mkDropTrans n ty placeholders numargs))+>                             (Just (Drop n ty placeholders numargs))]+>        _ -> []+>    where+>      args (Patterns ((PClause args _ r):_)) = length args+>      args _ = 0++> mkDropTrans n ty pls num = doDrop pls num where+>      doDrop pls num tm+>         | Name nty fname <- getApp tm+>             = let fn = getApp tm+>                   args = getFnArgs tm in+>               if fname == n && length args == num then+>                   apply (Name nty fname) +>                         (map (simplArg pls) (zip [0..] args))+>                   else tm+>      doDrop _ _ tm = tm+>      -- simplArg pls (a, n@(Name _ _)) = n+>      simplArg pls (a, t) | a `elem` pls = Placeholder+>                          | otherwise = t++Look for arguments which are invariant across all patterns and calls. +If there's only one left, in position i, replace recursive calls with the +argument in position i. If the LHS and RHS of all patterns is the same in +the result, it's an identity function, so replace it with (id x) where x is+the argument in position i.++> makeIDTransform :: Ctxt IvorFun -> Context -> [Transform] ->+>                    (Name, (ViewTerm, Patterns)) -> [Transform]+> makeIDTransform raw ctxt ctrans (n, (ty, patsin@(Patterns (_:_))))+>   = let Patterns pats = transform ctxt ctrans [] n patsin +>         argpos = zip [0..] (arguments (pats!!0))+>         keepArgs = [0..length argpos-1] \\ (invariants argpos (map arguments pats))+>         trans = Trans (show n ++ "_ID") +>                       (Just (mkIDTrans n keepArgs (length argpos)))+>                       Nothing+>         stripInvs = map (stripInv trans) pats in+>          -- trace (show (n,stripInvs)) $+>          if (all (idClause keepArgs) stripInvs) +>             then [trans] else []++>    where invariants :: [(Int, ViewTerm)] -> [[ViewTerm]] -> [Int]+>          invariants invs [] = map fst invs+>          invariants invs (x:xs) = invariants (checkInv invs (zip [0..] x)) xs++>          checkInv [] args = args+>          checkInv ((p,a):invs) args +>              = checkInv invs (filter (isNotInv p a) args)++If the argument in the given position is not invariant, drop it. Otherwise+keep it, for now. (We're either looking at a different position, or it+is indeed invariant)++>          isNotInv p a (x,a') | p==x && a/=a' = False+>                              | otherwise = True++>          stripInv t (PClause args _ ret) = PClause args [] (doTrans t ret)+>          stripInv t w = w+>          idClause [k] t@(PClause args _ ret) | k<length args = args!!k == ret+>          idClause _ _ = False++> makeIDTransform raw ctxt ctrans _ = []++> mkIDTrans n [keep] arity tm+>         | Name nty fname <- getApp tm+>             = let fn = getApp tm+>                   args = getFnArgs tm in+>               if fname == n && length args == arity && keep<length args then+>                   args!!keep+>                   else tm++> mkIDTrans _ _ _ tm = tm++Dangerous: doesn't take account of argument lengths. Top level function+is transformed anyway.++ mkIDTrans n [keep] arity tm@(Name nty fname)+     = if fname == n then App (Name nty (name "id")) Placeholder else tm+++Apply all transforms in order to a term, eta expanding constructors first.++> applyTransforms :: Context -> [Transform] -> ViewTerm -> ViewTerm+> applyTransforms ctxt ts term +>     = foldl (flip doTrans) (etaExpand ctxt term) ts++> doTrans :: Transform -> ViewTerm -> ViewTerm+> doTrans (Trans nm (Just trans) _) tm = tr tm where+>     tr tm = {- if (nm=="Next_FORCE") then (trace (show tm) (tr' tm)) else -}+>             tr' tm+>     tr' (App f a) = trans (App (tr f) (tr a))+>     tr' (Lambda v ty sc) = trans (Lambda v (tr ty) (tr sc))+>     tr' (Forall v ty sc) = trans (Forall v (tr ty) (tr sc))+>     tr' (Let v ty val sc) = trans (Let v (tr ty) (tr val) (tr sc))+>     tr' (Annotation a t) = Annotation a (tr t)+>     tr' t = trans t++> etaExpand :: Context -> ViewTerm -> ViewTerm+> etaExpand ctxt tm = ec tm+>   where+>     ec ap@(App f a) +>         | Right (ar, con, args) <- needsExp (App f a)+>              = etaExp ar con args+>     ec ap@(App _ _) = let f = getApp ap+>                           args = getFnArgs ap in+>                           apply f (map ec args)+>     ec (Lambda n ty sc) = Lambda n (ec ty) (ec sc)++That's all the terms we care about.++>     ec x = x++>     needsExp ap = needsExp' ap []+>     needsExp' (App f a) as = needsExp' f ((ec a):as)+>     needsExp' nm@(Name _ n) as +>         = do ar <- getConstructorArity ctxt n+>              if (ar == length as) then ttfail "FAIL"+>                  else Right (ar, nm, as)+>     needsExp' _ _ = ttfail "FAIL"++We don't care about the type on the lambda here, We'll never look at it+even when compiling, it's just for the sake of having constructors fully+applied.++>     etaExp ar con args +>         = -- trace ("ETA " ++ show (ar,con,args)) $ +>             let newargs = map (\n -> (toIvorName (MN "exp" n)))+>                            [1..(ar-(length args))] in+>               addLam newargs (apply con (args++(map (Name Unknown) newargs)))+>     addLam [] t = t+>     addLam (n:ns) t = Lambda n Star (addLam ns t)+++Get the type of the constructor, look for constructor guarded arguments+in the return type, strip them.++If, in addition, there is an index with disjoint constructors *and* all +remaining arguments are recursive, transform all constructors to Unit.++ mkConTrans :: Ctxt IvorFun -> Context -> Name -> Name -> [Transform]+ mkConTrans raw ctxt ty = +     let Just cons = getConstructors ctxt ty++Given a constructor name, return the names and types of the arguments+which are not removed++> getRemaining :: Context -> Name -> [(Name, ViewTerm)]+> getRemaining = undefined++Given a constructor name, the names of arguments it has, and the names+of arguments to keep, make a transformation rule.++> mkTrans :: Name -> [Name] -> [Name] -> Transform+> mkTrans con args keep = Trans (show con ++ "_force") (Just trans) undefined+>    where trans tm = let (f,fargs) = (getApp tm, getFnArgs tm) in+>                        (tCon f fargs tm)+>          tCon fc@(Name _ fcon) fargs tm+>            | con == fcon = if (length args == length fargs)+>                              then apply fc (dropArgs fargs args keep)+>                              else tm+>          tCon _ _ t = t+>          dropArgs (f:fs) (a:as) keep+>                   | a `elem` keep = f:(dropArgs fs as keep)+>                   | otherwise = dropArgs fs as keep+>          dropArgs _ _ keep = []+>          ++> rebuildTrans :: TransData -> ViewTerm -> ViewTerm+> rebuildTrans (Force a b c d e f) = mkForceTrans a b c d e f+> rebuildTrans (Collapse a b c d) = mkCollapseTrans a b c d+> rebuildTrans (Drop a b c d) = mkDropTrans a b c d
+ Idris/Context.lhs view
@@ -0,0 +1,123 @@+> module Idris.Context(Ctxt, Id(..), addEntry, ctxtLookup, ctxtLookupName,+>                      ctxtAlist, newCtxt, appCtxt, alistCtxt) where++> import Data.List+> import qualified Data.Map as Map+> import Char++> import Debug.Trace++> data Id = UN String | MN String Int | NS Id Id+>    deriving (Eq, Ord)++> instance Show Id where+>     show (UN s) = s+>     show (MN s i) = "__" ++ s ++ "_" ++ show i+>     show (NS ns n) = show ns ++ "." ++ show n++> type Dict k v = Map.Map k v++Lifted this lot out since I had to change for backwards compatibility. ++> dictInsert :: Ord k => k -> v -> Dict k v -> Dict k v+> dictInsert = Map.insert+> dictElems = Map.elems+> dictAlist = Map.assocs+> dictEmpty = Map.empty++> dictLookup :: Ord k => k -> Dict k v -> Maybe v+> dictLookup = Map.lookup++Contexts containing names and type information A context is just a map+from a to b, but we'll keep it abstract in case we need or want+something better later++Contexts are divided into namespaces. Entries are added either to a defined namespace, or+the global namespace. Lookup will look for names in the current namespace then the global+namespace, and report an error on ambiguous names.++FIXME: Needs to be a map from names to all possibilities, which are then disambiguated.++> type Ctxt a = Dict (Maybe Id) [(Id, a)]++> type Err = String++> addEntry :: Ctxt a -> Maybe Id -> Id -> a -> Ctxt a+> addEntry ctxt using k v = let vs = cnames using ctxt in+>                               dictInsert using ((k,v):vs) ctxt++If name is fully qualified, just look in the right namespace.+Otherwise, first look in current namespace, then in global namespace.++> ctxtLookupName :: (Show a) => Ctxt a -> Maybe Id -> Id -> Either Err (a, Id)+> ctxtLookupName ctxt namespace (NS ns k) = undefined -- not implemented yet+> ctxtLookupName ctxt Nothing k+>         = case lookup k (cnames Nothing ctxt) of+>                    Just v -> Right (v, k)+>                    _ -> Left "No such var"+> ctxtLookupName ctxt ns@(Just namespace) k+>         = case lookup k (cnames ns ctxt) of+>             Just v -> Right (v, NS namespace k)+>             _ -> case lookup k (cnames Nothing ctxt) of+>                    Just v -> Right (v, k)+>                    _ -> Left "No such var"++> cnames ns ctxt = case dictLookup ns ctxt of+>                      Just vs -> vs+>                      _ -> []++> ctxtLookup :: (Show a) => Ctxt a -> Maybe Id -> Id -> Either Err a+> ctxtLookup ctxt namespace k = case ctxtLookupName ctxt namespace k of+>                                 Right (x, k) -> Right x+>                                 Left err -> Left err++> ctxtAlist :: Ctxt a -> [(Id,a)]+> ctxtAlist cs = reverse $ concat (Map.elems cs)++> alistCtxt :: [(Id, a)] -> Ctxt a+> alistCtxt [] = newCtxt+> alistCtxt ((x,y):xs) = addEntry (alistCtxt xs) Nothing x y++> newCtxt = dictEmpty++> appCtxt :: Ctxt a -> Ctxt a -> Ctxt a+> appCtxt xs ys = app' (nub (Map.keys xs)++(Map.keys ys))+>   where app' [] = dictEmpty+>         app' (n:ns) = let bothnames = (cnames n xs ++ cnames n ys) in+>                           dictInsert n bothnames (app' ns)++We need to keep insertion order, because when we add to ivor, we'd better insert them in+dependency order.++This doesn't quite work. We need a multimap or some other trickery, because things may be +declared, used, then defined with the same name, and that name has to map each time.++> {-++> type Ctxt a = Dict Id [(a, Int)]++> type Err = String++> addEntry :: Ctxt a -> Maybe Id -> Id -> a -> Ctxt a+> addEntry ctxt using k v = dictInsert k (v, Map.size ctxt) ctxt++> ctxtLookupName :: (Show a) => Ctxt a -> Maybe Id -> Id -> Either Err (a, Id)+> ctxtLookupName ctxt namespace k = case dictLookup k ctxt of+>                                 Just (x, _) -> Right (x, k)+>                                 Nothing -> Left "No such var"++> ctxtLookup :: (Show a) => Ctxt a -> Maybe Id -> Id -> Either Err a+> ctxtLookup ctxt namespace k = case ctxtLookupName ctxt namespace k of+>                                 Right (x, k) -> Right x+>                                 Left err -> Left err++> ctxtAlist :: Ctxt a -> [(Id,a)]+> ctxtAlist xs = map (\ (x, (d, o)) -> (x, d)) $ sortBy dep (dictAlist xs)+>     where dep (n, (def, o)) (n', (def', o')) = compare o o'++> newCtxt = dictEmpty++> appCtxt :: Ctxt a -> Ctxt a -> Ctxt a+> appCtxt xs ys = Map.union xs ys++> -}
+ Idris/Fontlock.lhs view
@@ -0,0 +1,279 @@+> module Idris.Fontlock(htmlise,latexise) where++> import Data.Char+> import List++> import Idris.AbsSyntax+> import Idris.Lexer+> import Idris.Context++> data Markup = DC | TC | FN | CM | VV | KW | ST | CH | LCM+>             | BRK | SEC | SUBSEC +>             | TITLE | AUTHOR | HTML | LATEX | None+>   deriving Show++> hclass DC = "datacon"+> hclass TC = "typecon"+> hclass FN = "function"+> hclass CM = "comment"+> hclass VV = "variable"+> hclass KW = "keyword"+> hclass ST = "string"+> hclass CH = "string"+> hclass _ = ""++> mkMarkups :: Ctxt IvorFun -> [(String, Markup)]+> mkMarkups ctxt = map mkMarkup (map (\ (x,y) -> (x, rawDecl y)) (ctxtAlist ctxt))++> mkMarkup :: (Id, Decl) -> (String, Markup)+> mkMarkup (n, Fun _ _) = (show n, FN)+> mkMarkup (n, Fwd _ _ _) = (show n, FN)+> mkMarkup (n, TermDef _ _ _) = (show n, FN)+> mkMarkup (n, Prf _) = (show n, FN)+> mkMarkup (n, DataDecl _) = (show n, TC)+> mkMarkup (n, Constructor) = (show n, DC)+> mkMarkup (n, _) = (show n, VV)++> getMarkup :: String -> [(String, Markup)] -> Markup+> getMarkup x ms = case lookup x ms of+>                    Just m -> m+>                    Nothing -> VV++> markupText :: [(String, Markup)] -> String -> [(Markup, String)]+> markupText ms ('-':'-':' ':'I':'G':'N':'O':'R':'E':xs) = endIgnore ms xs+> markupText ms ('-':'-':'\n':xs) = (BRK, ""):markupText ms xs+> markupText ms ('-':'-':' ':'S':'e':'c':'t':'i':'o':'n':':':' ':xs) +>                = markupSECtoNewline SEC "" ms xs+> markupText ms ('-':'-':' ':'T':'i':'t':'l':'e':':':' ':xs) +>                = markupSECtoNewline TITLE "" ms xs+> markupText ms ('-':'-':' ':'L':'a':'T':'e':'X':':':' ':xs) +>                = markupSECtoNewline LATEX "" ms xs+> markupText ms ('-':'-':' ':'H':'T':'M':'L':':':' ':xs) +>                = markupSECtoNewline HTML "" ms xs+> markupText ms ('-':'-':' ':'A':'u':'t':'h':'o':'r':':':' ':xs) +>                = markupSECtoNewline AUTHOR "" ms xs+> markupText ms ('-':'-':' ':'S':'u':'b':'s':'e':'c':'t':'i':'o':'n':':':' ':xs) +>                = markupSECtoNewline SUBSEC "" ms xs+> markupText ms ('-':'-':xs) = markupCMtoNewline "" ms xs+> markupText ms ('{':'-':'>':xs) = markupText ms xs+> markupText ms ('>':'-':'}':xs) = markupText ms xs+> markupText ms ('{':'-':'-':xs) = markupLCM "" ms xs+> markupText ms ('{':'-':xs) = markupCM "" ms xs+> markupText ms ('\'':c:'\'':xs) = (CH, ['\'',c,'\'']):markupText ms xs+> markupText ms ('"':xs) = markupString ms xs+> markupText ms ('%':xs) = markupSpecial ms xs+> markupText ms ('\t':xs) = (None, "        "):markupText ms xs+> markupText ms (c:cs)+>       | isAlpha c || c=='_' = markupVar ms (c:cs)+> markupText ms (c:cs) = (None, [c]):markupText ms cs++> markupText ms [] = []++> keywords = ["proof","data","using","idiom","params","namespace","module",+>             "import","export","inline","where","partial","syntax","lazy",+>             "infix","infixl","infixr","do","refl","if","then","else","let",+>             "in","return","include","exists", "with"]+> types = ["String","Int","Char","Float","Ptr","Lock","Handle"]++> markupSpecial ms cs = case span isAllowed cs of+>      (var,rest) -> (None, '%':var):(markupText ms rest)++> markupVar ms cs = case span isAllowed cs of+>      (var,rest) -> if (var `elem` keywords) +>                       then (KW, var):(markupText ms rest)+>                       else if (var `elem` types) +>                         then (TC, var):(markupText ms rest)+>                         else (getMarkup var ms, var):(markupText ms rest)++> markupCMtoNewline acc ms ('\n':xs) = (CM, "--"++reverse acc):+>                                        markupText ms ('\n':xs)+> markupCMtoNewline acc ms (x:xs) = markupCMtoNewline (x:acc) ms xs+> markupCMtoNewline acc ms [] = (CM, "--"++reverse acc):[]++> markupSECtoNewline sec acc ms ('\n':xs) = (sec, reverse acc):+>                                        markupText ms ('\n':xs)+> markupSECtoNewline sec acc ms (x:xs) = markupSECtoNewline sec (x:acc) ms xs+> markupSECtoNewline sec acc ms [] = (sec, reverse acc):[]++> markupCM acc ms ('-':'}':xs) = (CM, "{-"++reverse acc++"-}"):markupText ms xs+> markupCM acc ms (x:xs) = markupCM (x:acc) ms xs+> markupCM acc ms [] = (CM, "{-"++reverse acc):[]++> markupLCM acc ms ('-':'-':'}':xs) = (LCM, reverse acc):markupText ms xs+> markupLCM acc ms (x:xs) = markupLCM (x:acc) ms xs+> markupLCM acc ms [] = (LCM, reverse acc):[]++> endIgnore ms ('-':'-':' ':'S':'T':'A':'R':'T':'\n':xs) = markupText ms xs+> endIgnore ms (x:xs) = endIgnore ms xs+> endIgnore ms [] = []++> markupString ms xs = case getstr xs of+>                        Just (str, rest, nls) -> (ST, show str):markupText ms rest++> htmlise :: Ctxt IvorFun -> FilePath -> FilePath -> Maybe FilePath -> IO ()+> htmlise ctxt fp outf style +>                      = do txt <- readFile fp+>                           let ms = mkMarkups ctxt+>                           let mtxt = markupText ms txt+>                           writeFile outf (renderHTML fp style mtxt)++> latexise :: Ctxt IvorFun -> FilePath -> FilePath -> IO ()+> latexise ctxt fp outf = do txt <- readFile fp+>                            let ms = mkMarkups ctxt+>                            let mtxt = markupText ms txt+>                            writeFile outf (renderLatex mtxt)++> skipnl :: [(Markup, String)] -> [(Markup, String)]+> skipnl ((None, "\n"):xs) = skipnl xs+> skipnl xs = xs++> skipIfBrk :: [(Markup, String)] -> [(Markup, String)]+> skipIfBrk xs = si xs xs+>    where si orig next@((BRK, _):xs) = next+>          si orig next@((TITLE, _):xs) = next+>          si orig next@((HTML, _):xs) = next+>          si orig next@((LATEX, _):xs) = next+>          si orig next@((AUTHOR, _):xs) = next+>          si orig next@((SEC, _):xs) = next+>          si orig next@((SUBSEC, _):xs) = next+>          si orig next@((LCM, _):xs) = next+>          si orig ((None, "\n"):xs) = si orig xs+>          si orig _ = orig++> renderHTML :: String -> Maybe String -> [(Markup, String)] -> String+> renderHTML title style ms = htmlHeader title style ++ +>                       "<code>\n" ++ html (skipIfBrk ms) ++ "\n</code>\n\n</body></html>"+>   where +>     html [] = ""+>     html ((None, "\n"):xs) = tHtml "\n" ++ html (skipIfBrk xs)+>     html ((None, t):xs) = tHtml t ++ html xs+>     html ((TITLE, t):xs) +>        = "</code>\n\n<h2>" ++ t ++ "</h2>\n\n<code>" ++ html (skipnl xs)+>     html ((HTML, t):xs) +>        = "</code>\n\n<p>" ++ t ++ "</p>\n\n<code>" ++ html (skipnl xs)+>     html ((LATEX, t):xs) +>        = html (skipnl xs)+>     html ((AUTHOR, t):xs) +>        = -- "</code>\n\n<h4>Author: " ++ t ++ "</h4>\n\n<code>" ++ +>          "</code>" ++ sechead xs ++ "\n\n<code>" ++ html (skipnl xs)+>     html ((SEC, t):xs) +>        = "</code><a name=\"" ++ secname t ++ "\">\n\n<h3>" ++ t ++ "</h3>\n\n<code>" ++ html (skipnl xs)+>     html ((SUBSEC, t):xs) +>        = "</code>\n\n<h4>" ++ t ++ "</h4>\n\n<code>" ++ html (skipnl xs)+>     html ((BRK, t):xs) = tHtml t ++ html xs+>     html ((LCM, t):xs) = "</code>\n\n<p class=\"explanation\">" ++ tpara 0 t ++ "</p>\n\n<code>" ++ html (skipnl xs)+>     html ((m, t):xs) = "<span class=\"" ++ hclass m ++ "\">" ++ tHtml t ++ +>                        "</span>" ++ html xs+>     tHtml = concat.(map th) ++>     th ' ' = "&nbsp;"+>     th '\n' = "</code><br>\n<code>"+>     th x = [x]++>     tpara l [] = ""+>     tpara l ('"':xs) = case getstr xs of+>                        Just (str,rest,_) -> "<code>" ++ tpara l str ++ "</code>" +++>                                             tpara l rest+>                        _ -> error xs+>     tpara l ('U':'R':'L':'[':xs) =+>         case span (/=']') xs of+>           (url, ']':rest) -> "<a href=\"" ++ url ++ "\">" ++ url ++ "</a>"+>                          ++ tpara l rest+>     tpara l ('\\':'/':xs) = '/':tpara l xs +>     tpara l ('\\':'\\':xs) = '\\':tpara l xs +>     tpara l ('\\':'"':xs) = '"':tpara l xs +>     tpara l ('\\':'*':xs) = '*':tpara l xs +>     tpara l ('/':xs) =+>         case span (/='/') xs of+>           (txt, '/':rest) -> "<em>" ++ txt ++ "</em>" ++ tpara l rest+>     tpara l ('*':xs) = case span (=='*') xs of+>                          (_,rest) -> "<li>" ++ tpara l rest+>     tpara l ('\n':'\n':'*':xs) = "<ul>\n" ++ tpara (l+1) ('*':xs)+>     tpara l ('\n':'\n':xs) = "\n</p>\n<p>\n" ++ tpara l xs+>     tpara l ('\n':'-':xs) = if (l>0) then "</ul>" ++ tpara (l-1) xs +>                                       else "</p><p>" ++ tpara l xs+>     tpara l ('<':xs) = "&lt;"++ tpara l xs+>     tpara l (x:xs) = x:(tpara l xs)++> htmlHeader title style+>                = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\">" +++>                  "<html><head><title>" ++ title ++ "</title>\n" +++>                  defaultStyle style ++ "</head><body>"++> secname t = take 10 (filter isAlpha t)++> getsecs [] = []+> getsecs ((SEC,t):xs) = ("<a href=\"#" ++ (secname t) ++"\">"++ t ++ "</a>"):(getsecs xs)+> getsecs (_:xs) = getsecs xs++> sechead ms = let ss = getsecs ms in+>              if null ss then "" +>                         else concat (intersperse " | " (getsecs ms)) ++ "<br>"++> defaultStyle Nothing +>                  = "<style type=\"text/css\">\n" +++>                    "." ++ hclass DC ++ " {\n  color:red; font-family: Courier;\n}\n" ++ +>                    "." ++ hclass TC ++ " {\n  color:blue; font-family: Courier;\n}\n" ++ +>                    "." ++ hclass FN ++ " {\n  color:green; font-family: Courier;\n}\n" ++ +>                    "." ++ hclass VV ++ " {\n  color:purple; font-family: Courier;\n}\n" ++ +>                    "." ++ hclass CM ++ " {\n  color:darkred; font-family: Courier;\n}\n" ++ +>                    "." ++ hclass ST ++ " {\n  color:gray; font-family: Courier;\n}\n" ++ +>                    "." ++ hclass KW ++ " {\n  color:black;\n  font-family: Courier; font-weight:bold;\n}\n" ++ +>                    "p.explanation {\n  color:black;\n}\n" +++>                    "BODY, SPAN {\n  font-family: Tahoma;\n" +++>                    "  color:  #000020;\n  background: #f0f0f0;\n}\n" +++>                    "</style>"+> defaultStyle (Just s) = "<link rel=\"stylesheet\" type=\"text/css\" href=\"" ++ s ++ "\">"++> renderLatex :: [(Markup, String)] -> String+> renderLatex ms = latexHeader ++ latex 0 (skipIfBrk ms) ++ "\n\n\\end{document}"+>   where +>     latex i [] = usev i+>     latex i ((None, "\n"):xs) = "\n" ++ latex i (skipIfBrk xs)+>     latex i ((None, t):xs) = t ++ latex i xs+>     latex i ((BRK, t):xs) = usev i ++ startv (i+1) ++ latex (i+1) xs+>     latex i ((TITLE, t):xs) = "\\title{" ++ t ++ "}\n" ++ latex i (skipnl xs)+>     latex i ((HTML, t):xs) = latex i (skipnl xs)+>     latex i ((AUTHOR, t):xs) = "\\author{" ++ t ++ "}\n\\maketitle\n\n" ++ startv i ++ latex i (skipnl xs)+>     latex i ((SEC, t):xs) = usev i ++ "\\section{" ++ t ++ "}\n\n" ++ startv (i+1) ++ latex (i+1) (skipnl xs)+>     latex i ((SUBSEC, t):xs) = usev i ++ "\\subsection{" ++ t ++ "}\n\n" ++ startv (i+1) ++ latex (i+1) (skipnl xs)+>     latex i ((LCM, t):xs) = usev i ++ tpara 0 t ++ "\n\n" ++ startv (i+1) ++ latex (i+1) (skipnl xs)+>     latex i ((LATEX, t):xs) = usev i ++ tpara 0 t ++ "\n\n" ++ startv (i+1) ++ latex (i+1) (skipnl xs)+>     latex i ((m, t):xs) = "^" ++ show m ++ "@" ++ t ++ "!"+>                               ++ latex i xs++>     tpara l [] = ""+>     tpara l ('"':xs) = case getstr xs of+>                        Just (str,rest,_) -> "\\texttt{" ++ tpara l str ++ "}" +++>                                             tpara l rest+>     tpara l ('U':'R':'L':'[':xs) =+>         case span (/=']') xs of+>           (url, ']':rest) -> "\\url{" ++ url ++ "}" ++ tpara l rest+>     tpara l ('/':'/':xs) = '/':tpara l xs+>     tpara l ('/':xs) =+>         case span (/='/') xs of+>           (txt, '/':rest) -> "\\emph{" ++ txt ++ "}" ++ tpara l rest+>           (txt, rest) -> "\\emph{" ++ txt ++ "}" ++ tpara l rest+>     tpara l ('~':xs) = "\\~{ }" ++ tpara l xs+>     tpara l ('#':xs) = "\\#" ++ tpara l xs+>     tpara l ('\n':'\n':'*':xs) = "\n\\begin{itemize}\n" ++ tpara (l+1) ('*':xs)+>     tpara l ('\n':'-':xs) = if (l>0) then "\\end{itemize}" ++ tpara (l-1) xs +>                                       else "\n\n" ++ tpara l xs+>     tpara l ('*':xs) = case span (=='*') xs of+>                          (_,rest) -> "\\item " ++ tpara l rest+>     tpara l (x:xs) = x:(tpara l xs)++>     usev i = "\n\\end{SaveVerbatim}\n\\BUseVerbatim{vbtm" ++ show i ++ "}\n\n"+>     startv i = "\\begin{SaveVerbatim}[commandchars=^@!]{vbtm" ++ show i ++ "}\n\n"+++> latexHeader = "\\documentclass[a4paper]{article}\n" +++>   "\n\\usepackage{fancyvrb}\n\\usepackage{color}\n\\usepackage{url}\n\n\\begin{document}\n\n" +++>   "\\newcommand{\\" ++ show DC ++ "}[1]{\\textcolor[rgb]{0.8,0,0}{#1}}\n" +++>   "\\newcommand{\\" ++ show TC ++ "}[1]{\\textcolor[rgb]{0,0,0.8}{#1}}\n" +++>   "\\newcommand{\\" ++ show FN ++ "}[1]{\\textcolor[rgb]{0,0.5,0}{#1}}\n" +++>   "\\newcommand{\\" ++ show VV ++ "}[1]{\\textcolor[rgb]{0.5,0,0.5}{#1}}\n" +++>   "\\newcommand{\\" ++ show CM ++ "}[1]{\\textcolor[rgb]{0.4,0.2,0.2}{#1}}\n" +++>   "\\newcommand{\\" ++ show KW ++ "}[1]{\\textcolor[rgb]{0,0,0}{#1}}\n" +++>   "\\newcommand{\\" ++ show ST ++ "}[1]{\\textcolor[rgb]{0.4,0.4,0.4}{#1}}\n"+
+ Idris/LambdaLift.lhs view
@@ -0,0 +1,315 @@+> {-# OPTIONS_GHC -fglasgow-exts #-}++> module Idris.LambdaLift where++> import Idris.AbsSyntax+> import Idris.PMComp+> import Ivor.TT+> +> import Control.Monad.State+> import Data.Typeable+> import Debug.Trace+> import Maybe++> import List++This is the language we're converting directly into Epic code, and the+output of the lambda lifter++SCFun is a top level function, with C export name, list of args, code for the body.++> data SCFun = SCFun [SCOpt] [Name] SCBody +>    deriving Show++> data SCOpt = SCInline | SCStrict | SCExport String+>    deriving (Show, Eq)++> getEName [] = Nothing+> getEName (SCExport n : xs) = Just n+> getEName (_:xs) = getEName xs++> data SCBody = SVar Name+>             | SCon Name Int+>             | SApp SCBody [SCBody]+>             | SLet Name SCBody SCBody+>             | SCCase SCBody [SCAlt]+>             | SIf SCBody SCBody SCBody+>             | SIfZero SCBody SCBody SCBody+>             | SUnit -- for anything that has no runtime meaning, eg types+>             | SInfix Op SCBody SCBody+>             | SIOOp SCIO+>             | SConst Constant+>             | SLazy SCBody+>             | SError+>    deriving (Show, Eq)++Case alternatives, could be a constructor (with tag), a constant, or+a default case++> data SCAlt = SAlt Name Int [Name] SCBody+>            | SConstAlt Constant SCBody+>            | SDefault SCBody+>    deriving (Show, Eq)++It's useful to be able to sort alternatives by tag, for transformation +purposes, since once they're compiled order doesn't matter.++> instance Ord SCAlt where+>   compare (SAlt _ t _ _) (SAlt _ u _ _) = compare t u+>   compare (SConstAlt c _) (SConstAlt d _) = compare c d+>   compare (SDefault _) (SDefault _) = EQ+>   compare (SAlt _ _ _ _) _ = LT+>   compare (SConstAlt _ _) (SAlt _ _ _ _) = GT+>   compare (SConstAlt _ _) (SDefault _) = LT+>   compare (SDefault _) _ = GT++Built-in IO operations ++> data SCIO = PutStr SCBody+>           | GetStr +>           | Fork SCBody+>           | NewLock SCBody+>           | DoLock SCBody+>           | DoUnlock SCBody+>           | NewRef+>           | ReadRef SCBody+>           | WriteRef SCBody SCBody+>    deriving (Show, Eq)++Any lambdas in the body need to be made functions in their own right,+with names in scope passed as arguments.++We should try to collect sequences of lambdas, e.g. \x \y \z . e +and lift x,y,z all at once.++We are assuming that all names are already unique, and we're not going+to be inventing any new variable names, just new function names. This+should be guaranteed in the underlying Ivor term.++Inside every ViewTerm, pull out the new SCs and replace lambdas with +application of new SC. First step, just lift lambda out. ++Note that we're not fussy about maintaining types here (we've already broken+things by making the case trees anyway). It would, perhaps, be useful to keep+an eye on where the primitive types are though.++LiftState carries the next name, and a list of new functions with +name, arguments, body++> data LiftState = SCS Int [(Name, [Name], SimpleCase)] ++> lambdaLift :: Context -> IdrisState -> Name -> [Name] -> +>               SimpleCase -> [(Name, [Name], SimpleCase)]+> lambdaLift ctxt ist root args sc +>        = let -- scEta = expandCons ctxt sc -- Forcing does this! If we+>              -- do it again, we undo some of the work forcing has done since+>              -- we've reduced arity there.+>              (body, SCS _ defs) = runState (liftSC args sc) (SCS 0 []) in+>                  addRoot root args body defs+>    where liftSC env (SCase tm alts) = do tm' <- lift env tm+>                                          alts' <- mapM (liftAlt env) alts+>                                          return (SCase tm' (sort alts'))+>          liftSC env (Tm t) = do t' <- lift env t+>                                 return (Tm t')+>          liftSC env x = return x++>          liftAlt env (Alt c i args sc) = do sc' <- liftSC (env++args) sc+>                                             return (Alt c i args sc')+>          liftAlt env (ConstAlt c sc) = do sc' <- liftSC env sc+>                                           return (ConstAlt c sc)+>          liftAlt env (Default sc) = do sc' <- liftSC env sc+>                                        return (Default sc)++First argument says whether to eta expand++>          lift env (Lambda n ty sc) = liftLam env [n] sc+>          lift env (App f a) = do f' <- lift env f+>                                  a' <- lift env a+>                                  return (App f' a')++>          lift env (Let n ty val sc) = do val' <- lift env val+>                                          sc' <- lift (n:env) sc+>                                          return (Let n ty val' sc')+>          -- and that's all the nested terms we care about+>          lift env x = return x++Hoover up all the arguments to nested lambdsa, and make a new function.+with env and newargs. Apply it to the environment only.++FIXME: Invent a unique name for the lifted arg n. Epic can deal with it, but it's still+a bit unpleasant.++>          liftLam env newargs (Lambda n ty sc) +>                      = liftLam env (newargs++[n]) sc+>          liftLam env newargs x = do+>              x' <- lift (env++newargs) x+>              newFn <- getNewSC+>              -- new function is \ env newargs -> x'+>              addFn newFn (env++newargs) (Tm x')+>              -- new body is (newFn @ env)+>              return (apply (Name Unknown newFn)+>                            (map (Name Unknown) env))++>          getNewSC = do SCS i bs <- get+>                        put (SCS (i+1) bs)+>                        return (name (show (MN (show root) i)))++>          addFn name args body = do SCS i bs <- get+>                                    put (SCS i ((name,args,body):bs))++We need to make sure all constructors are fully applied before we start++> expandCons ctxt sc = ec' sc+>   where+>     ec' (Tm tm) = Tm (ec tm)+>     ec' (SCase tm alts) = SCase (ec tm) (map ecalt alts)+>     ec' x = x+>     ecalt (Alt n i ns sc) = Alt n i ns (ec' sc)+>     ecalt (ConstAlt c sc) = ConstAlt c (ec' sc)+>     ecalt (Default sc) = Default (ec' sc)++>     ec ap@(App f a) +>         | Right (ar, con, args) <- needsExp (App f a)+>              = etaExp ar con args+>     ec (App f a) = App f (ec a)+>     ec (Lambda n ty sc) = Lambda n (ec ty) (ec sc)++That's all the terms we care about.++>     ec x = x++>     needsExp ap = needsExp' ap []+>     needsExp' (App f a) as = needsExp' f ((ec a):as)+>     needsExp' nm@(Name _ n) as +>         = do ar <- getConstructorArity ctxt n+>              if (ar == length as) then ttfail "FAIL"+>                  else Right (ar, nm, as)+>     needsExp' _ _ = ttfail "FAIL"++We don't care about the type on the lambda here, We'll never look at it+even when compiling, it's just for the sake of having constructors fully+applied.++>     etaExp ar con args +>         = let newargs = map (\n -> (toIvorName (MN "exp" n)))+>                            [1..(ar-(length args))] in+>               addLam newargs (apply con (args++(map (Name Unknown) newargs)))+>     addLam [] t = t+>     addLam (n:ns) t = Lambda n Star (addLam ns t)++Second step, turn the lambda lifted SimpleCases into SCFuns, translating +IO operations and do notation as we go. Pass relevant function flags through++> scFun :: Context -> IdrisState -> Id -> [Name] -> SimpleCase -> SCFun+> scFun ctxt ist fn args lifted = SCFun mkOpts args (toSC ctxt ist lifted)+>    where mkOpts' = do ifn <- ctxtLookup (idris_context ist) Nothing fn+>                       let decl = rawDecl ifn+>                       let opts = if (null (lazyArgs ifn)) +>                                    then [SCStrict] else []+>                       return $ opts ++ mapMaybe mkSCOpt (funFlags ifn)+>                       {- exp <- case decl of+>                           Fun _ fls -> getExpFlag fls+>                           TermDef _ _ fls -> getExpFlag fls+>                            _ -> fail "" -}++>          mkOpts = case mkOpts' of+>                         Left _ -> []+>                         Right x -> x++>          mkSCOpt (CExport str) = Just $ SCExport str+>          mkSCOpt Inline = Just $ SCInline+>          mkSCOpt _ = Nothing++> class ToSC a where+>     toSC :: Context -> IdrisState -> a -> SCBody++> instance ToSC SimpleCase where+>     toSC c ist ErrorCase = SError+>     toSC c ist Impossible = SError+>     toSC c ist (Tm vt) = toSC c ist vt+>     toSC c ist (SCase vt alts) = SCCase (toSC c ist vt) (map toSCa alts)+>        where toSCa (Alt n i ns sc) = SAlt n i ns (toSC c ist sc)+>              toSCa (ConstAlt v sc) = SConstAlt v (toSC c ist sc)+>              toSCa (Default sc)  = SDefault (toSC c ist sc)++> instance ToSC ViewTerm where+>     toSC ctxt ist t = sc' t [] where+>        sc' (Name _ n) args +>          | n == toIvorName (UN "__Prove_Anything")+>            -- we can't actually use this value!+>             = SCon (toIvorName (UN "__FAKE")) 0 +>          | n == toIvorName (UN "__Suspend_Disbelief") -- arbitrary refl+>             = scapply ist (SCon (toIvorName (UN "refl")) 0) args -- can't actually use this either+>          | otherwise+>             = case getConstructorTag ctxt n of+>                   Right i -> scapply ist (SCon n i) args+>                   _ -> case nameType ctxt n of+>                                  Right TypeCon -> SUnit+>                                  _ -> scapply ist (SVar n) args+>        sc' (App f a) args = sc' f ((sc' a []):args)+>        sc' (Let n ty val x) args +>                = scapply ist (SLet n (sc' val []) (sc' x [])) args++Chars are just treated as Ints by the compiler, so convert here.++>        sc' (Constant c) [] +>            = case (cast c)::Maybe Int of+>                 Just i -> SConst (Num i)+>                 Nothing -> case (cast c)::Maybe String of+>                                Just s -> SConst (Str s)+>                                Nothing -> case (cast c)::Maybe Char of+>                                             Just c -> SConst (Num (fromEnum c))+>        sc' (Annotation _ x) args = sc' x args+>        sc' x args = SUnit -- no runtime meaning++scapply deals with special cases for infix operators, IO, etc.++> scapply :: IdrisState -> SCBody -> [SCBody] -> SCBody++Infix operators++> scapply ist (SVar n) [x,y]+>         | Just op <- getOp n allOps = SInfix op x y+> scapply ist (SVar n) [_,_,_,_]+>         | n == opFn JMEq = SUnit++ scapply ist (SVar n) [_,x,y]+         | n == opFn OpEq = SInfix OpEq x y++> scapply ist f [] = f++> scapply ist (SVar n) args+>         = let raw = idris_context ist in+>           case ctxtLookup raw Nothing (fromIvorName n) of+>             Left _ -> SApp (SVar n) args+>             Right ifn -> let ia = implicitArgs ifn+>                              lz = lazyArgs ifn +>                              args' = makeLazy (map (ia+) lz) args in+>                              SApp (SVar n) args'+> scapply ist (SCon n i) args+>         = let raw = idris_context ist in+>           case ctxtLookup raw Nothing (fromIvorName n) of+>             Left _ -> SApp (SCon n i) args+>             Right ifn -> let ia = implicitArgs ifn+>                              lz = lazyArgs ifn +>                              args' = makeLazy (map (ia+) lz) args in+>                              SApp (SCon n i) args'++Everything else++> scapply ist f args = SApp f args++> makeLazy :: [Int] -> [SCBody] -> [SCBody]+> makeLazy lz args = zipWith ml' +>                       (map (\x -> elem x lz) [0..(length args-1)]) args+>   where ml' True arg = SLazy arg+>         ml' False arg = arg++> addRoot :: Name -> [Name] -> SimpleCase -> [(Name, [Name], SimpleCase)] +>            -> [(Name, [Name], SimpleCase)] +> addRoot root [] body@(Tm (Name _ n)) defs =+>         case lookupT n defs of+>           Just (as,b) -> (root, as, b):defs+>           _ -> (root, [], body):defs+>     where lookupT n ds = lookup n (map (\ (x,y,z) -> (x, (y,z))) ds)+> addRoot root args body defs = (root, args, body):defs
+ Idris/Latex.lhs view
@@ -0,0 +1,151 @@+> {-# OPTIONS_GHC -fglasgow-exts #-}++> module Idris.Latex(latexDump,latexDefs) where++> import Idris.AbsSyntax+> import Debug.Trace++> latexDefs :: [String] -> [(Id,String)]+> latexDefs [] = []+> latexDefs (d:ds) = case span (/='=') d of+>                      (i,a:def) -> (UN i, def):(latexDefs ds)+>                      _ -> latexDefs ds++> latexDump :: Ctxt IvorFun -> [(Id,String)] -> Id -> IO ()+> latexDump ctxt defs nm = case ctxtLookup ctxt Nothing nm of+>                            Right fn -> putStrLn $ latex ctxt defs fn+>                            Left _ -> do putStrLn "No such name"+>                                         return ()++> class LaTeX a where+>     latex :: Ctxt IvorFun -> [(Id, String)] -> a -> String++> instance LaTeX Id where+>     latex ctxt defs n +>         = case lookup n (defs++ldefs) of+>             Just l -> l+>             Nothing -> case ctxtLookup ctxt Nothing n of+>                          Right (IvorFun _ _ _ _ d _ _) -> ty d (show n)+>                          Left _ -> "\\VV{" ++ show n ++ "}"+>         where ty (DataDecl _) n = "\\TC{" ++ n ++ "}"          +>               ty Constructor n = "\\DC{" ++ n ++ "}"+>               ty _ n = "\\FN{" ++ n ++ "}"+>               ldefs = case ctxtLookup ctxt Nothing (MN "latex" 0) of+>                         Right (IvorFun _ _ _ _ (LatexDefs ds) _ _) -> ds+>                         Left _ -> []++> instance LaTeX IvorFun where+>     latex ctxt defs (IvorFun nm ty _ _ decl _ _) = latex ctxt defs decl++> instance LaTeX Decl where+>     latex ctxt defs (DataDecl (Datatype id ty cons _ _ _ _))+>           = "\\DM{\\AR{\n\\Data\\hg\\:" ++ +>             latex ctxt defs id ++ "\\:\\Hab\\:\\AR{" +++>             latex ctxt defs ty ++ "\\hg\\Where}\\\\ \n\\begin{array}{rl}\n" ++ +>                     conList (map (latex ctxt defs) cons) +++>                             "\\end{array}\n}}"+>        where conList [] = ""+>              conList [a] = " & " ++ a ++ "\n"+>              conList (a:as) = " & " ++ a ++ "\\\\ \n \\mid" ++ conList as +>     latex ctxt defs (Fun f _) = latex ctxt defs f+>     latex ctxt defs (TermDef n tm _) = "\\DM{" ++ latex ctxt defs n ++ "\\:=\\:" ++ latex ctxt defs tm ++ "}"+>     latex ctxt defs (Fwd n ty _) = "\\DM{" ++ latex ctxt defs n ++ "\\:\\Hab\\:\\AR{" ++ latex ctxt defs ty ++ "}}"+>     latex ctxt defs _ = "Can't LaTeXify this"+>                                ++> instance LaTeX Function where+>     latex ctxt defs (Function n ty clauses _ _) =+>         "\\DM{\\AR{\n" +++>         latex ctxt defs n ++ "\\:\\Hab\\:\\AR{" ++ latex ctxt defs ty ++ "}\\\\ \n" +++>         latexClauses clauses ++ "}}"+>        where latexClauses [] = ""+>              latexClauses cs@((n,(RawClause lhs rhs)):_) =+>                  let arity = length (getRawArgs lhs) in+>                         "\\PA{" ++ concat (take arity (repeat "\\A")) ++ +>                         "}{" +++>                         concat (map (latex ctxt defs) cs) ++ "}"++> instance LaTeX RawClause where+>     latex ctxt defs (RawClause lhs rhs)+>                 = let args = getRawArgs lhs+>                       fn = getFn lhs in+>                       showArgs (fn:args) ++ " & \\Ret{" ++ +>                                latex ctxt defs rhs ++ "}\\\\ \n"+>         where+>             showArgs [] = ""+>             showArgs (a:as) = " & " ++ bracket (latex ctxt defs a) ++ showArgs as+>             bracket x | ':' `elem` x = "(" ++ x ++ ")"+>                       | otherwise = x++Type/term pairs++> instance (LaTeX a) => LaTeX (a,RawTerm) where+>     latex ctxt defs (tm,ty) = latex ctxt defs tm ++ "\\:\\Hab\\:\\AR{" ++ latex ctxt defs ty ++ "}"++Clauses++> instance (LaTeX a) => LaTeX (a,RawClause) where+>     latex ctxt defs (nm,clause) = latex ctxt defs clause++Constants++> instance LaTeX Constant where+>     latex ctxt defs TYPE = "\\Type"+>     latex ctxt defs StringType = "\\TC{String}"+>     latex ctxt defs IntType = "\\TC{Int}"+>     latex ctxt defs FloatType = "\\TC{Float}"+>     latex ctxt defs (Builtin s) = "\\TC{" ++ s ++ "}"+>     latex ctxt defs n = show n++Main bit for terms++> instance LaTeX RawTerm where+>     latex ctxt defs tm = showP 10 tm where+>        showP p (RVar _ _ (UN "__Unit")) = "()"+>        showP p (RVar _ _ (UN "__Empty")) = "\\bottom"+>        showP p (RVar _ _ i) = latex ctxt defs i+>        showP p RRefl = "\\DC{refl}"+>        showP p RPlaceholder = "\\_"+>        showP p (RApp _ _ f a) = bracket p 1 $ showP 1 f ++ "\\:" ++ showP 0 a+>        showP p (RAppImp _ _ n f a) = showP 1 f+>        showP p (RBind n (Lam ty) sc)+>           = bracket p 2 $ +>             "\\lambda\\VV{" ++ show n ++ "}." ++ showP 10 sc+>        showP p (RBind n (Pi Ex _ ty) sc)+>           | internal n -- hack for spotting unused names quickly!+>              = bracket p 2 $ showP 1 ty ++ "\\to" ++ showP 10 sc+>           | otherwise+>              = bracket p 2 $+>                "(\\VV{" ++ show n ++ "} \\Hab " ++ showP 10 ty ++ ")\\to" +++>                       showP 10 sc+>          where internal (UN ('_':'_':_)) = True+>                internal (MN _ _) = True+>                internal _ = False+>        showP p (RBind n (Pi Im _ ty) sc)+>              = bracket p 2 $ showP 10 sc+>        showP p (RBind n (RLet val ty) sc)+>           = bracket p 2 $+>             "\\LET:\\VV{" ++ show n ++ "}\\: = " ++ showP 10 val+>                    ++ "\\:\\IN\\:" ++ showP 10 sc+>        showP p (RConst _ _ c) = latex ctxt defs c+>        showP p (RInfix _ _ op l r) = bracket p 5 $+>                                      showP 4 l ++ show op ++ showP 4 r++We want the closing bracket inside the \AR here, so it's on the right line,+hence the weird bracketing.++>        showP p (RDo ds) = (bracket p 2 $+>                            "\\RW{do}\\:\\AR{" ++ +>                            concat (map (latex ctxt defs) ds)) ++ "}"+>                            +>        showP _ x = show x +>        bracket outer inner str | inner>outer = "("++str++")"+>                                | otherwise = str++> instance LaTeX Do where+>     latex ctxt defs (DoBinding _ _ n ty tm) +>         = latex ctxt defs n ++ "\\leftarrow " ++ latex ctxt defs tm ++ +>           "\\\\ \n"+>     latex ctxt defs (DoExp _ _ tm) = latex ctxt defs tm ++ "\\\\ \n"++
+ Idris/Lexer.hs view
@@ -0,0 +1,432 @@+module Idris.Lexer where++import Data.Char+import Debug.Trace++import Idris.AbsSyntax++type LineNumber = Int++type P a = String -> String -> LineNumber -> Fixities -> Result a++getLineNo :: P LineNumber+getLineNo = \s fn l ops -> Success l++getFileName :: P String+getFileName = \s fn l ops -> Success fn++getContent :: P String+getContent = \s fn l ops -> Success s++getOps :: P Fixities+getOps = \s fn l ops -> Success ops++thenP :: P a -> (a -> P b) -> P b+m `thenP` k = \s fn l ops ->+   case m s fn l ops of+       Success a -> k a s fn l ops+       Failure e f ln -> Failure e f ln++returnP :: a -> P a+returnP a = \s fn l ops -> Success a++failP :: String -> P a+failP err = \s fn l ops -> Failure err fn l++catchP :: P a -> (String -> P a) -> P a+catchP m k = \s fn l ops ->+   case m s fn l ops of+      Success a -> Success a+      Failure e f ln -> k e s fn l ops++happyError :: P a+happyError = reportError "Parse error"++reportError :: String -> P a+reportError err = getFileName `thenP` \fn ->+                  getLineNo `thenP` \line ->+		  getContent `thenP` \str ->+                      failP (fn ++ ":" ++ show line ++ ":" ++ err ++ +                             " - before " ++ take 80 str ++ "...")++data Token+      = TokenName Id+      | TokenInfixName String+      | TokenBrackName Id+      | TokenString String+      | TokenInt Int+      | TokenFloat Double+      | TokenChar Char+      | TokenBool Bool+      | TokenMetavar Id+      | TokenIntType+      | TokenCharType+      | TokenBoolType+      | TokenFloatType+      | TokenStringType+      | TokenHandleType+      | TokenLockType+      | TokenPtrType+      | TokenDataType+      | TokenInfix+      | TokenInfixL+      | TokenInfixR+      | TokenParams+      | TokenUsing+      | TokenIdiom+      | TokenNoElim+      | TokenCollapsible+      | TokenPartial+      | TokenSyntax+      | TokenLazy+      | TokenWhere+      | TokenWith+      | TokenType+      | TokenLazyBracket+      | TokenOB+      | TokenCB+      | TokenOCB+      | TokenCCB+      | TokenHashOB+      | TokenLPair+      | TokenRPair+      | TokenOSB+      | TokenCSB+      | TokenOId+      | TokenCId+      | TokenExists+      | TokenConcat+      | TokenTilde+      | TokenPlus+      | TokenMinus+      | TokenTimes+      | TokenDivide+      | TokenEquals+      | TokenOr+      | TokenAnd+      | TokenMightEqual+      | TokenEQ+      | TokenGE+      | TokenLE+      | TokenGT+      | TokenLT+      | TokenArrow+      | TokenFatArrow+      | TokenTransArrow+      | TokenLeftArrow+      | TokenColon+      | TokenSemi+      | TokenComma+      | TokenTuple+      | TokenBar+      | TokenStars+      | TokenDot+      | TokenEllipsis+      | TokenLambda+      | TokenInclude+      | TokenModule+      | TokenNamespace+      | TokenImport+      | TokenExport+      | TokenInline+      | TokenDo+      | TokenReturn+      | TokenIf+      | TokenThen+      | TokenElse+      | TokenLet+      | TokenIn+      | TokenRefl+      | TokenEmptyType+      | TokenUnitType+      | TokenUnderscore+      | TokenBang+-- Tactics+      | TokenProof+      | TokenIntro+      | TokenRefine+      | TokenGeneralise+      | TokenReflP+      | TokenRewrite+      | TokenRewriteAll+      | TokenCompute+      | TokenUnfold+      | TokenUndo+      | TokenInduction+      | TokenFill+      | TokenTrivial+      | TokenMkTac+      | TokenBelieve+      | TokenUse+      | TokenDecide+      | TokenAbandon+      | TokenQED+-- Directives+      | TokenLaTeX+      | TokenNoCG+      | TokenEval+      | TokenSpec+      | TokenFreeze+      | TokenThaw+      | TokenTransform+      | TokenCInclude+      | TokenCLib+      | TokenEOF+ deriving (Show, Eq)+++lexer :: (Token -> P a) -> P a+lexer cont [] = cont TokenEOF []+lexer cont ('\n':cs) = \fn line -> lexer cont cs fn (line+1)+-- empty type+lexer cont ('_':'|':'_':cs) = cont TokenEmptyType cs+lexer cont ('_':c:cs) | not (isAlpha c) && c/='_' = cont TokenUnderscore (c:cs)+lexer cont (c:cs)+      | isSpace c = \fn line -> lexer cont cs fn line+      | isAlpha c = lexVar cont (c:cs)+      | isDigit c = lexNum cont (c:cs)+      | c == '_' = lexVar cont (c:cs)+-- unit type+lexer cont ('(':')':cs) = cont TokenUnitType cs+lexer cont ('"':cs) = lexString cont cs+lexer cont ('\'':cs) = lexChar cont cs+lexer cont ('{':'-':cs) = lexerEatComment 0 cont cs+lexer cont ('-':'-':cs) = lexerEatToNewline cont cs+lexer cont ('(':cs) = cont TokenOB cs+lexer cont (')':cs) = cont TokenCB cs+lexer cont ('{':c:cs) +    | isAlpha c || c=='_' = lexBrackVar cont (c:cs)+lexer cont ('{':cs) = cont TokenOCB cs+lexer cont ('}':cs) = cont TokenCCB cs+lexer cont ('[':'|':cs) = cont TokenOId cs+lexer cont ('|':']':cs) = cont TokenCId cs+lexer cont ('[':cs) = cont TokenOSB cs+lexer cont (']':cs) = cont TokenCSB cs+lexer cont ('?':'=':cs) = cont TokenMightEqual cs+lexer cont (';':cs) = cont TokenSemi cs+lexer cont ('\\':cs) = cont TokenLambda cs+lexer cont ('#':'(':cs) = cont TokenHashOB cs+lexer cont ('#':cs) = cont TokenType cs+lexer cont (',':cs) = cont TokenComma cs+lexer cont ('|':'(':cs) = cont TokenLazyBracket cs+lexer cont ('%':cs) = lexSpecial cont cs+lexer cont ('?':cs) = lexMeta cont cs+lexer cont (c:cs) | isOpPrefix c = lexOp cont (c:cs)+lexer cont (c:cs) = lexError c cs++lexError c s l ops = failP (show l ++ ": Unrecognised token '" ++ [c] ++ "'\n") s l ops++lexerEatComment nls cont ('-':'}':cs)+    = \fn line -> lexer cont cs fn (line+nls)+lexerEatComment nls cont ('\n':cs) = lexerEatComment (nls+1) cont cs+lexerEatComment nls cont (c:cs) = lexerEatComment nls cont cs++lexerEatToNewline cont ('\n':cs)+   = \fn line -> lexer cont cs fn (line+1)+lexerEatToNewline cont []+   = \fn line -> lexer cont [] fn line+lexerEatToNewline cont (c:cs) = lexerEatToNewline cont cs++lexNum cont cs = case readNum cs of+                    (num,rest,isreal) ->+                        cont (tok num isreal) rest+  where tok num isreal | isreal = TokenFloat (read num)+                       | otherwise = TokenInt (read num)++readNum :: String -> (String,String,Bool)+readNum x = rn' False "" x+  where rn' dot acc [] = (acc,[],dot)+        rn' False acc ('.':xs) | head xs /= '.' = rn' True (acc++".") xs+        rn' dot acc (x:xs) | isDigit x = rn' dot (acc++[x]) xs+        rn' dot acc ('e':'+':xs) = rn' True (acc++"e+") xs+        rn' dot acc ('e':'-':xs) = rn' True (acc++"e-") xs+        rn' dot acc ('e':xs) = rn' True (acc++"e") xs+        rn' dot acc xs = (acc,xs,dot)++lexString cont cs =+   \fn line ops ->+   case getstr cs of+      Just (str,rest,nls) -> cont (TokenString str) rest fn (nls+line) ops+      Nothing -> failP (fn++":"++show line++":Unterminated string contant")+                    cs fn line ops++lexChar cont cs =+   \fn line ops ->+   case getchar cs of+      Just (str,rest) -> cont (TokenChar str) rest fn line ops+      Nothing ->+          failP (fn++":"++show line++":Unterminated character constant")+                       cs fn line ops++isAllowed c = isAlpha c || isDigit c || c `elem` "_\'?#"++lexVar cont cs =+   case span isAllowed cs of+-- Keywords+      ("proof",rest) -> cont TokenProof rest+      ("data",rest) -> cont TokenDataType rest+      ("using",rest) -> cont TokenUsing rest+      ("idiom",rest) -> cont TokenIdiom rest+      ("params",rest) -> cont TokenParams rest+      ("namespace",rest) -> cont TokenNamespace rest+      ("module",rest) -> cont TokenModule rest+      ("import",rest) -> cont TokenImport rest+      ("export",rest) -> cont TokenExport rest+      ("inline",rest) -> cont TokenInline rest+      ("noElim",rest) -> cont TokenNoElim rest+      ("collapsible",rest) -> cont TokenCollapsible rest+      ("where",rest) -> cont TokenWhere rest+      ("with",rest) -> cont TokenWith rest+      ("partial",rest) -> cont TokenPartial rest+      ("syntax",rest) -> cont TokenSyntax rest+      ("lazy",rest) -> cont TokenLazy rest+      ("infix",rest) -> cont TokenInfix rest+      ("infixl",rest) -> cont TokenInfixL rest+      ("infixr",rest) -> cont TokenInfixR rest+      ("exists",rest) -> cont TokenExists rest+-- Types+      ("Int",rest) -> cont TokenIntType rest+      ("Char",rest) -> cont TokenCharType rest+      ("Float",rest) -> cont TokenFloatType rest+      ("String",rest) -> cont TokenStringType rest+      ("Lock",rest) -> cont TokenLockType rest+      ("Handle",rest) -> cont TokenHandleType rest+      ("Ptr",rest) -> cont TokenPtrType rest+      ("refl",rest) -> cont TokenRefl rest+      ("include",rest) -> cont TokenInclude rest+      ("do",rest) -> cont TokenDo rest+      ("return",rest) -> cont TokenReturn rest+      ("if",rest) -> cont TokenIf rest+      ("then",rest) -> cont TokenThen rest+      ("else",rest) -> cont TokenElse rest+      ("let",rest) -> cont TokenLet rest+      ("in",rest) -> cont TokenIn rest+-- values+-- expressions+      (var,rest) -> cont (mkname var) rest++lexOp cont cs = case span isOpChar cs of+                   (":",rest) -> cont TokenColon rest+--                   ("+",rest) -> cont TokenPlus rest+                   ("-",rest) -> cont TokenMinus rest+--                   ("*",rest) -> cont TokenTimes rest+--                   ("/",rest) -> cont TokenDivide rest+                   ("=",rest) -> cont TokenEquals rest+--                   ("==",rest) -> cont TokenEQ rest+                   (">",rest) -> cont TokenGT rest+                   ("<",rest) -> cont TokenLT rest+--                   (">=",rest) -> cont TokenGE rest+--                   ("<=",rest) -> cont TokenLE rest+--                   ("++",rest) -> cont TokenConcat rest+--                   ("&&",rest) -> cont TokenAnd rest+                   ("<<",rest) -> cont TokenLPair rest+                   (">>",rest) -> cont TokenRPair rest+                   ("&",rest) -> cont TokenTuple rest+--                   ("||",rest) -> cont TokenOr rest+                   ("...",rest) -> cont TokenEllipsis rest+                   ("**",rest) -> cont TokenStars rest+                   ("|",rest) -> cont TokenBar rest+                   ("!",rest) -> cont TokenBang rest+                   ("->", rest) -> cont TokenArrow rest+                   ("=>", rest) -> cont TokenFatArrow rest+                   -- ("==>", rest) -> cont TokenTransArrow rest+                   ("<-", rest) -> cont TokenLeftArrow rest+                   ("~", rest) -> cont TokenTilde rest+                   (op,rest) -> cont (TokenInfixName op) rest++isOpPrefix c = c `elem` ":+-*/=_.?|&><!@$%^~"+isOpChar = isOpPrefix++lexBrackVar cont cs =+    case span isAllowed cs of+      (var,rest) -> cont (TokenBrackName (UN var)) rest++lexSpecial cont cs =+    case span isAllowed cs of+      ("latex",rest) -> cont TokenLaTeX rest+      ("nocg",rest) -> cont TokenNoCG rest+      ("eval",rest) -> cont TokenEval rest+      ("spec",rest) -> cont TokenSpec rest+      ("freeze",rest) -> cont TokenFreeze rest+      ("thaw",rest) -> cont TokenThaw rest+      ("transform",rest) -> cont TokenTransform rest+      ("include",rest) -> cont TokenCInclude rest+      ("lib",rest) -> cont TokenCLib rest+-- tactics+-- FIXME: it'd be better to have a 'theorem proving' state so that these+-- don't need the ugly syntax...+      ("intro",rest) -> cont TokenIntro rest+      ("refine",rest) -> cont TokenRefine rest+      ("generalise",rest) -> cont TokenGeneralise rest+      ("refl",rest) -> cont TokenReflP rest+      ("rewrite",rest) -> cont TokenRewrite rest+      ("rewriteall",rest) -> cont TokenRewriteAll rest+      ("compute",rest) -> cont TokenCompute rest+      ("unfold",rest) -> cont TokenUnfold rest+      ("undo",rest) -> cont TokenUndo rest+      ("induction",rest) -> cont TokenInduction rest+      ("fill", rest) -> cont TokenFill rest+      ("trivial", rest) -> cont TokenTrivial rest+      ("mktac", rest) -> cont TokenMkTac rest+      ("believe", rest) -> cont TokenBelieve rest+      ("use", rest) -> cont TokenUse rest+      ("decide", rest) -> cont TokenDecide rest+      ("abandon", rest) -> cont TokenAbandon rest+      ("qed", rest) -> cont TokenQED rest+      (thing,rest) -> lexError '%' rest++-- Read everything up to '[whitespace]Qed'+{-+lexProof cont cs = +   \fn line ->+      case getprf cs of+        Just (str,rest,nls) -> cont (TokenProof str) rest fn (nls+line)+        Nothing -> failP (fn++":"++show line++":No QED in Proof")+                          cs fn line+-}++lexMeta cont cs =+    case span isAllowed cs of+      (thing,rest) -> cont (TokenMetavar (UN thing)) rest++mkname :: String -> Token+mkname c = TokenName (UN c)++getstr :: String -> Maybe (String,String,Int)+getstr cs = case getstr' "" cs 0 of+               Just (str,rest,nls) -> Just (reverse str,rest,nls)+               _ -> Nothing+getstr' acc ('\"':xs) = \nl -> Just (acc,xs,nl)+getstr' acc ('\\':'n':xs) = getstr' ('\n':acc) xs -- Newline+getstr' acc ('\\':'r':xs) = getstr' ('\r':acc) xs -- CR+getstr' acc ('\\':'t':xs) = getstr' ('\t':acc) xs -- Tab+getstr' acc ('\\':'b':xs) = getstr' ('\b':acc) xs -- Backspace+getstr' acc ('\\':'a':xs) = getstr' ('\a':acc) xs -- Alert+getstr' acc ('\\':'f':xs) = getstr' ('\f':acc) xs -- Formfeed+getstr' acc ('\\':'0':xs) = getstr' ('\0':acc) xs -- null+getstr' acc ('\\':x:xs) = getstr' (x:acc) xs -- Literal+getstr' acc ('\n':xs) = \nl ->getstr' ('\n':acc) xs (nl+1) -- Count the newline+getstr' acc (x:xs) = getstr' (x:acc) xs+getstr' _ _ = \nl -> Nothing++getchar :: String -> Maybe (Char,String)+getchar ('\\':'n':'\'':xs) = Just ('\n',xs) -- Newline+getchar ('\\':'r':'\'':xs) = Just ('\r',xs) -- CR+getchar ('\\':'t':'\'':xs) = Just ('\t',xs) -- Tab+getchar ('\\':'b':'\'':xs) = Just ('\b',xs) -- Backspace+getchar ('\\':'a':'\'':xs) = Just ('\a',xs) -- Alert+getchar ('\\':'f':'\'':xs) = Just ('\f',xs) -- Formfeed+getchar ('\\':'0':'\'':xs) = Just ('\0',xs) -- null+getchar ('\\':x:'\'':xs) = Just (x,xs) -- Literal+getchar (x:'\'':xs) = Just (x,xs)+getchar _ = Nothing++getprf :: String -> Maybe (String, String, Int)+getprf s = case getprf' "" s 0 of +               Just (str,rest,nls) -> Just (reverse str,rest,nls)+               _ -> Nothing+getprf' acc (c:'Q':'E':'D':rest)+    | isSpace c = \nl -> Just (acc,rest,nl)+getprf' acc ('\n':xs) = \nl ->getprf' ('\n':acc) xs (nl+1) -- Count the newline+getprf' acc (x:xs) = getprf' (x:acc) xs+getprf' acc _ = \nl -> Nothing
+ Idris/Lib.lhs view
@@ -0,0 +1,15 @@+> {-# OPTIONS_GHC -fglasgow-exts #-}++> module Idris.Lib(defaultLibPath, readLibFile) where++> import Paths_idris++> defaultLibPath = [] -- prefix ++ "/lib/idris"]++> readLibFile :: [FilePath] -> FilePath -> IO String+> readLibFile xs x = +>    do dfname <- getDataFileName x+>       tryReads ((map (\f -> f ++ "/" ++ x) (".":xs))++[dfname])+>    where tryReads [] = fail $ "Can't find " ++ x+>          tryReads (x:xs) = do catch (readFile x)+>                                  (\e -> tryReads xs)
+ Idris/MakeTerm.lhs view
@@ -0,0 +1,356 @@+> module Idris.MakeTerm where++> import Idris.AbsSyntax+> import Idris.Prover+> import Idris.SimpleCase++> import Ivor.TT as TT+> import Debug.Trace++> import Control.Monad+> import List++Work out how many implicit arguments we need, then translate our definition+into an ivor definition, with all the necessary placeholders added.++> makeIvorFun ::  Implicit -> UndoInfo -> UserOps ->+>                 Ctxt IvorFun -> Decl -> Function -> [CGFlag] -> IvorFun++> makeIvorFun using ui uo ctxt decl (Function n ty clauses file line) flags+>     = let (rty, imp) = addImplWith using ctxt ty+>           ity = makeIvorTerm using ui uo n ctxt rty+>           extCtxt = addEntry ctxt (thisNamespace using) n (IvorFun Nothing (Just ity) +>                                       imp Nothing decl flags (getLazy ty))+>           pclauses = map (mkPat extCtxt imp) clauses in+>       IvorFun (Just (toIvorName n)) +>                   (Just (Annotation (FileLoc file line) ity)) imp +>                   (Just (PattDef (Patterns pclauses))) decl flags (getLazy ty)+>   where mkPat ectx imp (id,(RawClause lhs rhs)) +>               = let lhs' = addPlaceholders ectx using uo lhs in+>                     case (getFn lhs', getRawArgs lhs') of+>                          (fid, pats) ->+>                            let vpats = map (toIvor ui n) pats+>                                vrhs = makeIvorTerm using ui uo n ectx rhs in+>                                PClause vpats [] vrhs+>         mkPat ectx imp (id,(RawWithClause lhs prf scr def))+>               = let lhs' = addPlaceholders ectx using uo lhs in+>                     case (getFn lhs', getRawArgs lhs') of+>                          (fid, pats) ->+>                            let vpats = map (toIvor ui n) pats+>                                vscr = makeIvorTerm using ui uo n ectx scr+>                                vdef = Patterns $ map (mkPat ectx imp) (zip (repeat id) def) in+>                                PWithClause prf vpats vscr vdef++> makeIvorFuns :: [Opt] -> Ctxt IvorFun -> +>                 [Decl] -> UserOps -> (Ctxt IvorFun, UserOps)+> makeIvorFuns opts is defs uo = mif opts is newCtxt noImplicit defDo uo defs++> mif :: [Opt] ->+>        Ctxt IvorFun -> -- init+>        Ctxt IvorFun -> -- new+>        Implicit -> -- implicits+>        UndoInfo -> -- do using bind, return+>        UserOps -> -- Users operators+>        [Decl] -> (Ctxt IvorFun, UserOps)+> mif opt ctxt acc using ui uo [] = (acc, uo)+> mif opt ctxt acc using' ui uo ((Using using decls):ds)+>         = let (acc', uo') = mif opt ctxt acc (addUsing using' (Imp using [] [] (thisNamespace using'))) ui uo decls in+>               mif opt ctxt acc' using' ui uo' ds+> mif opt ctxt acc using' ui uo ((Params newps decls):ds)+>         = let (acc', uo') = (mif opt ctxt acc (addParams using' newps) ui uo decls) in+>               mif opt ctxt acc' using' ui uo' ds+> mif opt ctxt acc using ui@(UI _ _ _ _ p pi r ri) uo ((DoUsing bind ret decls):ds)+>         = let (acc', uo') = (mif opt ctxt acc using ui' uo decls) in+>              mif opt ctxt acc' using ui uo' ds+>    where ui' = let bimpl = case ctxtLookup (appCtxt ctxt acc) (thisNamespace using) bind of+>                              Right i -> implicitArgs i+>                              _ -> error $ "Can't find " ++ show bind -- 0+>                    rimpl = case ctxtLookup (appCtxt ctxt acc) (thisNamespace using) ret of+>                              Right i -> implicitArgs i+>                              _ -> error $ "Can't find " ++ show ret -- 0+>                     in UI bind bimpl ret rimpl p pi r ri+> mif opt ctxt acc using ui@(UI b bi r ri _ _ _ _) uo ((Idiom pure ap decls):ds)+>         = let (acc', uo') = (mif opt ctxt acc using ui' uo decls) in+>             mif opt ctxt acc' using ui uo' ds+>    where ui' = let pureImpl = case ctxtLookup (appCtxt ctxt acc) (thisNamespace using) pure of+>                              Right i -> implicitArgs i+>                              _ -> 0+>                    apImpl = case ctxtLookup (appCtxt ctxt acc) (thisNamespace using) ap of+>                              Right i -> implicitArgs i+>                              _ -> 0+>                     in UI b bi r ri pure pureImpl ap apImpl+> mif opt ctxt acc using' ui uo (decl@(Fun f flags):ds) +>         = let using = addParamName using' (funId f)+>               fn = makeIvorFun using ui uo (appCtxt ctxt acc) decl f flags in+>               mif opt ctxt (addEntry acc (thisNamespace using) (funId f) fn) using ui uo ds+> mif opt ctxt acc using' ui uo (decl@(Fwd n ty flags):ds) +>      = let (file, line) = getFileLine ty+>            using = addParamName using' n+>            (rty, imp) = addImplWith using (appCtxt ctxt acc) ty+>            ity = makeIvorTerm using ui uo n (appCtxt ctxt acc) rty in+>            mif opt ctxt (addEntry acc (thisNamespace using) n +>                         (IvorFun (Just (toIvorName n)) +>                            (Just (Annotation (FileLoc file line) ity))+>                              imp (Just Later) decl flags (getLazy ty))) using ui uo ds+> mif opt ctxt acc using' ui uo (decl@(DataDecl d):ds) +>      = let using = addParamName using' (tyId d) in+>            addDataEntries opt ctxt acc decl d using ui uo ds -- will call mif on ds+> mif opt ctxt acc using ui uo@(UO _ trans _) (decl@(TermDef n tm flags):ds) +>     | null $ params using+>         = let (itmraw, imp) = addImplWith using (appCtxt ctxt acc) tm+>               itm = makeIvorTerm using ui uo n (appCtxt ctxt acc) itmraw in+>               mif opt ctxt (addEntry acc (thisNamespace using) n +>                   (IvorFun (Just (toIvorName n)) Nothing imp +>                            (Just (SimpleDef itm)) decl flags [])) using ui uo ds+>     | otherwise = let (f,l) = getFileLine tm in+>                       mif opt ctxt (addEntry acc (thisNamespace using) n +>                                (IvorProblem (f ++ ":" ++ show l ++ ":" +++>                                 show n ++ " needs a type declaration in a params block"))) +>                                 using ui uo ds+> mif opt ctxt acc using ui uo (decl@(LatexDefs ls):ds) +>         = mif opt ctxt (addEntry acc (thisNamespace using) (MN "latex" 0) +>              (IvorFun Nothing Nothing 0 Nothing decl [] [])) using ui uo ds+> mif opt ctxt acc using ui (UO fix trans fr) (decl@(Fixity op assoc prec):ds) +>         = mif opt ctxt (addEntry acc (thisNamespace using) (MN "fixity" (length ds)) +>              (IvorFun Nothing Nothing 0 Nothing decl [] [])) using ui +>                   (UO ((op,(assoc,prec)):fix) trans fr) ds+> mif opt ctxt acc using ui uo@(UO fix trans fr) (decl@(Transform lhs rhs):ds) +>         = let lhsraw = addPlaceholders (appCtxt ctxt acc) using uo lhs+>               rhsraw = addPlaceholders (appCtxt ctxt acc) using uo rhs+>               lhstm = makeIvorTerm using ui uo (MN "LHS" 0) ctxt lhsraw+>               rhstm = makeIvorTerm using ui uo (MN "RHS" 0) ctxt rhsraw +>               trans' = if (NoSpec `elem` opt) then trans else+>                            (lhstm,rhstm):trans in+>           mif opt ctxt (addEntry acc (thisNamespace using) (MN "transform" (length ds)) +>              (IvorFun Nothing Nothing 0 Nothing decl [] [])) using ui +>                   (UO fix trans' fr) ds++Don't add yet! Or everything will be frozen in advance, rather than being +frozen after they are needed.++> mif opt ctxt acc using ui uo@(UO fix trans fr) (decl@(Freeze frfn):ds) +>     = mif opt ctxt (addEntry acc (thisNamespace using) (MN "freeze" (length ds))+>                 (IvorFun Nothing Nothing 0 Nothing decl [] [])) using ui +>                 (UO fix trans fr) ds+> mif opt ctxt acc using ui uo (decl@(Prf (Proof n _ scr)):ds) +>     = case ctxtLookup acc (thisNamespace using) n of+>          Left _ -> -- add the script and process the type later, should+>                    -- be a metavariable+>             mif opt ctxt (addEntry acc (thisNamespace using) n+>               (IvorFun (Just (toIvorName n)) Nothing 0 (Just (IProof scr)) decl [] [])) +>                  using ui uo ds+>          Right (IvorFun _ (Just ty) imp _ _ _ _) -> +>             mif opt ctxt (addEntry acc (thisNamespace using) n+>               (IvorFun (Just (toIvorName n)) (Just ty) imp (Just (IProof scr)) decl [] []))+>                   using ui uo ds++Just pass these on to epic to do the right thing++> mif opt ctxt acc using ui uo ((CInclude _):ds) = mif opt ctxt acc using ui uo ds+> mif opt ctxt acc using ui uo ((CLib _):ds) = mif opt ctxt acc using ui uo ds+> mif opt ctxt acc using ui uo (d:ds) = error $ "Miffed: " ++ show d++error "Not implemented"++Add an entry for the type id and for each of the constructors.++> addDataEntries :: [Opt] ->+>                   Ctxt IvorFun -> Ctxt IvorFun -> Decl ->+>                   Datatype -> Implicit ->+>                   UndoInfo -> UserOps ->+>                   [Decl] -> +>                   (Ctxt IvorFun, UserOps)+> addDataEntries opt ctxt acc decl (Latatype tid tty f l) using ui uo ds = +>     let (tyraw, imp) = addImplWith using (appCtxt ctxt acc) tty+>         tytm = Annotation (FileLoc f l) $ makeIvorTerm using ui uo tid (appCtxt ctxt acc) tyraw +>         acc' = addEntry acc (thisNamespace using) tid +>                   (IvorFun (Just (toIvorName tid)) (Just tytm) imp (Just LataDef) decl [] []) in+>         mif opt ctxt acc' using ui uo ds+> addDataEntries opt ctxt acc decl (Datatype tid tty cons u e f l) using ui uo ds = +>     let (tyraw, imp) = addImplWith using (appCtxt ctxt acc) tty+>         tytm = Annotation (FileLoc f l) $ makeIvorTerm using ui uo tid (appCtxt ctxt acc) tyraw+>         acctmp = addEntry (appCtxt ctxt acc) (thisNamespace using) tid +>                     (IvorFun (Just (toIvorName tid)) (Just tytm) imp Nothing decl [] [])+>         ddef = makeInductive acctmp tid (getBinders tytm []) cons +>                    (addUsing using (Imp u [] [] (thisNamespace using))) ui uo []+>         acc' = addEntry acc (thisNamespace using) tid +>                   (IvorFun (Just (toIvorName tid)) (Just tytm) imp +>                              (Just (DataDef ddef (not (elem NoElim e)))) decl [] []) in+>         addConEntries opt ctxt acc' cons u using ui uo ds f l++     Inductive (toIvorName tid) [] ++> makeInductive :: Ctxt IvorFun -> Id -> ([(Name, ViewTerm)], ViewTerm) ->+>                  [(Id,RawTerm)] -> Implicit ->+>                  UndoInfo -> UserOps -> [(Name, ViewTerm)] -> Inductive+> makeInductive ctxt tid (indices, tty) [] using ui uo acc+>        = Inductive (toIvorName tid) [] indices tty (reverse acc)+> makeInductive ctxt cdec indices ((cid, cty):cs) using ui uo acc+>        = let (tyraw, imp) = addImplWith using ctxt cty+>              tytm = makeIvorTerm using ui uo cdec ctxt tyraw in+>              makeInductive ctxt cdec+>                            indices cs using ui uo (((toIvorName cid),tytm):acc)++Examine an inductive definition; any index position which does not+change across the structure becomes a parameter.++The type has to be fully elaborated here. It's a bit of a hack, but we+add the type once, without the elim rule, so that the placeholders are filled+in, then we add it again after we work out what the parameters are, with+the elim rule.++Parameters go at the left, so as soon as find find an argment which isn't+a parameter, there can be no more (or we mess up the declared type). Hence +'span' rather than 'partition'.++> mkParams :: Inductive -> Inductive+> mkParams ind@(Inductive tname ps inds ty cons) +>   = let (newps', newinds') = span (isParam (map snd cons)) +>                                      (zip [0..] inds)+>         newps = map snd newps'+>         newinds = map snd newinds'+>         newty = remAllPs newps ty+>         newind = Inductive tname (ps++newps) newinds ty (remPs newps cons) in+>           -- trace (show ind ++ "\n" ++ show newind ++ "\n" ++ show newps) $+>             newind+>   where isParam [] _ = True+>         isParam (c:cs) (pos, (n,ty))+>              | isParamCon pos c n = isParam cs (pos, (n,ty))+>              | otherwise = False++If argument at given position wherever 'tname' is applied is always n, then+n is a parameter++>         isParamCon pos tm n +>             = checkp pos n (getApps tm)+>         checkp pos n [] = True+>         checkp pos n (t:ts) +>              | length t >= pos = nameMatch n (t!!pos) && checkp pos n ts+>              | otherwise = False+>         nameMatch n (Name _ nm) = n == nm+>         nameMatch n (Annotation _ t) = nameMatch n t+>         nameMatch _ _ = False++>         getApps app@(App f a)+>             | appIsT (getApp f) = [getFnArgs app]+>             | otherwise = getApps f ++ getApps a+>         getApps (Forall n ty sc) = getApps ty ++ getApps sc+>         getApps (Annotation _ n) = getApps n+>         getApps x = []++>         appIsT (Name _ n) = n == tname+>         appIsT (Annotation _ t) = appIsT t+>         appIsT _ = False++>         remPs newps [] = []+>         remPs newps ((n,ty):tys) = (n,remAllPs newps ty):(remPs newps tys)+>         remAllPs newps (Forall n ty sc)+>                  | n `elem` (map fst newps) = remAllPs newps sc+>                  | otherwise = Forall n ty (remAllPs newps sc)+>         remAllPs newps (Annotation _ n) = remAllPs newps n+>         remAllPs newps x = x++> addConEntries :: [Opt] ->+>                  Ctxt IvorFun -> Ctxt IvorFun -> +>                  [(Id,RawTerm)] -> -- constructors+>                  [(Id,RawTerm)] -> -- datatype local 'using'+>                  Implicit -> UndoInfo -> UserOps -> -- global 'using'+>                  [Decl] -> String -> Int ->+>                  (Ctxt IvorFun, UserOps)+> addConEntries opt ctxt acc [] u using ui uo ds f l = mif opt ctxt acc using ui uo ds+> addConEntries opt ctxt acc ((cid, ty):cs) u using' ui uo ds f l+>     = let using = using' -- No! params are implicit here. addParamName using' cid+>           (tyraw, imp) = addImplWith (addUsing (Imp u [] [] (thisNamespace using)) using) (appCtxt ctxt acc) ty+>           tytm = Annotation (FileLoc f l) $ makeIvorTerm using ui uo cid (appCtxt ctxt acc) tyraw+>           acc' = addEntry acc (thisNamespace using) cid +>                      (IvorFun (Just (toIvorName cid)) (Just tytm) (imp+length (params using')) (Just IDataCon) Constructor [] (getLazy ty)) in+>           addConEntries opt ctxt acc' cs u using ui uo ds f l++Add definitions to the Ivor Context. Return the new context and a list+of things we need to define to complete the program (i.e. metavariables)++> data TryAdd = OK (Context, [(Name, ViewTerm)]) UserOps+>             | Err (Context, [(Name, ViewTerm)]) UserOps String -- record how far we got++> addIvor :: [Opt] ->+>            Ctxt IvorFun -> -- all definitions, including prelude+>            Ctxt IvorFun -> -- just the ones we haven't added to Ivor yet+>            Context -> UserOps -> TryAdd+> addIvor opts all defs ctxt uo = addivs (ctxt, []) uo (ctxtAlist defs)+>    where addivs acc fixes [] = OK acc fixes+>          addivs acc fixes ((n, IvorProblem err):ds) = Err acc fixes err+>          addivs acc fixes (def@(_,ifn):ds) = +>              case addIvorDef opts all fixes acc def of+>                 Right (ok, fixes) -> addivs ok fixes ds+>                 Left err -> Err acc fixes (idrisError all (guessContext ifn err))++Add a definition to Ivor. UserOps have been finalised already, by makeIvorFuns,+except frozen things, which need to be added as we go, in order.++> addIvorDef :: [Opt] ->+>               Ctxt IvorFun -> UserOps -> (Context, [(Name, ViewTerm)]) -> +>                (Id, IvorFun) -> +>               TTM ((Context, [(Name, ViewTerm)]), UserOps)+> addIvorDef opt raw uo (ctxt, metas) (n,IvorFun name tyin _ def (LatexDefs _) _ _) +>                = return ((ctxt, metas), uo)+> addIvorDef opt raw (UO fix trans fr) (ctxt, metas) (n,IvorFun name tyin _ def f@(Fixity op assoc prec) _ _) +>                = return ((ctxt, metas), UO fix trans fr)+> addIvorDef opt raw (UO fix trans fr) (ctxt, metas) (n,IvorFun name tyin _ def f@(Transform lhs rhs) _ _)+>                = return ((ctxt, metas), UO fix trans fr)+> addIvorDef opt raw (UO fix trans fr) (ctxt, metas) (n,IvorFun name tyin _ def f@(Freeze frfn) _ _)+>                = return ((ctxt, metas), UO fix trans (frfn:fr))+> addIvorDef opt raw uo@(UO fix trans fr) (ctxt, metas) (n,IvorFun (Just name) tyin _ (Just def') _ flags lazy) +>   = let def = if (Verbose `elem` opt) +>                  then trace ("Processing " ++ show n) def' else def' in+>       case def of+>         PattDef ps -> -- trace (show ps) $+>                       do (ctxt, newdefs) <- addPatternDefSC ctxt name (unjust tyin) ps+>                          if (null newdefs) then return ((ctxt, metas), uo)+>                            else do r <- addMeta (Verbose `elem` opt) raw ctxt metas newdefs+>                                    return (r, uo)+>+>         SimpleDef tm -> +>                         do tm' <- case (getSpec flags fr) of+>                              Nothing -> return tm+>                              Just [] -> do ctm <- check ctxt tm+>                                            let ans = view (evalnew ctxt ctm)+>                                            return ans+>                              Just specfns -> do ctm <- check ctxt tm+>                                                 let ans = view (evalnewLimit ctxt ctm specfns)+>                                                 return ans+>                            ctxt <- case tyin of+>                                 Nothing -> addDef ctxt name tm'+>                                 Just ty -> addTypedDef ctxt name tm' ty+>                            return ((ctxt, metas), uo)+>         LataDef -> case tyin of+>                       Just ty -> do ctxt <- declareData ctxt name ty+>                                     return ((ctxt, metas), uo)+>         DataDef ind e -> do c <- addDataNoElim ctxt ind+>                           -- add once to fill in placeholders+>                             ctxt <- if e then do+>                                     d <- getInductive c name +>                           -- add again after we work out the parameters+>                                     addData ctxt (mkParams d)+>                                  else return c+>                             return ((ctxt, metas), uo)+>                           -- addDataNoElim ctxt (mkParams d)+>                           -- trace (show (mkParams d)) $ return c+>         IProof scr -> do ctxt <- runScript raw ctxt uo n scr+>                          return ((ctxt, filter (\ (x,y) -> x /= toIvorName n)+>                                         metas), uo)+>         Later -> case tyin of+>                    Just ty -> do ctxt <- declare ctxt name ty+>                                  return ((ctxt, metas), uo)+>                    Nothing -> fail $ "No type given for forward declared " ++ show n+>         _ -> return ((ctxt, metas), uo)+>    where unjust (Just x) = x+>          getSpec [] fr+>             = Nothing+>          getSpec (CGEval:_) fr +>             = Just (map (\x -> (toIvorName x, 0)) fr)+>          getSpec (CGSpec ns:_) fr+>             | NoSpec `elem` opt = Nothing+>             | otherwise = Just $ (map (\ (x, i) -> (toIvorName x, i)) ns) +++>                              (map (\x -> (toIvorName x, 0)) fr)+>          getSpec (_:ns) fr = getSpec ns fr+
+ Idris/PMComp.lhs view
@@ -0,0 +1,400 @@+> {-# OPTIONS_GHC -fglasgow-exts #-}++> module Idris.PMComp(pmcomp,SimpleCase(..),CaseAlt(..)) where++Pattern matching compiler, convert to simple case expressions++> import Idris.AbsSyntax+> import Ivor.TT++> import Data.Typeable+> import Debug.Trace+> import Control.Monad.State+> import List hiding (partition)++Simple case statements are either a case analysis, just a term. ErrorCase +and Impossible are distinct in that 'Impossible' should be the default +fallthrough when a function is known to be total, and ErrorCAse otherwise.++> data SimpleCase = SCase ViewTerm [CaseAlt]+>                 | Tm ViewTerm+>                 | ErrorCase+>                 | Impossible+>    deriving (Show, Eq)++> data CaseAlt = Alt Name Int [Name] SimpleCase+>              | ConstAlt Constant SimpleCase+>              | Default SimpleCase+>    deriving (Show, Eq)++> instance Ord CaseAlt where+>   compare (Alt _ t _ _) (Alt _ u _ _) = compare t u+>   compare (ConstAlt c _) (ConstAlt d _) = compare c d+>   compare (Default _) (Default _) = EQ+>   compare (Alt _ _ _ _) _ = LT+>   compare (ConstAlt _ _) (Alt _ _ _ _) = GT+>   compare (ConstAlt _ _) (Default _) = LT+>   compare (Default _) _ = GT++> data CS = CS Int++> pmcomp :: Ctxt IvorFun -> Context -> +>           Bool -> -- erasure on+>           Name -> ViewTerm -> Patterns -> +>           ([Name], SimpleCase)+> pmcomp raw ctxt erase n ty (Patterns ps) +>       = pm' n (map mkPat (deIOpats erase ps))+>    where mkPat (PClause args _ rv) +>            = Clause (map (toPat ctxt) args) rv+>          pm' n ps = evalState (doCaseComp raw ctxt ps) (CS 0)++It's easier if we can distinguish syntactically between constructor forms+and variables (and constants)++> data Pat = PCon Name Int [Pat]+>          | PVar Name+>          | PConst Constant+>          | PNK Name Constant -- n+k pattern+>          | PAny+>   deriving Show++> data Clause = Clause [Pat] ViewTerm+>   deriving Show++FIXME: If an argument is repeated in the patterns, turn the later ones+into underscores (since type checking will verify they are the same,+and if we don't matching can get confused).++> toPat :: Context -> ViewTerm -> Pat+> toPat ctxt tm = toPat' tm [] where+>     toPat' (Name _ n) []+>         | isVar n = PVar n+>         | not (isCon n) = PAny+>     toPat' (Name _ n) args +>         | isCon n = case getConstructorTag ctxt n of+>                       Right i -> PCon n i args+>                       Left _ -> error "Can't happen: no tag"+>         | otherwise = error $ "Can't happen: variable applied to arguments " ++ show (n,args)+>     toPat' (App (Name _ plus) (App (Name _ n) (Constant c))) []+>         | plus == opFn Plus +>             = case (cast c)::Maybe Int of+>                   Just i -> PNK n (Num i)+>                   Nothing -> PAny+>     toPat' (App f a) args = toPat' f ((toPat' a []):args)+>     toPat' (Constant c) []+>             = case (cast c)::Maybe Int of+>                   Just i -> PConst (Num i)+>                   Nothing -> case (cast c)::Maybe String of+>                                 Just s -> PConst (Str s)+>     toPat' (Constant _) args +>                = error "Can't happen: constant applied to arguments"+>     toPat' _ _ = PAny++>     isVar n = case nameType ctxt n of+>                 Left _ -> True+>                 Right Bound -> True+>                 _ -> False+>     isCon n = case nameType ctxt n of+>                 Right DataCon -> True+>                 _ -> False++> isVarPat (Clause ((PVar _):ps) _) = True+> isVarPat (Clause (PAny:ps) _) = True+> isVarPat _ = False++> isConPat (Clause ((PCon _ _ _):ps) _) = True+> isConPat (Clause ((PConst _):ps) _) = True+> isConPat _ = False++> data Partition = Cons [Clause]+>                | Vars [Clause]++> partition :: Ctxt IvorFun -> Context -> [Clause] -> [Partition]+> partition raw ctxt [] = []+> partition raw ctxt ms@(m:_)+>    | isVarPat m = let (vars, rest) = span isVarPat ms in+>                            (Vars vars):partition raw ctxt rest +>    | isConPat m = let (cons, rest) = span isConPat ms in+>                            (Cons cons):(partition raw ctxt rest)+> partition raw ctxt x = error (show x)++> doCaseComp :: Ctxt IvorFun -> Context ->+>               [Clause] -> State CS ([Name], SimpleCase)+> doCaseComp raw ctxt cs = do vs <- newVars cs+>                             let (cs', vs') = reOrder cs vs+>                             sc <- match raw ctxt (map mkVT vs') cs' ErrorCase+>                             -- return names in original order (this is the+>                             -- argument list we're making)+>                             return (map (name.show) vs, sc)+>    where newVars [] = return []+>          newVars ((Clause ps _):_)+>               = do CS i <- get+>                    put (CS (i+(length ps)))+>                    return $ map (MN "cvar") [i..(i+(length ps)-1)]+>          mkVT x = Name Unknown (name (show x))++Reorder variables so that one with most disjoint cases is first.+(Actually, quick hack, just reverse them, since then the dependent things+will at least be looked at last, and we'll be matching on the real arguments+rather than indices.)++>          reOrder cs vs = let djs = (reverse.sort.(mapI 0 dj).transpose.allArgs) cs in+>                              (pickAll (map snd djs) cs, pick (map snd djs) vs)+>          pickAll _ [] = []+>          pickAll djs ((Clause args rest):cs) +>                       = (Clause (pick djs args) rest):(pickAll djs cs)+>          allArgs [] = []+>          allArgs ((Clause args rest):cs) = args:(allArgs cs)++>          pick [] _ = []+>          pick (i:is) xs = if (i<=length xs) then xs!!i : (pick is xs)+>                              else error ("ARGH! pick " ++ show (i,xs,cs))++Count the number of different constructor forms in xs++>          dj xs = dj' [] xs+>          dj' acc [] = length (nub acc)+>          dj' acc (PCon n i p:xs) = dj' (n:acc) xs+>          dj' acc (_:xs) = dj' acc xs++>          mapI i f [] = []+>          mapI i f (x:xs) = (f x, i):(mapI (i+1) f xs)++> match :: Ctxt IvorFun -> Context -> +>          [ViewTerm] -> -- arguments+>          [Clause] -> -- clauses+>          SimpleCase -> -- fallthrough (error case)+>          State CS SimpleCase+> match raw ctxt [] ((Clause [] ret):_) err +>           = return $ Tm ret -- run out of arguments+> match raw ctxt vs cs err +>       = mixture raw ctxt vs (partition raw ctxt cs) err++> mixture :: Ctxt IvorFun -> Context -> +>            [ViewTerm] ->+>            [Partition] -> SimpleCase -> State CS SimpleCase+> mixture raw ctxt vs [] err = return err+> mixture raw ctxt vs ((Cons ms):ps) err +>     = do fallthrough <- (mixture raw ctxt vs ps err)+>          conRule raw ctxt vs ms fallthrough+> mixture raw ctxt vs ((Vars ms):ps) err +>     = do fallthrough <- (mixture raw ctxt vs ps err)+>          varRule raw ctxt vs ms fallthrough++In the constructor rule:++For each distinct constructor (or constant) create a group of possible+patterns in ConType and Group++> data ConType = CName Name Int -- ordinary named constructor+>              | CConst Constant -- constant pattern+>    deriving (Show, Eq)++> data Group = ConGroup ConType -- constructor+>              -- arguments and rest of alternative for each instance+>                    [([Pat], Clause)] +>    deriving Show+++> conRule :: Ctxt IvorFun -> Context -> [ViewTerm] ->+>            [Clause] -> SimpleCase -> State CS SimpleCase+> conRule raw ctxt (v:vs) cs err = +>    do groups <- groupCons cs+>       caseGroups raw ctxt (v:vs) groups err++> caseGroups :: Ctxt IvorFun -> Context -> [ViewTerm] ->+>               [Group] -> SimpleCase ->+>               State CS SimpleCase+> caseGroups raw ctxt (v:vs) gs err+>    = do g <- altGroups gs+>         return $ SCase v g+>   where altGroups [] = return [Default err]+>         altGroups ((ConGroup (CName n i) args):cs)+>           = do g <- altGroup n i args+>                rest <- altGroups cs+>                return (g:rest)+>         altGroups ((ConGroup (CConst cval) args):cs)+>           = do g <- altConstGroup cval args+>                rest <- altGroups cs+>                return (g:rest)++>         altGroup n i gs +>            = do (newArgs, nextCs) <- argsToAlt gs+>                 matchCs <- match raw ctxt (map (Name Unknown) newArgs++vs)+>                                           nextCs err+>                 return $ Alt n i newArgs matchCs+>         altConstGroup n gs+>            = do (_, nextCs) <- argsToAlt gs+>                 matchCs <- match raw ctxt vs nextCs err+>                 return $ ConstAlt n matchCs++Find out how many new arguments we need to generate for the next step+of matching (since we're going to be matching further on the arguments+of each group for the constructor, and we'll need to give them names)++Return the new variables we've added to do case analysis on, and the+new set of clauses to match.++> argsToAlt :: [([Pat], Clause)] -> State CS ([Name], [Clause])+> argsToAlt [] = return ([],[])+> argsToAlt rs@((r,m):_) +>       = do newArgs <- getNewVars r+>            -- generate new match alternatives, by combining the arguments+>            -- matched on the constructor with the rest of the clause+>            return (newArgs, addRs rs)+>     where getNewVars [] = return []+>           getNewVars ((PVar n):ns) = do nsv <- getNewVars ns+>                                         return (n:nsv)+>           getNewVars (_:ns) = do v <- getVar+>                                  nsv <- getNewVars ns+>                                  return (v:nsv)+>           addRs [] = []+>           addRs ((r,(Clause ps res) ):rs)+>               = (Clause (r++ps) res):(addRs rs)++> getVar :: State CS Name+> getVar = do (CS var) <- get+>             put (CS (var+1))+>             return (name (show (MN "pvar" var)))++> groupCons :: Monad m => [Clause] -> m [Group]+> groupCons cs = gc [] cs+>    where gc acc [] = return acc+>          gc acc ((Clause (p:ps) res):cs) = do+>            acc' <- addGroup p ps res acc+>            gc acc' cs++>          addGroup p ps res acc = case p of+>             PCon con i args -> return $ addg con i args (Clause ps res) acc+>             PConst cval -> return $ addConG cval (Clause ps res) acc+>             pat -> fail $ show pat ++ " is not a constructor or constant (can't happen)"+          +>          addg con i conargs res [] +>                   = [ConGroup (CName con i) [(conargs, res)]]+>          addg con i conargs res (g@(ConGroup (CName n j) cs):gs)+>               | i == j = (ConGroup (CName n i) (cs ++ [(conargs, res)])):gs+>               | otherwise = g:(addg con i conargs res gs)++>          addConG con res [] = [ConGroup (CConst con) [([],res)]]+>          addConG con res (g@(ConGroup (CConst n) cs):gs)+>               | con == n = (ConGroup (CConst n) (cs ++ [([], res)])):gs+>               | otherwise = g:(addConG con res gs)++In the variable rule:++case v args of+   p pats -> r1+   ...+   pn patsn -> rn++====>++case args of+   pats -> r1[p/v]+   ...+   patsn -> rn[p/v]++> varRule :: Ctxt IvorFun -> Context -> [ViewTerm] ->+>            [Clause] -> SimpleCase -> State CS SimpleCase+> varRule raw ctxt (v:vs) alts err = do+>     let alts' = map (repVar v) alts+>     match raw ctxt vs alts' err+>   where repVar v (Clause ((PVar p):ps) res) +>                    = let nres = subst p v res in+>                      {- trace (show v ++ " for " ++ dbgshow p ++ " in " ++ show res ++ " gives " ++ show nres) $ -}+>                          Clause ps nres+>         repVar v (Clause (PAny:ps) res) = Clause ps res++++Remove IO gubbins, make actions and ordering explicit++bind : IO A -> (A -> IO B) -> IO B+becomes +bind : A -> (A -> B) -> B++bind _ _ val fn ==> let newv = [[val]]+                        in [[fn newv]]++similarly for unsafeBind+unsafePerformIO becomes id++IOReturn _ a ==> [[a]]+IODo _ c k ==> [[k]] [[c]]++FIXME: Currently requires bind, iodo, etc to be fully applied. Need +intermediate functions for when this isn't the case++> bname i = name (show (MN "bname" i))++We don't care about the bound argument names any more, so don't bother deIOing+them, just put an empty list in.++> deIOpats :: Bool -> [PClause] -> [PClause]+> deIOpats erase cs = evalState (dp cs) 0+>     where dp [] = return []+>           dp ((PClause args _ rv):ps) = do args' <- mapM (deIO erase) args+>                                            rv' <- deIO erase rv+>                                            ps' <- dp ps+>                                            return ((PClause args' [] rv'):ps')++> deIO :: Bool -> ViewTerm -> State Int ViewTerm+> deIO erase t = deIO' t where++>  deIO' (App (App (App (App (Name _ bind) _) _) v) k)+>      | bind == (name "bind") || +>        bind == (name "ibind") || bind == (name "ibinda")+>           = do i <- get+>                put (i+1)+>                v' <- deIO' v+>                k' <- deIO' k+>                return $ Let (bname i) Star -- type irrelevant+>                          (App (App (Name Unknown (name "__effect")) Placeholder) v')+>                              (quickSimpl (App k' (Name Unknown (bname i))))+>      | bind == (name "unsafeBind") +>           = do i <- get+>                put (i+1)+>                return $ Let (bname i) Star -- type irrelevant+>                             v (quickSimpl (App k (Name Unknown (bname i))))+>  deIO' (App (App (Name _ ret) _) a) -- (without forcing)+>      | (not erase) && ret == (name "IOReturn") = deIO' a+>  deIO' (App (Name _ ret) a) -- (with forcing)+>      | erase && ret == (name "IOReturn") = deIO' a+>  deIO' (App (App (Name _ upio) _) a)+>      | upio == (name "unsafePerformIO") = deIO' a+>  deIO' (App (App (Name _ iolift) _) io)+>      | iolift == (name "IOLift")  -- Just skip this+>         = deIO' io+>  deIO' (App (App (App (Name _ iodo) _) c) k) -- (without forcing)+>      | (not erase) && iodo == (name "IODo") +>         = do k' <- deIO' k+>              c' <- deIO' c+>              i <- get+>              put (i+1)+>              return $ Let (bname i) Star+>                         (App (App (Name Unknown (name "__effect")) Placeholder) c')+>                            (quickSimpl (App k' (Name Unknown (bname i))))+>  deIO' (App (App (Name _ iodo) c) k) -- (with forcing)+>      | erase && iodo == (name "IODo") +>         = do k' <- deIO' k+>              c' <- deIO' c+>              i <- get+>              put (i+1)+>              return $ Let (bname i) Star+>                         (App (App (Name Unknown (name "__effect")) Placeholder) c')+>                           (quickSimpl (App k' (Name Unknown (bname i))))+>  deIO' (App f a) = do f' <- deIO' f+>                       a' <- deIO' a+>                       return (App f' a')+>  deIO' (Lambda n ty sc) = do sc' <- deIO' sc+>                              return (Lambda n ty sc')+>  deIO' (Let n ty v sc) = do v' <- deIO' v+>                             sc' <- deIO' sc+>                             return (Let n ty v' sc')+>  deIO' x = return x++Simplify the common case in bind/IODo++> quickSimpl (App (Lambda x ty sc) val)+>    = subst x val sc+> quickSimpl x = x
+ Idris/Parser.y view
@@ -0,0 +1,751 @@+{ -- -*-Haskell-*-+{-# OPTIONS_GHC -fglasgow-exts #-}++module Idris.Parser where++import Data.Char+import Ivor.TT+import System.IO.Unsafe+import List+import Control.Monad++import Idris.AbsSyntax+import Idris.Lexer+import Idris.Lib++import Debug.Trace++}++%name mkparse Program+%name mkparseTerm Term+%name mkparseTactic Tactic++%tokentype { Token }+%monad { P } { thenP } { returnP }+%lexer { lexer } { TokenEOF }++-- %expect 0++%token+      name            { TokenName $$ }+      userinfix       { TokenInfixName $$ }+      brackname       { TokenBrackName $$ }+      string          { TokenString $$ }+      int             { TokenInt $$ }+      float           { TokenFloat $$ }+      char            { TokenChar $$ }+      bool            { TokenBool $$ }+      metavar         { TokenMetavar $$ }+      ':'             { TokenColon }+      ';'             { TokenSemi }+      '|'             { TokenBar }+      stars           { TokenStars }+      '\\'            { TokenLambda }+      hashbrack       { TokenHashOB }+      '('             { TokenOB }+      ')'             { TokenCB }+      '{'             { TokenOCB }+      '}'             { TokenCCB }+      '['             { TokenOSB }+      ']'             { TokenCSB }+      oid             { TokenOId }+      cid             { TokenCId }+      lpair           { TokenLPair }+      rpair           { TokenRPair }+      exists          { TokenExists }+      '~'             { TokenTilde }+      '+'             { TokenPlus }+      '-'             { TokenMinus }+      '*'             { TokenTimes }+      '/'             { TokenDivide }+      '='             { TokenEquals }+      mightbe         { TokenMightEqual }+      '<'             { TokenLT }+      '>'             { TokenGT }+      ellipsis        { TokenEllipsis }+      '_'             { TokenUnderscore }+      ','             { TokenComma }+      '&'             { TokenTuple }+      '!'             { TokenBang }+      concat          { TokenConcat }+--      eq              { TokenEQ }+      ge              { TokenGE }+      le              { TokenLE }+      or              { TokenOr }+      and             { TokenAnd }+      arrow           { TokenArrow }+      fatarrow        { TokenFatArrow }+      transarrow      { TokenTransArrow }+      leftarrow       { TokenLeftArrow }+      inttype         { TokenIntType }+      chartype        { TokenCharType }+      floattype       { TokenFloatType }+      stringtype      { TokenStringType }+      handletype      { TokenHandleType }+      ptrtype         { TokenPtrType }+      locktype        { TokenLockType }+      type            { TokenType }+      lazybracket     { TokenLazyBracket }+      data            { TokenDataType }+      infix           { TokenInfix }+      infixl          { TokenInfixL }+      infixr          { TokenInfixR }+      using           { TokenUsing }+      idiom           { TokenIdiom }+      params          { TokenParams }+      noelim          { TokenNoElim }+      collapsible     { TokenCollapsible }+      where           { TokenWhere }+      with            { TokenWith }+      partial         { TokenPartial }+      syntax          { TokenSyntax }+      lazy            { TokenLazy }+      refl            { TokenRefl }+      empty           { TokenEmptyType }+      unit            { TokenUnitType }+      include         { TokenInclude }+      export          { TokenExport }+      inline          { TokenInline }+      do              { TokenDo }+      return          { TokenReturn }+      if              { TokenIf }+      then            { TokenThen }+      else            { TokenElse }+      let             { TokenLet }+      in              { TokenIn }+      proof           { TokenProof }+      intro           { TokenIntro }+      refine          { TokenRefine }+      generalise      { TokenGeneralise }+      reflp           { TokenReflP }+      rewrite         { TokenRewrite }+      rewriteall      { TokenRewriteAll }+      compute         { TokenCompute }+      unfold          { TokenUnfold }+      undo            { TokenUndo }+      induction       { TokenInduction }+      fill            { TokenFill }+      trivial         { TokenTrivial }+      mktac           { TokenMkTac }+      believe         { TokenBelieve }+      use             { TokenUse }+      decide          { TokenDecide }+      abandon         { TokenAbandon }+      qed             { TokenQED }+      latex           { TokenLaTeX }+      nocg            { TokenNoCG }+      eval            { TokenEval }+      spec            { TokenSpec }+      freeze          { TokenFreeze }+      thaw            { TokenThaw }+      transform       { TokenTransform }+      cinclude        { TokenCInclude }+      clib            { TokenCLib }++%nonassoc LAM+%nonassoc let in+%nonassoc '!' '@'+%left or+%left and '&'+%left '=' -- eq+%left userinfix+%left '<' le '>' ge+%left '+' '-'+%left '*' '/'+%left NEG+%left concat+%left '\\'+%right arrow+%left '(' '{' lazybracket+%nonassoc '.'+%right IMP+%nonassoc CONST+-- All the things I don't want to cause a reduction inside a lam...+%nonassoc name inttype chartype floattype stringtype int char string float bool refl do type+          empty unit '_' if then else ptrtype handletype locktype metavar NONE brackname lazy+          oid '[' '~' lpair PAIR return transarrow exists+%left APP+++%%++Program :: { [ParseDecl] }+Program: { [] }+       | Declaration Program { $1:$2 }+       | Fixity Program { map RealDecl $1 ++ $2 }+       | include string ';' Program { RealDecl (PInclude $2) : $4 }++{-+{%+	     let rest = $4 in+	     let pt = unsafePerformIO (readLib defaultLibPath $2) in+		case (mkparse pt $2 1 []) of+		   Success x -> returnP (x ++ rest)+		   Failure err file ln -> failP err+	  }+-}++Declaration :: { ParseDecl }+Declaration: Function { $1 }+           | Datatype { RealDecl (DataDecl $1) }+           | Latex { RealDecl $1 }+           | freeze name ';' { RealDecl (Freeze $2) }+           | Using '{' Program '}' { PUsing $1 $3 }+           | DoUsing '{' Program '}' { PDoUsing $1 $3 } +           | Idiom '{' Program '}' { PIdiom $1 $3 }+           | Params '{' Program '}' { PParams $1 $3 }+           | Transform { RealDecl $1 }+           | syntax Name NamesS '=' Term ';' { PSyntax $2 $3 $5 }+           | cinclude string { RealDecl (CInclude $2) }+           | clib string { RealDecl (CLib $2) }++Transform :: { Decl }+Transform : transform Term fatarrow Term ';' { Transform $2 $4 }++Function :: { ParseDecl }+Function : Name ':' Type Flags File Line ';' { FunType $1 $3 (nub $4) $5 $6 }+         | Name ProofScript ';' { ProofScript $1 $2 }+--         | DefTerm '=' Term Flags ';' { FunClause (mkDef $1) [] $3 $4 }+         | DefTerm WithTerms WithP Term '{' Functions '}' File Line+              { WithClause (mkDef $8 $9 $1) $2 $3 $4 $6 }+         | DefTerm WithTerms mightbe Term ';' '[' Name ']' File Line+              { FunClauseP (mkDef $9 $10 $1) $2 $4 $7 }+         | DefTerm WithTerms '=' Term Flags ';' File Line +              { FunClause (mkDef $7 $8 $1) $2 $4 (nub $5) }+         | '|' WithTerm '=' Term ';' { FunClause RPlaceholder [$2] $4 [] }+         | '|' WithTerm mightbe Term ';' '[' Name ']' +              { FunClauseP RPlaceholder [$2] $4 $7 }+         | '|' WithTerm WithP Term '{' Functions '}'+              { WithClause RPlaceholder [$2] $3 $4 $6 }++WithP :: { Bool }+WithP : with { False }+      | with proof { True }++WithTerms :: { [RawTerm] }+WithTerms : '|' WithTerm WithTerms { $2:$3 }+          | { [] }++WithTerm :: { RawTerm }+WithTerm : SimpleAppTerm { $1 }+         | SigmaTerm { $1 }+         | '(' Term ')' { $2 }+         | '(' TermList ')' File Line { pairDesugar $4 $5 (RVar $4 $5 (UN "mkPair")) $2 }++Functions :: { [ParseDecl] }+Functions : Function Functions { $1:$2 }+          | Function { [$1] }++Flags :: { [CGFlag] }+Flags : { [] }+      | Flag Flags { $1 ++ $2 }++Flag :: { [CGFlag] }+Flag : nocg { [NoCG] }+     | eval { [CGEval, Inline] }+     | spec '(' NameInts ')' { [CGSpec $3] }+     | spec { [CGSpec []] }+     | inline { [Inline] }+     | export string { [CExport $2] }++--         | Nameproof Script { ProofScript $2 }++--         | proof '{' Tactics '}' { error "Foo" }++-- Tactics :: { [(ITactic] }+-- Tactics : ++--         | Name '=' Term ';' { RealDecl (TermDef $1 $3) }++Fixity :: { [Decl] }+Fixity : FixDec int UserInfixes ';' { map (\x -> Fixity x $1 $2) $3 }++UserInfixes :: { [String] }+UserInfixes : UserInfix { [$1] }+            | UserInfix ',' UserInfixes { $1:$3 }++-- some annoying special cases so we can have operators with other meanings.++UserInfix :: { String }+UserInfix : userinfix { $1 }+          | '-' { "-" }+          | '<' { "<" }+          | '>' { ">" }++FixDec :: { Fixity }+FixDec : infixl { LeftAssoc }+       | infixr { RightAssoc }+       | infix { NonAssoc }++Latex :: { Decl }+Latex : latex '{' LatexDefs '}' { LatexDefs $3 }++LatexDefs :: { [(Id,String)] }+LatexDefs : Name '=' string { [($1,$3)] }+          | Name '=' string ',' LatexDefs { ($1,$3):$5 }++DefTerm :: { (Id, [(RawTerm, Maybe Id)]) }+DefTerm : Name ArgTerms { ($1, $2) }++ArgTerms :: { [(RawTerm,Maybe Id)] }+ArgTerms : { [] }+      | NoAppTerm ArgTerms { ($1,Nothing):$2 }+      | brackname '}' ArgTerms File Line { (RVar $4 $5 $1, Just $1):$3 }+      | brackname '=' Term '}' ArgTerms { ($3, Just $1):$5 }++Datatype :: { Datatype }+Datatype : data DataOpts Name DefinedData File Line+             { mkDatatype $5 $6 $3 $4 $2 }++DefinedData :: { Either RawTerm ((RawTerm, [(Id, RawTerm)]), [ConParse]) }+DefinedData : DType Constructors ';' { Right ($1,$2) }+            | ':' Type ';' { Left $2 }+            | ';' File Line { Left (RConst $2 $3 TYPE) }++-- Currently just whether to generate an elim rule, this'll need to be+-- a list of options if we ever expand this.++DataOpts :: { [TyOpt] }+DataOpts : { [] }+         | '[' DataOptList ']' { $2 }++DataOptList :: { [TyOpt] }+DataOptList : DataOpt { [$1] }+            | DataOpt ',' DataOptList { $1:$3 }++DataOpt :: { TyOpt }+DataOpt : noelim { NoElim }+        | collapsible { Collapsible }++Name :: { Id }+Name : name { $1 }+     | '(' UserInfix ')' { useropFn $2 }++SimpleAppTerm :: { RawTerm }+SimpleAppTerm : SimpleAppTerm File Line NoAppTerm  %prec APP { RApp $2 $3 $1 $4 }+              | SimpleAppTerm ImplicitTerm '}' File Line %prec APP +                   { RAppImp $4 $5 (fst $2) $1 (snd $2) }+              | Name File Line { RVar $2 $3 $1 }+              | Constant File Line { RConst $2 $3 $1 }+              | '_' { RPlaceholder }+              | empty File Line { RVar $2 $3 (UN "__Empty") }+              | unit File Line { RVar $2 $3 (UN "__Unit") }++Term :: { RawTerm }+Term : NoAppTerm { $1 }+     | hashbrack TypeTerm ')' { $2 }+     | Term File Line NoAppTerm  %prec APP { RApp $2 $3 $1 $4 }+     | Term ImplicitTerm '}' File Line %prec APP +                   { RAppImp $4 $5 (fst $2) $1 (snd $2) }+     | lazy Term File Line { RApp $3 $4 (RApp $3 $4 (RVar $3 $4 (UN "__lazy")) RPlaceholder) $2 }+     | '\\' Binds fatarrow Term %prec LAM+                { doBind Lam $2 $4 }+     | let LetBinds in Term+                { doLetBind $2 $4 }+     | InfixTerm { $1 }+     | if Term then Term else Term File Line+       { mkApp $7 $8 (RVar $7 $8 (UN "if_then_else")) [$2,$4,$6] }++Binds :: { [(Id, RawTerm)] }+Binds : Name MaybeType { [($1,$2)] }+      | Name MaybeType ',' Binds { ($1,$2):$4 }++TypedBinds :: { [(Id, RawTerm)] }+TypedBinds : TypedBind ',' TypedBinds { $1 ++ $3 }+           | TypedBind { $1 }++TypedBind :: { [(Id, RawTerm)] }+TypedBind : Name ':' Type { map ( \x -> (x,$3)) [$1] }++Names :: { [Id] }+Names : Name { [$1] }+      | Name ',' Names { $1:$3 }++NameInts :: { [(Id, Int)] }+NameInts : Name int { [($1,$2)] }+         | Name { [($1, 0)] }+         | Name ',' NameInts { ($1,0):$3 }+         | Name int ',' NameInts { ($1,$2):$4 }++BrackNames :: { [Id] }+BrackNames : brackname { [$1] }+      | brackname ',' Names { $1:$3 }++NamesS :: { [Id] }+NamesS : Name { [$1] }+       | Name NamesS { $1:$2 }++LetBinds :: { [(Id, RawTerm, RawTerm)] }+LetBinds : Name MaybeType '=' Term { [($1,$2,$4)] }+         | Name MaybeType '=' Term ',' LetBinds { ($1,$2,$4):$6 }++ImplicitTerm :: { (Id, RawTerm) }+ImplicitTerm : brackname File Line { ($1, RVar $2 $3 $1) }+             | brackname '=' Term { ($1, $3) }++InfixTerm :: { RawTerm }+InfixTerm : '-' Term File Line %prec NEG { RInfix $3 $4 Minus (RConst $3 $4 (Num 0)) $2 }+--          | Term '+' Term File Line { RInfix $4 $5  Plus $1 $3 }+          | Term '-' Term File Line { RUserInfix $4 $5 False "-" $1 $3 }+--          | Term '*' Term File Line { RInfix $4 $5  Times $1 $3 }+--          | Term '/' Term File Line { RInfix $4 $5  Divide $1 $3 }+--          | Term and Term File Line { RInfix $4 $5  OpAnd $1 $3 }+          | Term '&' Term File Line { mkApp $4 $5 (RVar $4 $5 (UN "Pair")) [$1, $3] }+--          | Term or Term File Line { RInfix $4 $5  OpOr $1 $3 }+--          | Term concat Term File Line { RInfix $4 $5  Concat $1 $3 }+--          | Term eq Term File Line { RInfix $4 $5  OpEq $1 $3 }+          | Term '<' Term File Line { RUserInfix $4 $5 False "<" $1 $3 }+--          | Term le Term File Line { RInfix $4 $5  OpLEq $1 $3 }+          | Term '>' Term File Line { RUserInfix $4 $5 False ">" $1 $3 }+--          | Term ge Term File Line { RInfix $4 $5  OpGEq $1 $3 }+          | Term arrow Term File Line { RBind (MN "X" 0) (Pi Ex Eager $1) $3 }+          | UserInfixTerm { $1 }+          | NoAppTerm '=' NoAppTerm File Line { RInfix $4 $5 JMEq $1 $3 }++UserInfixTerm :: { RawTerm }+UserInfixTerm : Term userinfix Term File Line { RUserInfix $4 $5 False $2 $1 $3 }++Section :: { RawTerm }+Section : '(' userinfix Term File Line ')'+               { RBind (MN "X" 0) (Lam RPlaceholder) +                       (RUserInfix $4 $5 False $2 (RVar $4 $5 (MN "X" 0)) $3) }+        | '(' Term userinfix File Line ')'+               { RBind (MN "X" 0) (Lam RPlaceholder) +                       (RUserInfix $4 $5 False $3 $2 (RVar $4 $5 (MN "X" 0))) }+        | '(' BuiltinOp Term File Line ')'+               { RBind (MN "X" 0) (Lam RPlaceholder) +                       (RUserInfix $4 $5 False $2 (RVar $4 $5 (MN "X" 0)) $3) }+        | '(' Term BuiltinOp File Line ')'+               { RBind (MN "X" 0) (Lam RPlaceholder) +                       (RUserInfix $4 $5 False $3 $2 (RVar $4 $5 (MN "X" 0))) }+        | '(' Term '-' File Line ')'+               { RBind (MN "X" 0) (Lam RPlaceholder) +                       (RUserInfix $4 $5 False "-" $2 (RVar $4 $5 (MN "X" 0))) }++-- Special cases for ->++        | '(' Term arrow File Line ')'+               { RBind (MN "X" 0) (Lam RPlaceholder) +                       (RBind (MN "X" 1) (Pi Ex Eager $2) (RVar $4 $5 (MN "X" 0))) }+        | '(' arrow Term File Line ')'+               { RBind (MN "X" 0) (Lam RPlaceholder) +                       (RBind (MN "X" 1) (Pi Ex Eager (RVar $4 $5 (MN "X" 0))) $3) }       +        | '(' arrow File Line ')'+               { RBind (MN "X" 0) (Lam RPlaceholder)+                       (RBind (MN "X" 1) (Lam RPlaceholder)+                    (RBind (MN "X" 2) (Pi Ex Eager (RVar $3 $4 (MN "X" 0)))+                       (RVar $3 $4 (MN "X" 1)))) }++ -- Special cases for pairing++        | '(' ',' File Line ')' +              {  RBind (MN "X" 0) (Lam RPlaceholder)+                   (RBind (MN "X" 1) (Lam RPlaceholder)+                       (pairDesugar $3 $4 (RVar $3 $4 (UN "mkPair"))+                                    [RVar $3 $4 (MN "X" 0),+                                     RVar $3 $4 (MN "X" 1)])) }+        | '(' Term ',' File Line ')' +              {  RBind (MN "X" 0) (Lam RPlaceholder)+                       (pairDesugar $4 $5 (RVar $4 $5 (UN "mkPair"))+                                    [$2,+                                     RVar $4 $5 (MN "X" 0)]) }+        | '(' ',' Term File Line ')' +              {  RBind (MN "X" 0) (Lam RPlaceholder)+                       (pairDesugar $4 $5 (RVar $4 $5 (UN "mkPair"))+                                    [RVar $4 $5 (MN "X" 0), $3]) }+++BuiltinOp :: { String }+BuiltinOp : '<' { "<" }+          | '>' { ">" }++MaybeType :: { RawTerm }+MaybeType : { RPlaceholder}+          | ':' TypeTerm { $2 }++MaybeAType :: { RawTerm }+MaybeAType : { RPlaceholder}+          | ':' TypeTerm { $2 }++-- Term representing a type may begin with implicit argument list++Type :: { RawTerm }+Type : BrackNames MaybeAType '}' arrow Type+               { doBind (Pi Im Eager) (map (\x -> (x, $2)) $1) $5 }+     | TypeTerm { $1 }++TypeTerm :: { RawTerm }+TypeTerm : TypeTerm arrow TypeTerm { RBind (MN "X" 0) (Pi Ex Eager $1) $3 }+         | '(' TypedBinds ')' arrow TypeTerm+                { doBind (Pi Ex Eager) $2 $5 }+         | lazybracket TypedBinds ')' arrow TypeTerm+                { doBind (Pi Ex Lazy) $2 $5 }+         | '(' TypeTerm ')' { bracket $2 }+         | '(' TypeTerm '=' TypeTerm File Line ')' { RInfix $5 $6 JMEq $2 $4 }+         | SimpleAppTerm { $1 }+         | hashbrack Term ')' { $2 }+         | TypeTerm userinfix TypeTerm File Line { RUserInfix $4 $5 False $2 $1 $3 }+         | '(' TypeList ')' File Line { pairDesugar $4 $5 (RVar $4 $5 (UN "Pair")) $2 }+         | SigmaType { $1 }++SigmaType :: { RawTerm }+SigmaType : '(' Name MaybeType stars TypeTerm ')' File Line +                  { sigDesugar $7 $8 ($2, $3) $5 }+--          | exists Name MaybeType fatarrow SimpleAppTerm File Line+--                  { sigDesugar $6 $7 ($2, $3) $5 }++TypeList :: { [RawTerm] }+         : TypeTerm '&' TypeTerm { $1:$3:[] }+         | TypeTerm '&' TypeList { $1:$3 }++NoAppTerm :: { RawTerm }+NoAppTerm : Name File Line { RVar $2 $3 $1 }+          | return File Line { RReturn $2 $3 }+          | '(' Term ')' { bracket $2 }+          | '~' NoAppTerm { RPure $2 }+          | metavar { RMetavar $1 }+          | '!' Name File Line { RExpVar $3 $4 $2 }+--          | '{' TypedBind '}' arrow NoAppTerm+--                { doBind (Pi Im) $2 $5 }+          | Constant File Line { RConst $2 $3 $1 }+          | refl { RRefl }+          | empty File Line { RVar $2 $3 (UN "__Empty") }+          | unit File Line { RVar $2 $3 (UN "__Unit") }+          | '_' { RPlaceholder }+          | DoBlock { RDo $1 }+          | oid Term cid { RIdiom $2 }+          | '(' TermList ')' File Line { pairDesugar $4 $5 (RVar $4 $5 (UN "mkPair")) $2 }+--          | '[' TermList ']' File Line { pairDesugar $4 $5 (RVar $4 $5 (UN "Exists")) $2 }+--          | '(' TypeList ')' File Line { pairDesugar $4 $5 (RVar $4 $5 (UN "Pair")) $2 }+          | SigmaType { $1 } +          | Section { $1 }+          | SigmaTerm { $1 }++SigmaTerm :: { RawTerm }+SigmaTerm : lpair Term ',' Term rpair File Line %prec PAIR+                { RApp $6 $7 (RAppImp $6 $7 (UN "a") (RVar $6 $7 (UN "Exists")) $2) $4 }+          | lpair Term rpair File Line %prec PAIR+                { RApp $4 $5 (RVar $4 $5 (UN "Exists")) $2 }++TermList :: { [RawTerm] }+         : Term ',' Term { $1:$3:[] }+         | Term ',' TermList { $1:$3 }+++DoBlock :: { [Do] }+DoBlock : do '{' DoBindings '}' { $3 }+-- Next rule is a TMP HACK! So that we can open brackets then have a name immediately.+        | do brackname MaybeType leftarrow Term File Line ';' DoBindings '}'+             { DoBinding $6 $7 $2 $3 $5 : $9 }++DoBindings :: { [Do] }+DoBindings : DoBind DoBindings { $1:$2}+           | DoBind { [$1] }++DoBind :: { Do }+DoBind : Name MaybeType leftarrow Term File Line ';' { DoBinding $5 $6 $1 $2 $4 }+       | let Name MaybeType '=' Term File Line ';' { DoLet $6 $7 $2 $3 $5 }+       | Term File Line ';' { DoExp $2 $3 $1 }++Constant :: { Constant }+Constant : type { TYPE }+         | stringtype { StringType }+         | inttype { IntType }+         | chartype { CharType }+         | floattype { FloatType }+         | ptrtype { PtrType }+         | handletype { Builtin "Handle" }+         | locktype { Builtin "Lock" }+         | int { Num $1 }+         | char { Ch $1 }+         | string { Str $1 }+         | bool { Bo $1 }+         | float { Fl $1 }++-- Whitespace separated term sequences; must be NoAppTerms since obviously+-- application is space separated...++Terms :: { [RawTerm] }+Terms : { [] }+      | NoAppTerm Terms { $1:$2 }++DType :: { (RawTerm, [(Id, RawTerm)]) }+DType : ':' Type Using where { ($2, $3) }+      | '=' File Line { (RConst $2 $3 TYPE, []) }+      | VarList '=' File Line { (mkTyParams $3 $4 $1, []) }++Using :: { [(Id, RawTerm)] }+      : { [] }+      | using '(' UseList ')' { $3 }++DoUsing ::{ (Id,Id) }+        : do using '(' Name ',' Name ')' { ($4,$6) }++Idiom ::{ (Id,Id) }+        : idiom '(' Name ',' Name ')' { ($3,$5) }++        +Params :: { [(Id, RawTerm)] }+       : params '(' UseList ')' { $3 }++UseList :: { [(Id, RawTerm)] }+        : Name ':' Type { [($1, $3)] }+        | Name ':' Type ',' UseList { ($1,$3):$5 }++VarList :: { [Id] }+VarList : Name { [$1] }+        | Name VarList { $1:$2 }++Where : where { $1 }+      | '=' { $1 }++Constructors :: { [ConParse] }+Constructors : { [] } -- None+             | Constructor { [$1] }+             | Constructor '|' Constructors { $1:$3 }++Constructor :: { ConParse }+Constructor : Name CType { Full $1 $2 }+            | Name Terms { Simple $1 $2 }+--            | Name { Simple $1 [] }++CType :: { RawTerm }+CType : ':' Type { $2 }++Tactic :: { ITactic }+Tactic : intro Names { Intro $2 }+       | intro { Intro [] }+       | refine Name { Refine $2 }+       | generalise Term { Generalise $2 }+       | reflp { ReflP }+       | rewrite Term { Rewrite False False $2 }+       | rewrite leftarrow Term { Rewrite False True $3 }+       | rewriteall Term { Rewrite True False $2 }+       | rewriteall leftarrow Term { Rewrite True True $3 }+       | compute { Compute }+       | unfold Name { Unfold $2 }+       | undo { Undo }+       | induction Term { Induction $2 }+       | fill Term { Fill $2 }+       | trivial { Trivial }+       | mktac Term { RunTactic $2 }+       | believe Term { Believe $2 }+       | use Term { Use $2 }+       | decide Term { Decide $2 }+       | abandon { Abandon }+       | qed { Qed }++ProofScript :: { [ITactic] }+ProofScript : proof '{' Tactics '}' { $3 }++Tactics :: { [ITactic] }+Tactics : Tactic ';' { [$1] }+        | Tactic ';' Tactics { $1:$3 }++Line :: { LineNumber }+     : {- empty -}      {% getLineNo }++File :: { String } +     : {- empty -} %prec NONE  {% getFileName }++Ops :: { Fixities } +     : {- empty -} %prec NONE  {% getOps }++{++data ConParse = Full Id RawTerm+              | Simple Id [RawTerm]++parse :: String -> FilePath -> Result [Decl]+parse s fn = do ds <- mkparse s fn 1 []+                collectDecls ds++processImports :: [Opt] -> [FilePath] -> Result [Decl] -> +                  IO ([Decl], [FilePath])+processImports opts imped (Success ds) = pi imped [] ds+  where pi imps decls ((PInclude fp):xs)+           | fp `elem` imps = pi imps decls xs+           | otherwise = do+                 f <- readLibFile defaultLibPath fp+                 when (Verbose `elem` opts) $ putStrLn ("Reading " ++ fp)+                 case parse f fp of+                   Success t -> pi (fp:imps) decls (t++xs)+                   Failure e f l ->+                     fail $ f ++ ":" ++ show l ++ ":" ++ e+        pi imps decls ((Using t ds):xs)+            = do (ds',imps') <- pi imps [] ds+                 pi imps' (decls++[Using t ds']) xs+        pi imps decls ((Params t ds):xs)+            = do (ds',imps') <- pi imps [] ds+                 pi imps' (decls++[Params t ds']) xs+        pi imps decls ((DoUsing b r ds):xs)+            = do (ds',imps') <- pi imps [] ds+                 pi imps' (decls++[DoUsing b r ds']) xs+        pi imps decls ((Idiom b r ds):xs)+            = do (ds',imps') <- pi imps [] ds+                 pi imps' (decls++[Idiom b r ds']) xs+        pi imps decls (x:xs) = pi imps (decls++[x]) xs+        pi imps decls [] = return (decls, imps)++processImports _ imped (Failure e f l) +    = fail $ show f ++ ":" ++ show l ++ ":" ++ show e+++parseTerm :: String -> Result RawTerm+parseTerm s = mkparseTerm s "(input)" 0 []++parseTactic :: String -> Result ITactic+parseTactic s = mkparseTactic s "(tactic)" 0 []++mkCon :: RawTerm -> ConParse -> (Id,RawTerm)+mkCon _ (Full n t) = (n,t)+mkCon ty (Simple n args) = (n, mkConTy args ty)+   where mkConTy [] ty = ty+         mkConTy (a:as) ty = RBind (MN "X" 0) (Pi Ex Eager a) (mkConTy as ty)++mkDef file line (n, tms) = mkImpApp (RVar file line n) tms+   where mkImpApp f [] = f+         mkImpApp f ((tm,Just n):ts) = mkImpApp (RAppImp file line n f tm) ts+         mkImpApp f ((tm, Nothing):ts) = mkImpApp (RApp file line f tm) ts++doBind :: (RawTerm -> RBinder) -> [(Id,RawTerm)] -> RawTerm -> RawTerm+doBind b [] t = t+doBind b ((x,ty):ts) tm = RBind x (b ty) (doBind b ts tm)++doLetBind :: [(Id,RawTerm,RawTerm)] -> RawTerm -> RawTerm+doLetBind [] t = t+doLetBind ((x,ty,val):ts) tm = RBind x (RLet val ty) (doLetBind ts tm)++mkTyApp :: String -> Int -> Id -> RawTerm -> RawTerm+mkTyApp file line n ty = mkApp file line (RVar file line n) (getTyArgs ty)+   where getTyArgs (RBind n _ t) = (RVar file line n):(getTyArgs t)+         getTyArgs x = []++mkTyParams :: String -> Int -> [Id] -> RawTerm+mkTyParams f l [] = RConst f l TYPE+mkTyParams f l (x:xs) = RBind x (Pi Ex Eager (RConst f l TYPE)) (mkTyParams f l xs)++mkDatatype :: String -> Int ->+              Id -> Either RawTerm ((RawTerm, [(Id, RawTerm)]), [ConParse]) -> +                    [TyOpt] -> Datatype+mkDatatype file line n (Right ((t, using), cons)) opts+    = Datatype n t (map (mkCon (mkTyApp file line n t)) cons) using opts file line +mkDatatype file line n (Left t) opts+    = Latatype n t file line++bracket (RUserInfix f l _ op x y) = RUserInfix f l True op x y+bracket x = x++pairDesugar :: String -> Int -> RawTerm -> [RawTerm] -> RawTerm+pairDesugar file line pair [x,y] = mkApp file line pair [x,y]+pairDesugar file line pair (x:y:xs) +    = pairDesugar file line pair ((mkApp file line pair [x,y]):xs)++sigDesugar :: String -> Int -> (Id, RawTerm) -> RawTerm -> RawTerm+sigDesugar file line (n, tm) sc+    = mkApp file line (RVar file line (UN "Sigma")) [tm, lam]+   where lam = RBind n (Lam tm) sc++}+
+ Idris/Prover.lhs view
@@ -0,0 +1,298 @@+> module Idris.Prover(doProof, runScript, doIvor, ioTac) where++> import System.Console.Readline+> import Control.Monad hiding ((>=>))+> import Data.Typeable++> import Idris.AbsSyntax+> import Idris.Parser++> import Ivor.Shell+> import Ivor.TT+> import Ivor.Construction++> import Debug.Trace++> ioTac :: TTM a -> IO a+> ioTac (Left a) = fail (show a)+> ioTac (Right v) = return v++> doProof :: Ctxt IvorFun -> Context -> UserOps -> Id -> IO Context+> doProof raw ctxt uo nm = +>     do ctxt' <- ioTac $ resume ctxt (toIvorName nm)+>        ctxt' <- ioTac $ attack defaultGoal ctxt'+>        putStrLn $ showCtxtState raw ctxt'+>        (ctxt', script, ok) <- proofShell (show nm) raw uo [] ctxt'+>        if ok then do+>            return ctxt'+>          else do putStrLn "Proof abandoned"+>                  return ctxt++> runScript :: Ctxt IvorFun -> Context -> UserOps -> Id -> [ITactic] -> +>              TTM Context+> runScript raw ctxt uo nm tacs =+>     do ctxt <- resume ctxt (toIvorName nm)+>        ctxt <- attack defaultGoal ctxt+>        execScript raw ctxt uo tacs++This function assumes that it can plough on knowing the proof is fine.+If it isn't, it'll break, but with an error. We probably ought to check+properly, if only for useful diagnostics.++> execScript :: Ctxt IvorFun -> Context -> UserOps -> [ITactic] -> TTM Context+> execScript raw ctxt uo [] = return ctxt+> execScript raw ctxt uo (t:ts) +>      = do (ctxt,_,_) <- applyTac raw ctxt uo [] t+>           ctxt <- keepSolving defaultGoal ctxt+>           ctxt <- if ((numUnsolved ctxt) > 0)+>                     then beta defaultGoal ctxt+>                     else return ctxt+>           execScript raw ctxt uo ts++> showScript :: String -> [String] -> IO ()+> showScript nm sc +>    = do putStrLn $ nm ++ " proof {"+>         putStr $ concat (map (\line -> "\t" ++ line ++ ";\n") (sc++["%qed"]))+>         putStrLn "};"++Remember the proof script (that's the [String]) and output it, without the+undone bits, after a Qed++> proofShell :: String -> Ctxt IvorFun -> UserOps -> [String] -> Context -> +>               IO (Context, [String], Bool)+> proofShell nm raw uo script ctxt = do+>     inp <- readline (nm ++ "> ")+>     res <- case inp of+>              Nothing -> return ""+>              Just ":q" -> return "abandon"+>              Just tac -> do addHistory tac+>                             return tac+>     case parseTactic ("%"++res) of+>            Failure err f l -> do putStrLn err+>                                  proofShell nm raw uo script ctxt+>            Success tac -> +>                do let script' = script ++ ["%"++res]+>                   when (tac == Qed) $ +>                        showScript nm script+>                   case applyTac raw ctxt uo script' tac of+>                     Left err -> do print err+>                                    proofShell nm raw uo script ctxt+>                     Right (ctxt, script, True) -> do+>                       ctxt <- ioTac $ keepSolving defaultGoal ctxt+>                       ctxt <- ioTac $ if ((numUnsolved ctxt) > 0)+>                                 then beta defaultGoal ctxt+>                                 else return ctxt+>                       if (proving ctxt)+>                          then do putStrLn $ showCtxtState raw ctxt+>                                  proofShell nm raw uo script ctxt+>                          else return (ctxt, script, True)+>                     _ -> return (ctxt, script, False)++> applyTac :: Ctxt IvorFun -> Context -> UserOps -> [String] -> ITactic -> +>             TTM (Context, [String], Bool)+> applyTac raw ctxt uo script Abandon = return (ctxt, script, False)+> applyTac raw ctxt uo script Undo = do ctxt <- restore ctxt+>                                    -- remove the undo and the command+>                                       let script' = init (init script)+>                                       return (ctxt, script', True)+> applyTac raw ctxt uo script tac = do ctxt <- at (save ctxt) tac +>                                      return (ctxt, script, True)+>   where+>     at ctxt (Intro []) = intros defaultGoal ctxt+>     at ctxt (Intro ns) = introsNames (map toIvorName ns) defaultGoal ctxt+>     at ctxt (Refine n) = refine (Name Unknown (toIvorName n)) defaultGoal ctxt+>     at ctxt (Generalise t) = generalise (ivor t) defaultGoal ctxt+>     at ctxt ReflP = refine reflN defaultGoal ctxt+>     at ctxt (Fill t) = fill (ivor t) defaultGoal ctxt+>     at ctxt Trivial = (trivial >|> refine reflN) defaultGoal ctxt+>     at ctxt (Believe t) = suspend_disbelief raw (ivor t) defaultGoal ctxt+>     at ctxt (Use t) = prove_belief raw (ivor t) defaultGoal ctxt+>     at ctxt (Decide t) = decide raw uo t defaultGoal ctxt+>     at ctxt (Induction t) = induction (ivor t) defaultGoal ctxt+>     at ctxt (Rewrite False f t) = rewrite (ivor t) f defaultGoal ctxt+>     at ctxt (Rewrite True f t) = rewriteAll (ivor t) f defaultGoal ctxt+>     at ctxt Compute = compute defaultGoal ctxt+>     at ctxt (Unfold n) = unfold (toIvorName n) defaultGoal ctxt+>     at ctxt (RunTactic tm) = runtac (ivor tm) defaultGoal ctxt+>     at ctxt Qed = qed ctxt++>     ivor t = makeIvorTerm noImplicit defDo uo (UN "__prf") raw t++> eqN = Name Unknown $ name "Eq"+> replN = Name Unknown $ toIvorName (UN "__eq_repl")+> symN = Name Unknown $ toIvorName (UN "__eq_sym")+> reflN = Name Unknown $ name "refl"+> eqP x y = apply eqN [Placeholder,Placeholder,x,y]+> believe x y = apply (Name Unknown (toIvorName (UN "__Suspend_Disbelief")))+>                     [Placeholder,x,y]++> rewrite :: ViewTerm -> Bool -> Tactic+> rewrite = replace eqN replN symN++Given a rewrite rule, find all places where it can be applied (in the given +direction), and apply it. Search for points where the goal matches the LHS+of the rule's type, and apply rewrite.++> rewriteAll :: ViewTerm -> Bool -> Tactic+> rewriteAll (Name _ n) dir goal ctxt +>   = do tyin <- getType ctxt n+>        let ty = view tyin+>        rule <- getRule dir (getReturnType ty)+>        let argNames = map fst (Ivor.TT.getArgTypes ty)+>        fail $ "Not finished yet " ++ show rule+>   where getRule dir (App (App (App (App +>                       (Name _ eq) Placeholder) Placeholder) l) r)+>             | eq == opFn JMEq = if dir then return (l, r) else return (r,l)+>         getRule _ _ = fail "Not a rewrite rule"++> rewriteAll tm dir _ _ = fail "Not a rewrite rule name"++> showCtxtState :: Ctxt IvorFun -> Context -> String+> showCtxtState raw ctxt+>     | not (proving ctxt) = ""+>     | null (getGoals ctxt) = "\nNo more goals\n"+>     | otherwise = let (g:gs) = getGoals ctxt in+>                      "\n" ++ showGoalState g +++>                      -- "\nOther goals: " ++ show gs ++ +>                      "\n\n"+>  where+>    showTm t = showImp False (unIvor raw (view t))+>    showGoalState :: Goal -> String+>    showGoalState g = let (Right gd) = goalData ctxt True g+>                          env = bindings gd+>                          ty = goalType gd+>                          nm = goalName gd in+>                        showEnv (reverse env) ++ "\n" +++>                        "--------------------------------\n" +++>                        show nm ++ " ? " ++ showTm ty ++ "\n"+>    showEnv [] = ""+>    showEnv ((n,ty):xs) = show n ++ " : " ++ showTm ty ++ "\n" +++>                          showEnv xs++Apply a tactic computed by an ivor function (see libs/tactics.idr for construction+of these tactics)++> doIvor :: Context -> IO Context+> doIvor ctxt = do s <- runShell "Ivor> " (newShell ctxt)+>                  return (getContext s)+++-------- Specialised tactics for Idris --------++Given a term of type T args and a goal of type T args', look for the+first difference between args and args', and rewrite by+Suspend_Disbelief arg arg'. Keep doing this until the value solves the goal,+or there is nothing to rewrite.++At least make sure arg and arg' and not Types, so that we're only +suspending disbelief about value equalities, not polymorphic values.++> suspend_disbelief :: Ctxt IvorFun -> ViewTerm -> Tactic+> suspend_disbelief raw val goal ctxt+>     = do ty <- checkCtxt ctxt goal val+>          gd <- goalData ctxt True goal+>          let gtype = view (goalType gd)+>          let vtype = viewType ty+>          let (gfn, gargs) = (getApp gtype, getFnArgs gtype)+>          let (vfn, vargs) = (getApp vtype, getFnArgs vtype)+>          when (gfn/=vfn) $ fail ((show gfn) ++ " and " ++ (show vfn) ++ +>                                  " are different types")+>          let diffs = filter (\ (x,y) -> x/=y) (zip gargs vargs)+>          ctxt <- rewriteDiffs diffs goal ctxt+>          fill val goal ctxt+>    where rewriteDiffs [] goal ctxt = idTac goal ctxt+>          rewriteDiffs ((arg1, arg2):ds) goal ctxt+>               = do let rt = believe arg1 arg2+>                    rty <- checkCtxt ctxt goal arg1+>                    when (viewType rty == Star) $+>                         fail ((show arg1) ++ " is a type")+>                    ctxt' <- rewrite rt True goal ctxt+>                    rewriteDiffs ds goal ctxt'++As above, but instead of just believing the value, insert subgoals for+the required equality proofs++> prove_belief :: Ctxt IvorFun -> ViewTerm -> Tactic+> prove_belief raw val goal ctxt+>     = do ty <- checkCtxt ctxt goal val+>          gd <- goalData ctxt True goal+>          let gtype = view (goalType gd)+>          let vtype = viewType ty+>          let (gfn, gargs) = (getApp gtype, getFnArgs gtype)+>          let (vfn, vargs) = (getApp vtype, getFnArgs vtype)+>          when (gfn/=vfn) $ fail ((show gfn) ++ " and " ++ (show vfn) ++ +>                                  " are different types")+>          let diffs = filter (\ (x,y) -> x/=y) (zip gargs vargs)+>          ctxt <- rewriteDiffs diffs goal ctxt+>          fill val goal ctxt+>    where rewriteDiffs [] goal ctxt = idTac goal ctxt+>          rewriteDiffs ((arg1, arg2):ds) goal ctxt+>               = do let claimTy = eqP arg1 arg2+>                    claimName <- uniqueName ctxt (name "equality")+>                    ctxt <- claim claimName claimTy goal ctxt+>                    rty <- checkCtxt ctxt goal arg1+>                    when (viewType rty == Star) $+>                         fail ((show arg1) ++ " is a type")+>                    ctxt' <- rewrite (Name Unknown claimName) True goal ctxt+>                    rewriteDiffs ds goal ctxt'++decide; given a goal of the form X a b c, and a function x of type+x : a:A -> b:B -> c:C -> (Maybe (X a b c), apply the function to+a b c, and send the result to Ivor's isItJust tactic++_or_; given a goal of the form X a b c, and a function x of type+x: a:A -> b:B -> c:C -> Tactic, send x a b c to runtac below.++> decide :: Ctxt IvorFun -> UserOps -> RawTerm -> Tactic+> decide raw uo dproc goal ctxt = do+>    gd <- goalData ctxt True goal+>    let idgoal = unIvor raw ((view.goalType) gd)+>    let args = getExplicitArgs idgoal+>    let dapp = makeIvorTerm noImplicit defDo uo (UN "__prf") raw +>                            (mkApp "[proof]" 0 dproc args)+>    (isItJust dapp >|> runtac dapp) goal ctxt++Run a tactic computed by mkTac++Check the term actually computes a tactic, then evaluate it, then run the actual tactics+the result term tells us to run.++> runtac :: ViewTerm -> Tactic+> runtac tmin goal ctxt = +>    do tm <- checkCtxt ctxt goal tmin+>       checkTac (viewType tm)+>       tm' <- evalCtxt ctxt goal tm+>       exect (view tm') goal ctxt++>   where checkTac (Name _ n) | n == (name "Tactic") = return ()+>         checkTac ty = fail $ (show ty) ++ " is not of type Tactic"++>         exect t g c = do c' <- exect' t g c+>                          c' <- keepSolving defaultGoal c'+>                          if ((numUnsolved c') > 0)+>                             then beta defaultGoal c'+>                             else return c'++>         exect' (App (App (Name _ tthen) x) y) | tthen == name "TThen" +>               = exect x >+> exect y+>         exect' (App (App (Name _ tseq) x) y) | tseq == name "TSeq" +>               = exect x >-> exect y+>         exect' (App (App (Name _ tthen) x) y) | tthen == name "TThenAll" +>               = exect x >=> exect y+>         exect' (App (App (Name _ ttry) x) y) | ttry == name "TTry" +>               = exect x >|> exect y+>         exect' (App (App (Name _ tfill) _) y) | tfill == name "TFill" +>               = fill y >+> keepSolving+>         exect' (App (Name _ trefine) (Constant s)) | trefine == name "TRefine" =+>                  case cast s :: Maybe String of+>                    Just str -> refine str+>         exect' (App (Name _ tfail) (Constant s)) | tfail == name "TFail" =+>                  \ g c -> case cast s :: Maybe String of+>                              Just err -> ttfail err +>         exect' (Name _ ttrivial) | ttrivial == name "TTrivial" = trivial >|> refine reflN+>         exect' tm = \ g c -> ttfail "Couldn't compute tactic"++XXX: Auto-rewrite: user can add rewrite rules, auto-rewrite repeatedly+rewrites by these rules until there's no more to rewrite, or until a+threshold is reached. Effectively looking for some kind of normal+form. Can we do this in any reasonable way?
+ Idris/RunIO.hs view
@@ -0,0 +1,184 @@+{-# OPTIONS_GHC -fglasgow-exts -fallow-undecidable-instances -fallow-overlapping-instances #-}+{-# LANGUAGE MagicHash, UndecidableInstances, OverlappingInstances #-}++module Idris.RunIO where++-- import SimplDSL++import Ivor.TT+import Ivor.Shell+import Ivor.Construction++import Data.Typeable+import Data.IORef+import System.IO.Unsafe+import System.IO+import Control.Monad.Error+import Control.Concurrent+import Debug.Trace++newtype Lock = Lock QSem++instance Typeable Lock where+    typeOf a = mkTyConApp (mkTyCon "Lock") []++instance Show Lock where+    show x = "<<Lock>>"++instance Eq Lock where+    (==) x y = False -- Hmm++instance ViewConst Handle where+    typeof x = (name "Handle")++instance ViewConst Lock where+    typeof x = (name "Lock")++exec :: Context -> Term -> IO ()+exec ctxt wurzel = do res <- runIO ctxt (view (whnf ctxt wurzel))+                      putStrLn $ show res++runIO :: Context -> ViewTerm -> IO ViewTerm+runIO ctxt (App (App (App (Name _ d) _) act) k)+    | d == name "IODo" = runAction ctxt (parseAction act) k+runIO ctxt (App (App (Name _ l) _) res)+    | l == name "IOReturn" = return res+runIO _ x = fail $ "Not an IO action: " ++ show x++data Action = ReadStr+            | WriteStr String+            | Fork ViewTerm+            | NewLock Int+            | DoLock Lock+            | DoUnlock Lock+            | NewRef+            | ReadRef Int+            | WriteRef Int ViewTerm+            | CantReduce ViewTerm++parseAction x = parseAction' x [] where+  parseAction' (App f a) args = parseAction' f (a:args)+  parseAction' (Name _ n) args = (getAction n args)++getAction n []+    | n == name "GetStr" = ReadStr+getAction n [Constant str]+    | n == name "PutStr"+        = case cast str of+             Just str' -> WriteStr str'+getAction n [_,t]+    | n == name "Fork"+        = Fork t+getAction n [Constant i]+    | n == name "NewLock" +        = case cast i of+             Just i' -> NewLock i'+getAction n [lock]+    | n == name "DoLock"+        = DoLock (getLock lock)+    | n == name "DoUnlock"+        = DoUnlock (getLock lock)+getAction n []+    | n == name "NewRef" = NewRef+getAction n [_,Constant i]+    | n == name "ReadRef" +        = case cast i of+             Just i' -> ReadRef i'+getAction n [_,Constant i,val]+    | n == name "WriteRef"+        = case cast i of+             Just i' -> WriteRef i' val++getAction n args = CantReduce (apply (Name Unknown n) args)++getHandle  (App _ (Constant h)) = case cast h of+                                   Just h' -> h'+getLock (Constant h) = case cast h of+                         Just h' -> h'+                         Nothing -> error ("Lock error in constant " ++ show h)+getLock x = error ("Lock error " ++ show x)++continue ctxt k arg = case fastCheck ctxt (App k arg) of+                        t -> let next = whnf ctxt t in+                             runIO ctxt (view next)+{-                          Right t -> let next = whnf ctxt t in+                                         runIO ctxt (view next)+                          Left err -> fail $ "Can't happen - continue " ++ err ++ "\n" ++ show k ++ "\n" ++ show arg+-}++unit = Name Unknown (name "II")++runAction ctxt (WriteStr str) k+      -- Print the string, then run the continuation with the argument 'II'+        = do putStr str+             hFlush stdout+             continue ctxt k unit+runAction ctxt ReadStr k+      -- Read a string then run the continuation with the constant str+      = do str <- getLine+           continue ctxt k (Constant str)+runAction ctxt (Fork t) k+      = do forkIO (do x <- runIO ctxt t+                      return ())+           continue ctxt k unit+runAction ctxt (NewLock n) k+      = do mv <- newQSem n+           continue ctxt k (Constant (Lock mv))+runAction ctxt (DoLock l) k+      = do primLock l+           continue ctxt k unit+runAction ctxt (DoUnlock l) k+      = do primUnlock l+           continue ctxt k unit+runAction ctxt NewRef k+      = do i <- newRef+           continue ctxt k (Constant i)+runAction ctxt (ReadRef i) k+      = do v <- getMem i+           continue ctxt k v+runAction ctxt (WriteRef i val) k+      = do putMem i val+           continue ctxt k unit+runAction ctxt (CantReduce t) k+      = do fail $ "Stuck at: " ++ show t+           -- hFlush stdout++primLock :: Lock -> IO ()+primLock (Lock lock) = do waitQSem lock++primUnlock :: Lock -> IO ()+primUnlock (Lock lock) = signalQSem lock+++-- Some mutable memory, for implementing IORefs idris side.++type Value = ViewTerm+defaultVal = (Constant (0xDEADBEEF::Int))++data MemState = MemState (IORef (Int, [Value]))++memory :: MemState+memory = unsafePerformIO +               (do mem <- newIORef (0, (take 100 (repeat defaultVal)))+                   return (MemState mem))++newRef :: IO Int+newRef = do let (MemState mem) = memory+            (p,ref) <- readIORef mem+            writeIORef mem (p+1, ref)+            return p++putMem :: Int -> Value -> IO ()+putMem loc val = do let (MemState mem) = memory+                    (p,content) <- readIORef mem+                    writeIORef mem (p, update content loc val)++getMem :: Int -> IO Value+getMem loc = do let (MemState mem) = memory+                (p, content) <- readIORef mem+                return (content!!loc)++update :: [a] -> Int -> a -> [a]+update [] _ _ = []+update (x:xs) 0 v = (v:xs)+update (x:xs) n v = x:(update xs (n-1) v)
+ Idris/SCTrans.lhs view
@@ -0,0 +1,175 @@+> {-# OPTIONS_GHC -fglasgow-exts #-}++Transformations at the supercombinator level.++Includes transforming data types into special case more efficient versions.+e.g. Nat -> Int, possibly List -> Block of memory, etc.++NOTE: Anything which has the shape of Nat, e.g. Fin could be converted to Nat +at an earlier stage, e.g. in ConTrans phase, then these transformations+would take effect.++> module Idris.SCTrans(transformSC, applyTransformsSC, SCTrans(..)) where++> import Idris.AbsSyntax+> import Idris.LambdaLift++> import Ivor.TT++> import Maybe+> import Debug.Trace++> data SCTrans = SCTrans String (SCBody -> SCBody)++> allSCTrans = [cfold, natCons, natCase, boolCons, boolCase, natArith, cfold]++Easier to take 'erasure' as an argument here - don't do constructor+transformations if we're not doing erasure (could do others).++> transformSC :: Bool -> SCFun -> SCFun+> transformSC erasure (SCFun c ns b) = SCFun c ns (tr b) where+>     tr tm = if erasure then applyTransformsSC allSCTrans tm+>                else tm++> applyTransformsSC :: [SCTrans] -> SCBody -> SCBody+> applyTransformsSC ts tm = foldl (flip doTrans) tm ts++Built-in transformations.++* Constant folding++> cfold = SCTrans "Constant Folding" con where+>    con (SInfix op (SConst (Num x)) (SConst (Num y)))+>        | Just r <- runOp op x y = SConst (Num r)+>    con x = x+>    runOp Plus x y = Just $ x+y+>    runOp Minus x y = Just $ x-y+>    runOp Times x y = Just $ x*y+>    runOp Divide x y = Just $ x `div` y+>    runOp _ x y = Nothing++* Nat constructors++> natCons = SCTrans "NatCons" ncon where+>    ncon (SApp (SCon succ t) [arg]) +>           | succ == name "S" = SInfix Plus (SConst (Num 1)) arg+>    ncon (SCon zero t) +>           | zero == name "O" = SConst (Num 0)+>    ncon x = x++* Nat function special cases++> natArith = SCTrans "NatArith" narith where+>    narith (SApp (SVar op) [x,y]) ++Arithmetic can use machine operations++>           | op == name "plus" = SInfix Plus x y+>           | op == name "mult" = SInfix Times x y++Conversions between nat and int are just no-ops++>    narith (SApp (SVar op) [x]) +>           | op == name "natToInt" = x+>           | op == name "intToNat" = x++>    narith x = x++* Nat destructor (case)++> natCase = SCTrans "NatCase" ncase where+>    ncase x@(SCCase t alts) +>     = case getNatAlts alts of+>              (Just z, Just (arg, s), _) -> mkNatRHS t z (doSuc arg t s)+>              (Just z, Nothing, Just d) -> mkNatRHS t z d+>              (Nothing, Just (arg, s), Just d) -> mkNatRHS t d (doSuc arg t s)+>              (Nothing, Nothing, Just d) -> x+>              _ -> x+>    ncase x = x++if t==0 then z else s++>    mkNatRHS t z s = SIfZero t z s++let arg = t - 1 in s++>    doSuc arg t s = SLet arg (SInfix Minus t (SConst (Num 1))) s++>    getNatAlts alts = let zs = mHead (mapMaybe getZeroAlt alts)+>                          ss = mHead (mapMaybe getSuccAlt alts)+>                          defs = mHead (mapMaybe getDefault alts) in+>                                 (zs, ss, defs)+>                 +>    mHead [x] = Just x+>    mHead [] = Nothing+>    getZeroAlt (SAlt zero t [] zrhs) +>                 | zero == name "O" = return zrhs+>    getZeroAlt _ = fail "no O"+>    getSuccAlt (SAlt succ t [arg] srhs) +>                 | succ == name "S" = return (arg, srhs)+>    getSuccAlt _ = fail "no S"+>    getDefault (SDefault drhs) = return drhs+>    getDefault _ = fail "no default"+++[SAlt zero t [] zrhs]]+[SAlt succ t [arg] shrs]+[SAlt zero t [] zrhs, SAlt succ t [arg] shrs, _]++* Bool constructors++> boolCons = SCTrans "BoolCons" ncon where+>    ncon (SCon true t)+>           | true == name "True" = SConst (Num 1)+>    ncon (SCon false t) +>           | false == name "False" = SConst (Num 0)+>    ncon x = x++* Bool destructor (case)++> boolCase = SCTrans "BoolCase" bcase where+>    bcase x@(SCCase t alts) +>     = case getBoolAlts alts of+>              (Just fc, Just tc, _) -> mkBoolRHS t fc tc+>              (Just fc, Nothing, Just d) -> mkBoolRHS t fc d+>              (Nothing, Just tc, Just d) -> mkBoolRHS t d tc+>              (Nothing, Nothing, Just d) -> x+>              _ -> x+>    bcase x = x++>    mkBoolRHS t z s = SIfZero t z s++>    getBoolAlts alts = let fs = mHead (mapMaybe getFalseAlt alts)+>                           ts = mHead (mapMaybe getTrueAlt alts)+>                           defs = mHead (mapMaybe getDefault alts) in+>                                  (fs, ts, defs)+>                 +>    mHead [x] = Just x+>    mHead [] = Nothing++>    getFalseAlt (SAlt false t [] frhs) +>                 | false == name "False" = return frhs+>    getFalseAlt _ = fail "no O"+>    getTrueAlt (SAlt true t [] trhs) +>                 | true == name "True" = return trhs+>    getTrueAlt _ = fail "no True"+>    getDefault (SDefault drhs) = return drhs+>    getDefault _ = fail "no default"++> doTrans :: SCTrans -> SCBody -> SCBody+> doTrans (SCTrans _ trans) tm = tr tm where+>     tr (SApp b bs) = trans (SApp (tr b) (map tr bs))+>     tr (SLet n v sc) = trans (SLet n (tr v) (tr sc))+>     tr (SCCase b alts) = trans (SCCase (tr b) (map tralt alts))+>     tr (SInfix op l r) = trans (SInfix op (tr l) (tr r))+>     tr (SLazy s) = trans (SLazy (tr s))+>     tr (SIf i t e) = trans (SIf (tr i) (tr t) (tr e))+>     tr (SIfZero i t e) = trans (SIfZero (tr i) (tr t) (tr e))+>     tr s = trans s++>     tralt (SAlt n t args rhs) = SAlt n t args (tr rhs)+>     tralt (SConstAlt c rhs) = SConstAlt c (tr rhs)+>     tralt (SDefault rhs) = SDefault (tr rhs)+++
+ Idris/SimpleCase.lhs view
@@ -0,0 +1,121 @@+> {-# OPTIONS_GHC -fglasgow-exts #-}++> module Idris.SimpleCase(liftCases, addPatternDefSC, addMeta) where++> import Idris.AbsSyntax++> import Ivor.ViewTerm+> import Ivor.TT++> import Control.Monad.State+> import Debug.Trace++> type LCState = (Int, [(Name, ViewTerm, Patterns)])++> liftCases :: Name -> Patterns -> (Patterns, [(Name, ViewTerm, Patterns)])+> liftCases n ps +>      = let (ps', (i, ns)) = runState (liftCasePatts n ps) (10000, []) in+>            {- trace (show (ps', ns)) $ -} (ps', ns)++> liftCasePatts :: Name -> Patterns -> +>                  State LCState Patterns+> liftCasePatts n (Patterns ps) +>               = do ps' <- liftPs ps []+>                    (_, ns) <- get+>                    return (Patterns ps')+>    where liftPs [] acc = return acc+>          liftPs ((PClause args bs rv):ps) acc+>                    = do rv' <- lc n bs rv+>                         liftPs ps (acc ++ [PClause args bs rv'])+>          liftPs ((PWithClause p args sc pdefs):ps) acc+>                    = do sc' <- lc n [] sc+>                         pdefs' <- liftCasePatts n pdefs+>                         liftPs ps (acc ++ [PWithClause p args sc' pdefs'])+++> lc :: Name -> [(Name, ViewTerm)] -> ViewTerm -> State LCState ViewTerm +> lc root bs = lc' where+>  lc' tm | Name nty fn <- getApp tm+>       = let args = getFnArgs tm in+>            if (fn == name "__CASE" && length args == 4)then +>                 do (i, fns) <- get+>                    let params = bs+>                    let paramArgs = map (Name Unknown) (map fst params)+>                    let newdef = Patterns (getNewDef paramArgs (deAnnot (args!!3)))+>                    let argtype = args!!0+>                    let rettype = args!!1+>                    let scrutinee = args!!2+>                    let newty = getNewType params argtype rettype+>                    let newname = name (show (MN (show root) i))+>                    let newfn = (newname, newty, newdef)+>                    put (i+1, newfn:fns)+>                    trace (show (newname, params, newdef)) $+>                      return (apply (Name Unknown newname) (paramArgs++[scrutinee]))+>                 else return tm+>  lc' (App f a) = do f' <- lc' f; a' <- lc' a; return (App f' a')+>  lc' (Lambda n t sc) +>    = do t' <- lc' t; sc' <- lc' sc; return (Lambda n t' sc')+>  lc' (Forall n t sc) +>    = do t' <- lc' t; sc' <- lc' sc; return (Forall n t' sc')+>  lc' (Let n t v sc) +>    = do t' <- lc' t; v' <- lc' v; +>         sc' <- lc' sc; return (Let n t' v' sc')+>  lc' (Annotation a t) = do t' <- lc' t; return (Annotation a t')+>  lc' x = return x++> getNewDef :: [ViewTerm] -> ViewTerm -> [PClause]+> getNewDef ps (Let _ _ _ sc) = getNewDef ps sc+> getNewDef ps (App (App (App (App (App (Name _ branch) _) _) patt) ret) next)+>           | branch == name "__BRANCH"+>                = PClause (ps++[patt]) [] ret +>                    : getNewDef ps next+> getNewDef ps x = []++> getParams :: ViewTerm -> [(Name, ViewTerm)]+> getParams (App (App (App (Name _ is) ty) (Name _ n)) rest)+>           | is == name "__IS" = (n, ty):getParams rest+> getParams _ = []++> getNewType :: [(Name, ViewTerm)] -> ViewTerm -> ViewTerm -> ViewTerm+> getNewType [] arg ret = Forall (name "__X") arg ret+> getNewType ((n,ty):ns) arg ret = Forall n ty (getNewType ns arg ret)++> deAnnot :: ViewTerm -> ViewTerm+> deAnnot (Annotation a t) = deAnnot t+> deAnnot (App f a) = App (deAnnot f) (deAnnot a)+> deAnnot x = x++> addPatternDefSC :: Context -> Name -> ViewTerm -> Patterns ->+>                    TTM (Context, [(Name, ViewTerm)])+> addPatternDefSC ctxt nm ty ps = do+>     -- just allow general recursion for now+>     (ctxt', newdefs) <- addPatternDef ctxt nm ty ps [Holey,Partial,GenRec]+>     (_, patts) <- getPatternDef ctxt' nm+>     let (ps', ds) = liftCases nm patts+>     if (null ds) then return (ctxt', newdefs)+>        else do+>          (ctxt', newdefs) <- addAll ctxt ds []+>          (ctxt', newdefs') <- addPatternDef ctxt' nm ty ps' [Holey,Partial,GenRec]+>          return (ctxt', newdefs++newdefs')+>  where addAll ctxt [] nds = return (ctxt, nds)+>        addAll ctxt ((n,ty,ps):rs) nds = do+>          (ctxt', newdefs') <- addPatternDefSC ctxt n ty ps+>          addAll ctxt' rs (newdefs'++nds) ++> addMeta :: Bool ->+>            Ctxt IvorFun -> Context -> +>           [(Name, ViewTerm)] -> [(Name, ViewTerm)] -> +>            TTM (Context, [(Name, ViewTerm)])+> addMeta verbose raw ctxt metas newdefs+>       = let ans = (ctxt, metas ++ newdefs) in+>                   if verbose then trace ("Metavariables are:\n" ++  concat (map showDef newdefs)) $ return ans+>                              else return ans+>    where+>          showDef (n,ty) = "  " ++ show n ++ " : " ++ dumpMeta (unIvor raw ty)+>                           ++ "\n"+>          dumpMeta tm = showImp False (Idris.AbsSyntax.getRetType tm) ++ +>                        "\n  in environment\n" ++ +>                        dumpArgs (Idris.AbsSyntax.getArgTypes tm)+>          dumpArgs [] = ""+>          dumpArgs ((n,ty):xs) = "    " ++ show n ++ " : " ++showImp False ty+>                                 ++ "\n" ++ dumpArgs xs
+ LICENSE view
@@ -0,0 +1,32 @@+Copyright (c) 2006 Edwin Brady+    School of Computer Science, University of St Andrews+All rights reserved.++This code is derived from software written by Edwin Brady+(eb@dcs.st-and.ac.uk).++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions+are met:+1. Redistributions of source code must retain the above copyright+   notice, this list of conditions and the following disclaimer.+2. Redistributions in binary form must reproduce the above copyright+   notice, this list of conditions and the following disclaimer in the+   documentation and/or other materials provided with the distribution.+3. None of the names of the copyright holders may be used to endorse+   or promote products derived from this software without specific+   prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR+PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.++*** End of disclaimer. ***
+ Main.lhs view
@@ -0,0 +1,565 @@+> module Main where++> import Ivor.TT hiding (transform)+> import Ivor.Shell++> import System+> import System.Environment+> import System.Time+> import System.Locale+> import System.IO+> import System.Console.Readline+> import Data.Typeable+> import Data.Binary+> import Char+> import Control.Monad+> import Control.Exception+> import List+> import Debug.Trace+> import Prelude hiding (catch)++> import Idris.AbsSyntax+> import Idris.MakeTerm+> import Idris.Lib+> import Idris.Parser+> import Idris.Latex+> import Idris.Compiler+> import Idris.Prover+> import Idris.ConTrans+> import Idris.Fontlock+> import Idris.Serialise++> import Idris.RunIO++Load things in this order:++* Introduce equality+* Load builtins (which don't rely on primitive types)+* Add primitives+* Load prelude+* Load users program++> idris_version = "0.1.2"++> data Args = Batch [String]+>           | NoArgs++> main :: IO ()+> main = do args <- getArgs+>           (infile, (batch, opts)) <- usage args+>           ctxt <- ioTac $ addEquality emptyContext (name "Eq") (name "refl")+>           (ctxt, defs) <- processInput ctxt (initState opts) "builtins.idr"+>           ctxt <- ioTac $ prims ctxt+>           (ctxt, defs) <- processInput ctxt defs "prelude.idr"+>           (ctxt, defs) <- processInput ctxt defs infile+>           repl defs ctxt batch++> usage [fname] = return (fname, (NoArgs, []))+> usage (fname:opts) = do o <- mkArgs opts+>                         return (fname, o)+> usage _ = umessage++> umessage = +>   do putStrLn $ "Idris version " ++ idris_version+>      putStrLn $ "--------------" ++ take (length idris_version) (repeat '-')+>      putStrLn $ "Usage:"+>      putStrLn $ "\tidris <source file> [options]"+>      putStrLn $ "\n\tAvailable options:"+>      putStrLn $ "\t\t -o <executable>   Compile to an executable"+>      putStrLn $ "\t\t --run             Compile and run"+>      putStrLn $ "\t\t --nospec          Turn off specialisation and transformation rules"+>      putStrLn $ "\t\t --noerasure       Turn off erasure optimisations"+>      putStrLn $ "\t\t --cmd <command>   Run a command in batch mode"+>      putStrLn $ "\t\t --verbose         Debugging output"+>      putStrLn $ "\n"+>      exitWith (ExitFailure 1)++> mkArgs xs = mkA' [] [] xs where+>     mkA' [] opts [] = return (NoArgs, opts)+>     mkA' args opts [] = return (Batch (reverse args), opts)+>     mkA' args opts ("-o":output:xs) +>           = mkA' ((":c " ++ output):args) opts xs+>     mkA' args opts ("--run":xs) +>           = mkA' (":e":args) opts xs+>     mkA' args opts ("-v":xs)+>           = mkA' args (Verbose:opts) xs+>     mkA' args opts ("--verbose":xs)+>           = mkA' args (Verbose:opts) xs+>     mkA' args opts ("--nospec":xs)+>           = mkA' args (NoSpec:opts) xs+>     mkA' args opts ("--noerasure":xs)+>           = mkA' args (NoErasure:opts) xs+>     mkA' args opts ("--cmd":b:xs)+>           = mkA' (b:args) opts xs+>     mkA' args opts (x:xs) = do putStrLn $ "Unrecognised option " ++ x ++ "\n"+>                                umessage++Time functions+FIXME: These use System.Time which is deprecated. Find out what to use+these days instead...++> picosec = 1000000000000+> mins = picosec*60+> hours = mins*60+> days = hours*24++> getTime :: IO Integer +> getTime = do (TOD sec pico) <- getClockTime+>              return $ sec*picosec+pico+> diffTime t1 t2 = t1-t2+> showTime t = show (t `div` picosec) ++ "." ++ +>              (take 6 (zeros (show (t `mod` picosec)))) +++>              " seconds"+>          -- add leading zeros+>    where zeros t = (take (12 - length t) (repeat '0')) ++ t ++> processInput :: Context -> IdrisState -> FilePath ->+>                 IO (Context, IdrisState)+> processInput ctxt ist file = do+>     let defs = idris_context ist+>     let decls = idris_decls ist+>     let opts = idris_options ist+>     let fixes = idris_fixities ist+>     content <- readLibFile defaultLibPath file+>     (ptree, imps) <- processImports opts (idris_imports ist) (parse content file)+>     let (defs', ops) = makeIvorFuns opts defs ptree fixes+>     let alldefs = appCtxt defs defs'+>     ((ctxt, metas), fixes') <- +>         case (addIvor opts alldefs defs' ctxt ops) of+>             OK x fixes' -> return (x, fixes')+>             Err x fixes' err -> do putStrLn err +>                                    return (x, fixes')+>     let ist = addTransforms (IState alldefs (decls++ptree) metas opts ops [] imps) ctxt +>     return (ctxt, ist { idris_fixities = fixes' })++> data REPLRes = Quit | Continue | NewCtxt IdrisState Context++Command; minimal abbreviation; function to run it; description; visibility++> commands+>    = [("quit", "q", quit, "Exits the top level",True),+>       ("type", "t", tmtype, "Print the type of a term",True),+>       ("prove", "p", prove, "Begin a proof of an undefined name",True),+>       ("metavars", "m", metavars, +>                    "Show remaining proof obligations",True),+>       ("ivor", "i", ivor, "Drop into the Ivor shell",True),+>       ("compile", "c", tcomp, "Compile a definition (of type IO ()", True),+>       ("execute", "e", texec, "Compile and execute 'main'", True),+>       ("LATEX", "L", latex, "Render a source file as LaTeX",False),+>       ("HTML","H", html, "Render a source file as html", False),+>       ("normalise", "n", norm, "Normalise a term (without executing)", True),+>       ("definition", "d", showdef, "Show the erased version of a function or type", True),+>       ("options","o", options, "Set options", True),+>       ("help", "h", help, "Show help text",True),+>       ("save", "s", ssave, "Save system state",True),+>       ("load", "l", sload, "Load system state",True),+>       ("xdebug", "xd", debug, "Show some internal stuff", False),+>       ("?", "?", help, "Show help text",True)]++> type Command = IdrisState -> Context -> [String] -> IO REPLRes++> quit, tmtype, prove, metavars, tcomp, texec :: Command +> debug, norm, help, options, showdef, html, ssave :: Command++> quit _ _ _ = do return Quit+> tmtype (IState raw _ _ _ uo _ _) ctxt tms +>            = do icheckType raw uo ctxt (unwords tms)+>                 return Continue+> prove ist ctxt (nm:[]) +>           = do let raw = idris_context ist+>                ctxt' <- doProof raw ctxt (idris_fixities ist) (UN nm)+>                let imv = filter (\ (x,y) -> x /= toIvorName (UN nm))+>                              (idris_metavars ist)+>                let ist' = ist { idris_metavars = imv }+>                return (NewCtxt ist' ctxt')+> prove ist ctxt _ = do putStrLn "What do you want to prove?"+>                       return Continue+> metavars ist ctxt _+>           = do let vars = idris_metavars ist+>                if (null vars)+>                   then putStrLn "All proofs complete."+>                   else +>                     do putStr "Proof obligations:\n\t"+>                        print (map fst vars)+>                        putStr "\n"+>                return Continue+> ivor ist ctxt _ = do ctxt' <- doIvor ctxt+>                      return (NewCtxt ist ctxt')++ latex ist ctxt (nm:defs) +           = do latexDump (idris_context ist) (latexDefs defs) (UN nm)+                return Continue++> html ist ctxt (nm:onm:style:_)+>           = do htmlise (idris_context ist) nm onm (Just style)+>                return Continue+> html ist ctxt (nm:onm:_)+>           = do htmlise (idris_context ist) nm onm Nothing+>                return Continue+> html ist ctxt _+>           = do putStrLn "Please give input and output files"+>                return Continue+> ssave ist ctxt (nm:_)+>           = do encodeFile nm ist+>                return Continue+> ssave ist ctxt _+>           = do putStrLn "Please give an output file name"+>                return Continue+> sload ist ctxt (nm:_)+>           = do ist' <- decodeFile nm+>                return (NewCtxt ist' ctxt)+> sload ist ctxt _+>           = do putStrLn "Please give an input file name"+>                return Continue+> latex ist ctxt (nm:onm:_)+>           = do latexise (idris_context ist) nm onm+>                return Continue+> latex ist ctxt _+>           = do putStrLn "Please give input and output files"+>                return Continue+> debug ist ctxt []+>           = do print (idris_fixities ist)+>                return Continue+> tcomp ist ctxt [] +>           = do putStrLn "Please give an output filename"+>                return Continue+> tcomp ist ctxt (top:[]) +>           = do let raw = idris_context ist+>                comp ist ctxt (UN top) top+>                -- putStrLn $ "Output " ++ top+>                return Continue+> tcomp ist ctxt (top:exec:_) +>           = do comp ist ctxt (UN top) exec+>                return Continue+> texec ist ctxt _ +>           = do time <- getTime+>                res <- comp ist ctxt (UN "main") "main"+>                ctime <- getTime+>                let cdiff = diffTime ctime time+>                when (ShowRunTime `elem` (idris_options ist))+>                     (putStrLn $ "Compile time: " ++ showTime cdiff ++ "\n")+>                when res (do system "./main"+>                             return ())+>                rtime <- getTime+>                let rdiff = diffTime rtime ctime+>                when (ShowRunTime `elem` (idris_options ist))+>                     (putStrLn $ "\nRun time: " ++ showTime rdiff)+>                return Continue+> norm ist ctxt tms +>          = do let raw = idris_context ist+>               termInput False raw (idris_fixities ist) ctxt (unwords tms)+>               return Continue+> options ist ctxt []+>          = do putStrLn $ "Options: " ++ show (idris_options ist)+>               return Continue+> options ist ctxt tms +>          = do let opts = idris_options ist+>               let ist' = addTransforms (ist { idris_options = processOpts opts tms }) ctxt+>               return $ NewCtxt ist' ctxt++> help _ _ _ +>    = do putStrLn $ "\nIdris version " ++ idris_version+>         putStrLn $ "----------------" ++ take (length idris_version) (repeat '-')+>         putStrLn "Commands available:\n"+>         putStrLn "\t<expression>     Execute the given expression"+>         mapM_ (\ (com, _, _, desc,vis) -> +>                    if vis +>                       then putStrLn $ "\t:" ++ com ++ (take (16-length com) (repeat ' ')) ++ desc+>                       else return ()) commands+>         putStrLn "\nCommands may be given the shortest unambiguous abbreviation (e.g. :q, :l)\n"+>         return Continue++> repl :: IdrisState -> Context -> Args -> IO ()+> repl ist ctxt (Batch []) = return () +> repl ist@(IState raw decls metas opts fixes trans imps) ctxt inp' +>          = do (inp, next) <- case inp' of +>                        Batch (b:bs) -> return (Just b, Batch bs)+>                        _ -> do x <- readline ("Idris> ")+>                                return (x, NoArgs)+>               res <- case inp of+>                        Nothing ->+>                            do putChar '\n'+>                               return Quit+>                        Just (':':command) -> +>                            do addHistory (':':command)+>                               runCommand (words command) commands+>                        Just exprinput -> +>                            do termInput' raw fixes ctxt exprinput+>                               addHistory exprinput+>                               return Continue+>               case res of+>                      Continue -> repl ist ctxt next+>                      NewCtxt ist' ctxt' -> repl ist' ctxt' next+>                      Quit -> return ()++>   where+>      runCommand (c:args) ((_, abbr, fun, _, _):xs) +>         | matchesAbbrev abbr c = fun ist ctxt args+>         | otherwise = runCommand (c:args) xs+>      runCommand _ _ = do putStrLn "Unrecognised command"+>                          help ist ctxt []+>                          return Continue+>      matchesAbbrev [] _ = True+>      matchesAbbrev (a:xs) (c:cs) | a == c = matchesAbbrev xs cs+>                                  | otherwise = False+>      matchesAbbrev _ _ = False++>      termInput' r f c inp = handle handler $ termInput True r f c inp+>         where handler StackOverflow = putStrLn "Stack overflow"+>               handler UserInterrupt = putStrLn "Interrupted"+>               handler e             = throwIO e++> termInput runio raw uo ctxt tm +>         = case getTerm tm of+>                Right tm -> execEval runio raw ctxt (tm, viewType tm)+>                Left err -> print err+>   where getTerm tm = do let parsed' = parseTerm tm+>                         case parsed' of+>                           Success parsed -> do+>                              let itm = makeIvorTerm noImplicit defDo uo (UN "__main") raw parsed+>                              check ctxt itm+>                           Failure err f l -> ttfail err++If it is an IO type, execute it, otherwise just eval it.++> execEval :: Bool -> Ctxt IvorFun -> Context -> (Term, ViewTerm) -> IO ()+> execEval True ivs ctxt (tm, (App (Name _ io) _))+>          | io == name "IO" = do catch (exec ctxt tm)+>                                       (\e -> print (e :: IOError))+>                                 -- putStrLn $ show (whnf ctxt tm)+> execEval runio ivs ctxt (tm, _) +>         = do let res = (evalnew ctxt tm)+>              -- print res+>              -- putStrLn (showImp True (unIvor ivs (view res)))+>              putStr (showImp False (unIvor ivs (view res)))+>              putStrLn $ " : " ++ showImp False (unIvor ivs (viewType res))++> icheckType :: Ctxt IvorFun -> UserOps -> Context -> String -> IO ()+> icheckType ivs uo ctxt tmin+>         = case parseTerm tmin of +>               Success tm -> +>                    do let itm = makeIvorTerm noImplicit defDo uo (UN "__main") ivs tm+>                       gtm <- ioTac $ check ctxt itm+>                       putStrLn $ showImp False (unIvor ivs (viewType gtm))+>               Failure err _ _ -> putStrLn err+++> processOpts :: [Opt] -> [String] -> [Opt]+> processOpts opts [] = opts+> processOpts opts (x:xs) = processOpts (processOpt opts x) xs++> processOpt opts "f-" = nub (NoErasure:opts)+> processOpt opts "r+" = nub (ShowRunTime:opts)++> processOpt opts "f+" = (nub opts) \\ [NoErasure]+> processOpt opts "r-" = (nub opts) \\ [ShowRunTime]++> processOpt opts _ = opts -- silently ignore (FIXME)++Look up the name as a pattern definition, then as an inductive, and show+the appropriate thing, after applying the relevant transformations.++> showdef ist ctxt []+>      = do putStrLn "Please give a name"+>           return Continue+> showdef ist ctxt (n:_)+>     = do case getPatternDef ctxt (name n) of+>            Right (ty, pats) -> do showPDefs n (idris_context ist) (transform ctxt [] (transforms (idris_fixities ist)) (name n) pats)+>                                   putStrLn "Compiles as:\n"+>                                   showPats n (idris_context ist) (transform ctxt +>                                              (idris_transforms ist)+>                                              (transforms (idris_fixities ist))+>                                               (name n) pats)+>            _ -> case getInductive ctxt (name n) of+>                   Right ind -> showInductive n ctxt (idris_transforms ist) +>                                               (constructors ind)+>                   _ -> putStrLn $ n ++ " not defined"+>          return Continue++> showPats :: String -> Ctxt IvorFun -> Patterns -> IO ()+> showPats n ivs (Patterns ps) = putStrLn $ concat (map (\x -> showp' x ++ "\n") ps)+>   where showp' (PClause args _ ty) +>                    = n ++ " " ++ concat (map (\x -> showarg (show x)) args) ++ "= " ++ showId ty+>         showarg x = if (' ' `elem` x) then "(" ++ x ++ ") " else x ++ " "+>         showId res = show res -- showImp True (unIvor ivs res)++> showPDefs :: String -> Ctxt IvorFun -> Patterns -> IO ()+> showPDefs n ivs (Patterns ps) = putStrLn $ concat (map (\x -> showp' x ++ "\n") ps)+>   where showp' (PClause args _ ty) +>                    = n ++ " " ++ concat (map (\x -> showarg (show x)) args) ++ "= " ++ showId ty+>         showarg x = if (' ' `elem` x) then "(" ++ x ++ ") " else x ++ " "+>         showId res = showImp False (unIvor ivs res)++> showInductive :: String -> Context -> [Transform] -> +>                  [(Name, ViewTerm)] -> IO ()+> showInductive n ctxt trans cons +>    = do putStrLn $ n ++ " constructors:"+>         putStrLn $ concat (map (\x -> "  " ++ showc x ++ "\n") cons)+>  where showc (n, ty) = let atys = Ivor.TT.getArgTypes ty +>                            args = map mkName atys+>                            app = apply (Name DataCon n) args in+>                            show (applyTransforms ctxt trans app)+>        mkName (n, ty) = Name Unknown (name (showarg (useName (show n) ty)))+>        useName ('_':'_':_) ty = show ty+>        useName n ty = n ++ " : " ++ show ty+>        showarg x = if (' ' `elem` x) then "(" ++ x ++ ")" else x++> prims c = do c <- addPrimitive c (name "Int")+>              c <- addPrimitive c (name "Char")+>              c <- addPrimitive c (name "Float")+>              c <- addPrimitive c (name "String")+>              c <- addPrimitive c (name "Lock")+>              c <- addPrimitive c (name "Handle")+>              c <- addPrimitive c (name "Ptr")+>              c <- addBinOp c (opFn Plus) ((+)::Int->Int->Int) "Int->Int->Int"+>              c <- addBinOp c (opFn Minus) ((-)::Int->Int->Int)+>                                "Int->Int->Int"+>              c <- addBinOp c (opFn Times) ((*)::Int->Int->Int)+>                                "Int->Int->Int"+>              c <- addBinOp c (opFn Divide) (div::Int->Int->Int)+>                                "Int->Int->Int"+>              c <- addBinOp c (opFn Concat) ((++)::String->String->String)+>                                "String->String->String"+>              c <- addBinOp c (opFn StringGetIndex) ((!!)::String->Int->Char)+>                                "String->Int->Char"+>              c <- addExternalFn c (opFn OpEq) 2 constEq "Int->Int->Bool"+>              c <- addExternalFn c (name "__strEq") 2 constEq "String->String->Bool"+>              c <- addExternalFn c (name "__strLT") 2 constLT "String->String->Bool"+>              c <- addExternalFn c (opFn OpLT) 2 intlt "Int->Int->Bool"+>              c <- addExternalFn c (opFn OpLEq) 2 intle "Int->Int->Bool"+>              c <- addExternalFn c (opFn OpGT) 2 intgt "Int->Int->Bool"+>              c <- addExternalFn c (opFn OpGEq) 2 intge "Int->Int->Bool"+>              c <- addExternalFn c (opFn ToString) 1 intToString "Int->String"+>              c <- addExternalFn c (opFn ToInt) 1 stringToInt "String->Int"+>              c <- addExternalFn c (opFn IntToChar) 1 intToChar "Int->Char"+>              c <- addExternalFn c (opFn CharToInt) 1 charToInt "Char->Int"+>              c <- addExternalFn c (opFn StringLength) 1 stringLen "String->Int"+>              c <- addExternalFn c (opFn StringHead) 1 stringHead "String->Char"+>              c <- addExternalFn c (opFn StringTail) 1 stringTail "String->String"+>              c <- addExternalFn c (opFn StringCons) 2 stringCons "Char->String->String"+>              c <- addExternalFn c (name "__lazy") 1 runLazy "(A:*)A->A"+>              c <- addExternalFn c (name "__effect") 1 runEffect "(A:*)A->A"+>              return c++> constEq :: [ViewTerm] -> Maybe ViewTerm+> constEq [Constant x, Constant y]+>       = case cast x of+>           Just x' -> if (x'==y)+>                        then Just $ Name DataCon (name "True")+>                        else Just $ Name DataCon (name "False")+>           _ -> Just $ Name DataCon (name "False")+> constEq _ = Nothing++> constLT :: [ViewTerm] -> Maybe ViewTerm+> constLT [Constant x, Constant y]+>       = case (cast x, cast y) :: (Maybe String, Maybe String) of+>           (Just x', Just y') -> if (x'<y')+>                        then Just $ Name DataCon (name "True")+>                        else Just $ Name DataCon (name "False")+>           _ -> Just $ Name DataCon (name "False")++ constEq [_, x, y] = if (x == y) then Just $ Name DataCon (name "True")+                        else Just $ Name DataCon (name "False")++> constLT _ = Nothing++> intlt :: [ViewTerm] -> Maybe ViewTerm+> intlt [Constant x, Constant y]+>       = case (cast x, cast y) of+>           (Just x', Just y') -> if (x'<(y'::Int))+>                            then Just $ Name DataCon (name "True")+>                            else Just $ Name DataCon (name "False")+>           _ -> Just $ Name DataCon (name "False")+> intlt _ = Nothing++> intle :: [ViewTerm] -> Maybe ViewTerm+> intle [Constant x, Constant y]+>       = case (cast x, cast y) of+>           (Just x', Just y') -> if (x'<=(y'::Int))+>                        then Just $ Name DataCon (name "True")+>                        else Just $ Name DataCon (name "False")+>           _ -> Just $ Name DataCon (name "False")+> intle _ = Nothing++> intgt :: [ViewTerm] -> Maybe ViewTerm+> intgt [Constant x, Constant y]+>       = case (cast x, cast y) of+>           (Just x', Just y') -> if (x'>(y'::Int))+>                        then Just $ Name DataCon (name "True")+>                        else Just $ Name DataCon (name "False")+>           _ -> Just $ Name DataCon (name "False")+> intgt _ = Nothing++> intge :: [ViewTerm] -> Maybe ViewTerm+> intge [Constant x, Constant y]+>       = case (cast x, cast y) of+>           (Just x', Just y') -> if (x'>=(y'::Int))+>                        then Just $ Name DataCon (name "True")+>                        else Just $ Name DataCon (name "False")+>           _ -> Just $ Name DataCon (name "False")+> intge _ = Nothing++> intToString :: [ViewTerm] -> Maybe ViewTerm+> intToString [Constant x]+>             = case cast x of+>                 (Just s) -> Just (Constant (iToS s))+>                 _ -> Nothing+>    where iToS :: Int -> String+>          iToS x = show x+> intToString _ = Nothing++> stringToInt :: [ViewTerm] -> Maybe ViewTerm+> stringToInt [Constant x]+>             = case cast x of+>                 (Just s) -> Just (Constant (sToI s))+>                 _ -> Nothing+>     where sToI :: String -> Int+>           sToI ('-':s) | all isDigit s = -(read s)+>           sToI s | all isDigit s = read s+>                  | otherwise = 0+> stringToInt _ = Nothing++> intToChar :: [ViewTerm] -> Maybe ViewTerm+> intToChar [Constant x] = case cast x :: Maybe Int of+>                            Just i -> Just (Constant (toEnum i :: Char))+>                            _ -> Nothing+> intToChar _ = Nothing++> charToInt :: [ViewTerm] -> Maybe ViewTerm+> charToInt [Constant x] = case cast x :: Maybe Char of+>                            Just i -> Just (Constant (fromEnum i :: Int))+>                            _ -> Nothing+> charToInt _ = Nothing++> stringLen :: [ViewTerm] -> Maybe ViewTerm+> stringLen [Constant x] = case cast x :: Maybe String of+>                            (Just s) -> Just (Constant (length s))+>                            _ -> Nothing+> stringLen _ = Nothing++> stringHead :: [ViewTerm] -> Maybe ViewTerm+> stringHead [Constant x] = case cast x :: Maybe String of+>                            (Just (s:ss)) -> Just (Constant s)+>                            _ -> Nothing+> stringHead _ = Nothing++> stringTail :: [ViewTerm] -> Maybe ViewTerm+> stringTail [Constant x] = case cast x :: Maybe String of+>                            (Just (s:ss)) -> Just (Constant ss)+>                            _ -> Nothing+> stringTail _ = Nothing++> stringCons :: [ViewTerm] -> Maybe ViewTerm+> stringCons [Constant x, Constant y] +>             = case (cast x, cast y) of+>                   (Just s, Just ss) -> Just (Constant ((s:ss) :: String))+>                   _ -> Nothing+> stringCons _ = Nothing++> runLazy :: [ViewTerm] -> Maybe ViewTerm+> runLazy [_,x] = Just x+> runLazy _ = Nothing++> runEffect :: [ViewTerm] -> Maybe ViewTerm+> runEffect [_,x] = Just x+> runEffect _ = Nothing
+ Setup.lhs view
@@ -0,0 +1,4 @@+> import Distribution.Simple++> main = defaultMain+
+ dist/build/Idris/Parser.hs view
@@ -0,0 +1,3617 @@+{-# OPTIONS -fglasgow-exts -cpp #-}+-- -*-Haskell-*-+{-# OPTIONS_GHC -fglasgow-exts #-}++module Idris.Parser where++import Data.Char+import Ivor.TT+import System.IO.Unsafe+import List+import Control.Monad++import Idris.AbsSyntax+import Idris.Lexer+import Idris.Lib++import Debug.Trace+#if __GLASGOW_HASKELL__ >= 503+import Data.Array+#else+import Array+#endif+#if __GLASGOW_HASKELL__ >= 503+import GHC.Exts+#else+import GlaExts+#endif++-- parser produced by Happy Version 1.18.2++newtype HappyAbsSyn t66 = HappyAbsSyn HappyAny+#if __GLASGOW_HASKELL__ >= 607+type HappyAny = GHC.Exts.Any+#else+type HappyAny = forall a . a+#endif+happyIn6 :: ([ParseDecl]) -> (HappyAbsSyn t66)+happyIn6 x = unsafeCoerce# x+{-# INLINE happyIn6 #-}+happyOut6 :: (HappyAbsSyn t66) -> ([ParseDecl])+happyOut6 x = unsafeCoerce# x+{-# INLINE happyOut6 #-}+happyIn7 :: (ParseDecl) -> (HappyAbsSyn t66)+happyIn7 x = unsafeCoerce# x+{-# INLINE happyIn7 #-}+happyOut7 :: (HappyAbsSyn t66) -> (ParseDecl)+happyOut7 x = unsafeCoerce# x+{-# INLINE happyOut7 #-}+happyIn8 :: (Decl) -> (HappyAbsSyn t66)+happyIn8 x = unsafeCoerce# x+{-# INLINE happyIn8 #-}+happyOut8 :: (HappyAbsSyn t66) -> (Decl)+happyOut8 x = unsafeCoerce# x+{-# INLINE happyOut8 #-}+happyIn9 :: (ParseDecl) -> (HappyAbsSyn t66)+happyIn9 x = unsafeCoerce# x+{-# INLINE happyIn9 #-}+happyOut9 :: (HappyAbsSyn t66) -> (ParseDecl)+happyOut9 x = unsafeCoerce# x+{-# INLINE happyOut9 #-}+happyIn10 :: (Bool) -> (HappyAbsSyn t66)+happyIn10 x = unsafeCoerce# x+{-# INLINE happyIn10 #-}+happyOut10 :: (HappyAbsSyn t66) -> (Bool)+happyOut10 x = unsafeCoerce# x+{-# INLINE happyOut10 #-}+happyIn11 :: ([RawTerm]) -> (HappyAbsSyn t66)+happyIn11 x = unsafeCoerce# x+{-# INLINE happyIn11 #-}+happyOut11 :: (HappyAbsSyn t66) -> ([RawTerm])+happyOut11 x = unsafeCoerce# x+{-# INLINE happyOut11 #-}+happyIn12 :: (RawTerm) -> (HappyAbsSyn t66)+happyIn12 x = unsafeCoerce# x+{-# INLINE happyIn12 #-}+happyOut12 :: (HappyAbsSyn t66) -> (RawTerm)+happyOut12 x = unsafeCoerce# x+{-# INLINE happyOut12 #-}+happyIn13 :: ([ParseDecl]) -> (HappyAbsSyn t66)+happyIn13 x = unsafeCoerce# x+{-# INLINE happyIn13 #-}+happyOut13 :: (HappyAbsSyn t66) -> ([ParseDecl])+happyOut13 x = unsafeCoerce# x+{-# INLINE happyOut13 #-}+happyIn14 :: ([CGFlag]) -> (HappyAbsSyn t66)+happyIn14 x = unsafeCoerce# x+{-# INLINE happyIn14 #-}+happyOut14 :: (HappyAbsSyn t66) -> ([CGFlag])+happyOut14 x = unsafeCoerce# x+{-# INLINE happyOut14 #-}+happyIn15 :: ([CGFlag]) -> (HappyAbsSyn t66)+happyIn15 x = unsafeCoerce# x+{-# INLINE happyIn15 #-}+happyOut15 :: (HappyAbsSyn t66) -> ([CGFlag])+happyOut15 x = unsafeCoerce# x+{-# INLINE happyOut15 #-}+happyIn16 :: ([Decl]) -> (HappyAbsSyn t66)+happyIn16 x = unsafeCoerce# x+{-# INLINE happyIn16 #-}+happyOut16 :: (HappyAbsSyn t66) -> ([Decl])+happyOut16 x = unsafeCoerce# x+{-# INLINE happyOut16 #-}+happyIn17 :: ([String]) -> (HappyAbsSyn t66)+happyIn17 x = unsafeCoerce# x+{-# INLINE happyIn17 #-}+happyOut17 :: (HappyAbsSyn t66) -> ([String])+happyOut17 x = unsafeCoerce# x+{-# INLINE happyOut17 #-}+happyIn18 :: (String) -> (HappyAbsSyn t66)+happyIn18 x = unsafeCoerce# x+{-# INLINE happyIn18 #-}+happyOut18 :: (HappyAbsSyn t66) -> (String)+happyOut18 x = unsafeCoerce# x+{-# INLINE happyOut18 #-}+happyIn19 :: (Fixity) -> (HappyAbsSyn t66)+happyIn19 x = unsafeCoerce# x+{-# INLINE happyIn19 #-}+happyOut19 :: (HappyAbsSyn t66) -> (Fixity)+happyOut19 x = unsafeCoerce# x+{-# INLINE happyOut19 #-}+happyIn20 :: (Decl) -> (HappyAbsSyn t66)+happyIn20 x = unsafeCoerce# x+{-# INLINE happyIn20 #-}+happyOut20 :: (HappyAbsSyn t66) -> (Decl)+happyOut20 x = unsafeCoerce# x+{-# INLINE happyOut20 #-}+happyIn21 :: ([(Id,String)]) -> (HappyAbsSyn t66)+happyIn21 x = unsafeCoerce# x+{-# INLINE happyIn21 #-}+happyOut21 :: (HappyAbsSyn t66) -> ([(Id,String)])+happyOut21 x = unsafeCoerce# x+{-# INLINE happyOut21 #-}+happyIn22 :: ((Id, [(RawTerm, Maybe Id)])) -> (HappyAbsSyn t66)+happyIn22 x = unsafeCoerce# x+{-# INLINE happyIn22 #-}+happyOut22 :: (HappyAbsSyn t66) -> ((Id, [(RawTerm, Maybe Id)]))+happyOut22 x = unsafeCoerce# x+{-# INLINE happyOut22 #-}+happyIn23 :: ([(RawTerm,Maybe Id)]) -> (HappyAbsSyn t66)+happyIn23 x = unsafeCoerce# x+{-# INLINE happyIn23 #-}+happyOut23 :: (HappyAbsSyn t66) -> ([(RawTerm,Maybe Id)])+happyOut23 x = unsafeCoerce# x+{-# INLINE happyOut23 #-}+happyIn24 :: (Datatype) -> (HappyAbsSyn t66)+happyIn24 x = unsafeCoerce# x+{-# INLINE happyIn24 #-}+happyOut24 :: (HappyAbsSyn t66) -> (Datatype)+happyOut24 x = unsafeCoerce# x+{-# INLINE happyOut24 #-}+happyIn25 :: (Either RawTerm ((RawTerm, [(Id, RawTerm)]), [ConParse])) -> (HappyAbsSyn t66)+happyIn25 x = unsafeCoerce# x+{-# INLINE happyIn25 #-}+happyOut25 :: (HappyAbsSyn t66) -> (Either RawTerm ((RawTerm, [(Id, RawTerm)]), [ConParse]))+happyOut25 x = unsafeCoerce# x+{-# INLINE happyOut25 #-}+happyIn26 :: ([TyOpt]) -> (HappyAbsSyn t66)+happyIn26 x = unsafeCoerce# x+{-# INLINE happyIn26 #-}+happyOut26 :: (HappyAbsSyn t66) -> ([TyOpt])+happyOut26 x = unsafeCoerce# x+{-# INLINE happyOut26 #-}+happyIn27 :: ([TyOpt]) -> (HappyAbsSyn t66)+happyIn27 x = unsafeCoerce# x+{-# INLINE happyIn27 #-}+happyOut27 :: (HappyAbsSyn t66) -> ([TyOpt])+happyOut27 x = unsafeCoerce# x+{-# INLINE happyOut27 #-}+happyIn28 :: (TyOpt) -> (HappyAbsSyn t66)+happyIn28 x = unsafeCoerce# x+{-# INLINE happyIn28 #-}+happyOut28 :: (HappyAbsSyn t66) -> (TyOpt)+happyOut28 x = unsafeCoerce# x+{-# INLINE happyOut28 #-}+happyIn29 :: (Id) -> (HappyAbsSyn t66)+happyIn29 x = unsafeCoerce# x+{-# INLINE happyIn29 #-}+happyOut29 :: (HappyAbsSyn t66) -> (Id)+happyOut29 x = unsafeCoerce# x+{-# INLINE happyOut29 #-}+happyIn30 :: (RawTerm) -> (HappyAbsSyn t66)+happyIn30 x = unsafeCoerce# x+{-# INLINE happyIn30 #-}+happyOut30 :: (HappyAbsSyn t66) -> (RawTerm)+happyOut30 x = unsafeCoerce# x+{-# INLINE happyOut30 #-}+happyIn31 :: (RawTerm) -> (HappyAbsSyn t66)+happyIn31 x = unsafeCoerce# x+{-# INLINE happyIn31 #-}+happyOut31 :: (HappyAbsSyn t66) -> (RawTerm)+happyOut31 x = unsafeCoerce# x+{-# INLINE happyOut31 #-}+happyIn32 :: ([(Id, RawTerm)]) -> (HappyAbsSyn t66)+happyIn32 x = unsafeCoerce# x+{-# INLINE happyIn32 #-}+happyOut32 :: (HappyAbsSyn t66) -> ([(Id, RawTerm)])+happyOut32 x = unsafeCoerce# x+{-# INLINE happyOut32 #-}+happyIn33 :: ([(Id, RawTerm)]) -> (HappyAbsSyn t66)+happyIn33 x = unsafeCoerce# x+{-# INLINE happyIn33 #-}+happyOut33 :: (HappyAbsSyn t66) -> ([(Id, RawTerm)])+happyOut33 x = unsafeCoerce# x+{-# INLINE happyOut33 #-}+happyIn34 :: ([(Id, RawTerm)]) -> (HappyAbsSyn t66)+happyIn34 x = unsafeCoerce# x+{-# INLINE happyIn34 #-}+happyOut34 :: (HappyAbsSyn t66) -> ([(Id, RawTerm)])+happyOut34 x = unsafeCoerce# x+{-# INLINE happyOut34 #-}+happyIn35 :: ([Id]) -> (HappyAbsSyn t66)+happyIn35 x = unsafeCoerce# x+{-# INLINE happyIn35 #-}+happyOut35 :: (HappyAbsSyn t66) -> ([Id])+happyOut35 x = unsafeCoerce# x+{-# INLINE happyOut35 #-}+happyIn36 :: ([(Id, Int)]) -> (HappyAbsSyn t66)+happyIn36 x = unsafeCoerce# x+{-# INLINE happyIn36 #-}+happyOut36 :: (HappyAbsSyn t66) -> ([(Id, Int)])+happyOut36 x = unsafeCoerce# x+{-# INLINE happyOut36 #-}+happyIn37 :: ([Id]) -> (HappyAbsSyn t66)+happyIn37 x = unsafeCoerce# x+{-# INLINE happyIn37 #-}+happyOut37 :: (HappyAbsSyn t66) -> ([Id])+happyOut37 x = unsafeCoerce# x+{-# INLINE happyOut37 #-}+happyIn38 :: ([Id]) -> (HappyAbsSyn t66)+happyIn38 x = unsafeCoerce# x+{-# INLINE happyIn38 #-}+happyOut38 :: (HappyAbsSyn t66) -> ([Id])+happyOut38 x = unsafeCoerce# x+{-# INLINE happyOut38 #-}+happyIn39 :: ([(Id, RawTerm, RawTerm)]) -> (HappyAbsSyn t66)+happyIn39 x = unsafeCoerce# x+{-# INLINE happyIn39 #-}+happyOut39 :: (HappyAbsSyn t66) -> ([(Id, RawTerm, RawTerm)])+happyOut39 x = unsafeCoerce# x+{-# INLINE happyOut39 #-}+happyIn40 :: ((Id, RawTerm)) -> (HappyAbsSyn t66)+happyIn40 x = unsafeCoerce# x+{-# INLINE happyIn40 #-}+happyOut40 :: (HappyAbsSyn t66) -> ((Id, RawTerm))+happyOut40 x = unsafeCoerce# x+{-# INLINE happyOut40 #-}+happyIn41 :: (RawTerm) -> (HappyAbsSyn t66)+happyIn41 x = unsafeCoerce# x+{-# INLINE happyIn41 #-}+happyOut41 :: (HappyAbsSyn t66) -> (RawTerm)+happyOut41 x = unsafeCoerce# x+{-# INLINE happyOut41 #-}+happyIn42 :: (RawTerm) -> (HappyAbsSyn t66)+happyIn42 x = unsafeCoerce# x+{-# INLINE happyIn42 #-}+happyOut42 :: (HappyAbsSyn t66) -> (RawTerm)+happyOut42 x = unsafeCoerce# x+{-# INLINE happyOut42 #-}+happyIn43 :: (RawTerm) -> (HappyAbsSyn t66)+happyIn43 x = unsafeCoerce# x+{-# INLINE happyIn43 #-}+happyOut43 :: (HappyAbsSyn t66) -> (RawTerm)+happyOut43 x = unsafeCoerce# x+{-# INLINE happyOut43 #-}+happyIn44 :: (String) -> (HappyAbsSyn t66)+happyIn44 x = unsafeCoerce# x+{-# INLINE happyIn44 #-}+happyOut44 :: (HappyAbsSyn t66) -> (String)+happyOut44 x = unsafeCoerce# x+{-# INLINE happyOut44 #-}+happyIn45 :: (RawTerm) -> (HappyAbsSyn t66)+happyIn45 x = unsafeCoerce# x+{-# INLINE happyIn45 #-}+happyOut45 :: (HappyAbsSyn t66) -> (RawTerm)+happyOut45 x = unsafeCoerce# x+{-# INLINE happyOut45 #-}+happyIn46 :: (RawTerm) -> (HappyAbsSyn t66)+happyIn46 x = unsafeCoerce# x+{-# INLINE happyIn46 #-}+happyOut46 :: (HappyAbsSyn t66) -> (RawTerm)+happyOut46 x = unsafeCoerce# x+{-# INLINE happyOut46 #-}+happyIn47 :: (RawTerm) -> (HappyAbsSyn t66)+happyIn47 x = unsafeCoerce# x+{-# INLINE happyIn47 #-}+happyOut47 :: (HappyAbsSyn t66) -> (RawTerm)+happyOut47 x = unsafeCoerce# x+{-# INLINE happyOut47 #-}+happyIn48 :: (RawTerm) -> (HappyAbsSyn t66)+happyIn48 x = unsafeCoerce# x+{-# INLINE happyIn48 #-}+happyOut48 :: (HappyAbsSyn t66) -> (RawTerm)+happyOut48 x = unsafeCoerce# x+{-# INLINE happyOut48 #-}+happyIn49 :: (RawTerm) -> (HappyAbsSyn t66)+happyIn49 x = unsafeCoerce# x+{-# INLINE happyIn49 #-}+happyOut49 :: (HappyAbsSyn t66) -> (RawTerm)+happyOut49 x = unsafeCoerce# x+{-# INLINE happyOut49 #-}+happyIn50 :: ([RawTerm]) -> (HappyAbsSyn t66)+happyIn50 x = unsafeCoerce# x+{-# INLINE happyIn50 #-}+happyOut50 :: (HappyAbsSyn t66) -> ([RawTerm])+happyOut50 x = unsafeCoerce# x+{-# INLINE happyOut50 #-}+happyIn51 :: (RawTerm) -> (HappyAbsSyn t66)+happyIn51 x = unsafeCoerce# x+{-# INLINE happyIn51 #-}+happyOut51 :: (HappyAbsSyn t66) -> (RawTerm)+happyOut51 x = unsafeCoerce# x+{-# INLINE happyOut51 #-}+happyIn52 :: (RawTerm) -> (HappyAbsSyn t66)+happyIn52 x = unsafeCoerce# x+{-# INLINE happyIn52 #-}+happyOut52 :: (HappyAbsSyn t66) -> (RawTerm)+happyOut52 x = unsafeCoerce# x+{-# INLINE happyOut52 #-}+happyIn53 :: ([RawTerm]) -> (HappyAbsSyn t66)+happyIn53 x = unsafeCoerce# x+{-# INLINE happyIn53 #-}+happyOut53 :: (HappyAbsSyn t66) -> ([RawTerm])+happyOut53 x = unsafeCoerce# x+{-# INLINE happyOut53 #-}+happyIn54 :: ([Do]) -> (HappyAbsSyn t66)+happyIn54 x = unsafeCoerce# x+{-# INLINE happyIn54 #-}+happyOut54 :: (HappyAbsSyn t66) -> ([Do])+happyOut54 x = unsafeCoerce# x+{-# INLINE happyOut54 #-}+happyIn55 :: ([Do]) -> (HappyAbsSyn t66)+happyIn55 x = unsafeCoerce# x+{-# INLINE happyIn55 #-}+happyOut55 :: (HappyAbsSyn t66) -> ([Do])+happyOut55 x = unsafeCoerce# x+{-# INLINE happyOut55 #-}+happyIn56 :: (Do) -> (HappyAbsSyn t66)+happyIn56 x = unsafeCoerce# x+{-# INLINE happyIn56 #-}+happyOut56 :: (HappyAbsSyn t66) -> (Do)+happyOut56 x = unsafeCoerce# x+{-# INLINE happyOut56 #-}+happyIn57 :: (Constant) -> (HappyAbsSyn t66)+happyIn57 x = unsafeCoerce# x+{-# INLINE happyIn57 #-}+happyOut57 :: (HappyAbsSyn t66) -> (Constant)+happyOut57 x = unsafeCoerce# x+{-# INLINE happyOut57 #-}+happyIn58 :: ([RawTerm]) -> (HappyAbsSyn t66)+happyIn58 x = unsafeCoerce# x+{-# INLINE happyIn58 #-}+happyOut58 :: (HappyAbsSyn t66) -> ([RawTerm])+happyOut58 x = unsafeCoerce# x+{-# INLINE happyOut58 #-}+happyIn59 :: ((RawTerm, [(Id, RawTerm)])) -> (HappyAbsSyn t66)+happyIn59 x = unsafeCoerce# x+{-# INLINE happyIn59 #-}+happyOut59 :: (HappyAbsSyn t66) -> ((RawTerm, [(Id, RawTerm)]))+happyOut59 x = unsafeCoerce# x+{-# INLINE happyOut59 #-}+happyIn60 :: ([(Id, RawTerm)]) -> (HappyAbsSyn t66)+happyIn60 x = unsafeCoerce# x+{-# INLINE happyIn60 #-}+happyOut60 :: (HappyAbsSyn t66) -> ([(Id, RawTerm)])+happyOut60 x = unsafeCoerce# x+{-# INLINE happyOut60 #-}+happyIn61 :: ((Id,Id)) -> (HappyAbsSyn t66)+happyIn61 x = unsafeCoerce# x+{-# INLINE happyIn61 #-}+happyOut61 :: (HappyAbsSyn t66) -> ((Id,Id))+happyOut61 x = unsafeCoerce# x+{-# INLINE happyOut61 #-}+happyIn62 :: ((Id,Id)) -> (HappyAbsSyn t66)+happyIn62 x = unsafeCoerce# x+{-# INLINE happyIn62 #-}+happyOut62 :: (HappyAbsSyn t66) -> ((Id,Id))+happyOut62 x = unsafeCoerce# x+{-# INLINE happyOut62 #-}+happyIn63 :: ([(Id, RawTerm)]) -> (HappyAbsSyn t66)+happyIn63 x = unsafeCoerce# x+{-# INLINE happyIn63 #-}+happyOut63 :: (HappyAbsSyn t66) -> ([(Id, RawTerm)])+happyOut63 x = unsafeCoerce# x+{-# INLINE happyOut63 #-}+happyIn64 :: ([(Id, RawTerm)]) -> (HappyAbsSyn t66)+happyIn64 x = unsafeCoerce# x+{-# INLINE happyIn64 #-}+happyOut64 :: (HappyAbsSyn t66) -> ([(Id, RawTerm)])+happyOut64 x = unsafeCoerce# x+{-# INLINE happyOut64 #-}+happyIn65 :: ([Id]) -> (HappyAbsSyn t66)+happyIn65 x = unsafeCoerce# x+{-# INLINE happyIn65 #-}+happyOut65 :: (HappyAbsSyn t66) -> ([Id])+happyOut65 x = unsafeCoerce# x+{-# INLINE happyOut65 #-}+happyIn66 :: t66 -> (HappyAbsSyn t66)+happyIn66 x = unsafeCoerce# x+{-# INLINE happyIn66 #-}+happyOut66 :: (HappyAbsSyn t66) -> t66+happyOut66 x = unsafeCoerce# x+{-# INLINE happyOut66 #-}+happyIn67 :: ([ConParse]) -> (HappyAbsSyn t66)+happyIn67 x = unsafeCoerce# x+{-# INLINE happyIn67 #-}+happyOut67 :: (HappyAbsSyn t66) -> ([ConParse])+happyOut67 x = unsafeCoerce# x+{-# INLINE happyOut67 #-}+happyIn68 :: (ConParse) -> (HappyAbsSyn t66)+happyIn68 x = unsafeCoerce# x+{-# INLINE happyIn68 #-}+happyOut68 :: (HappyAbsSyn t66) -> (ConParse)+happyOut68 x = unsafeCoerce# x+{-# INLINE happyOut68 #-}+happyIn69 :: (RawTerm) -> (HappyAbsSyn t66)+happyIn69 x = unsafeCoerce# x+{-# INLINE happyIn69 #-}+happyOut69 :: (HappyAbsSyn t66) -> (RawTerm)+happyOut69 x = unsafeCoerce# x+{-# INLINE happyOut69 #-}+happyIn70 :: (ITactic) -> (HappyAbsSyn t66)+happyIn70 x = unsafeCoerce# x+{-# INLINE happyIn70 #-}+happyOut70 :: (HappyAbsSyn t66) -> (ITactic)+happyOut70 x = unsafeCoerce# x+{-# INLINE happyOut70 #-}+happyIn71 :: ([ITactic]) -> (HappyAbsSyn t66)+happyIn71 x = unsafeCoerce# x+{-# INLINE happyIn71 #-}+happyOut71 :: (HappyAbsSyn t66) -> ([ITactic])+happyOut71 x = unsafeCoerce# x+{-# INLINE happyOut71 #-}+happyIn72 :: ([ITactic]) -> (HappyAbsSyn t66)+happyIn72 x = unsafeCoerce# x+{-# INLINE happyIn72 #-}+happyOut72 :: (HappyAbsSyn t66) -> ([ITactic])+happyOut72 x = unsafeCoerce# x+{-# INLINE happyOut72 #-}+happyIn73 :: (LineNumber) -> (HappyAbsSyn t66)+happyIn73 x = unsafeCoerce# x+{-# INLINE happyIn73 #-}+happyOut73 :: (HappyAbsSyn t66) -> (LineNumber)+happyOut73 x = unsafeCoerce# x+{-# INLINE happyOut73 #-}+happyIn74 :: (String) -> (HappyAbsSyn t66)+happyIn74 x = unsafeCoerce# x+{-# INLINE happyIn74 #-}+happyOut74 :: (HappyAbsSyn t66) -> (String)+happyOut74 x = unsafeCoerce# x+{-# INLINE happyOut74 #-}+happyIn75 :: (Fixities) -> (HappyAbsSyn t66)+happyIn75 x = unsafeCoerce# x+{-# INLINE happyIn75 #-}+happyOut75 :: (HappyAbsSyn t66) -> (Fixities)+happyOut75 x = unsafeCoerce# x+{-# INLINE happyOut75 #-}+happyInTok :: (Token) -> (HappyAbsSyn t66)+happyInTok x = unsafeCoerce# x+{-# INLINE happyInTok #-}+happyOutTok :: (HappyAbsSyn t66) -> (Token)+happyOutTok x = unsafeCoerce# x+{-# INLINE happyOutTok #-}+++happyActOffsets :: HappyAddr+happyActOffsets = HappyA# "\x16\x00\x21\x05\x57\x0d\x00\x00\x20\x04\x6e\x01\x6e\x01\x21\x05\x00\x00\x3b\x03\xea\x02\x00\x00\x6e\x01\x00\x00\x21\x05\x21\x05\x00\x00\x21\x05\x21\x05\x21\x05\x21\x05\x00\x00\x00\x00\x00\x00\x85\x01\x00\x00\x00\x00\x00\x00\x00\x00\x61\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6e\x01\xfd\x08\x48\x02\x21\x05\x21\x05\x06\x08\x21\x05\x00\x00\x6e\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x21\x05\x00\x00\x00\x00\x00\x00\x4c\x01\x00\x00\x21\x05\x5b\x00\x1f\x04\x01\x00\x00\x00\x00\x00\x01\x00\x57\x04\x00\x00\x6f\x04\x00\x00\xf5\x01\x5b\x04\x5a\x04\x58\x04\x56\x04\x39\x09\xd1\x01\x4a\x04\x00\x00\x00\x00\x00\x00\x4b\x04\x49\x04\x48\x04\x5b\x00\x53\x04\x1b\x04\x43\x04\x51\x04\x21\x05\x50\x04\x46\x04\x00\x00\x00\x00\x1e\x04\x3d\x04\x5b\x00\x28\x04\x3c\x04\x5b\x00\x5b\x00\x5b\x00\x5b\x00\x5b\x00\x12\x02\x32\x04\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x00\x00\x13\x00\x00\x00\x00\x00\x99\x02\x00\x00\x00\x00\x00\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\x00\x00\xca\x07\x37\x04\xfc\xff\xe3\x08\x2d\x04\x77\x00\x39\x09\xd1\x01\x00\x00\x00\x00\x30\x04\xe4\x03\x14\x02\x00\x00\x26\x04\xd0\x04\x00\x00\x00\x00\x27\x04\x00\x00\x27\x04\x00\x00\xaa\x05\xa3\x08\xfa\x01\x4e\x04\x7f\x04\x1a\x04\x7f\x04\x7f\x04\x18\x04\x13\x04\x7f\x04\x7f\x04\x9e\x01\x67\x00\x00\x00\x7f\x04\xa6\x08\x5b\x00\x19\x04\xf3\x03\x00\x00\x06\x08\x0c\x04\x00\x00\x7f\x04\xfe\x03\x7f\x04\x7f\x04\x7f\x04\x7f\x04\x7f\x04\x00\x00\x78\x01\x5f\x01\x51\x01\x4f\x01\x42\x01\x1a\x01\x00\x00\x18\x01\x7f\x04\xf1\x00\x7f\x04\xb8\x00\x00\x00\xf6\x03\x00\x00\x5b\x00\x41\x00\x07\x00\x00\x00\x17\x04\x17\x04\x17\x04\x17\x04\x17\x04\x00\x00\x7f\x04\x17\x04\x06\x08\x00\x00\x00\x00\x00\x00\x7f\x04\xf5\x03\xfd\x08\x0f\x04\x07\x04\xe8\x03\xbe\x01\xfc\x03\x20\x01\xfa\x03\xd2\x08\xfd\x08\x00\x00\xfd\x08\xf7\x03\x00\x00\x22\x06\x00\x00\x22\x06\x00\x00\x22\x06\x00\x00\x22\x06\x00\x00\x7f\x04\x00\x00\x7f\x04\x7f\x04\x7f\x04\x7f\x04\x7f\x04\xfb\x03\x00\x00\x00\x00\x7f\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfb\xff\x22\x06\xee\x03\x2e\x04\x5b\x00\xe6\x03\x00\x00\xdd\x03\xdd\x03\xe3\x03\xf4\x03\xda\x03\xef\x03\xdd\x03\xdd\x03\xdd\x03\xa3\x03\x57\x0d\xed\x03\x50\x01\x0c\x00\xd0\x03\xca\x07\xdd\x03\x00\x00\x00\x00\xe1\x03\xdc\x03\xdb\x03\xd7\x03\x00\x00\x00\x00\x4c\x04\xe0\x03\x00\x00\x00\x00\xdd\x03\xdd\x03\xdd\x03\x00\x00\xd4\x03\xc1\x03\x00\x00\x00\x00\x84\x01\xde\x03\xce\x03\xb2\x03\xc8\x03\x5b\x00\xb1\x03\x01\x00\x5b\x00\xbd\x03\xad\x03\x00\x00\xdd\x03\x29\x0a\xc7\x03\x00\x00\xa4\x03\x00\x00\xdd\x03\x00\x00\x00\x00\x5b\x00\x00\x00\xe3\x08\x00\x00\x5b\x00\x5b\x00\xa8\x03\xe3\x08\x00\x00\x00\x00\x12\x02\x00\x00\x41\x05\x3f\x05\x11\x05\x00\x00\x00\x00\x00\x00\x00\x00\xdd\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xee\x04\x00\x00\x5b\x00\x00\x00\x8f\x00\xc3\x03\x00\x00\x00\x00\x00\x00\xb6\x03\xa9\x03\xfd\x08\xaf\x03\xa6\x03\x00\x00\x5b\x03\xb5\x01\xc0\x04\x00\x00\xd1\x01\x00\x00\xdd\x03\x9b\x00\xb3\x01\xdd\x03\x93\x03\x00\x00\x00\x00\x00\x00\x68\x03\x69\x08\x00\x00\x42\x08\xe6\x05\x00\x00\xfd\x08\x00\x00\xac\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x03\x00\x00\x99\x03\x00\x00\x06\x08\x00\x00\x89\x03\x00\x00\x00\x00\x00\x00\x00\x00\xfd\x08\xfd\x08\x84\x03\xe3\x08\x5b\x00\x70\x03\xe3\x08\x0c\x00\x5b\x00\x79\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9d\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x08\x42\x08\x42\x08\x42\x08\x42\x08\x42\x08\x00\x00\x00\x00\x00\x00\x00\x00\xfd\x08\x00\x00\x02\x00\xfd\x08\x04\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8e\x07\x00\x00\x52\x07\x00\x00\x16\x07\x00\x00\xda\x06\x97\x03\x95\x03\x94\x03\x92\x03\x8f\x03\x65\x00\x00\x00\x00\x00\xdd\x03\x9e\x06\x77\x03\x22\x06\xdd\x03\xcf\x00\x00\x00\x99\x00\x8d\x03\x82\x03\x00\x00\x57\x0d\x0c\x00\x60\x03\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x62\x06\x00\x00\x99\x00\x00\x00\x74\x03\x00\x00\x00\x00\x00\x00\xf8\xff\x00\x00\x26\x06\x7c\x03\x75\x03\x00\x00\x00\x00\x56\x03\x6f\x03\x0a\x03\x5b\x00\x51\x03\x00\x00\x5b\x00\x6e\x03\x00\x00\x00\x00\x5b\x00\x00\x00\x5b\x00\x00\x00\x06\x08\x00\x00\x00\x00\xe3\x08\x00\x00\x35\x03\x00\x00\x00\x00\x00\x00\x5b\x00\x99\x00\x67\x03\x00\x00\x00\x00\x00\x00\x6b\x03\xaa\x00\x64\x03\xe3\x08\x00\x00\x5b\x00\x00\x00\x58\x03\x5b\x00\x66\x03\x00\x00\xdd\x03\x00\x00\x22\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x03\x3a\x03\x50\x03\x00\x00\x00\x00\x00\x00\xcf\x00\xea\x05\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x03\x00\x00\x00\x00\x33\x03\x5b\x00\x00\x00\x00\x00\x00\x00\x42\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x69\x08\x8c\x03\x00\x00\xae\x05\x00\x00\x00\x00\x00\x00\x72\x05\x3f\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#++happyGotoOffsets :: HappyAddr+happyGotoOffsets = HappyA# "\x0c\x0a\x49\x0d\x0f\x03\x00\x00\x00\x00\xa2\x01\x3e\x03\x38\x0d\x00\x00\x27\x0d\x16\x0d\x00\x00\x3d\x03\x00\x00\x05\x0d\xf4\x0c\x00\x00\xe3\x0c\xd2\x0c\xc1\x0c\xb0\x0c\x00\x00\x00\x00\x09\x03\x33\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\x01\x35\x08\xc2\x01\x9f\x0c\x8e\x0c\x7a\x0d\x7d\x0c\x00\x00\x31\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x0c\x00\x00\x03\x03\x02\x03\x00\x00\x01\x03\x5b\x0c\x54\x01\x00\x00\xef\x09\x00\x00\x00\x00\xdc\x09\x00\x00\x00\x00\x38\x03\x00\x00\xf0\xff\x00\x00\x00\x00\x00\x00\x00\x00\x66\x00\x2b\x03\x73\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x03\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x33\x01\x00\x00\x0f\x01\x00\x00\x00\x00\x69\x01\x48\x00\x19\x03\x21\x00\x18\x03\x3d\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2a\x03\xe7\x02\x1c\x01\x00\x00\xe5\x02\x70\x05\x00\x00\xe4\x02\xe2\x02\xbf\x09\xac\x09\x8f\x09\x7c\x09\x00\x00\x28\x0a\x00\x00\x00\x00\x73\x0d\x00\x00\xf0\x02\x33\x00\x18\x02\x00\x00\x00\x00\xfe\x02\x00\x00\x14\x01\xe1\x02\xda\x02\x14\x07\xd7\x02\xd5\x02\x0c\x01\xd3\x02\x07\x01\x00\x00\x06\x01\x06\x01\x40\x01\x93\x00\x39\x0c\x00\x00\x28\x0c\x17\x0c\x00\x00\x00\x00\xd9\x03\x88\x03\x05\x01\x00\x00\x00\x00\x06\x0c\x92\x04\x19\x02\xcf\x02\x00\x00\xcd\x02\x68\x0d\x00\x00\xcb\x02\xf5\x0b\xc4\x02\xe4\x0b\xd3\x0b\xc2\x0b\xb1\x0b\xa0\x0b\xc3\x02\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00\x00\x00\xff\x00\x8f\x0b\xff\x00\x7e\x0b\xff\x00\x00\x00\x00\x00\x00\x00\x7f\x01\xff\x00\xff\x00\x00\x00\xfe\x00\xf5\x00\xf4\x00\xe9\x00\xe7\x00\xc1\x02\x6d\x0b\xd5\x00\x59\x0d\xbf\x02\xba\x02\x00\x00\x5c\x0b\x00\x00\xf9\x07\x00\x00\x00\x00\x00\x00\x08\x01\x00\x00\x00\x00\x00\x00\xc8\x00\xfe\x05\x00\x00\x6e\x05\x00\x00\xb9\x02\xab\x00\xb8\x02\xa3\x00\xa4\x02\x9e\x00\xb3\x02\x9d\x00\xb1\x02\x37\x03\x00\x00\xe6\x02\x4b\x0b\x3a\x0b\x44\x02\x95\x02\x00\x00\x00\x00\xa8\x02\x29\x0b\xa3\x02\x9d\x02\x9c\x02\x00\x00\x00\x00\xd1\x00\x95\x00\x00\x00\xd8\x06\xbd\x00\x00\x00\x00\x00\x18\x0b\x07\x0b\x00\x00\x00\x00\x00\x00\xd9\x02\xf6\x0a\xe5\x0a\xd4\x0a\x00\x00\xcf\x01\xb0\x02\x10\x02\x00\x00\x00\x00\x0a\x0a\xc3\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x98\x02\x97\x02\x94\x00\x00\x00\x94\x02\x93\x02\xb2\x0a\xa1\x0a\x90\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x76\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8a\x00\x00\x00\x42\x09\xbe\x02\x00\x00\x00\x00\x00\x00\x7f\x0a\x94\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6e\x0a\x00\x00\x00\x00\xbd\x02\x00\x00\xbd\x07\x8f\x02\x0a\x00\x43\x00\x00\x00\x81\x07\x83\x02\x82\x02\xc9\x01\x00\x00\x94\x00\x94\x00\x94\x00\x00\x00\x00\x00\x80\x02\x00\x00\x50\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x94\x00\x7b\x02\x7c\x01\x60\x02\xc1\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe3\x04\x00\x00\x00\x00\x00\x00\x94\x00\x03\x00\x94\x00\x00\x00\x4b\x01\x00\x00\x5d\x0a\x94\x00\x94\x00\x4c\x0a\x35\x02\x00\x00\x00\x00\x7a\x02\x00\x00\x4d\x0d\x00\x00\x4d\x0d\x94\x00\x74\x02\xb2\x02\x72\x02\x94\x00\x00\x00\x70\x02\x6f\x02\x6d\x02\x6a\x02\x68\x02\x67\x02\x63\x02\x00\x00\x62\x02\x00\x00\x4c\x02\x36\x09\x5f\x02\x00\x00\x52\x02\x00\x00\x51\x02\x00\x00\x61\x02\xe9\x01\x00\x00\x45\x07\xab\x01\x00\x00\x09\x07\x00\x00\x60\x00\x94\x00\x4b\x02\x4a\x02\x00\x00\x47\x02\x94\x00\x00\x00\x46\x02\x43\x02\x42\x02\x41\x02\x40\x02\x00\x00\x2e\x08\x2e\x08\x2e\x08\x2e\x08\x2e\x08\x2e\x08\x00\x00\x00\x00\x00\x00\x00\x00\x2f\x02\x00\x00\x00\x00\x0e\x02\x00\x00\x00\x00\x3e\x02\x32\x02\x29\x02\x21\x02\x00\x00\x2e\x08\x00\x00\x2e\x08\x00\x00\x2e\x08\x00\x00\x2e\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf9\x01\x3b\x0a\x2e\x08\x00\x00\x6c\x00\xc8\x07\x4b\x00\x00\x00\x2c\x02\x00\x00\x00\x00\x00\x00\x63\x01\x00\x00\x00\x00\x7a\x01\x00\x00\x00\x00\x1e\x02\x00\x00\x1c\x02\xf9\x08\x05\x02\x0b\x02\x00\x00\x00\x00\x00\x00\xf7\x01\xef\x01\xd6\x01\xa5\x01\x8a\x06\x00\x00\x00\x00\x00\x00\xdb\x01\x00\x00\x00\x00\x4b\x00\xcd\x01\x00\x00\x00\x00\xf9\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x00\x00\x37\x00\x00\x00\xf2\x07\x00\x00\x00\x00\xcd\x06\x9d\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x01\x56\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x06\x00\x00\x2f\x00\x17\x01\x00\x00\xf9\xff\x0b\x00\x91\x01\x8c\x07\x00\x00\x05\x00\x6f\x01\x9c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6b\x01\x00\x00\x00\x00\x00\x00\x36\x01\x00\x00\x25\x01\xf7\xff\x04\x08\xce\x00\x00\x00\x5e\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x79\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\x74\x01\x1c\x00\x00\x00\xec\xff\x04\x08\x60\x06\xd5\xff\x04\x08\x00\x00\x00\x00\x00\x00\x04\x08\x00\x00\x00\x00\xc5\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#++happyDefActions :: HappyAddr+happyDefActions = HappyA# "\x39\xff\x00\x00\x00\x00\x00\x00\x00\x00\x27\xff\x00\x00\x00\x00\x24\xff\x00\x00\x00\x00\x1f\xff\x00\x00\x1d\xff\x00\x00\x00\x00\x1a\xff\x00\x00\x00\x00\x00\x00\x00\x00\x15\xff\x14\xff\x0f\xff\x0f\xff\xa5\xff\x8a\xff\x58\xff\x59\xff\xac\xff\x57\xff\x5c\xff\x0f\xff\xb5\xff\x41\xff\x43\xff\x3f\xff\x42\xff\x40\xff\x63\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\xff\x00\x00\x49\xff\x48\xff\x47\xff\x4a\xff\x45\xff\x46\xff\x44\xff\x4b\xff\x00\x00\x60\xff\x0f\xff\x0f\xff\x00\x00\x0f\xff\x00\x00\x00\x00\x00\x00\x39\xff\xf0\xff\xf8\xff\x39\xff\x00\x00\xf6\xff\xe0\xff\xf7\xff\xc3\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbb\xff\xc8\xff\xca\xff\xc9\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xed\xff\xee\xff\x0f\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xce\xff\xcd\xff\xcc\xff\xcb\xff\x00\x00\x0f\xff\x0f\xff\xde\xff\x0f\xff\x00\x00\xaf\xff\x0f\xff\x0f\xff\x39\xff\x39\xff\x39\xff\x39\xff\xc4\xff\xc3\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfa\xff\xfb\xff\x7a\xff\x00\x00\x0f\xff\x10\xff\x7a\xff\x00\x00\x10\xff\x10\xff\x0f\xff\x0f\xff\x0f\xff\x64\xff\x0f\xff\x0f\xff\x0f\xff\x0f\xff\x00\x00\x00\x00\xce\xff\xcd\xff\x7c\xff\x7b\xff\x0f\xff\x0f\xff\x0f\xff\x00\x00\x6b\xff\x00\x00\x00\x00\x00\x00\x7a\xff\x00\x00\x10\xff\x00\x00\x00\x00\x10\xff\x00\x00\x0f\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\xff\x0f\xff\x0f\xff\x0f\xff\x0f\xff\x0f\xff\x0f\xff\x1e\xff\x0f\xff\x00\x00\x0f\xff\x00\x00\x0f\xff\x26\xff\x9e\xff\x28\xff\x00\x00\x0f\xff\x0f\xff\x67\xff\x0f\xff\x0f\xff\x0f\xff\x0f\xff\x0f\xff\x10\xff\x00\x00\x0f\xff\x00\x00\x0f\xff\x0f\xff\x61\xff\x00\x00\xa3\xff\x00\x00\x00\x00\x00\x00\xa0\xff\x0f\xff\x00\x00\x00\x00\x00\x00\x0f\xff\x00\x00\xab\xff\x00\x00\x00\x00\x10\xff\x0f\xff\x10\xff\x0f\xff\x10\xff\x0f\xff\x0f\xff\x0f\xff\x0f\xff\x0f\xff\x65\xff\x0f\xff\x7c\xff\x7b\xff\x0f\xff\x0f\xff\x00\x00\x5b\xff\x0f\xff\x00\x00\x10\xff\x10\xff\x10\xff\x5f\xff\x5e\xff\x0f\xff\x0f\xff\x00\x00\x4f\xff\x00\x00\x00\x00\x66\xff\x00\x00\x00\x00\x00\x00\x00\x00\xd0\xff\xe0\xff\x00\x00\x00\x00\x00\x00\xe3\xff\x00\x00\x78\xff\xd9\xff\x75\xff\x98\xff\xc3\xff\x00\x00\xea\xff\xc2\xff\x00\x00\x00\x00\x00\x00\x00\x00\x10\xff\x10\xff\x0f\xff\x00\x00\x10\xff\x10\xff\x00\x00\x00\x00\x00\x00\xb4\xff\x00\x00\xb9\xff\xb7\xff\xb6\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xff\x00\x00\x39\xff\x00\x00\x00\x00\x00\x00\xf5\xff\x00\x00\x0f\xff\x00\x00\xc7\xff\x00\x00\xf9\xff\x00\x00\x95\xff\x35\xff\x00\x00\x38\xff\x00\x00\x0f\xff\x32\xff\x2e\xff\x00\x00\x00\x00\x0f\xff\x0f\xff\x00\x00\xba\xff\x0f\xff\x0f\xff\x0f\xff\xb1\xff\xb0\xff\x0f\xff\xdd\xff\x00\x00\xae\xff\xad\xff\xf1\xff\xf2\xff\xf3\xff\xf4\xff\x0f\xff\x0f\xff\x00\x00\x0f\xff\xd9\xff\x00\x00\xd3\xff\xd7\xff\xd6\xff\xd4\xff\x00\x00\x00\x00\x00\x00\x00\x00\xe2\xff\x0f\xff\x0f\xff\x0f\xff\xe1\xff\x00\x00\xd1\xff\x00\x00\x0f\xff\x0f\xff\x00\x00\x7a\xff\x50\xff\x52\xff\x10\xff\x00\x00\xa8\xff\x62\xff\x90\xff\x0f\xff\x10\xff\x00\x00\x10\xff\x0f\xff\x53\xff\x10\xff\x10\xff\x10\xff\x10\xff\x10\xff\x10\xff\x10\xff\x00\x00\x10\xff\x00\x00\x10\xff\x00\x00\x0f\xff\x74\xff\x0f\xff\x6e\xff\x0f\xff\x71\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x79\xff\x00\x00\x0f\xff\x10\xff\x10\xff\xaa\xff\x10\xff\x0f\xff\x92\xff\x10\xff\x10\xff\x10\xff\x10\xff\x10\xff\x9d\xff\x8b\xff\x8e\xff\x8c\xff\x8d\xff\x8f\xff\x88\xff\xa9\xff\x89\xff\xa2\xff\x9f\xff\x00\x00\xa1\xff\x79\xff\x00\x00\x69\xff\x68\xff\x0f\xff\x10\xff\x10\xff\x10\xff\xb3\xff\x00\x00\x80\xff\x00\x00\x7f\xff\x00\x00\x5a\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\xff\x0f\xff\x00\x00\x00\x00\x00\x00\x0f\xff\x00\x00\x0f\xff\xcf\xff\x00\x00\x00\x00\x00\x00\x13\xff\x12\xff\x77\xff\x00\x00\x00\x00\xd2\xff\xd8\xff\x10\xff\x97\xff\x10\xff\xc3\xff\x10\xff\x00\x00\xe6\xff\x00\x00\xb8\xff\x10\xff\x10\xff\x39\xff\x0f\xff\x3e\xff\x00\x00\x2d\xff\x31\xff\x10\xff\x34\xff\x00\x00\x0f\xff\x00\x00\xc6\xff\xec\xff\x00\x00\x00\x00\xef\xff\x36\xff\x00\x00\xbf\xff\x2e\xff\xbe\xff\x3e\xff\x2a\xff\x2b\xff\x00\x00\x10\xff\x00\x00\xbd\xff\xbc\xff\x3b\xff\x00\x00\xda\xff\x00\x00\xdc\xff\xc0\xff\xc1\xff\x00\x00\x9b\xff\x00\x00\x00\x00\x11\xff\x00\x00\x0f\xff\x00\x00\x00\x00\x0f\xff\x10\xff\x00\x00\x4c\xff\x0f\xff\x10\xff\x0f\xff\x82\xff\x7e\xff\x83\xff\x86\xff\x84\xff\x85\xff\x87\xff\x7d\xff\x81\xff\xb2\xff\x6d\xff\x6c\xff\x10\xff\x73\xff\x72\xff\x00\x00\x10\xff\x56\xff\x10\xff\x0f\xff\x00\x00\x10\xff\x93\xff\x0f\xff\x10\xff\x00\x00\x76\xff\xd5\xff\x9c\xff\x00\x00\xeb\xff\xe4\xff\xdb\xff\x00\x00\x3c\xff\x3a\xff\x29\xff\x3d\xff\x2c\xff\x33\xff\x37\xff\xc5\xff\xe5\xff\x9a\xff\x00\x00\x0f\xff\xe7\xff\x10\xff\xa4\xff\x00\x00\x10\xff\x00\x00\x6a\xff\x70\xff\x4e\xff\x00\x00\x00\x00\xe9\xff\x10\xff\x99\xff\xe8\xff\x51\xff\x4d\xff"#++happyCheck :: HappyAddr+happyCheck = HappyA# "\xff\xff\x11\x00\x01\x00\x0b\x00\x02\x00\x0a\x00\x02\x00\x17\x00\x43\x00\x02\x00\x03\x00\x08\x00\x09\x00\x0c\x00\x02\x00\x13\x00\x17\x00\x10\x00\x0b\x00\x11\x00\x13\x00\x25\x00\x03\x00\x01\x00\x43\x00\x22\x00\x21\x00\x2b\x00\x20\x00\x2d\x00\x2e\x00\x0c\x00\x30\x00\x17\x00\x0c\x00\x33\x00\x1d\x00\x22\x00\x10\x00\x22\x00\x26\x00\x22\x00\x23\x00\x27\x00\x31\x00\x22\x00\x27\x00\x43\x00\x2e\x00\x41\x00\x2e\x00\x20\x00\x21\x00\x2e\x00\x17\x00\x3f\x00\x17\x00\x06\x00\x2e\x00\x44\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x02\x00\x03\x00\x3b\x00\x17\x00\x44\x00\x47\x00\x44\x00\x17\x00\x18\x00\x0b\x00\x4c\x00\x17\x00\x44\x00\x4f\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x45\x00\x3a\x00\x17\x00\x3a\x00\x01\x00\x47\x00\x1d\x00\x17\x00\x44\x00\x2e\x00\x4c\x00\x22\x00\x23\x00\x4f\x00\x33\x00\x02\x00\x27\x00\x02\x00\x69\x00\x10\x00\x06\x00\x22\x00\x6d\x00\x2e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x3d\x00\x3e\x00\x11\x00\x17\x00\x11\x00\x72\x00\x1a\x00\x02\x00\x03\x00\x17\x00\x18\x00\x69\x00\x3d\x00\x3e\x00\x3a\x00\x6d\x00\x0b\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x13\x00\x11\x00\x12\x00\x13\x00\x17\x00\x22\x00\x44\x00\x17\x00\x43\x00\x19\x00\x2e\x00\x2e\x00\x2e\x00\x1d\x00\x20\x00\x21\x00\x33\x00\x01\x00\x22\x00\x23\x00\x02\x00\x03\x00\x26\x00\x27\x00\x17\x00\x44\x00\x20\x00\x21\x00\x0c\x00\x0b\x00\x2e\x00\x2f\x00\x10\x00\x20\x00\x35\x00\x11\x00\x12\x00\x13\x00\x05\x00\x44\x00\x3b\x00\x17\x00\x72\x00\x19\x00\x22\x00\x22\x00\x22\x00\x1d\x00\x26\x00\x02\x00\x03\x00\x45\x00\x22\x00\x23\x00\x22\x00\x22\x00\x26\x00\x27\x00\x0b\x00\x01\x00\x22\x00\x4d\x00\x4e\x00\x45\x00\x2e\x00\x2f\x00\x52\x00\x53\x00\x22\x00\x55\x00\x0c\x00\x26\x00\x02\x00\x03\x00\x10\x00\x17\x00\x1d\x00\x13\x00\x44\x00\x44\x00\x44\x00\x22\x00\x23\x00\x4d\x00\x4e\x00\x21\x00\x27\x00\x44\x00\x44\x00\x44\x00\x6a\x00\x6b\x00\x6c\x00\x2e\x00\x44\x00\x4d\x00\x4e\x00\x22\x00\x72\x00\x1d\x00\x52\x00\x53\x00\x44\x00\x55\x00\x22\x00\x23\x00\x02\x00\x03\x00\x26\x00\x27\x00\x22\x00\x27\x00\x6a\x00\x6b\x00\x6c\x00\x0b\x00\x2e\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x6a\x00\x6b\x00\x6c\x00\x0f\x00\x22\x00\x47\x00\x22\x00\x44\x00\x72\x00\x1d\x00\x4c\x00\x17\x00\x43\x00\x4f\x00\x22\x00\x23\x00\x44\x00\x22\x00\x22\x00\x27\x00\x44\x00\x02\x00\x03\x00\x02\x00\x03\x00\x0f\x00\x2e\x00\x22\x00\x22\x00\x02\x00\x0b\x00\x55\x00\x0b\x00\x17\x00\x22\x00\x22\x00\x22\x00\x72\x00\x44\x00\x69\x00\x44\x00\x22\x00\x27\x00\x6d\x00\x11\x00\x6f\x00\x70\x00\x71\x00\x1d\x00\x22\x00\x1d\x00\x44\x00\x44\x00\x22\x00\x23\x00\x22\x00\x23\x00\x22\x00\x27\x00\x20\x00\x27\x00\x44\x00\x44\x00\x02\x00\x03\x00\x2e\x00\x27\x00\x2e\x00\x44\x00\x44\x00\x44\x00\x44\x00\x0b\x00\x2e\x00\x03\x00\x44\x00\x02\x00\x03\x00\x02\x00\x03\x00\x22\x00\x0b\x00\x0c\x00\x44\x00\x03\x00\x0b\x00\x44\x00\x0b\x00\x07\x00\x12\x00\x1d\x00\x44\x00\x02\x00\x03\x00\x72\x00\x22\x00\x23\x00\x10\x00\x27\x00\x43\x00\x27\x00\x0b\x00\x17\x00\x1d\x00\x17\x00\x1d\x00\x01\x00\x2e\x00\x22\x00\x23\x00\x22\x00\x23\x00\x21\x00\x27\x00\x44\x00\x27\x00\x43\x00\x02\x00\x03\x00\x1d\x00\x2e\x00\x10\x00\x2e\x00\x17\x00\x22\x00\x23\x00\x0b\x00\x44\x00\x01\x00\x27\x00\x02\x00\x03\x00\x20\x00\x72\x00\x17\x00\x72\x00\x2e\x00\x0a\x00\x0b\x00\x17\x00\x17\x00\x1e\x00\x17\x00\x10\x00\x1d\x00\x17\x00\x1e\x00\x1e\x00\x1d\x00\x22\x00\x23\x00\x1d\x00\x4d\x00\x4e\x00\x27\x00\x02\x00\x03\x00\x1d\x00\x40\x00\x20\x00\x42\x00\x2e\x00\x22\x00\x23\x00\x0b\x00\x0c\x00\x0d\x00\x27\x00\x17\x00\x43\x00\x11\x00\x1a\x00\x13\x00\x43\x00\x2e\x00\x72\x00\x02\x00\x03\x00\x02\x00\x03\x00\x17\x00\x6a\x00\x6b\x00\x6c\x00\x17\x00\x20\x00\x1d\x00\x0b\x00\x72\x00\x17\x00\x72\x00\x26\x00\x27\x00\x1b\x00\x1c\x00\x0a\x00\x08\x00\x09\x00\x0d\x00\x2e\x00\x2f\x00\x0c\x00\x31\x00\x1d\x00\x72\x00\x1d\x00\x02\x00\x43\x00\x22\x00\x23\x00\x22\x00\x23\x00\x17\x00\x27\x00\x19\x00\x27\x00\x3f\x00\x15\x00\x16\x00\x43\x00\x2e\x00\x44\x00\x2e\x00\x17\x00\x23\x00\x24\x00\x25\x00\x26\x00\x44\x00\x72\x00\x4d\x00\x4e\x00\x2b\x00\x1d\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x22\x00\x23\x00\x33\x00\x01\x00\x72\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x17\x00\x18\x00\x4d\x00\x4e\x00\x0a\x00\x10\x00\x53\x00\x0d\x00\x6a\x00\x6b\x00\x6c\x00\x16\x00\x36\x00\x18\x00\x03\x00\x40\x00\x1b\x00\x42\x00\x07\x00\x2a\x00\x2b\x00\x2c\x00\x02\x00\x03\x00\x08\x00\x09\x00\x25\x00\x10\x00\x33\x00\x28\x00\x43\x00\x6a\x00\x6b\x00\x6c\x00\x17\x00\x0b\x00\x0c\x00\x17\x00\x18\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x03\x00\x17\x00\x1d\x00\x43\x00\x07\x00\x1b\x00\x1c\x00\x22\x00\x23\x00\x2a\x00\x2b\x00\x43\x00\x27\x00\x10\x00\x44\x00\x49\x00\x4a\x00\x4b\x00\x33\x00\x2e\x00\x17\x00\x4f\x00\x50\x00\x17\x00\x18\x00\x43\x00\x01\x00\x02\x00\x56\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x15\x00\x16\x00\x42\x00\x43\x00\x0e\x00\x0f\x00\x10\x00\x2a\x00\x2b\x00\x17\x00\x27\x00\x19\x00\x16\x00\x43\x00\x18\x00\x43\x00\x33\x00\x1b\x00\x43\x00\x1d\x00\x52\x00\x23\x00\x24\x00\x25\x00\x22\x00\x23\x00\x43\x00\x25\x00\x26\x00\x2b\x00\x28\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x43\x00\x2e\x00\x33\x00\x17\x00\x18\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x44\x00\x43\x00\x43\x00\x43\x00\x43\x00\x14\x00\x44\x00\x43\x00\x43\x00\x2a\x00\x2b\x00\x43\x00\x43\x00\x43\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x33\x00\x44\x00\x44\x00\x4f\x00\x50\x00\x51\x00\x01\x00\x02\x00\x54\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x44\x00\x44\x00\x43\x00\x43\x00\x0e\x00\x0f\x00\x10\x00\x43\x00\x43\x00\x17\x00\x43\x00\x19\x00\x16\x00\x43\x00\x18\x00\x43\x00\x43\x00\x1b\x00\x43\x00\x1d\x00\x43\x00\x23\x00\x24\x00\x25\x00\x22\x00\x23\x00\x43\x00\x25\x00\x44\x00\x2b\x00\x28\x00\x2d\x00\x2e\x00\x44\x00\x30\x00\x44\x00\x44\x00\x33\x00\x17\x00\x18\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x44\x00\x17\x00\x17\x00\x43\x00\x43\x00\x28\x00\x44\x00\x43\x00\x43\x00\x2a\x00\x2b\x00\x05\x00\x43\x00\x43\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x33\x00\x43\x00\x43\x00\x4f\x00\x50\x00\x51\x00\x01\x00\x44\x00\x54\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x04\x00\x44\x00\x27\x00\x44\x00\x0e\x00\x0f\x00\x10\x00\x43\x00\x43\x00\x17\x00\x44\x00\x19\x00\x16\x00\x27\x00\x18\x00\x44\x00\x43\x00\x1b\x00\x43\x00\x1d\x00\x44\x00\x23\x00\x24\x00\x25\x00\x02\x00\x03\x00\x43\x00\x25\x00\x43\x00\x2b\x00\x28\x00\x2d\x00\x2e\x00\x0b\x00\x30\x00\x44\x00\x43\x00\x33\x00\x43\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x43\x00\x27\x00\x44\x00\x1d\x00\x44\x00\x44\x00\x44\x00\x44\x00\x22\x00\x23\x00\x04\x00\x17\x00\x17\x00\x27\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x17\x00\x0c\x00\x2e\x00\x4f\x00\x50\x00\x51\x00\x01\x00\x05\x00\x54\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x44\x00\x44\x00\x44\x00\x17\x00\x0e\x00\x0f\x00\x10\x00\x44\x00\x44\x00\x17\x00\x40\x00\x19\x00\x16\x00\x13\x00\x18\x00\x17\x00\x17\x00\x1b\x00\x15\x00\x1d\x00\x26\x00\x23\x00\x24\x00\x25\x00\x02\x00\x03\x00\x15\x00\x25\x00\x11\x00\x2b\x00\x28\x00\x2d\x00\x2e\x00\x0b\x00\x30\x00\x2e\x00\x03\x00\x33\x00\x13\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x11\x00\x0b\x00\x26\x00\x1d\x00\x44\x00\x13\x00\x44\x00\x26\x00\x22\x00\x23\x00\x11\x00\x11\x00\x0c\x00\x27\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x0b\x00\x14\x00\x2e\x00\x4f\x00\x50\x00\x51\x00\x01\x00\x2e\x00\x54\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x14\x00\x20\x00\x0b\x00\x31\x00\x0e\x00\x0f\x00\x10\x00\x0a\x00\x2e\x00\x17\x00\x11\x00\x19\x00\x16\x00\x11\x00\x18\x00\x11\x00\x11\x00\x1b\x00\x11\x00\x1d\x00\x11\x00\x23\x00\x24\x00\x25\x00\x02\x00\x03\x00\x11\x00\x25\x00\x2e\x00\x2b\x00\x28\x00\x2d\x00\x2e\x00\x2e\x00\x30\x00\x13\x00\x0b\x00\x33\x00\x13\x00\x11\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x10\x00\x04\x00\x20\x00\x1d\x00\x26\x00\x04\x00\x44\x00\x20\x00\x22\x00\x23\x00\x13\x00\x20\x00\x26\x00\x27\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x26\x00\x11\x00\x2e\x00\x4f\x00\x50\x00\x51\x00\x01\x00\x11\x00\x54\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x26\x00\x0a\x00\x15\x00\x13\x00\x0e\x00\x0f\x00\x10\x00\x13\x00\x13\x00\x17\x00\x11\x00\x19\x00\x16\x00\x13\x00\x18\x00\x26\x00\x0a\x00\x1b\x00\x56\x00\x1d\x00\x0c\x00\x23\x00\x24\x00\x25\x00\x0b\x00\x26\x00\x13\x00\x25\x00\x20\x00\x2b\x00\x28\x00\x2d\x00\x2e\x00\x0d\x00\x30\x00\x13\x00\x11\x00\x33\x00\x11\x00\x26\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x31\x00\x11\x00\x0a\x00\x03\x00\x26\x00\x26\x00\x44\x00\x20\x00\x13\x00\x02\x00\x03\x00\x2f\x00\x0a\x00\x11\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x11\x00\x03\x00\x11\x00\x4f\x00\x50\x00\x51\x00\x01\x00\x0a\x00\x54\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x10\x00\x55\x00\x0a\x00\x1d\x00\x0e\x00\x0f\x00\x10\x00\x12\x00\x22\x00\x23\x00\x0b\x00\x11\x00\x16\x00\x27\x00\x18\x00\x0b\x00\x0b\x00\x1b\x00\x04\x00\x1d\x00\x2e\x00\x2f\x00\x02\x00\x03\x00\x02\x00\x03\x00\x01\x00\x25\x00\x04\x00\x12\x00\x28\x00\x04\x00\x10\x00\x10\x00\x3f\x00\x10\x00\x05\x00\x11\x00\x14\x00\x11\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x12\x00\x1d\x00\x12\x00\x1d\x00\x12\x00\x12\x00\x22\x00\x23\x00\x22\x00\x23\x00\x26\x00\x27\x00\x26\x00\x27\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x2e\x00\x0c\x00\x2e\x00\x4f\x00\x50\x00\x51\x00\x01\x00\x20\x00\x54\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\x0e\x00\x0f\x00\x10\x00\xff\xff\x72\x00\x72\x00\xff\xff\xff\xff\x16\x00\xff\xff\x18\x00\xff\xff\xff\xff\x1b\x00\xff\xff\x1d\x00\xff\xff\x0c\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x25\x00\xff\xff\xff\xff\x28\x00\xff\xff\x17\x00\x18\x00\xff\xff\xff\xff\x1b\x00\x1c\x00\xff\xff\x13\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x1d\x00\xff\xff\x2a\x00\x2b\x00\x2c\x00\x22\x00\x23\x00\xff\xff\x02\x00\x03\x00\x27\x00\x33\x00\xff\xff\x48\x00\x49\x00\x4a\x00\x4b\x00\x2e\x00\xff\xff\xff\xff\x4f\x00\x50\x00\x51\x00\x01\x00\x12\x00\x54\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\xff\xff\xff\xff\xff\xff\x1d\x00\x0e\x00\x0f\x00\x10\x00\xff\xff\x22\x00\x23\x00\xff\xff\xff\xff\x16\x00\x27\x00\x18\x00\xff\xff\xff\xff\x1b\x00\xff\xff\x1d\x00\x2e\x00\xff\xff\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x25\x00\xff\xff\xff\xff\x28\x00\xff\xff\x17\x00\x18\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x13\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x1d\x00\xff\xff\x2a\x00\x2b\x00\xff\xff\x22\x00\x23\x00\xff\xff\x02\x00\x03\x00\x27\x00\x33\x00\xff\xff\x48\x00\x49\x00\x4a\x00\x4b\x00\x2e\x00\xff\xff\xff\xff\x4f\x00\x50\x00\x51\x00\x01\x00\x12\x00\x54\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\xff\xff\xff\xff\xff\xff\x1d\x00\x0e\x00\x0f\x00\x10\x00\xff\xff\x22\x00\x23\x00\xff\xff\xff\xff\x16\x00\x27\x00\x18\x00\xff\xff\xff\xff\x1b\x00\xff\xff\x1d\x00\x2e\x00\xff\xff\x02\x00\x03\x00\x02\x00\x03\x00\xff\xff\x25\x00\xff\xff\xff\xff\x28\x00\x0b\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x1d\x00\xff\xff\x1d\x00\xff\xff\xff\xff\x22\x00\x23\x00\x22\x00\x23\x00\xff\xff\x27\x00\xff\xff\x27\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x2e\x00\xff\xff\x2e\x00\x4f\x00\x50\x00\x51\x00\x01\x00\xff\xff\x54\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0c\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\xff\xff\xff\xff\x17\x00\x18\x00\x17\x00\x16\x00\x19\x00\x18\x00\xff\xff\xff\xff\x1b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\xff\xff\x25\x00\x2a\x00\x2b\x00\x28\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\x2f\x00\x30\x00\x33\x00\xff\xff\x33\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x02\x00\x03\x00\xff\xff\x01\x00\xff\xff\xff\xff\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\x49\x00\x4a\x00\x4b\x00\x10\x00\xff\xff\xff\xff\x4f\x00\x50\x00\x19\x00\x16\x00\xff\xff\x18\x00\x1d\x00\xff\xff\x1b\x00\xff\xff\xff\xff\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\x27\x00\xff\xff\x25\x00\xff\xff\xff\xff\x28\x00\xff\xff\x2e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x02\x00\x03\x00\xff\xff\x01\x00\xff\xff\xff\xff\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\x49\x00\x4a\x00\x4b\x00\x10\x00\xff\xff\xff\xff\x4f\x00\x50\x00\x19\x00\x16\x00\xff\xff\x18\x00\x1d\x00\xff\xff\x1b\x00\xff\xff\xff\xff\x22\x00\x23\x00\xff\xff\xff\xff\xff\xff\x27\x00\xff\xff\x25\x00\xff\xff\xff\xff\x28\x00\xff\xff\x2e\x00\x17\x00\x18\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x02\x00\x03\x00\xff\xff\x01\x00\x2a\x00\x2b\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x33\x00\xff\xff\x49\x00\x4a\x00\x4b\x00\x10\x00\xff\xff\xff\xff\x4f\x00\x50\x00\xff\xff\x16\x00\xff\xff\x18\x00\x1d\x00\xff\xff\x1b\x00\xff\xff\xff\xff\x22\x00\x23\x00\xff\xff\xff\xff\xff\xff\x27\x00\xff\xff\x25\x00\xff\xff\xff\xff\x28\x00\xff\xff\x2e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\x01\x00\xff\xff\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x17\x00\x18\x00\xff\xff\x49\x00\x4a\x00\x4b\x00\x10\x00\xff\xff\x1f\x00\x4f\x00\x50\x00\x17\x00\x16\x00\x19\x00\x18\x00\xff\xff\xff\xff\x1b\x00\x29\x00\x2a\x00\x2b\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\xff\xff\x25\x00\x33\x00\xff\xff\x28\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\x01\x00\xff\xff\x17\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\x49\x00\x4a\x00\x4b\x00\x10\x00\x25\x00\xff\xff\x4f\x00\x50\x00\xff\xff\x16\x00\x2b\x00\x18\x00\x2d\x00\x2e\x00\x1b\x00\x30\x00\xff\xff\xff\xff\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\x25\x00\xff\xff\xff\xff\x28\x00\xff\xff\xff\xff\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\x01\x00\xff\xff\xff\xff\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x17\x00\x18\x00\xff\xff\x49\x00\x4a\x00\x4b\x00\x10\x00\x11\x00\x1f\x00\x4f\x00\x50\x00\x17\x00\x16\x00\x19\x00\x18\x00\xff\xff\xff\xff\x1b\x00\x29\x00\x2a\x00\x2b\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\xff\xff\x25\x00\x33\x00\xff\xff\x28\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\x01\x00\xff\xff\xff\xff\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x17\x00\x18\x00\xff\xff\x49\x00\x4a\x00\x4b\x00\x10\x00\x11\x00\x1f\x00\x4f\x00\x50\x00\x17\x00\x16\x00\x19\x00\x18\x00\xff\xff\xff\xff\x1b\x00\x29\x00\x2a\x00\x2b\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\xff\xff\x25\x00\x33\x00\xff\xff\x28\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\x01\x00\xff\xff\xff\xff\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x17\x00\x18\x00\xff\xff\x49\x00\x4a\x00\x4b\x00\x10\x00\x11\x00\x1f\x00\x4f\x00\x50\x00\x17\x00\x16\x00\x19\x00\x18\x00\xff\xff\xff\xff\x1b\x00\x29\x00\x2a\x00\x2b\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\xff\xff\x25\x00\x33\x00\xff\xff\x28\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\x2f\x00\x30\x00\xff\xff\xff\xff\x33\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\x01\x00\xff\xff\xff\xff\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x17\x00\x18\x00\xff\xff\x49\x00\x4a\x00\x4b\x00\x10\x00\x11\x00\x1f\x00\x4f\x00\x50\x00\x17\x00\x16\x00\x19\x00\x18\x00\xff\xff\xff\xff\x1b\x00\x29\x00\x2a\x00\x2b\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\xff\xff\x25\x00\x33\x00\xff\xff\x28\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\x01\x00\xff\xff\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x17\x00\x18\x00\xff\xff\x49\x00\x4a\x00\x4b\x00\x10\x00\xff\xff\x1f\x00\x4f\x00\x50\x00\x17\x00\x16\x00\x19\x00\x18\x00\xff\xff\xff\xff\x1b\x00\x29\x00\x2a\x00\x2b\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\xff\xff\x25\x00\x33\x00\xff\xff\x28\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\x01\x00\xff\xff\x17\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x17\x00\x18\x00\xff\xff\x49\x00\x4a\x00\x4b\x00\x10\x00\x25\x00\xff\xff\x4f\x00\x50\x00\x17\x00\x16\x00\x2b\x00\x18\x00\x2d\x00\x2e\x00\x1b\x00\x30\x00\x2a\x00\x2b\x00\x33\x00\x34\x00\xff\xff\xff\xff\x25\x00\xff\xff\x25\x00\x33\x00\xff\xff\x28\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\x01\x00\xff\xff\x17\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x17\x00\x18\x00\xff\xff\x49\x00\x4a\x00\x4b\x00\x10\x00\x25\x00\xff\xff\x4f\x00\x50\x00\xff\xff\x16\x00\x2b\x00\x18\x00\x2d\x00\x2e\x00\x1b\x00\x30\x00\x2a\x00\x2b\x00\x33\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x25\x00\x33\x00\xff\xff\x01\x00\xff\xff\xff\xff\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\xff\xff\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\x18\x00\xff\xff\xff\xff\x1b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x49\x00\x4a\x00\x4b\x00\x25\x00\xff\xff\xff\xff\x4f\x00\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\x02\x00\x03\x00\x01\x00\x02\x00\xff\xff\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\xff\xff\xff\xff\xff\xff\x49\x00\x4a\x00\x4b\x00\x0f\x00\x10\x00\xff\xff\x4f\x00\x50\x00\x17\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1d\x00\xff\xff\xff\xff\x1d\x00\xff\xff\x22\x00\x23\x00\xff\xff\x22\x00\x23\x00\x27\x00\x25\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\xff\xff\x02\x00\x03\x00\xff\xff\xff\xff\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\xff\xff\x11\x00\x01\x00\xff\xff\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\xff\xff\xff\xff\xff\xff\x1d\x00\x4a\x00\x4b\x00\x0f\x00\x10\x00\x22\x00\x23\x00\xff\xff\xff\xff\xff\xff\x27\x00\xff\xff\xff\xff\xff\xff\xff\xff\x01\x00\xff\xff\x2e\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\xff\xff\xff\xff\x25\x00\xff\xff\x11\x00\xff\xff\x0f\x00\x10\x00\xff\xff\xff\xff\x17\x00\xff\xff\xff\xff\xff\xff\xff\xff\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x25\x00\xff\xff\xff\xff\xff\xff\x25\x00\xff\xff\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x4a\x00\x4b\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\xff\xff\x01\x00\xff\xff\xff\xff\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\x4a\x00\x4b\x00\x10\x00\xff\xff\xff\xff\x0a\x00\x17\x00\xff\xff\x0d\x00\x0e\x00\x18\x00\x10\x00\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\xff\xff\x17\x00\xff\xff\x25\x00\xff\xff\xff\xff\x25\x00\xff\xff\xff\xff\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\xff\xff\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x36\x00\x37\x00\x38\x00\x39\x00\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x4a\x00\x4b\x00\xff\xff\x0a\x00\xff\xff\xff\xff\x0d\x00\x0e\x00\xff\xff\x10\x00\xff\xff\x12\x00\x00\x00\x01\x00\x02\x00\x03\x00\x17\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\x0d\x00\x0e\x00\xff\xff\x10\x00\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\xff\xff\x17\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\x36\x00\x37\x00\x38\x00\x39\x00\x0a\x00\xff\xff\xff\xff\x0d\x00\x0e\x00\xff\xff\x10\x00\xff\xff\x12\x00\x00\x00\x01\x00\x02\x00\x03\x00\x17\x00\xff\xff\x36\x00\x37\x00\x38\x00\x39\x00\x0a\x00\xff\xff\xff\xff\x0d\x00\x0e\x00\xff\xff\x10\x00\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\xff\xff\x17\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\x36\x00\x37\x00\x38\x00\x39\x00\x0a\x00\xff\xff\xff\xff\x0d\x00\x0e\x00\xff\xff\x10\x00\xff\xff\x12\x00\x00\x00\x01\x00\x02\x00\x03\x00\x17\x00\xff\xff\x36\x00\x37\x00\x38\x00\x39\x00\x0a\x00\xff\xff\xff\xff\x0d\x00\x0e\x00\xff\xff\x10\x00\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\xff\xff\x17\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\x36\x00\x37\x00\x38\x00\x39\x00\x0a\x00\xff\xff\xff\xff\x0d\x00\x0e\x00\x11\x00\x10\x00\xff\xff\x12\x00\xff\xff\xff\xff\x17\x00\xff\xff\x17\x00\xff\xff\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\x02\x00\x03\x00\xff\xff\xff\xff\x25\x00\xff\xff\xff\xff\xff\xff\xff\xff\x0b\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\x11\x00\x30\x00\xff\xff\xff\xff\x33\x00\xff\xff\x17\x00\xff\xff\xff\xff\x36\x00\x37\x00\x38\x00\x39\x00\x1d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x22\x00\x23\x00\x25\x00\xff\xff\xff\xff\x27\x00\xff\xff\x17\x00\x2b\x00\x19\x00\x2d\x00\x2e\x00\x2e\x00\x30\x00\xff\xff\xff\xff\x33\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\x17\x00\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\x17\x00\xff\xff\x25\x00\xff\xff\x2b\x00\xff\xff\x2d\x00\x2e\x00\x2b\x00\x30\x00\x2d\x00\x2e\x00\x33\x00\x30\x00\x25\x00\x17\x00\x33\x00\xff\xff\xff\xff\xff\xff\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\x17\x00\x18\x00\x33\x00\x25\x00\xff\xff\xff\xff\xff\xff\x17\x00\x1f\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x29\x00\x2a\x00\x2b\x00\x25\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2b\x00\x33\x00\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\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"#++happyTable :: HappyAddr+happyTable = HappyA# "\x00\x00\x7f\x00\x22\x00\x03\x02\xe1\x00\xd8\x00\xe1\x00\x17\x00\x57\x02\xaf\x00\xb0\x00\xd3\x01\x5c\x01\x50\x00\xe1\x00\x14\x01\x8a\x00\x51\x00\x20\xff\x75\xff\xfc\xff\x1b\x00\xb0\x00\x22\x00\x52\x02\xac\x00\x31\x02\x1c\x00\x15\x01\x80\x00\x1e\x00\xdf\xff\x1f\x00\x42\x01\x50\x00\x20\x00\xb1\x00\xac\x00\x51\x00\xac\x00\x75\xff\xb2\x00\xb3\x00\x93\x01\x7a\xff\xac\x00\xb4\x00\x54\x02\xe3\x00\x81\x00\xe3\x00\xdf\xff\xdf\xff\xb5\x00\x2a\x01\x56\x00\x2a\x01\x09\x01\xe3\x00\x4d\x02\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\xaf\x00\xb0\x00\xec\x01\x34\x02\xad\x00\x59\x00\x2d\x02\x73\x00\x74\x00\x22\xff\x5a\x00\xe9\x01\x30\x02\x5b\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\xdf\xff\x42\x02\xe9\x01\x2b\x01\x22\x00\x59\x00\xb1\x00\x2a\x01\x55\x02\x75\x00\x5a\x00\xb2\x00\xb3\x00\x5b\x00\x76\x00\xe1\x00\xb4\x00\xe1\x00\x5c\x00\x51\x00\x72\x00\xac\x00\x5d\x00\xb5\x00\x5e\x00\x5f\x00\x60\x00\xfc\xff\x41\x02\xeb\x01\x1b\x02\xa8\x00\xe2\x00\x20\xff\xaf\x01\xaf\x00\xb0\x00\x73\x00\x74\x00\x5c\x00\xea\x01\xeb\x01\x2d\x01\x5d\x00\xa7\xff\x5e\x00\x5f\x00\x60\x00\xfc\xff\x41\x01\xa7\xff\xa7\xff\xa7\xff\x42\x01\xac\x00\xad\x00\xa7\xff\x49\x02\xa7\xff\xe3\x00\x75\x00\xe3\x00\xb1\x00\x0c\x01\x0d\x01\x76\x00\x22\x00\xb2\x00\xb3\x00\xaf\x00\xb0\x00\xa7\xff\xb4\x00\x2e\x01\x4a\x02\x23\x01\x24\x01\x50\x00\xa6\xff\xb5\x00\xa7\xff\x51\x00\x3c\x01\x43\x01\xa6\xff\xa6\xff\xa6\xff\x38\x02\x15\x02\x44\x01\xa6\xff\x22\xff\xa6\xff\xac\x00\xac\x00\xac\x00\xb1\x00\xec\x00\xaf\x00\xb0\x00\x0e\x01\xb2\x00\xb3\x00\xac\x00\xac\x00\xa6\xff\xb4\x00\x25\xff\x22\x00\xac\x00\xa7\xff\xa7\xff\x0e\x01\xb5\x00\xa6\xff\xa7\xff\xa7\xff\xac\x00\xa7\xff\x50\x00\x39\x02\xaf\x00\xb0\x00\x51\x00\x71\x01\xb1\x00\xfc\xff\xad\x00\xad\x00\x74\x01\xb2\x00\xb3\x00\x5e\x01\x5f\x01\x8b\x00\xb4\x00\x2b\x02\x83\x01\x85\x01\xa7\xff\xa7\xff\xa7\xff\xb5\x00\x87\x01\xa6\xff\xa6\xff\xac\x00\xa7\xff\xb1\x00\xa6\xff\xa6\xff\x89\x01\xa6\xff\xb2\x00\xb3\x00\xaf\x00\xb0\x00\x14\x02\xb4\x00\xac\x00\x75\x01\x60\x01\x61\x01\x62\x01\x23\xff\xb5\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\xa6\xff\xa6\xff\xa6\xff\x44\x02\xac\x00\x59\x00\xac\x00\xad\x00\xa6\xff\xb1\x00\x5a\x00\x33\x01\x4b\x02\x5b\x00\xb2\x00\xb3\x00\xb5\x00\xac\x00\xac\x00\xb4\x00\x9e\x01\xaf\x00\xb0\x00\xaf\x00\xb0\x00\x32\x01\xb5\x00\xac\x00\xac\x00\xe1\x00\x21\xff\x94\xff\x1c\xff\x33\x01\xe3\x00\xac\x00\xac\x00\x25\xff\xa1\x01\x5c\x00\xa2\x01\xac\x00\xf4\x00\x5d\x00\x91\x01\x5e\x00\x5f\x00\x60\x00\xb1\x00\xac\x00\xb1\x00\xa3\x01\xa4\x01\xb2\x00\xb3\x00\xb2\x00\xb3\x00\xe3\x00\xb4\x00\x92\x01\xb4\x00\xa5\x01\xad\x00\xaf\x00\xb0\x00\xb5\x00\x93\x01\xb5\x00\xe4\x00\xad\x00\xf8\x00\x20\x01\x1b\xff\xe3\x00\x8f\x00\xfa\x00\xaf\x00\xb0\x00\xaf\x00\xb0\x00\xac\x00\xd1\x01\x08\x01\xad\x00\x06\x02\x19\xff\x33\x02\x18\xff\x3b\x02\x90\x00\xb1\x00\xe4\x00\xaf\x00\xb0\x00\x23\xff\xb2\x00\xb3\x00\x48\x00\xf4\x00\x4e\x02\xb4\x00\x17\xff\x8a\x00\xb1\x00\x4a\x00\xb1\x00\x22\x00\xb5\x00\xb2\x00\xb3\x00\xb2\x00\xb3\x00\x8b\x00\xb4\x00\xad\x00\xb4\x00\x4f\x02\xaf\x00\xb0\x00\xb1\x00\xb5\x00\x51\x00\xb5\x00\x2e\x01\xb2\x00\xb3\x00\x16\xff\xb5\x00\x22\x00\xb4\x00\xaf\x00\xb0\x00\x2f\x01\x21\xff\x0c\x02\x1c\xff\xb5\x00\x46\x01\x47\x01\x0c\x02\x0c\x02\x56\x02\xc3\x00\x51\x00\xb1\x00\xc3\x00\x46\x02\x0d\x02\xdd\x01\xb2\x00\xb3\x00\xa6\x01\x5e\x01\x5f\x01\xb4\x00\x6f\xff\xb0\x00\xb1\x00\x64\x01\x48\x01\x0f\x02\xb5\x00\xb2\x00\xb3\x00\x6f\xff\x6f\xff\x6f\xff\xb4\x00\xa8\x00\x2a\x02\x6f\xff\xa9\x00\x6f\xff\x2c\x02\xb5\x00\x1b\xff\xaf\x00\xb0\x00\xaf\x00\xb0\x00\xc3\x00\x60\x01\x61\x01\x62\x01\x3c\x02\x6f\xff\xc4\x00\xd9\xff\x19\xff\xd8\x00\x18\xff\x6f\xff\x6f\xff\xb2\x01\xda\x00\x95\x01\xdb\x01\x5c\x01\x7a\xff\x6f\xff\x6f\xff\x6d\x00\x6f\xff\xb1\x00\x17\xff\xb1\x00\x6f\x00\x2f\x02\xb2\x00\xb3\x00\xb2\x00\xb3\x00\x98\x00\xb4\x00\x99\x00\xb4\x00\x6f\xff\xe4\x01\x26\x01\x3e\x02\xb5\x00\x6f\xff\xb5\x00\xf5\x01\x19\x00\x1a\x00\x1b\x00\x9a\x00\x00\x02\x16\xff\x6f\xff\x6f\xff\x1c\x00\x70\x00\x1d\x00\x1e\x00\x9b\x00\x1f\x00\x71\x00\x72\x00\x20\x00\x22\x00\xff\xff\x83\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x84\x00\x73\x00\xa2\x00\x5e\x01\x5f\x01\xd8\x00\x2b\x00\xd0\x01\x7a\xff\x6f\xff\x6f\xff\x6f\xff\x2c\x00\x01\x02\x2d\x00\x06\x02\x64\x01\x2e\x00\x65\x01\x07\x02\xb5\x01\xa4\x00\xb6\x01\xaf\x00\xb0\x00\x5b\x01\x5c\x01\x30\x00\x48\x00\x76\x00\x31\x00\xf9\x01\x60\x01\x61\x01\x62\x01\x4a\x00\x07\x01\x08\x01\x73\x00\xa2\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x06\x02\xd8\x00\xb1\x00\x03\x02\x12\x02\xd9\x00\xda\x00\xb2\x00\xb3\x00\x28\x02\xa4\x00\x04\x02\xb4\x00\x48\x00\x19\x02\x3b\x00\x3c\x00\x3d\x00\x76\x00\xb5\x00\x4a\x00\x3e\x00\x3f\x00\x73\x00\xa2\x00\x08\x02\x22\x00\x9d\x00\x85\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x25\x01\x26\x01\x28\x01\x29\x01\x29\x00\x2a\x00\x2b\x00\x29\x02\xa4\x00\x17\x00\xcd\x01\x7d\x01\x2c\x00\x0a\x02\x2d\x00\x0b\x02\x76\x00\x2e\x00\x24\x02\x9e\x00\x05\x01\x19\x00\x1a\x00\x1b\x00\x9f\x00\xa0\x00\x25\x02\x30\x00\xa1\x00\x1c\x00\x31\x00\x1d\x00\x1e\x00\x7e\x01\x1f\x00\x26\x02\xa2\x00\x20\x00\x73\x00\xa2\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x27\x02\xa7\x01\xa8\x01\xa9\x01\xaa\x01\x6b\x00\x7f\x01\xab\x01\xac\x01\xb7\x01\xa4\x00\xad\x01\xae\x01\xbc\x01\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x76\x00\xb8\x01\xb9\x01\x3e\x00\x3f\x00\x40\x00\x22\x00\x6f\x00\x41\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\xba\x01\xdc\x01\xbe\x01\xc0\x01\x29\x00\x2a\x00\x2b\x00\xc1\x01\xc2\x01\x17\x00\xc3\x01\xc9\x00\x2c\x00\xc4\x01\x2d\x00\xc5\x01\xc6\x01\x2e\x00\xc7\x01\x9e\x00\xc9\x01\x19\x00\x1a\x00\x1b\x00\x71\x00\x72\x00\xcc\x01\x30\x00\xde\x01\x1c\x00\x31\x00\x1d\x00\x1e\x00\xe0\x01\x1f\x00\xe5\x01\xe6\x01\x20\x00\x73\x00\xa2\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xed\x01\xef\x01\x39\x01\x4d\x01\x4e\x01\x62\x01\x7c\x01\x52\x01\x53\x01\xc8\x01\xa4\x00\x6a\x01\x76\x01\x77\x01\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x76\x00\x78\x01\x86\x01\x3e\x00\x3f\x00\x40\x00\x22\x00\x7a\x01\x41\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x0a\x01\x82\x01\xd6\x00\x84\x01\x29\x00\x2a\x00\x2b\x00\x88\x01\x8a\x01\x17\x00\x9b\x01\xcd\x00\x2c\x00\x02\x01\x2d\x00\x9c\x01\xa0\x01\x2e\x00\xc8\x00\x2f\x00\xce\x00\x19\x00\x1a\x00\x1b\x00\xaf\x00\xb0\x00\xd1\x00\x30\x00\xd4\x00\x1c\x00\x31\x00\x1d\x00\x1e\x00\xf7\x01\x1f\x00\xf9\x00\xfb\x00\x20\x00\xfc\x00\xbf\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x03\x01\x06\x01\x1b\x01\xb1\x00\x1c\x01\x1f\x01\x80\x01\x20\x01\xb2\x00\xb3\x00\x21\x01\x29\x01\x2c\x01\xb4\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x67\x00\x6d\x00\xb5\x00\x3e\x00\x3f\x00\x40\x00\x22\x00\x85\x00\x41\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x8d\x00\x90\x00\x91\x00\x93\x00\x29\x00\x2a\x00\x2b\x00\xaa\x00\xb5\x00\x17\x00\x04\x00\xd0\x00\x2c\x00\x59\x02\x2d\x00\xbc\x00\xc2\x00\x2e\x00\x46\x02\x2f\x00\x48\x02\x19\x00\x1a\x00\x1b\x00\xaf\x00\xb0\x00\x49\x02\x30\x00\x51\x02\x1c\x00\x31\x00\x1d\x00\x1e\x00\xd5\x01\x1f\x00\xe3\x00\x00\x00\x20\x00\x33\x02\xc1\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x37\x02\x3a\x02\xf5\x01\xb1\x00\x3e\x02\x3b\x02\x81\x01\xf9\x01\xb2\x00\xb3\x00\x44\x02\xf8\x01\xfb\x01\xb4\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\xfc\x01\x06\x02\xb5\x00\x3e\x00\x3f\x00\x40\x00\x22\x00\x0f\x02\x41\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x11\x02\x17\x02\x12\x02\xcc\x01\x29\x00\x2a\x00\x2b\x00\xd8\x00\xb2\x01\x17\x00\x1c\x02\xe5\x00\x2c\x00\x1d\x02\x2d\x00\x1e\x02\x1f\x02\x2e\x00\x20\x02\x2f\x00\xbe\x01\x19\x00\x1a\x00\x1b\x00\xaf\x00\xb0\x00\xc0\x01\x30\x00\xb5\x01\x1c\x00\x31\x00\x1d\x00\x1e\x00\xe3\x00\x1f\x00\xd6\x01\xd7\x01\x20\x00\xd9\x01\x54\xff\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xda\x01\xdb\x01\xe9\x01\xb1\x00\xf2\x01\xf3\x01\xe6\x00\x38\x01\xb2\x00\xb3\x00\x39\x01\x3c\x01\x52\x01\xb4\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3f\x01\x3e\x01\xb5\x00\x3e\x00\x3f\x00\x40\x00\x22\x00\x40\x01\x02\x01\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x49\x01\x41\x01\x4a\x01\x55\x01\x29\x00\x2a\x00\x2b\x00\x56\x01\x57\x01\x17\x00\x50\x01\xe7\x00\x2c\x00\x58\x01\x2d\x00\x5b\x01\x64\x01\x2e\x00\x67\x01\x2f\x00\x87\x00\x19\x00\x1a\x00\x1b\x00\x6d\x01\x6c\x01\x74\x01\x30\x00\x6e\x01\x1c\x00\x31\x00\x1d\x00\x1e\x00\x7c\x01\x1f\x00\x8c\x01\x90\x01\x20\x00\x94\x01\x96\x01\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x71\x01\x97\x01\x98\x01\x00\x00\x9a\x01\xc6\x00\xe8\x00\xd0\x00\xd3\x00\xaf\x00\xb0\x00\xd6\x00\xd8\x00\xcb\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\xcc\xff\x00\x00\xeb\x00\x3e\x00\x3f\x00\x40\x00\x22\x00\xd8\x00\x41\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x32\x01\x06\x01\xd8\x00\xb1\x00\x29\x00\x2a\x00\x2b\x00\x0f\x01\xb2\x00\xb3\x00\x16\x01\x25\x01\x2c\x00\xb4\x00\x2d\x00\x31\x01\x35\x01\x2e\x00\x61\x00\x2f\x00\xb5\x00\x36\x01\xaf\x00\xb0\x00\xee\x00\xb0\x00\x64\x00\x30\x00\x62\x00\x65\x00\x31\x00\x67\x00\x69\x00\x6a\x00\x66\x00\x6b\x00\x88\x00\x51\x01\x6d\x00\xef\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x7c\x00\xb1\x00\x7d\x00\xf0\x00\x7e\x00\x7f\x00\xb2\x00\xb3\x00\xf1\x00\xf2\x00\x52\x01\xb4\x00\xf3\x00\xb4\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\xb5\x00\x87\x00\xf4\x00\x3e\x00\x3f\x00\x40\x00\x22\x00\xac\x00\x02\x01\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x29\x00\x2a\x00\x2b\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x2c\x00\x00\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x2f\x00\x00\x00\x6d\x00\xaf\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x30\x00\x00\x00\x00\x00\x31\x00\x00\x00\xdb\x00\xa2\x00\x00\x00\x00\x00\xdc\x00\xda\x00\x00\x00\x91\xff\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x00\x00\xb1\x00\x00\x00\xdd\x00\xa4\x00\xde\x00\xb2\x00\xb3\x00\x00\x00\xaf\x00\xb0\x00\xb4\x00\x76\x00\x00\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\xb5\x00\x00\x00\x00\x00\x3e\x00\x3f\x00\x40\x00\x22\x00\xd3\x01\x41\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x29\x00\x2a\x00\x2b\x00\x00\x00\xb2\x00\xb3\x00\x00\x00\x00\x00\x2c\x00\xb4\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x2f\x00\xb5\x00\x00\x00\xaf\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x30\x00\x00\x00\x00\x00\x31\x00\x00\x00\x73\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x01\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x00\x00\xb1\x00\x00\x00\xd7\x01\xa4\x00\x00\x00\xb2\x00\xb3\x00\x00\x00\xaf\x00\xb0\x00\xb4\x00\x76\x00\x00\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\xb5\x00\x00\x00\x00\x00\x3e\x00\x3f\x00\x40\x00\x22\x00\xe2\x01\x02\x01\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x29\x00\x2a\x00\x2b\x00\x00\x00\xb2\x00\xb3\x00\x00\x00\x00\x00\x2c\x00\xb4\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x2f\x00\xb5\x00\x00\x00\xaf\x00\xb0\x00\xaf\x00\xb0\x00\x00\x00\x30\x00\x00\x00\x00\x00\x31\x00\xe3\x01\x00\x00\xe4\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x00\x00\xb1\x00\x00\x00\xb1\x00\x00\x00\x00\x00\xb2\x00\xb3\x00\xb2\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb4\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\xb5\x00\x00\x00\xb5\x00\x3e\x00\x3f\x00\x40\x00\x22\x00\x00\x00\x41\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x6d\x00\x5a\x02\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x73\x00\xa2\x00\x17\x00\x2c\x00\x1d\x01\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x30\x00\x8c\x01\xa4\x00\x31\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1e\x01\x1f\x00\x76\x00\x00\x00\x20\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xaf\x00\xb0\x00\x00\x00\x22\x00\x00\x00\x00\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x00\x00\x52\x02\x00\x00\x3b\x00\x3c\x00\x3d\x00\x2b\x00\x00\x00\x00\x00\x3e\x00\x3f\x00\xf7\x00\x2c\x00\x00\x00\x2d\x00\xb1\x00\x00\x00\x2e\x00\x00\x00\x00\x00\xb2\x00\xb3\x00\x00\x00\x00\x00\xf8\x00\xb4\x00\x00\x00\x30\x00\x00\x00\x00\x00\x31\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xaf\x00\xb0\x00\x00\x00\x22\x00\x00\x00\x00\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x00\x00\x4d\x02\x00\x00\x3b\x00\x3c\x00\x3d\x00\x2b\x00\x00\x00\x00\x00\x3e\x00\x3f\x00\xcb\x01\x2c\x00\x00\x00\x2d\x00\xb1\x00\x00\x00\x2e\x00\x00\x00\x00\x00\xb2\x00\xb3\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x30\x00\x00\x00\x00\x00\x31\x00\x00\x00\xb5\x00\x73\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xaf\x00\xb0\x00\x00\x00\x22\x00\x8d\x01\xa4\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x00\x02\x76\x00\x00\x00\x3b\x00\x3c\x00\x3d\x00\x2b\x00\x00\x00\x00\x00\x3e\x00\x3f\x00\x00\x00\x2c\x00\x00\x00\x2d\x00\xb1\x00\x00\x00\x2e\x00\x00\x00\x00\x00\xb2\x00\xb3\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x30\x00\x00\x00\x00\x00\x31\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x00\x00\x00\x00\x00\x00\x22\x00\x00\x00\x83\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x73\x00\xa2\x00\x00\x00\x3b\x00\x3c\x00\x3d\x00\x2b\x00\x00\x00\x0f\x01\x3e\x00\x3f\x00\xfd\x00\x2c\x00\xfe\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x35\x02\x11\x01\xa4\x00\x00\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x30\x00\x76\x00\x00\x00\x31\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x53\x02\x00\x01\x20\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x00\x00\x00\x00\x00\x00\x22\x00\x00\x00\x17\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x00\x00\x18\x02\x00\x00\x3b\x00\x3c\x00\x3d\x00\x2b\x00\x1b\x00\x00\x00\x3e\x00\x3f\x00\x00\x00\x2c\x00\x1c\x00\x2d\x00\xfc\x01\x1e\x00\x2e\x00\x1f\x00\x00\x00\x00\x00\x20\x00\xfd\x01\x00\x00\x00\x00\x00\x00\x00\x00\x30\x00\x00\x00\x00\x00\x31\x00\x00\x00\x00\x00\xfe\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x00\x00\x00\x00\x00\x00\x22\x00\x00\x00\x00\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x73\x00\xa2\x00\x00\x00\x3b\x00\x3c\x00\x3d\x00\x2b\x00\x21\x02\x0f\x01\x3e\x00\x3f\x00\xfd\x00\x2c\x00\xfe\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x3f\x02\x11\x01\xa4\x00\x00\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x30\x00\x76\x00\x00\x00\x31\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x72\x01\x00\x01\x20\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x00\x00\x00\x00\x00\x00\x22\x00\x00\x00\x00\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x73\x00\xa2\x00\x00\x00\x3b\x00\x3c\x00\x3d\x00\x2b\x00\x22\x02\x0f\x01\x3e\x00\x3f\x00\xfd\x00\x2c\x00\xfe\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\xb0\x01\x11\x01\xa4\x00\x00\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x30\x00\x76\x00\x00\x00\x31\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\xff\x00\x00\x01\x20\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x00\x00\x00\x00\x00\x00\x22\x00\x00\x00\x00\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x73\x00\xa2\x00\x00\x00\x3b\x00\x3c\x00\x3d\x00\x2b\x00\x23\x02\x0f\x01\x3e\x00\x3f\x00\x17\x00\x2c\x00\x7d\x01\x2d\x00\x00\x00\x00\x00\x2e\x00\xb0\x01\xb3\x01\xa4\x00\x00\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x30\x00\x76\x00\x00\x00\x31\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x7e\x01\x1f\x00\x00\x00\x00\x00\x20\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x00\x00\x00\x00\x00\x00\x22\x00\x00\x00\x00\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x73\x00\xa2\x00\x00\x00\x3b\x00\x3c\x00\x3d\x00\x2b\x00\x24\x02\x0f\x01\x3e\x00\x3f\x00\x17\x00\x2c\x00\x2e\x02\x2d\x00\x00\x00\x00\x00\x2e\x00\xe7\x01\x11\x01\xa4\x00\x00\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x30\x00\x76\x00\x00\x00\x31\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x00\x00\x00\x00\x00\x00\x22\x00\x00\x00\x83\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x73\x00\xa2\x00\x00\x00\x3b\x00\x3c\x00\x3d\x00\x2b\x00\x00\x00\x0f\x01\x3e\x00\x3f\x00\x17\x00\x2c\x00\x14\x02\x2d\x00\x00\x00\x00\x00\x2e\x00\xee\x01\x11\x01\xa4\x00\x00\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x30\x00\x76\x00\x00\x00\x31\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x00\x00\x00\x00\x00\x00\x22\x00\x00\x00\x17\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x73\x00\xa2\x00\x00\x00\x3b\x00\x3c\x00\x3d\x00\x2b\x00\x1b\x00\x00\x00\x3e\x00\x3f\x00\x17\x00\x2c\x00\x1c\x00\x2d\x00\xfc\x01\x1e\x00\x2e\x00\x1f\x00\x98\x01\xa4\x00\x20\x00\x40\x02\x00\x00\x00\x00\x1b\x00\x00\x00\x30\x00\x76\x00\x00\x00\x31\x00\x1c\x00\x00\x00\x9d\x01\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x00\x00\x00\x00\x00\x00\x22\x00\x00\x00\x17\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x73\x00\xa2\x00\x00\x00\x3b\x00\x3c\x00\x3d\x00\x2b\x00\x1b\x00\x00\x00\x3e\x00\x3f\x00\x00\x00\x2c\x00\x1c\x00\x2d\x00\x9d\x01\x1e\x00\x2e\x00\x1f\x00\xa3\x00\xa4\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x30\x00\x76\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3b\x00\x3c\x00\x3d\x00\x00\x00\x00\x00\x00\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\x22\x00\x6f\x00\x00\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\xa7\x00\x00\x00\x00\x00\x00\x00\xf6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\x00\x00\x70\x00\x00\x00\xb2\x00\xb3\x00\x00\x00\x71\x00\x72\x00\xb4\x00\x79\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb5\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\x00\x00\x00\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xa8\x00\x00\x00\x00\x00\x8f\x01\x22\x00\x00\x00\x13\x01\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x7a\x00\x7b\x00\xa6\x00\xa7\x00\xb2\x00\xb3\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x22\x00\x00\x00\xb5\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x00\x00\x00\x00\x79\x00\x00\x00\x09\x02\x00\x00\xa6\x00\xa7\x00\x00\x00\x00\x00\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xa8\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x79\x00\x00\x00\x1c\x00\x00\x00\x80\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x7a\x00\x7b\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xa8\x00\x00\x00\x00\x00\x22\x00\x00\x00\x00\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x3a\x01\x42\x00\x43\x00\x44\x00\x00\x00\x7a\x00\x7b\x00\x78\x00\x00\x00\x00\x00\x45\x00\x17\x00\x00\x00\x46\x00\x47\x00\x2d\x00\x48\x00\x00\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x00\x00\x1b\x00\x00\x00\x00\x00\x79\x00\x00\x00\x00\x00\x1c\x00\x00\x00\xbb\x01\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x00\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x17\x01\x42\x00\x43\x00\x44\x00\x00\x00\x00\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x45\x00\x00\x00\x00\x00\x46\x00\x47\x00\x00\x00\x48\x00\x00\x00\x49\x00\x18\x01\x42\x00\x43\x00\x44\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x45\x00\x00\x00\x00\x00\x46\x00\x47\x00\x00\x00\x48\x00\x00\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x19\x01\x42\x00\x43\x00\x44\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x45\x00\x00\x00\x00\x00\x46\x00\x47\x00\x00\x00\x48\x00\x00\x00\x49\x00\x1a\x01\x42\x00\x43\x00\x44\x00\x4a\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x45\x00\x00\x00\x00\x00\x46\x00\x47\x00\x00\x00\x48\x00\x00\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x88\x00\x42\x00\x43\x00\x44\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x45\x00\x00\x00\x00\x00\x46\x00\x47\x00\x00\x00\x48\x00\x00\x00\x49\x00\x89\x00\x42\x00\x43\x00\x44\x00\x4a\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x45\x00\x00\x00\x00\x00\x46\x00\x47\x00\x00\x00\x48\x00\x00\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x42\x00\x43\x00\x44\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x45\x00\x00\x00\x00\x00\x46\x00\x47\x00\x59\x01\x48\x00\x00\x00\x49\x00\x00\x00\x00\x00\x17\x00\x00\x00\x4a\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\x00\x00\x00\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf4\x01\x1c\x00\x00\x00\x80\x00\x1e\x00\x16\x01\x1f\x00\x00\x00\x00\x00\x20\x00\x00\x00\x17\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\xb3\x00\x1b\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x17\x00\x1c\x00\x18\x02\x80\x00\x1e\x00\xb5\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xce\x01\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xd0\x01\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xf0\x01\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x36\x01\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x4a\x01\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x4b\x01\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x4c\x01\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x58\x01\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x67\x01\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x68\x01\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x69\x01\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x6e\x01\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x6f\x01\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x79\x01\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xcb\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xcc\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x9a\x01\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x9f\x01\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xc6\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xc7\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xc9\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xca\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xcb\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xcc\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xcd\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xd0\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xdf\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x94\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xe9\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xeb\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x62\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x8c\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x92\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x94\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x96\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x97\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xb6\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xb7\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xb8\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xb9\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xba\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xbb\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xbd\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xbf\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xc1\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x18\x00\x1c\x00\x17\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x17\x00\x00\x00\x1b\x00\x00\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1c\x00\x1f\x00\x9d\x01\x1e\x00\x20\x00\x1f\x00\x1b\x00\x17\x00\x20\x00\x00\x00\x00\x00\x00\x00\x1c\x00\x00\x00\x9d\x01\x1e\x00\x00\x00\x1f\x00\x73\x00\xa2\x00\x20\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x17\x00\x0f\x01\x1c\x00\x00\x00\xd3\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x10\x01\x11\x01\xa4\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1c\x00\x76\x00\x95\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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 (3, 241) [+	(3 , happyReduce_3),+	(4 , happyReduce_4),+	(5 , happyReduce_5),+	(6 , happyReduce_6),+	(7 , happyReduce_7),+	(8 , happyReduce_8),+	(9 , happyReduce_9),+	(10 , happyReduce_10),+	(11 , happyReduce_11),+	(12 , happyReduce_12),+	(13 , happyReduce_13),+	(14 , happyReduce_14),+	(15 , happyReduce_15),+	(16 , happyReduce_16),+	(17 , happyReduce_17),+	(18 , happyReduce_18),+	(19 , happyReduce_19),+	(20 , happyReduce_20),+	(21 , happyReduce_21),+	(22 , happyReduce_22),+	(23 , happyReduce_23),+	(24 , happyReduce_24),+	(25 , happyReduce_25),+	(26 , happyReduce_26),+	(27 , happyReduce_27),+	(28 , happyReduce_28),+	(29 , happyReduce_29),+	(30 , happyReduce_30),+	(31 , happyReduce_31),+	(32 , happyReduce_32),+	(33 , happyReduce_33),+	(34 , happyReduce_34),+	(35 , happyReduce_35),+	(36 , happyReduce_36),+	(37 , happyReduce_37),+	(38 , happyReduce_38),+	(39 , happyReduce_39),+	(40 , happyReduce_40),+	(41 , happyReduce_41),+	(42 , happyReduce_42),+	(43 , happyReduce_43),+	(44 , happyReduce_44),+	(45 , happyReduce_45),+	(46 , happyReduce_46),+	(47 , happyReduce_47),+	(48 , happyReduce_48),+	(49 , happyReduce_49),+	(50 , happyReduce_50),+	(51 , happyReduce_51),+	(52 , happyReduce_52),+	(53 , happyReduce_53),+	(54 , happyReduce_54),+	(55 , happyReduce_55),+	(56 , happyReduce_56),+	(57 , happyReduce_57),+	(58 , happyReduce_58),+	(59 , happyReduce_59),+	(60 , happyReduce_60),+	(61 , happyReduce_61),+	(62 , happyReduce_62),+	(63 , happyReduce_63),+	(64 , happyReduce_64),+	(65 , happyReduce_65),+	(66 , happyReduce_66),+	(67 , happyReduce_67),+	(68 , happyReduce_68),+	(69 , happyReduce_69),+	(70 , happyReduce_70),+	(71 , happyReduce_71),+	(72 , happyReduce_72),+	(73 , happyReduce_73),+	(74 , happyReduce_74),+	(75 , happyReduce_75),+	(76 , happyReduce_76),+	(77 , happyReduce_77),+	(78 , happyReduce_78),+	(79 , happyReduce_79),+	(80 , happyReduce_80),+	(81 , happyReduce_81),+	(82 , happyReduce_82),+	(83 , happyReduce_83),+	(84 , happyReduce_84),+	(85 , happyReduce_85),+	(86 , happyReduce_86),+	(87 , happyReduce_87),+	(88 , happyReduce_88),+	(89 , happyReduce_89),+	(90 , happyReduce_90),+	(91 , happyReduce_91),+	(92 , happyReduce_92),+	(93 , happyReduce_93),+	(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),+	(109 , happyReduce_109),+	(110 , happyReduce_110),+	(111 , happyReduce_111),+	(112 , happyReduce_112),+	(113 , happyReduce_113),+	(114 , happyReduce_114),+	(115 , happyReduce_115),+	(116 , happyReduce_116),+	(117 , happyReduce_117),+	(118 , happyReduce_118),+	(119 , happyReduce_119),+	(120 , happyReduce_120),+	(121 , happyReduce_121),+	(122 , happyReduce_122),+	(123 , happyReduce_123),+	(124 , happyReduce_124),+	(125 , happyReduce_125),+	(126 , happyReduce_126),+	(127 , happyReduce_127),+	(128 , happyReduce_128),+	(129 , happyReduce_129),+	(130 , happyReduce_130),+	(131 , happyReduce_131),+	(132 , happyReduce_132),+	(133 , happyReduce_133),+	(134 , happyReduce_134),+	(135 , happyReduce_135),+	(136 , happyReduce_136),+	(137 , happyReduce_137),+	(138 , happyReduce_138),+	(139 , happyReduce_139),+	(140 , happyReduce_140),+	(141 , happyReduce_141),+	(142 , happyReduce_142),+	(143 , happyReduce_143),+	(144 , happyReduce_144),+	(145 , happyReduce_145),+	(146 , happyReduce_146),+	(147 , happyReduce_147),+	(148 , happyReduce_148),+	(149 , happyReduce_149),+	(150 , happyReduce_150),+	(151 , happyReduce_151),+	(152 , happyReduce_152),+	(153 , happyReduce_153),+	(154 , happyReduce_154),+	(155 , happyReduce_155),+	(156 , happyReduce_156),+	(157 , happyReduce_157),+	(158 , happyReduce_158),+	(159 , happyReduce_159),+	(160 , happyReduce_160),+	(161 , happyReduce_161),+	(162 , happyReduce_162),+	(163 , happyReduce_163),+	(164 , happyReduce_164),+	(165 , happyReduce_165),+	(166 , happyReduce_166),+	(167 , happyReduce_167),+	(168 , happyReduce_168),+	(169 , happyReduce_169),+	(170 , happyReduce_170),+	(171 , happyReduce_171),+	(172 , happyReduce_172),+	(173 , happyReduce_173),+	(174 , happyReduce_174),+	(175 , happyReduce_175),+	(176 , happyReduce_176),+	(177 , happyReduce_177),+	(178 , happyReduce_178),+	(179 , happyReduce_179),+	(180 , happyReduce_180),+	(181 , happyReduce_181),+	(182 , happyReduce_182),+	(183 , happyReduce_183),+	(184 , happyReduce_184),+	(185 , happyReduce_185),+	(186 , happyReduce_186),+	(187 , happyReduce_187),+	(188 , happyReduce_188),+	(189 , happyReduce_189),+	(190 , happyReduce_190),+	(191 , happyReduce_191),+	(192 , happyReduce_192),+	(193 , happyReduce_193),+	(194 , happyReduce_194),+	(195 , happyReduce_195),+	(196 , happyReduce_196),+	(197 , happyReduce_197),+	(198 , happyReduce_198),+	(199 , happyReduce_199),+	(200 , happyReduce_200),+	(201 , happyReduce_201),+	(202 , happyReduce_202),+	(203 , happyReduce_203),+	(204 , happyReduce_204),+	(205 , happyReduce_205),+	(206 , happyReduce_206),+	(207 , happyReduce_207),+	(208 , happyReduce_208),+	(209 , happyReduce_209),+	(210 , happyReduce_210),+	(211 , happyReduce_211),+	(212 , happyReduce_212),+	(213 , happyReduce_213),+	(214 , happyReduce_214),+	(215 , happyReduce_215),+	(216 , happyReduce_216),+	(217 , happyReduce_217),+	(218 , happyReduce_218),+	(219 , happyReduce_219),+	(220 , happyReduce_220),+	(221 , happyReduce_221),+	(222 , happyReduce_222),+	(223 , happyReduce_223),+	(224 , happyReduce_224),+	(225 , happyReduce_225),+	(226 , happyReduce_226),+	(227 , happyReduce_227),+	(228 , happyReduce_228),+	(229 , happyReduce_229),+	(230 , happyReduce_230),+	(231 , happyReduce_231),+	(232 , happyReduce_232),+	(233 , happyReduce_233),+	(234 , happyReduce_234),+	(235 , happyReduce_235),+	(236 , happyReduce_236),+	(237 , happyReduce_237),+	(238 , happyReduce_238),+	(239 , happyReduce_239),+	(240 , happyReduce_240),+	(241 , happyReduce_241)+	]++happy_n_terms = 115 :: Int+happy_n_nonterms = 70 :: Int++happyReduce_3 = happySpecReduce_0  0# happyReduction_3+happyReduction_3  =  happyIn6+		 ([]+	)++happyReduce_4 = happySpecReduce_2  0# happyReduction_4+happyReduction_4 happy_x_2+	happy_x_1+	 =  case happyOut7 happy_x_1 of { happy_var_1 -> +	case happyOut6 happy_x_2 of { happy_var_2 -> +	happyIn6+		 (happy_var_1:happy_var_2+	)}}++happyReduce_5 = happySpecReduce_2  0# happyReduction_5+happyReduction_5 happy_x_2+	happy_x_1+	 =  case happyOut16 happy_x_1 of { happy_var_1 -> +	case happyOut6 happy_x_2 of { happy_var_2 -> +	happyIn6+		 (map RealDecl happy_var_1 ++ happy_var_2+	)}}++happyReduce_6 = happyReduce 4# 0# happyReduction_6+happyReduction_6 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOutTok happy_x_2 of { (TokenString happy_var_2) -> +	case happyOut6 happy_x_4 of { happy_var_4 -> +	happyIn6+		 (RealDecl (PInclude happy_var_2) : happy_var_4+	) `HappyStk` happyRest}}++happyReduce_7 = happySpecReduce_1  1# happyReduction_7+happyReduction_7 happy_x_1+	 =  case happyOut9 happy_x_1 of { happy_var_1 -> +	happyIn7+		 (happy_var_1+	)}++happyReduce_8 = happySpecReduce_1  1# happyReduction_8+happyReduction_8 happy_x_1+	 =  case happyOut24 happy_x_1 of { happy_var_1 -> +	happyIn7+		 (RealDecl (DataDecl happy_var_1)+	)}++happyReduce_9 = happySpecReduce_1  1# happyReduction_9+happyReduction_9 happy_x_1+	 =  case happyOut20 happy_x_1 of { happy_var_1 -> +	happyIn7+		 (RealDecl happy_var_1+	)}++happyReduce_10 = happySpecReduce_3  1# happyReduction_10+happyReduction_10 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_2 of { (TokenName happy_var_2) -> +	happyIn7+		 (RealDecl (Freeze happy_var_2)+	)}++happyReduce_11 = happyReduce 4# 1# happyReduction_11+happyReduction_11 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut60 happy_x_1 of { happy_var_1 -> +	case happyOut6 happy_x_3 of { happy_var_3 -> +	happyIn7+		 (PUsing happy_var_1 happy_var_3+	) `HappyStk` happyRest}}++happyReduce_12 = happyReduce 4# 1# happyReduction_12+happyReduction_12 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut61 happy_x_1 of { happy_var_1 -> +	case happyOut6 happy_x_3 of { happy_var_3 -> +	happyIn7+		 (PDoUsing happy_var_1 happy_var_3+	) `HappyStk` happyRest}}++happyReduce_13 = happyReduce 4# 1# happyReduction_13+happyReduction_13 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut62 happy_x_1 of { happy_var_1 -> +	case happyOut6 happy_x_3 of { happy_var_3 -> +	happyIn7+		 (PIdiom happy_var_1 happy_var_3+	) `HappyStk` happyRest}}++happyReduce_14 = happyReduce 4# 1# happyReduction_14+happyReduction_14 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut63 happy_x_1 of { happy_var_1 -> +	case happyOut6 happy_x_3 of { happy_var_3 -> +	happyIn7+		 (PParams happy_var_1 happy_var_3+	) `HappyStk` happyRest}}++happyReduce_15 = happySpecReduce_1  1# happyReduction_15+happyReduction_15 happy_x_1+	 =  case happyOut8 happy_x_1 of { happy_var_1 -> +	happyIn7+		 (RealDecl happy_var_1+	)}++happyReduce_16 = happyReduce 6# 1# happyReduction_16+happyReduction_16 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut29 happy_x_2 of { happy_var_2 -> +	case happyOut38 happy_x_3 of { happy_var_3 -> +	case happyOut31 happy_x_5 of { happy_var_5 -> +	happyIn7+		 (PSyntax happy_var_2 happy_var_3 happy_var_5+	) `HappyStk` happyRest}}}++happyReduce_17 = happySpecReduce_2  1# happyReduction_17+happyReduction_17 happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_2 of { (TokenString happy_var_2) -> +	happyIn7+		 (RealDecl (CInclude happy_var_2)+	)}++happyReduce_18 = happySpecReduce_2  1# happyReduction_18+happyReduction_18 happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_2 of { (TokenString happy_var_2) -> +	happyIn7+		 (RealDecl (CLib happy_var_2)+	)}++happyReduce_19 = happyReduce 5# 2# happyReduction_19+happyReduction_19 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_2 of { happy_var_2 -> +	case happyOut31 happy_x_4 of { happy_var_4 -> +	happyIn8+		 (Transform happy_var_2 happy_var_4+	) `HappyStk` happyRest}}++happyReduce_20 = happyReduce 7# 3# happyReduction_20+happyReduction_20 (happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut47 happy_x_3 of { happy_var_3 -> +	case happyOut14 happy_x_4 of { happy_var_4 -> +	case happyOut74 happy_x_5 of { happy_var_5 -> +	case happyOut73 happy_x_6 of { happy_var_6 -> +	happyIn9+		 (FunType happy_var_1 happy_var_3 (nub happy_var_4) happy_var_5 happy_var_6+	) `HappyStk` happyRest}}}}}++happyReduce_21 = happySpecReduce_3  3# happyReduction_21+happyReduction_21 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut71 happy_x_2 of { happy_var_2 -> +	happyIn9+		 (ProofScript happy_var_1 happy_var_2+	)}}++happyReduce_22 = happyReduce 9# 3# happyReduction_22+happyReduction_22 (happy_x_9 `HappyStk`+	happy_x_8 `HappyStk`+	happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut22 happy_x_1 of { happy_var_1 -> +	case happyOut11 happy_x_2 of { happy_var_2 -> +	case happyOut10 happy_x_3 of { happy_var_3 -> +	case happyOut31 happy_x_4 of { happy_var_4 -> +	case happyOut13 happy_x_6 of { happy_var_6 -> +	case happyOut74 happy_x_8 of { happy_var_8 -> +	case happyOut73 happy_x_9 of { happy_var_9 -> +	happyIn9+		 (WithClause (mkDef happy_var_8 happy_var_9 happy_var_1) happy_var_2 happy_var_3 happy_var_4 happy_var_6+	) `HappyStk` happyRest}}}}}}}++happyReduce_23 = happyReduce 10# 3# happyReduction_23+happyReduction_23 (happy_x_10 `HappyStk`+	happy_x_9 `HappyStk`+	happy_x_8 `HappyStk`+	happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut22 happy_x_1 of { happy_var_1 -> +	case happyOut11 happy_x_2 of { happy_var_2 -> +	case happyOut31 happy_x_4 of { happy_var_4 -> +	case happyOut29 happy_x_7 of { happy_var_7 -> +	case happyOut74 happy_x_9 of { happy_var_9 -> +	case happyOut73 happy_x_10 of { happy_var_10 -> +	happyIn9+		 (FunClauseP (mkDef happy_var_9 happy_var_10 happy_var_1) happy_var_2 happy_var_4 happy_var_7+	) `HappyStk` happyRest}}}}}}++happyReduce_24 = happyReduce 8# 3# happyReduction_24+happyReduction_24 (happy_x_8 `HappyStk`+	happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut22 happy_x_1 of { happy_var_1 -> +	case happyOut11 happy_x_2 of { happy_var_2 -> +	case happyOut31 happy_x_4 of { happy_var_4 -> +	case happyOut14 happy_x_5 of { happy_var_5 -> +	case happyOut74 happy_x_7 of { happy_var_7 -> +	case happyOut73 happy_x_8 of { happy_var_8 -> +	happyIn9+		 (FunClause (mkDef happy_var_7 happy_var_8 happy_var_1) happy_var_2 happy_var_4 (nub happy_var_5)+	) `HappyStk` happyRest}}}}}}++happyReduce_25 = happyReduce 5# 3# happyReduction_25+happyReduction_25 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut12 happy_x_2 of { happy_var_2 -> +	case happyOut31 happy_x_4 of { happy_var_4 -> +	happyIn9+		 (FunClause RPlaceholder [happy_var_2] happy_var_4 []+	) `HappyStk` happyRest}}++happyReduce_26 = happyReduce 8# 3# happyReduction_26+happyReduction_26 (happy_x_8 `HappyStk`+	happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut12 happy_x_2 of { happy_var_2 -> +	case happyOut31 happy_x_4 of { happy_var_4 -> +	case happyOut29 happy_x_7 of { happy_var_7 -> +	happyIn9+		 (FunClauseP RPlaceholder [happy_var_2] happy_var_4 happy_var_7+	) `HappyStk` happyRest}}}++happyReduce_27 = happyReduce 7# 3# happyReduction_27+happyReduction_27 (happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut12 happy_x_2 of { happy_var_2 -> +	case happyOut10 happy_x_3 of { happy_var_3 -> +	case happyOut31 happy_x_4 of { happy_var_4 -> +	case happyOut13 happy_x_6 of { happy_var_6 -> +	happyIn9+		 (WithClause RPlaceholder [happy_var_2] happy_var_3 happy_var_4 happy_var_6+	) `HappyStk` happyRest}}}}++happyReduce_28 = happySpecReduce_1  4# happyReduction_28+happyReduction_28 happy_x_1+	 =  happyIn10+		 (False+	)++happyReduce_29 = happySpecReduce_2  4# happyReduction_29+happyReduction_29 happy_x_2+	happy_x_1+	 =  happyIn10+		 (True+	)++happyReduce_30 = happySpecReduce_3  5# happyReduction_30+happyReduction_30 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut12 happy_x_2 of { happy_var_2 -> +	case happyOut11 happy_x_3 of { happy_var_3 -> +	happyIn11+		 (happy_var_2:happy_var_3+	)}}++happyReduce_31 = happySpecReduce_0  5# happyReduction_31+happyReduction_31  =  happyIn11+		 ([]+	)++happyReduce_32 = happySpecReduce_1  6# happyReduction_32+happyReduction_32 happy_x_1+	 =  case happyOut30 happy_x_1 of { happy_var_1 -> +	happyIn12+		 (happy_var_1+	)}++happyReduce_33 = happySpecReduce_1  6# happyReduction_33+happyReduction_33 happy_x_1+	 =  case happyOut52 happy_x_1 of { happy_var_1 -> +	happyIn12+		 (happy_var_1+	)}++happyReduce_34 = happySpecReduce_3  6# happyReduction_34+happyReduction_34 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_2 of { happy_var_2 -> +	happyIn12+		 (happy_var_2+	)}++happyReduce_35 = happyReduce 5# 6# happyReduction_35+happyReduction_35 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut53 happy_x_2 of { happy_var_2 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn12+		 (pairDesugar happy_var_4 happy_var_5 (RVar happy_var_4 happy_var_5 (UN "mkPair")) happy_var_2+	) `HappyStk` happyRest}}}++happyReduce_36 = happySpecReduce_2  7# happyReduction_36+happyReduction_36 happy_x_2+	happy_x_1+	 =  case happyOut9 happy_x_1 of { happy_var_1 -> +	case happyOut13 happy_x_2 of { happy_var_2 -> +	happyIn13+		 (happy_var_1:happy_var_2+	)}}++happyReduce_37 = happySpecReduce_1  7# happyReduction_37+happyReduction_37 happy_x_1+	 =  case happyOut9 happy_x_1 of { happy_var_1 -> +	happyIn13+		 ([happy_var_1]+	)}++happyReduce_38 = happySpecReduce_0  8# happyReduction_38+happyReduction_38  =  happyIn14+		 ([]+	)++happyReduce_39 = happySpecReduce_2  8# happyReduction_39+happyReduction_39 happy_x_2+	happy_x_1+	 =  case happyOut15 happy_x_1 of { happy_var_1 -> +	case happyOut14 happy_x_2 of { happy_var_2 -> +	happyIn14+		 (happy_var_1 ++ happy_var_2+	)}}++happyReduce_40 = happySpecReduce_1  9# happyReduction_40+happyReduction_40 happy_x_1+	 =  happyIn15+		 ([NoCG]+	)++happyReduce_41 = happySpecReduce_1  9# happyReduction_41+happyReduction_41 happy_x_1+	 =  happyIn15+		 ([CGEval, Inline]+	)++happyReduce_42 = happyReduce 4# 9# happyReduction_42+happyReduction_42 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut36 happy_x_3 of { happy_var_3 -> +	happyIn15+		 ([CGSpec happy_var_3]+	) `HappyStk` happyRest}++happyReduce_43 = happySpecReduce_1  9# happyReduction_43+happyReduction_43 happy_x_1+	 =  happyIn15+		 ([CGSpec []]+	)++happyReduce_44 = happySpecReduce_1  9# happyReduction_44+happyReduction_44 happy_x_1+	 =  happyIn15+		 ([Inline]+	)++happyReduce_45 = happySpecReduce_2  9# happyReduction_45+happyReduction_45 happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_2 of { (TokenString happy_var_2) -> +	happyIn15+		 ([CExport happy_var_2]+	)}++happyReduce_46 = happyReduce 4# 10# happyReduction_46+happyReduction_46 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut19 happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { (TokenInt happy_var_2) -> +	case happyOut17 happy_x_3 of { happy_var_3 -> +	happyIn16+		 (map (\x -> Fixity x happy_var_1 happy_var_2) happy_var_3+	) `HappyStk` happyRest}}}++happyReduce_47 = happySpecReduce_1  11# happyReduction_47+happyReduction_47 happy_x_1+	 =  case happyOut18 happy_x_1 of { happy_var_1 -> +	happyIn17+		 ([happy_var_1]+	)}++happyReduce_48 = happySpecReduce_3  11# happyReduction_48+happyReduction_48 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut18 happy_x_1 of { happy_var_1 -> +	case happyOut17 happy_x_3 of { happy_var_3 -> +	happyIn17+		 (happy_var_1:happy_var_3+	)}}++happyReduce_49 = happySpecReduce_1  12# happyReduction_49+happyReduction_49 happy_x_1+	 =  case happyOutTok happy_x_1 of { (TokenInfixName happy_var_1) -> +	happyIn18+		 (happy_var_1+	)}++happyReduce_50 = happySpecReduce_1  12# happyReduction_50+happyReduction_50 happy_x_1+	 =  happyIn18+		 ("-"+	)++happyReduce_51 = happySpecReduce_1  12# happyReduction_51+happyReduction_51 happy_x_1+	 =  happyIn18+		 ("<"+	)++happyReduce_52 = happySpecReduce_1  12# happyReduction_52+happyReduction_52 happy_x_1+	 =  happyIn18+		 (">"+	)++happyReduce_53 = happySpecReduce_1  13# happyReduction_53+happyReduction_53 happy_x_1+	 =  happyIn19+		 (LeftAssoc+	)++happyReduce_54 = happySpecReduce_1  13# happyReduction_54+happyReduction_54 happy_x_1+	 =  happyIn19+		 (RightAssoc+	)++happyReduce_55 = happySpecReduce_1  13# happyReduction_55+happyReduction_55 happy_x_1+	 =  happyIn19+		 (NonAssoc+	)++happyReduce_56 = happyReduce 4# 14# happyReduction_56+happyReduction_56 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut21 happy_x_3 of { happy_var_3 -> +	happyIn20+		 (LatexDefs happy_var_3+	) `HappyStk` happyRest}++happyReduce_57 = happySpecReduce_3  15# happyReduction_57+happyReduction_57 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_3 of { (TokenString happy_var_3) -> +	happyIn21+		 ([(happy_var_1,happy_var_3)]+	)}}++happyReduce_58 = happyReduce 5# 15# happyReduction_58+happyReduction_58 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_3 of { (TokenString happy_var_3) -> +	case happyOut21 happy_x_5 of { happy_var_5 -> +	happyIn21+		 ((happy_var_1,happy_var_3):happy_var_5+	) `HappyStk` happyRest}}}++happyReduce_59 = happySpecReduce_2  16# happyReduction_59+happyReduction_59 happy_x_2+	happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut23 happy_x_2 of { happy_var_2 -> +	happyIn22+		 ((happy_var_1, happy_var_2)+	)}}++happyReduce_60 = happySpecReduce_0  17# happyReduction_60+happyReduction_60  =  happyIn23+		 ([]+	)++happyReduce_61 = happySpecReduce_2  17# happyReduction_61+happyReduction_61 happy_x_2+	happy_x_1+	 =  case happyOut51 happy_x_1 of { happy_var_1 -> +	case happyOut23 happy_x_2 of { happy_var_2 -> +	happyIn23+		 ((happy_var_1,Nothing):happy_var_2+	)}}++happyReduce_62 = happyReduce 5# 17# happyReduction_62+happyReduction_62 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOutTok happy_x_1 of { (TokenBrackName happy_var_1) -> +	case happyOut23 happy_x_3 of { happy_var_3 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn23+		 ((RVar happy_var_4 happy_var_5 happy_var_1, Just happy_var_1):happy_var_3+	) `HappyStk` happyRest}}}}++happyReduce_63 = happyReduce 5# 17# happyReduction_63+happyReduction_63 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOutTok happy_x_1 of { (TokenBrackName happy_var_1) -> +	case happyOut31 happy_x_3 of { happy_var_3 -> +	case happyOut23 happy_x_5 of { happy_var_5 -> +	happyIn23+		 ((happy_var_3, Just happy_var_1):happy_var_5+	) `HappyStk` happyRest}}}++happyReduce_64 = happyReduce 6# 18# happyReduction_64+happyReduction_64 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut26 happy_x_2 of { happy_var_2 -> +	case happyOut29 happy_x_3 of { happy_var_3 -> +	case happyOut25 happy_x_4 of { happy_var_4 -> +	case happyOut74 happy_x_5 of { happy_var_5 -> +	case happyOut73 happy_x_6 of { happy_var_6 -> +	happyIn24+		 (mkDatatype happy_var_5 happy_var_6 happy_var_3 happy_var_4 happy_var_2+	) `HappyStk` happyRest}}}}}++happyReduce_65 = happySpecReduce_3  19# happyReduction_65+happyReduction_65 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut59 happy_x_1 of { happy_var_1 -> +	case happyOut67 happy_x_2 of { happy_var_2 -> +	happyIn25+		 (Right (happy_var_1,happy_var_2)+	)}}++happyReduce_66 = happySpecReduce_3  19# happyReduction_66+happyReduction_66 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut47 happy_x_2 of { happy_var_2 -> +	happyIn25+		 (Left happy_var_2+	)}++happyReduce_67 = happySpecReduce_3  19# happyReduction_67+happyReduction_67 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut74 happy_x_2 of { happy_var_2 -> +	case happyOut73 happy_x_3 of { happy_var_3 -> +	happyIn25+		 (Left (RConst happy_var_2 happy_var_3 TYPE)+	)}}++happyReduce_68 = happySpecReduce_0  20# happyReduction_68+happyReduction_68  =  happyIn26+		 ([]+	)++happyReduce_69 = happySpecReduce_3  20# happyReduction_69+happyReduction_69 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut27 happy_x_2 of { happy_var_2 -> +	happyIn26+		 (happy_var_2+	)}++happyReduce_70 = happySpecReduce_1  21# happyReduction_70+happyReduction_70 happy_x_1+	 =  case happyOut28 happy_x_1 of { happy_var_1 -> +	happyIn27+		 ([happy_var_1]+	)}++happyReduce_71 = happySpecReduce_3  21# happyReduction_71+happyReduction_71 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+		 (happy_var_1:happy_var_3+	)}}++happyReduce_72 = happySpecReduce_1  22# happyReduction_72+happyReduction_72 happy_x_1+	 =  happyIn28+		 (NoElim+	)++happyReduce_73 = happySpecReduce_1  22# happyReduction_73+happyReduction_73 happy_x_1+	 =  happyIn28+		 (Collapsible+	)++happyReduce_74 = happySpecReduce_1  23# happyReduction_74+happyReduction_74 happy_x_1+	 =  case happyOutTok happy_x_1 of { (TokenName happy_var_1) -> +	happyIn29+		 (happy_var_1+	)}++happyReduce_75 = happySpecReduce_3  23# happyReduction_75+happyReduction_75 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut18 happy_x_2 of { happy_var_2 -> +	happyIn29+		 (useropFn happy_var_2+	)}++happyReduce_76 = happyReduce 4# 24# happyReduction_76+happyReduction_76 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut30 happy_x_1 of { happy_var_1 -> +	case happyOut74 happy_x_2 of { happy_var_2 -> +	case happyOut73 happy_x_3 of { happy_var_3 -> +	case happyOut51 happy_x_4 of { happy_var_4 -> +	happyIn30+		 (RApp happy_var_2 happy_var_3 happy_var_1 happy_var_4+	) `HappyStk` happyRest}}}}++happyReduce_77 = happyReduce 5# 24# happyReduction_77+happyReduction_77 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut30 happy_x_1 of { happy_var_1 -> +	case happyOut40 happy_x_2 of { happy_var_2 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn30+		 (RAppImp happy_var_4 happy_var_5 (fst happy_var_2) happy_var_1 (snd happy_var_2)+	) `HappyStk` happyRest}}}}++happyReduce_78 = happySpecReduce_3  24# happyReduction_78+happyReduction_78 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut74 happy_x_2 of { happy_var_2 -> +	case happyOut73 happy_x_3 of { happy_var_3 -> +	happyIn30+		 (RVar happy_var_2 happy_var_3 happy_var_1+	)}}}++happyReduce_79 = happySpecReduce_3  24# happyReduction_79+happyReduction_79 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut57 happy_x_1 of { happy_var_1 -> +	case happyOut74 happy_x_2 of { happy_var_2 -> +	case happyOut73 happy_x_3 of { happy_var_3 -> +	happyIn30+		 (RConst happy_var_2 happy_var_3 happy_var_1+	)}}}++happyReduce_80 = happySpecReduce_1  24# happyReduction_80+happyReduction_80 happy_x_1+	 =  happyIn30+		 (RPlaceholder+	)++happyReduce_81 = happySpecReduce_3  24# happyReduction_81+happyReduction_81 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut74 happy_x_2 of { happy_var_2 -> +	case happyOut73 happy_x_3 of { happy_var_3 -> +	happyIn30+		 (RVar happy_var_2 happy_var_3 (UN "__Empty")+	)}}++happyReduce_82 = happySpecReduce_3  24# happyReduction_82+happyReduction_82 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut74 happy_x_2 of { happy_var_2 -> +	case happyOut73 happy_x_3 of { happy_var_3 -> +	happyIn30+		 (RVar happy_var_2 happy_var_3 (UN "__Unit")+	)}}++happyReduce_83 = happySpecReduce_1  25# happyReduction_83+happyReduction_83 happy_x_1+	 =  case happyOut51 happy_x_1 of { happy_var_1 -> +	happyIn31+		 (happy_var_1+	)}++happyReduce_84 = happySpecReduce_3  25# happyReduction_84+happyReduction_84 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut48 happy_x_2 of { happy_var_2 -> +	happyIn31+		 (happy_var_2+	)}++happyReduce_85 = happyReduce 4# 25# happyReduction_85+happyReduction_85 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_1 of { happy_var_1 -> +	case happyOut74 happy_x_2 of { happy_var_2 -> +	case happyOut73 happy_x_3 of { happy_var_3 -> +	case happyOut51 happy_x_4 of { happy_var_4 -> +	happyIn31+		 (RApp happy_var_2 happy_var_3 happy_var_1 happy_var_4+	) `HappyStk` happyRest}}}}++happyReduce_86 = happyReduce 5# 25# happyReduction_86+happyReduction_86 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_1 of { happy_var_1 -> +	case happyOut40 happy_x_2 of { happy_var_2 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn31+		 (RAppImp happy_var_4 happy_var_5 (fst happy_var_2) happy_var_1 (snd happy_var_2)+	) `HappyStk` happyRest}}}}++happyReduce_87 = happyReduce 4# 25# happyReduction_87+happyReduction_87 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_2 of { happy_var_2 -> +	case happyOut74 happy_x_3 of { happy_var_3 -> +	case happyOut73 happy_x_4 of { happy_var_4 -> +	happyIn31+		 (RApp happy_var_3 happy_var_4 (RApp happy_var_3 happy_var_4 (RVar happy_var_3 happy_var_4 (UN "__lazy")) RPlaceholder) happy_var_2+	) `HappyStk` happyRest}}}++happyReduce_88 = happyReduce 4# 25# happyReduction_88+happyReduction_88 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut32 happy_x_2 of { happy_var_2 -> +	case happyOut31 happy_x_4 of { happy_var_4 -> +	happyIn31+		 (doBind Lam happy_var_2 happy_var_4+	) `HappyStk` happyRest}}++happyReduce_89 = happyReduce 4# 25# happyReduction_89+happyReduction_89 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut39 happy_x_2 of { happy_var_2 -> +	case happyOut31 happy_x_4 of { happy_var_4 -> +	happyIn31+		 (doLetBind happy_var_2 happy_var_4+	) `HappyStk` happyRest}}++happyReduce_90 = happySpecReduce_1  25# happyReduction_90+happyReduction_90 happy_x_1+	 =  case happyOut41 happy_x_1 of { happy_var_1 -> +	happyIn31+		 (happy_var_1+	)}++happyReduce_91 = happyReduce 8# 25# happyReduction_91+happyReduction_91 (happy_x_8 `HappyStk`+	happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_2 of { happy_var_2 -> +	case happyOut31 happy_x_4 of { happy_var_4 -> +	case happyOut31 happy_x_6 of { happy_var_6 -> +	case happyOut74 happy_x_7 of { happy_var_7 -> +	case happyOut73 happy_x_8 of { happy_var_8 -> +	happyIn31+		 (mkApp happy_var_7 happy_var_8 (RVar happy_var_7 happy_var_8 (UN "if_then_else")) [happy_var_2,happy_var_4,happy_var_6]+	) `HappyStk` happyRest}}}}}++happyReduce_92 = happySpecReduce_2  26# happyReduction_92+happyReduction_92 happy_x_2+	happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut45 happy_x_2 of { happy_var_2 -> +	happyIn32+		 ([(happy_var_1,happy_var_2)]+	)}}++happyReduce_93 = happyReduce 4# 26# happyReduction_93+happyReduction_93 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut45 happy_x_2 of { happy_var_2 -> +	case happyOut32 happy_x_4 of { happy_var_4 -> +	happyIn32+		 ((happy_var_1,happy_var_2):happy_var_4+	) `HappyStk` happyRest}}}++happyReduce_94 = happySpecReduce_3  27# happyReduction_94+happyReduction_94 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut34 happy_x_1 of { happy_var_1 -> +	case happyOut33 happy_x_3 of { happy_var_3 -> +	happyIn33+		 (happy_var_1 ++ happy_var_3+	)}}++happyReduce_95 = happySpecReduce_1  27# happyReduction_95+happyReduction_95 happy_x_1+	 =  case happyOut34 happy_x_1 of { happy_var_1 -> +	happyIn33+		 (happy_var_1+	)}++happyReduce_96 = happySpecReduce_3  28# happyReduction_96+happyReduction_96 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut47 happy_x_3 of { happy_var_3 -> +	happyIn34+		 (map ( \x -> (x,happy_var_3)) [happy_var_1]+	)}}++happyReduce_97 = happySpecReduce_1  29# happyReduction_97+happyReduction_97 happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	happyIn35+		 ([happy_var_1]+	)}++happyReduce_98 = happySpecReduce_3  29# happyReduction_98+happyReduction_98 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut35 happy_x_3 of { happy_var_3 -> +	happyIn35+		 (happy_var_1:happy_var_3+	)}}++happyReduce_99 = happySpecReduce_2  30# happyReduction_99+happyReduction_99 happy_x_2+	happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { (TokenInt happy_var_2) -> +	happyIn36+		 ([(happy_var_1,happy_var_2)]+	)}}++happyReduce_100 = happySpecReduce_1  30# happyReduction_100+happyReduction_100 happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	happyIn36+		 ([(happy_var_1, 0)]+	)}++happyReduce_101 = happySpecReduce_3  30# happyReduction_101+happyReduction_101 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut36 happy_x_3 of { happy_var_3 -> +	happyIn36+		 ((happy_var_1,0):happy_var_3+	)}}++happyReduce_102 = happyReduce 4# 30# happyReduction_102+happyReduction_102 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { (TokenInt happy_var_2) -> +	case happyOut36 happy_x_4 of { happy_var_4 -> +	happyIn36+		 ((happy_var_1,happy_var_2):happy_var_4+	) `HappyStk` happyRest}}}++happyReduce_103 = happySpecReduce_1  31# happyReduction_103+happyReduction_103 happy_x_1+	 =  case happyOutTok happy_x_1 of { (TokenBrackName happy_var_1) -> +	happyIn37+		 ([happy_var_1]+	)}++happyReduce_104 = happySpecReduce_3  31# happyReduction_104+happyReduction_104 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { (TokenBrackName happy_var_1) -> +	case happyOut35 happy_x_3 of { happy_var_3 -> +	happyIn37+		 (happy_var_1:happy_var_3+	)}}++happyReduce_105 = happySpecReduce_1  32# happyReduction_105+happyReduction_105 happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	happyIn38+		 ([happy_var_1]+	)}++happyReduce_106 = happySpecReduce_2  32# happyReduction_106+happyReduction_106 happy_x_2+	happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut38 happy_x_2 of { happy_var_2 -> +	happyIn38+		 (happy_var_1:happy_var_2+	)}}++happyReduce_107 = happyReduce 4# 33# happyReduction_107+happyReduction_107 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut45 happy_x_2 of { happy_var_2 -> +	case happyOut31 happy_x_4 of { happy_var_4 -> +	happyIn39+		 ([(happy_var_1,happy_var_2,happy_var_4)]+	) `HappyStk` happyRest}}}++happyReduce_108 = happyReduce 6# 33# happyReduction_108+happyReduction_108 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut45 happy_x_2 of { happy_var_2 -> +	case happyOut31 happy_x_4 of { happy_var_4 -> +	case happyOut39 happy_x_6 of { happy_var_6 -> +	happyIn39+		 ((happy_var_1,happy_var_2,happy_var_4):happy_var_6+	) `HappyStk` happyRest}}}}++happyReduce_109 = happySpecReduce_3  34# happyReduction_109+happyReduction_109 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { (TokenBrackName happy_var_1) -> +	case happyOut74 happy_x_2 of { happy_var_2 -> +	case happyOut73 happy_x_3 of { happy_var_3 -> +	happyIn40+		 ((happy_var_1, RVar happy_var_2 happy_var_3 happy_var_1)+	)}}}++happyReduce_110 = happySpecReduce_3  34# happyReduction_110+happyReduction_110 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { (TokenBrackName happy_var_1) -> +	case happyOut31 happy_x_3 of { happy_var_3 -> +	happyIn40+		 ((happy_var_1, happy_var_3)+	)}}++happyReduce_111 = happyReduce 4# 35# happyReduction_111+happyReduction_111 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_2 of { happy_var_2 -> +	case happyOut74 happy_x_3 of { happy_var_3 -> +	case happyOut73 happy_x_4 of { happy_var_4 -> +	happyIn41+		 (RInfix happy_var_3 happy_var_4 Minus (RConst happy_var_3 happy_var_4 (Num 0)) happy_var_2+	) `HappyStk` happyRest}}}++happyReduce_112 = happyReduce 5# 35# happyReduction_112+happyReduction_112 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_1 of { happy_var_1 -> +	case happyOut31 happy_x_3 of { happy_var_3 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn41+		 (RUserInfix happy_var_4 happy_var_5 False "-" happy_var_1 happy_var_3+	) `HappyStk` happyRest}}}}++happyReduce_113 = happyReduce 5# 35# happyReduction_113+happyReduction_113 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_1 of { happy_var_1 -> +	case happyOut31 happy_x_3 of { happy_var_3 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn41+		 (mkApp happy_var_4 happy_var_5 (RVar happy_var_4 happy_var_5 (UN "Pair")) [happy_var_1, happy_var_3]+	) `HappyStk` happyRest}}}}++happyReduce_114 = happyReduce 5# 35# happyReduction_114+happyReduction_114 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_1 of { happy_var_1 -> +	case happyOut31 happy_x_3 of { happy_var_3 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn41+		 (RUserInfix happy_var_4 happy_var_5 False "<" happy_var_1 happy_var_3+	) `HappyStk` happyRest}}}}++happyReduce_115 = happyReduce 5# 35# happyReduction_115+happyReduction_115 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_1 of { happy_var_1 -> +	case happyOut31 happy_x_3 of { happy_var_3 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn41+		 (RUserInfix happy_var_4 happy_var_5 False ">" happy_var_1 happy_var_3+	) `HappyStk` happyRest}}}}++happyReduce_116 = happyReduce 5# 35# happyReduction_116+happyReduction_116 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_1 of { happy_var_1 -> +	case happyOut31 happy_x_3 of { happy_var_3 -> +	happyIn41+		 (RBind (MN "X" 0) (Pi Ex Eager happy_var_1) happy_var_3+	) `HappyStk` happyRest}}++happyReduce_117 = happySpecReduce_1  35# happyReduction_117+happyReduction_117 happy_x_1+	 =  case happyOut42 happy_x_1 of { happy_var_1 -> +	happyIn41+		 (happy_var_1+	)}++happyReduce_118 = happyReduce 5# 35# happyReduction_118+happyReduction_118 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut51 happy_x_1 of { happy_var_1 -> +	case happyOut51 happy_x_3 of { happy_var_3 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn41+		 (RInfix happy_var_4 happy_var_5 JMEq happy_var_1 happy_var_3+	) `HappyStk` happyRest}}}}++happyReduce_119 = happyReduce 5# 36# happyReduction_119+happyReduction_119 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { (TokenInfixName happy_var_2) -> +	case happyOut31 happy_x_3 of { happy_var_3 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn42+		 (RUserInfix happy_var_4 happy_var_5 False happy_var_2 happy_var_1 happy_var_3+	) `HappyStk` happyRest}}}}}++happyReduce_120 = happyReduce 6# 37# happyReduction_120+happyReduction_120 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOutTok happy_x_2 of { (TokenInfixName happy_var_2) -> +	case happyOut31 happy_x_3 of { happy_var_3 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn43+		 (RBind (MN "X" 0) (Lam RPlaceholder) +                       (RUserInfix happy_var_4 happy_var_5 False happy_var_2 (RVar happy_var_4 happy_var_5 (MN "X" 0)) happy_var_3)+	) `HappyStk` happyRest}}}}++happyReduce_121 = happyReduce 6# 37# happyReduction_121+happyReduction_121 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_2 of { happy_var_2 -> +	case happyOutTok happy_x_3 of { (TokenInfixName happy_var_3) -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn43+		 (RBind (MN "X" 0) (Lam RPlaceholder) +                       (RUserInfix happy_var_4 happy_var_5 False happy_var_3 happy_var_2 (RVar happy_var_4 happy_var_5 (MN "X" 0)))+	) `HappyStk` happyRest}}}}++happyReduce_122 = happyReduce 6# 37# happyReduction_122+happyReduction_122 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut44 happy_x_2 of { happy_var_2 -> +	case happyOut31 happy_x_3 of { happy_var_3 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn43+		 (RBind (MN "X" 0) (Lam RPlaceholder) +                       (RUserInfix happy_var_4 happy_var_5 False happy_var_2 (RVar happy_var_4 happy_var_5 (MN "X" 0)) happy_var_3)+	) `HappyStk` happyRest}}}}++happyReduce_123 = happyReduce 6# 37# happyReduction_123+happyReduction_123 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_2 of { happy_var_2 -> +	case happyOut44 happy_x_3 of { happy_var_3 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn43+		 (RBind (MN "X" 0) (Lam RPlaceholder) +                       (RUserInfix happy_var_4 happy_var_5 False happy_var_3 happy_var_2 (RVar happy_var_4 happy_var_5 (MN "X" 0)))+	) `HappyStk` happyRest}}}}++happyReduce_124 = happyReduce 6# 37# happyReduction_124+happyReduction_124 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_2 of { happy_var_2 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn43+		 (RBind (MN "X" 0) (Lam RPlaceholder) +                       (RUserInfix happy_var_4 happy_var_5 False "-" happy_var_2 (RVar happy_var_4 happy_var_5 (MN "X" 0)))+	) `HappyStk` happyRest}}}++happyReduce_125 = happyReduce 6# 37# happyReduction_125+happyReduction_125 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_2 of { happy_var_2 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn43+		 (RBind (MN "X" 0) (Lam RPlaceholder) +                       (RBind (MN "X" 1) (Pi Ex Eager happy_var_2) (RVar happy_var_4 happy_var_5 (MN "X" 0)))+	) `HappyStk` happyRest}}}++happyReduce_126 = happyReduce 6# 37# happyReduction_126+happyReduction_126 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_3 of { happy_var_3 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn43+		 (RBind (MN "X" 0) (Lam RPlaceholder) +                       (RBind (MN "X" 1) (Pi Ex Eager (RVar happy_var_4 happy_var_5 (MN "X" 0))) happy_var_3)+	) `HappyStk` happyRest}}}++happyReduce_127 = happyReduce 5# 37# happyReduction_127+happyReduction_127 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut74 happy_x_3 of { happy_var_3 -> +	case happyOut73 happy_x_4 of { happy_var_4 -> +	happyIn43+		 (RBind (MN "X" 0) (Lam RPlaceholder)+                       (RBind (MN "X" 1) (Lam RPlaceholder)+                    (RBind (MN "X" 2) (Pi Ex Eager (RVar happy_var_3 happy_var_4 (MN "X" 0)))+                       (RVar happy_var_3 happy_var_4 (MN "X" 1))))+	) `HappyStk` happyRest}}++happyReduce_128 = happyReduce 5# 37# happyReduction_128+happyReduction_128 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut74 happy_x_3 of { happy_var_3 -> +	case happyOut73 happy_x_4 of { happy_var_4 -> +	happyIn43+		 (RBind (MN "X" 0) (Lam RPlaceholder)+                   (RBind (MN "X" 1) (Lam RPlaceholder)+                       (pairDesugar happy_var_3 happy_var_4 (RVar happy_var_3 happy_var_4 (UN "mkPair"))+                                    [RVar happy_var_3 happy_var_4 (MN "X" 0),+                                     RVar happy_var_3 happy_var_4 (MN "X" 1)]))+	) `HappyStk` happyRest}}++happyReduce_129 = happyReduce 6# 37# happyReduction_129+happyReduction_129 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_2 of { happy_var_2 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn43+		 (RBind (MN "X" 0) (Lam RPlaceholder)+                       (pairDesugar happy_var_4 happy_var_5 (RVar happy_var_4 happy_var_5 (UN "mkPair"))+                                    [happy_var_2,+                                     RVar happy_var_4 happy_var_5 (MN "X" 0)])+	) `HappyStk` happyRest}}}++happyReduce_130 = happyReduce 6# 37# happyReduction_130+happyReduction_130 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_3 of { happy_var_3 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn43+		 (RBind (MN "X" 0) (Lam RPlaceholder)+                       (pairDesugar happy_var_4 happy_var_5 (RVar happy_var_4 happy_var_5 (UN "mkPair"))+                                    [RVar happy_var_4 happy_var_5 (MN "X" 0), happy_var_3])+	) `HappyStk` happyRest}}}++happyReduce_131 = happySpecReduce_1  38# happyReduction_131+happyReduction_131 happy_x_1+	 =  happyIn44+		 ("<"+	)++happyReduce_132 = happySpecReduce_1  38# happyReduction_132+happyReduction_132 happy_x_1+	 =  happyIn44+		 (">"+	)++happyReduce_133 = happySpecReduce_0  39# happyReduction_133+happyReduction_133  =  happyIn45+		 (RPlaceholder+	)++happyReduce_134 = happySpecReduce_2  39# happyReduction_134+happyReduction_134 happy_x_2+	happy_x_1+	 =  case happyOut48 happy_x_2 of { happy_var_2 -> +	happyIn45+		 (happy_var_2+	)}++happyReduce_135 = happySpecReduce_0  40# happyReduction_135+happyReduction_135  =  happyIn46+		 (RPlaceholder+	)++happyReduce_136 = happySpecReduce_2  40# happyReduction_136+happyReduction_136 happy_x_2+	happy_x_1+	 =  case happyOut48 happy_x_2 of { happy_var_2 -> +	happyIn46+		 (happy_var_2+	)}++happyReduce_137 = happyReduce 5# 41# happyReduction_137+happyReduction_137 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut37 happy_x_1 of { happy_var_1 -> +	case happyOut46 happy_x_2 of { happy_var_2 -> +	case happyOut47 happy_x_5 of { happy_var_5 -> +	happyIn47+		 (doBind (Pi Im Eager) (map (\x -> (x, happy_var_2)) happy_var_1) happy_var_5+	) `HappyStk` happyRest}}}++happyReduce_138 = happySpecReduce_1  41# happyReduction_138+happyReduction_138 happy_x_1+	 =  case happyOut48 happy_x_1 of { happy_var_1 -> +	happyIn47+		 (happy_var_1+	)}++happyReduce_139 = happySpecReduce_3  42# happyReduction_139+happyReduction_139 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut48 happy_x_1 of { happy_var_1 -> +	case happyOut48 happy_x_3 of { happy_var_3 -> +	happyIn48+		 (RBind (MN "X" 0) (Pi Ex Eager happy_var_1) happy_var_3+	)}}++happyReduce_140 = happyReduce 5# 42# happyReduction_140+happyReduction_140 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut33 happy_x_2 of { happy_var_2 -> +	case happyOut48 happy_x_5 of { happy_var_5 -> +	happyIn48+		 (doBind (Pi Ex Eager) happy_var_2 happy_var_5+	) `HappyStk` happyRest}}++happyReduce_141 = happyReduce 5# 42# happyReduction_141+happyReduction_141 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut33 happy_x_2 of { happy_var_2 -> +	case happyOut48 happy_x_5 of { happy_var_5 -> +	happyIn48+		 (doBind (Pi Ex Lazy) happy_var_2 happy_var_5+	) `HappyStk` happyRest}}++happyReduce_142 = happySpecReduce_3  42# happyReduction_142+happyReduction_142 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut48 happy_x_2 of { happy_var_2 -> +	happyIn48+		 (bracket happy_var_2+	)}++happyReduce_143 = happyReduce 7# 42# happyReduction_143+happyReduction_143 (happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut48 happy_x_2 of { happy_var_2 -> +	case happyOut48 happy_x_4 of { happy_var_4 -> +	case happyOut74 happy_x_5 of { happy_var_5 -> +	case happyOut73 happy_x_6 of { happy_var_6 -> +	happyIn48+		 (RInfix happy_var_5 happy_var_6 JMEq happy_var_2 happy_var_4+	) `HappyStk` happyRest}}}}++happyReduce_144 = happySpecReduce_1  42# happyReduction_144+happyReduction_144 happy_x_1+	 =  case happyOut30 happy_x_1 of { happy_var_1 -> +	happyIn48+		 (happy_var_1+	)}++happyReduce_145 = happySpecReduce_3  42# happyReduction_145+happyReduction_145 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_2 of { happy_var_2 -> +	happyIn48+		 (happy_var_2+	)}++happyReduce_146 = happyReduce 5# 42# happyReduction_146+happyReduction_146 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut48 happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { (TokenInfixName happy_var_2) -> +	case happyOut48 happy_x_3 of { happy_var_3 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn48+		 (RUserInfix happy_var_4 happy_var_5 False happy_var_2 happy_var_1 happy_var_3+	) `HappyStk` happyRest}}}}}++happyReduce_147 = happyReduce 5# 42# happyReduction_147+happyReduction_147 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut50 happy_x_2 of { happy_var_2 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn48+		 (pairDesugar happy_var_4 happy_var_5 (RVar happy_var_4 happy_var_5 (UN "Pair")) happy_var_2+	) `HappyStk` happyRest}}}++happyReduce_148 = happySpecReduce_1  42# happyReduction_148+happyReduction_148 happy_x_1+	 =  case happyOut49 happy_x_1 of { happy_var_1 -> +	happyIn48+		 (happy_var_1+	)}++happyReduce_149 = happyReduce 8# 43# happyReduction_149+happyReduction_149 (happy_x_8 `HappyStk`+	happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut29 happy_x_2 of { happy_var_2 -> +	case happyOut45 happy_x_3 of { happy_var_3 -> +	case happyOut48 happy_x_5 of { happy_var_5 -> +	case happyOut74 happy_x_7 of { happy_var_7 -> +	case happyOut73 happy_x_8 of { happy_var_8 -> +	happyIn49+		 (sigDesugar happy_var_7 happy_var_8 (happy_var_2, happy_var_3) happy_var_5+	) `HappyStk` happyRest}}}}}++happyReduce_150 = happySpecReduce_3  44# happyReduction_150+happyReduction_150 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut48 happy_x_1 of { happy_var_1 -> +	case happyOut48 happy_x_3 of { happy_var_3 -> +	happyIn50+		 (happy_var_1:happy_var_3:[]+	)}}++happyReduce_151 = happySpecReduce_3  44# happyReduction_151+happyReduction_151 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut48 happy_x_1 of { happy_var_1 -> +	case happyOut50 happy_x_3 of { happy_var_3 -> +	happyIn50+		 (happy_var_1:happy_var_3+	)}}++happyReduce_152 = happySpecReduce_3  45# happyReduction_152+happyReduction_152 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut74 happy_x_2 of { happy_var_2 -> +	case happyOut73 happy_x_3 of { happy_var_3 -> +	happyIn51+		 (RVar happy_var_2 happy_var_3 happy_var_1+	)}}}++happyReduce_153 = happySpecReduce_3  45# happyReduction_153+happyReduction_153 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut74 happy_x_2 of { happy_var_2 -> +	case happyOut73 happy_x_3 of { happy_var_3 -> +	happyIn51+		 (RReturn happy_var_2 happy_var_3+	)}}++happyReduce_154 = happySpecReduce_3  45# happyReduction_154+happyReduction_154 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_2 of { happy_var_2 -> +	happyIn51+		 (bracket happy_var_2+	)}++happyReduce_155 = happySpecReduce_2  45# happyReduction_155+happyReduction_155 happy_x_2+	happy_x_1+	 =  case happyOut51 happy_x_2 of { happy_var_2 -> +	happyIn51+		 (RPure happy_var_2+	)}++happyReduce_156 = happySpecReduce_1  45# happyReduction_156+happyReduction_156 happy_x_1+	 =  case happyOutTok happy_x_1 of { (TokenMetavar happy_var_1) -> +	happyIn51+		 (RMetavar happy_var_1+	)}++happyReduce_157 = happyReduce 4# 45# happyReduction_157+happyReduction_157 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut29 happy_x_2 of { happy_var_2 -> +	case happyOut74 happy_x_3 of { happy_var_3 -> +	case happyOut73 happy_x_4 of { happy_var_4 -> +	happyIn51+		 (RExpVar happy_var_3 happy_var_4 happy_var_2+	) `HappyStk` happyRest}}}++happyReduce_158 = happySpecReduce_3  45# happyReduction_158+happyReduction_158 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut57 happy_x_1 of { happy_var_1 -> +	case happyOut74 happy_x_2 of { happy_var_2 -> +	case happyOut73 happy_x_3 of { happy_var_3 -> +	happyIn51+		 (RConst happy_var_2 happy_var_3 happy_var_1+	)}}}++happyReduce_159 = happySpecReduce_1  45# happyReduction_159+happyReduction_159 happy_x_1+	 =  happyIn51+		 (RRefl+	)++happyReduce_160 = happySpecReduce_3  45# happyReduction_160+happyReduction_160 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut74 happy_x_2 of { happy_var_2 -> +	case happyOut73 happy_x_3 of { happy_var_3 -> +	happyIn51+		 (RVar happy_var_2 happy_var_3 (UN "__Empty")+	)}}++happyReduce_161 = happySpecReduce_3  45# happyReduction_161+happyReduction_161 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut74 happy_x_2 of { happy_var_2 -> +	case happyOut73 happy_x_3 of { happy_var_3 -> +	happyIn51+		 (RVar happy_var_2 happy_var_3 (UN "__Unit")+	)}}++happyReduce_162 = happySpecReduce_1  45# happyReduction_162+happyReduction_162 happy_x_1+	 =  happyIn51+		 (RPlaceholder+	)++happyReduce_163 = happySpecReduce_1  45# happyReduction_163+happyReduction_163 happy_x_1+	 =  case happyOut54 happy_x_1 of { happy_var_1 -> +	happyIn51+		 (RDo happy_var_1+	)}++happyReduce_164 = happySpecReduce_3  45# happyReduction_164+happyReduction_164 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_2 of { happy_var_2 -> +	happyIn51+		 (RIdiom happy_var_2+	)}++happyReduce_165 = happyReduce 5# 45# happyReduction_165+happyReduction_165 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut53 happy_x_2 of { happy_var_2 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn51+		 (pairDesugar happy_var_4 happy_var_5 (RVar happy_var_4 happy_var_5 (UN "mkPair")) happy_var_2+	) `HappyStk` happyRest}}}++happyReduce_166 = happySpecReduce_1  45# happyReduction_166+happyReduction_166 happy_x_1+	 =  case happyOut49 happy_x_1 of { happy_var_1 -> +	happyIn51+		 (happy_var_1+	)}++happyReduce_167 = happySpecReduce_1  45# happyReduction_167+happyReduction_167 happy_x_1+	 =  case happyOut43 happy_x_1 of { happy_var_1 -> +	happyIn51+		 (happy_var_1+	)}++happyReduce_168 = happySpecReduce_1  45# happyReduction_168+happyReduction_168 happy_x_1+	 =  case happyOut52 happy_x_1 of { happy_var_1 -> +	happyIn51+		 (happy_var_1+	)}++happyReduce_169 = happyReduce 7# 46# happyReduction_169+happyReduction_169 (happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_2 of { happy_var_2 -> +	case happyOut31 happy_x_4 of { happy_var_4 -> +	case happyOut74 happy_x_6 of { happy_var_6 -> +	case happyOut73 happy_x_7 of { happy_var_7 -> +	happyIn52+		 (RApp happy_var_6 happy_var_7 (RAppImp happy_var_6 happy_var_7 (UN "a") (RVar happy_var_6 happy_var_7 (UN "Exists")) happy_var_2) happy_var_4+	) `HappyStk` happyRest}}}}++happyReduce_170 = happyReduce 5# 46# happyReduction_170+happyReduction_170 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_2 of { happy_var_2 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn52+		 (RApp happy_var_4 happy_var_5 (RVar happy_var_4 happy_var_5 (UN "Exists")) happy_var_2+	) `HappyStk` happyRest}}}++happyReduce_171 = happySpecReduce_3  47# happyReduction_171+happyReduction_171 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_1 of { happy_var_1 -> +	case happyOut31 happy_x_3 of { happy_var_3 -> +	happyIn53+		 (happy_var_1:happy_var_3:[]+	)}}++happyReduce_172 = happySpecReduce_3  47# happyReduction_172+happyReduction_172 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_1 of { happy_var_1 -> +	case happyOut53 happy_x_3 of { happy_var_3 -> +	happyIn53+		 (happy_var_1:happy_var_3+	)}}++happyReduce_173 = happyReduce 4# 48# happyReduction_173+happyReduction_173 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut55 happy_x_3 of { happy_var_3 -> +	happyIn54+		 (happy_var_3+	) `HappyStk` happyRest}++happyReduce_174 = happyReduce 10# 48# happyReduction_174+happyReduction_174 (happy_x_10 `HappyStk`+	happy_x_9 `HappyStk`+	happy_x_8 `HappyStk`+	happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOutTok happy_x_2 of { (TokenBrackName happy_var_2) -> +	case happyOut45 happy_x_3 of { happy_var_3 -> +	case happyOut31 happy_x_5 of { happy_var_5 -> +	case happyOut74 happy_x_6 of { happy_var_6 -> +	case happyOut73 happy_x_7 of { happy_var_7 -> +	case happyOut55 happy_x_9 of { happy_var_9 -> +	happyIn54+		 (DoBinding happy_var_6 happy_var_7 happy_var_2 happy_var_3 happy_var_5 : happy_var_9+	) `HappyStk` happyRest}}}}}}++happyReduce_175 = happySpecReduce_2  49# happyReduction_175+happyReduction_175 happy_x_2+	happy_x_1+	 =  case happyOut56 happy_x_1 of { happy_var_1 -> +	case happyOut55 happy_x_2 of { happy_var_2 -> +	happyIn55+		 (happy_var_1:happy_var_2+	)}}++happyReduce_176 = happySpecReduce_1  49# happyReduction_176+happyReduction_176 happy_x_1+	 =  case happyOut56 happy_x_1 of { happy_var_1 -> +	happyIn55+		 ([happy_var_1]+	)}++happyReduce_177 = happyReduce 7# 50# happyReduction_177+happyReduction_177 (happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut45 happy_x_2 of { happy_var_2 -> +	case happyOut31 happy_x_4 of { happy_var_4 -> +	case happyOut74 happy_x_5 of { happy_var_5 -> +	case happyOut73 happy_x_6 of { happy_var_6 -> +	happyIn56+		 (DoBinding happy_var_5 happy_var_6 happy_var_1 happy_var_2 happy_var_4+	) `HappyStk` happyRest}}}}}++happyReduce_178 = happyReduce 8# 50# happyReduction_178+happyReduction_178 (happy_x_8 `HappyStk`+	happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut29 happy_x_2 of { happy_var_2 -> +	case happyOut45 happy_x_3 of { happy_var_3 -> +	case happyOut31 happy_x_5 of { happy_var_5 -> +	case happyOut74 happy_x_6 of { happy_var_6 -> +	case happyOut73 happy_x_7 of { happy_var_7 -> +	happyIn56+		 (DoLet happy_var_6 happy_var_7 happy_var_2 happy_var_3 happy_var_5+	) `HappyStk` happyRest}}}}}++happyReduce_179 = happyReduce 4# 50# happyReduction_179+happyReduction_179 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_1 of { happy_var_1 -> +	case happyOut74 happy_x_2 of { happy_var_2 -> +	case happyOut73 happy_x_3 of { happy_var_3 -> +	happyIn56+		 (DoExp happy_var_2 happy_var_3 happy_var_1+	) `HappyStk` happyRest}}}++happyReduce_180 = happySpecReduce_1  51# happyReduction_180+happyReduction_180 happy_x_1+	 =  happyIn57+		 (TYPE+	)++happyReduce_181 = happySpecReduce_1  51# happyReduction_181+happyReduction_181 happy_x_1+	 =  happyIn57+		 (StringType+	)++happyReduce_182 = happySpecReduce_1  51# happyReduction_182+happyReduction_182 happy_x_1+	 =  happyIn57+		 (IntType+	)++happyReduce_183 = happySpecReduce_1  51# happyReduction_183+happyReduction_183 happy_x_1+	 =  happyIn57+		 (CharType+	)++happyReduce_184 = happySpecReduce_1  51# happyReduction_184+happyReduction_184 happy_x_1+	 =  happyIn57+		 (FloatType+	)++happyReduce_185 = happySpecReduce_1  51# happyReduction_185+happyReduction_185 happy_x_1+	 =  happyIn57+		 (PtrType+	)++happyReduce_186 = happySpecReduce_1  51# happyReduction_186+happyReduction_186 happy_x_1+	 =  happyIn57+		 (Builtin "Handle"+	)++happyReduce_187 = happySpecReduce_1  51# happyReduction_187+happyReduction_187 happy_x_1+	 =  happyIn57+		 (Builtin "Lock"+	)++happyReduce_188 = happySpecReduce_1  51# happyReduction_188+happyReduction_188 happy_x_1+	 =  case happyOutTok happy_x_1 of { (TokenInt happy_var_1) -> +	happyIn57+		 (Num happy_var_1+	)}++happyReduce_189 = happySpecReduce_1  51# happyReduction_189+happyReduction_189 happy_x_1+	 =  case happyOutTok happy_x_1 of { (TokenChar happy_var_1) -> +	happyIn57+		 (Ch happy_var_1+	)}++happyReduce_190 = happySpecReduce_1  51# happyReduction_190+happyReduction_190 happy_x_1+	 =  case happyOutTok happy_x_1 of { (TokenString happy_var_1) -> +	happyIn57+		 (Str happy_var_1+	)}++happyReduce_191 = happySpecReduce_1  51# happyReduction_191+happyReduction_191 happy_x_1+	 =  case happyOutTok happy_x_1 of { (TokenBool happy_var_1) -> +	happyIn57+		 (Bo happy_var_1+	)}++happyReduce_192 = happySpecReduce_1  51# happyReduction_192+happyReduction_192 happy_x_1+	 =  case happyOutTok happy_x_1 of { (TokenFloat happy_var_1) -> +	happyIn57+		 (Fl happy_var_1+	)}++happyReduce_193 = happySpecReduce_0  52# happyReduction_193+happyReduction_193  =  happyIn58+		 ([]+	)++happyReduce_194 = happySpecReduce_2  52# happyReduction_194+happyReduction_194 happy_x_2+	happy_x_1+	 =  case happyOut51 happy_x_1 of { happy_var_1 -> +	case happyOut58 happy_x_2 of { happy_var_2 -> +	happyIn58+		 (happy_var_1:happy_var_2+	)}}++happyReduce_195 = happyReduce 4# 53# happyReduction_195+happyReduction_195 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut47 happy_x_2 of { happy_var_2 -> +	case happyOut60 happy_x_3 of { happy_var_3 -> +	happyIn59+		 ((happy_var_2, happy_var_3)+	) `HappyStk` happyRest}}++happyReduce_196 = happySpecReduce_3  53# happyReduction_196+happyReduction_196 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut74 happy_x_2 of { happy_var_2 -> +	case happyOut73 happy_x_3 of { happy_var_3 -> +	happyIn59+		 ((RConst happy_var_2 happy_var_3 TYPE, [])+	)}}++happyReduce_197 = happyReduce 4# 53# happyReduction_197+happyReduction_197 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut65 happy_x_1 of { happy_var_1 -> +	case happyOut74 happy_x_3 of { happy_var_3 -> +	case happyOut73 happy_x_4 of { happy_var_4 -> +	happyIn59+		 ((mkTyParams happy_var_3 happy_var_4 happy_var_1, [])+	) `HappyStk` happyRest}}}++happyReduce_198 = happySpecReduce_0  54# happyReduction_198+happyReduction_198  =  happyIn60+		 ([]+	)++happyReduce_199 = happyReduce 4# 54# happyReduction_199+happyReduction_199 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut64 happy_x_3 of { happy_var_3 -> +	happyIn60+		 (happy_var_3+	) `HappyStk` happyRest}++happyReduce_200 = happyReduce 7# 55# happyReduction_200+happyReduction_200 (happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut29 happy_x_4 of { happy_var_4 -> +	case happyOut29 happy_x_6 of { happy_var_6 -> +	happyIn61+		 ((happy_var_4,happy_var_6)+	) `HappyStk` happyRest}}++happyReduce_201 = happyReduce 6# 56# happyReduction_201+happyReduction_201 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut29 happy_x_3 of { happy_var_3 -> +	case happyOut29 happy_x_5 of { happy_var_5 -> +	happyIn62+		 ((happy_var_3,happy_var_5)+	) `HappyStk` happyRest}}++happyReduce_202 = happyReduce 4# 57# happyReduction_202+happyReduction_202 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut64 happy_x_3 of { happy_var_3 -> +	happyIn63+		 (happy_var_3+	) `HappyStk` happyRest}++happyReduce_203 = happySpecReduce_3  58# happyReduction_203+happyReduction_203 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut47 happy_x_3 of { happy_var_3 -> +	happyIn64+		 ([(happy_var_1, happy_var_3)]+	)}}++happyReduce_204 = happyReduce 5# 58# happyReduction_204+happyReduction_204 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut47 happy_x_3 of { happy_var_3 -> +	case happyOut64 happy_x_5 of { happy_var_5 -> +	happyIn64+		 ((happy_var_1,happy_var_3):happy_var_5+	) `HappyStk` happyRest}}}++happyReduce_205 = happySpecReduce_1  59# happyReduction_205+happyReduction_205 happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	happyIn65+		 ([happy_var_1]+	)}++happyReduce_206 = happySpecReduce_2  59# happyReduction_206+happyReduction_206 happy_x_2+	happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut65 happy_x_2 of { happy_var_2 -> +	happyIn65+		 (happy_var_1:happy_var_2+	)}}++happyReduce_207 = happySpecReduce_1  60# happyReduction_207+happyReduction_207 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn66+		 (happy_var_1+	)}++happyReduce_208 = happySpecReduce_1  60# happyReduction_208+happyReduction_208 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn66+		 (happy_var_1+	)}++happyReduce_209 = happySpecReduce_0  61# happyReduction_209+happyReduction_209  =  happyIn67+		 ([]+	)++happyReduce_210 = happySpecReduce_1  61# happyReduction_210+happyReduction_210 happy_x_1+	 =  case happyOut68 happy_x_1 of { happy_var_1 -> +	happyIn67+		 ([happy_var_1]+	)}++happyReduce_211 = happySpecReduce_3  61# happyReduction_211+happyReduction_211 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut68 happy_x_1 of { happy_var_1 -> +	case happyOut67 happy_x_3 of { happy_var_3 -> +	happyIn67+		 (happy_var_1:happy_var_3+	)}}++happyReduce_212 = happySpecReduce_2  62# happyReduction_212+happyReduction_212 happy_x_2+	happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut69 happy_x_2 of { happy_var_2 -> +	happyIn68+		 (Full happy_var_1 happy_var_2+	)}}++happyReduce_213 = happySpecReduce_2  62# happyReduction_213+happyReduction_213 happy_x_2+	happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut58 happy_x_2 of { happy_var_2 -> +	happyIn68+		 (Simple happy_var_1 happy_var_2+	)}}++happyReduce_214 = happySpecReduce_2  63# happyReduction_214+happyReduction_214 happy_x_2+	happy_x_1+	 =  case happyOut47 happy_x_2 of { happy_var_2 -> +	happyIn69+		 (happy_var_2+	)}++happyReduce_215 = happySpecReduce_2  64# happyReduction_215+happyReduction_215 happy_x_2+	happy_x_1+	 =  case happyOut35 happy_x_2 of { happy_var_2 -> +	happyIn70+		 (Intro happy_var_2+	)}++happyReduce_216 = happySpecReduce_1  64# happyReduction_216+happyReduction_216 happy_x_1+	 =  happyIn70+		 (Intro []+	)++happyReduce_217 = happySpecReduce_2  64# happyReduction_217+happyReduction_217 happy_x_2+	happy_x_1+	 =  case happyOut29 happy_x_2 of { happy_var_2 -> +	happyIn70+		 (Refine happy_var_2+	)}++happyReduce_218 = happySpecReduce_2  64# happyReduction_218+happyReduction_218 happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_2 of { happy_var_2 -> +	happyIn70+		 (Generalise happy_var_2+	)}++happyReduce_219 = happySpecReduce_1  64# happyReduction_219+happyReduction_219 happy_x_1+	 =  happyIn70+		 (ReflP+	)++happyReduce_220 = happySpecReduce_2  64# happyReduction_220+happyReduction_220 happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_2 of { happy_var_2 -> +	happyIn70+		 (Rewrite False False happy_var_2+	)}++happyReduce_221 = happySpecReduce_3  64# happyReduction_221+happyReduction_221 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_3 of { happy_var_3 -> +	happyIn70+		 (Rewrite False True happy_var_3+	)}++happyReduce_222 = happySpecReduce_2  64# happyReduction_222+happyReduction_222 happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_2 of { happy_var_2 -> +	happyIn70+		 (Rewrite True False happy_var_2+	)}++happyReduce_223 = happySpecReduce_3  64# happyReduction_223+happyReduction_223 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_3 of { happy_var_3 -> +	happyIn70+		 (Rewrite True True happy_var_3+	)}++happyReduce_224 = happySpecReduce_1  64# happyReduction_224+happyReduction_224 happy_x_1+	 =  happyIn70+		 (Compute+	)++happyReduce_225 = happySpecReduce_2  64# happyReduction_225+happyReduction_225 happy_x_2+	happy_x_1+	 =  case happyOut29 happy_x_2 of { happy_var_2 -> +	happyIn70+		 (Unfold happy_var_2+	)}++happyReduce_226 = happySpecReduce_1  64# happyReduction_226+happyReduction_226 happy_x_1+	 =  happyIn70+		 (Undo+	)++happyReduce_227 = happySpecReduce_2  64# happyReduction_227+happyReduction_227 happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_2 of { happy_var_2 -> +	happyIn70+		 (Induction happy_var_2+	)}++happyReduce_228 = happySpecReduce_2  64# happyReduction_228+happyReduction_228 happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_2 of { happy_var_2 -> +	happyIn70+		 (Fill happy_var_2+	)}++happyReduce_229 = happySpecReduce_1  64# happyReduction_229+happyReduction_229 happy_x_1+	 =  happyIn70+		 (Trivial+	)++happyReduce_230 = happySpecReduce_2  64# happyReduction_230+happyReduction_230 happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_2 of { happy_var_2 -> +	happyIn70+		 (RunTactic happy_var_2+	)}++happyReduce_231 = happySpecReduce_2  64# happyReduction_231+happyReduction_231 happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_2 of { happy_var_2 -> +	happyIn70+		 (Believe happy_var_2+	)}++happyReduce_232 = happySpecReduce_2  64# happyReduction_232+happyReduction_232 happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_2 of { happy_var_2 -> +	happyIn70+		 (Use happy_var_2+	)}++happyReduce_233 = happySpecReduce_2  64# happyReduction_233+happyReduction_233 happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_2 of { happy_var_2 -> +	happyIn70+		 (Decide happy_var_2+	)}++happyReduce_234 = happySpecReduce_1  64# happyReduction_234+happyReduction_234 happy_x_1+	 =  happyIn70+		 (Abandon+	)++happyReduce_235 = happySpecReduce_1  64# happyReduction_235+happyReduction_235 happy_x_1+	 =  happyIn70+		 (Qed+	)++happyReduce_236 = happyReduce 4# 65# happyReduction_236+happyReduction_236 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut72 happy_x_3 of { happy_var_3 -> +	happyIn71+		 (happy_var_3+	) `HappyStk` happyRest}++happyReduce_237 = happySpecReduce_2  66# happyReduction_237+happyReduction_237 happy_x_2+	happy_x_1+	 =  case happyOut70 happy_x_1 of { happy_var_1 -> +	happyIn72+		 ([happy_var_1]+	)}++happyReduce_238 = happySpecReduce_3  66# happyReduction_238+happyReduction_238 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut70 happy_x_1 of { happy_var_1 -> +	case happyOut72 happy_x_3 of { happy_var_3 -> +	happyIn72+		 (happy_var_1:happy_var_3+	)}}++happyReduce_239 = happyMonadReduce 0# 67# happyReduction_239+happyReduction_239 (happyRest) tk+	 = happyThen (( getLineNo)+	) (\r -> happyReturn (happyIn73 r))++happyReduce_240 = happyMonadReduce 0# 68# happyReduction_240+happyReduction_240 (happyRest) tk+	 = happyThen (( getFileName)+	) (\r -> happyReturn (happyIn74 r))++happyReduce_241 = happyMonadReduce 0# 69# happyReduction_241+happyReduction_241 (happyRest) tk+	 = happyThen (( getOps)+	) (\r -> happyReturn (happyIn75 r))++happyNewToken action sts stk+	= lexer(\tk -> +	let cont i = happyDoAction i tk action sts stk in+	case tk of {+	TokenEOF -> happyDoAction 114# tk action sts stk;+	TokenName happy_dollar_dollar -> cont 1#;+	TokenInfixName happy_dollar_dollar -> cont 2#;+	TokenBrackName happy_dollar_dollar -> cont 3#;+	TokenString happy_dollar_dollar -> cont 4#;+	TokenInt happy_dollar_dollar -> cont 5#;+	TokenFloat happy_dollar_dollar -> cont 6#;+	TokenChar happy_dollar_dollar -> cont 7#;+	TokenBool happy_dollar_dollar -> cont 8#;+	TokenMetavar happy_dollar_dollar -> cont 9#;+	TokenColon -> cont 10#;+	TokenSemi -> cont 11#;+	TokenBar -> cont 12#;+	TokenStars -> cont 13#;+	TokenLambda -> cont 14#;+	TokenHashOB -> cont 15#;+	TokenOB -> cont 16#;+	TokenCB -> cont 17#;+	TokenOCB -> cont 18#;+	TokenCCB -> cont 19#;+	TokenOSB -> cont 20#;+	TokenCSB -> cont 21#;+	TokenOId -> cont 22#;+	TokenCId -> cont 23#;+	TokenLPair -> cont 24#;+	TokenRPair -> cont 25#;+	TokenExists -> cont 26#;+	TokenTilde -> cont 27#;+	TokenPlus -> cont 28#;+	TokenMinus -> cont 29#;+	TokenTimes -> cont 30#;+	TokenDivide -> cont 31#;+	TokenEquals -> cont 32#;+	TokenMightEqual -> cont 33#;+	TokenLT -> cont 34#;+	TokenGT -> cont 35#;+	TokenEllipsis -> cont 36#;+	TokenUnderscore -> cont 37#;+	TokenComma -> cont 38#;+	TokenTuple -> cont 39#;+	TokenBang -> cont 40#;+	TokenConcat -> cont 41#;+	TokenGE -> cont 42#;+	TokenLE -> cont 43#;+	TokenOr -> cont 44#;+	TokenAnd -> cont 45#;+	TokenArrow -> cont 46#;+	TokenFatArrow -> cont 47#;+	TokenTransArrow -> cont 48#;+	TokenLeftArrow -> cont 49#;+	TokenIntType -> cont 50#;+	TokenCharType -> cont 51#;+	TokenFloatType -> cont 52#;+	TokenStringType -> cont 53#;+	TokenHandleType -> cont 54#;+	TokenPtrType -> cont 55#;+	TokenLockType -> cont 56#;+	TokenType -> cont 57#;+	TokenLazyBracket -> cont 58#;+	TokenDataType -> cont 59#;+	TokenInfix -> cont 60#;+	TokenInfixL -> cont 61#;+	TokenInfixR -> cont 62#;+	TokenUsing -> cont 63#;+	TokenIdiom -> cont 64#;+	TokenParams -> cont 65#;+	TokenNoElim -> cont 66#;+	TokenCollapsible -> cont 67#;+	TokenWhere -> cont 68#;+	TokenWith -> cont 69#;+	TokenPartial -> cont 70#;+	TokenSyntax -> cont 71#;+	TokenLazy -> cont 72#;+	TokenRefl -> cont 73#;+	TokenEmptyType -> cont 74#;+	TokenUnitType -> cont 75#;+	TokenInclude -> cont 76#;+	TokenExport -> cont 77#;+	TokenInline -> cont 78#;+	TokenDo -> cont 79#;+	TokenReturn -> cont 80#;+	TokenIf -> cont 81#;+	TokenThen -> cont 82#;+	TokenElse -> cont 83#;+	TokenLet -> cont 84#;+	TokenIn -> cont 85#;+	TokenProof -> cont 86#;+	TokenIntro -> cont 87#;+	TokenRefine -> cont 88#;+	TokenGeneralise -> cont 89#;+	TokenReflP -> cont 90#;+	TokenRewrite -> cont 91#;+	TokenRewriteAll -> cont 92#;+	TokenCompute -> cont 93#;+	TokenUnfold -> cont 94#;+	TokenUndo -> cont 95#;+	TokenInduction -> cont 96#;+	TokenFill -> cont 97#;+	TokenTrivial -> cont 98#;+	TokenMkTac -> cont 99#;+	TokenBelieve -> cont 100#;+	TokenUse -> cont 101#;+	TokenDecide -> cont 102#;+	TokenAbandon -> cont 103#;+	TokenQED -> cont 104#;+	TokenLaTeX -> cont 105#;+	TokenNoCG -> cont 106#;+	TokenEval -> cont 107#;+	TokenSpec -> cont 108#;+	TokenFreeze -> cont 109#;+	TokenThaw -> cont 110#;+	TokenTransform -> cont 111#;+	TokenCInclude -> cont 112#;+	TokenCLib -> cont 113#;+	_ -> happyError' tk+	})++happyError_ tk = happyError' tk++happyThen :: () => P a -> (a -> P b) -> P b+happyThen = (thenP)+happyReturn :: () => a -> P a+happyReturn = (returnP)+happyThen1 = happyThen+happyReturn1 :: () => a -> P a+happyReturn1 = happyReturn+happyError' :: () => (Token) -> P a+happyError' tk = (\token -> happyError) tk++mkparse = happySomeParser where+  happySomeParser = happyThen (happyParse 0#) (\x -> happyReturn (happyOut6 x))++mkparseTerm = happySomeParser where+  happySomeParser = happyThen (happyParse 1#) (\x -> happyReturn (happyOut31 x))++mkparseTactic = happySomeParser where+  happySomeParser = happyThen (happyParse 2#) (\x -> happyReturn (happyOut70 x))++happySeq = happyDontSeq+++data ConParse = Full Id RawTerm+              | Simple Id [RawTerm]++parse :: String -> FilePath -> Result [Decl]+parse s fn = do ds <- mkparse s fn 1 []+                collectDecls ds++processImports :: [Opt] -> [FilePath] -> Result [Decl] -> +                  IO ([Decl], [FilePath])+processImports opts imped (Success ds) = pi imped [] ds+  where pi imps decls ((PInclude fp):xs)+           | fp `elem` imps = pi imps decls xs+           | otherwise = do+                 f <- readLibFile defaultLibPath fp+                 when (Verbose `elem` opts) $ putStrLn ("Reading " ++ fp)+                 case parse f fp of+                   Success t -> pi (fp:imps) decls (t++xs)+                   Failure e f l ->+                     fail $ f ++ ":" ++ show l ++ ":" ++ e+        pi imps decls ((Using t ds):xs)+            = do (ds',imps') <- pi imps [] ds+                 pi imps' (decls++[Using t ds']) xs+        pi imps decls ((Params t ds):xs)+            = do (ds',imps') <- pi imps [] ds+                 pi imps' (decls++[Params t ds']) xs+        pi imps decls ((DoUsing b r ds):xs)+            = do (ds',imps') <- pi imps [] ds+                 pi imps' (decls++[DoUsing b r ds']) xs+        pi imps decls ((Idiom b r ds):xs)+            = do (ds',imps') <- pi imps [] ds+                 pi imps' (decls++[Idiom b r ds']) xs+        pi imps decls (x:xs) = pi imps (decls++[x]) xs+        pi imps decls [] = return (decls, imps)++processImports _ imped (Failure e f l) +    = fail $ show f ++ ":" ++ show l ++ ":" ++ show e+++parseTerm :: String -> Result RawTerm+parseTerm s = mkparseTerm s "(input)" 0 []++parseTactic :: String -> Result ITactic+parseTactic s = mkparseTactic s "(tactic)" 0 []++mkCon :: RawTerm -> ConParse -> (Id,RawTerm)+mkCon _ (Full n t) = (n,t)+mkCon ty (Simple n args) = (n, mkConTy args ty)+   where mkConTy [] ty = ty+         mkConTy (a:as) ty = RBind (MN "X" 0) (Pi Ex Eager a) (mkConTy as ty)++mkDef file line (n, tms) = mkImpApp (RVar file line n) tms+   where mkImpApp f [] = f+         mkImpApp f ((tm,Just n):ts) = mkImpApp (RAppImp file line n f tm) ts+         mkImpApp f ((tm, Nothing):ts) = mkImpApp (RApp file line f tm) ts++doBind :: (RawTerm -> RBinder) -> [(Id,RawTerm)] -> RawTerm -> RawTerm+doBind b [] t = t+doBind b ((x,ty):ts) tm = RBind x (b ty) (doBind b ts tm)++doLetBind :: [(Id,RawTerm,RawTerm)] -> RawTerm -> RawTerm+doLetBind [] t = t+doLetBind ((x,ty,val):ts) tm = RBind x (RLet val ty) (doLetBind ts tm)++mkTyApp :: String -> Int -> Id -> RawTerm -> RawTerm+mkTyApp file line n ty = mkApp file line (RVar file line n) (getTyArgs ty)+   where getTyArgs (RBind n _ t) = (RVar file line n):(getTyArgs t)+         getTyArgs x = []++mkTyParams :: String -> Int -> [Id] -> RawTerm+mkTyParams f l [] = RConst f l TYPE+mkTyParams f l (x:xs) = RBind x (Pi Ex Eager (RConst f l TYPE)) (mkTyParams f l xs)++mkDatatype :: String -> Int ->+              Id -> Either RawTerm ((RawTerm, [(Id, RawTerm)]), [ConParse]) -> +                    [TyOpt] -> Datatype+mkDatatype file line n (Right ((t, using), cons)) opts+    = Datatype n t (map (mkCon (mkTyApp file line n t)) cons) using opts file line +mkDatatype file line n (Left t) opts+    = Latatype n t file line++bracket (RUserInfix f l _ op x y) = RUserInfix f l True op x y+bracket x = x++pairDesugar :: String -> Int -> RawTerm -> [RawTerm] -> RawTerm+pairDesugar file line pair [x,y] = mkApp file line pair [x,y]+pairDesugar file line pair (x:y:xs) +    = pairDesugar file line pair ((mkApp file line pair [x,y]):xs)++sigDesugar :: String -> Int -> (Id, RawTerm) -> RawTerm -> RawTerm+sigDesugar file line (n, tm) sc+    = mkApp file line (RVar file line (UN "Sigma")) [tm, lam]+   where lam = RBind n (Lam tm) sc+{-# LINE 1 "templates/GenericTemplate.hs" #-}+{-# LINE 1 "templates/GenericTemplate.hs" #-}+{-# LINE 1 "<built-in>" #-}+{-# LINE 1 "<command line>" #-}+{-# LINE 1 "templates/GenericTemplate.hs" #-}+-- Id: GenericTemplate.hs,v 1.26 2005/01/14 14:47:22 simonmar Exp ++{-# LINE 28 "templates/GenericTemplate.hs" #-}+++data Happy_IntList = HappyCons Int# Happy_IntList++++++{-# LINE 49 "templates/GenericTemplate.hs" #-}++{-# LINE 59 "templates/GenericTemplate.hs" #-}++{-# LINE 68 "templates/GenericTemplate.hs" #-}++infixr 9 `HappyStk`+data HappyStk a = HappyStk a (HappyStk a)++-----------------------------------------------------------------------------+-- starting the parse++happyParse start_state = happyNewToken start_state notHappyAtAll notHappyAtAll++-----------------------------------------------------------------------------+-- Accepting the parse++-- If the current token is 0#, it means we've just accepted a partial+-- parse (a %partial parser).  We must ignore the saved token on the top of+-- the stack in this case.+happyAccept 0# tk st sts (_ `HappyStk` ans `HappyStk` _) =+	happyReturn1 ans+happyAccept j tk st sts (HappyStk ans _) = +	(happyTcHack j (happyTcHack st)) (happyReturn1 ans)++-----------------------------------------------------------------------------+-- Arrays only: do the next action++++happyDoAction i tk st+	= {- nothing -}+++	  case action of+		0#		  -> {- nothing -}+				     happyFail i tk st+		-1# 	  -> {- nothing -}+				     happyAccept i tk st+		n | (n <# (0# :: Int#)) -> {- nothing -}++				     (happyReduceArr ! rule) i tk st+				     where rule = (I# ((negateInt# ((n +# (1# :: Int#))))))+		n		  -> {- nothing -}+++				     happyShift new_state i tk st+				     where new_state = (n -# (1# :: Int#))+   where off    = indexShortOffAddr happyActOffsets st+	 off_i  = (off +# i)+	 check  = if (off_i >=# (0# :: Int#))+			then (indexShortOffAddr happyCheck off_i ==#  i)+			else False+ 	 action | check     = indexShortOffAddr happyTable off_i+		| otherwise = indexShortOffAddr happyDefActions st++{-# LINE 127 "templates/GenericTemplate.hs" #-}+++indexShortOffAddr (HappyA# arr) off =+#if __GLASGOW_HASKELL__ > 500+	narrow16Int# i+#elif __GLASGOW_HASKELL__ == 500+	intToInt16# i+#else+	(i `iShiftL#` 16#) `iShiftRA#` 16#+#endif+  where+#if __GLASGOW_HASKELL__ >= 503+	i = word2Int# ((high `uncheckedShiftL#` 8#) `or#` low)+#else+	i = word2Int# ((high `shiftL#` 8#) `or#` low)+#endif+	high = int2Word# (ord# (indexCharOffAddr# arr (off' +# 1#)))+	low  = int2Word# (ord# (indexCharOffAddr# arr off'))+	off' = off *# 2#++++++data HappyAddr = HappyA# Addr#+++++-----------------------------------------------------------------------------+-- HappyState data type (not arrays)++{-# LINE 170 "templates/GenericTemplate.hs" #-}++-----------------------------------------------------------------------------+-- Shifting a token++happyShift new_state 0# tk st sts stk@(x `HappyStk` _) =+     let i = (case unsafeCoerce# x of { (I# (i)) -> i }) in+--     trace "shifting the error token" $+     happyDoAction i tk new_state (HappyCons (st) (sts)) (stk)++happyShift new_state i tk st sts stk =+     happyNewToken new_state (HappyCons (st) (sts)) ((happyInTok (tk))`HappyStk`stk)++-- happyReduce is specialised for the common cases.++happySpecReduce_0 i fn 0# tk st sts stk+     = happyFail 0# tk st sts stk+happySpecReduce_0 nt fn j tk st@((action)) sts stk+     = happyGoto nt j tk st (HappyCons (st) (sts)) (fn `HappyStk` stk)++happySpecReduce_1 i fn 0# tk st sts stk+     = happyFail 0# tk st sts stk+happySpecReduce_1 nt fn j tk _ sts@((HappyCons (st@(action)) (_))) (v1`HappyStk`stk')+     = let r = fn v1 in+       happySeq r (happyGoto nt j tk st sts (r `HappyStk` stk'))++happySpecReduce_2 i fn 0# tk st sts stk+     = happyFail 0# tk st sts stk+happySpecReduce_2 nt fn j tk _ (HappyCons (_) (sts@((HappyCons (st@(action)) (_))))) (v1`HappyStk`v2`HappyStk`stk')+     = let r = fn v1 v2 in+       happySeq r (happyGoto nt j tk st sts (r `HappyStk` stk'))++happySpecReduce_3 i fn 0# tk st sts stk+     = happyFail 0# tk st sts stk+happySpecReduce_3 nt fn j tk _ (HappyCons (_) ((HappyCons (_) (sts@((HappyCons (st@(action)) (_))))))) (v1`HappyStk`v2`HappyStk`v3`HappyStk`stk')+     = let r = fn v1 v2 v3 in+       happySeq r (happyGoto nt j tk st sts (r `HappyStk` stk'))++happyReduce k i fn 0# tk st sts stk+     = happyFail 0# tk st sts stk+happyReduce k nt fn j tk st sts stk+     = case happyDrop (k -# (1# :: Int#)) sts of+	 sts1@((HappyCons (st1@(action)) (_))) ->+        	let r = fn stk in  -- it doesn't hurt to always seq here...+       		happyDoSeq r (happyGoto nt j tk st1 sts1 r)++happyMonadReduce k nt fn 0# tk st sts stk+     = happyFail 0# tk st sts stk+happyMonadReduce k nt fn j tk st sts stk =+        happyThen1 (fn stk tk) (\r -> happyGoto nt j tk st1 sts1 (r `HappyStk` drop_stk))+       where sts1@((HappyCons (st1@(action)) (_))) = happyDrop k (HappyCons (st) (sts))+             drop_stk = happyDropStk k stk++happyMonad2Reduce k nt fn 0# tk st sts stk+     = happyFail 0# tk st sts stk+happyMonad2Reduce k nt fn j tk st sts stk =+       happyThen1 (fn stk tk) (\r -> happyNewToken new_state sts1 (r `HappyStk` drop_stk))+       where sts1@((HappyCons (st1@(action)) (_))) = happyDrop k (HappyCons (st) (sts))+             drop_stk = happyDropStk k stk++             off    = indexShortOffAddr happyGotoOffsets st1+             off_i  = (off +# nt)+             new_state = indexShortOffAddr happyTable off_i+++++happyDrop 0# l = l+happyDrop n (HappyCons (_) (t)) = happyDrop (n -# (1# :: Int#)) t++happyDropStk 0# l = l+happyDropStk n (x `HappyStk` xs) = happyDropStk (n -# (1#::Int#)) xs++-----------------------------------------------------------------------------+-- Moving to a new state after a reduction+++happyGoto nt j tk st = +   {- nothing -}+   happyDoAction j tk new_state+   where off    = indexShortOffAddr happyGotoOffsets st+	 off_i  = (off +# nt)+ 	 new_state = indexShortOffAddr happyTable off_i+++++-----------------------------------------------------------------------------+-- Error recovery (0# is the error token)++-- parse error if we are in recovery and we fail again+happyFail  0# tk old_st _ stk =+--	trace "failing" $ +    	happyError_ tk++{-  We don't need state discarding for our restricted implementation of+    "error".  In fact, it can cause some bogus parses, so I've disabled it+    for now --SDM++-- discard a state+happyFail  0# tk old_st (HappyCons ((action)) (sts)) +						(saved_tok `HappyStk` _ `HappyStk` stk) =+--	trace ("discarding state, depth " ++ show (length stk))  $+	happyDoAction 0# tk action sts ((saved_tok`HappyStk`stk))+-}++-- Enter error recovery: generate an error token,+--                       save the old token and carry on.+happyFail  i tk (action) sts stk =+--      trace "entering error recovery" $+	happyDoAction 0# tk action sts ( (unsafeCoerce# (I# (i))) `HappyStk` stk)++-- Internal happy errors:++notHappyAtAll = error "Internal Happy error\n"++-----------------------------------------------------------------------------+-- Hack to get the typechecker to accept our action functions+++happyTcHack :: Int# -> a -> a+happyTcHack x y = y+{-# INLINE happyTcHack #-}+++-----------------------------------------------------------------------------+-- Seq-ing.  If the --strict flag is given, then Happy emits +--	happySeq = happyDoSeq+-- otherwise it emits+-- 	happySeq = happyDontSeq++happyDoSeq, happyDontSeq :: a -> b -> b+happyDoSeq   a b = a `seq` b+happyDontSeq a b = b++-----------------------------------------------------------------------------+-- Don't inline any functions from the template.  GHC has a nasty habit+-- of deciding to inline happyGoto everywhere, which increases the size of+-- the generated parser quite a bit.+++{-# NOINLINE happyDoAction #-}+{-# NOINLINE happyTable #-}+{-# NOINLINE happyCheck #-}+{-# NOINLINE happyActOffsets #-}+{-# NOINLINE happyGotoOffsets #-}+{-# NOINLINE happyDefActions #-}++{-# NOINLINE happyShift #-}+{-# NOINLINE happySpecReduce_0 #-}+{-# NOINLINE happySpecReduce_1 #-}+{-# NOINLINE happySpecReduce_2 #-}+{-# NOINLINE happySpecReduce_3 #-}+{-# NOINLINE happyReduce #-}+{-# NOINLINE happyMonadReduce #-}+{-# NOINLINE happyGoto #-}+{-# NOINLINE happyFail #-}++-- end of Happy Template.
+ dist/build/Idris/idris-tmp/Idris/Parser.hs view
@@ -0,0 +1,3617 @@+{-# OPTIONS -fglasgow-exts -cpp #-}+-- -*-Haskell-*-+{-# OPTIONS_GHC -fglasgow-exts #-}++module Idris.Parser where++import Data.Char+import Ivor.TT+import System.IO.Unsafe+import List+import Control.Monad++import Idris.AbsSyntax+import Idris.Lexer+import Idris.Lib++import Debug.Trace+#if __GLASGOW_HASKELL__ >= 503+import Data.Array+#else+import Array+#endif+#if __GLASGOW_HASKELL__ >= 503+import GHC.Exts+#else+import GlaExts+#endif++-- parser produced by Happy Version 1.18.2++newtype HappyAbsSyn t66 = HappyAbsSyn HappyAny+#if __GLASGOW_HASKELL__ >= 607+type HappyAny = GHC.Exts.Any+#else+type HappyAny = forall a . a+#endif+happyIn6 :: ([ParseDecl]) -> (HappyAbsSyn t66)+happyIn6 x = unsafeCoerce# x+{-# INLINE happyIn6 #-}+happyOut6 :: (HappyAbsSyn t66) -> ([ParseDecl])+happyOut6 x = unsafeCoerce# x+{-# INLINE happyOut6 #-}+happyIn7 :: (ParseDecl) -> (HappyAbsSyn t66)+happyIn7 x = unsafeCoerce# x+{-# INLINE happyIn7 #-}+happyOut7 :: (HappyAbsSyn t66) -> (ParseDecl)+happyOut7 x = unsafeCoerce# x+{-# INLINE happyOut7 #-}+happyIn8 :: (Decl) -> (HappyAbsSyn t66)+happyIn8 x = unsafeCoerce# x+{-# INLINE happyIn8 #-}+happyOut8 :: (HappyAbsSyn t66) -> (Decl)+happyOut8 x = unsafeCoerce# x+{-# INLINE happyOut8 #-}+happyIn9 :: (ParseDecl) -> (HappyAbsSyn t66)+happyIn9 x = unsafeCoerce# x+{-# INLINE happyIn9 #-}+happyOut9 :: (HappyAbsSyn t66) -> (ParseDecl)+happyOut9 x = unsafeCoerce# x+{-# INLINE happyOut9 #-}+happyIn10 :: (Bool) -> (HappyAbsSyn t66)+happyIn10 x = unsafeCoerce# x+{-# INLINE happyIn10 #-}+happyOut10 :: (HappyAbsSyn t66) -> (Bool)+happyOut10 x = unsafeCoerce# x+{-# INLINE happyOut10 #-}+happyIn11 :: ([RawTerm]) -> (HappyAbsSyn t66)+happyIn11 x = unsafeCoerce# x+{-# INLINE happyIn11 #-}+happyOut11 :: (HappyAbsSyn t66) -> ([RawTerm])+happyOut11 x = unsafeCoerce# x+{-# INLINE happyOut11 #-}+happyIn12 :: (RawTerm) -> (HappyAbsSyn t66)+happyIn12 x = unsafeCoerce# x+{-# INLINE happyIn12 #-}+happyOut12 :: (HappyAbsSyn t66) -> (RawTerm)+happyOut12 x = unsafeCoerce# x+{-# INLINE happyOut12 #-}+happyIn13 :: ([ParseDecl]) -> (HappyAbsSyn t66)+happyIn13 x = unsafeCoerce# x+{-# INLINE happyIn13 #-}+happyOut13 :: (HappyAbsSyn t66) -> ([ParseDecl])+happyOut13 x = unsafeCoerce# x+{-# INLINE happyOut13 #-}+happyIn14 :: ([CGFlag]) -> (HappyAbsSyn t66)+happyIn14 x = unsafeCoerce# x+{-# INLINE happyIn14 #-}+happyOut14 :: (HappyAbsSyn t66) -> ([CGFlag])+happyOut14 x = unsafeCoerce# x+{-# INLINE happyOut14 #-}+happyIn15 :: ([CGFlag]) -> (HappyAbsSyn t66)+happyIn15 x = unsafeCoerce# x+{-# INLINE happyIn15 #-}+happyOut15 :: (HappyAbsSyn t66) -> ([CGFlag])+happyOut15 x = unsafeCoerce# x+{-# INLINE happyOut15 #-}+happyIn16 :: ([Decl]) -> (HappyAbsSyn t66)+happyIn16 x = unsafeCoerce# x+{-# INLINE happyIn16 #-}+happyOut16 :: (HappyAbsSyn t66) -> ([Decl])+happyOut16 x = unsafeCoerce# x+{-# INLINE happyOut16 #-}+happyIn17 :: ([String]) -> (HappyAbsSyn t66)+happyIn17 x = unsafeCoerce# x+{-# INLINE happyIn17 #-}+happyOut17 :: (HappyAbsSyn t66) -> ([String])+happyOut17 x = unsafeCoerce# x+{-# INLINE happyOut17 #-}+happyIn18 :: (String) -> (HappyAbsSyn t66)+happyIn18 x = unsafeCoerce# x+{-# INLINE happyIn18 #-}+happyOut18 :: (HappyAbsSyn t66) -> (String)+happyOut18 x = unsafeCoerce# x+{-# INLINE happyOut18 #-}+happyIn19 :: (Fixity) -> (HappyAbsSyn t66)+happyIn19 x = unsafeCoerce# x+{-# INLINE happyIn19 #-}+happyOut19 :: (HappyAbsSyn t66) -> (Fixity)+happyOut19 x = unsafeCoerce# x+{-# INLINE happyOut19 #-}+happyIn20 :: (Decl) -> (HappyAbsSyn t66)+happyIn20 x = unsafeCoerce# x+{-# INLINE happyIn20 #-}+happyOut20 :: (HappyAbsSyn t66) -> (Decl)+happyOut20 x = unsafeCoerce# x+{-# INLINE happyOut20 #-}+happyIn21 :: ([(Id,String)]) -> (HappyAbsSyn t66)+happyIn21 x = unsafeCoerce# x+{-# INLINE happyIn21 #-}+happyOut21 :: (HappyAbsSyn t66) -> ([(Id,String)])+happyOut21 x = unsafeCoerce# x+{-# INLINE happyOut21 #-}+happyIn22 :: ((Id, [(RawTerm, Maybe Id)])) -> (HappyAbsSyn t66)+happyIn22 x = unsafeCoerce# x+{-# INLINE happyIn22 #-}+happyOut22 :: (HappyAbsSyn t66) -> ((Id, [(RawTerm, Maybe Id)]))+happyOut22 x = unsafeCoerce# x+{-# INLINE happyOut22 #-}+happyIn23 :: ([(RawTerm,Maybe Id)]) -> (HappyAbsSyn t66)+happyIn23 x = unsafeCoerce# x+{-# INLINE happyIn23 #-}+happyOut23 :: (HappyAbsSyn t66) -> ([(RawTerm,Maybe Id)])+happyOut23 x = unsafeCoerce# x+{-# INLINE happyOut23 #-}+happyIn24 :: (Datatype) -> (HappyAbsSyn t66)+happyIn24 x = unsafeCoerce# x+{-# INLINE happyIn24 #-}+happyOut24 :: (HappyAbsSyn t66) -> (Datatype)+happyOut24 x = unsafeCoerce# x+{-# INLINE happyOut24 #-}+happyIn25 :: (Either RawTerm ((RawTerm, [(Id, RawTerm)]), [ConParse])) -> (HappyAbsSyn t66)+happyIn25 x = unsafeCoerce# x+{-# INLINE happyIn25 #-}+happyOut25 :: (HappyAbsSyn t66) -> (Either RawTerm ((RawTerm, [(Id, RawTerm)]), [ConParse]))+happyOut25 x = unsafeCoerce# x+{-# INLINE happyOut25 #-}+happyIn26 :: ([TyOpt]) -> (HappyAbsSyn t66)+happyIn26 x = unsafeCoerce# x+{-# INLINE happyIn26 #-}+happyOut26 :: (HappyAbsSyn t66) -> ([TyOpt])+happyOut26 x = unsafeCoerce# x+{-# INLINE happyOut26 #-}+happyIn27 :: ([TyOpt]) -> (HappyAbsSyn t66)+happyIn27 x = unsafeCoerce# x+{-# INLINE happyIn27 #-}+happyOut27 :: (HappyAbsSyn t66) -> ([TyOpt])+happyOut27 x = unsafeCoerce# x+{-# INLINE happyOut27 #-}+happyIn28 :: (TyOpt) -> (HappyAbsSyn t66)+happyIn28 x = unsafeCoerce# x+{-# INLINE happyIn28 #-}+happyOut28 :: (HappyAbsSyn t66) -> (TyOpt)+happyOut28 x = unsafeCoerce# x+{-# INLINE happyOut28 #-}+happyIn29 :: (Id) -> (HappyAbsSyn t66)+happyIn29 x = unsafeCoerce# x+{-# INLINE happyIn29 #-}+happyOut29 :: (HappyAbsSyn t66) -> (Id)+happyOut29 x = unsafeCoerce# x+{-# INLINE happyOut29 #-}+happyIn30 :: (RawTerm) -> (HappyAbsSyn t66)+happyIn30 x = unsafeCoerce# x+{-# INLINE happyIn30 #-}+happyOut30 :: (HappyAbsSyn t66) -> (RawTerm)+happyOut30 x = unsafeCoerce# x+{-# INLINE happyOut30 #-}+happyIn31 :: (RawTerm) -> (HappyAbsSyn t66)+happyIn31 x = unsafeCoerce# x+{-# INLINE happyIn31 #-}+happyOut31 :: (HappyAbsSyn t66) -> (RawTerm)+happyOut31 x = unsafeCoerce# x+{-# INLINE happyOut31 #-}+happyIn32 :: ([(Id, RawTerm)]) -> (HappyAbsSyn t66)+happyIn32 x = unsafeCoerce# x+{-# INLINE happyIn32 #-}+happyOut32 :: (HappyAbsSyn t66) -> ([(Id, RawTerm)])+happyOut32 x = unsafeCoerce# x+{-# INLINE happyOut32 #-}+happyIn33 :: ([(Id, RawTerm)]) -> (HappyAbsSyn t66)+happyIn33 x = unsafeCoerce# x+{-# INLINE happyIn33 #-}+happyOut33 :: (HappyAbsSyn t66) -> ([(Id, RawTerm)])+happyOut33 x = unsafeCoerce# x+{-# INLINE happyOut33 #-}+happyIn34 :: ([(Id, RawTerm)]) -> (HappyAbsSyn t66)+happyIn34 x = unsafeCoerce# x+{-# INLINE happyIn34 #-}+happyOut34 :: (HappyAbsSyn t66) -> ([(Id, RawTerm)])+happyOut34 x = unsafeCoerce# x+{-# INLINE happyOut34 #-}+happyIn35 :: ([Id]) -> (HappyAbsSyn t66)+happyIn35 x = unsafeCoerce# x+{-# INLINE happyIn35 #-}+happyOut35 :: (HappyAbsSyn t66) -> ([Id])+happyOut35 x = unsafeCoerce# x+{-# INLINE happyOut35 #-}+happyIn36 :: ([(Id, Int)]) -> (HappyAbsSyn t66)+happyIn36 x = unsafeCoerce# x+{-# INLINE happyIn36 #-}+happyOut36 :: (HappyAbsSyn t66) -> ([(Id, Int)])+happyOut36 x = unsafeCoerce# x+{-# INLINE happyOut36 #-}+happyIn37 :: ([Id]) -> (HappyAbsSyn t66)+happyIn37 x = unsafeCoerce# x+{-# INLINE happyIn37 #-}+happyOut37 :: (HappyAbsSyn t66) -> ([Id])+happyOut37 x = unsafeCoerce# x+{-# INLINE happyOut37 #-}+happyIn38 :: ([Id]) -> (HappyAbsSyn t66)+happyIn38 x = unsafeCoerce# x+{-# INLINE happyIn38 #-}+happyOut38 :: (HappyAbsSyn t66) -> ([Id])+happyOut38 x = unsafeCoerce# x+{-# INLINE happyOut38 #-}+happyIn39 :: ([(Id, RawTerm, RawTerm)]) -> (HappyAbsSyn t66)+happyIn39 x = unsafeCoerce# x+{-# INLINE happyIn39 #-}+happyOut39 :: (HappyAbsSyn t66) -> ([(Id, RawTerm, RawTerm)])+happyOut39 x = unsafeCoerce# x+{-# INLINE happyOut39 #-}+happyIn40 :: ((Id, RawTerm)) -> (HappyAbsSyn t66)+happyIn40 x = unsafeCoerce# x+{-# INLINE happyIn40 #-}+happyOut40 :: (HappyAbsSyn t66) -> ((Id, RawTerm))+happyOut40 x = unsafeCoerce# x+{-# INLINE happyOut40 #-}+happyIn41 :: (RawTerm) -> (HappyAbsSyn t66)+happyIn41 x = unsafeCoerce# x+{-# INLINE happyIn41 #-}+happyOut41 :: (HappyAbsSyn t66) -> (RawTerm)+happyOut41 x = unsafeCoerce# x+{-# INLINE happyOut41 #-}+happyIn42 :: (RawTerm) -> (HappyAbsSyn t66)+happyIn42 x = unsafeCoerce# x+{-# INLINE happyIn42 #-}+happyOut42 :: (HappyAbsSyn t66) -> (RawTerm)+happyOut42 x = unsafeCoerce# x+{-# INLINE happyOut42 #-}+happyIn43 :: (RawTerm) -> (HappyAbsSyn t66)+happyIn43 x = unsafeCoerce# x+{-# INLINE happyIn43 #-}+happyOut43 :: (HappyAbsSyn t66) -> (RawTerm)+happyOut43 x = unsafeCoerce# x+{-# INLINE happyOut43 #-}+happyIn44 :: (String) -> (HappyAbsSyn t66)+happyIn44 x = unsafeCoerce# x+{-# INLINE happyIn44 #-}+happyOut44 :: (HappyAbsSyn t66) -> (String)+happyOut44 x = unsafeCoerce# x+{-# INLINE happyOut44 #-}+happyIn45 :: (RawTerm) -> (HappyAbsSyn t66)+happyIn45 x = unsafeCoerce# x+{-# INLINE happyIn45 #-}+happyOut45 :: (HappyAbsSyn t66) -> (RawTerm)+happyOut45 x = unsafeCoerce# x+{-# INLINE happyOut45 #-}+happyIn46 :: (RawTerm) -> (HappyAbsSyn t66)+happyIn46 x = unsafeCoerce# x+{-# INLINE happyIn46 #-}+happyOut46 :: (HappyAbsSyn t66) -> (RawTerm)+happyOut46 x = unsafeCoerce# x+{-# INLINE happyOut46 #-}+happyIn47 :: (RawTerm) -> (HappyAbsSyn t66)+happyIn47 x = unsafeCoerce# x+{-# INLINE happyIn47 #-}+happyOut47 :: (HappyAbsSyn t66) -> (RawTerm)+happyOut47 x = unsafeCoerce# x+{-# INLINE happyOut47 #-}+happyIn48 :: (RawTerm) -> (HappyAbsSyn t66)+happyIn48 x = unsafeCoerce# x+{-# INLINE happyIn48 #-}+happyOut48 :: (HappyAbsSyn t66) -> (RawTerm)+happyOut48 x = unsafeCoerce# x+{-# INLINE happyOut48 #-}+happyIn49 :: (RawTerm) -> (HappyAbsSyn t66)+happyIn49 x = unsafeCoerce# x+{-# INLINE happyIn49 #-}+happyOut49 :: (HappyAbsSyn t66) -> (RawTerm)+happyOut49 x = unsafeCoerce# x+{-# INLINE happyOut49 #-}+happyIn50 :: ([RawTerm]) -> (HappyAbsSyn t66)+happyIn50 x = unsafeCoerce# x+{-# INLINE happyIn50 #-}+happyOut50 :: (HappyAbsSyn t66) -> ([RawTerm])+happyOut50 x = unsafeCoerce# x+{-# INLINE happyOut50 #-}+happyIn51 :: (RawTerm) -> (HappyAbsSyn t66)+happyIn51 x = unsafeCoerce# x+{-# INLINE happyIn51 #-}+happyOut51 :: (HappyAbsSyn t66) -> (RawTerm)+happyOut51 x = unsafeCoerce# x+{-# INLINE happyOut51 #-}+happyIn52 :: (RawTerm) -> (HappyAbsSyn t66)+happyIn52 x = unsafeCoerce# x+{-# INLINE happyIn52 #-}+happyOut52 :: (HappyAbsSyn t66) -> (RawTerm)+happyOut52 x = unsafeCoerce# x+{-# INLINE happyOut52 #-}+happyIn53 :: ([RawTerm]) -> (HappyAbsSyn t66)+happyIn53 x = unsafeCoerce# x+{-# INLINE happyIn53 #-}+happyOut53 :: (HappyAbsSyn t66) -> ([RawTerm])+happyOut53 x = unsafeCoerce# x+{-# INLINE happyOut53 #-}+happyIn54 :: ([Do]) -> (HappyAbsSyn t66)+happyIn54 x = unsafeCoerce# x+{-# INLINE happyIn54 #-}+happyOut54 :: (HappyAbsSyn t66) -> ([Do])+happyOut54 x = unsafeCoerce# x+{-# INLINE happyOut54 #-}+happyIn55 :: ([Do]) -> (HappyAbsSyn t66)+happyIn55 x = unsafeCoerce# x+{-# INLINE happyIn55 #-}+happyOut55 :: (HappyAbsSyn t66) -> ([Do])+happyOut55 x = unsafeCoerce# x+{-# INLINE happyOut55 #-}+happyIn56 :: (Do) -> (HappyAbsSyn t66)+happyIn56 x = unsafeCoerce# x+{-# INLINE happyIn56 #-}+happyOut56 :: (HappyAbsSyn t66) -> (Do)+happyOut56 x = unsafeCoerce# x+{-# INLINE happyOut56 #-}+happyIn57 :: (Constant) -> (HappyAbsSyn t66)+happyIn57 x = unsafeCoerce# x+{-# INLINE happyIn57 #-}+happyOut57 :: (HappyAbsSyn t66) -> (Constant)+happyOut57 x = unsafeCoerce# x+{-# INLINE happyOut57 #-}+happyIn58 :: ([RawTerm]) -> (HappyAbsSyn t66)+happyIn58 x = unsafeCoerce# x+{-# INLINE happyIn58 #-}+happyOut58 :: (HappyAbsSyn t66) -> ([RawTerm])+happyOut58 x = unsafeCoerce# x+{-# INLINE happyOut58 #-}+happyIn59 :: ((RawTerm, [(Id, RawTerm)])) -> (HappyAbsSyn t66)+happyIn59 x = unsafeCoerce# x+{-# INLINE happyIn59 #-}+happyOut59 :: (HappyAbsSyn t66) -> ((RawTerm, [(Id, RawTerm)]))+happyOut59 x = unsafeCoerce# x+{-# INLINE happyOut59 #-}+happyIn60 :: ([(Id, RawTerm)]) -> (HappyAbsSyn t66)+happyIn60 x = unsafeCoerce# x+{-# INLINE happyIn60 #-}+happyOut60 :: (HappyAbsSyn t66) -> ([(Id, RawTerm)])+happyOut60 x = unsafeCoerce# x+{-# INLINE happyOut60 #-}+happyIn61 :: ((Id,Id)) -> (HappyAbsSyn t66)+happyIn61 x = unsafeCoerce# x+{-# INLINE happyIn61 #-}+happyOut61 :: (HappyAbsSyn t66) -> ((Id,Id))+happyOut61 x = unsafeCoerce# x+{-# INLINE happyOut61 #-}+happyIn62 :: ((Id,Id)) -> (HappyAbsSyn t66)+happyIn62 x = unsafeCoerce# x+{-# INLINE happyIn62 #-}+happyOut62 :: (HappyAbsSyn t66) -> ((Id,Id))+happyOut62 x = unsafeCoerce# x+{-# INLINE happyOut62 #-}+happyIn63 :: ([(Id, RawTerm)]) -> (HappyAbsSyn t66)+happyIn63 x = unsafeCoerce# x+{-# INLINE happyIn63 #-}+happyOut63 :: (HappyAbsSyn t66) -> ([(Id, RawTerm)])+happyOut63 x = unsafeCoerce# x+{-# INLINE happyOut63 #-}+happyIn64 :: ([(Id, RawTerm)]) -> (HappyAbsSyn t66)+happyIn64 x = unsafeCoerce# x+{-# INLINE happyIn64 #-}+happyOut64 :: (HappyAbsSyn t66) -> ([(Id, RawTerm)])+happyOut64 x = unsafeCoerce# x+{-# INLINE happyOut64 #-}+happyIn65 :: ([Id]) -> (HappyAbsSyn t66)+happyIn65 x = unsafeCoerce# x+{-# INLINE happyIn65 #-}+happyOut65 :: (HappyAbsSyn t66) -> ([Id])+happyOut65 x = unsafeCoerce# x+{-# INLINE happyOut65 #-}+happyIn66 :: t66 -> (HappyAbsSyn t66)+happyIn66 x = unsafeCoerce# x+{-# INLINE happyIn66 #-}+happyOut66 :: (HappyAbsSyn t66) -> t66+happyOut66 x = unsafeCoerce# x+{-# INLINE happyOut66 #-}+happyIn67 :: ([ConParse]) -> (HappyAbsSyn t66)+happyIn67 x = unsafeCoerce# x+{-# INLINE happyIn67 #-}+happyOut67 :: (HappyAbsSyn t66) -> ([ConParse])+happyOut67 x = unsafeCoerce# x+{-# INLINE happyOut67 #-}+happyIn68 :: (ConParse) -> (HappyAbsSyn t66)+happyIn68 x = unsafeCoerce# x+{-# INLINE happyIn68 #-}+happyOut68 :: (HappyAbsSyn t66) -> (ConParse)+happyOut68 x = unsafeCoerce# x+{-# INLINE happyOut68 #-}+happyIn69 :: (RawTerm) -> (HappyAbsSyn t66)+happyIn69 x = unsafeCoerce# x+{-# INLINE happyIn69 #-}+happyOut69 :: (HappyAbsSyn t66) -> (RawTerm)+happyOut69 x = unsafeCoerce# x+{-# INLINE happyOut69 #-}+happyIn70 :: (ITactic) -> (HappyAbsSyn t66)+happyIn70 x = unsafeCoerce# x+{-# INLINE happyIn70 #-}+happyOut70 :: (HappyAbsSyn t66) -> (ITactic)+happyOut70 x = unsafeCoerce# x+{-# INLINE happyOut70 #-}+happyIn71 :: ([ITactic]) -> (HappyAbsSyn t66)+happyIn71 x = unsafeCoerce# x+{-# INLINE happyIn71 #-}+happyOut71 :: (HappyAbsSyn t66) -> ([ITactic])+happyOut71 x = unsafeCoerce# x+{-# INLINE happyOut71 #-}+happyIn72 :: ([ITactic]) -> (HappyAbsSyn t66)+happyIn72 x = unsafeCoerce# x+{-# INLINE happyIn72 #-}+happyOut72 :: (HappyAbsSyn t66) -> ([ITactic])+happyOut72 x = unsafeCoerce# x+{-# INLINE happyOut72 #-}+happyIn73 :: (LineNumber) -> (HappyAbsSyn t66)+happyIn73 x = unsafeCoerce# x+{-# INLINE happyIn73 #-}+happyOut73 :: (HappyAbsSyn t66) -> (LineNumber)+happyOut73 x = unsafeCoerce# x+{-# INLINE happyOut73 #-}+happyIn74 :: (String) -> (HappyAbsSyn t66)+happyIn74 x = unsafeCoerce# x+{-# INLINE happyIn74 #-}+happyOut74 :: (HappyAbsSyn t66) -> (String)+happyOut74 x = unsafeCoerce# x+{-# INLINE happyOut74 #-}+happyIn75 :: (Fixities) -> (HappyAbsSyn t66)+happyIn75 x = unsafeCoerce# x+{-# INLINE happyIn75 #-}+happyOut75 :: (HappyAbsSyn t66) -> (Fixities)+happyOut75 x = unsafeCoerce# x+{-# INLINE happyOut75 #-}+happyInTok :: (Token) -> (HappyAbsSyn t66)+happyInTok x = unsafeCoerce# x+{-# INLINE happyInTok #-}+happyOutTok :: (HappyAbsSyn t66) -> (Token)+happyOutTok x = unsafeCoerce# x+{-# INLINE happyOutTok #-}+++happyActOffsets :: HappyAddr+happyActOffsets = HappyA# "\x16\x00\x21\x05\x57\x0d\x00\x00\x20\x04\x6e\x01\x6e\x01\x21\x05\x00\x00\x3b\x03\xea\x02\x00\x00\x6e\x01\x00\x00\x21\x05\x21\x05\x00\x00\x21\x05\x21\x05\x21\x05\x21\x05\x00\x00\x00\x00\x00\x00\x85\x01\x00\x00\x00\x00\x00\x00\x00\x00\x61\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6e\x01\xfd\x08\x48\x02\x21\x05\x21\x05\x06\x08\x21\x05\x00\x00\x6e\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x21\x05\x00\x00\x00\x00\x00\x00\x4c\x01\x00\x00\x21\x05\x5b\x00\x1f\x04\x01\x00\x00\x00\x00\x00\x01\x00\x57\x04\x00\x00\x6f\x04\x00\x00\xf5\x01\x5b\x04\x5a\x04\x58\x04\x56\x04\x39\x09\xd1\x01\x4a\x04\x00\x00\x00\x00\x00\x00\x4b\x04\x49\x04\x48\x04\x5b\x00\x53\x04\x1b\x04\x43\x04\x51\x04\x21\x05\x50\x04\x46\x04\x00\x00\x00\x00\x1e\x04\x3d\x04\x5b\x00\x28\x04\x3c\x04\x5b\x00\x5b\x00\x5b\x00\x5b\x00\x5b\x00\x12\x02\x32\x04\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x00\x00\x13\x00\x00\x00\x00\x00\x99\x02\x00\x00\x00\x00\x00\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\x00\x00\xca\x07\x37\x04\xfc\xff\xe3\x08\x2d\x04\x77\x00\x39\x09\xd1\x01\x00\x00\x00\x00\x30\x04\xe4\x03\x14\x02\x00\x00\x26\x04\xd0\x04\x00\x00\x00\x00\x27\x04\x00\x00\x27\x04\x00\x00\xaa\x05\xa3\x08\xfa\x01\x4e\x04\x7f\x04\x1a\x04\x7f\x04\x7f\x04\x18\x04\x13\x04\x7f\x04\x7f\x04\x9e\x01\x67\x00\x00\x00\x7f\x04\xa6\x08\x5b\x00\x19\x04\xf3\x03\x00\x00\x06\x08\x0c\x04\x00\x00\x7f\x04\xfe\x03\x7f\x04\x7f\x04\x7f\x04\x7f\x04\x7f\x04\x00\x00\x78\x01\x5f\x01\x51\x01\x4f\x01\x42\x01\x1a\x01\x00\x00\x18\x01\x7f\x04\xf1\x00\x7f\x04\xb8\x00\x00\x00\xf6\x03\x00\x00\x5b\x00\x41\x00\x07\x00\x00\x00\x17\x04\x17\x04\x17\x04\x17\x04\x17\x04\x00\x00\x7f\x04\x17\x04\x06\x08\x00\x00\x00\x00\x00\x00\x7f\x04\xf5\x03\xfd\x08\x0f\x04\x07\x04\xe8\x03\xbe\x01\xfc\x03\x20\x01\xfa\x03\xd2\x08\xfd\x08\x00\x00\xfd\x08\xf7\x03\x00\x00\x22\x06\x00\x00\x22\x06\x00\x00\x22\x06\x00\x00\x22\x06\x00\x00\x7f\x04\x00\x00\x7f\x04\x7f\x04\x7f\x04\x7f\x04\x7f\x04\xfb\x03\x00\x00\x00\x00\x7f\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfb\xff\x22\x06\xee\x03\x2e\x04\x5b\x00\xe6\x03\x00\x00\xdd\x03\xdd\x03\xe3\x03\xf4\x03\xda\x03\xef\x03\xdd\x03\xdd\x03\xdd\x03\xa3\x03\x57\x0d\xed\x03\x50\x01\x0c\x00\xd0\x03\xca\x07\xdd\x03\x00\x00\x00\x00\xe1\x03\xdc\x03\xdb\x03\xd7\x03\x00\x00\x00\x00\x4c\x04\xe0\x03\x00\x00\x00\x00\xdd\x03\xdd\x03\xdd\x03\x00\x00\xd4\x03\xc1\x03\x00\x00\x00\x00\x84\x01\xde\x03\xce\x03\xb2\x03\xc8\x03\x5b\x00\xb1\x03\x01\x00\x5b\x00\xbd\x03\xad\x03\x00\x00\xdd\x03\x29\x0a\xc7\x03\x00\x00\xa4\x03\x00\x00\xdd\x03\x00\x00\x00\x00\x5b\x00\x00\x00\xe3\x08\x00\x00\x5b\x00\x5b\x00\xa8\x03\xe3\x08\x00\x00\x00\x00\x12\x02\x00\x00\x41\x05\x3f\x05\x11\x05\x00\x00\x00\x00\x00\x00\x00\x00\xdd\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xee\x04\x00\x00\x5b\x00\x00\x00\x8f\x00\xc3\x03\x00\x00\x00\x00\x00\x00\xb6\x03\xa9\x03\xfd\x08\xaf\x03\xa6\x03\x00\x00\x5b\x03\xb5\x01\xc0\x04\x00\x00\xd1\x01\x00\x00\xdd\x03\x9b\x00\xb3\x01\xdd\x03\x93\x03\x00\x00\x00\x00\x00\x00\x68\x03\x69\x08\x00\x00\x42\x08\xe6\x05\x00\x00\xfd\x08\x00\x00\xac\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x03\x00\x00\x99\x03\x00\x00\x06\x08\x00\x00\x89\x03\x00\x00\x00\x00\x00\x00\x00\x00\xfd\x08\xfd\x08\x84\x03\xe3\x08\x5b\x00\x70\x03\xe3\x08\x0c\x00\x5b\x00\x79\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9d\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x08\x42\x08\x42\x08\x42\x08\x42\x08\x42\x08\x00\x00\x00\x00\x00\x00\x00\x00\xfd\x08\x00\x00\x02\x00\xfd\x08\x04\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8e\x07\x00\x00\x52\x07\x00\x00\x16\x07\x00\x00\xda\x06\x97\x03\x95\x03\x94\x03\x92\x03\x8f\x03\x65\x00\x00\x00\x00\x00\xdd\x03\x9e\x06\x77\x03\x22\x06\xdd\x03\xcf\x00\x00\x00\x99\x00\x8d\x03\x82\x03\x00\x00\x57\x0d\x0c\x00\x60\x03\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x62\x06\x00\x00\x99\x00\x00\x00\x74\x03\x00\x00\x00\x00\x00\x00\xf8\xff\x00\x00\x26\x06\x7c\x03\x75\x03\x00\x00\x00\x00\x56\x03\x6f\x03\x0a\x03\x5b\x00\x51\x03\x00\x00\x5b\x00\x6e\x03\x00\x00\x00\x00\x5b\x00\x00\x00\x5b\x00\x00\x00\x06\x08\x00\x00\x00\x00\xe3\x08\x00\x00\x35\x03\x00\x00\x00\x00\x00\x00\x5b\x00\x99\x00\x67\x03\x00\x00\x00\x00\x00\x00\x6b\x03\xaa\x00\x64\x03\xe3\x08\x00\x00\x5b\x00\x00\x00\x58\x03\x5b\x00\x66\x03\x00\x00\xdd\x03\x00\x00\x22\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x03\x3a\x03\x50\x03\x00\x00\x00\x00\x00\x00\xcf\x00\xea\x05\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x03\x00\x00\x00\x00\x33\x03\x5b\x00\x00\x00\x00\x00\x00\x00\x42\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x69\x08\x8c\x03\x00\x00\xae\x05\x00\x00\x00\x00\x00\x00\x72\x05\x3f\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#++happyGotoOffsets :: HappyAddr+happyGotoOffsets = HappyA# "\x0c\x0a\x49\x0d\x0f\x03\x00\x00\x00\x00\xa2\x01\x3e\x03\x38\x0d\x00\x00\x27\x0d\x16\x0d\x00\x00\x3d\x03\x00\x00\x05\x0d\xf4\x0c\x00\x00\xe3\x0c\xd2\x0c\xc1\x0c\xb0\x0c\x00\x00\x00\x00\x09\x03\x33\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\x01\x35\x08\xc2\x01\x9f\x0c\x8e\x0c\x7a\x0d\x7d\x0c\x00\x00\x31\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x0c\x00\x00\x03\x03\x02\x03\x00\x00\x01\x03\x5b\x0c\x54\x01\x00\x00\xef\x09\x00\x00\x00\x00\xdc\x09\x00\x00\x00\x00\x38\x03\x00\x00\xf0\xff\x00\x00\x00\x00\x00\x00\x00\x00\x66\x00\x2b\x03\x73\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x03\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x33\x01\x00\x00\x0f\x01\x00\x00\x00\x00\x69\x01\x48\x00\x19\x03\x21\x00\x18\x03\x3d\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2a\x03\xe7\x02\x1c\x01\x00\x00\xe5\x02\x70\x05\x00\x00\xe4\x02\xe2\x02\xbf\x09\xac\x09\x8f\x09\x7c\x09\x00\x00\x28\x0a\x00\x00\x00\x00\x73\x0d\x00\x00\xf0\x02\x33\x00\x18\x02\x00\x00\x00\x00\xfe\x02\x00\x00\x14\x01\xe1\x02\xda\x02\x14\x07\xd7\x02\xd5\x02\x0c\x01\xd3\x02\x07\x01\x00\x00\x06\x01\x06\x01\x40\x01\x93\x00\x39\x0c\x00\x00\x28\x0c\x17\x0c\x00\x00\x00\x00\xd9\x03\x88\x03\x05\x01\x00\x00\x00\x00\x06\x0c\x92\x04\x19\x02\xcf\x02\x00\x00\xcd\x02\x68\x0d\x00\x00\xcb\x02\xf5\x0b\xc4\x02\xe4\x0b\xd3\x0b\xc2\x0b\xb1\x0b\xa0\x0b\xc3\x02\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00\x00\x00\xff\x00\x8f\x0b\xff\x00\x7e\x0b\xff\x00\x00\x00\x00\x00\x00\x00\x7f\x01\xff\x00\xff\x00\x00\x00\xfe\x00\xf5\x00\xf4\x00\xe9\x00\xe7\x00\xc1\x02\x6d\x0b\xd5\x00\x59\x0d\xbf\x02\xba\x02\x00\x00\x5c\x0b\x00\x00\xf9\x07\x00\x00\x00\x00\x00\x00\x08\x01\x00\x00\x00\x00\x00\x00\xc8\x00\xfe\x05\x00\x00\x6e\x05\x00\x00\xb9\x02\xab\x00\xb8\x02\xa3\x00\xa4\x02\x9e\x00\xb3\x02\x9d\x00\xb1\x02\x37\x03\x00\x00\xe6\x02\x4b\x0b\x3a\x0b\x44\x02\x95\x02\x00\x00\x00\x00\xa8\x02\x29\x0b\xa3\x02\x9d\x02\x9c\x02\x00\x00\x00\x00\xd1\x00\x95\x00\x00\x00\xd8\x06\xbd\x00\x00\x00\x00\x00\x18\x0b\x07\x0b\x00\x00\x00\x00\x00\x00\xd9\x02\xf6\x0a\xe5\x0a\xd4\x0a\x00\x00\xcf\x01\xb0\x02\x10\x02\x00\x00\x00\x00\x0a\x0a\xc3\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x98\x02\x97\x02\x94\x00\x00\x00\x94\x02\x93\x02\xb2\x0a\xa1\x0a\x90\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x76\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8a\x00\x00\x00\x42\x09\xbe\x02\x00\x00\x00\x00\x00\x00\x7f\x0a\x94\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6e\x0a\x00\x00\x00\x00\xbd\x02\x00\x00\xbd\x07\x8f\x02\x0a\x00\x43\x00\x00\x00\x81\x07\x83\x02\x82\x02\xc9\x01\x00\x00\x94\x00\x94\x00\x94\x00\x00\x00\x00\x00\x80\x02\x00\x00\x50\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x94\x00\x7b\x02\x7c\x01\x60\x02\xc1\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe3\x04\x00\x00\x00\x00\x00\x00\x94\x00\x03\x00\x94\x00\x00\x00\x4b\x01\x00\x00\x5d\x0a\x94\x00\x94\x00\x4c\x0a\x35\x02\x00\x00\x00\x00\x7a\x02\x00\x00\x4d\x0d\x00\x00\x4d\x0d\x94\x00\x74\x02\xb2\x02\x72\x02\x94\x00\x00\x00\x70\x02\x6f\x02\x6d\x02\x6a\x02\x68\x02\x67\x02\x63\x02\x00\x00\x62\x02\x00\x00\x4c\x02\x36\x09\x5f\x02\x00\x00\x52\x02\x00\x00\x51\x02\x00\x00\x61\x02\xe9\x01\x00\x00\x45\x07\xab\x01\x00\x00\x09\x07\x00\x00\x60\x00\x94\x00\x4b\x02\x4a\x02\x00\x00\x47\x02\x94\x00\x00\x00\x46\x02\x43\x02\x42\x02\x41\x02\x40\x02\x00\x00\x2e\x08\x2e\x08\x2e\x08\x2e\x08\x2e\x08\x2e\x08\x00\x00\x00\x00\x00\x00\x00\x00\x2f\x02\x00\x00\x00\x00\x0e\x02\x00\x00\x00\x00\x3e\x02\x32\x02\x29\x02\x21\x02\x00\x00\x2e\x08\x00\x00\x2e\x08\x00\x00\x2e\x08\x00\x00\x2e\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf9\x01\x3b\x0a\x2e\x08\x00\x00\x6c\x00\xc8\x07\x4b\x00\x00\x00\x2c\x02\x00\x00\x00\x00\x00\x00\x63\x01\x00\x00\x00\x00\x7a\x01\x00\x00\x00\x00\x1e\x02\x00\x00\x1c\x02\xf9\x08\x05\x02\x0b\x02\x00\x00\x00\x00\x00\x00\xf7\x01\xef\x01\xd6\x01\xa5\x01\x8a\x06\x00\x00\x00\x00\x00\x00\xdb\x01\x00\x00\x00\x00\x4b\x00\xcd\x01\x00\x00\x00\x00\xf9\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x00\x00\x37\x00\x00\x00\xf2\x07\x00\x00\x00\x00\xcd\x06\x9d\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x01\x56\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x06\x00\x00\x2f\x00\x17\x01\x00\x00\xf9\xff\x0b\x00\x91\x01\x8c\x07\x00\x00\x05\x00\x6f\x01\x9c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6b\x01\x00\x00\x00\x00\x00\x00\x36\x01\x00\x00\x25\x01\xf7\xff\x04\x08\xce\x00\x00\x00\x5e\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x79\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\x74\x01\x1c\x00\x00\x00\xec\xff\x04\x08\x60\x06\xd5\xff\x04\x08\x00\x00\x00\x00\x00\x00\x04\x08\x00\x00\x00\x00\xc5\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#++happyDefActions :: HappyAddr+happyDefActions = HappyA# "\x39\xff\x00\x00\x00\x00\x00\x00\x00\x00\x27\xff\x00\x00\x00\x00\x24\xff\x00\x00\x00\x00\x1f\xff\x00\x00\x1d\xff\x00\x00\x00\x00\x1a\xff\x00\x00\x00\x00\x00\x00\x00\x00\x15\xff\x14\xff\x0f\xff\x0f\xff\xa5\xff\x8a\xff\x58\xff\x59\xff\xac\xff\x57\xff\x5c\xff\x0f\xff\xb5\xff\x41\xff\x43\xff\x3f\xff\x42\xff\x40\xff\x63\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\xff\x00\x00\x49\xff\x48\xff\x47\xff\x4a\xff\x45\xff\x46\xff\x44\xff\x4b\xff\x00\x00\x60\xff\x0f\xff\x0f\xff\x00\x00\x0f\xff\x00\x00\x00\x00\x00\x00\x39\xff\xf0\xff\xf8\xff\x39\xff\x00\x00\xf6\xff\xe0\xff\xf7\xff\xc3\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbb\xff\xc8\xff\xca\xff\xc9\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xed\xff\xee\xff\x0f\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xce\xff\xcd\xff\xcc\xff\xcb\xff\x00\x00\x0f\xff\x0f\xff\xde\xff\x0f\xff\x00\x00\xaf\xff\x0f\xff\x0f\xff\x39\xff\x39\xff\x39\xff\x39\xff\xc4\xff\xc3\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfa\xff\xfb\xff\x7a\xff\x00\x00\x0f\xff\x10\xff\x7a\xff\x00\x00\x10\xff\x10\xff\x0f\xff\x0f\xff\x0f\xff\x64\xff\x0f\xff\x0f\xff\x0f\xff\x0f\xff\x00\x00\x00\x00\xce\xff\xcd\xff\x7c\xff\x7b\xff\x0f\xff\x0f\xff\x0f\xff\x00\x00\x6b\xff\x00\x00\x00\x00\x00\x00\x7a\xff\x00\x00\x10\xff\x00\x00\x00\x00\x10\xff\x00\x00\x0f\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\xff\x0f\xff\x0f\xff\x0f\xff\x0f\xff\x0f\xff\x0f\xff\x1e\xff\x0f\xff\x00\x00\x0f\xff\x00\x00\x0f\xff\x26\xff\x9e\xff\x28\xff\x00\x00\x0f\xff\x0f\xff\x67\xff\x0f\xff\x0f\xff\x0f\xff\x0f\xff\x0f\xff\x10\xff\x00\x00\x0f\xff\x00\x00\x0f\xff\x0f\xff\x61\xff\x00\x00\xa3\xff\x00\x00\x00\x00\x00\x00\xa0\xff\x0f\xff\x00\x00\x00\x00\x00\x00\x0f\xff\x00\x00\xab\xff\x00\x00\x00\x00\x10\xff\x0f\xff\x10\xff\x0f\xff\x10\xff\x0f\xff\x0f\xff\x0f\xff\x0f\xff\x0f\xff\x65\xff\x0f\xff\x7c\xff\x7b\xff\x0f\xff\x0f\xff\x00\x00\x5b\xff\x0f\xff\x00\x00\x10\xff\x10\xff\x10\xff\x5f\xff\x5e\xff\x0f\xff\x0f\xff\x00\x00\x4f\xff\x00\x00\x00\x00\x66\xff\x00\x00\x00\x00\x00\x00\x00\x00\xd0\xff\xe0\xff\x00\x00\x00\x00\x00\x00\xe3\xff\x00\x00\x78\xff\xd9\xff\x75\xff\x98\xff\xc3\xff\x00\x00\xea\xff\xc2\xff\x00\x00\x00\x00\x00\x00\x00\x00\x10\xff\x10\xff\x0f\xff\x00\x00\x10\xff\x10\xff\x00\x00\x00\x00\x00\x00\xb4\xff\x00\x00\xb9\xff\xb7\xff\xb6\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xff\x00\x00\x39\xff\x00\x00\x00\x00\x00\x00\xf5\xff\x00\x00\x0f\xff\x00\x00\xc7\xff\x00\x00\xf9\xff\x00\x00\x95\xff\x35\xff\x00\x00\x38\xff\x00\x00\x0f\xff\x32\xff\x2e\xff\x00\x00\x00\x00\x0f\xff\x0f\xff\x00\x00\xba\xff\x0f\xff\x0f\xff\x0f\xff\xb1\xff\xb0\xff\x0f\xff\xdd\xff\x00\x00\xae\xff\xad\xff\xf1\xff\xf2\xff\xf3\xff\xf4\xff\x0f\xff\x0f\xff\x00\x00\x0f\xff\xd9\xff\x00\x00\xd3\xff\xd7\xff\xd6\xff\xd4\xff\x00\x00\x00\x00\x00\x00\x00\x00\xe2\xff\x0f\xff\x0f\xff\x0f\xff\xe1\xff\x00\x00\xd1\xff\x00\x00\x0f\xff\x0f\xff\x00\x00\x7a\xff\x50\xff\x52\xff\x10\xff\x00\x00\xa8\xff\x62\xff\x90\xff\x0f\xff\x10\xff\x00\x00\x10\xff\x0f\xff\x53\xff\x10\xff\x10\xff\x10\xff\x10\xff\x10\xff\x10\xff\x10\xff\x00\x00\x10\xff\x00\x00\x10\xff\x00\x00\x0f\xff\x74\xff\x0f\xff\x6e\xff\x0f\xff\x71\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x79\xff\x00\x00\x0f\xff\x10\xff\x10\xff\xaa\xff\x10\xff\x0f\xff\x92\xff\x10\xff\x10\xff\x10\xff\x10\xff\x10\xff\x9d\xff\x8b\xff\x8e\xff\x8c\xff\x8d\xff\x8f\xff\x88\xff\xa9\xff\x89\xff\xa2\xff\x9f\xff\x00\x00\xa1\xff\x79\xff\x00\x00\x69\xff\x68\xff\x0f\xff\x10\xff\x10\xff\x10\xff\xb3\xff\x00\x00\x80\xff\x00\x00\x7f\xff\x00\x00\x5a\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\xff\x0f\xff\x00\x00\x00\x00\x00\x00\x0f\xff\x00\x00\x0f\xff\xcf\xff\x00\x00\x00\x00\x00\x00\x13\xff\x12\xff\x77\xff\x00\x00\x00\x00\xd2\xff\xd8\xff\x10\xff\x97\xff\x10\xff\xc3\xff\x10\xff\x00\x00\xe6\xff\x00\x00\xb8\xff\x10\xff\x10\xff\x39\xff\x0f\xff\x3e\xff\x00\x00\x2d\xff\x31\xff\x10\xff\x34\xff\x00\x00\x0f\xff\x00\x00\xc6\xff\xec\xff\x00\x00\x00\x00\xef\xff\x36\xff\x00\x00\xbf\xff\x2e\xff\xbe\xff\x3e\xff\x2a\xff\x2b\xff\x00\x00\x10\xff\x00\x00\xbd\xff\xbc\xff\x3b\xff\x00\x00\xda\xff\x00\x00\xdc\xff\xc0\xff\xc1\xff\x00\x00\x9b\xff\x00\x00\x00\x00\x11\xff\x00\x00\x0f\xff\x00\x00\x00\x00\x0f\xff\x10\xff\x00\x00\x4c\xff\x0f\xff\x10\xff\x0f\xff\x82\xff\x7e\xff\x83\xff\x86\xff\x84\xff\x85\xff\x87\xff\x7d\xff\x81\xff\xb2\xff\x6d\xff\x6c\xff\x10\xff\x73\xff\x72\xff\x00\x00\x10\xff\x56\xff\x10\xff\x0f\xff\x00\x00\x10\xff\x93\xff\x0f\xff\x10\xff\x00\x00\x76\xff\xd5\xff\x9c\xff\x00\x00\xeb\xff\xe4\xff\xdb\xff\x00\x00\x3c\xff\x3a\xff\x29\xff\x3d\xff\x2c\xff\x33\xff\x37\xff\xc5\xff\xe5\xff\x9a\xff\x00\x00\x0f\xff\xe7\xff\x10\xff\xa4\xff\x00\x00\x10\xff\x00\x00\x6a\xff\x70\xff\x4e\xff\x00\x00\x00\x00\xe9\xff\x10\xff\x99\xff\xe8\xff\x51\xff\x4d\xff"#++happyCheck :: HappyAddr+happyCheck = HappyA# "\xff\xff\x11\x00\x01\x00\x0b\x00\x02\x00\x0a\x00\x02\x00\x17\x00\x43\x00\x02\x00\x03\x00\x08\x00\x09\x00\x0c\x00\x02\x00\x13\x00\x17\x00\x10\x00\x0b\x00\x11\x00\x13\x00\x25\x00\x03\x00\x01\x00\x43\x00\x22\x00\x21\x00\x2b\x00\x20\x00\x2d\x00\x2e\x00\x0c\x00\x30\x00\x17\x00\x0c\x00\x33\x00\x1d\x00\x22\x00\x10\x00\x22\x00\x26\x00\x22\x00\x23\x00\x27\x00\x31\x00\x22\x00\x27\x00\x43\x00\x2e\x00\x41\x00\x2e\x00\x20\x00\x21\x00\x2e\x00\x17\x00\x3f\x00\x17\x00\x06\x00\x2e\x00\x44\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x02\x00\x03\x00\x3b\x00\x17\x00\x44\x00\x47\x00\x44\x00\x17\x00\x18\x00\x0b\x00\x4c\x00\x17\x00\x44\x00\x4f\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x45\x00\x3a\x00\x17\x00\x3a\x00\x01\x00\x47\x00\x1d\x00\x17\x00\x44\x00\x2e\x00\x4c\x00\x22\x00\x23\x00\x4f\x00\x33\x00\x02\x00\x27\x00\x02\x00\x69\x00\x10\x00\x06\x00\x22\x00\x6d\x00\x2e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x3d\x00\x3e\x00\x11\x00\x17\x00\x11\x00\x72\x00\x1a\x00\x02\x00\x03\x00\x17\x00\x18\x00\x69\x00\x3d\x00\x3e\x00\x3a\x00\x6d\x00\x0b\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x13\x00\x11\x00\x12\x00\x13\x00\x17\x00\x22\x00\x44\x00\x17\x00\x43\x00\x19\x00\x2e\x00\x2e\x00\x2e\x00\x1d\x00\x20\x00\x21\x00\x33\x00\x01\x00\x22\x00\x23\x00\x02\x00\x03\x00\x26\x00\x27\x00\x17\x00\x44\x00\x20\x00\x21\x00\x0c\x00\x0b\x00\x2e\x00\x2f\x00\x10\x00\x20\x00\x35\x00\x11\x00\x12\x00\x13\x00\x05\x00\x44\x00\x3b\x00\x17\x00\x72\x00\x19\x00\x22\x00\x22\x00\x22\x00\x1d\x00\x26\x00\x02\x00\x03\x00\x45\x00\x22\x00\x23\x00\x22\x00\x22\x00\x26\x00\x27\x00\x0b\x00\x01\x00\x22\x00\x4d\x00\x4e\x00\x45\x00\x2e\x00\x2f\x00\x52\x00\x53\x00\x22\x00\x55\x00\x0c\x00\x26\x00\x02\x00\x03\x00\x10\x00\x17\x00\x1d\x00\x13\x00\x44\x00\x44\x00\x44\x00\x22\x00\x23\x00\x4d\x00\x4e\x00\x21\x00\x27\x00\x44\x00\x44\x00\x44\x00\x6a\x00\x6b\x00\x6c\x00\x2e\x00\x44\x00\x4d\x00\x4e\x00\x22\x00\x72\x00\x1d\x00\x52\x00\x53\x00\x44\x00\x55\x00\x22\x00\x23\x00\x02\x00\x03\x00\x26\x00\x27\x00\x22\x00\x27\x00\x6a\x00\x6b\x00\x6c\x00\x0b\x00\x2e\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x6a\x00\x6b\x00\x6c\x00\x0f\x00\x22\x00\x47\x00\x22\x00\x44\x00\x72\x00\x1d\x00\x4c\x00\x17\x00\x43\x00\x4f\x00\x22\x00\x23\x00\x44\x00\x22\x00\x22\x00\x27\x00\x44\x00\x02\x00\x03\x00\x02\x00\x03\x00\x0f\x00\x2e\x00\x22\x00\x22\x00\x02\x00\x0b\x00\x55\x00\x0b\x00\x17\x00\x22\x00\x22\x00\x22\x00\x72\x00\x44\x00\x69\x00\x44\x00\x22\x00\x27\x00\x6d\x00\x11\x00\x6f\x00\x70\x00\x71\x00\x1d\x00\x22\x00\x1d\x00\x44\x00\x44\x00\x22\x00\x23\x00\x22\x00\x23\x00\x22\x00\x27\x00\x20\x00\x27\x00\x44\x00\x44\x00\x02\x00\x03\x00\x2e\x00\x27\x00\x2e\x00\x44\x00\x44\x00\x44\x00\x44\x00\x0b\x00\x2e\x00\x03\x00\x44\x00\x02\x00\x03\x00\x02\x00\x03\x00\x22\x00\x0b\x00\x0c\x00\x44\x00\x03\x00\x0b\x00\x44\x00\x0b\x00\x07\x00\x12\x00\x1d\x00\x44\x00\x02\x00\x03\x00\x72\x00\x22\x00\x23\x00\x10\x00\x27\x00\x43\x00\x27\x00\x0b\x00\x17\x00\x1d\x00\x17\x00\x1d\x00\x01\x00\x2e\x00\x22\x00\x23\x00\x22\x00\x23\x00\x21\x00\x27\x00\x44\x00\x27\x00\x43\x00\x02\x00\x03\x00\x1d\x00\x2e\x00\x10\x00\x2e\x00\x17\x00\x22\x00\x23\x00\x0b\x00\x44\x00\x01\x00\x27\x00\x02\x00\x03\x00\x20\x00\x72\x00\x17\x00\x72\x00\x2e\x00\x0a\x00\x0b\x00\x17\x00\x17\x00\x1e\x00\x17\x00\x10\x00\x1d\x00\x17\x00\x1e\x00\x1e\x00\x1d\x00\x22\x00\x23\x00\x1d\x00\x4d\x00\x4e\x00\x27\x00\x02\x00\x03\x00\x1d\x00\x40\x00\x20\x00\x42\x00\x2e\x00\x22\x00\x23\x00\x0b\x00\x0c\x00\x0d\x00\x27\x00\x17\x00\x43\x00\x11\x00\x1a\x00\x13\x00\x43\x00\x2e\x00\x72\x00\x02\x00\x03\x00\x02\x00\x03\x00\x17\x00\x6a\x00\x6b\x00\x6c\x00\x17\x00\x20\x00\x1d\x00\x0b\x00\x72\x00\x17\x00\x72\x00\x26\x00\x27\x00\x1b\x00\x1c\x00\x0a\x00\x08\x00\x09\x00\x0d\x00\x2e\x00\x2f\x00\x0c\x00\x31\x00\x1d\x00\x72\x00\x1d\x00\x02\x00\x43\x00\x22\x00\x23\x00\x22\x00\x23\x00\x17\x00\x27\x00\x19\x00\x27\x00\x3f\x00\x15\x00\x16\x00\x43\x00\x2e\x00\x44\x00\x2e\x00\x17\x00\x23\x00\x24\x00\x25\x00\x26\x00\x44\x00\x72\x00\x4d\x00\x4e\x00\x2b\x00\x1d\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x22\x00\x23\x00\x33\x00\x01\x00\x72\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x17\x00\x18\x00\x4d\x00\x4e\x00\x0a\x00\x10\x00\x53\x00\x0d\x00\x6a\x00\x6b\x00\x6c\x00\x16\x00\x36\x00\x18\x00\x03\x00\x40\x00\x1b\x00\x42\x00\x07\x00\x2a\x00\x2b\x00\x2c\x00\x02\x00\x03\x00\x08\x00\x09\x00\x25\x00\x10\x00\x33\x00\x28\x00\x43\x00\x6a\x00\x6b\x00\x6c\x00\x17\x00\x0b\x00\x0c\x00\x17\x00\x18\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x03\x00\x17\x00\x1d\x00\x43\x00\x07\x00\x1b\x00\x1c\x00\x22\x00\x23\x00\x2a\x00\x2b\x00\x43\x00\x27\x00\x10\x00\x44\x00\x49\x00\x4a\x00\x4b\x00\x33\x00\x2e\x00\x17\x00\x4f\x00\x50\x00\x17\x00\x18\x00\x43\x00\x01\x00\x02\x00\x56\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x15\x00\x16\x00\x42\x00\x43\x00\x0e\x00\x0f\x00\x10\x00\x2a\x00\x2b\x00\x17\x00\x27\x00\x19\x00\x16\x00\x43\x00\x18\x00\x43\x00\x33\x00\x1b\x00\x43\x00\x1d\x00\x52\x00\x23\x00\x24\x00\x25\x00\x22\x00\x23\x00\x43\x00\x25\x00\x26\x00\x2b\x00\x28\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x43\x00\x2e\x00\x33\x00\x17\x00\x18\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x44\x00\x43\x00\x43\x00\x43\x00\x43\x00\x14\x00\x44\x00\x43\x00\x43\x00\x2a\x00\x2b\x00\x43\x00\x43\x00\x43\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x33\x00\x44\x00\x44\x00\x4f\x00\x50\x00\x51\x00\x01\x00\x02\x00\x54\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x44\x00\x44\x00\x43\x00\x43\x00\x0e\x00\x0f\x00\x10\x00\x43\x00\x43\x00\x17\x00\x43\x00\x19\x00\x16\x00\x43\x00\x18\x00\x43\x00\x43\x00\x1b\x00\x43\x00\x1d\x00\x43\x00\x23\x00\x24\x00\x25\x00\x22\x00\x23\x00\x43\x00\x25\x00\x44\x00\x2b\x00\x28\x00\x2d\x00\x2e\x00\x44\x00\x30\x00\x44\x00\x44\x00\x33\x00\x17\x00\x18\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x44\x00\x17\x00\x17\x00\x43\x00\x43\x00\x28\x00\x44\x00\x43\x00\x43\x00\x2a\x00\x2b\x00\x05\x00\x43\x00\x43\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x33\x00\x43\x00\x43\x00\x4f\x00\x50\x00\x51\x00\x01\x00\x44\x00\x54\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x04\x00\x44\x00\x27\x00\x44\x00\x0e\x00\x0f\x00\x10\x00\x43\x00\x43\x00\x17\x00\x44\x00\x19\x00\x16\x00\x27\x00\x18\x00\x44\x00\x43\x00\x1b\x00\x43\x00\x1d\x00\x44\x00\x23\x00\x24\x00\x25\x00\x02\x00\x03\x00\x43\x00\x25\x00\x43\x00\x2b\x00\x28\x00\x2d\x00\x2e\x00\x0b\x00\x30\x00\x44\x00\x43\x00\x33\x00\x43\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x43\x00\x27\x00\x44\x00\x1d\x00\x44\x00\x44\x00\x44\x00\x44\x00\x22\x00\x23\x00\x04\x00\x17\x00\x17\x00\x27\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x17\x00\x0c\x00\x2e\x00\x4f\x00\x50\x00\x51\x00\x01\x00\x05\x00\x54\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x44\x00\x44\x00\x44\x00\x17\x00\x0e\x00\x0f\x00\x10\x00\x44\x00\x44\x00\x17\x00\x40\x00\x19\x00\x16\x00\x13\x00\x18\x00\x17\x00\x17\x00\x1b\x00\x15\x00\x1d\x00\x26\x00\x23\x00\x24\x00\x25\x00\x02\x00\x03\x00\x15\x00\x25\x00\x11\x00\x2b\x00\x28\x00\x2d\x00\x2e\x00\x0b\x00\x30\x00\x2e\x00\x03\x00\x33\x00\x13\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x11\x00\x0b\x00\x26\x00\x1d\x00\x44\x00\x13\x00\x44\x00\x26\x00\x22\x00\x23\x00\x11\x00\x11\x00\x0c\x00\x27\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x0b\x00\x14\x00\x2e\x00\x4f\x00\x50\x00\x51\x00\x01\x00\x2e\x00\x54\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x14\x00\x20\x00\x0b\x00\x31\x00\x0e\x00\x0f\x00\x10\x00\x0a\x00\x2e\x00\x17\x00\x11\x00\x19\x00\x16\x00\x11\x00\x18\x00\x11\x00\x11\x00\x1b\x00\x11\x00\x1d\x00\x11\x00\x23\x00\x24\x00\x25\x00\x02\x00\x03\x00\x11\x00\x25\x00\x2e\x00\x2b\x00\x28\x00\x2d\x00\x2e\x00\x2e\x00\x30\x00\x13\x00\x0b\x00\x33\x00\x13\x00\x11\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x10\x00\x04\x00\x20\x00\x1d\x00\x26\x00\x04\x00\x44\x00\x20\x00\x22\x00\x23\x00\x13\x00\x20\x00\x26\x00\x27\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x26\x00\x11\x00\x2e\x00\x4f\x00\x50\x00\x51\x00\x01\x00\x11\x00\x54\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x26\x00\x0a\x00\x15\x00\x13\x00\x0e\x00\x0f\x00\x10\x00\x13\x00\x13\x00\x17\x00\x11\x00\x19\x00\x16\x00\x13\x00\x18\x00\x26\x00\x0a\x00\x1b\x00\x56\x00\x1d\x00\x0c\x00\x23\x00\x24\x00\x25\x00\x0b\x00\x26\x00\x13\x00\x25\x00\x20\x00\x2b\x00\x28\x00\x2d\x00\x2e\x00\x0d\x00\x30\x00\x13\x00\x11\x00\x33\x00\x11\x00\x26\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x31\x00\x11\x00\x0a\x00\x03\x00\x26\x00\x26\x00\x44\x00\x20\x00\x13\x00\x02\x00\x03\x00\x2f\x00\x0a\x00\x11\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x11\x00\x03\x00\x11\x00\x4f\x00\x50\x00\x51\x00\x01\x00\x0a\x00\x54\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x10\x00\x55\x00\x0a\x00\x1d\x00\x0e\x00\x0f\x00\x10\x00\x12\x00\x22\x00\x23\x00\x0b\x00\x11\x00\x16\x00\x27\x00\x18\x00\x0b\x00\x0b\x00\x1b\x00\x04\x00\x1d\x00\x2e\x00\x2f\x00\x02\x00\x03\x00\x02\x00\x03\x00\x01\x00\x25\x00\x04\x00\x12\x00\x28\x00\x04\x00\x10\x00\x10\x00\x3f\x00\x10\x00\x05\x00\x11\x00\x14\x00\x11\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x12\x00\x1d\x00\x12\x00\x1d\x00\x12\x00\x12\x00\x22\x00\x23\x00\x22\x00\x23\x00\x26\x00\x27\x00\x26\x00\x27\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x2e\x00\x0c\x00\x2e\x00\x4f\x00\x50\x00\x51\x00\x01\x00\x20\x00\x54\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\x0e\x00\x0f\x00\x10\x00\xff\xff\x72\x00\x72\x00\xff\xff\xff\xff\x16\x00\xff\xff\x18\x00\xff\xff\xff\xff\x1b\x00\xff\xff\x1d\x00\xff\xff\x0c\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x25\x00\xff\xff\xff\xff\x28\x00\xff\xff\x17\x00\x18\x00\xff\xff\xff\xff\x1b\x00\x1c\x00\xff\xff\x13\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x1d\x00\xff\xff\x2a\x00\x2b\x00\x2c\x00\x22\x00\x23\x00\xff\xff\x02\x00\x03\x00\x27\x00\x33\x00\xff\xff\x48\x00\x49\x00\x4a\x00\x4b\x00\x2e\x00\xff\xff\xff\xff\x4f\x00\x50\x00\x51\x00\x01\x00\x12\x00\x54\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\xff\xff\xff\xff\xff\xff\x1d\x00\x0e\x00\x0f\x00\x10\x00\xff\xff\x22\x00\x23\x00\xff\xff\xff\xff\x16\x00\x27\x00\x18\x00\xff\xff\xff\xff\x1b\x00\xff\xff\x1d\x00\x2e\x00\xff\xff\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x25\x00\xff\xff\xff\xff\x28\x00\xff\xff\x17\x00\x18\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x13\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x1d\x00\xff\xff\x2a\x00\x2b\x00\xff\xff\x22\x00\x23\x00\xff\xff\x02\x00\x03\x00\x27\x00\x33\x00\xff\xff\x48\x00\x49\x00\x4a\x00\x4b\x00\x2e\x00\xff\xff\xff\xff\x4f\x00\x50\x00\x51\x00\x01\x00\x12\x00\x54\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\xff\xff\xff\xff\xff\xff\x1d\x00\x0e\x00\x0f\x00\x10\x00\xff\xff\x22\x00\x23\x00\xff\xff\xff\xff\x16\x00\x27\x00\x18\x00\xff\xff\xff\xff\x1b\x00\xff\xff\x1d\x00\x2e\x00\xff\xff\x02\x00\x03\x00\x02\x00\x03\x00\xff\xff\x25\x00\xff\xff\xff\xff\x28\x00\x0b\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x1d\x00\xff\xff\x1d\x00\xff\xff\xff\xff\x22\x00\x23\x00\x22\x00\x23\x00\xff\xff\x27\x00\xff\xff\x27\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x2e\x00\xff\xff\x2e\x00\x4f\x00\x50\x00\x51\x00\x01\x00\xff\xff\x54\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0c\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\xff\xff\xff\xff\x17\x00\x18\x00\x17\x00\x16\x00\x19\x00\x18\x00\xff\xff\xff\xff\x1b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\xff\xff\x25\x00\x2a\x00\x2b\x00\x28\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\x2f\x00\x30\x00\x33\x00\xff\xff\x33\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x02\x00\x03\x00\xff\xff\x01\x00\xff\xff\xff\xff\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\x49\x00\x4a\x00\x4b\x00\x10\x00\xff\xff\xff\xff\x4f\x00\x50\x00\x19\x00\x16\x00\xff\xff\x18\x00\x1d\x00\xff\xff\x1b\x00\xff\xff\xff\xff\x22\x00\x23\x00\xff\xff\xff\xff\x26\x00\x27\x00\xff\xff\x25\x00\xff\xff\xff\xff\x28\x00\xff\xff\x2e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x02\x00\x03\x00\xff\xff\x01\x00\xff\xff\xff\xff\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\x49\x00\x4a\x00\x4b\x00\x10\x00\xff\xff\xff\xff\x4f\x00\x50\x00\x19\x00\x16\x00\xff\xff\x18\x00\x1d\x00\xff\xff\x1b\x00\xff\xff\xff\xff\x22\x00\x23\x00\xff\xff\xff\xff\xff\xff\x27\x00\xff\xff\x25\x00\xff\xff\xff\xff\x28\x00\xff\xff\x2e\x00\x17\x00\x18\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x02\x00\x03\x00\xff\xff\x01\x00\x2a\x00\x2b\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x33\x00\xff\xff\x49\x00\x4a\x00\x4b\x00\x10\x00\xff\xff\xff\xff\x4f\x00\x50\x00\xff\xff\x16\x00\xff\xff\x18\x00\x1d\x00\xff\xff\x1b\x00\xff\xff\xff\xff\x22\x00\x23\x00\xff\xff\xff\xff\xff\xff\x27\x00\xff\xff\x25\x00\xff\xff\xff\xff\x28\x00\xff\xff\x2e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\x01\x00\xff\xff\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x17\x00\x18\x00\xff\xff\x49\x00\x4a\x00\x4b\x00\x10\x00\xff\xff\x1f\x00\x4f\x00\x50\x00\x17\x00\x16\x00\x19\x00\x18\x00\xff\xff\xff\xff\x1b\x00\x29\x00\x2a\x00\x2b\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\xff\xff\x25\x00\x33\x00\xff\xff\x28\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\x01\x00\xff\xff\x17\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\x49\x00\x4a\x00\x4b\x00\x10\x00\x25\x00\xff\xff\x4f\x00\x50\x00\xff\xff\x16\x00\x2b\x00\x18\x00\x2d\x00\x2e\x00\x1b\x00\x30\x00\xff\xff\xff\xff\x33\x00\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\x25\x00\xff\xff\xff\xff\x28\x00\xff\xff\xff\xff\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\x01\x00\xff\xff\xff\xff\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x17\x00\x18\x00\xff\xff\x49\x00\x4a\x00\x4b\x00\x10\x00\x11\x00\x1f\x00\x4f\x00\x50\x00\x17\x00\x16\x00\x19\x00\x18\x00\xff\xff\xff\xff\x1b\x00\x29\x00\x2a\x00\x2b\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\xff\xff\x25\x00\x33\x00\xff\xff\x28\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\x01\x00\xff\xff\xff\xff\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x17\x00\x18\x00\xff\xff\x49\x00\x4a\x00\x4b\x00\x10\x00\x11\x00\x1f\x00\x4f\x00\x50\x00\x17\x00\x16\x00\x19\x00\x18\x00\xff\xff\xff\xff\x1b\x00\x29\x00\x2a\x00\x2b\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\xff\xff\x25\x00\x33\x00\xff\xff\x28\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\x01\x00\xff\xff\xff\xff\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x17\x00\x18\x00\xff\xff\x49\x00\x4a\x00\x4b\x00\x10\x00\x11\x00\x1f\x00\x4f\x00\x50\x00\x17\x00\x16\x00\x19\x00\x18\x00\xff\xff\xff\xff\x1b\x00\x29\x00\x2a\x00\x2b\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\xff\xff\x25\x00\x33\x00\xff\xff\x28\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\x2f\x00\x30\x00\xff\xff\xff\xff\x33\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\x01\x00\xff\xff\xff\xff\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x17\x00\x18\x00\xff\xff\x49\x00\x4a\x00\x4b\x00\x10\x00\x11\x00\x1f\x00\x4f\x00\x50\x00\x17\x00\x16\x00\x19\x00\x18\x00\xff\xff\xff\xff\x1b\x00\x29\x00\x2a\x00\x2b\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\xff\xff\x25\x00\x33\x00\xff\xff\x28\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\x01\x00\xff\xff\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x17\x00\x18\x00\xff\xff\x49\x00\x4a\x00\x4b\x00\x10\x00\xff\xff\x1f\x00\x4f\x00\x50\x00\x17\x00\x16\x00\x19\x00\x18\x00\xff\xff\xff\xff\x1b\x00\x29\x00\x2a\x00\x2b\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\xff\xff\x25\x00\x33\x00\xff\xff\x28\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\x01\x00\xff\xff\x17\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x17\x00\x18\x00\xff\xff\x49\x00\x4a\x00\x4b\x00\x10\x00\x25\x00\xff\xff\x4f\x00\x50\x00\x17\x00\x16\x00\x2b\x00\x18\x00\x2d\x00\x2e\x00\x1b\x00\x30\x00\x2a\x00\x2b\x00\x33\x00\x34\x00\xff\xff\xff\xff\x25\x00\xff\xff\x25\x00\x33\x00\xff\xff\x28\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\x01\x00\xff\xff\x17\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x17\x00\x18\x00\xff\xff\x49\x00\x4a\x00\x4b\x00\x10\x00\x25\x00\xff\xff\x4f\x00\x50\x00\xff\xff\x16\x00\x2b\x00\x18\x00\x2d\x00\x2e\x00\x1b\x00\x30\x00\x2a\x00\x2b\x00\x33\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x25\x00\x33\x00\xff\xff\x01\x00\xff\xff\xff\xff\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\xff\xff\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\x18\x00\xff\xff\xff\xff\x1b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x49\x00\x4a\x00\x4b\x00\x25\x00\xff\xff\xff\xff\x4f\x00\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\x02\x00\x03\x00\x01\x00\x02\x00\xff\xff\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\xff\xff\xff\xff\xff\xff\x49\x00\x4a\x00\x4b\x00\x0f\x00\x10\x00\xff\xff\x4f\x00\x50\x00\x17\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1d\x00\xff\xff\xff\xff\x1d\x00\xff\xff\x22\x00\x23\x00\xff\xff\x22\x00\x23\x00\x27\x00\x25\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\xff\xff\x02\x00\x03\x00\xff\xff\xff\xff\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\xff\xff\x11\x00\x01\x00\xff\xff\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\xff\xff\xff\xff\xff\xff\x1d\x00\x4a\x00\x4b\x00\x0f\x00\x10\x00\x22\x00\x23\x00\xff\xff\xff\xff\xff\xff\x27\x00\xff\xff\xff\xff\xff\xff\xff\xff\x01\x00\xff\xff\x2e\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\xff\xff\xff\xff\x25\x00\xff\xff\x11\x00\xff\xff\x0f\x00\x10\x00\xff\xff\xff\xff\x17\x00\xff\xff\xff\xff\xff\xff\xff\xff\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x25\x00\xff\xff\xff\xff\xff\xff\x25\x00\xff\xff\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x4a\x00\x4b\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\xff\xff\x01\x00\xff\xff\xff\xff\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\x4a\x00\x4b\x00\x10\x00\xff\xff\xff\xff\x0a\x00\x17\x00\xff\xff\x0d\x00\x0e\x00\x18\x00\x10\x00\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\xff\xff\x17\x00\xff\xff\x25\x00\xff\xff\xff\xff\x25\x00\xff\xff\xff\xff\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\xff\xff\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x36\x00\x37\x00\x38\x00\x39\x00\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x4a\x00\x4b\x00\xff\xff\x0a\x00\xff\xff\xff\xff\x0d\x00\x0e\x00\xff\xff\x10\x00\xff\xff\x12\x00\x00\x00\x01\x00\x02\x00\x03\x00\x17\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\x0d\x00\x0e\x00\xff\xff\x10\x00\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\xff\xff\x17\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\x36\x00\x37\x00\x38\x00\x39\x00\x0a\x00\xff\xff\xff\xff\x0d\x00\x0e\x00\xff\xff\x10\x00\xff\xff\x12\x00\x00\x00\x01\x00\x02\x00\x03\x00\x17\x00\xff\xff\x36\x00\x37\x00\x38\x00\x39\x00\x0a\x00\xff\xff\xff\xff\x0d\x00\x0e\x00\xff\xff\x10\x00\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\xff\xff\x17\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\x36\x00\x37\x00\x38\x00\x39\x00\x0a\x00\xff\xff\xff\xff\x0d\x00\x0e\x00\xff\xff\x10\x00\xff\xff\x12\x00\x00\x00\x01\x00\x02\x00\x03\x00\x17\x00\xff\xff\x36\x00\x37\x00\x38\x00\x39\x00\x0a\x00\xff\xff\xff\xff\x0d\x00\x0e\x00\xff\xff\x10\x00\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\xff\xff\x17\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\x36\x00\x37\x00\x38\x00\x39\x00\x0a\x00\xff\xff\xff\xff\x0d\x00\x0e\x00\x11\x00\x10\x00\xff\xff\x12\x00\xff\xff\xff\xff\x17\x00\xff\xff\x17\x00\xff\xff\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\x02\x00\x03\x00\xff\xff\xff\xff\x25\x00\xff\xff\xff\xff\xff\xff\xff\xff\x0b\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\x11\x00\x30\x00\xff\xff\xff\xff\x33\x00\xff\xff\x17\x00\xff\xff\xff\xff\x36\x00\x37\x00\x38\x00\x39\x00\x1d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x22\x00\x23\x00\x25\x00\xff\xff\xff\xff\x27\x00\xff\xff\x17\x00\x2b\x00\x19\x00\x2d\x00\x2e\x00\x2e\x00\x30\x00\xff\xff\xff\xff\x33\x00\xff\xff\xff\xff\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\xff\xff\x17\x00\xff\xff\x19\x00\x2b\x00\x17\x00\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x23\x00\x24\x00\x25\x00\xff\xff\x17\x00\xff\xff\x25\x00\xff\xff\x2b\x00\xff\xff\x2d\x00\x2e\x00\x2b\x00\x30\x00\x2d\x00\x2e\x00\x33\x00\x30\x00\x25\x00\x17\x00\x33\x00\xff\xff\xff\xff\xff\xff\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\x17\x00\x18\x00\x33\x00\x25\x00\xff\xff\xff\xff\xff\xff\x17\x00\x1f\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x29\x00\x2a\x00\x2b\x00\x25\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2b\x00\x33\x00\x2d\x00\x2e\x00\xff\xff\x30\x00\xff\xff\xff\xff\x33\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\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"#++happyTable :: HappyAddr+happyTable = HappyA# "\x00\x00\x7f\x00\x22\x00\x03\x02\xe1\x00\xd8\x00\xe1\x00\x17\x00\x57\x02\xaf\x00\xb0\x00\xd3\x01\x5c\x01\x50\x00\xe1\x00\x14\x01\x8a\x00\x51\x00\x20\xff\x75\xff\xfc\xff\x1b\x00\xb0\x00\x22\x00\x52\x02\xac\x00\x31\x02\x1c\x00\x15\x01\x80\x00\x1e\x00\xdf\xff\x1f\x00\x42\x01\x50\x00\x20\x00\xb1\x00\xac\x00\x51\x00\xac\x00\x75\xff\xb2\x00\xb3\x00\x93\x01\x7a\xff\xac\x00\xb4\x00\x54\x02\xe3\x00\x81\x00\xe3\x00\xdf\xff\xdf\xff\xb5\x00\x2a\x01\x56\x00\x2a\x01\x09\x01\xe3\x00\x4d\x02\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\xaf\x00\xb0\x00\xec\x01\x34\x02\xad\x00\x59\x00\x2d\x02\x73\x00\x74\x00\x22\xff\x5a\x00\xe9\x01\x30\x02\x5b\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\xdf\xff\x42\x02\xe9\x01\x2b\x01\x22\x00\x59\x00\xb1\x00\x2a\x01\x55\x02\x75\x00\x5a\x00\xb2\x00\xb3\x00\x5b\x00\x76\x00\xe1\x00\xb4\x00\xe1\x00\x5c\x00\x51\x00\x72\x00\xac\x00\x5d\x00\xb5\x00\x5e\x00\x5f\x00\x60\x00\xfc\xff\x41\x02\xeb\x01\x1b\x02\xa8\x00\xe2\x00\x20\xff\xaf\x01\xaf\x00\xb0\x00\x73\x00\x74\x00\x5c\x00\xea\x01\xeb\x01\x2d\x01\x5d\x00\xa7\xff\x5e\x00\x5f\x00\x60\x00\xfc\xff\x41\x01\xa7\xff\xa7\xff\xa7\xff\x42\x01\xac\x00\xad\x00\xa7\xff\x49\x02\xa7\xff\xe3\x00\x75\x00\xe3\x00\xb1\x00\x0c\x01\x0d\x01\x76\x00\x22\x00\xb2\x00\xb3\x00\xaf\x00\xb0\x00\xa7\xff\xb4\x00\x2e\x01\x4a\x02\x23\x01\x24\x01\x50\x00\xa6\xff\xb5\x00\xa7\xff\x51\x00\x3c\x01\x43\x01\xa6\xff\xa6\xff\xa6\xff\x38\x02\x15\x02\x44\x01\xa6\xff\x22\xff\xa6\xff\xac\x00\xac\x00\xac\x00\xb1\x00\xec\x00\xaf\x00\xb0\x00\x0e\x01\xb2\x00\xb3\x00\xac\x00\xac\x00\xa6\xff\xb4\x00\x25\xff\x22\x00\xac\x00\xa7\xff\xa7\xff\x0e\x01\xb5\x00\xa6\xff\xa7\xff\xa7\xff\xac\x00\xa7\xff\x50\x00\x39\x02\xaf\x00\xb0\x00\x51\x00\x71\x01\xb1\x00\xfc\xff\xad\x00\xad\x00\x74\x01\xb2\x00\xb3\x00\x5e\x01\x5f\x01\x8b\x00\xb4\x00\x2b\x02\x83\x01\x85\x01\xa7\xff\xa7\xff\xa7\xff\xb5\x00\x87\x01\xa6\xff\xa6\xff\xac\x00\xa7\xff\xb1\x00\xa6\xff\xa6\xff\x89\x01\xa6\xff\xb2\x00\xb3\x00\xaf\x00\xb0\x00\x14\x02\xb4\x00\xac\x00\x75\x01\x60\x01\x61\x01\x62\x01\x23\xff\xb5\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\xa6\xff\xa6\xff\xa6\xff\x44\x02\xac\x00\x59\x00\xac\x00\xad\x00\xa6\xff\xb1\x00\x5a\x00\x33\x01\x4b\x02\x5b\x00\xb2\x00\xb3\x00\xb5\x00\xac\x00\xac\x00\xb4\x00\x9e\x01\xaf\x00\xb0\x00\xaf\x00\xb0\x00\x32\x01\xb5\x00\xac\x00\xac\x00\xe1\x00\x21\xff\x94\xff\x1c\xff\x33\x01\xe3\x00\xac\x00\xac\x00\x25\xff\xa1\x01\x5c\x00\xa2\x01\xac\x00\xf4\x00\x5d\x00\x91\x01\x5e\x00\x5f\x00\x60\x00\xb1\x00\xac\x00\xb1\x00\xa3\x01\xa4\x01\xb2\x00\xb3\x00\xb2\x00\xb3\x00\xe3\x00\xb4\x00\x92\x01\xb4\x00\xa5\x01\xad\x00\xaf\x00\xb0\x00\xb5\x00\x93\x01\xb5\x00\xe4\x00\xad\x00\xf8\x00\x20\x01\x1b\xff\xe3\x00\x8f\x00\xfa\x00\xaf\x00\xb0\x00\xaf\x00\xb0\x00\xac\x00\xd1\x01\x08\x01\xad\x00\x06\x02\x19\xff\x33\x02\x18\xff\x3b\x02\x90\x00\xb1\x00\xe4\x00\xaf\x00\xb0\x00\x23\xff\xb2\x00\xb3\x00\x48\x00\xf4\x00\x4e\x02\xb4\x00\x17\xff\x8a\x00\xb1\x00\x4a\x00\xb1\x00\x22\x00\xb5\x00\xb2\x00\xb3\x00\xb2\x00\xb3\x00\x8b\x00\xb4\x00\xad\x00\xb4\x00\x4f\x02\xaf\x00\xb0\x00\xb1\x00\xb5\x00\x51\x00\xb5\x00\x2e\x01\xb2\x00\xb3\x00\x16\xff\xb5\x00\x22\x00\xb4\x00\xaf\x00\xb0\x00\x2f\x01\x21\xff\x0c\x02\x1c\xff\xb5\x00\x46\x01\x47\x01\x0c\x02\x0c\x02\x56\x02\xc3\x00\x51\x00\xb1\x00\xc3\x00\x46\x02\x0d\x02\xdd\x01\xb2\x00\xb3\x00\xa6\x01\x5e\x01\x5f\x01\xb4\x00\x6f\xff\xb0\x00\xb1\x00\x64\x01\x48\x01\x0f\x02\xb5\x00\xb2\x00\xb3\x00\x6f\xff\x6f\xff\x6f\xff\xb4\x00\xa8\x00\x2a\x02\x6f\xff\xa9\x00\x6f\xff\x2c\x02\xb5\x00\x1b\xff\xaf\x00\xb0\x00\xaf\x00\xb0\x00\xc3\x00\x60\x01\x61\x01\x62\x01\x3c\x02\x6f\xff\xc4\x00\xd9\xff\x19\xff\xd8\x00\x18\xff\x6f\xff\x6f\xff\xb2\x01\xda\x00\x95\x01\xdb\x01\x5c\x01\x7a\xff\x6f\xff\x6f\xff\x6d\x00\x6f\xff\xb1\x00\x17\xff\xb1\x00\x6f\x00\x2f\x02\xb2\x00\xb3\x00\xb2\x00\xb3\x00\x98\x00\xb4\x00\x99\x00\xb4\x00\x6f\xff\xe4\x01\x26\x01\x3e\x02\xb5\x00\x6f\xff\xb5\x00\xf5\x01\x19\x00\x1a\x00\x1b\x00\x9a\x00\x00\x02\x16\xff\x6f\xff\x6f\xff\x1c\x00\x70\x00\x1d\x00\x1e\x00\x9b\x00\x1f\x00\x71\x00\x72\x00\x20\x00\x22\x00\xff\xff\x83\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x84\x00\x73\x00\xa2\x00\x5e\x01\x5f\x01\xd8\x00\x2b\x00\xd0\x01\x7a\xff\x6f\xff\x6f\xff\x6f\xff\x2c\x00\x01\x02\x2d\x00\x06\x02\x64\x01\x2e\x00\x65\x01\x07\x02\xb5\x01\xa4\x00\xb6\x01\xaf\x00\xb0\x00\x5b\x01\x5c\x01\x30\x00\x48\x00\x76\x00\x31\x00\xf9\x01\x60\x01\x61\x01\x62\x01\x4a\x00\x07\x01\x08\x01\x73\x00\xa2\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x06\x02\xd8\x00\xb1\x00\x03\x02\x12\x02\xd9\x00\xda\x00\xb2\x00\xb3\x00\x28\x02\xa4\x00\x04\x02\xb4\x00\x48\x00\x19\x02\x3b\x00\x3c\x00\x3d\x00\x76\x00\xb5\x00\x4a\x00\x3e\x00\x3f\x00\x73\x00\xa2\x00\x08\x02\x22\x00\x9d\x00\x85\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x25\x01\x26\x01\x28\x01\x29\x01\x29\x00\x2a\x00\x2b\x00\x29\x02\xa4\x00\x17\x00\xcd\x01\x7d\x01\x2c\x00\x0a\x02\x2d\x00\x0b\x02\x76\x00\x2e\x00\x24\x02\x9e\x00\x05\x01\x19\x00\x1a\x00\x1b\x00\x9f\x00\xa0\x00\x25\x02\x30\x00\xa1\x00\x1c\x00\x31\x00\x1d\x00\x1e\x00\x7e\x01\x1f\x00\x26\x02\xa2\x00\x20\x00\x73\x00\xa2\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x27\x02\xa7\x01\xa8\x01\xa9\x01\xaa\x01\x6b\x00\x7f\x01\xab\x01\xac\x01\xb7\x01\xa4\x00\xad\x01\xae\x01\xbc\x01\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x76\x00\xb8\x01\xb9\x01\x3e\x00\x3f\x00\x40\x00\x22\x00\x6f\x00\x41\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\xba\x01\xdc\x01\xbe\x01\xc0\x01\x29\x00\x2a\x00\x2b\x00\xc1\x01\xc2\x01\x17\x00\xc3\x01\xc9\x00\x2c\x00\xc4\x01\x2d\x00\xc5\x01\xc6\x01\x2e\x00\xc7\x01\x9e\x00\xc9\x01\x19\x00\x1a\x00\x1b\x00\x71\x00\x72\x00\xcc\x01\x30\x00\xde\x01\x1c\x00\x31\x00\x1d\x00\x1e\x00\xe0\x01\x1f\x00\xe5\x01\xe6\x01\x20\x00\x73\x00\xa2\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xed\x01\xef\x01\x39\x01\x4d\x01\x4e\x01\x62\x01\x7c\x01\x52\x01\x53\x01\xc8\x01\xa4\x00\x6a\x01\x76\x01\x77\x01\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x76\x00\x78\x01\x86\x01\x3e\x00\x3f\x00\x40\x00\x22\x00\x7a\x01\x41\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x0a\x01\x82\x01\xd6\x00\x84\x01\x29\x00\x2a\x00\x2b\x00\x88\x01\x8a\x01\x17\x00\x9b\x01\xcd\x00\x2c\x00\x02\x01\x2d\x00\x9c\x01\xa0\x01\x2e\x00\xc8\x00\x2f\x00\xce\x00\x19\x00\x1a\x00\x1b\x00\xaf\x00\xb0\x00\xd1\x00\x30\x00\xd4\x00\x1c\x00\x31\x00\x1d\x00\x1e\x00\xf7\x01\x1f\x00\xf9\x00\xfb\x00\x20\x00\xfc\x00\xbf\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x03\x01\x06\x01\x1b\x01\xb1\x00\x1c\x01\x1f\x01\x80\x01\x20\x01\xb2\x00\xb3\x00\x21\x01\x29\x01\x2c\x01\xb4\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x67\x00\x6d\x00\xb5\x00\x3e\x00\x3f\x00\x40\x00\x22\x00\x85\x00\x41\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x8d\x00\x90\x00\x91\x00\x93\x00\x29\x00\x2a\x00\x2b\x00\xaa\x00\xb5\x00\x17\x00\x04\x00\xd0\x00\x2c\x00\x59\x02\x2d\x00\xbc\x00\xc2\x00\x2e\x00\x46\x02\x2f\x00\x48\x02\x19\x00\x1a\x00\x1b\x00\xaf\x00\xb0\x00\x49\x02\x30\x00\x51\x02\x1c\x00\x31\x00\x1d\x00\x1e\x00\xd5\x01\x1f\x00\xe3\x00\x00\x00\x20\x00\x33\x02\xc1\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x37\x02\x3a\x02\xf5\x01\xb1\x00\x3e\x02\x3b\x02\x81\x01\xf9\x01\xb2\x00\xb3\x00\x44\x02\xf8\x01\xfb\x01\xb4\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\xfc\x01\x06\x02\xb5\x00\x3e\x00\x3f\x00\x40\x00\x22\x00\x0f\x02\x41\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x11\x02\x17\x02\x12\x02\xcc\x01\x29\x00\x2a\x00\x2b\x00\xd8\x00\xb2\x01\x17\x00\x1c\x02\xe5\x00\x2c\x00\x1d\x02\x2d\x00\x1e\x02\x1f\x02\x2e\x00\x20\x02\x2f\x00\xbe\x01\x19\x00\x1a\x00\x1b\x00\xaf\x00\xb0\x00\xc0\x01\x30\x00\xb5\x01\x1c\x00\x31\x00\x1d\x00\x1e\x00\xe3\x00\x1f\x00\xd6\x01\xd7\x01\x20\x00\xd9\x01\x54\xff\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xda\x01\xdb\x01\xe9\x01\xb1\x00\xf2\x01\xf3\x01\xe6\x00\x38\x01\xb2\x00\xb3\x00\x39\x01\x3c\x01\x52\x01\xb4\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3f\x01\x3e\x01\xb5\x00\x3e\x00\x3f\x00\x40\x00\x22\x00\x40\x01\x02\x01\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x49\x01\x41\x01\x4a\x01\x55\x01\x29\x00\x2a\x00\x2b\x00\x56\x01\x57\x01\x17\x00\x50\x01\xe7\x00\x2c\x00\x58\x01\x2d\x00\x5b\x01\x64\x01\x2e\x00\x67\x01\x2f\x00\x87\x00\x19\x00\x1a\x00\x1b\x00\x6d\x01\x6c\x01\x74\x01\x30\x00\x6e\x01\x1c\x00\x31\x00\x1d\x00\x1e\x00\x7c\x01\x1f\x00\x8c\x01\x90\x01\x20\x00\x94\x01\x96\x01\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x71\x01\x97\x01\x98\x01\x00\x00\x9a\x01\xc6\x00\xe8\x00\xd0\x00\xd3\x00\xaf\x00\xb0\x00\xd6\x00\xd8\x00\xcb\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\xcc\xff\x00\x00\xeb\x00\x3e\x00\x3f\x00\x40\x00\x22\x00\xd8\x00\x41\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x32\x01\x06\x01\xd8\x00\xb1\x00\x29\x00\x2a\x00\x2b\x00\x0f\x01\xb2\x00\xb3\x00\x16\x01\x25\x01\x2c\x00\xb4\x00\x2d\x00\x31\x01\x35\x01\x2e\x00\x61\x00\x2f\x00\xb5\x00\x36\x01\xaf\x00\xb0\x00\xee\x00\xb0\x00\x64\x00\x30\x00\x62\x00\x65\x00\x31\x00\x67\x00\x69\x00\x6a\x00\x66\x00\x6b\x00\x88\x00\x51\x01\x6d\x00\xef\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x7c\x00\xb1\x00\x7d\x00\xf0\x00\x7e\x00\x7f\x00\xb2\x00\xb3\x00\xf1\x00\xf2\x00\x52\x01\xb4\x00\xf3\x00\xb4\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\xb5\x00\x87\x00\xf4\x00\x3e\x00\x3f\x00\x40\x00\x22\x00\xac\x00\x02\x01\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x29\x00\x2a\x00\x2b\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x2c\x00\x00\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x2f\x00\x00\x00\x6d\x00\xaf\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x30\x00\x00\x00\x00\x00\x31\x00\x00\x00\xdb\x00\xa2\x00\x00\x00\x00\x00\xdc\x00\xda\x00\x00\x00\x91\xff\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x00\x00\xb1\x00\x00\x00\xdd\x00\xa4\x00\xde\x00\xb2\x00\xb3\x00\x00\x00\xaf\x00\xb0\x00\xb4\x00\x76\x00\x00\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\xb5\x00\x00\x00\x00\x00\x3e\x00\x3f\x00\x40\x00\x22\x00\xd3\x01\x41\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x29\x00\x2a\x00\x2b\x00\x00\x00\xb2\x00\xb3\x00\x00\x00\x00\x00\x2c\x00\xb4\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x2f\x00\xb5\x00\x00\x00\xaf\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x30\x00\x00\x00\x00\x00\x31\x00\x00\x00\x73\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x01\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x00\x00\xb1\x00\x00\x00\xd7\x01\xa4\x00\x00\x00\xb2\x00\xb3\x00\x00\x00\xaf\x00\xb0\x00\xb4\x00\x76\x00\x00\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\xb5\x00\x00\x00\x00\x00\x3e\x00\x3f\x00\x40\x00\x22\x00\xe2\x01\x02\x01\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x29\x00\x2a\x00\x2b\x00\x00\x00\xb2\x00\xb3\x00\x00\x00\x00\x00\x2c\x00\xb4\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x2f\x00\xb5\x00\x00\x00\xaf\x00\xb0\x00\xaf\x00\xb0\x00\x00\x00\x30\x00\x00\x00\x00\x00\x31\x00\xe3\x01\x00\x00\xe4\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x00\x00\xb1\x00\x00\x00\xb1\x00\x00\x00\x00\x00\xb2\x00\xb3\x00\xb2\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb4\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\xb5\x00\x00\x00\xb5\x00\x3e\x00\x3f\x00\x40\x00\x22\x00\x00\x00\x41\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x6d\x00\x5a\x02\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x73\x00\xa2\x00\x17\x00\x2c\x00\x1d\x01\x2d\x00\x00\x00\x00\x00\x2e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x30\x00\x8c\x01\xa4\x00\x31\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1e\x01\x1f\x00\x76\x00\x00\x00\x20\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xaf\x00\xb0\x00\x00\x00\x22\x00\x00\x00\x00\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x00\x00\x52\x02\x00\x00\x3b\x00\x3c\x00\x3d\x00\x2b\x00\x00\x00\x00\x00\x3e\x00\x3f\x00\xf7\x00\x2c\x00\x00\x00\x2d\x00\xb1\x00\x00\x00\x2e\x00\x00\x00\x00\x00\xb2\x00\xb3\x00\x00\x00\x00\x00\xf8\x00\xb4\x00\x00\x00\x30\x00\x00\x00\x00\x00\x31\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xaf\x00\xb0\x00\x00\x00\x22\x00\x00\x00\x00\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x00\x00\x4d\x02\x00\x00\x3b\x00\x3c\x00\x3d\x00\x2b\x00\x00\x00\x00\x00\x3e\x00\x3f\x00\xcb\x01\x2c\x00\x00\x00\x2d\x00\xb1\x00\x00\x00\x2e\x00\x00\x00\x00\x00\xb2\x00\xb3\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x30\x00\x00\x00\x00\x00\x31\x00\x00\x00\xb5\x00\x73\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xaf\x00\xb0\x00\x00\x00\x22\x00\x8d\x01\xa4\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x00\x02\x76\x00\x00\x00\x3b\x00\x3c\x00\x3d\x00\x2b\x00\x00\x00\x00\x00\x3e\x00\x3f\x00\x00\x00\x2c\x00\x00\x00\x2d\x00\xb1\x00\x00\x00\x2e\x00\x00\x00\x00\x00\xb2\x00\xb3\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x30\x00\x00\x00\x00\x00\x31\x00\x00\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x00\x00\x00\x00\x00\x00\x22\x00\x00\x00\x83\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x73\x00\xa2\x00\x00\x00\x3b\x00\x3c\x00\x3d\x00\x2b\x00\x00\x00\x0f\x01\x3e\x00\x3f\x00\xfd\x00\x2c\x00\xfe\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x35\x02\x11\x01\xa4\x00\x00\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x30\x00\x76\x00\x00\x00\x31\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x53\x02\x00\x01\x20\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x00\x00\x00\x00\x00\x00\x22\x00\x00\x00\x17\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x00\x00\x18\x02\x00\x00\x3b\x00\x3c\x00\x3d\x00\x2b\x00\x1b\x00\x00\x00\x3e\x00\x3f\x00\x00\x00\x2c\x00\x1c\x00\x2d\x00\xfc\x01\x1e\x00\x2e\x00\x1f\x00\x00\x00\x00\x00\x20\x00\xfd\x01\x00\x00\x00\x00\x00\x00\x00\x00\x30\x00\x00\x00\x00\x00\x31\x00\x00\x00\x00\x00\xfe\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x00\x00\x00\x00\x00\x00\x22\x00\x00\x00\x00\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x73\x00\xa2\x00\x00\x00\x3b\x00\x3c\x00\x3d\x00\x2b\x00\x21\x02\x0f\x01\x3e\x00\x3f\x00\xfd\x00\x2c\x00\xfe\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\x3f\x02\x11\x01\xa4\x00\x00\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x30\x00\x76\x00\x00\x00\x31\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x72\x01\x00\x01\x20\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x00\x00\x00\x00\x00\x00\x22\x00\x00\x00\x00\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x73\x00\xa2\x00\x00\x00\x3b\x00\x3c\x00\x3d\x00\x2b\x00\x22\x02\x0f\x01\x3e\x00\x3f\x00\xfd\x00\x2c\x00\xfe\x00\x2d\x00\x00\x00\x00\x00\x2e\x00\xb0\x01\x11\x01\xa4\x00\x00\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x30\x00\x76\x00\x00\x00\x31\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\xff\x00\x00\x01\x20\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x00\x00\x00\x00\x00\x00\x22\x00\x00\x00\x00\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x73\x00\xa2\x00\x00\x00\x3b\x00\x3c\x00\x3d\x00\x2b\x00\x23\x02\x0f\x01\x3e\x00\x3f\x00\x17\x00\x2c\x00\x7d\x01\x2d\x00\x00\x00\x00\x00\x2e\x00\xb0\x01\xb3\x01\xa4\x00\x00\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x30\x00\x76\x00\x00\x00\x31\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x7e\x01\x1f\x00\x00\x00\x00\x00\x20\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x00\x00\x00\x00\x00\x00\x22\x00\x00\x00\x00\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x73\x00\xa2\x00\x00\x00\x3b\x00\x3c\x00\x3d\x00\x2b\x00\x24\x02\x0f\x01\x3e\x00\x3f\x00\x17\x00\x2c\x00\x2e\x02\x2d\x00\x00\x00\x00\x00\x2e\x00\xe7\x01\x11\x01\xa4\x00\x00\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x30\x00\x76\x00\x00\x00\x31\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x00\x00\x00\x00\x00\x00\x22\x00\x00\x00\x83\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x73\x00\xa2\x00\x00\x00\x3b\x00\x3c\x00\x3d\x00\x2b\x00\x00\x00\x0f\x01\x3e\x00\x3f\x00\x17\x00\x2c\x00\x14\x02\x2d\x00\x00\x00\x00\x00\x2e\x00\xee\x01\x11\x01\xa4\x00\x00\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x30\x00\x76\x00\x00\x00\x31\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x00\x00\x00\x00\x00\x00\x22\x00\x00\x00\x17\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x73\x00\xa2\x00\x00\x00\x3b\x00\x3c\x00\x3d\x00\x2b\x00\x1b\x00\x00\x00\x3e\x00\x3f\x00\x17\x00\x2c\x00\x1c\x00\x2d\x00\xfc\x01\x1e\x00\x2e\x00\x1f\x00\x98\x01\xa4\x00\x20\x00\x40\x02\x00\x00\x00\x00\x1b\x00\x00\x00\x30\x00\x76\x00\x00\x00\x31\x00\x1c\x00\x00\x00\x9d\x01\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x00\x00\x00\x00\x00\x00\x22\x00\x00\x00\x17\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x73\x00\xa2\x00\x00\x00\x3b\x00\x3c\x00\x3d\x00\x2b\x00\x1b\x00\x00\x00\x3e\x00\x3f\x00\x00\x00\x2c\x00\x1c\x00\x2d\x00\x9d\x01\x1e\x00\x2e\x00\x1f\x00\xa3\x00\xa4\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x30\x00\x76\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3b\x00\x3c\x00\x3d\x00\x00\x00\x00\x00\x00\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\x22\x00\x6f\x00\x00\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\xa7\x00\x00\x00\x00\x00\x00\x00\xf6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\x00\x00\x70\x00\x00\x00\xb2\x00\xb3\x00\x00\x00\x71\x00\x72\x00\xb4\x00\x79\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb5\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\x00\x00\x00\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xa8\x00\x00\x00\x00\x00\x8f\x01\x22\x00\x00\x00\x13\x01\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x7a\x00\x7b\x00\xa6\x00\xa7\x00\xb2\x00\xb3\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x22\x00\x00\x00\xb5\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x00\x00\x00\x00\x79\x00\x00\x00\x09\x02\x00\x00\xa6\x00\xa7\x00\x00\x00\x00\x00\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xa8\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x79\x00\x00\x00\x1c\x00\x00\x00\x80\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x7a\x00\x7b\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xa8\x00\x00\x00\x00\x00\x22\x00\x00\x00\x00\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x3a\x01\x42\x00\x43\x00\x44\x00\x00\x00\x7a\x00\x7b\x00\x78\x00\x00\x00\x00\x00\x45\x00\x17\x00\x00\x00\x46\x00\x47\x00\x2d\x00\x48\x00\x00\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x00\x00\x1b\x00\x00\x00\x00\x00\x79\x00\x00\x00\x00\x00\x1c\x00\x00\x00\xbb\x01\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x00\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x17\x01\x42\x00\x43\x00\x44\x00\x00\x00\x00\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x45\x00\x00\x00\x00\x00\x46\x00\x47\x00\x00\x00\x48\x00\x00\x00\x49\x00\x18\x01\x42\x00\x43\x00\x44\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x45\x00\x00\x00\x00\x00\x46\x00\x47\x00\x00\x00\x48\x00\x00\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x19\x01\x42\x00\x43\x00\x44\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x45\x00\x00\x00\x00\x00\x46\x00\x47\x00\x00\x00\x48\x00\x00\x00\x49\x00\x1a\x01\x42\x00\x43\x00\x44\x00\x4a\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x45\x00\x00\x00\x00\x00\x46\x00\x47\x00\x00\x00\x48\x00\x00\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x88\x00\x42\x00\x43\x00\x44\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x45\x00\x00\x00\x00\x00\x46\x00\x47\x00\x00\x00\x48\x00\x00\x00\x49\x00\x89\x00\x42\x00\x43\x00\x44\x00\x4a\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x45\x00\x00\x00\x00\x00\x46\x00\x47\x00\x00\x00\x48\x00\x00\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x42\x00\x43\x00\x44\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x45\x00\x00\x00\x00\x00\x46\x00\x47\x00\x59\x01\x48\x00\x00\x00\x49\x00\x00\x00\x00\x00\x17\x00\x00\x00\x4a\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\x00\x00\x00\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf4\x01\x1c\x00\x00\x00\x80\x00\x1e\x00\x16\x01\x1f\x00\x00\x00\x00\x00\x20\x00\x00\x00\x17\x00\x00\x00\x00\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\xb3\x00\x1b\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x17\x00\x1c\x00\x18\x02\x80\x00\x1e\x00\xb5\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xce\x01\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xd0\x01\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xf0\x01\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x36\x01\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x4a\x01\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x4b\x01\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x4c\x01\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x58\x01\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x67\x01\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x68\x01\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x69\x01\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x6e\x01\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x6f\x01\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x79\x01\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xcb\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xcc\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x9a\x01\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x9f\x01\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xc6\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xc7\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xc9\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xca\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xcb\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xcc\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xcd\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xd0\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xdf\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x94\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xe9\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xeb\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x62\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x8c\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x92\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x94\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x96\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x97\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xb6\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xb7\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xb8\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xb9\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xba\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xbb\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xbd\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xbf\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\xc1\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x00\x00\x17\x00\x00\x00\x18\x00\x1c\x00\x17\x00\x1d\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x19\x00\x1a\x00\x1b\x00\x00\x00\x17\x00\x00\x00\x1b\x00\x00\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1c\x00\x1f\x00\x9d\x01\x1e\x00\x20\x00\x1f\x00\x1b\x00\x17\x00\x20\x00\x00\x00\x00\x00\x00\x00\x1c\x00\x00\x00\x9d\x01\x1e\x00\x00\x00\x1f\x00\x73\x00\xa2\x00\x20\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x17\x00\x0f\x01\x1c\x00\x00\x00\xd3\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x10\x01\x11\x01\xa4\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1c\x00\x76\x00\x95\x00\x1e\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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 (3, 241) [+	(3 , happyReduce_3),+	(4 , happyReduce_4),+	(5 , happyReduce_5),+	(6 , happyReduce_6),+	(7 , happyReduce_7),+	(8 , happyReduce_8),+	(9 , happyReduce_9),+	(10 , happyReduce_10),+	(11 , happyReduce_11),+	(12 , happyReduce_12),+	(13 , happyReduce_13),+	(14 , happyReduce_14),+	(15 , happyReduce_15),+	(16 , happyReduce_16),+	(17 , happyReduce_17),+	(18 , happyReduce_18),+	(19 , happyReduce_19),+	(20 , happyReduce_20),+	(21 , happyReduce_21),+	(22 , happyReduce_22),+	(23 , happyReduce_23),+	(24 , happyReduce_24),+	(25 , happyReduce_25),+	(26 , happyReduce_26),+	(27 , happyReduce_27),+	(28 , happyReduce_28),+	(29 , happyReduce_29),+	(30 , happyReduce_30),+	(31 , happyReduce_31),+	(32 , happyReduce_32),+	(33 , happyReduce_33),+	(34 , happyReduce_34),+	(35 , happyReduce_35),+	(36 , happyReduce_36),+	(37 , happyReduce_37),+	(38 , happyReduce_38),+	(39 , happyReduce_39),+	(40 , happyReduce_40),+	(41 , happyReduce_41),+	(42 , happyReduce_42),+	(43 , happyReduce_43),+	(44 , happyReduce_44),+	(45 , happyReduce_45),+	(46 , happyReduce_46),+	(47 , happyReduce_47),+	(48 , happyReduce_48),+	(49 , happyReduce_49),+	(50 , happyReduce_50),+	(51 , happyReduce_51),+	(52 , happyReduce_52),+	(53 , happyReduce_53),+	(54 , happyReduce_54),+	(55 , happyReduce_55),+	(56 , happyReduce_56),+	(57 , happyReduce_57),+	(58 , happyReduce_58),+	(59 , happyReduce_59),+	(60 , happyReduce_60),+	(61 , happyReduce_61),+	(62 , happyReduce_62),+	(63 , happyReduce_63),+	(64 , happyReduce_64),+	(65 , happyReduce_65),+	(66 , happyReduce_66),+	(67 , happyReduce_67),+	(68 , happyReduce_68),+	(69 , happyReduce_69),+	(70 , happyReduce_70),+	(71 , happyReduce_71),+	(72 , happyReduce_72),+	(73 , happyReduce_73),+	(74 , happyReduce_74),+	(75 , happyReduce_75),+	(76 , happyReduce_76),+	(77 , happyReduce_77),+	(78 , happyReduce_78),+	(79 , happyReduce_79),+	(80 , happyReduce_80),+	(81 , happyReduce_81),+	(82 , happyReduce_82),+	(83 , happyReduce_83),+	(84 , happyReduce_84),+	(85 , happyReduce_85),+	(86 , happyReduce_86),+	(87 , happyReduce_87),+	(88 , happyReduce_88),+	(89 , happyReduce_89),+	(90 , happyReduce_90),+	(91 , happyReduce_91),+	(92 , happyReduce_92),+	(93 , happyReduce_93),+	(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),+	(109 , happyReduce_109),+	(110 , happyReduce_110),+	(111 , happyReduce_111),+	(112 , happyReduce_112),+	(113 , happyReduce_113),+	(114 , happyReduce_114),+	(115 , happyReduce_115),+	(116 , happyReduce_116),+	(117 , happyReduce_117),+	(118 , happyReduce_118),+	(119 , happyReduce_119),+	(120 , happyReduce_120),+	(121 , happyReduce_121),+	(122 , happyReduce_122),+	(123 , happyReduce_123),+	(124 , happyReduce_124),+	(125 , happyReduce_125),+	(126 , happyReduce_126),+	(127 , happyReduce_127),+	(128 , happyReduce_128),+	(129 , happyReduce_129),+	(130 , happyReduce_130),+	(131 , happyReduce_131),+	(132 , happyReduce_132),+	(133 , happyReduce_133),+	(134 , happyReduce_134),+	(135 , happyReduce_135),+	(136 , happyReduce_136),+	(137 , happyReduce_137),+	(138 , happyReduce_138),+	(139 , happyReduce_139),+	(140 , happyReduce_140),+	(141 , happyReduce_141),+	(142 , happyReduce_142),+	(143 , happyReduce_143),+	(144 , happyReduce_144),+	(145 , happyReduce_145),+	(146 , happyReduce_146),+	(147 , happyReduce_147),+	(148 , happyReduce_148),+	(149 , happyReduce_149),+	(150 , happyReduce_150),+	(151 , happyReduce_151),+	(152 , happyReduce_152),+	(153 , happyReduce_153),+	(154 , happyReduce_154),+	(155 , happyReduce_155),+	(156 , happyReduce_156),+	(157 , happyReduce_157),+	(158 , happyReduce_158),+	(159 , happyReduce_159),+	(160 , happyReduce_160),+	(161 , happyReduce_161),+	(162 , happyReduce_162),+	(163 , happyReduce_163),+	(164 , happyReduce_164),+	(165 , happyReduce_165),+	(166 , happyReduce_166),+	(167 , happyReduce_167),+	(168 , happyReduce_168),+	(169 , happyReduce_169),+	(170 , happyReduce_170),+	(171 , happyReduce_171),+	(172 , happyReduce_172),+	(173 , happyReduce_173),+	(174 , happyReduce_174),+	(175 , happyReduce_175),+	(176 , happyReduce_176),+	(177 , happyReduce_177),+	(178 , happyReduce_178),+	(179 , happyReduce_179),+	(180 , happyReduce_180),+	(181 , happyReduce_181),+	(182 , happyReduce_182),+	(183 , happyReduce_183),+	(184 , happyReduce_184),+	(185 , happyReduce_185),+	(186 , happyReduce_186),+	(187 , happyReduce_187),+	(188 , happyReduce_188),+	(189 , happyReduce_189),+	(190 , happyReduce_190),+	(191 , happyReduce_191),+	(192 , happyReduce_192),+	(193 , happyReduce_193),+	(194 , happyReduce_194),+	(195 , happyReduce_195),+	(196 , happyReduce_196),+	(197 , happyReduce_197),+	(198 , happyReduce_198),+	(199 , happyReduce_199),+	(200 , happyReduce_200),+	(201 , happyReduce_201),+	(202 , happyReduce_202),+	(203 , happyReduce_203),+	(204 , happyReduce_204),+	(205 , happyReduce_205),+	(206 , happyReduce_206),+	(207 , happyReduce_207),+	(208 , happyReduce_208),+	(209 , happyReduce_209),+	(210 , happyReduce_210),+	(211 , happyReduce_211),+	(212 , happyReduce_212),+	(213 , happyReduce_213),+	(214 , happyReduce_214),+	(215 , happyReduce_215),+	(216 , happyReduce_216),+	(217 , happyReduce_217),+	(218 , happyReduce_218),+	(219 , happyReduce_219),+	(220 , happyReduce_220),+	(221 , happyReduce_221),+	(222 , happyReduce_222),+	(223 , happyReduce_223),+	(224 , happyReduce_224),+	(225 , happyReduce_225),+	(226 , happyReduce_226),+	(227 , happyReduce_227),+	(228 , happyReduce_228),+	(229 , happyReduce_229),+	(230 , happyReduce_230),+	(231 , happyReduce_231),+	(232 , happyReduce_232),+	(233 , happyReduce_233),+	(234 , happyReduce_234),+	(235 , happyReduce_235),+	(236 , happyReduce_236),+	(237 , happyReduce_237),+	(238 , happyReduce_238),+	(239 , happyReduce_239),+	(240 , happyReduce_240),+	(241 , happyReduce_241)+	]++happy_n_terms = 115 :: Int+happy_n_nonterms = 70 :: Int++happyReduce_3 = happySpecReduce_0  0# happyReduction_3+happyReduction_3  =  happyIn6+		 ([]+	)++happyReduce_4 = happySpecReduce_2  0# happyReduction_4+happyReduction_4 happy_x_2+	happy_x_1+	 =  case happyOut7 happy_x_1 of { happy_var_1 -> +	case happyOut6 happy_x_2 of { happy_var_2 -> +	happyIn6+		 (happy_var_1:happy_var_2+	)}}++happyReduce_5 = happySpecReduce_2  0# happyReduction_5+happyReduction_5 happy_x_2+	happy_x_1+	 =  case happyOut16 happy_x_1 of { happy_var_1 -> +	case happyOut6 happy_x_2 of { happy_var_2 -> +	happyIn6+		 (map RealDecl happy_var_1 ++ happy_var_2+	)}}++happyReduce_6 = happyReduce 4# 0# happyReduction_6+happyReduction_6 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOutTok happy_x_2 of { (TokenString happy_var_2) -> +	case happyOut6 happy_x_4 of { happy_var_4 -> +	happyIn6+		 (RealDecl (PInclude happy_var_2) : happy_var_4+	) `HappyStk` happyRest}}++happyReduce_7 = happySpecReduce_1  1# happyReduction_7+happyReduction_7 happy_x_1+	 =  case happyOut9 happy_x_1 of { happy_var_1 -> +	happyIn7+		 (happy_var_1+	)}++happyReduce_8 = happySpecReduce_1  1# happyReduction_8+happyReduction_8 happy_x_1+	 =  case happyOut24 happy_x_1 of { happy_var_1 -> +	happyIn7+		 (RealDecl (DataDecl happy_var_1)+	)}++happyReduce_9 = happySpecReduce_1  1# happyReduction_9+happyReduction_9 happy_x_1+	 =  case happyOut20 happy_x_1 of { happy_var_1 -> +	happyIn7+		 (RealDecl happy_var_1+	)}++happyReduce_10 = happySpecReduce_3  1# happyReduction_10+happyReduction_10 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_2 of { (TokenName happy_var_2) -> +	happyIn7+		 (RealDecl (Freeze happy_var_2)+	)}++happyReduce_11 = happyReduce 4# 1# happyReduction_11+happyReduction_11 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut60 happy_x_1 of { happy_var_1 -> +	case happyOut6 happy_x_3 of { happy_var_3 -> +	happyIn7+		 (PUsing happy_var_1 happy_var_3+	) `HappyStk` happyRest}}++happyReduce_12 = happyReduce 4# 1# happyReduction_12+happyReduction_12 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut61 happy_x_1 of { happy_var_1 -> +	case happyOut6 happy_x_3 of { happy_var_3 -> +	happyIn7+		 (PDoUsing happy_var_1 happy_var_3+	) `HappyStk` happyRest}}++happyReduce_13 = happyReduce 4# 1# happyReduction_13+happyReduction_13 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut62 happy_x_1 of { happy_var_1 -> +	case happyOut6 happy_x_3 of { happy_var_3 -> +	happyIn7+		 (PIdiom happy_var_1 happy_var_3+	) `HappyStk` happyRest}}++happyReduce_14 = happyReduce 4# 1# happyReduction_14+happyReduction_14 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut63 happy_x_1 of { happy_var_1 -> +	case happyOut6 happy_x_3 of { happy_var_3 -> +	happyIn7+		 (PParams happy_var_1 happy_var_3+	) `HappyStk` happyRest}}++happyReduce_15 = happySpecReduce_1  1# happyReduction_15+happyReduction_15 happy_x_1+	 =  case happyOut8 happy_x_1 of { happy_var_1 -> +	happyIn7+		 (RealDecl happy_var_1+	)}++happyReduce_16 = happyReduce 6# 1# happyReduction_16+happyReduction_16 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut29 happy_x_2 of { happy_var_2 -> +	case happyOut38 happy_x_3 of { happy_var_3 -> +	case happyOut31 happy_x_5 of { happy_var_5 -> +	happyIn7+		 (PSyntax happy_var_2 happy_var_3 happy_var_5+	) `HappyStk` happyRest}}}++happyReduce_17 = happySpecReduce_2  1# happyReduction_17+happyReduction_17 happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_2 of { (TokenString happy_var_2) -> +	happyIn7+		 (RealDecl (CInclude happy_var_2)+	)}++happyReduce_18 = happySpecReduce_2  1# happyReduction_18+happyReduction_18 happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_2 of { (TokenString happy_var_2) -> +	happyIn7+		 (RealDecl (CLib happy_var_2)+	)}++happyReduce_19 = happyReduce 5# 2# happyReduction_19+happyReduction_19 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_2 of { happy_var_2 -> +	case happyOut31 happy_x_4 of { happy_var_4 -> +	happyIn8+		 (Transform happy_var_2 happy_var_4+	) `HappyStk` happyRest}}++happyReduce_20 = happyReduce 7# 3# happyReduction_20+happyReduction_20 (happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut47 happy_x_3 of { happy_var_3 -> +	case happyOut14 happy_x_4 of { happy_var_4 -> +	case happyOut74 happy_x_5 of { happy_var_5 -> +	case happyOut73 happy_x_6 of { happy_var_6 -> +	happyIn9+		 (FunType happy_var_1 happy_var_3 (nub happy_var_4) happy_var_5 happy_var_6+	) `HappyStk` happyRest}}}}}++happyReduce_21 = happySpecReduce_3  3# happyReduction_21+happyReduction_21 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut71 happy_x_2 of { happy_var_2 -> +	happyIn9+		 (ProofScript happy_var_1 happy_var_2+	)}}++happyReduce_22 = happyReduce 9# 3# happyReduction_22+happyReduction_22 (happy_x_9 `HappyStk`+	happy_x_8 `HappyStk`+	happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut22 happy_x_1 of { happy_var_1 -> +	case happyOut11 happy_x_2 of { happy_var_2 -> +	case happyOut10 happy_x_3 of { happy_var_3 -> +	case happyOut31 happy_x_4 of { happy_var_4 -> +	case happyOut13 happy_x_6 of { happy_var_6 -> +	case happyOut74 happy_x_8 of { happy_var_8 -> +	case happyOut73 happy_x_9 of { happy_var_9 -> +	happyIn9+		 (WithClause (mkDef happy_var_8 happy_var_9 happy_var_1) happy_var_2 happy_var_3 happy_var_4 happy_var_6+	) `HappyStk` happyRest}}}}}}}++happyReduce_23 = happyReduce 10# 3# happyReduction_23+happyReduction_23 (happy_x_10 `HappyStk`+	happy_x_9 `HappyStk`+	happy_x_8 `HappyStk`+	happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut22 happy_x_1 of { happy_var_1 -> +	case happyOut11 happy_x_2 of { happy_var_2 -> +	case happyOut31 happy_x_4 of { happy_var_4 -> +	case happyOut29 happy_x_7 of { happy_var_7 -> +	case happyOut74 happy_x_9 of { happy_var_9 -> +	case happyOut73 happy_x_10 of { happy_var_10 -> +	happyIn9+		 (FunClauseP (mkDef happy_var_9 happy_var_10 happy_var_1) happy_var_2 happy_var_4 happy_var_7+	) `HappyStk` happyRest}}}}}}++happyReduce_24 = happyReduce 8# 3# happyReduction_24+happyReduction_24 (happy_x_8 `HappyStk`+	happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut22 happy_x_1 of { happy_var_1 -> +	case happyOut11 happy_x_2 of { happy_var_2 -> +	case happyOut31 happy_x_4 of { happy_var_4 -> +	case happyOut14 happy_x_5 of { happy_var_5 -> +	case happyOut74 happy_x_7 of { happy_var_7 -> +	case happyOut73 happy_x_8 of { happy_var_8 -> +	happyIn9+		 (FunClause (mkDef happy_var_7 happy_var_8 happy_var_1) happy_var_2 happy_var_4 (nub happy_var_5)+	) `HappyStk` happyRest}}}}}}++happyReduce_25 = happyReduce 5# 3# happyReduction_25+happyReduction_25 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut12 happy_x_2 of { happy_var_2 -> +	case happyOut31 happy_x_4 of { happy_var_4 -> +	happyIn9+		 (FunClause RPlaceholder [happy_var_2] happy_var_4 []+	) `HappyStk` happyRest}}++happyReduce_26 = happyReduce 8# 3# happyReduction_26+happyReduction_26 (happy_x_8 `HappyStk`+	happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut12 happy_x_2 of { happy_var_2 -> +	case happyOut31 happy_x_4 of { happy_var_4 -> +	case happyOut29 happy_x_7 of { happy_var_7 -> +	happyIn9+		 (FunClauseP RPlaceholder [happy_var_2] happy_var_4 happy_var_7+	) `HappyStk` happyRest}}}++happyReduce_27 = happyReduce 7# 3# happyReduction_27+happyReduction_27 (happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut12 happy_x_2 of { happy_var_2 -> +	case happyOut10 happy_x_3 of { happy_var_3 -> +	case happyOut31 happy_x_4 of { happy_var_4 -> +	case happyOut13 happy_x_6 of { happy_var_6 -> +	happyIn9+		 (WithClause RPlaceholder [happy_var_2] happy_var_3 happy_var_4 happy_var_6+	) `HappyStk` happyRest}}}}++happyReduce_28 = happySpecReduce_1  4# happyReduction_28+happyReduction_28 happy_x_1+	 =  happyIn10+		 (False+	)++happyReduce_29 = happySpecReduce_2  4# happyReduction_29+happyReduction_29 happy_x_2+	happy_x_1+	 =  happyIn10+		 (True+	)++happyReduce_30 = happySpecReduce_3  5# happyReduction_30+happyReduction_30 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut12 happy_x_2 of { happy_var_2 -> +	case happyOut11 happy_x_3 of { happy_var_3 -> +	happyIn11+		 (happy_var_2:happy_var_3+	)}}++happyReduce_31 = happySpecReduce_0  5# happyReduction_31+happyReduction_31  =  happyIn11+		 ([]+	)++happyReduce_32 = happySpecReduce_1  6# happyReduction_32+happyReduction_32 happy_x_1+	 =  case happyOut30 happy_x_1 of { happy_var_1 -> +	happyIn12+		 (happy_var_1+	)}++happyReduce_33 = happySpecReduce_1  6# happyReduction_33+happyReduction_33 happy_x_1+	 =  case happyOut52 happy_x_1 of { happy_var_1 -> +	happyIn12+		 (happy_var_1+	)}++happyReduce_34 = happySpecReduce_3  6# happyReduction_34+happyReduction_34 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_2 of { happy_var_2 -> +	happyIn12+		 (happy_var_2+	)}++happyReduce_35 = happyReduce 5# 6# happyReduction_35+happyReduction_35 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut53 happy_x_2 of { happy_var_2 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn12+		 (pairDesugar happy_var_4 happy_var_5 (RVar happy_var_4 happy_var_5 (UN "mkPair")) happy_var_2+	) `HappyStk` happyRest}}}++happyReduce_36 = happySpecReduce_2  7# happyReduction_36+happyReduction_36 happy_x_2+	happy_x_1+	 =  case happyOut9 happy_x_1 of { happy_var_1 -> +	case happyOut13 happy_x_2 of { happy_var_2 -> +	happyIn13+		 (happy_var_1:happy_var_2+	)}}++happyReduce_37 = happySpecReduce_1  7# happyReduction_37+happyReduction_37 happy_x_1+	 =  case happyOut9 happy_x_1 of { happy_var_1 -> +	happyIn13+		 ([happy_var_1]+	)}++happyReduce_38 = happySpecReduce_0  8# happyReduction_38+happyReduction_38  =  happyIn14+		 ([]+	)++happyReduce_39 = happySpecReduce_2  8# happyReduction_39+happyReduction_39 happy_x_2+	happy_x_1+	 =  case happyOut15 happy_x_1 of { happy_var_1 -> +	case happyOut14 happy_x_2 of { happy_var_2 -> +	happyIn14+		 (happy_var_1 ++ happy_var_2+	)}}++happyReduce_40 = happySpecReduce_1  9# happyReduction_40+happyReduction_40 happy_x_1+	 =  happyIn15+		 ([NoCG]+	)++happyReduce_41 = happySpecReduce_1  9# happyReduction_41+happyReduction_41 happy_x_1+	 =  happyIn15+		 ([CGEval, Inline]+	)++happyReduce_42 = happyReduce 4# 9# happyReduction_42+happyReduction_42 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut36 happy_x_3 of { happy_var_3 -> +	happyIn15+		 ([CGSpec happy_var_3]+	) `HappyStk` happyRest}++happyReduce_43 = happySpecReduce_1  9# happyReduction_43+happyReduction_43 happy_x_1+	 =  happyIn15+		 ([CGSpec []]+	)++happyReduce_44 = happySpecReduce_1  9# happyReduction_44+happyReduction_44 happy_x_1+	 =  happyIn15+		 ([Inline]+	)++happyReduce_45 = happySpecReduce_2  9# happyReduction_45+happyReduction_45 happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_2 of { (TokenString happy_var_2) -> +	happyIn15+		 ([CExport happy_var_2]+	)}++happyReduce_46 = happyReduce 4# 10# happyReduction_46+happyReduction_46 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut19 happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { (TokenInt happy_var_2) -> +	case happyOut17 happy_x_3 of { happy_var_3 -> +	happyIn16+		 (map (\x -> Fixity x happy_var_1 happy_var_2) happy_var_3+	) `HappyStk` happyRest}}}++happyReduce_47 = happySpecReduce_1  11# happyReduction_47+happyReduction_47 happy_x_1+	 =  case happyOut18 happy_x_1 of { happy_var_1 -> +	happyIn17+		 ([happy_var_1]+	)}++happyReduce_48 = happySpecReduce_3  11# happyReduction_48+happyReduction_48 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut18 happy_x_1 of { happy_var_1 -> +	case happyOut17 happy_x_3 of { happy_var_3 -> +	happyIn17+		 (happy_var_1:happy_var_3+	)}}++happyReduce_49 = happySpecReduce_1  12# happyReduction_49+happyReduction_49 happy_x_1+	 =  case happyOutTok happy_x_1 of { (TokenInfixName happy_var_1) -> +	happyIn18+		 (happy_var_1+	)}++happyReduce_50 = happySpecReduce_1  12# happyReduction_50+happyReduction_50 happy_x_1+	 =  happyIn18+		 ("-"+	)++happyReduce_51 = happySpecReduce_1  12# happyReduction_51+happyReduction_51 happy_x_1+	 =  happyIn18+		 ("<"+	)++happyReduce_52 = happySpecReduce_1  12# happyReduction_52+happyReduction_52 happy_x_1+	 =  happyIn18+		 (">"+	)++happyReduce_53 = happySpecReduce_1  13# happyReduction_53+happyReduction_53 happy_x_1+	 =  happyIn19+		 (LeftAssoc+	)++happyReduce_54 = happySpecReduce_1  13# happyReduction_54+happyReduction_54 happy_x_1+	 =  happyIn19+		 (RightAssoc+	)++happyReduce_55 = happySpecReduce_1  13# happyReduction_55+happyReduction_55 happy_x_1+	 =  happyIn19+		 (NonAssoc+	)++happyReduce_56 = happyReduce 4# 14# happyReduction_56+happyReduction_56 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut21 happy_x_3 of { happy_var_3 -> +	happyIn20+		 (LatexDefs happy_var_3+	) `HappyStk` happyRest}++happyReduce_57 = happySpecReduce_3  15# happyReduction_57+happyReduction_57 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_3 of { (TokenString happy_var_3) -> +	happyIn21+		 ([(happy_var_1,happy_var_3)]+	)}}++happyReduce_58 = happyReduce 5# 15# happyReduction_58+happyReduction_58 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_3 of { (TokenString happy_var_3) -> +	case happyOut21 happy_x_5 of { happy_var_5 -> +	happyIn21+		 ((happy_var_1,happy_var_3):happy_var_5+	) `HappyStk` happyRest}}}++happyReduce_59 = happySpecReduce_2  16# happyReduction_59+happyReduction_59 happy_x_2+	happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut23 happy_x_2 of { happy_var_2 -> +	happyIn22+		 ((happy_var_1, happy_var_2)+	)}}++happyReduce_60 = happySpecReduce_0  17# happyReduction_60+happyReduction_60  =  happyIn23+		 ([]+	)++happyReduce_61 = happySpecReduce_2  17# happyReduction_61+happyReduction_61 happy_x_2+	happy_x_1+	 =  case happyOut51 happy_x_1 of { happy_var_1 -> +	case happyOut23 happy_x_2 of { happy_var_2 -> +	happyIn23+		 ((happy_var_1,Nothing):happy_var_2+	)}}++happyReduce_62 = happyReduce 5# 17# happyReduction_62+happyReduction_62 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOutTok happy_x_1 of { (TokenBrackName happy_var_1) -> +	case happyOut23 happy_x_3 of { happy_var_3 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn23+		 ((RVar happy_var_4 happy_var_5 happy_var_1, Just happy_var_1):happy_var_3+	) `HappyStk` happyRest}}}}++happyReduce_63 = happyReduce 5# 17# happyReduction_63+happyReduction_63 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOutTok happy_x_1 of { (TokenBrackName happy_var_1) -> +	case happyOut31 happy_x_3 of { happy_var_3 -> +	case happyOut23 happy_x_5 of { happy_var_5 -> +	happyIn23+		 ((happy_var_3, Just happy_var_1):happy_var_5+	) `HappyStk` happyRest}}}++happyReduce_64 = happyReduce 6# 18# happyReduction_64+happyReduction_64 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut26 happy_x_2 of { happy_var_2 -> +	case happyOut29 happy_x_3 of { happy_var_3 -> +	case happyOut25 happy_x_4 of { happy_var_4 -> +	case happyOut74 happy_x_5 of { happy_var_5 -> +	case happyOut73 happy_x_6 of { happy_var_6 -> +	happyIn24+		 (mkDatatype happy_var_5 happy_var_6 happy_var_3 happy_var_4 happy_var_2+	) `HappyStk` happyRest}}}}}++happyReduce_65 = happySpecReduce_3  19# happyReduction_65+happyReduction_65 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut59 happy_x_1 of { happy_var_1 -> +	case happyOut67 happy_x_2 of { happy_var_2 -> +	happyIn25+		 (Right (happy_var_1,happy_var_2)+	)}}++happyReduce_66 = happySpecReduce_3  19# happyReduction_66+happyReduction_66 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut47 happy_x_2 of { happy_var_2 -> +	happyIn25+		 (Left happy_var_2+	)}++happyReduce_67 = happySpecReduce_3  19# happyReduction_67+happyReduction_67 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut74 happy_x_2 of { happy_var_2 -> +	case happyOut73 happy_x_3 of { happy_var_3 -> +	happyIn25+		 (Left (RConst happy_var_2 happy_var_3 TYPE)+	)}}++happyReduce_68 = happySpecReduce_0  20# happyReduction_68+happyReduction_68  =  happyIn26+		 ([]+	)++happyReduce_69 = happySpecReduce_3  20# happyReduction_69+happyReduction_69 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut27 happy_x_2 of { happy_var_2 -> +	happyIn26+		 (happy_var_2+	)}++happyReduce_70 = happySpecReduce_1  21# happyReduction_70+happyReduction_70 happy_x_1+	 =  case happyOut28 happy_x_1 of { happy_var_1 -> +	happyIn27+		 ([happy_var_1]+	)}++happyReduce_71 = happySpecReduce_3  21# happyReduction_71+happyReduction_71 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+		 (happy_var_1:happy_var_3+	)}}++happyReduce_72 = happySpecReduce_1  22# happyReduction_72+happyReduction_72 happy_x_1+	 =  happyIn28+		 (NoElim+	)++happyReduce_73 = happySpecReduce_1  22# happyReduction_73+happyReduction_73 happy_x_1+	 =  happyIn28+		 (Collapsible+	)++happyReduce_74 = happySpecReduce_1  23# happyReduction_74+happyReduction_74 happy_x_1+	 =  case happyOutTok happy_x_1 of { (TokenName happy_var_1) -> +	happyIn29+		 (happy_var_1+	)}++happyReduce_75 = happySpecReduce_3  23# happyReduction_75+happyReduction_75 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut18 happy_x_2 of { happy_var_2 -> +	happyIn29+		 (useropFn happy_var_2+	)}++happyReduce_76 = happyReduce 4# 24# happyReduction_76+happyReduction_76 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut30 happy_x_1 of { happy_var_1 -> +	case happyOut74 happy_x_2 of { happy_var_2 -> +	case happyOut73 happy_x_3 of { happy_var_3 -> +	case happyOut51 happy_x_4 of { happy_var_4 -> +	happyIn30+		 (RApp happy_var_2 happy_var_3 happy_var_1 happy_var_4+	) `HappyStk` happyRest}}}}++happyReduce_77 = happyReduce 5# 24# happyReduction_77+happyReduction_77 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut30 happy_x_1 of { happy_var_1 -> +	case happyOut40 happy_x_2 of { happy_var_2 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn30+		 (RAppImp happy_var_4 happy_var_5 (fst happy_var_2) happy_var_1 (snd happy_var_2)+	) `HappyStk` happyRest}}}}++happyReduce_78 = happySpecReduce_3  24# happyReduction_78+happyReduction_78 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut74 happy_x_2 of { happy_var_2 -> +	case happyOut73 happy_x_3 of { happy_var_3 -> +	happyIn30+		 (RVar happy_var_2 happy_var_3 happy_var_1+	)}}}++happyReduce_79 = happySpecReduce_3  24# happyReduction_79+happyReduction_79 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut57 happy_x_1 of { happy_var_1 -> +	case happyOut74 happy_x_2 of { happy_var_2 -> +	case happyOut73 happy_x_3 of { happy_var_3 -> +	happyIn30+		 (RConst happy_var_2 happy_var_3 happy_var_1+	)}}}++happyReduce_80 = happySpecReduce_1  24# happyReduction_80+happyReduction_80 happy_x_1+	 =  happyIn30+		 (RPlaceholder+	)++happyReduce_81 = happySpecReduce_3  24# happyReduction_81+happyReduction_81 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut74 happy_x_2 of { happy_var_2 -> +	case happyOut73 happy_x_3 of { happy_var_3 -> +	happyIn30+		 (RVar happy_var_2 happy_var_3 (UN "__Empty")+	)}}++happyReduce_82 = happySpecReduce_3  24# happyReduction_82+happyReduction_82 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut74 happy_x_2 of { happy_var_2 -> +	case happyOut73 happy_x_3 of { happy_var_3 -> +	happyIn30+		 (RVar happy_var_2 happy_var_3 (UN "__Unit")+	)}}++happyReduce_83 = happySpecReduce_1  25# happyReduction_83+happyReduction_83 happy_x_1+	 =  case happyOut51 happy_x_1 of { happy_var_1 -> +	happyIn31+		 (happy_var_1+	)}++happyReduce_84 = happySpecReduce_3  25# happyReduction_84+happyReduction_84 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut48 happy_x_2 of { happy_var_2 -> +	happyIn31+		 (happy_var_2+	)}++happyReduce_85 = happyReduce 4# 25# happyReduction_85+happyReduction_85 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_1 of { happy_var_1 -> +	case happyOut74 happy_x_2 of { happy_var_2 -> +	case happyOut73 happy_x_3 of { happy_var_3 -> +	case happyOut51 happy_x_4 of { happy_var_4 -> +	happyIn31+		 (RApp happy_var_2 happy_var_3 happy_var_1 happy_var_4+	) `HappyStk` happyRest}}}}++happyReduce_86 = happyReduce 5# 25# happyReduction_86+happyReduction_86 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_1 of { happy_var_1 -> +	case happyOut40 happy_x_2 of { happy_var_2 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn31+		 (RAppImp happy_var_4 happy_var_5 (fst happy_var_2) happy_var_1 (snd happy_var_2)+	) `HappyStk` happyRest}}}}++happyReduce_87 = happyReduce 4# 25# happyReduction_87+happyReduction_87 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_2 of { happy_var_2 -> +	case happyOut74 happy_x_3 of { happy_var_3 -> +	case happyOut73 happy_x_4 of { happy_var_4 -> +	happyIn31+		 (RApp happy_var_3 happy_var_4 (RApp happy_var_3 happy_var_4 (RVar happy_var_3 happy_var_4 (UN "__lazy")) RPlaceholder) happy_var_2+	) `HappyStk` happyRest}}}++happyReduce_88 = happyReduce 4# 25# happyReduction_88+happyReduction_88 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut32 happy_x_2 of { happy_var_2 -> +	case happyOut31 happy_x_4 of { happy_var_4 -> +	happyIn31+		 (doBind Lam happy_var_2 happy_var_4+	) `HappyStk` happyRest}}++happyReduce_89 = happyReduce 4# 25# happyReduction_89+happyReduction_89 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut39 happy_x_2 of { happy_var_2 -> +	case happyOut31 happy_x_4 of { happy_var_4 -> +	happyIn31+		 (doLetBind happy_var_2 happy_var_4+	) `HappyStk` happyRest}}++happyReduce_90 = happySpecReduce_1  25# happyReduction_90+happyReduction_90 happy_x_1+	 =  case happyOut41 happy_x_1 of { happy_var_1 -> +	happyIn31+		 (happy_var_1+	)}++happyReduce_91 = happyReduce 8# 25# happyReduction_91+happyReduction_91 (happy_x_8 `HappyStk`+	happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_2 of { happy_var_2 -> +	case happyOut31 happy_x_4 of { happy_var_4 -> +	case happyOut31 happy_x_6 of { happy_var_6 -> +	case happyOut74 happy_x_7 of { happy_var_7 -> +	case happyOut73 happy_x_8 of { happy_var_8 -> +	happyIn31+		 (mkApp happy_var_7 happy_var_8 (RVar happy_var_7 happy_var_8 (UN "if_then_else")) [happy_var_2,happy_var_4,happy_var_6]+	) `HappyStk` happyRest}}}}}++happyReduce_92 = happySpecReduce_2  26# happyReduction_92+happyReduction_92 happy_x_2+	happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut45 happy_x_2 of { happy_var_2 -> +	happyIn32+		 ([(happy_var_1,happy_var_2)]+	)}}++happyReduce_93 = happyReduce 4# 26# happyReduction_93+happyReduction_93 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut45 happy_x_2 of { happy_var_2 -> +	case happyOut32 happy_x_4 of { happy_var_4 -> +	happyIn32+		 ((happy_var_1,happy_var_2):happy_var_4+	) `HappyStk` happyRest}}}++happyReduce_94 = happySpecReduce_3  27# happyReduction_94+happyReduction_94 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut34 happy_x_1 of { happy_var_1 -> +	case happyOut33 happy_x_3 of { happy_var_3 -> +	happyIn33+		 (happy_var_1 ++ happy_var_3+	)}}++happyReduce_95 = happySpecReduce_1  27# happyReduction_95+happyReduction_95 happy_x_1+	 =  case happyOut34 happy_x_1 of { happy_var_1 -> +	happyIn33+		 (happy_var_1+	)}++happyReduce_96 = happySpecReduce_3  28# happyReduction_96+happyReduction_96 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut47 happy_x_3 of { happy_var_3 -> +	happyIn34+		 (map ( \x -> (x,happy_var_3)) [happy_var_1]+	)}}++happyReduce_97 = happySpecReduce_1  29# happyReduction_97+happyReduction_97 happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	happyIn35+		 ([happy_var_1]+	)}++happyReduce_98 = happySpecReduce_3  29# happyReduction_98+happyReduction_98 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut35 happy_x_3 of { happy_var_3 -> +	happyIn35+		 (happy_var_1:happy_var_3+	)}}++happyReduce_99 = happySpecReduce_2  30# happyReduction_99+happyReduction_99 happy_x_2+	happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { (TokenInt happy_var_2) -> +	happyIn36+		 ([(happy_var_1,happy_var_2)]+	)}}++happyReduce_100 = happySpecReduce_1  30# happyReduction_100+happyReduction_100 happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	happyIn36+		 ([(happy_var_1, 0)]+	)}++happyReduce_101 = happySpecReduce_3  30# happyReduction_101+happyReduction_101 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut36 happy_x_3 of { happy_var_3 -> +	happyIn36+		 ((happy_var_1,0):happy_var_3+	)}}++happyReduce_102 = happyReduce 4# 30# happyReduction_102+happyReduction_102 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { (TokenInt happy_var_2) -> +	case happyOut36 happy_x_4 of { happy_var_4 -> +	happyIn36+		 ((happy_var_1,happy_var_2):happy_var_4+	) `HappyStk` happyRest}}}++happyReduce_103 = happySpecReduce_1  31# happyReduction_103+happyReduction_103 happy_x_1+	 =  case happyOutTok happy_x_1 of { (TokenBrackName happy_var_1) -> +	happyIn37+		 ([happy_var_1]+	)}++happyReduce_104 = happySpecReduce_3  31# happyReduction_104+happyReduction_104 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { (TokenBrackName happy_var_1) -> +	case happyOut35 happy_x_3 of { happy_var_3 -> +	happyIn37+		 (happy_var_1:happy_var_3+	)}}++happyReduce_105 = happySpecReduce_1  32# happyReduction_105+happyReduction_105 happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	happyIn38+		 ([happy_var_1]+	)}++happyReduce_106 = happySpecReduce_2  32# happyReduction_106+happyReduction_106 happy_x_2+	happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut38 happy_x_2 of { happy_var_2 -> +	happyIn38+		 (happy_var_1:happy_var_2+	)}}++happyReduce_107 = happyReduce 4# 33# happyReduction_107+happyReduction_107 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut45 happy_x_2 of { happy_var_2 -> +	case happyOut31 happy_x_4 of { happy_var_4 -> +	happyIn39+		 ([(happy_var_1,happy_var_2,happy_var_4)]+	) `HappyStk` happyRest}}}++happyReduce_108 = happyReduce 6# 33# happyReduction_108+happyReduction_108 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut45 happy_x_2 of { happy_var_2 -> +	case happyOut31 happy_x_4 of { happy_var_4 -> +	case happyOut39 happy_x_6 of { happy_var_6 -> +	happyIn39+		 ((happy_var_1,happy_var_2,happy_var_4):happy_var_6+	) `HappyStk` happyRest}}}}++happyReduce_109 = happySpecReduce_3  34# happyReduction_109+happyReduction_109 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { (TokenBrackName happy_var_1) -> +	case happyOut74 happy_x_2 of { happy_var_2 -> +	case happyOut73 happy_x_3 of { happy_var_3 -> +	happyIn40+		 ((happy_var_1, RVar happy_var_2 happy_var_3 happy_var_1)+	)}}}++happyReduce_110 = happySpecReduce_3  34# happyReduction_110+happyReduction_110 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { (TokenBrackName happy_var_1) -> +	case happyOut31 happy_x_3 of { happy_var_3 -> +	happyIn40+		 ((happy_var_1, happy_var_3)+	)}}++happyReduce_111 = happyReduce 4# 35# happyReduction_111+happyReduction_111 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_2 of { happy_var_2 -> +	case happyOut74 happy_x_3 of { happy_var_3 -> +	case happyOut73 happy_x_4 of { happy_var_4 -> +	happyIn41+		 (RInfix happy_var_3 happy_var_4 Minus (RConst happy_var_3 happy_var_4 (Num 0)) happy_var_2+	) `HappyStk` happyRest}}}++happyReduce_112 = happyReduce 5# 35# happyReduction_112+happyReduction_112 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_1 of { happy_var_1 -> +	case happyOut31 happy_x_3 of { happy_var_3 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn41+		 (RUserInfix happy_var_4 happy_var_5 False "-" happy_var_1 happy_var_3+	) `HappyStk` happyRest}}}}++happyReduce_113 = happyReduce 5# 35# happyReduction_113+happyReduction_113 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_1 of { happy_var_1 -> +	case happyOut31 happy_x_3 of { happy_var_3 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn41+		 (mkApp happy_var_4 happy_var_5 (RVar happy_var_4 happy_var_5 (UN "Pair")) [happy_var_1, happy_var_3]+	) `HappyStk` happyRest}}}}++happyReduce_114 = happyReduce 5# 35# happyReduction_114+happyReduction_114 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_1 of { happy_var_1 -> +	case happyOut31 happy_x_3 of { happy_var_3 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn41+		 (RUserInfix happy_var_4 happy_var_5 False "<" happy_var_1 happy_var_3+	) `HappyStk` happyRest}}}}++happyReduce_115 = happyReduce 5# 35# happyReduction_115+happyReduction_115 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_1 of { happy_var_1 -> +	case happyOut31 happy_x_3 of { happy_var_3 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn41+		 (RUserInfix happy_var_4 happy_var_5 False ">" happy_var_1 happy_var_3+	) `HappyStk` happyRest}}}}++happyReduce_116 = happyReduce 5# 35# happyReduction_116+happyReduction_116 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_1 of { happy_var_1 -> +	case happyOut31 happy_x_3 of { happy_var_3 -> +	happyIn41+		 (RBind (MN "X" 0) (Pi Ex Eager happy_var_1) happy_var_3+	) `HappyStk` happyRest}}++happyReduce_117 = happySpecReduce_1  35# happyReduction_117+happyReduction_117 happy_x_1+	 =  case happyOut42 happy_x_1 of { happy_var_1 -> +	happyIn41+		 (happy_var_1+	)}++happyReduce_118 = happyReduce 5# 35# happyReduction_118+happyReduction_118 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut51 happy_x_1 of { happy_var_1 -> +	case happyOut51 happy_x_3 of { happy_var_3 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn41+		 (RInfix happy_var_4 happy_var_5 JMEq happy_var_1 happy_var_3+	) `HappyStk` happyRest}}}}++happyReduce_119 = happyReduce 5# 36# happyReduction_119+happyReduction_119 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { (TokenInfixName happy_var_2) -> +	case happyOut31 happy_x_3 of { happy_var_3 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn42+		 (RUserInfix happy_var_4 happy_var_5 False happy_var_2 happy_var_1 happy_var_3+	) `HappyStk` happyRest}}}}}++happyReduce_120 = happyReduce 6# 37# happyReduction_120+happyReduction_120 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOutTok happy_x_2 of { (TokenInfixName happy_var_2) -> +	case happyOut31 happy_x_3 of { happy_var_3 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn43+		 (RBind (MN "X" 0) (Lam RPlaceholder) +                       (RUserInfix happy_var_4 happy_var_5 False happy_var_2 (RVar happy_var_4 happy_var_5 (MN "X" 0)) happy_var_3)+	) `HappyStk` happyRest}}}}++happyReduce_121 = happyReduce 6# 37# happyReduction_121+happyReduction_121 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_2 of { happy_var_2 -> +	case happyOutTok happy_x_3 of { (TokenInfixName happy_var_3) -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn43+		 (RBind (MN "X" 0) (Lam RPlaceholder) +                       (RUserInfix happy_var_4 happy_var_5 False happy_var_3 happy_var_2 (RVar happy_var_4 happy_var_5 (MN "X" 0)))+	) `HappyStk` happyRest}}}}++happyReduce_122 = happyReduce 6# 37# happyReduction_122+happyReduction_122 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut44 happy_x_2 of { happy_var_2 -> +	case happyOut31 happy_x_3 of { happy_var_3 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn43+		 (RBind (MN "X" 0) (Lam RPlaceholder) +                       (RUserInfix happy_var_4 happy_var_5 False happy_var_2 (RVar happy_var_4 happy_var_5 (MN "X" 0)) happy_var_3)+	) `HappyStk` happyRest}}}}++happyReduce_123 = happyReduce 6# 37# happyReduction_123+happyReduction_123 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_2 of { happy_var_2 -> +	case happyOut44 happy_x_3 of { happy_var_3 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn43+		 (RBind (MN "X" 0) (Lam RPlaceholder) +                       (RUserInfix happy_var_4 happy_var_5 False happy_var_3 happy_var_2 (RVar happy_var_4 happy_var_5 (MN "X" 0)))+	) `HappyStk` happyRest}}}}++happyReduce_124 = happyReduce 6# 37# happyReduction_124+happyReduction_124 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_2 of { happy_var_2 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn43+		 (RBind (MN "X" 0) (Lam RPlaceholder) +                       (RUserInfix happy_var_4 happy_var_5 False "-" happy_var_2 (RVar happy_var_4 happy_var_5 (MN "X" 0)))+	) `HappyStk` happyRest}}}++happyReduce_125 = happyReduce 6# 37# happyReduction_125+happyReduction_125 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_2 of { happy_var_2 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn43+		 (RBind (MN "X" 0) (Lam RPlaceholder) +                       (RBind (MN "X" 1) (Pi Ex Eager happy_var_2) (RVar happy_var_4 happy_var_5 (MN "X" 0)))+	) `HappyStk` happyRest}}}++happyReduce_126 = happyReduce 6# 37# happyReduction_126+happyReduction_126 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_3 of { happy_var_3 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn43+		 (RBind (MN "X" 0) (Lam RPlaceholder) +                       (RBind (MN "X" 1) (Pi Ex Eager (RVar happy_var_4 happy_var_5 (MN "X" 0))) happy_var_3)+	) `HappyStk` happyRest}}}++happyReduce_127 = happyReduce 5# 37# happyReduction_127+happyReduction_127 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut74 happy_x_3 of { happy_var_3 -> +	case happyOut73 happy_x_4 of { happy_var_4 -> +	happyIn43+		 (RBind (MN "X" 0) (Lam RPlaceholder)+                       (RBind (MN "X" 1) (Lam RPlaceholder)+                    (RBind (MN "X" 2) (Pi Ex Eager (RVar happy_var_3 happy_var_4 (MN "X" 0)))+                       (RVar happy_var_3 happy_var_4 (MN "X" 1))))+	) `HappyStk` happyRest}}++happyReduce_128 = happyReduce 5# 37# happyReduction_128+happyReduction_128 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut74 happy_x_3 of { happy_var_3 -> +	case happyOut73 happy_x_4 of { happy_var_4 -> +	happyIn43+		 (RBind (MN "X" 0) (Lam RPlaceholder)+                   (RBind (MN "X" 1) (Lam RPlaceholder)+                       (pairDesugar happy_var_3 happy_var_4 (RVar happy_var_3 happy_var_4 (UN "mkPair"))+                                    [RVar happy_var_3 happy_var_4 (MN "X" 0),+                                     RVar happy_var_3 happy_var_4 (MN "X" 1)]))+	) `HappyStk` happyRest}}++happyReduce_129 = happyReduce 6# 37# happyReduction_129+happyReduction_129 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_2 of { happy_var_2 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn43+		 (RBind (MN "X" 0) (Lam RPlaceholder)+                       (pairDesugar happy_var_4 happy_var_5 (RVar happy_var_4 happy_var_5 (UN "mkPair"))+                                    [happy_var_2,+                                     RVar happy_var_4 happy_var_5 (MN "X" 0)])+	) `HappyStk` happyRest}}}++happyReduce_130 = happyReduce 6# 37# happyReduction_130+happyReduction_130 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_3 of { happy_var_3 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn43+		 (RBind (MN "X" 0) (Lam RPlaceholder)+                       (pairDesugar happy_var_4 happy_var_5 (RVar happy_var_4 happy_var_5 (UN "mkPair"))+                                    [RVar happy_var_4 happy_var_5 (MN "X" 0), happy_var_3])+	) `HappyStk` happyRest}}}++happyReduce_131 = happySpecReduce_1  38# happyReduction_131+happyReduction_131 happy_x_1+	 =  happyIn44+		 ("<"+	)++happyReduce_132 = happySpecReduce_1  38# happyReduction_132+happyReduction_132 happy_x_1+	 =  happyIn44+		 (">"+	)++happyReduce_133 = happySpecReduce_0  39# happyReduction_133+happyReduction_133  =  happyIn45+		 (RPlaceholder+	)++happyReduce_134 = happySpecReduce_2  39# happyReduction_134+happyReduction_134 happy_x_2+	happy_x_1+	 =  case happyOut48 happy_x_2 of { happy_var_2 -> +	happyIn45+		 (happy_var_2+	)}++happyReduce_135 = happySpecReduce_0  40# happyReduction_135+happyReduction_135  =  happyIn46+		 (RPlaceholder+	)++happyReduce_136 = happySpecReduce_2  40# happyReduction_136+happyReduction_136 happy_x_2+	happy_x_1+	 =  case happyOut48 happy_x_2 of { happy_var_2 -> +	happyIn46+		 (happy_var_2+	)}++happyReduce_137 = happyReduce 5# 41# happyReduction_137+happyReduction_137 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut37 happy_x_1 of { happy_var_1 -> +	case happyOut46 happy_x_2 of { happy_var_2 -> +	case happyOut47 happy_x_5 of { happy_var_5 -> +	happyIn47+		 (doBind (Pi Im Eager) (map (\x -> (x, happy_var_2)) happy_var_1) happy_var_5+	) `HappyStk` happyRest}}}++happyReduce_138 = happySpecReduce_1  41# happyReduction_138+happyReduction_138 happy_x_1+	 =  case happyOut48 happy_x_1 of { happy_var_1 -> +	happyIn47+		 (happy_var_1+	)}++happyReduce_139 = happySpecReduce_3  42# happyReduction_139+happyReduction_139 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut48 happy_x_1 of { happy_var_1 -> +	case happyOut48 happy_x_3 of { happy_var_3 -> +	happyIn48+		 (RBind (MN "X" 0) (Pi Ex Eager happy_var_1) happy_var_3+	)}}++happyReduce_140 = happyReduce 5# 42# happyReduction_140+happyReduction_140 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut33 happy_x_2 of { happy_var_2 -> +	case happyOut48 happy_x_5 of { happy_var_5 -> +	happyIn48+		 (doBind (Pi Ex Eager) happy_var_2 happy_var_5+	) `HappyStk` happyRest}}++happyReduce_141 = happyReduce 5# 42# happyReduction_141+happyReduction_141 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut33 happy_x_2 of { happy_var_2 -> +	case happyOut48 happy_x_5 of { happy_var_5 -> +	happyIn48+		 (doBind (Pi Ex Lazy) happy_var_2 happy_var_5+	) `HappyStk` happyRest}}++happyReduce_142 = happySpecReduce_3  42# happyReduction_142+happyReduction_142 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut48 happy_x_2 of { happy_var_2 -> +	happyIn48+		 (bracket happy_var_2+	)}++happyReduce_143 = happyReduce 7# 42# happyReduction_143+happyReduction_143 (happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut48 happy_x_2 of { happy_var_2 -> +	case happyOut48 happy_x_4 of { happy_var_4 -> +	case happyOut74 happy_x_5 of { happy_var_5 -> +	case happyOut73 happy_x_6 of { happy_var_6 -> +	happyIn48+		 (RInfix happy_var_5 happy_var_6 JMEq happy_var_2 happy_var_4+	) `HappyStk` happyRest}}}}++happyReduce_144 = happySpecReduce_1  42# happyReduction_144+happyReduction_144 happy_x_1+	 =  case happyOut30 happy_x_1 of { happy_var_1 -> +	happyIn48+		 (happy_var_1+	)}++happyReduce_145 = happySpecReduce_3  42# happyReduction_145+happyReduction_145 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_2 of { happy_var_2 -> +	happyIn48+		 (happy_var_2+	)}++happyReduce_146 = happyReduce 5# 42# happyReduction_146+happyReduction_146 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut48 happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { (TokenInfixName happy_var_2) -> +	case happyOut48 happy_x_3 of { happy_var_3 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn48+		 (RUserInfix happy_var_4 happy_var_5 False happy_var_2 happy_var_1 happy_var_3+	) `HappyStk` happyRest}}}}}++happyReduce_147 = happyReduce 5# 42# happyReduction_147+happyReduction_147 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut50 happy_x_2 of { happy_var_2 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn48+		 (pairDesugar happy_var_4 happy_var_5 (RVar happy_var_4 happy_var_5 (UN "Pair")) happy_var_2+	) `HappyStk` happyRest}}}++happyReduce_148 = happySpecReduce_1  42# happyReduction_148+happyReduction_148 happy_x_1+	 =  case happyOut49 happy_x_1 of { happy_var_1 -> +	happyIn48+		 (happy_var_1+	)}++happyReduce_149 = happyReduce 8# 43# happyReduction_149+happyReduction_149 (happy_x_8 `HappyStk`+	happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut29 happy_x_2 of { happy_var_2 -> +	case happyOut45 happy_x_3 of { happy_var_3 -> +	case happyOut48 happy_x_5 of { happy_var_5 -> +	case happyOut74 happy_x_7 of { happy_var_7 -> +	case happyOut73 happy_x_8 of { happy_var_8 -> +	happyIn49+		 (sigDesugar happy_var_7 happy_var_8 (happy_var_2, happy_var_3) happy_var_5+	) `HappyStk` happyRest}}}}}++happyReduce_150 = happySpecReduce_3  44# happyReduction_150+happyReduction_150 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut48 happy_x_1 of { happy_var_1 -> +	case happyOut48 happy_x_3 of { happy_var_3 -> +	happyIn50+		 (happy_var_1:happy_var_3:[]+	)}}++happyReduce_151 = happySpecReduce_3  44# happyReduction_151+happyReduction_151 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut48 happy_x_1 of { happy_var_1 -> +	case happyOut50 happy_x_3 of { happy_var_3 -> +	happyIn50+		 (happy_var_1:happy_var_3+	)}}++happyReduce_152 = happySpecReduce_3  45# happyReduction_152+happyReduction_152 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut74 happy_x_2 of { happy_var_2 -> +	case happyOut73 happy_x_3 of { happy_var_3 -> +	happyIn51+		 (RVar happy_var_2 happy_var_3 happy_var_1+	)}}}++happyReduce_153 = happySpecReduce_3  45# happyReduction_153+happyReduction_153 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut74 happy_x_2 of { happy_var_2 -> +	case happyOut73 happy_x_3 of { happy_var_3 -> +	happyIn51+		 (RReturn happy_var_2 happy_var_3+	)}}++happyReduce_154 = happySpecReduce_3  45# happyReduction_154+happyReduction_154 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_2 of { happy_var_2 -> +	happyIn51+		 (bracket happy_var_2+	)}++happyReduce_155 = happySpecReduce_2  45# happyReduction_155+happyReduction_155 happy_x_2+	happy_x_1+	 =  case happyOut51 happy_x_2 of { happy_var_2 -> +	happyIn51+		 (RPure happy_var_2+	)}++happyReduce_156 = happySpecReduce_1  45# happyReduction_156+happyReduction_156 happy_x_1+	 =  case happyOutTok happy_x_1 of { (TokenMetavar happy_var_1) -> +	happyIn51+		 (RMetavar happy_var_1+	)}++happyReduce_157 = happyReduce 4# 45# happyReduction_157+happyReduction_157 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut29 happy_x_2 of { happy_var_2 -> +	case happyOut74 happy_x_3 of { happy_var_3 -> +	case happyOut73 happy_x_4 of { happy_var_4 -> +	happyIn51+		 (RExpVar happy_var_3 happy_var_4 happy_var_2+	) `HappyStk` happyRest}}}++happyReduce_158 = happySpecReduce_3  45# happyReduction_158+happyReduction_158 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut57 happy_x_1 of { happy_var_1 -> +	case happyOut74 happy_x_2 of { happy_var_2 -> +	case happyOut73 happy_x_3 of { happy_var_3 -> +	happyIn51+		 (RConst happy_var_2 happy_var_3 happy_var_1+	)}}}++happyReduce_159 = happySpecReduce_1  45# happyReduction_159+happyReduction_159 happy_x_1+	 =  happyIn51+		 (RRefl+	)++happyReduce_160 = happySpecReduce_3  45# happyReduction_160+happyReduction_160 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut74 happy_x_2 of { happy_var_2 -> +	case happyOut73 happy_x_3 of { happy_var_3 -> +	happyIn51+		 (RVar happy_var_2 happy_var_3 (UN "__Empty")+	)}}++happyReduce_161 = happySpecReduce_3  45# happyReduction_161+happyReduction_161 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut74 happy_x_2 of { happy_var_2 -> +	case happyOut73 happy_x_3 of { happy_var_3 -> +	happyIn51+		 (RVar happy_var_2 happy_var_3 (UN "__Unit")+	)}}++happyReduce_162 = happySpecReduce_1  45# happyReduction_162+happyReduction_162 happy_x_1+	 =  happyIn51+		 (RPlaceholder+	)++happyReduce_163 = happySpecReduce_1  45# happyReduction_163+happyReduction_163 happy_x_1+	 =  case happyOut54 happy_x_1 of { happy_var_1 -> +	happyIn51+		 (RDo happy_var_1+	)}++happyReduce_164 = happySpecReduce_3  45# happyReduction_164+happyReduction_164 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_2 of { happy_var_2 -> +	happyIn51+		 (RIdiom happy_var_2+	)}++happyReduce_165 = happyReduce 5# 45# happyReduction_165+happyReduction_165 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut53 happy_x_2 of { happy_var_2 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn51+		 (pairDesugar happy_var_4 happy_var_5 (RVar happy_var_4 happy_var_5 (UN "mkPair")) happy_var_2+	) `HappyStk` happyRest}}}++happyReduce_166 = happySpecReduce_1  45# happyReduction_166+happyReduction_166 happy_x_1+	 =  case happyOut49 happy_x_1 of { happy_var_1 -> +	happyIn51+		 (happy_var_1+	)}++happyReduce_167 = happySpecReduce_1  45# happyReduction_167+happyReduction_167 happy_x_1+	 =  case happyOut43 happy_x_1 of { happy_var_1 -> +	happyIn51+		 (happy_var_1+	)}++happyReduce_168 = happySpecReduce_1  45# happyReduction_168+happyReduction_168 happy_x_1+	 =  case happyOut52 happy_x_1 of { happy_var_1 -> +	happyIn51+		 (happy_var_1+	)}++happyReduce_169 = happyReduce 7# 46# happyReduction_169+happyReduction_169 (happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_2 of { happy_var_2 -> +	case happyOut31 happy_x_4 of { happy_var_4 -> +	case happyOut74 happy_x_6 of { happy_var_6 -> +	case happyOut73 happy_x_7 of { happy_var_7 -> +	happyIn52+		 (RApp happy_var_6 happy_var_7 (RAppImp happy_var_6 happy_var_7 (UN "a") (RVar happy_var_6 happy_var_7 (UN "Exists")) happy_var_2) happy_var_4+	) `HappyStk` happyRest}}}}++happyReduce_170 = happyReduce 5# 46# happyReduction_170+happyReduction_170 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_2 of { happy_var_2 -> +	case happyOut74 happy_x_4 of { happy_var_4 -> +	case happyOut73 happy_x_5 of { happy_var_5 -> +	happyIn52+		 (RApp happy_var_4 happy_var_5 (RVar happy_var_4 happy_var_5 (UN "Exists")) happy_var_2+	) `HappyStk` happyRest}}}++happyReduce_171 = happySpecReduce_3  47# happyReduction_171+happyReduction_171 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_1 of { happy_var_1 -> +	case happyOut31 happy_x_3 of { happy_var_3 -> +	happyIn53+		 (happy_var_1:happy_var_3:[]+	)}}++happyReduce_172 = happySpecReduce_3  47# happyReduction_172+happyReduction_172 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_1 of { happy_var_1 -> +	case happyOut53 happy_x_3 of { happy_var_3 -> +	happyIn53+		 (happy_var_1:happy_var_3+	)}}++happyReduce_173 = happyReduce 4# 48# happyReduction_173+happyReduction_173 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut55 happy_x_3 of { happy_var_3 -> +	happyIn54+		 (happy_var_3+	) `HappyStk` happyRest}++happyReduce_174 = happyReduce 10# 48# happyReduction_174+happyReduction_174 (happy_x_10 `HappyStk`+	happy_x_9 `HappyStk`+	happy_x_8 `HappyStk`+	happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOutTok happy_x_2 of { (TokenBrackName happy_var_2) -> +	case happyOut45 happy_x_3 of { happy_var_3 -> +	case happyOut31 happy_x_5 of { happy_var_5 -> +	case happyOut74 happy_x_6 of { happy_var_6 -> +	case happyOut73 happy_x_7 of { happy_var_7 -> +	case happyOut55 happy_x_9 of { happy_var_9 -> +	happyIn54+		 (DoBinding happy_var_6 happy_var_7 happy_var_2 happy_var_3 happy_var_5 : happy_var_9+	) `HappyStk` happyRest}}}}}}++happyReduce_175 = happySpecReduce_2  49# happyReduction_175+happyReduction_175 happy_x_2+	happy_x_1+	 =  case happyOut56 happy_x_1 of { happy_var_1 -> +	case happyOut55 happy_x_2 of { happy_var_2 -> +	happyIn55+		 (happy_var_1:happy_var_2+	)}}++happyReduce_176 = happySpecReduce_1  49# happyReduction_176+happyReduction_176 happy_x_1+	 =  case happyOut56 happy_x_1 of { happy_var_1 -> +	happyIn55+		 ([happy_var_1]+	)}++happyReduce_177 = happyReduce 7# 50# happyReduction_177+happyReduction_177 (happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut45 happy_x_2 of { happy_var_2 -> +	case happyOut31 happy_x_4 of { happy_var_4 -> +	case happyOut74 happy_x_5 of { happy_var_5 -> +	case happyOut73 happy_x_6 of { happy_var_6 -> +	happyIn56+		 (DoBinding happy_var_5 happy_var_6 happy_var_1 happy_var_2 happy_var_4+	) `HappyStk` happyRest}}}}}++happyReduce_178 = happyReduce 8# 50# happyReduction_178+happyReduction_178 (happy_x_8 `HappyStk`+	happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut29 happy_x_2 of { happy_var_2 -> +	case happyOut45 happy_x_3 of { happy_var_3 -> +	case happyOut31 happy_x_5 of { happy_var_5 -> +	case happyOut74 happy_x_6 of { happy_var_6 -> +	case happyOut73 happy_x_7 of { happy_var_7 -> +	happyIn56+		 (DoLet happy_var_6 happy_var_7 happy_var_2 happy_var_3 happy_var_5+	) `HappyStk` happyRest}}}}}++happyReduce_179 = happyReduce 4# 50# happyReduction_179+happyReduction_179 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut31 happy_x_1 of { happy_var_1 -> +	case happyOut74 happy_x_2 of { happy_var_2 -> +	case happyOut73 happy_x_3 of { happy_var_3 -> +	happyIn56+		 (DoExp happy_var_2 happy_var_3 happy_var_1+	) `HappyStk` happyRest}}}++happyReduce_180 = happySpecReduce_1  51# happyReduction_180+happyReduction_180 happy_x_1+	 =  happyIn57+		 (TYPE+	)++happyReduce_181 = happySpecReduce_1  51# happyReduction_181+happyReduction_181 happy_x_1+	 =  happyIn57+		 (StringType+	)++happyReduce_182 = happySpecReduce_1  51# happyReduction_182+happyReduction_182 happy_x_1+	 =  happyIn57+		 (IntType+	)++happyReduce_183 = happySpecReduce_1  51# happyReduction_183+happyReduction_183 happy_x_1+	 =  happyIn57+		 (CharType+	)++happyReduce_184 = happySpecReduce_1  51# happyReduction_184+happyReduction_184 happy_x_1+	 =  happyIn57+		 (FloatType+	)++happyReduce_185 = happySpecReduce_1  51# happyReduction_185+happyReduction_185 happy_x_1+	 =  happyIn57+		 (PtrType+	)++happyReduce_186 = happySpecReduce_1  51# happyReduction_186+happyReduction_186 happy_x_1+	 =  happyIn57+		 (Builtin "Handle"+	)++happyReduce_187 = happySpecReduce_1  51# happyReduction_187+happyReduction_187 happy_x_1+	 =  happyIn57+		 (Builtin "Lock"+	)++happyReduce_188 = happySpecReduce_1  51# happyReduction_188+happyReduction_188 happy_x_1+	 =  case happyOutTok happy_x_1 of { (TokenInt happy_var_1) -> +	happyIn57+		 (Num happy_var_1+	)}++happyReduce_189 = happySpecReduce_1  51# happyReduction_189+happyReduction_189 happy_x_1+	 =  case happyOutTok happy_x_1 of { (TokenChar happy_var_1) -> +	happyIn57+		 (Ch happy_var_1+	)}++happyReduce_190 = happySpecReduce_1  51# happyReduction_190+happyReduction_190 happy_x_1+	 =  case happyOutTok happy_x_1 of { (TokenString happy_var_1) -> +	happyIn57+		 (Str happy_var_1+	)}++happyReduce_191 = happySpecReduce_1  51# happyReduction_191+happyReduction_191 happy_x_1+	 =  case happyOutTok happy_x_1 of { (TokenBool happy_var_1) -> +	happyIn57+		 (Bo happy_var_1+	)}++happyReduce_192 = happySpecReduce_1  51# happyReduction_192+happyReduction_192 happy_x_1+	 =  case happyOutTok happy_x_1 of { (TokenFloat happy_var_1) -> +	happyIn57+		 (Fl happy_var_1+	)}++happyReduce_193 = happySpecReduce_0  52# happyReduction_193+happyReduction_193  =  happyIn58+		 ([]+	)++happyReduce_194 = happySpecReduce_2  52# happyReduction_194+happyReduction_194 happy_x_2+	happy_x_1+	 =  case happyOut51 happy_x_1 of { happy_var_1 -> +	case happyOut58 happy_x_2 of { happy_var_2 -> +	happyIn58+		 (happy_var_1:happy_var_2+	)}}++happyReduce_195 = happyReduce 4# 53# happyReduction_195+happyReduction_195 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut47 happy_x_2 of { happy_var_2 -> +	case happyOut60 happy_x_3 of { happy_var_3 -> +	happyIn59+		 ((happy_var_2, happy_var_3)+	) `HappyStk` happyRest}}++happyReduce_196 = happySpecReduce_3  53# happyReduction_196+happyReduction_196 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut74 happy_x_2 of { happy_var_2 -> +	case happyOut73 happy_x_3 of { happy_var_3 -> +	happyIn59+		 ((RConst happy_var_2 happy_var_3 TYPE, [])+	)}}++happyReduce_197 = happyReduce 4# 53# happyReduction_197+happyReduction_197 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut65 happy_x_1 of { happy_var_1 -> +	case happyOut74 happy_x_3 of { happy_var_3 -> +	case happyOut73 happy_x_4 of { happy_var_4 -> +	happyIn59+		 ((mkTyParams happy_var_3 happy_var_4 happy_var_1, [])+	) `HappyStk` happyRest}}}++happyReduce_198 = happySpecReduce_0  54# happyReduction_198+happyReduction_198  =  happyIn60+		 ([]+	)++happyReduce_199 = happyReduce 4# 54# happyReduction_199+happyReduction_199 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut64 happy_x_3 of { happy_var_3 -> +	happyIn60+		 (happy_var_3+	) `HappyStk` happyRest}++happyReduce_200 = happyReduce 7# 55# happyReduction_200+happyReduction_200 (happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut29 happy_x_4 of { happy_var_4 -> +	case happyOut29 happy_x_6 of { happy_var_6 -> +	happyIn61+		 ((happy_var_4,happy_var_6)+	) `HappyStk` happyRest}}++happyReduce_201 = happyReduce 6# 56# happyReduction_201+happyReduction_201 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut29 happy_x_3 of { happy_var_3 -> +	case happyOut29 happy_x_5 of { happy_var_5 -> +	happyIn62+		 ((happy_var_3,happy_var_5)+	) `HappyStk` happyRest}}++happyReduce_202 = happyReduce 4# 57# happyReduction_202+happyReduction_202 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut64 happy_x_3 of { happy_var_3 -> +	happyIn63+		 (happy_var_3+	) `HappyStk` happyRest}++happyReduce_203 = happySpecReduce_3  58# happyReduction_203+happyReduction_203 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut47 happy_x_3 of { happy_var_3 -> +	happyIn64+		 ([(happy_var_1, happy_var_3)]+	)}}++happyReduce_204 = happyReduce 5# 58# happyReduction_204+happyReduction_204 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut47 happy_x_3 of { happy_var_3 -> +	case happyOut64 happy_x_5 of { happy_var_5 -> +	happyIn64+		 ((happy_var_1,happy_var_3):happy_var_5+	) `HappyStk` happyRest}}}++happyReduce_205 = happySpecReduce_1  59# happyReduction_205+happyReduction_205 happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	happyIn65+		 ([happy_var_1]+	)}++happyReduce_206 = happySpecReduce_2  59# happyReduction_206+happyReduction_206 happy_x_2+	happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut65 happy_x_2 of { happy_var_2 -> +	happyIn65+		 (happy_var_1:happy_var_2+	)}}++happyReduce_207 = happySpecReduce_1  60# happyReduction_207+happyReduction_207 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn66+		 (happy_var_1+	)}++happyReduce_208 = happySpecReduce_1  60# happyReduction_208+happyReduction_208 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn66+		 (happy_var_1+	)}++happyReduce_209 = happySpecReduce_0  61# happyReduction_209+happyReduction_209  =  happyIn67+		 ([]+	)++happyReduce_210 = happySpecReduce_1  61# happyReduction_210+happyReduction_210 happy_x_1+	 =  case happyOut68 happy_x_1 of { happy_var_1 -> +	happyIn67+		 ([happy_var_1]+	)}++happyReduce_211 = happySpecReduce_3  61# happyReduction_211+happyReduction_211 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut68 happy_x_1 of { happy_var_1 -> +	case happyOut67 happy_x_3 of { happy_var_3 -> +	happyIn67+		 (happy_var_1:happy_var_3+	)}}++happyReduce_212 = happySpecReduce_2  62# happyReduction_212+happyReduction_212 happy_x_2+	happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut69 happy_x_2 of { happy_var_2 -> +	happyIn68+		 (Full happy_var_1 happy_var_2+	)}}++happyReduce_213 = happySpecReduce_2  62# happyReduction_213+happyReduction_213 happy_x_2+	happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	case happyOut58 happy_x_2 of { happy_var_2 -> +	happyIn68+		 (Simple happy_var_1 happy_var_2+	)}}++happyReduce_214 = happySpecReduce_2  63# happyReduction_214+happyReduction_214 happy_x_2+	happy_x_1+	 =  case happyOut47 happy_x_2 of { happy_var_2 -> +	happyIn69+		 (happy_var_2+	)}++happyReduce_215 = happySpecReduce_2  64# happyReduction_215+happyReduction_215 happy_x_2+	happy_x_1+	 =  case happyOut35 happy_x_2 of { happy_var_2 -> +	happyIn70+		 (Intro happy_var_2+	)}++happyReduce_216 = happySpecReduce_1  64# happyReduction_216+happyReduction_216 happy_x_1+	 =  happyIn70+		 (Intro []+	)++happyReduce_217 = happySpecReduce_2  64# happyReduction_217+happyReduction_217 happy_x_2+	happy_x_1+	 =  case happyOut29 happy_x_2 of { happy_var_2 -> +	happyIn70+		 (Refine happy_var_2+	)}++happyReduce_218 = happySpecReduce_2  64# happyReduction_218+happyReduction_218 happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_2 of { happy_var_2 -> +	happyIn70+		 (Generalise happy_var_2+	)}++happyReduce_219 = happySpecReduce_1  64# happyReduction_219+happyReduction_219 happy_x_1+	 =  happyIn70+		 (ReflP+	)++happyReduce_220 = happySpecReduce_2  64# happyReduction_220+happyReduction_220 happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_2 of { happy_var_2 -> +	happyIn70+		 (Rewrite False False happy_var_2+	)}++happyReduce_221 = happySpecReduce_3  64# happyReduction_221+happyReduction_221 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_3 of { happy_var_3 -> +	happyIn70+		 (Rewrite False True happy_var_3+	)}++happyReduce_222 = happySpecReduce_2  64# happyReduction_222+happyReduction_222 happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_2 of { happy_var_2 -> +	happyIn70+		 (Rewrite True False happy_var_2+	)}++happyReduce_223 = happySpecReduce_3  64# happyReduction_223+happyReduction_223 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_3 of { happy_var_3 -> +	happyIn70+		 (Rewrite True True happy_var_3+	)}++happyReduce_224 = happySpecReduce_1  64# happyReduction_224+happyReduction_224 happy_x_1+	 =  happyIn70+		 (Compute+	)++happyReduce_225 = happySpecReduce_2  64# happyReduction_225+happyReduction_225 happy_x_2+	happy_x_1+	 =  case happyOut29 happy_x_2 of { happy_var_2 -> +	happyIn70+		 (Unfold happy_var_2+	)}++happyReduce_226 = happySpecReduce_1  64# happyReduction_226+happyReduction_226 happy_x_1+	 =  happyIn70+		 (Undo+	)++happyReduce_227 = happySpecReduce_2  64# happyReduction_227+happyReduction_227 happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_2 of { happy_var_2 -> +	happyIn70+		 (Induction happy_var_2+	)}++happyReduce_228 = happySpecReduce_2  64# happyReduction_228+happyReduction_228 happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_2 of { happy_var_2 -> +	happyIn70+		 (Fill happy_var_2+	)}++happyReduce_229 = happySpecReduce_1  64# happyReduction_229+happyReduction_229 happy_x_1+	 =  happyIn70+		 (Trivial+	)++happyReduce_230 = happySpecReduce_2  64# happyReduction_230+happyReduction_230 happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_2 of { happy_var_2 -> +	happyIn70+		 (RunTactic happy_var_2+	)}++happyReduce_231 = happySpecReduce_2  64# happyReduction_231+happyReduction_231 happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_2 of { happy_var_2 -> +	happyIn70+		 (Believe happy_var_2+	)}++happyReduce_232 = happySpecReduce_2  64# happyReduction_232+happyReduction_232 happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_2 of { happy_var_2 -> +	happyIn70+		 (Use happy_var_2+	)}++happyReduce_233 = happySpecReduce_2  64# happyReduction_233+happyReduction_233 happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_2 of { happy_var_2 -> +	happyIn70+		 (Decide happy_var_2+	)}++happyReduce_234 = happySpecReduce_1  64# happyReduction_234+happyReduction_234 happy_x_1+	 =  happyIn70+		 (Abandon+	)++happyReduce_235 = happySpecReduce_1  64# happyReduction_235+happyReduction_235 happy_x_1+	 =  happyIn70+		 (Qed+	)++happyReduce_236 = happyReduce 4# 65# happyReduction_236+happyReduction_236 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut72 happy_x_3 of { happy_var_3 -> +	happyIn71+		 (happy_var_3+	) `HappyStk` happyRest}++happyReduce_237 = happySpecReduce_2  66# happyReduction_237+happyReduction_237 happy_x_2+	happy_x_1+	 =  case happyOut70 happy_x_1 of { happy_var_1 -> +	happyIn72+		 ([happy_var_1]+	)}++happyReduce_238 = happySpecReduce_3  66# happyReduction_238+happyReduction_238 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut70 happy_x_1 of { happy_var_1 -> +	case happyOut72 happy_x_3 of { happy_var_3 -> +	happyIn72+		 (happy_var_1:happy_var_3+	)}}++happyReduce_239 = happyMonadReduce 0# 67# happyReduction_239+happyReduction_239 (happyRest) tk+	 = happyThen (( getLineNo)+	) (\r -> happyReturn (happyIn73 r))++happyReduce_240 = happyMonadReduce 0# 68# happyReduction_240+happyReduction_240 (happyRest) tk+	 = happyThen (( getFileName)+	) (\r -> happyReturn (happyIn74 r))++happyReduce_241 = happyMonadReduce 0# 69# happyReduction_241+happyReduction_241 (happyRest) tk+	 = happyThen (( getOps)+	) (\r -> happyReturn (happyIn75 r))++happyNewToken action sts stk+	= lexer(\tk -> +	let cont i = happyDoAction i tk action sts stk in+	case tk of {+	TokenEOF -> happyDoAction 114# tk action sts stk;+	TokenName happy_dollar_dollar -> cont 1#;+	TokenInfixName happy_dollar_dollar -> cont 2#;+	TokenBrackName happy_dollar_dollar -> cont 3#;+	TokenString happy_dollar_dollar -> cont 4#;+	TokenInt happy_dollar_dollar -> cont 5#;+	TokenFloat happy_dollar_dollar -> cont 6#;+	TokenChar happy_dollar_dollar -> cont 7#;+	TokenBool happy_dollar_dollar -> cont 8#;+	TokenMetavar happy_dollar_dollar -> cont 9#;+	TokenColon -> cont 10#;+	TokenSemi -> cont 11#;+	TokenBar -> cont 12#;+	TokenStars -> cont 13#;+	TokenLambda -> cont 14#;+	TokenHashOB -> cont 15#;+	TokenOB -> cont 16#;+	TokenCB -> cont 17#;+	TokenOCB -> cont 18#;+	TokenCCB -> cont 19#;+	TokenOSB -> cont 20#;+	TokenCSB -> cont 21#;+	TokenOId -> cont 22#;+	TokenCId -> cont 23#;+	TokenLPair -> cont 24#;+	TokenRPair -> cont 25#;+	TokenExists -> cont 26#;+	TokenTilde -> cont 27#;+	TokenPlus -> cont 28#;+	TokenMinus -> cont 29#;+	TokenTimes -> cont 30#;+	TokenDivide -> cont 31#;+	TokenEquals -> cont 32#;+	TokenMightEqual -> cont 33#;+	TokenLT -> cont 34#;+	TokenGT -> cont 35#;+	TokenEllipsis -> cont 36#;+	TokenUnderscore -> cont 37#;+	TokenComma -> cont 38#;+	TokenTuple -> cont 39#;+	TokenBang -> cont 40#;+	TokenConcat -> cont 41#;+	TokenGE -> cont 42#;+	TokenLE -> cont 43#;+	TokenOr -> cont 44#;+	TokenAnd -> cont 45#;+	TokenArrow -> cont 46#;+	TokenFatArrow -> cont 47#;+	TokenTransArrow -> cont 48#;+	TokenLeftArrow -> cont 49#;+	TokenIntType -> cont 50#;+	TokenCharType -> cont 51#;+	TokenFloatType -> cont 52#;+	TokenStringType -> cont 53#;+	TokenHandleType -> cont 54#;+	TokenPtrType -> cont 55#;+	TokenLockType -> cont 56#;+	TokenType -> cont 57#;+	TokenLazyBracket -> cont 58#;+	TokenDataType -> cont 59#;+	TokenInfix -> cont 60#;+	TokenInfixL -> cont 61#;+	TokenInfixR -> cont 62#;+	TokenUsing -> cont 63#;+	TokenIdiom -> cont 64#;+	TokenParams -> cont 65#;+	TokenNoElim -> cont 66#;+	TokenCollapsible -> cont 67#;+	TokenWhere -> cont 68#;+	TokenWith -> cont 69#;+	TokenPartial -> cont 70#;+	TokenSyntax -> cont 71#;+	TokenLazy -> cont 72#;+	TokenRefl -> cont 73#;+	TokenEmptyType -> cont 74#;+	TokenUnitType -> cont 75#;+	TokenInclude -> cont 76#;+	TokenExport -> cont 77#;+	TokenInline -> cont 78#;+	TokenDo -> cont 79#;+	TokenReturn -> cont 80#;+	TokenIf -> cont 81#;+	TokenThen -> cont 82#;+	TokenElse -> cont 83#;+	TokenLet -> cont 84#;+	TokenIn -> cont 85#;+	TokenProof -> cont 86#;+	TokenIntro -> cont 87#;+	TokenRefine -> cont 88#;+	TokenGeneralise -> cont 89#;+	TokenReflP -> cont 90#;+	TokenRewrite -> cont 91#;+	TokenRewriteAll -> cont 92#;+	TokenCompute -> cont 93#;+	TokenUnfold -> cont 94#;+	TokenUndo -> cont 95#;+	TokenInduction -> cont 96#;+	TokenFill -> cont 97#;+	TokenTrivial -> cont 98#;+	TokenMkTac -> cont 99#;+	TokenBelieve -> cont 100#;+	TokenUse -> cont 101#;+	TokenDecide -> cont 102#;+	TokenAbandon -> cont 103#;+	TokenQED -> cont 104#;+	TokenLaTeX -> cont 105#;+	TokenNoCG -> cont 106#;+	TokenEval -> cont 107#;+	TokenSpec -> cont 108#;+	TokenFreeze -> cont 109#;+	TokenThaw -> cont 110#;+	TokenTransform -> cont 111#;+	TokenCInclude -> cont 112#;+	TokenCLib -> cont 113#;+	_ -> happyError' tk+	})++happyError_ tk = happyError' tk++happyThen :: () => P a -> (a -> P b) -> P b+happyThen = (thenP)+happyReturn :: () => a -> P a+happyReturn = (returnP)+happyThen1 = happyThen+happyReturn1 :: () => a -> P a+happyReturn1 = happyReturn+happyError' :: () => (Token) -> P a+happyError' tk = (\token -> happyError) tk++mkparse = happySomeParser where+  happySomeParser = happyThen (happyParse 0#) (\x -> happyReturn (happyOut6 x))++mkparseTerm = happySomeParser where+  happySomeParser = happyThen (happyParse 1#) (\x -> happyReturn (happyOut31 x))++mkparseTactic = happySomeParser where+  happySomeParser = happyThen (happyParse 2#) (\x -> happyReturn (happyOut70 x))++happySeq = happyDontSeq+++data ConParse = Full Id RawTerm+              | Simple Id [RawTerm]++parse :: String -> FilePath -> Result [Decl]+parse s fn = do ds <- mkparse s fn 1 []+                collectDecls ds++processImports :: [Opt] -> [FilePath] -> Result [Decl] -> +                  IO ([Decl], [FilePath])+processImports opts imped (Success ds) = pi imped [] ds+  where pi imps decls ((PInclude fp):xs)+           | fp `elem` imps = pi imps decls xs+           | otherwise = do+                 f <- readLibFile defaultLibPath fp+                 when (Verbose `elem` opts) $ putStrLn ("Reading " ++ fp)+                 case parse f fp of+                   Success t -> pi (fp:imps) decls (t++xs)+                   Failure e f l ->+                     fail $ f ++ ":" ++ show l ++ ":" ++ e+        pi imps decls ((Using t ds):xs)+            = do (ds',imps') <- pi imps [] ds+                 pi imps' (decls++[Using t ds']) xs+        pi imps decls ((Params t ds):xs)+            = do (ds',imps') <- pi imps [] ds+                 pi imps' (decls++[Params t ds']) xs+        pi imps decls ((DoUsing b r ds):xs)+            = do (ds',imps') <- pi imps [] ds+                 pi imps' (decls++[DoUsing b r ds']) xs+        pi imps decls ((Idiom b r ds):xs)+            = do (ds',imps') <- pi imps [] ds+                 pi imps' (decls++[Idiom b r ds']) xs+        pi imps decls (x:xs) = pi imps (decls++[x]) xs+        pi imps decls [] = return (decls, imps)++processImports _ imped (Failure e f l) +    = fail $ show f ++ ":" ++ show l ++ ":" ++ show e+++parseTerm :: String -> Result RawTerm+parseTerm s = mkparseTerm s "(input)" 0 []++parseTactic :: String -> Result ITactic+parseTactic s = mkparseTactic s "(tactic)" 0 []++mkCon :: RawTerm -> ConParse -> (Id,RawTerm)+mkCon _ (Full n t) = (n,t)+mkCon ty (Simple n args) = (n, mkConTy args ty)+   where mkConTy [] ty = ty+         mkConTy (a:as) ty = RBind (MN "X" 0) (Pi Ex Eager a) (mkConTy as ty)++mkDef file line (n, tms) = mkImpApp (RVar file line n) tms+   where mkImpApp f [] = f+         mkImpApp f ((tm,Just n):ts) = mkImpApp (RAppImp file line n f tm) ts+         mkImpApp f ((tm, Nothing):ts) = mkImpApp (RApp file line f tm) ts++doBind :: (RawTerm -> RBinder) -> [(Id,RawTerm)] -> RawTerm -> RawTerm+doBind b [] t = t+doBind b ((x,ty):ts) tm = RBind x (b ty) (doBind b ts tm)++doLetBind :: [(Id,RawTerm,RawTerm)] -> RawTerm -> RawTerm+doLetBind [] t = t+doLetBind ((x,ty,val):ts) tm = RBind x (RLet val ty) (doLetBind ts tm)++mkTyApp :: String -> Int -> Id -> RawTerm -> RawTerm+mkTyApp file line n ty = mkApp file line (RVar file line n) (getTyArgs ty)+   where getTyArgs (RBind n _ t) = (RVar file line n):(getTyArgs t)+         getTyArgs x = []++mkTyParams :: String -> Int -> [Id] -> RawTerm+mkTyParams f l [] = RConst f l TYPE+mkTyParams f l (x:xs) = RBind x (Pi Ex Eager (RConst f l TYPE)) (mkTyParams f l xs)++mkDatatype :: String -> Int ->+              Id -> Either RawTerm ((RawTerm, [(Id, RawTerm)]), [ConParse]) -> +                    [TyOpt] -> Datatype+mkDatatype file line n (Right ((t, using), cons)) opts+    = Datatype n t (map (mkCon (mkTyApp file line n t)) cons) using opts file line +mkDatatype file line n (Left t) opts+    = Latatype n t file line++bracket (RUserInfix f l _ op x y) = RUserInfix f l True op x y+bracket x = x++pairDesugar :: String -> Int -> RawTerm -> [RawTerm] -> RawTerm+pairDesugar file line pair [x,y] = mkApp file line pair [x,y]+pairDesugar file line pair (x:y:xs) +    = pairDesugar file line pair ((mkApp file line pair [x,y]):xs)++sigDesugar :: String -> Int -> (Id, RawTerm) -> RawTerm -> RawTerm+sigDesugar file line (n, tm) sc+    = mkApp file line (RVar file line (UN "Sigma")) [tm, lam]+   where lam = RBind n (Lam tm) sc+{-# LINE 1 "templates/GenericTemplate.hs" #-}+{-# LINE 1 "templates/GenericTemplate.hs" #-}+{-# LINE 1 "<built-in>" #-}+{-# LINE 1 "<command line>" #-}+{-# LINE 1 "templates/GenericTemplate.hs" #-}+-- Id: GenericTemplate.hs,v 1.26 2005/01/14 14:47:22 simonmar Exp ++{-# LINE 28 "templates/GenericTemplate.hs" #-}+++data Happy_IntList = HappyCons Int# Happy_IntList++++++{-# LINE 49 "templates/GenericTemplate.hs" #-}++{-# LINE 59 "templates/GenericTemplate.hs" #-}++{-# LINE 68 "templates/GenericTemplate.hs" #-}++infixr 9 `HappyStk`+data HappyStk a = HappyStk a (HappyStk a)++-----------------------------------------------------------------------------+-- starting the parse++happyParse start_state = happyNewToken start_state notHappyAtAll notHappyAtAll++-----------------------------------------------------------------------------+-- Accepting the parse++-- If the current token is 0#, it means we've just accepted a partial+-- parse (a %partial parser).  We must ignore the saved token on the top of+-- the stack in this case.+happyAccept 0# tk st sts (_ `HappyStk` ans `HappyStk` _) =+	happyReturn1 ans+happyAccept j tk st sts (HappyStk ans _) = +	(happyTcHack j (happyTcHack st)) (happyReturn1 ans)++-----------------------------------------------------------------------------+-- Arrays only: do the next action++++happyDoAction i tk st+	= {- nothing -}+++	  case action of+		0#		  -> {- nothing -}+				     happyFail i tk st+		-1# 	  -> {- nothing -}+				     happyAccept i tk st+		n | (n <# (0# :: Int#)) -> {- nothing -}++				     (happyReduceArr ! rule) i tk st+				     where rule = (I# ((negateInt# ((n +# (1# :: Int#))))))+		n		  -> {- nothing -}+++				     happyShift new_state i tk st+				     where new_state = (n -# (1# :: Int#))+   where off    = indexShortOffAddr happyActOffsets st+	 off_i  = (off +# i)+	 check  = if (off_i >=# (0# :: Int#))+			then (indexShortOffAddr happyCheck off_i ==#  i)+			else False+ 	 action | check     = indexShortOffAddr happyTable off_i+		| otherwise = indexShortOffAddr happyDefActions st++{-# LINE 127 "templates/GenericTemplate.hs" #-}+++indexShortOffAddr (HappyA# arr) off =+#if __GLASGOW_HASKELL__ > 500+	narrow16Int# i+#elif __GLASGOW_HASKELL__ == 500+	intToInt16# i+#else+	(i `iShiftL#` 16#) `iShiftRA#` 16#+#endif+  where+#if __GLASGOW_HASKELL__ >= 503+	i = word2Int# ((high `uncheckedShiftL#` 8#) `or#` low)+#else+	i = word2Int# ((high `shiftL#` 8#) `or#` low)+#endif+	high = int2Word# (ord# (indexCharOffAddr# arr (off' +# 1#)))+	low  = int2Word# (ord# (indexCharOffAddr# arr off'))+	off' = off *# 2#++++++data HappyAddr = HappyA# Addr#+++++-----------------------------------------------------------------------------+-- HappyState data type (not arrays)++{-# LINE 170 "templates/GenericTemplate.hs" #-}++-----------------------------------------------------------------------------+-- Shifting a token++happyShift new_state 0# tk st sts stk@(x `HappyStk` _) =+     let i = (case unsafeCoerce# x of { (I# (i)) -> i }) in+--     trace "shifting the error token" $+     happyDoAction i tk new_state (HappyCons (st) (sts)) (stk)++happyShift new_state i tk st sts stk =+     happyNewToken new_state (HappyCons (st) (sts)) ((happyInTok (tk))`HappyStk`stk)++-- happyReduce is specialised for the common cases.++happySpecReduce_0 i fn 0# tk st sts stk+     = happyFail 0# tk st sts stk+happySpecReduce_0 nt fn j tk st@((action)) sts stk+     = happyGoto nt j tk st (HappyCons (st) (sts)) (fn `HappyStk` stk)++happySpecReduce_1 i fn 0# tk st sts stk+     = happyFail 0# tk st sts stk+happySpecReduce_1 nt fn j tk _ sts@((HappyCons (st@(action)) (_))) (v1`HappyStk`stk')+     = let r = fn v1 in+       happySeq r (happyGoto nt j tk st sts (r `HappyStk` stk'))++happySpecReduce_2 i fn 0# tk st sts stk+     = happyFail 0# tk st sts stk+happySpecReduce_2 nt fn j tk _ (HappyCons (_) (sts@((HappyCons (st@(action)) (_))))) (v1`HappyStk`v2`HappyStk`stk')+     = let r = fn v1 v2 in+       happySeq r (happyGoto nt j tk st sts (r `HappyStk` stk'))++happySpecReduce_3 i fn 0# tk st sts stk+     = happyFail 0# tk st sts stk+happySpecReduce_3 nt fn j tk _ (HappyCons (_) ((HappyCons (_) (sts@((HappyCons (st@(action)) (_))))))) (v1`HappyStk`v2`HappyStk`v3`HappyStk`stk')+     = let r = fn v1 v2 v3 in+       happySeq r (happyGoto nt j tk st sts (r `HappyStk` stk'))++happyReduce k i fn 0# tk st sts stk+     = happyFail 0# tk st sts stk+happyReduce k nt fn j tk st sts stk+     = case happyDrop (k -# (1# :: Int#)) sts of+	 sts1@((HappyCons (st1@(action)) (_))) ->+        	let r = fn stk in  -- it doesn't hurt to always seq here...+       		happyDoSeq r (happyGoto nt j tk st1 sts1 r)++happyMonadReduce k nt fn 0# tk st sts stk+     = happyFail 0# tk st sts stk+happyMonadReduce k nt fn j tk st sts stk =+        happyThen1 (fn stk tk) (\r -> happyGoto nt j tk st1 sts1 (r `HappyStk` drop_stk))+       where sts1@((HappyCons (st1@(action)) (_))) = happyDrop k (HappyCons (st) (sts))+             drop_stk = happyDropStk k stk++happyMonad2Reduce k nt fn 0# tk st sts stk+     = happyFail 0# tk st sts stk+happyMonad2Reduce k nt fn j tk st sts stk =+       happyThen1 (fn stk tk) (\r -> happyNewToken new_state sts1 (r `HappyStk` drop_stk))+       where sts1@((HappyCons (st1@(action)) (_))) = happyDrop k (HappyCons (st) (sts))+             drop_stk = happyDropStk k stk++             off    = indexShortOffAddr happyGotoOffsets st1+             off_i  = (off +# nt)+             new_state = indexShortOffAddr happyTable off_i+++++happyDrop 0# l = l+happyDrop n (HappyCons (_) (t)) = happyDrop (n -# (1# :: Int#)) t++happyDropStk 0# l = l+happyDropStk n (x `HappyStk` xs) = happyDropStk (n -# (1#::Int#)) xs++-----------------------------------------------------------------------------+-- Moving to a new state after a reduction+++happyGoto nt j tk st = +   {- nothing -}+   happyDoAction j tk new_state+   where off    = indexShortOffAddr happyGotoOffsets st+	 off_i  = (off +# nt)+ 	 new_state = indexShortOffAddr happyTable off_i+++++-----------------------------------------------------------------------------+-- Error recovery (0# is the error token)++-- parse error if we are in recovery and we fail again+happyFail  0# tk old_st _ stk =+--	trace "failing" $ +    	happyError_ tk++{-  We don't need state discarding for our restricted implementation of+    "error".  In fact, it can cause some bogus parses, so I've disabled it+    for now --SDM++-- discard a state+happyFail  0# tk old_st (HappyCons ((action)) (sts)) +						(saved_tok `HappyStk` _ `HappyStk` stk) =+--	trace ("discarding state, depth " ++ show (length stk))  $+	happyDoAction 0# tk action sts ((saved_tok`HappyStk`stk))+-}++-- Enter error recovery: generate an error token,+--                       save the old token and carry on.+happyFail  i tk (action) sts stk =+--      trace "entering error recovery" $+	happyDoAction 0# tk action sts ( (unsafeCoerce# (I# (i))) `HappyStk` stk)++-- Internal happy errors:++notHappyAtAll = error "Internal Happy error\n"++-----------------------------------------------------------------------------+-- Hack to get the typechecker to accept our action functions+++happyTcHack :: Int# -> a -> a+happyTcHack x y = y+{-# INLINE happyTcHack #-}+++-----------------------------------------------------------------------------+-- Seq-ing.  If the --strict flag is given, then Happy emits +--	happySeq = happyDoSeq+-- otherwise it emits+-- 	happySeq = happyDontSeq++happyDoSeq, happyDontSeq :: a -> b -> b+happyDoSeq   a b = a `seq` b+happyDontSeq a b = b++-----------------------------------------------------------------------------+-- Don't inline any functions from the template.  GHC has a nasty habit+-- of deciding to inline happyGoto everywhere, which increases the size of+-- the generated parser quite a bit.+++{-# NOINLINE happyDoAction #-}+{-# NOINLINE happyTable #-}+{-# NOINLINE happyCheck #-}+{-# NOINLINE happyActOffsets #-}+{-# NOINLINE happyGotoOffsets #-}+{-# NOINLINE happyDefActions #-}++{-# NOINLINE happyShift #-}+{-# NOINLINE happySpecReduce_0 #-}+{-# NOINLINE happySpecReduce_1 #-}+{-# NOINLINE happySpecReduce_2 #-}+{-# NOINLINE happySpecReduce_3 #-}+{-# NOINLINE happyReduce #-}+{-# NOINLINE happyMonadReduce #-}+{-# NOINLINE happyGoto #-}+{-# NOINLINE happyFail #-}++-- end of Happy Template.
+ idris.cabal view
@@ -0,0 +1,67 @@+Name:           idris+Version:        0.1.3+License:        BSD3+License-file:   LICENSE+Author:         Edwin Brady+Maintainer:     Edwin Brady <eb@dcs.st-and.ac.uk>++Stability:      Alpha+Category:       Compilers/Interpreters, Dependent Types+Synopsis:       Dependently Typed Functional Programming Language+Description:    Idris is an experimental language with full dependent types.+                Dependent types allow types to be predicated on values,+                meaning that some aspects of a program's behaviour can be+                specified precisely in the type. The language is closely +		related to Epigram and Agda. There is a tutorial at <http://www.cs.st-andrews.ac.uk/~eb/Idris/tutorial.html>.+                .+                The aims of the project are:+                .+                * To provide a platform for realistic programming with dependent types.+                By realistic, we mean the ability to interact with the outside world+                and use primitive types and operations. This includes networking,+                file handling, concurrency, etc.+                .+                * To show that full dependent types do not mean we have to abandon+                the functional style we have come to know and love with languages+                like Haskell and OCaml. We aim to show that lightweight dependently typed+                programming means allowing the programmer full access to values in types,+                and letting the type checker do the hard work so you don't have to!+                .+                The Darcs repository can be found at <http://www-fp.cs.st-andrews.ac.uk/~eb/darcs/Idris>.+Homepage:       http://www.cs.st-andrews.ac.uk/~eb/Idris/++Cabal-Version:  >= 1.6+Build-type:     Simple++Data-files:     Prelude.e *.idr+Data-dir:       lib++Library+        Exposed-modules: Idris.Parser, Idris.Lexer, Idris.Lib, +                         Idris.AbsSyntax, Idris.Context, Idris.Latex+                         Idris.Compiler, Idris.LambdaLift, Idris.PMComp, +                         Idris.MakeTerm, Idris.Prover, Idris.Fontlock,+                         Idris.ConTrans, Idris.SCTrans, Idris.RunIO,+                         Idris.SimpleCase+        Other-modules:   Paths_idris++        Build-depends:   base>=4 && <5, containers, array, parsec, mtl,+                         readline, ivor>=0.1.8, directory, haskell98,+                         old-time, old-locale, binary, epic>=0.1.3+                                +        Extensions:      MagicHash, UndecidableInstances, OverlappingInstances++Executable     idris+               Main-is: Main.lhs+               Other-modules: Idris.Parser, Idris.Lexer, Idris.Lib, +                              Idris.AbsSyntax, Idris.Context,+                              Idris.Compiler, Idris.LambdaLift, Idris.PMComp, +                              Idris.MakeTerm, Idris.Prover, Idris.Fontlock,+                              Idris.ConTrans, Idris.SCTrans, Idris.RunIO,+                              Idris.SimpleCase++               Build-depends:   base>=4 && <5, containers, array, parsec, mtl,+                                readline, ivor>=0.1.8, directory, haskell98,+                                old-time, old-locale, binary, epic>=0.1.3+                                +               Extensions:      MagicHash, UndecidableInstances, OverlappingInstances
+ lib/Prelude.e view
@@ -0,0 +1,69 @@+%include "string.h"++-- IO++%inline __epic_id (x:Any) -> Any = x++%inline __epic_putStr (x:String) -> Unit =+    foreign Unit "putStr" (x:String)++__epic_readStr () -> String =+    foreign String "readStr" ()++__epic_append (x:String, y:String) -> String =+    foreign String "append" (x:String, y:String)++__epic_strlen (x:String) -> Int =+    foreign Int "strlen" (x:String)++__epic_strhead (x:String) -> Int =+    foreign Int "strHead" (x:String)++__epic_strtail (x:String) -> String =+    foreign String "strTail" (x:String)++__epic_strcons (h:Int, x:String) -> String =+    foreign String "strCons" (h:Int, x:String)++__epic_streq (x:String, y:String) -> Data =+    foreign Int "streq" (x:String, y:String)++%inline __epic_strlt (x:String, y:String) -> Data =+    foreign Int "strlt" (x:String, y:String)++__epic_newRef () -> Int =+    foreign Int "newRef" ()++__epic_readRef (A:Any, r:Int) -> Any =+    foreign Any "readRef" (r:Int)++__epic_writeRef (A:Any, r:Int, v:Any) -> Unit =+    foreign Unit "writeRef" (r:Int, v:Any)++__epic_newLock (l:Int) -> Int =+   foreign Int "newLock" (l:Int)++__epic_doLock (l:Int) -> Unit =+   foreign Unit "doLock" (l:Int)++__epic_doUnlock (l:Int) -> Unit =+   foreign Unit "doUnlock" (l:Int)++__epic_fork (a:Any, f:Fun) -> Unit =+   lazy foreign Unit "doFork" (f:Fun)++__epic_within (a:Any, i:Int, f:Fun, fail:Fun) -> Unit =+   lazy foreign Unit "doWithin" (i:Int, f:Fun, fail:Fun)++%inline __epic_bool (x:Int) -> Data =+   if (x==0) then (Con 1 ()) else (Con 0 ())++__epic_toInt (x:String) -> Int = +   foreign Int "strToInt" (x:String)++__epic_toString (x:Int) -> String = +   foreign String "intToStr" (x:Int)++__epic_native (x:Fun) -> Ptr =+   foreign Ptr "getNative" (x:Fun)+
+ lib/bool.idr view
@@ -0,0 +1,23 @@+data Bool = True | False;++not : Bool -> Bool;+not True = False;+not False = True;++%transform not (not ?x) => ?x;++if_then_else : Bool -> |(t:A) -> |(e:A) -> A;+if_then_else True t f = t;+if_then_else False t f = f;++data so : Bool -> # where oh : so True;++infixl 4 &&,||;++(||) : Bool -> Bool -> Bool;+(||) False False = False;+(||) _ _ = True;++(&&) : Bool -> Bool -> Bool;+(&&) True True = True;+(&&) _ _ = False;
+ lib/builtins.idr view
@@ -0,0 +1,33 @@+include "bool.idr"; ++data __Unit = II;+data __Empty = ;++data Sigma : (A:#)->(P:A->#)-># where+   Exists : {P:A->#} -> {a:A} -> P a -> Sigma A P;++getSigIdx : {P:a->#} ->  (s:Sigma a P) -> a;+getSigIdx (Exists {a} v) = a;++getSigVal : {P:a->#} -> (s:Sigma a P) -> P (getSigIdx s);+getSigVal (Exists v) = v;++data Pair a b = mkPair a b;++rewrite : {A:B->#} -> A m -> (m=n) -> A n;+rewrite t (refl m) = t;++-- This way is needed for Ivor's rewriting tactic++__eq_repl : (A:#)->(x:A) -> (y:A) -> (q:(x=y)) -> (P:(m:A)->#) -> (p:P x) -> (P y);+__eq_repl A x x (refl x) P p = p;++__eq_sym : (A:#) -> (a:A) -> (b:A) -> (p:(a=b)) -> (b=a);+__eq_sym A a a p = refl _;++-- Used by the 'believe' tactic to make a temporary proof. Programs+-- using this are not to be trusted!++__Prove_Anything : {A:#} -> A;+__Suspend_Disbelief : (m:A) -> (n:A) -> (m = n);+
+ lib/either.idr view
@@ -0,0 +1,1 @@+data Either A B = Left A | Right B;
+ lib/io.idr view
@@ -0,0 +1,260 @@+include "list.idr";++-- FAny is to allow C functions to build up Idris data+-- types. Obviously this needs care...++data FType = FUnit | FInt | FStr | FPtr | FAny #;++i_ftype : FType -> #;+i_ftype FInt = Int;+i_ftype FStr = String;+i_ftype FPtr = Ptr;+i_ftype FUnit = ();+i_ftype (FAny ty) = ty;++data ForeignFun = FFun String (List FType) FType;++f_retType : ForeignFun -> FType;+f_retType (FFun nm args ret) = ret;++f_args : ForeignFun -> (List FType);+f_args (FFun nm args ret) = args;++f_name : ForeignFun -> String;+f_name (FFun nm args ret) = nm;++data FArgList : (List FType) -> # where+    fNil : FArgList Nil+  | fCons : {x:FType} -> (fx:i_ftype x) -> (fxs:FArgList xs) ->+			 (FArgList (Cons x xs));++fapp : {xs,ys:List FType} -> +       (FArgList xs) -> (FArgList ys) -> (FArgList (app xs ys));+fapp fNil fxs = fxs;+fapp (fCons fx fxs) fys = fCons fx (fapp fxs fys);++data IO : # -> #;++data Command : # where+    PutStr : String -> Command+  | GetStr : Command+  | Fork : {A:#} -> A -> Command+  | NewLock : Int -> Command+  | DoLock : Lock -> Command+  | DoUnlock : Lock -> Command+  | NewRef : Command+  | ReadRef : # -> Int -> Command+  | WriteRef : {A:#} -> Int -> A -> Command+  | While : (IO Bool) -> (IO ()) -> Command+  | WhileAcc : {A:#} -> (IO Bool) -> A -> (A -> IO A) -> Command+  | Within : Int -> (IO A) -> (IO A) -> Command+  | IOLift : {A:#} -> (IO A) -> Command +  | Foreign : (f:ForeignFun) -> +	      (args:FArgList (f_args f)) -> Command;++Response : Command -> #;+Response (PutStr s) = ();+Response GetStr = String;+Response (Fork proc) = ();+Response (NewLock i) = Lock;+Response (DoLock l) = ();+Response (DoUnlock l) = ();+Response NewRef = Int;+Response (ReadRef A i) = A;+Response (WriteRef i val) = ();+Response (While test body) = ();+Response (WhileAcc {A} test acc body) = A;+Response (Within {A} time body failure) = A;+Response (IOLift {A} f) = A;+Response (Foreign t args) = i_ftype (f_retType t);++data IO : # -> # where+   IOReturn : A -> (IO A)+ | IODo : (c:Command) -> ((Response c) -> (IO A)) -> (IO A);+--  | IOError : String -> (IO A);++data IORef A = MkIORef Int;++bind : (IO a) -> (a -> (IO b)) -> (IO b);+bind (IOReturn a) k = k a;+-- bind (IODo (IOLift {A} c) p) k = bind (bind c p) k;+bind (IODo c p) k = IODo c (\x => (bind (p x) k));+-- bind (IOError str) k = IOError str;++kbind : (IO a) -> (a -> b) -> (IO b);+kbind (IOReturn a) k = IOReturn (k a);+kbind (IODo c p) k = IODo c (\x => (kbind (p x) k));++while : |(test:IO Bool) -> |(body: IO ()) -> IO ();+while test body = IODo (While test body) (\a => (IOReturn II));++while_accTR : Bool -> +            |(test:IO Bool) -> acc -> |(body: acc -> IO acc) -> IO acc;++while_acc : |(test:IO Bool) -> acc -> |(body: acc -> IO acc) -> IO acc;+{-+while_acc test acc body = do { test' <- test;+	       	   	       while_accTR test' test acc body; };++while_accTR True test acc body = do { acc' <- body acc;+	    	      	       	      test' <- test;+	       	       	              while_accTR test' test acc' body; };+while_accTR False test acc body = return acc;+-}+while_acc test acc body = IODo (WhileAcc test acc body) (\a => (IOReturn a));++{-+ioReturn : a -> (IO a);+ioReturn x = IOReturn x;+-}++ioApp : IO (a -> b) -> IO a -> IO b;+ioApp {a} {b} fn arg = do { f : (a->b) <- fn; -- grr+                            x <- arg;+		            return (f x); };++data IOException = IOExcept String; ++data IOe : # -> # where+   IOK : (IO A) -> (IOe A)+ | IOError : String -> (IOe A);++{-+catch : (IOe A) -> (IOException -> (IO A)) -> (IO A);+catch (IOK action) = action;+catch (IOError str) handler = handler (IOExcept str);+-}++-- No code for this - only works in compiled code, certainly shouldn't+-- be evaluted in pure code!+unsafePerformIO : (IO A) -> A;++-- get the rts representation of a value+unsafeNative : A -> Ptr;++putStr : String -> (IO ());+putStr str = IODo (PutStr str) (\a => (IOReturn a));++getStr : IO String;+getStr = IODo GetStr (\b => (IOReturn b));++getInt : IO Int;+getInt = do { inp <- getStr;+              let val = __toInt inp;+	      return val; };++putStrLn : String -> (IO ());+putStrLn str = do { putStr str;+		    putStr "\n"; };++fork : |(proc:IO ()) -> (IO ());+fork proc = IODo (Fork proc) (\a => (IOReturn a));++newLock : Int -> (IO Lock);+newLock i = IODo (NewLock i) (\l => (IOReturn l));++lock : Lock -> (IO ());+lock l = IODo (DoLock l) (\a => (IOReturn a));++unlock : Lock -> (IO ());+unlock l = IODo (DoUnlock l) (\a => (IOReturn a));++-- Perform an action within "time" milliseconds, execute failure+-- routine if it doesn't complete++within : Int -> |(action : IO a) -> |(failure : IO a) -> IO a;+within time act fail = IODo (Within time act fail) (\a => (IOReturn a));++newIORefPrim : IO Int;+newIORefPrim = IODo (NewRef) (\i => (IOReturn i));++readIORefPrim : Int -> (IO A);+readIORefPrim {A} i = IODo (ReadRef A i) (\a => (IOReturn a));++writeIORefPrim : Int -> A -> (IO ());+writeIORefPrim {A} i val = IODo (WriteRef {A} i val) (\a => (IOReturn a));++newIORef : A -> (IO (IORef A));+newIORef val = do { i <- newIORefPrim;+		    writeIORefPrim i val;+		    return (MkIORef i);+		  };++readIORef : (IORef A) -> (IO A);+readIORef (MkIORef i) = readIORefPrim i;++writeIORef : (IORef A) -> A -> (IO ());+writeIORef (MkIORef i) val = writeIORefPrim i val;++mkFType' : (List FType) -> FType -> #   %nocg;++mkFType' Nil ret = IO (i_ftype ret);+mkFType' (Cons t ts) ret = #((i_ftype t) -> (mkFType' ts ret));++mkFType : ForeignFun -> #    %nocg;+mkFType (FFun fn args ret) = mkFType' args ret;++mkFDef : String -> (ts:List FType) -> (xs:List FType) -> (FArgList xs) ->+	 (ret:FType) -> (mkFType' ts ret)   %nocg;+mkFDef nm Nil accA fs ret +   = IODo (Foreign (FFun nm accA ret) fs)+				 (\a => (IOReturn a));+mkFDef nm (Cons t ts) accA fs ret +   = \x:i_ftype t => mkFDef nm ts (app accA (Cons t Nil)) +				   (fapp fs (fCons x fNil)) ret;++mkForeign : (f:ForeignFun) -> (mkFType f)   %nocg;+mkForeign (FFun fn args ret) = mkFDef fn args Nil fNil ret;++_isNull = mkForeign (FFun "isNull" (Cons FPtr Nil) FInt) %eval;++isNull : Ptr -> Bool;+isNull ptr = if_then_else ((unsafePerformIO (_isNull ptr))==0) False True;++data File = FHandle Ptr;++_fopen+  = mkForeign (FFun "fileOpen" (Cons FStr (Cons FStr Nil)) FPtr) %eval;+_fclose +  = mkForeign (FFun "fileClose" (Cons FPtr Nil) FUnit) %eval;+_fread+  = mkForeign (FFun "freadStr" (Cons FPtr Nil) (FAny String)) %eval;+_fwrite+  = mkForeign (FFun "fputStr" (Cons FPtr (Cons FStr Nil)) FUnit) %eval;+_feof+  = mkForeign (FFun "feof" (Cons FPtr Nil) FInt) %eval;++gc_details+  = mkForeign (FFun "epicMemInfo" Nil FUnit) %eval;++gc_collect+  = mkForeign (FFun "epicGC" Nil FUnit) %eval;++fopen : String -> String -> IO File;+fopen str mode = do { h <- _fopen str mode;+		      return (FHandle h); };++fclose : File -> IO ();+fclose (FHandle h) = _fclose h;++fread : File -> IO String;+fread (FHandle h) = _fread h;++fwrite : File -> String -> IO ();+fwrite (FHandle h) str = _fwrite h str;++feof : File -> IO Bool;+feof (FHandle h) = do { eof <- _feof h;+     	      	      	return (not (eof==0)); };++sequence : (List (IO a)) -> (IO (List a));+sequence Nil = return Nil;+sequence (Cons x xs) = do { a <- x;+			    as <- sequence xs;+			    return (Cons a as); };++sleep = mkForeign (FFun "sleep" (Cons FInt Nil) FUnit) %eval;++-- Return time in microseconds since some unspecified starting point++utime = mkForeign (FFun "do_utime" Nil FInt) %eval;
+ lib/list.idr view
@@ -0,0 +1,57 @@+data List a = Nil | Cons a (List a);++map : (a->b) -> (List a) -> (List b);+map f Nil = Nil;+map f (Cons x xs) = Cons (f x) (map f xs);++consp : Bool -> a -> (List a) -> (List a);+consp True x xs = Cons x xs;+consp False x xs = xs;++filter : (a->Bool) -> (List a) -> (List a);+filter p Nil = Nil;+filter p (Cons x xs) = consp (p x) x (filter p xs);++maybeCons : (Maybe a) -> (List a) -> (List a);+maybeCons Nothing xs = xs;+maybeCons (Just a) xs = (Cons a xs);++mapMaybe : (a->(Maybe b)) -> (List a) -> (List b);+mapMaybe f Nil = Nil;+mapMaybe f (Cons x xs) = maybeCons (f x) (mapMaybe f xs);++app : (List a) -> (List a) -> (List a);+app Nil xs = xs;+app (Cons x xs) ys = Cons x (app xs ys);++foldl : (a -> b -> a) -> a -> (List b) -> a;+foldl f z Nil = z;+foldl f z (Cons x xs) = foldl f (f z x) xs;++foldr : (a -> b -> b) -> b -> (List a) -> b;+foldr f z Nil = z;+foldr f z (Cons x xs) = f x (foldr f z xs);++rev : (List a) -> (List a);+rev xs = foldl (flip Cons) Nil xs;++eq_resp_Cons : {xs,ys:List A} -> (xs=ys) -> ((Cons x xs) = (Cons x ys));+eq_resp_Cons {A} {x} (refl xs) = refl _;++elem : (a->a->Bool) -> a -> (List a) -> Bool;+elem q x Nil = False;+elem q x (Cons y ys) = if_then_else (q x y) True (elem q x ys);++app_assoc : (xs:List a) -> (ys:List a) -> (zs:List a) ->+	    (app xs (app ys zs) = app (app xs ys) zs);++app_assoc Nil ys zs = refl _;+app_assoc (Cons x xs) ys zs = let rec = app_assoc xs ys zs in+	  	      	      ?app_assocCons;+app_assocCons proof {+	%intro;+	%rewrite rec;+	%refl;+	%qed;+};+ 
+ lib/maybe.idr view
@@ -0,0 +1,10 @@+data Maybe A = Just A | Nothing;++mMap : (f:A->B) -> (Maybe A) -> (Maybe B);+mMap f Nothing = Nothing;+mMap f (Just a) = Just (f a);++maybe : (x:Maybe a) -> |(default:b) -> (a->b) -> b;+maybe Nothing def f = def;+maybe (Just a) def f = f a;+
+ lib/nat.idr view
@@ -0,0 +1,132 @@+data Nat = O | S Nat;++plus : Nat -> Nat -> Nat;+plus O y = y;+plus (S k) y = S (plus k y);++mult : Nat -> Nat -> Nat;+mult O y = O;+mult (S k) y = plus y (mult k y);++eq_resp_S : (m=n) -> ((S m) = (S n));+eq_resp_S (refl n) = refl (S n);++------- Int/String conversions -------++intToNat : Int -> Nat;++in' : Bool -> Nat -> Int -> Nat;+in' True n i = n;+in' False n i = S (intToNat (i-1));++intToNat n = in' (n<=0) O n;++natToInt : Nat -> Int;+natToInt O = 0;+natToInt (S k) = 1+(natToInt k);++----------- plus theorems -----------++plus_nO : (n:Nat) -> ((plus n O) = n);+plus_nO O = (refl O);+plus_nO (S n) = eq_resp_S (plus_nO n);++plus_nSm : ((plus n (S m)) = (S (plus n m)));+plus_nSm {n=O} {m} = (refl (S m));+plus_nSm {n=S k} {m} = eq_resp_S plus_nSm;++plus_comm : (x:Nat, y:Nat) -> (plus x y = plus y x);+plus_comm proof {+        %intro; %induction x;+	%rewrite <- plus_nO y;+	%refl;+	%intro n,ih;+	%rewrite <- (plus_nSm {n=y} {m=n});+	%rewrite ih;+	%refl;+	%qed;+};++plus_assoc  : (m:Nat, n:Nat, p:Nat) -> (plus m (plus n p) = plus (plus m n) p);+plus_assoc proof {+        %intro;+        %induction m;+        %compute;+        %refl;+        %intro k;+        %intro ih;+        %compute;+        %rewrite <- ih;+        %refl;+        %qed;+};++----------- mult theorems -----------++mult_nO : (n:Nat) -> ((mult n O) = O);+mult_nO O = refl _;+mult_nO (S k) = mult_nO k;++mult_nSm : (n:Nat ,m:Nat) -> ((mult n (S m)) = (plus n (mult n m)));+mult_nSm proof {+        %intro;+        %induction n;+        %refl;+        %intro k,ih;+        %compute;+        %refine eq_resp_S;+        %rewrite <- ih;+        %generalise mult k m;+        %intro x;+        %rewrite <- plus_comm m x;+        %rewrite <- plus_assoc k x m;+        %rewrite <- plus_comm m (plus k x);+        %refl;+        %qed;+};++mult_comm : (x:Nat, y:Nat) -> ((mult x y) = (mult y x));+mult_comm proof {+        %intro;+        %induction x;+        %rewrite <- mult_nO y;+        %refl;+        %intro k,ih;+        %compute;+        %rewrite <- mult_nSm y k;+        %rewrite <- ih;+        %refl;+        %qed;+};++mult_distrib : (m:Nat, n:Nat, p:Nat) ->+	       (plus (mult m p) (mult n p) = mult (plus m n) p);+mult_distrib proof {+        %intro;+        %induction m;+        %refl;+        %intro k,ih;+        %compute;+        %rewrite ih;+        %rewrite plus_assoc p (mult k p) (mult n p);+        %refl;+        %qed;+};++---- Comparing Nats++data Compare : Nat -> Nat -> # where+   cmpLT : (y:Nat) -> (Compare x (plus x (S y)))+ | cmpEQ : Compare x x+ | cmpGT : (x:Nat) -> (Compare (plus y (S x)) y);++compareAux : (Compare n m) -> (Compare (S n) (S m));+compareAux (cmpLT y) = cmpLT _;+compareAux cmpEQ = cmpEQ;+compareAux (cmpGT x) = cmpGT _;++compare : (n:Nat) -> (m:Nat) -> (Compare n m);+compare O O = cmpEQ;+compare (S n) O = cmpGT _;+compare O (S m) = cmpLT _;+compare (S n) (S m) = compareAux (compare n m);
+ lib/prelude.idr view
@@ -0,0 +1,57 @@+flip : (a -> b -> c) -> b -> a -> c;+flip f x y = f y x;++infixl 5 ==;+infixl 6 <, <=, >, >=;+infixl 7 +,-,++;+infixl 8 *,/;++(+) : Int -> Int -> Int inline;+(+) x y = __addInt x y;++(-) : Int -> Int -> Int inline;+(-) x y = __subInt x y;++(*) : Int -> Int -> Int inline;+(*) x y = __mulInt x y;++(/) : Int -> Int -> Int inline;+(/) x y = __divInt x y;++(<) : Int -> Int -> Bool inline;+(<) x y = __intlt x y;++(<=) : Int -> Int -> Bool inline;+(<=) x y = __intleq x y;++(>) : Int -> Int -> Bool inline;+(>) x y = __intgt x y;++(>=) : Int -> Int -> Bool inline;+(>=) x y = __intgeq x y;++(++) : String -> String -> String inline;+(++) x y = __concat x y;++(==) : Int -> Int -> Bool inline;+(==) x y = __eq x y;+ +include "nat.idr";+include "maybe.idr";+include "io.idr";+include "either.idr";+include "tactics.idr";+include "vect.idr";++-- Function composition++infixl 9 .;++(.) : (b -> c) -> (a -> b) -> a -> c;+(.) f g x = f (g x);++fst : (a & b) -> a inline;+fst (x, y) = x;++snd : (a & b) -> b inline;+snd (x, y) = y;
+ lib/string.idr view
@@ -0,0 +1,82 @@+include "list.idr";++strLen: String -> Int inline;+strLen str = __strlen str;++strEq: String -> String -> Bool inline;+strEq s1 s2 = __strEq s1 s2;++concat: String -> String -> String inline;+concat s1 s2 = __concat s1 s2;++strNull: String -> Bool inline;+strNull s = strEq s "";++strHead: String -> Maybe Char inline;+strHead s = if (strNull s) then Nothing else (Just (__strHead s));++strTail: String -> Maybe String inline;+strTail s = if (strNull s) then Nothing else (Just (__strTail s));++strCons: Char -> String -> String inline;+strCons c s = __strCons c s;++strUncons: String -> Maybe (Char & String) inline;+strUncons s with (strHead s, strTail s) {+  | (Just h,  Just t)  = Just (h, t);+  | (Nothing, Nothing) = Nothing;+}++charAt: Int -> String -> Maybe Char inline;+charAt x str =+  if (strLen str > x && x >= 0) then (Just (__strgetIdx str x))+                                else Nothing;++showInt: Int -> String inline;+showInt x = __toString x;++readInt: String -> Maybe Int;+readInt str = let x = __toInt str+              in  if (strEq str (showInt x))+                     then (Just x)+                     else Nothing;++showNat: Nat -> String;+showNat n = __toString (natToInt n);++readNat: String -> Maybe Nat;+readNat str with readInt str {+  | Just x  = if (x >= 0) then (Just (intToNat x)) else Nothing;+  | Nothing = Nothing;+}++strToList: String -> List Char;+strToList s with strUncons s {+  | Just (h, t) = Cons h (strToList t);+  | Nothing     = Nil;+}++listToStr: List Char -> String;+listToStr = foldr strCons "";++-- TODO if the change to the parser breaks things, the sigma pattern will+--      need parens around+strToVect: String -> (n ** Vect Char n);+strToVect s with strUncons s {+    | Just (c, cs) with strToVect cs {+    | <<cs'>> = <<c :: cs'>>;+  }+  | Nothing      = <<VNil>>;+}++vectToStr: Vect Char n -> String;+vectToStr (h :: t) = strCons h (vectToStr t);+vectToStr VNil     = "";+++data StrCmp = StrLT | StrEQ | StrGT;+strCmp: String -> String -> StrCmp;+strCmp s t =+  if      (__strLT s t) then StrLT+  else if (strEq s t)   then StrEQ+  else                       StrGT;
+ lib/tactics.idr view
@@ -0,0 +1,9 @@+data Tactic : # where+    TFill : {a:#} -> a -> Tactic+  | TRefine : String -> Tactic+  | TTrivial : Tactic+  | TTry : Tactic -> Tactic -> Tactic+  | TSeq : Tactic -> Tactic -> Tactic+  | TThen : Tactic -> Tactic -> Tactic+  | TThenAll : Tactic -> Tactic -> Tactic+  | TFail : String -> Tactic;
+ lib/vect.idr view
@@ -0,0 +1,53 @@+include "nat.idr";++infixr 5 ::;++data Vect : # -> Nat -> # where+   VNil : Vect A O+ | (::) : A -> (Vect A k) -> (Vect A (S k));++data Fin : Nat -> # where+   fO : Fin (S k)+ | fS : (Fin k) -> (Fin (S k));++vlookup : (Fin k) -> (Vect A k) -> A;+vlookup fO (x :: xs) = x;+vlookup (fS k) (x :: xs) = vlookup k xs;++weakenFin : Fin n -> Fin (S n);+weakenFin fO = fO;+weakenFin (fS k) = fS (weakenFin k);++vmap : (A->B) -> (Vect A n) -> (Vect B n);+vmap f VNil = VNil;+vmap f (x :: xs) = f x :: vmap f xs;++vapp : (Vect A n) -> (Vect A m) -> (Vect A (plus n m));+vapp VNil ys = ys;+vapp (x :: xs) ys = x :: vapp xs ys;++-- Membership predicate for vectors, and means to compute one.++using (A:#, n:Nat, i:Fin n, x:A, y:A, xs:Vect A n) {++  data ElemIs : (Fin n) -> A -> (Vect A n) -> # where+     first : (ElemIs fO x (x :: xs))+   | later : (ElemIs i x xs) -> (ElemIs (fS i) x (y :: xs));+}++elemIs : (i:Fin n) -> (xs:Vect A n) -> (ElemIs i (vlookup i xs) xs);+elemIs fO (x :: xs) = first;+elemIs (fS k) (x :: xs) = later (elemIs k xs);++isElemAuxO : {x:A} -> {xs: Vect A n} -> +	     (y:A) ->+	     (eq: (Maybe (x=y))) ->+	     (Maybe (ElemIs fO x (y :: xs)));+isElemAuxO {x=y} y (Just (refl _)) = Just first;+isElemAuxO y Nothing = Nothing;++isElem : (eq:(a:A)->(b:A)->(Maybe (a=b)))->+	 (i:Fin n) -> (x:A) -> (xs:Vect A n) -> (Maybe (ElemIs i x xs));+isElem eq i x VNil = Nothing;+isElem eq fO x (y :: xs) = isElemAuxO y (eq x y);+isElem eq (fS i) x (y :: xs) = mMap later (isElem eq i x xs);