yav / haskell-lexer

A fully compliant Haskell 98 lexer.
MIT License
15 stars 7 forks source link

Eliminate warnings #10

Closed andreasabel closed 2 years ago

andreasabel commented 2 years ago

E.g. with GHC-9.2.1:

[5 of 6] Compiling Language.Haskell.Lexer.Lex ( Language/Haskell/Lexer/Lex.hs, dist/build/Language/Haskell/Lexer/Lex.o )

Language/Haskell/Lexer/Lex.hs:122:5: warning: [-Wname-shadowing]
    This binding for ‘c’ shadows the existing binding
      bound at Language/Haskell/Lexer/Lex.hs:19:8
    |
122 |     c | isAscii c -> 0
    |     ^

Language/Haskell/Lexer/Lex.hs:131:26: warning: [-Wname-shadowing]
    This binding for ‘is’ shadows the existing binding
      bound at Language/Haskell/Lexer/Lex.hs:131:8
    |
131 | start1 is = state1 (\ as is -> gotError as is) "" is
    |                          ^^

Language/Haskell/Lexer/Lex.hs:133:8: warning: [-Wunused-matches]
    Defined but not used: ‘err’
    |
133 | state1 err as [] = gotEOF as
    |        ^^^

There are gazillion of these warnings...

andreasabel commented 2 years ago

Fixed by #11.