curry-frontend-2.0.0: Compile the functional logic language Curry to several intermediate formats
Copyright(c) 2016 Finn Teegen
LicenseBSD-3-clause
Maintainerbjp@informatik.uni-kiel.de
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Base.Kinds

Description

This module modules provides the definitions for the internal representation of kinds in the compiler.

Synopsis

Documentation

data Kind Source #

Instances

Instances details
Eq Kind Source # 
Instance details

Defined in Base.Kinds

Methods

(==) :: Kind -> Kind -> Bool Source #

(/=) :: Kind -> Kind -> Bool Source #

Show Kind Source # 
Instance details

Defined in Base.Kinds

Pretty Kind Source # 
Instance details

Defined in Base.PrettyKinds

SubstKind Kind Source # 
Instance details

Defined in Base.KindSubst

Methods

subst :: KindSubst -> Kind -> Kind Source #

kindArity :: Kind -> Int Source #

The function kindArity computes the arity n of a 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.

kindArgs :: Kind -> [Kind] Source #

Fetches a kind's arguments, i.e. everything before an arrow at the top-level. For example: A kind k1 -> k2 -> k3 would have the arguments [k1, k2].