[Haskell-cafe] Type alias in constraints

Tom Ellis tom-lists-haskell-cafe-2013 at jaguarpaw.co.uk
Fri Oct 14 17:31:36 UTC 2016


On Fri, Oct 14, 2016 at 07:25:40PM +0200, Sylvain Henry wrote:
> I have been using constraints of the form:
> 
> xxx :: forall x xs ys zs m.
>    ( Monad m
>    , zs ~ Union (Filter x xs) ys
>    , Catchable x xs
>    , Liftable (Filter x xs) zs
>    , Liftable ys zs
>    ) => Variant xs -> (x -> Flow m ys) -> Flow m zs
> 
> Where "zs" is used as a type alias. Now with GHC8 and
> -Wredundant-constraints, GHC complaints that "zs" is redundant
> (indeed it is).

Why is it redundant?  Surely a redundant constraint is one you can freely
remove.  I don't see any constraint you can remove in that type.


More information about the Haskell-Cafe mailing list