| License | MIT | 
|---|---|
| Safe Haskell | Safe-Inferred | 
| Language | Haskell2010 | 
Language.Egison.AST
Description
This module defines the syntax of Egison.
Documentation
data ConstantExpr Source #
Constructors
| CharExpr Char | |
| StringExpr Text | |
| BoolExpr Bool | |
| IntegerExpr Integer | |
| FloatExpr Double | |
| SomethingExpr | |
| UndefinedExpr | 
Instances
| Show ConstantExpr Source # | |
| Defined in Language.Egison.AST Methods showsPrec :: Int -> ConstantExpr -> ShowS # show :: ConstantExpr -> String # showList :: [ConstantExpr] -> ShowS # | |
| Pretty ConstantExpr Source # | |
| Defined in Language.Egison.Pretty | |
Constructors
Instances
| Show Expr Source # | |
| Pretty MatchClause Source # | |
| Defined in Language.Egison.Pretty | |
| Pretty Expr Source # | |
| Defined in Language.Egison.Pretty | |
Constructors
Instances
| Show Pattern Source # | |
| Pretty Pattern Source # | |
| Defined in Language.Egison.Pretty | |
| Pretty MatchClause Source # | |
| Defined in Language.Egison.Pretty | |
data VarWithIndices Source #
Constructors
| VarWithIndices String [VarIndex] | 
Instances
| Eq VarWithIndices Source # | |
| Defined in Language.Egison.AST Methods (==) :: VarWithIndices -> VarWithIndices -> Bool # (/=) :: VarWithIndices -> VarWithIndices -> Bool # | |
| Show VarWithIndices Source # | |
| Defined in Language.Egison.AST Methods showsPrec :: Int -> VarWithIndices -> ShowS # show :: VarWithIndices -> String # showList :: [VarWithIndices] -> ShowS # | |
| Pretty VarWithIndices Source # | |
| Defined in Language.Egison.Pretty | |
Constructors
| ScalarArg a | |
| InvertedScalarArg a | |
| TensorArg a | 
data ArgPattern Source #
Constructors
| APWildCard | |
| APPatVar VarWithIndices | |
| APInductivePat String [Arg ArgPattern] | |
| APTuplePat [Arg ArgPattern] | |
| APEmptyPat | |
| APConsPat (Arg ArgPattern) ArgPattern | |
| APSnocPat ArgPattern (Arg ArgPattern) | 
Instances
| Show ArgPattern Source # | |
| Defined in Language.Egison.AST Methods showsPrec :: Int -> ArgPattern -> ShowS # show :: ArgPattern -> String # showList :: [ArgPattern] -> ShowS # | |
| Pretty ArgPattern Source # | |
| Defined in Language.Egison.Pretty | |
Constructors
| Subscript a | |
| Superscript a | |
| SupSubscript a | |
| MultiSubscript a a | |
| MultiSuperscript a a | |
| Userscript a | 
Instances
| Functor IndexExpr Source # | |
| Foldable IndexExpr Source # | |
| Defined in Language.Egison.AST Methods fold :: Monoid m => IndexExpr m -> m # foldMap :: Monoid m => (a -> m) -> IndexExpr a -> m # foldMap' :: Monoid m => (a -> m) -> IndexExpr a -> m # foldr :: (a -> b -> b) -> b -> IndexExpr a -> b # foldr' :: (a -> b -> b) -> b -> IndexExpr a -> b # foldl :: (b -> a -> b) -> b -> IndexExpr a -> b # foldl' :: (b -> a -> b) -> b -> IndexExpr a -> b # foldr1 :: (a -> a -> a) -> IndexExpr a -> a # foldl1 :: (a -> a -> a) -> IndexExpr a -> a # toList :: IndexExpr a -> [a] # length :: IndexExpr a -> Int # elem :: Eq a => a -> IndexExpr a -> Bool # maximum :: Ord a => IndexExpr a -> a # minimum :: Ord a => IndexExpr a -> a # | |
| Traversable IndexExpr Source # | |
| Defined in Language.Egison.AST | |
| Eq a => Eq (IndexExpr a) Source # | |
| Show a => Show (IndexExpr a) Source # | |
| (Pretty a, Complex a) => Pretty (IndexExpr a) Source # | |
| Defined in Language.Egison.Pretty | |
| Pretty (IndexExpr String) Source # | |
Constructors
| VSubscript String | |
| VSuperscript String | |
| VMultiSubscript String Integer String | |
| VMultiSuperscript String Integer String | |
| VGroupScripts [VarIndex] | |
| VSymmScripts [VarIndex] | |
| VAntiSymmScripts [VarIndex] | 
data BindingExpr Source #
Constructors
| Bind PrimitiveDataPattern Expr | |
| BindWithIndices VarWithIndices Expr | 
Instances
| Show BindingExpr Source # | |
| Defined in Language.Egison.AST Methods showsPrec :: Int -> BindingExpr -> ShowS # show :: BindingExpr -> String # showList :: [BindingExpr] -> ShowS # | |
| Pretty BindingExpr Source # | |
| Defined in Language.Egison.Pretty | |
type MatchClause = (Pattern, Expr) Source #
type PatternDef = (PrimitivePatPattern, Expr, [(PrimitiveDataPattern, Expr)]) Source #
data PrimitivePatPattern Source #
Constructors
| PPWildCard | |
| PPPatVar | |
| PPValuePat String | |
| PPInductivePat String [PrimitivePatPattern] | |
| PPTuplePat [PrimitivePatPattern] | 
Instances
| Show PrimitivePatPattern Source # | |
| Defined in Language.Egison.AST Methods showsPrec :: Int -> PrimitivePatPattern -> ShowS # show :: PrimitivePatPattern -> String # showList :: [PrimitivePatPattern] -> ShowS # | |
| Pretty PrimitivePatPattern Source # | |
| Defined in Language.Egison.Pretty | |
data PDPatternBase var Source #
Constructors
| PDWildCard | |
| PDPatVar var | |
| PDInductivePat String [PDPatternBase var] | |
| PDTuplePat [PDPatternBase var] | |
| PDEmptyPat | |
| PDConsPat (PDPatternBase var) (PDPatternBase var) | |
| PDSnocPat (PDPatternBase var) (PDPatternBase var) | |
| PDConstantPat ConstantExpr | 
Instances
reservedExprOp :: [Op] Source #
reservedPatternOp :: [Op] Source #