RFC: New version of haskell-src-exts without simplified AST

Dear all, For several months I have had a branch of haskell-src-exts which has been updated for all the new features in GHC 8. However, I have not yet released the changes as in this version I also removed the simplified AST. To those unfamiliar, HSE provides two ASTs, one which has source locations and one which doesn't. I have removed the one which doesn't. This simplifies maintenance and I think also makes the library easier to use. I have held back releasing this version as there are some people who use the simplified AST. The changes necessary for the new version are mechanical and easy to make. For example, David Fox updated haskell-names to use my branch [1] with few problems. The question is, are there any users of the library who object to this change? Matt [1]: https://github.com/haskell-suite/haskell-names/pull/73

This sounds good to me, it is pretty awkward to have both representations, especially since they have diverged. It will also help the overlong compile time. One question: Will you still be able pretty print if you remove the annotations? - Adam On Wed, Jul 20, 2016 at 3:09 PM, Matthew Pickering < matthewtpickering@gmail.com> wrote:
Dear all,
For several months I have had a branch of haskell-src-exts which has been updated for all the new features in GHC 8.
However, I have not yet released the changes as in this version I also removed the simplified AST. To those unfamiliar, HSE provides two ASTs, one which has source locations and one which doesn't. I have removed the one which doesn't.
This simplifies maintenance and I think also makes the library easier to use.
I have held back releasing this version as there are some people who use the simplified AST. The changes necessary for the new version are mechanical and easy to make. For example, David Fox updated haskell-names to use my branch [1] with few problems.
The question is, are there any users of the library who object to this change?
Matt
[1]: https://github.com/haskell-suite/haskell-names/pull/73 _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

Yes, I ported the pretty printer to work with the annotated tree but
ignore the annotations.
Matt
On Sat, Jul 23, 2016 at 2:57 PM, Adam Bergmark
This sounds good to me, it is pretty awkward to have both representations, especially since they have diverged. It will also help the overlong compile time.
One question: Will you still be able pretty print if you remove the annotations?
- Adam
On Wed, Jul 20, 2016 at 3:09 PM, Matthew Pickering
wrote: Dear all,
For several months I have had a branch of haskell-src-exts which has been updated for all the new features in GHC 8.
However, I have not yet released the changes as in this version I also removed the simplified AST. To those unfamiliar, HSE provides two ASTs, one which has source locations and one which doesn't. I have removed the one which doesn't.
This simplifies maintenance and I think also makes the library easier to use.
I have held back releasing this version as there are some people who use the simplified AST. The changes necessary for the new version are mechanical and easy to make. For example, David Fox updated haskell-names to use my branch [1] with few problems.
The question is, are there any users of the library who object to this change?
Matt
[1]: https://github.com/haskell-suite/haskell-names/pull/73 _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

I have released a new version, 1.18.
https://hackage.haskell.org/package/haskell-src-exts-1.18.0
If anyone has any problems after upgrading then please send me an
email or post an issue on the issue tracker.
Matt
On Sat, Jul 23, 2016 at 3:10 PM, Matthew Pickering
Yes, I ported the pretty printer to work with the annotated tree but ignore the annotations.
Matt
On Sat, Jul 23, 2016 at 2:57 PM, Adam Bergmark
wrote: This sounds good to me, it is pretty awkward to have both representations, especially since they have diverged. It will also help the overlong compile time.
One question: Will you still be able pretty print if you remove the annotations?
- Adam
On Wed, Jul 20, 2016 at 3:09 PM, Matthew Pickering
wrote: Dear all,
For several months I have had a branch of haskell-src-exts which has been updated for all the new features in GHC 8.
However, I have not yet released the changes as in this version I also removed the simplified AST. To those unfamiliar, HSE provides two ASTs, one which has source locations and one which doesn't. I have removed the one which doesn't.
This simplifies maintenance and I think also makes the library easier to use.
I have held back releasing this version as there are some people who use the simplified AST. The changes necessary for the new version are mechanical and easy to make. For example, David Fox updated haskell-names to use my branch [1] with few problems.
The question is, are there any users of the library who object to this change?
Matt
[1]: https://github.com/haskell-suite/haskell-names/pull/73 _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

On Wed, Jul 20, 2016 at 02:09:13PM +0100, Matthew Pickering wrote:
HSE provides two ASTs, one which has source locations and one which doesn't. I have removed the one which doesn't.
I haven't been following very closely, but can I ask what the use case was for the one which did not have source locations? Is it just to avoid filling in/ignoring a dummy () parameter when constructing/destructing respectively?

Old versions of HSE only had the un-annotated version so perhaps the annotations were added in separate types to avoid breaking changes. On Sun, Jul 31, 2016 at 1:52 PM, Tom Ellis < tom-lists-haskell-cafe-2013@jaguarpaw.co.uk> wrote:
On Wed, Jul 20, 2016 at 02:09:13PM +0100, Matthew Pickering wrote:
HSE provides two ASTs, one which has source locations and one which doesn't. I have removed the one which doesn't.
I haven't been following very closely, but can I ask what the use case was for the one which did not have source locations? Is it just to avoid filling in/ignoring a dummy () parameter when constructing/destructing respectively? _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

I'm not sure. I think it was mostly a historical artifact. Originally there was only the simplified AST, at some point the AST was augmented with source locations but the simplified tree was not removed for backwards compatability. Some of the library still operated on the old simpler AST such as the pretty printer but now everything is ported over. Matt On 31 Jul 2016 12:52 p.m., "Tom Ellis" < tom-lists-haskell-cafe-2013@jaguarpaw.co.uk> wrote:
On Wed, Jul 20, 2016 at 02:09:13PM +0100, Matthew Pickering wrote:
HSE provides two ASTs, one which has source locations and one which doesn't. I have removed the one which doesn't.
I haven't been following very closely, but can I ask what the use case was for the one which did not have source locations? Is it just to avoid filling in/ignoring a dummy () parameter when constructing/destructing respectively? _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

On Sun, Jul 31, 2016 at 01:07:46PM +0100, Matthew Pickering wrote:
I'm not sure. I think it was mostly a historical artifact. Originally there was only the simplified AST, at some point the AST was augmented with source locations but the simplified tree was not removed for backwards compatability. Some of the library still operated on the old simpler AST such as the pretty printer but now everything is ported over.
Good work getting rid of the old stuff then!
participants (3)
-
Adam Bergmark
-
Matthew Pickering
-
Tom Ellis