fix issue with try in parser, improve parse error message
This commit is contained in:
14
tests/ErrMsg.newt
Normal file
14
tests/ErrMsg.newt
Normal file
@@ -0,0 +1,14 @@
|
||||
module ErrMsg
|
||||
|
||||
import Prelude
|
||||
|
||||
infixl 5 _$$_
|
||||
|
||||
_$$_ : Nat → (Nat → Nat) → Nat
|
||||
a $$ b = a + b a
|
||||
|
||||
-- Say something other than expected record
|
||||
-- Why do we get there? shouldn't the progress made by parseDef short circuit the <|>?
|
||||
blah : Nat → Nat
|
||||
blah x = x $$ $ \ y => y
|
||||
|
||||
6
tests/ErrMsg.newt.fail
Normal file
6
tests/ErrMsg.newt.fail
Normal file
@@ -0,0 +1,6 @@
|
||||
*** Process tests/ErrMsg.newt
|
||||
module Prelude
|
||||
module ErrMsg
|
||||
ERROR at tests/ErrMsg.newt:13:15--13:16: trailing operator
|
||||
|
||||
Compile failed
|
||||
Reference in New Issue
Block a user