Top-1.7: Constraint solving framework employed by the Helium Compiler.

Safe HaskellSafe-Infered

Top.Types.Schemes

Contents

Description

A representation of type schemes. A type scheme is a (qualified) type with a number of quantifiers (foralls) in front of it. A partial mapping from type variable (Int) to their name (String) is preserved.

Synopsis

Type schemes

type TpScheme = Forall QTypeSource

A type scheme consists of a list of quantified type variables, a finite map that partially maps these type variables to their original identifier, and a qualified type.

class IsTpScheme a whereSource

A type class to convert something into a type scheme

Methods

toTpScheme :: a -> TpSchemeSource

Basic functionality for types and type schemes

arityOfTpScheme :: TpScheme -> IntSource

Determine the arity of a type scheme.

isOverloaded :: TpScheme -> BoolSource

Is the type scheme overloaded (does it contain predicates)?

type Scheme qs = Forall (Qualification qs Tp)Source

A sigma is a type scheme or a type scheme variable

type TpSchemeMap = Map SigmaVar TpSchemeSource

A substitution for type scheme variables