Copyright | (c) Wolfgang Lux 2011 - 2012 Björn Peemöller 2015 Jan Tikovsky 2016 Finn Teegen |
---|---|
License | BSD-3-clause |
Maintainer | bjp@informatik.uni-kiel.de |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
The functions toType
, toTypes
, and fromType
convert Curry type
expressions into types and vice versa. The functions qualifyType
and
unqualifyType
add and remove module qualifiers in a type, respectively.
When Curry type expression are converted with toType
or toTypes
,
type variables are assigned ascending indices in the order of their
occurrence. It is possible to pass a list of additional type variables
to both functions which are assigned indices before those variables
occurring in the type. This allows preserving the order of type variables
in the left hand side of a type declaration.
Documentation
toQualType :: ModuleIdent -> [Ident] -> TypeExpr -> Type Source #
toQualTypes :: ModuleIdent -> [Ident] -> [TypeExpr] -> [Type] Source #
toQualPred :: ModuleIdent -> [Ident] -> Constraint -> Pred Source #
toQualPredSet :: ModuleIdent -> [Ident] -> Context -> PredSet Source #
toPredType :: [Ident] -> QualTypeExpr -> PredType Source #
toQualPredType :: ModuleIdent -> [Ident] -> QualTypeExpr -> PredType Source #
toMethodType :: QualIdent -> Ident -> QualTypeExpr -> PredType Source #
fromQualType :: ModuleIdent -> [Ident] -> Type -> TypeExpr Source #
fromQualPred :: ModuleIdent -> [Ident] -> Pred -> Constraint Source #
fromQualPredSet :: ModuleIdent -> [Ident] -> PredSet -> Context Source #
fromPredType :: [Ident] -> PredType -> QualTypeExpr Source #
fromQualPredType :: ModuleIdent -> [Ident] -> PredType -> QualTypeExpr Source #
ppPredType :: ModuleIdent -> PredType -> Doc Source #
ppTypeScheme :: ModuleIdent -> TypeScheme -> Doc Source #