Closed IgorErin closed 8 months ago
The generated code is not entirely warning-free. In the test-suite we suppress some warnings, one of them is about unused imports: https://github.com/haskell/alex/blob/24d786c26f97d60251c9883dd79ba01cd5d664be/tests/Makefile#L42
Maybe making the code actually warning-free is too much effort. A proper solution would be to make a DSL for lexers in Haskell, generate DSL code, extract import from this code, and then translate this into actual haskell. However, the current implementation spits out Haskell directly and isn't suitable for introspection.
I suppose we could suppress these warnings with {-# OPTIONS_GHC -Wno-<WarningName> #-}
pragmas put into the generated code.
I suppose fixing this minor issue does not warrant a release, does it? The issue would then be fixed in the next regular release.
I get the following warning when using
basic-bytestring
, In this code.As far as I understand, this is a generated import. Is this how it should be, or am I doing something wrong?