megaparsec 6 migration

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

megaparsec 6 migration

joshchia
I'm trying to migrate my codebase from megaparsec 5 to megaparsec 6.

There appears to be major changes. For example, Text.Megaparsec.String.Parser & Text.Megaparsec.Error.Dec have both disappeared.

I'm sure I could slowly plod through the new documentation, figure out the types and figure out how to migrate the code on my own, but examples & tutorials would be more time-efficient.

Are there examples or tutorials compatible with megaparsec 6? For a start, what should I do with the above two things that have 'disappeared'? What do I replace them with?

Josh

_______________________________________________
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.
Reply | Threaded
Open this post in threaded view
|

Re: megaparsec 6 migration

Ara Adkins
Hey Josh,

I found it pretty useful to just have a read of the changelog [1] when migrating from Megaparsec 5 to 6. I don’t know of any in-depth updated tutorials, but if you’re familiar enough with Megaparsec the changelog should provide the detail you need. 

It took me around an hour to update a serious parser that I maintain, so the changes aren’t overly inconvenient. 

I hope that helps. 

_ara


On 25 Aug 2017, at 04:26, ☂Josh Chia (謝任中) <[hidden email]> wrote:

I'm trying to migrate my codebase from megaparsec 5 to megaparsec 6.

There appears to be major changes. For example, Text.Megaparsec.String.Parser & Text.Megaparsec.Error.Dec have both disappeared.

I'm sure I could slowly plod through the new documentation, figure out the types and figure out how to migrate the code on my own, but examples & tutorials would be more time-efficient.

Are there examples or tutorials compatible with megaparsec 6? For a start, what should I do with the above two things that have 'disappeared'? What do I replace them with?

Josh
_______________________________________________
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.

_______________________________________________
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.
Reply | Threaded
Open this post in threaded view
|

Re: megaparsec 6 migration

Simon Michael
In reply to this post by joshchia
On 8/24/17 8:26 PM, ☂Josh Chia (謝任中) wrote:
> Are there examples or tutorials compatible with megaparsec 6? For a start,
> what should I do with the above two things that have 'disappeared'? What do
> I replace them with?
Hi Josh,

Here's a Text.Megaparsec.Compat
<https://github.com/simonmichael/hledger/blob/d7d5f8a0645c558b62a16542056739b520b39641/hledger-lib/Text/Megaparsec/Compat.hs>
module, useful for supporting megaparsec <6 and >=6.

https://github.com/fpco/stackage/issues/2666#issuecomment-318538839



_______________________________________________
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.