haskell / alex

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

alex-3.2.5 and 3.2.4 fail to build with ghc-9.0 #179

Closed AndreasPK closed 3 years ago

AndreasPK commented 3 years ago
$ cabal install alex-3.2.5
Resolving dependencies...
Build profile: -w ghc-9.0.1 -O1
In order, the following will be built (use -v for more details):
 - alex-3.2.5 (exe:alex) (requires build)
Starting     alex-3.2.5 (exe:alex)
Building     alex-3.2.5 (exe:alex)

Failed to build exe:alex from alex-3.2.5.
Build log (
C:\Users\andi\AppData\Roaming\cabal\logs\ghc-9.0.1\alex-3.2.5-14697d18ccf5927c0744f859e0ac502c00fa0296.log
):
Preprocessing executable 'alex' for alex-3.2.5..
Building executable 'alex' for alex-3.2.5..
[ 1 of 22] Compiling Data.Ranged.Boundaries ( src\Data\Ranged\Boundaries.hs, dist\build\alex\alex-tmp\Data\Ranged\Boundaries.o )
[ 2 of 22] Compiling Data.Ranged.Ranges ( src\Data\Ranged\Ranges.hs, dist\build\alex\alex-tmp\Data\Ranged\Ranges.o )
[ 3 of 22] Compiling Data.Ranged.RangedSet ( src\Data\Ranged\RangedSet.hs, dist\build\alex\alex-tmp\Data\Ranged\RangedSet.o )

src\Data\Ranged\RangedSet.hs:31:1: warning: [-Wunused-imports]
    The import of ‘Data.Semigroup’ is redundant
      except perhaps to import instances from ‘Data.Semigroup’
    To import instances alone, use: import Data.Semigroup()
   |
31 | import Data.Semigroup
   | ^^^^^^^^^^^^^^^^^^^^^
[ 4 of 22] Compiling Data.Ranged      ( src\Data\Ranged.hs, dist\build\alex\alex-tmp\Data\Ranged.o )
[ 5 of 22] Compiling Map              ( src\Map.hs, dist\build\alex\alex-tmp\Map.o )
[ 6 of 22] Compiling Paths_alex       ( dist\build\alex\autogen\Paths_alex.hs, dist\build\alex\alex-tmp\Paths_alex.o )
[ 7 of 22] Compiling Set              ( src\Set.hs, dist\build\alex\alex-tmp\Set.o )
[ 8 of 22] Compiling DFS              ( src\DFS.hs, dist\build\alex\alex-tmp\DFS.o )
[ 9 of 22] Compiling Sort             ( src\Sort.hs, dist\build\alex\alex-tmp\Sort.o )
[10 of 22] Compiling UTF8             ( src\UTF8.hs, dist\build\alex\alex-tmp\UTF8.o )
[11 of 22] Compiling CharSet          ( src\CharSet.hs, dist\build\alex\alex-tmp\CharSet.o )
[12 of 22] Compiling Util             ( src\Util.hs, dist\build\alex\alex-tmp\Util.o )
[13 of 22] Compiling AbsSyn           ( src\AbsSyn.hs, dist\build\alex\alex-tmp\AbsSyn.o )
[14 of 22] Compiling ParseMonad       ( src\ParseMonad.hs, dist\build\alex\alex-tmp\ParseMonad.o )
[15 of 22] Compiling Scan             ( src\Scan.hs, dist\build\alex\alex-tmp\Scan.o )
[16 of 22] Compiling Parser           ( src\Parser.hs, dist\build\alex\alex-tmp\Parser.o )
[17 of 22] Compiling Output           ( src\Output.hs, dist\build\alex\alex-tmp\Output.o )
[18 of 22] Compiling NFA              ( src\NFA.hs, dist\build\alex\alex-tmp\NFA.o )
[19 of 22] Compiling Info             ( src\Info.hs, dist\build\alex\alex-tmp\Info.o )
[20 of 22] Compiling DFAMin           ( src\DFAMin.hs, dist\build\alex\alex-tmp\DFAMin.o )

src\DFAMin.hs:35:17: error:
    Suffix occurrence of @. For an as-pattern, remove the leading whitespace.
   |
35 | minimizeDFA  dfa@ DFA { dfa_start_states = starts,
   |                 ^
cabal.exe: Failed to build exe:alex from alex-3.2.5. See the build log above
for details.

It would be good to update the bounds to account for this.

Ericson2314 commented 3 years ago

You mean do Hackage revisions to the existing releases? Yes, I suppose that makes sense.

AndreasPK commented 3 years ago

I think that would be the best solution yes.

andreasabel commented 3 years ago

Can be done here: https://hackage.haskell.org/package/alex/maintain by any of the https://hackage.haskell.org/package/alex/maintainers/ (which are @Ericson2314 and @simonmar atm).

Ericson2314 commented 3 years ago

OK I edited the base bounds; that's the best mechanism we've got, right? Let me know if anything else needs to be done like revising older versions, and sorry for the delay!