This commit is contained in:
Rik van der Kleij 2020-02-01 12:11:34 +01:00
parent 59d28aabcf
commit 8a41115958
2 changed files with 4 additions and 3 deletions

View File

@ -632,7 +632,7 @@ public class HaskellParser implements PsiParser, LightPsiParser {
}
/* ********************************************************** */
// (atype | TILDE | UNDERSCORE)+
// (atype | TILDE | UNDERSCORE | VERTICAL_BAR)+
static boolean btype(PsiBuilder b, int l) {
if (!recursion_guard_(b, l, "btype")) return false;
boolean r;
@ -647,13 +647,14 @@ public class HaskellParser implements PsiParser, LightPsiParser {
return r;
}
// atype | TILDE | UNDERSCORE
// atype | TILDE | UNDERSCORE | VERTICAL_BAR
private static boolean btype_0(PsiBuilder b, int l) {
if (!recursion_guard_(b, l, "btype_0")) return false;
boolean r;
r = atype(b, l + 1);
if (!r) r = consumeToken(b, HS_TILDE);
if (!r) r = consumeToken(b, HS_UNDERSCORE);
if (!r) r = consumeToken(b, HS_VERTICAL_BAR);
return r;
}

View File

@ -186,7 +186,7 @@ ttype2 ::= ("forall" | FORALL)? onl ttype (onl DOUBLE_RIGHT
ttype ::= "!"? (btype (oonls RIGHT_ARROW oonls ttype)* | list_type q_name* | LEFT_PAREN RIGHT_ARROW RIGHT_PAREN)
private btype ::= (atype | TILDE | UNDERSCORE)+ // generalization because left recursive is not supported and UNDERSCORE because of partial type signatures
private btype ::= (atype | TILDE | UNDERSCORE | VERTICAL_BAR)+ // generalization because left recursive is not supported and UNDERSCORE because of partial type signatures
simpletype ::= ttype | (q_name | LEFT_PAREN RIGHT_PAREN)+ |
q_name* oonls LEFT_PAREN q_name RIGHT_PAREN oonls q_name* |