Copyright | disco team and contributors |
---|---|
License | BSD-3-Clause |
Maintainer | byorgey@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
Typed abstract syntax trees representing the typechecked surface syntax of the Disco language. Each tree node is annotated with the type of its subtree.
Synopsis
- type ATerm = Term_ TY
- pattern ATVar :: Type -> QName ATerm -> ATerm
- pattern ATPrim :: Type -> Prim -> ATerm
- pattern ATLet :: Type -> Bind (Telescope ABinding) ATerm -> ATerm
- pattern ATUnit :: ATerm
- pattern ATBool :: Type -> Bool -> ATerm
- pattern ATNat :: Type -> Integer -> ATerm
- pattern ATRat :: Rational -> ATerm
- pattern ATChar :: Char -> ATerm
- pattern ATString :: String -> ATerm
- pattern ATAbs :: Quantifier -> Type -> Bind [APattern] ATerm -> ATerm
- pattern ATApp :: Type -> ATerm -> ATerm -> ATerm
- pattern ATTup :: Type -> [ATerm] -> ATerm
- pattern ATCase :: Type -> [ABranch] -> ATerm
- pattern ATChain :: Type -> ATerm -> [ALink] -> ATerm
- pattern ATTyOp :: Type -> TyOp -> Type -> ATerm
- pattern ATContainer :: Type -> Container -> [(ATerm, Maybe ATerm)] -> Maybe (Ellipsis ATerm) -> ATerm
- pattern ATContainerComp :: Type -> Container -> Bind (Telescope AQual) ATerm -> ATerm
- pattern ATList :: Type -> [ATerm] -> Maybe (Ellipsis ATerm) -> ATerm
- pattern ATListComp :: Type -> Bind (Telescope AQual) ATerm -> ATerm
- pattern ATTest :: [(String, Type, Name ATerm)] -> ATerm -> ATerm
- type ALink = Link_ TY
- pattern ATLink :: BOp -> ATerm -> ALink
- data Container where
- type ABinding = Binding_ TY
- type ABranch = Bind (Telescope AGuard) ATerm
- type AGuard = Guard_ TY
- pattern AGBool :: Embed ATerm -> AGuard
- pattern AGPat :: Embed ATerm -> APattern -> AGuard
- pattern AGLet :: ABinding -> AGuard
- type AQual = Qual_ TY
- pattern AQBind :: Name ATerm -> Embed ATerm -> AQual
- pattern AQGuard :: Embed ATerm -> AQual
- type APattern = Pattern_ TY
- pattern APVar :: Type -> Name ATerm -> APattern
- pattern APWild :: Type -> APattern
- pattern APUnit :: APattern
- pattern APBool :: Bool -> APattern
- pattern APTup :: Type -> [APattern] -> APattern
- pattern APInj :: Type -> Side -> APattern -> APattern
- pattern APNat :: Type -> Integer -> APattern
- pattern APChar :: Char -> APattern
- pattern APString :: String -> APattern
- pattern APCons :: Type -> APattern -> APattern -> APattern
- pattern APList :: Type -> [APattern] -> APattern
- pattern APAdd :: Type -> Side -> APattern -> ATerm -> APattern
- pattern APMul :: Type -> Side -> APattern -> ATerm -> APattern
- pattern APSub :: Type -> APattern -> ATerm -> APattern
- pattern APNeg :: Type -> APattern -> APattern
- pattern APFrac :: Type -> APattern -> APattern -> APattern
- pattern ABinding :: Maybe (Embed PolyType) -> Name ATerm -> Embed ATerm -> ABinding
- varsBound :: APattern -> [(Name ATerm, Type)]
- getType :: HasType t => t -> Type
- setType :: HasType t => Type -> t -> t
- substQT :: QName ATerm -> ATerm -> ATerm -> ATerm
- type AProperty = Property_ TY
Type-annotated terms
type ATerm = Term_ TY Source #
An ATerm
is a typechecked term where every node in the tree has
been annotated with the type of the subterm rooted at that node.
pattern ATContainer :: Type -> Container -> [(ATerm, Maybe ATerm)] -> Maybe (Ellipsis ATerm) -> ATerm Source #
An enumeration of the different kinds of containers in disco: lists, bags, and sets.