egison-4.1.3: Programming language with non-linear pattern-matching against non-free data
LicenseMIT
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Egison.AST

Description

This module defines the syntax of Egison.

Documentation

data TopExpr Source #

Instances

Instances details
Show TopExpr Source # 
Instance details

Defined in Language.Egison.AST

Pretty TopExpr Source # 
Instance details

Defined in Language.Egison.Pretty

Methods

pretty :: TopExpr -> Doc ann #

prettyList :: [TopExpr] -> Doc ann #

data Expr Source #

Instances

Instances details
Show Expr Source # 
Instance details

Defined in Language.Egison.AST

Methods

showsPrec :: Int -> Expr -> ShowS #

show :: Expr -> String #

showList :: [Expr] -> ShowS #

Pretty MatchClause Source # 
Instance details

Defined in Language.Egison.Pretty

Methods

pretty :: MatchClause -> Doc ann #

prettyList :: [MatchClause] -> Doc ann #

Pretty Expr Source # 
Instance details

Defined in Language.Egison.Pretty

Methods

pretty :: Expr -> Doc ann #

prettyList :: [Expr] -> Doc ann #

data Arg a Source #

Constructors

ScalarArg a 
InvertedScalarArg a 
TensorArg a 

Instances

Instances details
Show a => Show (Arg a) Source # 
Instance details

Defined in Language.Egison.AST

Methods

showsPrec :: Int -> Arg a -> ShowS #

show :: Arg a -> String #

showList :: [Arg a] -> ShowS #

(Pretty a, Complex a) => Pretty (Arg a) Source # 
Instance details

Defined in Language.Egison.Pretty

Methods

pretty :: Arg a -> Doc ann #

prettyList :: [Arg a] -> Doc ann #

data IndexExpr a Source #

Instances

Instances details
Functor IndexExpr Source # 
Instance details

Defined in Language.Egison.AST

Methods

fmap :: (a -> b) -> IndexExpr a -> IndexExpr b #

(<$) :: a -> IndexExpr b -> IndexExpr a #

Foldable IndexExpr Source # 
Instance details

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] #

null :: IndexExpr a -> Bool #

length :: IndexExpr a -> Int #

elem :: Eq a => a -> IndexExpr a -> Bool #

maximum :: Ord a => IndexExpr a -> a #

minimum :: Ord a => IndexExpr a -> a #

sum :: Num a => IndexExpr a -> a #

product :: Num a => IndexExpr a -> a #

Traversable IndexExpr Source # 
Instance details

Defined in Language.Egison.AST

Methods

traverse :: Applicative f => (a -> f b) -> IndexExpr a -> f (IndexExpr b) #

sequenceA :: Applicative f => IndexExpr (f a) -> f (IndexExpr a) #

mapM :: Monad m => (a -> m b) -> IndexExpr a -> m (IndexExpr b) #

sequence :: Monad m => IndexExpr (m a) -> m (IndexExpr a) #

Eq a => Eq (IndexExpr a) Source # 
Instance details

Defined in Language.Egison.AST

Methods

(==) :: IndexExpr a -> IndexExpr a -> Bool #

(/=) :: IndexExpr a -> IndexExpr a -> Bool #

Show a => Show (IndexExpr a) Source # 
Instance details

Defined in Language.Egison.AST

(Pretty a, Complex a) => Pretty (IndexExpr a) Source # 
Instance details

Defined in Language.Egison.Pretty

Methods

pretty :: IndexExpr a -> Doc ann #

prettyList :: [IndexExpr a] -> Doc ann #

Pretty (IndexExpr String) Source # 
Instance details

Defined in Language.Egison.Pretty

Methods

pretty :: IndexExpr String -> Doc ann #

prettyList :: [IndexExpr String] -> Doc ann #

data PMMode Source #

Constructors

BFSMode 
DFSMode 

Instances

Instances details
Show PMMode Source # 
Instance details

Defined in Language.Egison.AST

data BindingExpr Source #

Instances

Instances details
Show BindingExpr Source # 
Instance details

Defined in Language.Egison.AST

Pretty BindingExpr Source # 
Instance details

Defined in Language.Egison.Pretty

Methods

pretty :: BindingExpr -> Doc ann #

