alpaca
alpaca copied to clipboard
Defining the function (>>) does not yield a helpful error
Given:
module m
let (>>) f g x =
g (f x)
The Alpaca compiler will crash in alpaca_scanner:infer_breaks/1
with a bad match here because inferring breaks tracks whether or not the procedure is inside a binary expression.
Expected: at minimum, a syntax error as we see when defining the function (<<)
though perhaps the ideal is to say "this is not legal for use outside a binary expression" or something like that. Maybe we need a set of "symbols" like <<
, >>
, |
that are not permitted as function names?