hets -- a heterogenous Specification (CASL) tool set
Contents
Index
HasCASL.TypeDecl
Portability
portable
Stability
provisional
Maintainer
hets@tzi.de
Description
analyse type decls
Synopsis
addSuperType
::
Type
->
Id
->
State
Env
()
idsToTypePatterns
:: [
Maybe
(
Id
, [
TypeArg
])] -> [
TypePattern
]
anaFormula
::
GlobalAnnos
->
Annoted
Term
->
State
Env
(
Maybe
(
Annoted
Term
))
anaVars
::
Vars
->
Type
->
Result
[
VarDecl
]
mapAnMaybe
::
Monad
m => (a -> m (
Maybe
b)) -> [
Annoted
a] -> m [
Annoted
b]
anaTypeItems
::
GlobalAnnos
->
GenKind
->
Instance
-> [
Annoted
TypeItem
] ->
State
Env
[
Annoted
TypeItem
]
ana1TypeItem
::
TypeItem
->
State
Env
(
Maybe
TypeItem
)
anaTypeItem
::
GlobalAnnos
->
GenKind
->
Instance
-> [(
Id
,
Type
)] ->
TypeItem
->
State
Env
TypeItem
ana1Datatype
::
DatatypeDecl
->
State
Env
(
Maybe
DatatypeDecl
)
dataPatToType
::
DatatypeDecl
-> (
Id
,
Type
)
anaDatatype
::
GenKind
->
Instance
-> [(
Id
,
Type
)] ->
DatatypeDecl
->
State
Env
DatatypeDecl
anaPseudoType
::
Maybe
Kind
->
TypeScheme
->
State
Env
(
Kind
,
Maybe
TypeScheme
)
addTypePattern
::
TypeDefn
->
Instance
->
Kind
-> (
Id
, [
TypeArg
]) ->
State
Env
(
Maybe
(
Id
, [
TypeArg
]))
typeArgsListToKind
:: [
TypeArg
] ->
Kind
->
Kind
convertTypePatterns
:: [
TypePattern
] ->
Result
[(
Id
, [
TypeArg
])]
illegalTypePattern
::
TypePattern
->
Result
a
illegalTypePatternArg
::
TypePattern
->
Result
a
convertTypePattern
::
TypePattern
->
Result
(
Id
, [
TypeArg
])
convertToTypeArg
::
TypePattern
->
Result
TypeArg
Documentation
addSuperType
::
Type
->
Id
->
State
Env
()
add a supertype to a given type id
idsToTypePatterns
:: [
Maybe
(
Id
, [
TypeArg
])] -> [
TypePattern
]
anaFormula
::
GlobalAnnos
->
Annoted
Term
->
State
Env
(
Maybe
(
Annoted
Term
))
anaVars
::
Vars
->
Type
->
Result
[
VarDecl
]
mapAnMaybe
::
Monad
m => (a -> m (
Maybe
b)) -> [
Annoted
a] -> m [
Annoted
b]
anaTypeItems
::
GlobalAnnos
->
GenKind
->
Instance
-> [
Annoted
TypeItem
] ->
State
Env
[
Annoted
TypeItem
]
ana1TypeItem
::
TypeItem
->
State
Env
(
Maybe
TypeItem
)
anaTypeItem
::
GlobalAnnos
->
GenKind
->
Instance
-> [(
Id
,
Type
)] ->
TypeItem
->
State
Env
TypeItem
analyse a
TypeItem
ana1Datatype
::
DatatypeDecl
->
State
Env
(
Maybe
DatatypeDecl
)
dataPatToType
::
DatatypeDecl
-> (
Id
,
Type
)
anaDatatype
::
GenKind
->
Instance
-> [(
Id
,
Type
)] ->
DatatypeDecl
->
State
Env
DatatypeDecl
analyse a
DatatypeDecl
anaPseudoType
::
Maybe
Kind
->
TypeScheme
->
State
Env
(
Kind
,
Maybe
TypeScheme
)
analyse a pseudo type (represented as a
TypeScheme
)
addTypePattern
::
TypeDefn
->
Instance
->
Kind
-> (
Id
, [
TypeArg
]) ->
State
Env
(
Maybe
(
Id
, [
TypeArg
]))
add a type pattern
typeArgsListToKind
:: [
TypeArg
] ->
Kind
->
Kind
extent a kind to expect further type arguments
convertTypePatterns
:: [
TypePattern
] ->
Result
[(
Id
, [
TypeArg
])]
convert type patterns
illegalTypePattern
::
TypePattern
->
Result
a
illegalTypePatternArg
::
TypePattern
->
Result
a
convertTypePattern
::
TypePattern
->
Result
(
Id
, [
TypeArg
])
convert a
TypePattern
convertToTypeArg
::
TypePattern
->
Result
TypeArg
Produced by
Haddock
version 0.6