rewire-embedder-2.8: A ReWire-to-Isabelle embedder
Safe HaskellSafe
LanguageHaskell2010

Embedder.Atmo.Types

Synopsis

Documentation

class TypeAnnotated a where Source #

Methods

typeOf :: a -> Maybe Ty Source #

tyAnn :: a -> Maybe Poly Source #

setTyAnn :: Maybe Poly -> a -> a Source #

Instances

Instances details
TypeAnnotated Exp Source # 
Instance details

Defined in Embedder.Atmo.Types

TypeAnnotated Pat Source # 
Instance details

Defined in Embedder.Atmo.Types

tupleTy :: Annote -> [Ty] -> Ty Source #

arr :: Ty -> Ty -> Ty infixr 1 Source #

(|->) :: [Text] -> Ty -> Poly infix 1 Source #

sig :: [Ty] -> Ty -> Ty Source #

flattenSig :: Ty -> ([Ty], Ty) Source #

pairTy :: Annote -> Ty -> Ty -> Ty Source #

arrowRight :: Ty -> Ty Source #

Given 'a -> (b -> c)' returns 'b -> c'.

arrowLeft :: Ty -> Ty Source #

Given 'a -> (b -> c)' returns a.

fundamental :: Ty -> Bool Source #

Types with no built-ins (Strings, Integers, lists).

concrete :: Ty -> Bool Source #

Types containing no type variables (or blanks).

vecTy :: Annote -> Ty -> Ty -> Ty Source #

mkArrowTy :: [Ty] -> Ty -> Ty Source #

Takes [T1, ..., Tn-1] Tn and returns (T1 -> (T2 -> ... (T(n-1) -> Tn) ...))

mkTyApp :: Annote -> Ty -> [Ty] -> Ty Source #

poly :: [Text] -> Ty -> Poly Source #

dstStateT :: Ty -> Maybe [Ty] Source #

This takes a type of the form

 StateT S1 (StateT S2 (... (StateT Sm I)))

and returns

 [S1, ..., Sm]

dstTyApp :: Ty -> Maybe (Ty, Ty) Source #

This takes a type of the form

 m a

and returns

 Just (m, a)

dstReacT :: Ty -> Maybe (Ty, Ty, [Ty], Ty) Source #

This takes a type of the form

 ReacT In Out (StateT S1 (StateT S2 (... (StateT Sm I)))) T

and returns

 (In, Out, [S1, ..., Sm], T)

data Poly1 Source #

Degree-1 polynomial with rational coefficients.

Instances

Instances details
Show Poly1 Source # 
Instance details

Defined in Embedder.Atmo.Types

Methods

showsPrec :: Int -> Poly1 -> ShowS #

show :: Poly1 -> String #

showList :: [Poly1] -> ShowS #

Eq Poly1 Source # 
Instance details

Defined in Embedder.Atmo.Types

Methods

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

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

Pretty Poly1 Source # 
Instance details

Defined in Embedder.Atmo.Types

Methods

pretty :: Poly1 -> Doc ann #

prettyList :: [Poly1] -> Doc ann