prettyList :: [BindingExpr] -> Doc ann #

data LoopRange Source #

Constructors

LoopRange Expr Expr Pattern 

Instances

Instances details
Show LoopRange Source # 
Instance details

Defined in Language.Egison.AST

Pretty LoopRange Source # 
Instance details

Defined in Language.Egison.Pretty

Methods

pretty :: LoopRange -> Doc ann #

prettyList :: [LoopRange] -> Doc ann #

data PDPatternBase var Source #

Instances

Instances details
Functor PDPatternBase Source # 
Instance details

Defined in Language.Egison.AST

Methods

fmap :: (a -> b) -> PDPatternBase a -> PDPatternBase b #

(<$) :: a -> PDPatternBase b -> PDPatternBase a #

Foldable PDPatternBase Source # 
Instance details

Defined in Language.Egison.AST

Methods

fold :: Monoid m => PDPatternBase m -> m #

foldMap :: Monoid m => (a -> m) -> PDPatternBase a -> m #

foldMap' :: Monoid m => (a -> m) -> PDPatternBase a -> m #

foldr :: (a -> b -> b) -> b -> PDPatternBase a -> b #

foldr' :: (a -> b -> b) -> b -> PDPatternBase a -> b #

foldl :: (b -> a -> b) -> b -> PDPatternBase a -> b #

foldl' :: (b -> a -> b) -> b -> PDPatternBase a -> b #

foldr1 :: (a -> a -> a) -> PDPatternBase a -> a #

foldl1 :: (a -> a -> a) -> PDPatternBase a -> a #

toList :: PDPatternBase a -> [a] #

null :: PDPatternBase a -> Bool #

length :: PDPatternBase a -> Int #

elem :: Eq a => a -> PDPatternBase a -> Bool #

maximum :: Ord a => PDPatternBase a -> a #

minimum :: Ord a => PDPatternBase a -> a #

sum :: Num a => PDPatternBase a -> a #

product :: Num a => PDPatternBase a -> a #

Pretty PrimitiveDataPattern Source # 
Instance details

Defined in Language.Egison.Pretty

Show var => Show (PDPatternBase var) Source # 
Instance details

Defined in Language.Egison.AST

data Op Source #

Constructors

Op 

Fields

Instances

Instances details
Eq Op Source # 
Instance details

Defined in Language.Egison.AST

Methods

(==) :: Op -> Op -> Bool #

(/=) :: Op -> Op -> Bool #

Ord Op Source # 
Instance details

Defined in Language.Egison.AST

Methods

compare :: Op -> Op -> Ordering #

(<) :: Op -> Op -> Bool #

(<=) :: Op -> Op -> Bool #

(>) :: Op -> Op -> Bool #

(>=) :: Op -> Op -> Bool #

max :: Op -> Op -> Op #

min :: Op -> Op -> Op #

Show Op Source # 
Instance details

Defined in Language.Egison.AST

Methods

showsPrec :: Int -> Op -> ShowS #

show :: Op -> String #

showList :: [Op] -> ShowS #

Pretty Op Source # 
Instance details

Defined in Language.Egison.Pretty

Methods

pretty :: Op -> Doc ann #

prettyList :: [Op] -> Doc ann #

data Assoc Source #

Constructors

InfixL 
InfixR 
InfixN 
Prefix 

Instances

Instances details
Eq Assoc Source # 
Instance details

Defined in Language.Egison.AST

Methods

(==) :: Assoc -> Assoc -> Bool #

(/=) :: Assoc -> Assoc -> Bool #

Ord Assoc Source # 
Instance details

Defined in Language.Egison.AST

Methods

compare :: Assoc -> Assoc -> Ordering #

(<) :: Assoc -> Assoc -> Bool #

(<=) :: Assoc -> Assoc -> Bool #

(>) :: Assoc -> Assoc -> Bool #

(>=) :: Assoc -> Assoc -> Bool #

max :: Assoc -> Assoc -> Assoc #

min :: Assoc -> Assoc -> Assoc #

Show Assoc Source # 
Instance details

Defined in Language.Egison.AST

Methods

showsPrec :: Int -> Assoc -> ShowS #

show :: Assoc -> String #

showList :: [Assoc] -> ShowS #