• ian@well-typed.com's avatar
    Remove commented types in module export lists · fda30027
    ian@well-typed.com authored
    These comments are rather less useful now that haddock can give docs
    with the same informatino in the module synopsis.
    
    Having to maintain them when making changes to the library is a pain,
    and when people forget about doing so there is nothing that checks that
    the comments are right, so mistakes tend to linger.
    
    Of the comments that my script detected, 78 of 684 were already
    incorrect in one way or another, e.g. missing context:
        Text.Show.showsPrec
        Comment type: Int -> a -> ShowS
        Actual type:  Show a => Int -> a -> ShowS
    wrong context:
        Numeric.readInt
        Comment type: Integral a => a -> (Char -> Bool) -> (Char -> Int) -> ReadS a
        Actual type:  Num a => a -> (Char -> Bool) -> (Char -> Int) -> ReadS a
    not following a class change (e.g. Num losing its Eq superclass):
        Text.Read.Lex.readOctP
        Comment type: Num a => ReadP a
        Actual type:  (Eq a, Num a) => ReadP a
    not following the Exceptions change:
        GHC.Conc.childHandler
        Comment type: Exception -> IO ()
        Actual type:  SomeException -> IO ()
    or just always been wrong:
        GHC.Stable.deRefStablePtr
        Comment type: StablePtr a -> a
        Actual type:  StablePtr a -> IO a
    fda30027
Ptr.hs 4.02 KB