Skip to content

Regression in 9.4.1 (alpha2): unused-top-binds reported for used functions (RecursiveDo)

GHC 9.4.0.20220523 wrongly reports Defined but not used for functions that are actually used:

$ cabal install regex-tdfa --allow-newer=regex-tdfa:base

[15 of 25] Compiling Text.Regex.TDFA.CorePattern ( lib/Text/Regex/TDFA/CorePattern.hs, ... )

lib/Text/Regex/TDFA/CorePattern.hs:200:1: error: [-Wunused-top-binds, -Werror=unused-top-binds]
    Defined but not used: ‘mergeNullViews’
    |
200 | mergeNullViews s1 s2 = cleanNullView $ do
    | ^^^^^^^^^^^^^^

lib/Text/Regex/TDFA/CorePattern.hs:208:1: error: [-Wunused-top-binds, -Werror=unused-top-binds]
    Defined but not used: ‘seqTake’
    |
208 | seqTake (x1,y1) (x2,y2) = (x1+x2,liftM2 (+) y1 y2)
    | ^^^^^^^

(Deleting one of these results in a not-in-scope error.)

Edited by Andreas Abel
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information