Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use clauses below pretty-printed term does not parse, but use clauses above does parse #5412

Open
kylegoetz opened this issue Oct 16, 2024 · 1 comment
Labels

Comments

@kylegoetz
Copy link
Contributor

kylegoetz commented Oct 16, 2024

Describe and demonstrate the bug

branch here: https://share.unison-lang.org/@kylegoetz/finger-tree-bloated/code/@kylegoetz/parse-bug

You can either paste this in scratch or you can edit foldlWithPos and then add the use clauses beneath what the pretty printer dumps to the scratch:

``` unison
FingerTree.foldlWithPos : (b ->{g2} v ->{g1} a ->{g} b) -> b -> FingerTree v a -> b
FingerTree.foldlWithPos = todo ""

use FingerTree
use Digit
```

output is

``` umm
I got confused here:
  
      3 | FingerTree.foldlWithPos : (b ->{g2} v ->{g1} a ->{g} b) -> b -> FingerTree v a -> b
  
  
  I was surprised to find a ':' here.
  I was expecting one of these instead:
  
  * ability
  * bang
  * binding
  * do
  * false
  * force
  * [snip]
```

If you remove the use clauses from the bottom, scratch parses. If you move them to the top, scratch parses.

Environment (please complete the following information):

  • ucm --version 0.5.23
  • OS/Architecture: macOS 15.0.1, silicon
@kylegoetz kylegoetz added the bug label Oct 16, 2024
@kylegoetz
Copy link
Contributor Author

update: changed URL because I moved the project to a different project name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant