IOTasks-2.2.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.IOTasks.Internal.Term

Documentation

data Term (k :: TermKind) a where Source #

Constructors

Add :: Num a => Term k a -> Term k a -> Term k a 
Sub :: Num a => Term k a -> Term k a -> Term k a 
Mul :: Num a => Term k a -> Term k a -> Term k a 
Equals :: (Typeable a, Eq a) => Term k a -> Term k a -> Term k Bool 
Gt :: (Typeable a, Ord a) => Term k a -> Term k a -> Term k Bool 
Ge :: (Typeable a, Ord a) => Term k a -> Term k a -> Term k Bool 
Lt :: (Typeable a, Ord a) => Term k a -> Term k a -> Term k Bool 
Le :: (Typeable a, Ord a) => Term k a -> Term k a -> Term k Bool 
And :: Term k Bool -> Term k Bool -> Term k Bool 
Or :: Term k Bool -> Term k Bool -> Term k Bool 
IsIn :: (Typeable a, Eq a) => Term k a -> Term k [a] -> Term k Bool 
Not :: Term k Bool -> Term k Bool 
Sum :: Num a => Term k [a] -> Term k a 
Product :: Num a => Term k [a] -> Term k a 
Length :: Typeable a => Term k [a] -> Term k Integer 
Reverse :: Typeable a => Term k [a] -> Term k [a] 
IntLit :: Integer -> Term k Integer 
ListLit :: (Show a, Typeable a) => [a] -> Term k [a] 
EmbeddedLit :: (Embeddable a, Typeable a, Show a) => a -> Term k (Embedded a) 
BoolLit :: Bool -> Term k Bool 
Current :: VarExp e => e a -> Int -> Term k a 
All :: (Typeable a, VarExp e) => e a -> Int -> Term k [a] 
Opaque :: Expr -> [[SomeVar]] -> [SomeTerm 'Transparent] -> Term 'PartiallyOpaque a 

Instances

Instances details
EffectEval (Term k) Source # 
Instance details

Defined in Test.IOTasks.Internal.Term

Associated Types

type Env (Term k) Source #

Methods

pureEval :: (Applicative f, Typeable a) => (forall x. Typeable x => Term k x -> f x) -> Env (Term k) -> Term k a -> f a Source #

eval :: Typeable a => Env (Term k) -> Term k a -> a Source #

Typeable a => Show (Term k a) Source # 
Instance details

Defined in Test.IOTasks.Internal.Term

Methods

showsPrec :: Int -> Term k a -> ShowS #

show :: Term k a -> String #

showList :: [Term k a] -> ShowS #

Typeable a => Eq (Term k a) Source # 
Instance details

Defined in Test.IOTasks.Internal.Term

Methods

(==) :: Term k a -> Term k a -> Bool #

(/=) :: Term k a -> Term k a -> Bool #

Typeable a => Ord (Term k a) Source # 
Instance details

Defined in Test.IOTasks.Internal.Term

Methods

compare :: Term k a -> Term k a -> Ordering #

(<) :: Term k a -> Term k a -> Bool #

(<=) :: Term k a -> Term k a -> Bool #

(>) :: Term k a -> Term k a -> Bool #

(>=) :: Term k a -> Term k a -> Bool #

max :: Term k a -> Term k a -> Term k a #

min :: Term k a -> Term k a -> Term k a #

type Env (Term k) Source # 
Instance details

Defined in Test.IOTasks.Internal.Term

type Env (Term k) = ValueMap

toExpr :: Typeable a => Term k a -> Expr Source #

data SomeTerm k where Source #

Constructors

SomeTerm :: Typeable a => Term k a -> SomeTerm k 

withSomeTerm :: SomeTerm k -> (forall a. Typeable a => Term k a -> r) -> r Source #

data SomeTermK where Source #

Constructors

SomeTermK :: SomeTerm k -> SomeTermK 

withSomeTermK :: SomeTermK -> (forall (k :: TermKind) a. Typeable a => Term k a -> r) -> r Source #

castTerm :: forall {k} a. Typeable a => SomeTerm k -> Maybe (Term k a) Source #

compareK :: Typeable a => Term k1 a -> Term k2 a -> Ordering Source #