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

Whitespace sensitive parsing of local definitions (type-ascribing let) #150

Open
ohad opened this issue Nov 6, 2019 · 0 comments
Open

Comments

@ohad
Copy link

ohad commented Nov 6, 2019

Might be related to #113 .

Steps to Reproduce

$ cat Bar.idr 
X : Nat
X = let a : Nat
        a = 0
        in a
$ idris2 -c Bar.idr 

Expected Behavior

1/1: Building Bar2 (Bar.idr)
$

Observed Behavior

Bar.idr:4:9--4:9:Parse error: Couldn't parse declaration (next tokens: [in, identifier a, end of input])

If we dis-indent the in keyword, it parses fine:

$ cat Bar2.idr 
X : Nat
X = let a : Nat
        a = 0
       in a
$ idris2 -c Bar2.idr 
1/1: Building Bar2 (Bar2.idr)
$
@ohad ohad changed the title Whitespace sensitive parsin of local definitions (type-ascribing let) Whitespace sensitive parsing of local definitions (type-ascribing let) Nov 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant