iproute icon indicating copy to clipboard operation
iproute copied to clipboard

Redundant constraint warnings.

Open greydot opened this issue 8 years ago • 0 comments

GHC 8.0.1 prints these:

/home/user/iproute/Data/IP/Op.hs:121:1: warning: [-Wredundant-constraints]
    * Redundant constraint: Addr a
    * In the type signature for:
           addrRangePair :: Addr a => AddrRange a -> (a, Int)
[5 of 8] Compiling Data.IP.Internal ( Data/IP/Internal.hs, .stack-work/dist/i386-linux/Cabal-1.24.0.0/build/Data/IP/Internal.o )
[6 of 8] Compiling Data.IP.RouteTable.Internal ( Data/IP/RouteTable/Internal.hs, .stack-work/dist/i386-linux/Cabal-1.24.0.0/build/Data/IP/RouteTable/Internal.o )

/home/user/iproute/Data/IP/RouteTable/Internal.hs:103:1: warning: [-Wredundant-constraints]
    * Redundant constraint: Routable k
    * In the type signature for:
           empty :: Routable k => IPRTable k a

/home/user/iproute/Data/IP/RouteTable/Internal.hs:187:1: warning: [-Wredundant-constraints]
    * Redundant constraint: Routable k
    * In the type signature for:
           node :: Routable k =>
                   AddrRange k
                   -> k -> Maybe a -> IPRTable k a -> IPRTable k a -> IPRTable k a

/home/user/iproute/Data/IP/RouteTable/Internal.hs:271:1: warning: [-Wredundant-constraints]
    * Redundant constraint: Routable k
    * In the type signature for:
           Data.IP.RouteTable.Internal.toList :: Routable k =>
                                                 IPRTable k a -> [(AddrRange k, a)]

IMO the best way would be just to add -Wno-redundant-constraints to builds flags.

greydot avatar Oct 07 '16 01:10 greydot