unisonweb/unison

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

bgerm opened this issue · 2 comments

bgerm commented

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

This was regarded as "actually a feature" as of Dec. 2020, but not with strong feelings in either direction: #1776

bgerm commented

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).