| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
FreeC.LiftedIR.Syntax.Type
Description
This module contains the definition of type expressions of our lifted intermediate language.
Synopsis
- data Type
- = TypeVar { }
- | TypeCon {
- typeSrcSpan :: SrcSpan
- typeConName :: TypeConName
- typeConArgs :: [Type]
- typeIsDec :: Bool
- | FuncType {
- typeSrcSpan :: SrcSpan
- funcTypeArg :: Type
- funcTypeRes :: Type
- | FreeTypeCon { }
- funcType :: SrcSpan -> [Type] -> Type -> Type
- decreasing :: Type -> Bool
Documentation
A type expression.
Types are represented as fully applied type constructors or type variables
of kind *. In contrast to the Type from the intermediate
representation, Free is modelled explicitly.
Constructors
| TypeVar | A type variable. |
Fields | |
| TypeCon | A fully applied n-ary type constructor application. |
Fields
| |
| FuncType | A function type. |
Fields
| |
| FreeTypeCon | A type constructor for the free monad. |
Fields
| |
funcType :: SrcSpan -> [Type] -> Type -> Type Source #
Creates a function type with the given argument and return types.
decreasing :: Type -> Bool Source #
Decides whether a type contains a decreasing argument.