From e4f5cdc1de5411260dd9bd37c54839c1a83b492f Mon Sep 17 00:00:00 2001 From: ronny Date: Tue, 25 Feb 2003 10:40:45 +0000 Subject: fixed bug 8, incorrect parsing of dynamic id :: (A.a: a->a) git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1323 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d --- frontend/parse.icl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'frontend') diff --git a/frontend/parse.icl b/frontend/parse.icl index aa07de3..f008f38 100644 --- a/frontend/parse.icl +++ b/frontend/parse.icl @@ -2442,9 +2442,15 @@ determAttr attr1 attr2 type pState wantDynamicType :: !*ParseState -> *(!DynamicType,!*ParseState) wantDynamicType pState - # (type_vars, pState) = optionalUniversalQuantifiedVariables pState - (type, pState) = want pState + # (type, pState) = want pState + # (type_vars, type) = split_vars_and_type type = ({ dt_uni_vars = type_vars, dt_type = type, dt_global_vars = [] }, pState) +where + split_vars_and_type :: AType -> ([ATypeVar], AType) + split_vars_and_type atype=:{at_type=TFA vars type} + = (vars, {atype & at_type=type}) + split_vars_and_type atype + = ([], atype) optionalExistentialQuantifiedVariables :: !*ParseState -> *(![ATypeVar],!*ParseState) optionalExistentialQuantifiedVariables pState -- cgit v1.2.3