License | MIT |
---|---|
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
This module defines the syntax of Egison.
Documentation
data ConstantExpr Source #
CharExpr Char | |
StringExpr Text | |
BoolExpr Bool | |
IntegerExpr Integer | |
FloatExpr Double | |
SomethingExpr | |
UndefinedExpr |
Instances
Show ConstantExpr Source # | |
Defined in Language.Egison.AST showsPrec :: Int -> ConstantExpr -> ShowS # show :: ConstantExpr -> String # showList :: [ConstantExpr] -> ShowS # | |
Pretty ConstantExpr Source # | |
Defined in Language.Egison.Pretty pretty :: ConstantExpr -> Doc ann # prettyList :: [ConstantExpr] -> Doc ann # |
Instances
Show Expr Source # | |
Pretty MatchClause Source # | |
Defined in Language.Egison.Pretty pretty :: MatchClause -> Doc ann # prettyList :: [MatchClause] -> Doc ann # | |
Pretty Expr Source # | |
Defined in Language.Egison.Pretty |
Instances
Show Pattern Source # | |
Pretty Pattern Source # | |
Defined in Language.Egison.Pretty | |
Pretty MatchClause Source # | |
Defined in Language.Egison.Pretty pretty :: MatchClause -> Doc ann # prettyList :: [MatchClause] -> Doc ann # |
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 # | |
Pretty VarWithIndices Source # | |
Defined in Language.Egison.Pretty pretty :: VarWithIndices -> Doc ann # prettyList :: [VarWithIndices] -> Doc ann # |
data ArgPattern Source #
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 showsPrec :: Int -> ArgPattern -> ShowS # show :: ArgPattern -> String # showList :: [ArgPattern] -> ShowS # | |
Pretty ArgPattern Source # | |
Defined in Language.Egison.Pretty pretty :: ArgPattern -> Doc ann # prettyList :: [ArgPattern] -> Doc ann # |
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 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 # | |
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 # | |
VSubscript String | |
VSuperscript String | |
VMultiSubscript String Integer String | |
VMultiSuperscript String Integer String | |
VGroupScripts [VarIndex] | |
VSymmScripts [VarIndex] | |
VAntiSymmScripts [VarIndex] |
data BindingExpr Source #
Instances
Show BindingExpr Source # | |
Defined in Language.Egison.AST showsPrec :: Int -> BindingExpr -> ShowS # show :: BindingExpr -> String # showList :: [BindingExpr] -> ShowS # | |
Pretty BindingExpr Source # | |
Defined in Language.Egison.Pretty pretty :: BindingExpr -> Doc ann # prettyList :: [BindingExpr] -> Doc ann # |
type MatchClause = (Pattern, Expr) Source #
type PatternDef = (PrimitivePatPattern, Expr, [(PrimitiveDataPattern, Expr)]) Source #
data PrimitivePatPattern Source #
PPWildCard | |
PPPatVar | |
PPValuePat String | |
PPInductivePat String [PrimitivePatPattern] | |
PPTuplePat [PrimitivePatPattern] |
Instances
Show PrimitivePatPattern Source # | |
Defined in Language.Egison.AST showsPrec :: Int -> PrimitivePatPattern -> ShowS # show :: PrimitivePatPattern -> String # showList :: [PrimitivePatPattern] -> ShowS # | |
Pretty PrimitivePatPattern Source # | |
Defined in Language.Egison.Pretty pretty :: PrimitivePatPattern -> Doc ann # prettyList :: [PrimitivePatPattern] -> Doc ann # |
data PDPatternBase var Source #
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 #