Copyright | (c) 2016 Finn Teegen |
---|---|
License | BSD-3-clause |
Maintainer | bjp@informatik.uni-kiel.de |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
Base.Kinds
Description
This module modules provides the definitions for the internal representation of kinds in the compiler.
Synopsis
- data Kind
- = KindStar
- | KindVariable Int
- | KindArrow Kind Kind
- kindArity :: Kind -> Int
- kindVars :: Kind -> [Int]
- defaultKind :: Kind -> Kind
- simpleKind :: Int -> Kind
- isSimpleKind :: Kind -> Bool
Documentation
Constructors
KindStar | |
KindVariable Int | |
KindArrow Kind Kind |
kindVars :: Kind -> [Int] Source #
The function kindVars
returns a list of all kind variables
occurring in a kind.
defaultKind :: Kind -> Kind Source #
The function defaultKind
instantiates all kind variables
occurring in a kind to *.
simpleKind :: Int -> Kind Source #
The function simpleKind
returns the kind of a type
constructor with arity n whose arguments all have kind *.
isSimpleKind :: Kind -> Bool Source #
The function isSimpleKind
returns whether a kind is simple or not.