diff options
author | martinw | 2001-01-19 10:51:27 +0000 |
---|---|---|
committer | martinw | 2001-01-19 10:51:27 +0000 |
commit | c043530c7fbc813aff2e5c919c2ae496d5229ad4 (patch) | |
tree | 9782403258abbba9bdf3f5b0533da4fd46b6f360 /frontend/type.dcl | |
parent | bugfixing dcl cashing, expanding synonym types after a whole module component (diff) |
uniqueness unification for types of functions that are generated
during the transformation phase
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@292 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend/type.dcl')
-rw-r--r-- | frontend/type.dcl | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/frontend/type.dcl b/frontend/type.dcl index 6049c37..383bfe0 100644 --- a/frontend/type.dcl +++ b/frontend/type.dcl @@ -4,4 +4,28 @@ import StdArray import syntax, check typeProgram ::!{! Group} !Int !*{# FunDef} !IndexRange !(Optional Bool) !CommonDefs ![Declaration] !{# DclModule} !NumberSet !*Heaps !*PredefinedSymbols !*File !*File - -> (!Bool, !*{# FunDef}, !IndexRange, {! GlobalTCType}, !{# CommonDefs}, !{# {# FunType} }, !*Heaps, !*PredefinedSymbols, !*File, !*File) + -> (!Bool, !*{# FunDef}, !IndexRange, {! GlobalTCType}, !{# CommonDefs}, !{# {# FunType} }, !.TypeDefInfos, !*Heaps, !*PredefinedSymbols, !*File, !*File) + +addPropagationAttributesToAType :: {#CommonDefs} !AType !*PropState -> *(!AType,Int,!*PropState); + +:: PropState = + { prop_type_heaps :: !.TypeHeaps + , prop_td_infos :: !.TypeDefInfos + , prop_attr_vars :: ![AttributeVar] + , prop_attr_env :: ![AttrInequality] + , prop_error :: !.Optional .ErrorAdmin + } + +class unify a :: !a !a !TypeInput !*{! Type} !*TypeHeaps -> (!Bool, !*{! Type}, !*TypeHeaps) + +instance unify AType + +:: TypeInput = + { ti_common_defs :: !{# CommonDefs } + , ti_functions :: !{# {# FunType }} + , ti_main_dcl_module_n :: !Int + } + +class arraySubst type :: !type !u:{!Type} -> (!type, !u:{! Type}) + +instance arraySubst AType |