diff options
author | johnvg | 2013-04-05 10:57:06 +0000 |
---|---|---|
committer | johnvg | 2013-04-05 10:57:06 +0000 |
commit | a7083ad440038885abc539480b608064524e854c (patch) | |
tree | 8f5a20f67f264da9a1550a6582d7703788e44590 /frontend/syntax.dcl | |
parent | add type StringPos (from iTask branch) (diff) |
change type GenericCaseDef, add types GenericCaseFunctions and GCF
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2224 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend/syntax.dcl')
-rw-r--r-- | frontend/syntax.dcl | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/frontend/syntax.dcl b/frontend/syntax.dcl index 24d77ec..688887d 100644 --- a/frontend/syntax.dcl +++ b/frontend/syntax.dcl @@ -432,17 +432,24 @@ cNameLocationDependent :== True | TypeConsArrow | TypeConsVar TypeVar -:: GenericCaseDef = - { gc_ident :: !Ident // name in IC_GenricCase namespace - , gc_gident :: !Ident // name in IC_Generic namespace - , gc_generic :: !GlobalIndex // index of the generic - , gc_arity :: !Int // arity of the function - , gc_pos :: !Position // position in the source file +:: GenericCaseDef = + { gc_pos :: !Position // position in the source file , gc_type :: !Type // the instance type , gc_type_cons :: !TypeCons // type constructor of the type argument - , gc_body :: !GenericCaseBody // the body function or NoIndex - , gc_kind :: !TypeKind // kind of the instance type + , gc_gcf :: !GenericCaseFunctions } + +:: GenericCaseFunctions + = GCF !Ident !GCF + +:: GCF = { + gcf_gident :: !Ident, // name in IC_GenricCase namespace + gcf_generic :: !GlobalIndex, // index of the generic + gcf_arity :: !Int, // arity of the function + gcf_body :: !GenericCaseBody, // the body function or NoIndex + gcf_kind :: !TypeKind // kind of the instance type + } + :: GenericCaseBody = GCB_None // to be generated | GCB_FunIndex !Index |