Commit 8f20684f authored by John van Groningen's avatar John van Groningen
Browse files

Merge branch '43-runtime-error-in-the-compiler' into 'master'

Prevent runtime error on illegal type arguments in generic function definitions

Closes #43

See merge request clean-compiler-and-rts/compiler!5
parents 8ff09d11 f432f362
......@@ -586,6 +586,9 @@ where
wantGenericFunctionDefinition name pos pState
//# (type, pState) = wantType pState
# (ok, {at_type=type}, pState) = trySimpleType TA_None pState
| not ok
# pState = parseError "type argument" No "type constructor" pState
= (False, abort "no TypeCons", pState)
# (ident, pState) = stringToIdent name (IC_GenericCase type) pState
# (generic_ident, pState) = stringToIdent name IC_Generic pState
# (type_cons, pState) = get_type_cons 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