Idris-dev icon indicating copy to clipboard operation
Idris-dev copied to clipboard

:let fails on infix specifications

Open david-christiansen opened this issue 12 years ago • 4 comments

Idris> :let infixr 7 <==|
src/Idris/REPL.hs:(681,3)-(692,50): Non-exhaustive patterns in function defineName

Idris> :let infixr 7 @@@
src/Idris/REPL.hs:(681,3)-(692,50): Non-exhaustive patterns in function defineName

david-christiansen avatar Jul 23 '14 14:07 david-christiansen

Also fails on: :let instance Functor id where { map f x = f x }

david-christiansen avatar Jul 23 '14 20:07 david-christiansen

My initial implementation of :let was kind of incomplete; I foolishly assumed that no one would want to define a class, instance, or infix declaration at the repl, among other things.

I'm trying to make it work for every kind of declaration, even the ones that don't seem worthwhile to me, but it's proving more difficult than I anticipated. As a first step, I should at least be able to catch those errors and print a message in the REPL instead of falling all the way back to haskell.

trillioneyes avatar Jul 24 '14 22:07 trillioneyes

#1428 should fix both of the named issues, though it's not as complete or robust as I might like.

trillioneyes avatar Jul 25 '14 00:07 trillioneyes

This is fixed now!

david-christiansen avatar Oct 04 '14 16:10 david-christiansen