Commit 708e3f5d authored by johnvg@science.ru.nl's avatar johnvg@science.ru.nl
Browse files

in the parser remove arguments tryAA and attr from function tryAType (unused and always TA_None)

parent 297f8482
...@@ -2942,7 +2942,7 @@ wantType :: !ParseState -> (!Type,!ParseState) ...@@ -2942,7 +2942,7 @@ wantType :: !ParseState -> (!Type,!ParseState)
wantType pState wantType pState
# (vars, pState) = optionalUniversalQuantifiedVariables pState # (vars, pState) = optionalUniversalQuantifiedVariables pState
| isEmpty vars | isEmpty vars
# (succ, atype, pState) = tryAType False TA_None pState # (succ, atype, pState) = tryAType pState
(succ2, type, pState) = tryATypeToType atype pState (succ2, type, pState) = tryATypeToType atype pState
| succ&&succ2 | succ&&succ2
= (type, pState) = (type, pState)
...@@ -2955,7 +2955,7 @@ wantType pState ...@@ -2955,7 +2955,7 @@ wantType pState
wantAType :: !ParseState -> (!AType,!ParseState) wantAType :: !ParseState -> (!AType,!ParseState)
wantAType pState wantAType pState
# (succ, atype, pState) = tryAType True TA_None pState # (succ, atype, pState) = tryAType pState
| succ | succ
= (atype, pState) = (atype, pState)
= (atype, attributed_and_annotated_type_error pState) = (atype, attributed_and_annotated_type_error pState)
...@@ -2973,31 +2973,30 @@ attributed_and_annotated_type_error pState ...@@ -2973,31 +2973,30 @@ attributed_and_annotated_type_error pState
tryType :: !ParseState -> (!Bool,!Type,!ParseState) tryType :: !ParseState -> (!Bool,!Type,!ParseState)
tryType pState tryType pState
# (succ, atype, pState) = tryAType False TA_None pState # (succ, atype, pState) = tryAType pState
(succ2, type, pState) = tryATypeToType atype pState (succ2, type, pState) = tryATypeToType atype pState
= (succ&&succ2, type, pState) = (succ&&succ2, type, pState)
tryAType :: !Bool !TypeAttribute !ParseState -> (!Bool,!AType,!ParseState) tryAType :: !ParseState -> (!Bool,!AType,!ParseState)
tryAType tryAA attr pState tryAType pState
# (vars , pState) = optionalUniversalQuantifiedVariables pState # (vars , pState) = optionalUniversalQuantifiedVariables pState
# (types, pState) = parseList tryBrackAType pState # (types, pState) = parseList tryBrackAType pState
| isEmpty types | isEmpty types
| isEmpty vars | isEmpty vars
= (False, {at_attribute = attr, at_type = TE}, pState) = (False, {at_attribute = TA_None, at_type = TE}, pState)
// otherwise // PK // otherwise // PK
# (token, pState) = nextToken TypeContext pState # (token, pState) = nextToken TypeContext pState
= (False, {at_attribute = attr, at_type = TFA vars TE} = (False, {at_attribute = TA_None, at_type = TFA vars TE}
, parseError "annotated type" (Yes token) "type" (tokenBack pState)) , parseError "annotated type" (Yes token) "type" (tokenBack pState))
# (token, pState) = nextToken TypeContext pState # (token, pState) = nextToken TypeContext pState
| token == ArrowToken | token == ArrowToken
# (rtype, pState) = wantAType_strictness_ignored pState # (rtype, pState) = wantAType_strictness_ignored pState
atype = make_curry_type attr types rtype atype = make_curry_type TA_None types rtype
| isEmpty vars | isEmpty vars
= ( True, atype, pState) = ( True, atype, pState)
= ( True, { atype & at_type = TFA vars atype.at_type }, pState) = ( True, { atype & at_type = TFA vars atype.at_type }, pState)
// otherwise (not that types is non-empty) // otherwise (note that types is non-empty)
// Sjaak # (atype, pState) = convertAAType types TA_None (tokenBack pState)
# (atype, pState) = convertAAType types attr (tokenBack pState)
| isEmpty vars | isEmpty vars
= (True, atype, pState) = (True, atype, pState)
= (True, { atype & at_type = TFA vars atype.at_type }, pState) = (True, { atype & at_type = TFA vars atype.at_type }, pState)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment