Copyright | Satoshi Egi |
---|---|
License | MIT |
Safe Haskell | Safe |
Language | Haskell98 |
This module defines the syntax of Egison.
Documentation
data EgisonTopExpr Source #
Define Var EgisonExpr | |
DefineWithIndices VarWithIndices EgisonExpr | |
Redefine Var EgisonExpr | |
Test EgisonExpr | |
Execute EgisonExpr | |
LoadFile String | |
Load String |
Instances
Eq EgisonTopExpr Source # | |
Defined in Language.Egison.AST (==) :: EgisonTopExpr -> EgisonTopExpr -> Bool # (/=) :: EgisonTopExpr -> EgisonTopExpr -> Bool # | |
Show EgisonTopExpr Source # | |
Defined in Language.Egison.AST showsPrec :: Int -> EgisonTopExpr -> ShowS # show :: EgisonTopExpr -> String # showList :: [EgisonTopExpr] -> ShowS # | |
Pretty EgisonTopExpr Source # | |
Defined in Language.Egison.Pretty pretty :: EgisonTopExpr -> Doc ann # prettyList :: [EgisonTopExpr] -> Doc ann # |
data EgisonExpr Source #
Instances
Eq EgisonExpr Source # | |
Defined in Language.Egison.AST (==) :: EgisonExpr -> EgisonExpr -> Bool # (/=) :: EgisonExpr -> EgisonExpr -> Bool # | |
Show EgisonExpr Source # | |
Defined in Language.Egison.AST showsPrec :: Int -> EgisonExpr -> ShowS # show :: EgisonExpr -> String # showList :: [EgisonExpr] -> ShowS # | |
Pretty MatchClause Source # | |
Defined in Language.Egison.Pretty pretty :: MatchClause -> Doc ann # prettyList :: [MatchClause] -> Doc ann # | |
Pretty BindingExpr Source # | |
Defined in Language.Egison.Pretty pretty :: BindingExpr -> Doc ann # prettyList :: [BindingExpr] -> Doc ann # | |
Pretty EgisonExpr Source # | |
Defined in Language.Egison.Pretty pretty :: EgisonExpr -> Doc ann # prettyList :: [EgisonExpr] -> Doc ann # | |
PrettyS EgisonExpr Source # | |
Defined in Language.Egison.Pretty prettyS :: EgisonExpr -> String Source # | |
Show (Index EgisonExpr) Source # | |
Defined in Language.Egison.AST |
data EgisonPattern Source #
Instances
Eq EgisonPattern Source # | |
Defined in Language.Egison.AST (==) :: EgisonPattern -> EgisonPattern -> Bool # (/=) :: EgisonPattern -> EgisonPattern -> Bool # | |
Show EgisonPattern Source # | |
Defined in Language.Egison.AST showsPrec :: Int -> EgisonPattern -> ShowS # show :: EgisonPattern -> String # showList :: [EgisonPattern] -> ShowS # | |
Pretty EgisonPattern Source # | |
Defined in Language.Egison.Pretty pretty :: EgisonPattern -> Doc ann # prettyList :: [EgisonPattern] -> Doc ann # | |
Pretty MatchClause Source # | |
Defined in Language.Egison.Pretty pretty :: MatchClause -> Doc ann # prettyList :: [MatchClause] -> Doc ann # | |
PrettyS EgisonPattern Source # | |
Defined in Language.Egison.Pretty prettyS :: EgisonPattern -> String Source # |
Instances
Eq Var Source # | |
Show Var Source # | |
Generic Var Source # | |
Hashable Var Source # | |
Defined in Language.Egison.AST | |
Pretty BindingExpr Source # | |
Defined in Language.Egison.Pretty pretty :: BindingExpr -> Doc ann # prettyList :: [BindingExpr] -> Doc ann # | |
Pretty Var Source # | |
Defined in Language.Egison.Pretty | |
PrettyS Var Source # | |
type Rep Var Source # | |
Defined in Language.Egison.AST type Rep Var = D1 (MetaData "Var" "Language.Egison.AST" "egison-3.10.2-Be2ZlsXlEWw7MiN6rMdRns" False) (C1 (MetaCons "Var" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [String]) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Index ()]))) |
data VarWithIndices Source #
Instances
Eq VarWithIndices Source # | |
Defined in Language.Egison.AST (==) :: VarWithIndices -> VarWithIndices -> Bool # (/=) :: VarWithIndices -> VarWithIndices -> Bool # | |
Show VarWithIndices Source # | |
Defined in Language.Egison.AST showsPrec :: Int -> VarWithIndices -> ShowS # show :: VarWithIndices -> String # showList :: [VarWithIndices] -> ShowS # | |
PrettyS VarWithIndices Source # | |
Defined in Language.Egison.Pretty prettyS :: VarWithIndices -> String Source # |
Subscript a | |
Superscript a | |
SupSubscript a | |
MultiSubscript a a | |
MultiSuperscript a a | |
DFscript Integer Integer | |
Userscript a |
Instances
extractIndex :: Index a -> a Source #
type BindingExpr = ([Var], EgisonExpr) Source #
type MatchClause = (EgisonPattern, EgisonExpr) Source #
type PatternDef = (PrimitivePatPattern, EgisonExpr, [(PrimitiveDataPattern, EgisonExpr)]) Source #
data PrimitivePatPattern Source #
PPWildCard | |
PPPatVar | |
PPValuePat String | |
PPInductivePat String [PrimitivePatPattern] | |
PPTuplePat [PrimitivePatPattern] |
Instances
Eq PrimitivePatPattern Source # | |
Defined in Language.Egison.AST (==) :: PrimitivePatPattern -> PrimitivePatPattern -> Bool # (/=) :: PrimitivePatPattern -> PrimitivePatPattern -> Bool # | |
Show PrimitivePatPattern Source # | |
Defined in Language.Egison.AST showsPrec :: Int -> PrimitivePatPattern -> ShowS # show :: PrimitivePatPattern -> String # showList :: [PrimitivePatPattern] -> ShowS # |
data PrimitiveDataPattern Source #
Instances
Eq PrimitiveDataPattern Source # | |
Defined in Language.Egison.AST (==) :: PrimitiveDataPattern -> PrimitiveDataPattern -> Bool # (/=) :: PrimitiveDataPattern -> PrimitiveDataPattern -> Bool # | |
Show PrimitiveDataPattern Source # | |
Defined in Language.Egison.AST showsPrec :: Int -> PrimitiveDataPattern -> ShowS # show :: PrimitiveDataPattern -> String # showList :: [PrimitiveDataPattern] -> ShowS # |
data EgisonBinOp Source #
Instances
Eq EgisonBinOp Source # | |
Defined in Language.Egison.AST (==) :: EgisonBinOp -> EgisonBinOp -> Bool # (/=) :: EgisonBinOp -> EgisonBinOp -> Bool # | |
Ord EgisonBinOp Source # | |
Defined in Language.Egison.AST compare :: EgisonBinOp -> EgisonBinOp -> Ordering # (<) :: EgisonBinOp -> EgisonBinOp -> Bool # (<=) :: EgisonBinOp -> EgisonBinOp -> Bool # (>) :: EgisonBinOp -> EgisonBinOp -> Bool # (>=) :: EgisonBinOp -> EgisonBinOp -> Bool # max :: EgisonBinOp -> EgisonBinOp -> EgisonBinOp # min :: EgisonBinOp -> EgisonBinOp -> EgisonBinOp # | |
Show EgisonBinOp Source # | |
Defined in Language.Egison.AST showsPrec :: Int -> EgisonBinOp -> ShowS # show :: EgisonBinOp -> String # showList :: [EgisonBinOp] -> ShowS # | |
PrettyS EgisonBinOp Source # | |
Defined in Language.Egison.Pretty prettyS :: EgisonBinOp -> String Source # |
data BinOpAssoc Source #
Instances
Eq BinOpAssoc Source # | |
Defined in Language.Egison.AST (==) :: BinOpAssoc -> BinOpAssoc -> Bool # (/=) :: BinOpAssoc -> BinOpAssoc -> Bool # | |
Ord BinOpAssoc Source # | |
Defined in Language.Egison.AST compare :: BinOpAssoc -> BinOpAssoc -> Ordering # (<) :: BinOpAssoc -> BinOpAssoc -> Bool # (<=) :: BinOpAssoc -> BinOpAssoc -> Bool # (>) :: BinOpAssoc -> BinOpAssoc -> Bool # (>=) :: BinOpAssoc -> BinOpAssoc -> Bool # max :: BinOpAssoc -> BinOpAssoc -> BinOpAssoc # min :: BinOpAssoc -> BinOpAssoc -> BinOpAssoc # | |
Show BinOpAssoc Source # | |
Defined in Language.Egison.AST showsPrec :: Int -> BinOpAssoc -> ShowS # show :: BinOpAssoc -> String # showList :: [BinOpAssoc] -> ShowS # |
reservedBinops :: [EgisonBinOp] Source #
stringToVar :: String -> Var Source #
stringToVarExpr :: String -> EgisonExpr Source #