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

type and data families aren't handled well #51

Open
dmwit opened this issue May 15, 2018 · 1 comment
Open

type and data families aren't handled well #51

dmwit opened this issue May 15, 2018 · 1 comment

Comments

@dmwit
Copy link

dmwit commented May 15, 2018

For the following Haskell file:

type family A
type instance B = C
data family D
data instance E = F

class G a where
	type H a
	data I a

instance J a where
	type K a = L
	data M a = N

I expect to find tags for A, B, D, E, F, G, H, I, J, K, M, and N (but not C or L). This is what I actually get:

B	test.hs	2
F	test.hs	4
G	test.hs	6
G	test.hs	6
H	test.hs	7
I	test.hs	8
family	test.hs	1
family	test.hs	3
instance	test.hs	2
instance	test.hs	4
instance	test.hs	10
@jhenahan
Copy link
Collaborator

Type families are utterly unsupported at the moment, but I’m hoping to revamp the current parsing code, which should give a little more flexibility for dealing with these. I’m fairly sure it just gives up after the word type, so I’ll have to add a case to handle the extra stuff.

Related: if I get around to playing with the GHC lexer, a version supporting only >8.4 should support these pretty immediately.

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