haskell / alex

A lexical analyser generator for Haskell
https://hackage.haskell.org/package/alex
BSD 3-Clause "New" or "Revised" License
298 stars 82 forks source link

ghc 9.8 #247

Closed andreasabel closed 1 year ago

andreasabel commented 1 year ago

This addresses the -x-partial warning where feasible, using Data.List.NonEmpty. This is an incentive to move to GHC 8 which first had this module in base. Thus, GHC 7 will be dropped.

TODO:

Content:

Candidate at: https://hackage.haskell.org/package/alex-3.4.0.1/candidate Docs at: https://haskell-alex--247.org.readthedocs.build/en/247/

andreasabel commented 1 year ago

@Ericson2314 : If you want a quick look...

This PR raises to bar to build alex to GHC 8 for the sake of using Data.List.NonEmpty. The latter helps to properly address the new x-partial warnings for head and tail in GHC 9.8. On the way, I could get rid of pre-containers legacy modules (Set, Map, Sort). We are using containers already so this is not a big step. Not sure if anyone cares about GHC 7 builds. One could take an older version of alex if one wants to do archeology...

To commits are to be merged as such. I'll merge and release then...