unison icon indicating copy to clipboard operation
unison copied to clipboard

Closing brackets is optional when it should give a syntax error in ucm

Open bgerm opened this issue 3 years ago • 2 comments

The following throws an error (which could probably be improved):

  I couldn't find any definitions matching the name > inside the namespace .exercism.blah

     34 | > [1, 2, 3
> [1, 2, 3

But a missing bracket on the code below oddly works:

> findFewestCoins [2,5,10,20,50] 21 === Some [2,2,2,5,10

    33 | > findFewestCoins [2,5,10,20,50] 21 === Some [2,2,2,5,10
           ⧩
           false

bgerm avatar Jul 28 '22 22:07 bgerm

This was regarded as "actually a feature" as of Dec. 2020, but not with strong feelings in either direction: https://github.com/unisonweb/unison/issues/1776

mitchellwrosen avatar Jul 28 '22 22:07 mitchellwrosen

Thanks. I should have searched the issues first. Personally, it doesn't bother me that it worked without the trailing ], but if I were to ever copy code from the ucm > prompt -- I don't know exactly what that's called -- to the main code, I'd expect it to work the same (which it may, but didn't check).

bgerm avatar Jul 28 '22 22:07 bgerm