disco-0.1.5: Functional programming language for teaching discrete math.
Copyrightdisco team and contributors
LicenseBSD-3-Clause
Maintainerbyorgey@gmail.com
Safe HaskellNone
LanguageHaskell2010

Disco.AST.Desugared

Description

Typed abstract syntax trees representing the typechecked, desugared Disco language.

Synopsis

Desugared, type-annotated terms

type DTerm = Term_ DS Source #

A DTerm is a term which has been typechecked and desugared, so it has fewer constructors and complex features than ATerm, but still retains typing information.

pattern DTVar :: Type -> QName DTerm -> DTerm Source #

pattern DTPrim :: Type -> Prim -> DTerm Source #

pattern DTUnit :: DTerm Source #

pattern DTBool :: Type -> Bool -> DTerm Source #

pattern DTChar :: Char -> DTerm Source #

pattern DTNat :: Type -> Integer -> DTerm Source #

pattern DTRat :: Rational -> DTerm Source #

pattern DTApp :: Type -> DTerm -> DTerm -> DTerm Source #

pattern DTPair :: Type -> DTerm -> DTerm -> DTerm Source #

pattern DTCase :: Type -> [DBranch] -> DTerm Source #

pattern DTTyOp :: Type -> TyOp -> Type -> DTerm Source #

pattern DTNil :: Type -> DTerm Source #

pattern DTTest :: [(String, Type, Name DTerm)] -> DTerm -> DTerm Source #

A test frame, recording a collection of variables with their types and their original user-facing names. Used for legible reporting of test failures inside the enclosed term.

data Container where Source #

An enumeration of the different kinds of containers in disco: lists, bags, and sets.

Instances

Instances details
Enum Container Source # 
Instance details

Defined in Disco.AST.Generic

Eq Container Source # 
Instance details

Defined in Disco.AST.Generic

Data Container Source # 
Instance details

Defined in Disco.AST.Generic

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Container -> c Container #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Container #

toConstr :: Container -> Constr #

dataTypeOf :: Container -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Container) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Container) #

gmapT :: (forall b. Data b => b -> b) -> Container -> Container #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Container -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Container -> r #

gmapQ :: (forall d. Data d => d -> u) -> Container -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Container -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Container -> m Container #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Container -> m Container #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Container -> m Container #

Show Container Source # 
Instance details

Defined in Disco.AST.Generic

Generic Container Source # 
Instance details

Defined in Disco.AST.Generic

Associated Types

type Rep Container :: Type -> Type #

Alpha Container Source # 
Instance details

Defined in Disco.AST.Generic

Subst t Container Source # 
Instance details

Defined in Disco.AST.Generic

type Rep Container Source # 
Instance details

Defined in Disco.AST.Generic

type Rep Container = D1 ('MetaData "Container" "Disco.AST.Generic" "disco-0.1.5-Dj6M4uP9IofLLslCWcCyVQ" 'False) (C1 ('MetaCons "ListContainer" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "BagContainer" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SetContainer" 'PrefixI 'False) (U1 :: Type -> Type)))

Branches and guards

type DGuard = Guard_ DS Source #

pattern DPVar :: Type -> Name DTerm -> DPattern Source #

pattern DPWild :: Type -> DPattern Source #

pattern DPUnit :: DPattern Source #

pattern DPInj :: Type -> Side -> Name DTerm -> DPattern Source #