dino-0.1: A convenient tagless EDSL

Safe HaskellNone
LanguageHaskell2010

Dino.Types

Synopsis

Documentation

data Dinamic where Source #

Dynamic type based on DinoType

Constructors

Dinamic :: DinoType a => a -> Dinamic 
Instances
Monad e => MonadReader (HashMap Text Dinamic) (EvalEnv e) Source # 
Instance details

Defined in Dino.Interpretation

class (Eq a, Show a, Typeable a, Inspectable a) => DinoType a where Source #

Minimal complete definition

Nothing

Instances
DinoType Bool Source # 
Instance details

Defined in Dino.Types

DinoType Double Source # 
Instance details

Defined in Dino.Types

DinoType Float Source # 
Instance details

Defined in Dino.Types

DinoType Int Source # 
Instance details

Defined in Dino.Types

DinoType Integer Source # 
Instance details

Defined in Dino.Types

DinoType Rational Source # 
Instance details

Defined in Dino.Types

DinoType () Source # 
Instance details

Defined in Dino.Types

DinoType Text Source # 
Instance details

Defined in Dino.Types

DinoType a => DinoType [a] Source # 
Instance details

Defined in Dino.Types

DinoType a => DinoType (Maybe a) Source # 
Instance details

Defined in Dino.Types

(DinoType a, DinoType b) => DinoType (a, b) Source # 
Instance details

Defined in Dino.Types

Methods

dinoTypeRep :: DinoTypeRep (a, b) Source #

data DinoTypeRep a where Source #

Constructors

ListType :: DinoTypeRep a -> DinoTypeRep [a] 
PairType :: DinoTypeRep a -> DinoTypeRep b -> DinoTypeRep (a, b) 
OtherType :: (BuiltIn a ~ False, DinoType a) => DinoTypeRep a 
Instances
AssertExp DinoTypeRep Source # 
Instance details

Defined in Dino.Interpretation

FieldExp DinoTypeRep Source # 
Instance details

Defined in Dino.Interpretation

Methods

getField :: (KnownSymbol f, HasField f r a, DinoType a) => proxy f -> DinoTypeRep r -> DinoTypeRep a Source #

LetExp DinoTypeRep Source # 
Instance details

Defined in Dino.Interpretation

Methods

letE :: DinoType a => Text -> DinoTypeRep a -> (DinoTypeRep a -> DinoTypeRep b) -> DinoTypeRep b Source #

TupleExp DinoTypeRep Source # 
Instance details

Defined in Dino.Interpretation

ListExp DinoTypeRep Source # 
Instance details

Defined in Dino.Interpretation

ListExpFO DinoTypeRep Source # 
Instance details

Defined in Dino.Interpretation

CondExp DinoTypeRep Source # 
Instance details

Defined in Dino.Interpretation

CondExpFO DinoTypeRep Source # 
Instance details

Defined in Dino.Interpretation

CompareExp DinoTypeRep Source # 
Instance details

Defined in Dino.Interpretation

LogicExp DinoTypeRep Source # 
Instance details

Defined in Dino.Interpretation

FracExp DinoTypeRep Source # 
Instance details

Defined in Dino.Interpretation

Methods

fdiv :: (Fractional a, Eq a) => DinoTypeRep a -> DinoTypeRep a -> DinoTypeRep a Source #

NumExp DinoTypeRep Source # 
Instance details

Defined in Dino.Interpretation

ConstExp DinoTypeRep Source # 
Instance details

Defined in Dino.Interpretation

Methods

lit :: DinoType a => a -> DinoTypeRep a Source #

TestEquality DinoTypeRep Source #

This instance is complete in the sense that if t ~ u, then testEquality (trep :: DinoTypeRep t) (urep :: DinoTypeRep u) returns Just Refl.

For example, BoolType and EnumType :: DinoTypeRep Bool are considered equal.

Instance details

Defined in Dino.Types

Methods

testEquality :: DinoTypeRep a -> DinoTypeRep b -> Maybe (a :~: b) #

AnnExp ann DinoTypeRep Source # 
Instance details

Defined in Dino.Interpretation

Methods

ann :: ann -> DinoTypeRep a -> DinoTypeRep a Source #

type family BuiltIn a :: Bool where ... Source #

Built-in Dino types

Whether or not a type is built-in is mostly an implementation detail.

Equations

BuiltIn [a] = True 
BuiltIn (a, b) = True 
BuiltIn a = False 

withType :: DinoTypeRep a -> (DinoType a => b) -> b Source #

class Inspectable a Source #

Instances
Inspectable Bool Source # 
Instance details

Defined in Dino.AST

Inspectable Double Source # 
Instance details

Defined in Dino.AST

Inspectable Float Source # 
Instance details

Defined in Dino.AST

Inspectable Int Source # 
Instance details

Defined in Dino.AST

Inspectable Integer Source # 
Instance details

Defined in Dino.AST

Inspectable Rational Source # 
Instance details

Defined in Dino.AST

Inspectable () Source # 
Instance details

Defined in Dino.AST

Methods

inspect :: () -> AST Rational Source #

Inspectable String Source # 
Instance details

Defined in Dino.AST

Inspectable Text Source # 
Instance details

Defined in Dino.AST

Inspectable a => Inspectable [a] Source # 
Instance details

Defined in Dino.AST

Methods

inspect :: [a] -> AST Rational Source #

Inspectable a => Inspectable (Maybe a) Source # 
Instance details

Defined in Dino.AST

Methods

inspect :: Maybe a -> AST Rational Source #

Real n => Inspectable (AST n) Source # 
Instance details

Defined in Dino.AST

Methods

inspect :: AST n -> AST Rational Source #

Inspectable (Reified a) Source # 
Instance details

Defined in Dino.Interpretation

(Inspectable a, Inspectable b) => Inspectable (a, b) Source # 
Instance details

Defined in Dino.AST

Methods

inspect :: (a, b) -> AST Rational Source #

Inspectable a => Inspectable (Mapping Field a) Source # 
Instance details

Defined in Dino.AST

(Inspectable a, Inspectable b, Inspectable c) => Inspectable (a, b, c) Source # 
Instance details

Defined in Dino.AST

Methods

inspect :: (a, b, c) -> AST Rational Source #

(Inspectable a, Inspectable b, Inspectable c, Inspectable d) => Inspectable (a, b, c, d) Source # 
Instance details

Defined in Dino.AST

Methods

inspect :: (a, b, c, d) -> AST Rational Source #