Skip to content

Fix #1700, remove featureRemoved calls in parser (for 0.8)#1707

Merged
paf31 merged 1 commit into
masterfrom
1700
Dec 15, 2015
Merged

Fix #1700, remove featureRemoved calls in parser (for 0.8)#1707
paf31 merged 1 commit into
masterfrom
1700

Conversation

@paf31

@paf31 paf31 commented Dec 12, 2015

Copy link
Copy Markdown
Contributor

This removes the deprecation errors for features broken in 0.7.*.

@garyb

garyb commented Dec 12, 2015

Copy link
Copy Markdown
Member

👍

@hdgarrood

Copy link
Copy Markdown
Contributor

Could we consider leaving in some form of these checks? I think it's probably right that the error should not say "this feature is from an old version of the compiler" any more, but I think it's plausible that Haskellers will use the Haskell list syntax by accident, for example.

@paf31

paf31 commented Dec 12, 2015

Copy link
Copy Markdown
Contributor Author

I agree, but can we deal with that in documentation instead? There are lots of basic syntactic features of Haskell which we don't support, but we shouldn't parse them all (tuples, nameless instances, infix function declarations etc.). If we did, we might as well just use haskell-src-exts.

@hdgarrood

Copy link
Copy Markdown
Contributor

Ok, fair enough. I don't really know how awkward it is inside the compiler, perhaps I ought to try implementing it first ;)

Personally, I would like it if the compiler could provide nicer errors for some or all of these things. Although maybe having Haskell-style special cases is the wrong approach. What about, when a parse error occurs, we could try to guess which syntactic construct the user was really after, and then give a small example of a valid version of that construct in the error? eg, "It looks like you wanted to define an instance; here's what they look like:"?

@paf31

paf31 commented Dec 12, 2015

Copy link
Copy Markdown
Contributor Author

What about, when a parse error occurs, we could try to guess which syntactic construct the user was really after, and then give a small example of a valid version of that construct in the error?

I think that makes a lot of sense, at least for top-level constructs where things tend to be introduced by an eagerly-matched keyword (data, instance, class, infix etc.)

@paf31

paf31 commented Dec 13, 2015

Copy link
Copy Markdown
Contributor Author

This is rebased, and good to merge. I'd probably prefer to defer the parser changes to 0.9, since there are a bunch of other parser improvements which can be made in the same general category of "parser X uses try too much".

@paf31

paf31 commented Dec 15, 2015

Copy link
Copy Markdown
Contributor Author

I'll merge then, yes?

@garyb

garyb commented Dec 15, 2015

Copy link
Copy Markdown
Member

Sure thing 👍

paf31 added a commit that referenced this pull request Dec 15, 2015
Fix #1700, remove featureRemoved calls in parser (for 0.8)
@paf31 paf31 merged commit 4b144d6 into master Dec 15, 2015
@paf31

paf31 commented Dec 15, 2015

Copy link
Copy Markdown
Contributor Author

Ok, thanks.

@paf31 paf31 deleted the 1700 branch December 15, 2015 01:32
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

Successfully merging this pull request may close these issues.

3 participants