aboutsummaryrefslogtreecommitdiff
path: root/frontend/syntax.dcl
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/syntax.dcl')
-rw-r--r--frontend/syntax.dcl23
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