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

list = listLike? #32

Closed
tomjaguarpaw opened this issue Feb 12, 2017 · 3 comments
Closed

list = listLike? #32

tomjaguarpaw opened this issue Feb 12, 2017 · 3 comments

Comments

@tomjaguarpaw
Copy link
Contributor

Wouldn't it be nicer to have list = listLike?

https://github.com/ollef/Earley/blob/master/Text/Earley/Derived.hs#L29

@ollef
Copy link
Owner

ollef commented Feb 13, 2017

You're right, it probably would!

Can we think of any situations where this would lead to bad type inference?

@phadej
Copy link
Collaborator

phadej commented Feb 13, 2017

@ollef no, it's about changing the definition of list, the type-signature would stay the same (i.e. specific). IIRC we left list especially for the case where some ListLike was produced, to avoid annotating the intermediate type in show . read like situations.

@ollef
Copy link
Owner

ollef commented Feb 13, 2017

Ah, then I misunderstood. Making this change without changing the type signature is uncontroversial. :)

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

3 participants