Skip to content

DataKinds and Nat singletons #29

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

Closed
acowley opened this issue Jan 22, 2014 · 1 comment
Closed

DataKinds and Nat singletons #29

acowley opened this issue Jan 22, 2014 · 1 comment
Assignees

Comments

@acowley
Copy link
Collaborator

acowley commented Jan 22, 2014

If we have {-# LANGUAGE DataKinds #-} we might use Nat literals in types.

foo :: V 8 a
foo = bar

The type here gets a reddish highlight in emacs for me, and gives me a sum-node-start: Wrong type argument: markers, nil message. Similar code in a much larger whole gives shm a lot of trouble.

@chrisdone
Copy link
Member

Yeah, running M-x shm/test-exe yields: Parse error: 8 HSE doesn't know how to parse this extension yet: haskell-suite/haskell-src-exts#19 The proper fix is to update HSE. That's the bad news. The good news is there's a pull request for DataKinds support: haskell-suite/haskell-src-exts#58 So you could try installing that and then re-build structured-haskell-mode with the smarter parser.

I did in the early phases try to use the GHC parser, but the AST in there is full of _|_ traps that makes it very difficult to safely traverse generically.

@ghost ghost assigned chrisdone Jan 22, 2014
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

2 participants