: suppress warning "Defined but not used: type variable ‘x’" in
GHC-8.0
No, the type instance must match the class heading.
I can use
instance Foo [_a] where
type Bar [_a] = Int
whatever = ... where
bar :: _a -> Int
bar = ...
but that is a needlessly messy thing to req
Inferred types and errors too, I would imagine.
On Sun, 17 Jan 2016 2:45 pm Edward Kmett wrote:
> Moreover those _'d type variables would infect all of our haddocks.
> ___
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users@haskell.org
> http:
Moreover those _'d type variables would infect all of our haddocks.
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users
No, the type instance must match the class heading.
I *can* use
instance Foo [_a] where
type Bar [_a] = Int
whatever = ... where
bar :: _a -> Int
bar = ...
but that is a needlessly messy thing to request of every package everywhere.
The arguments being pattern matched in a class ass
Can't you just:
instance Foo [a] where
type Bar [_a] = Int
(At least I think I did that somewhere...)
On Jan 16, 2016 9:24 PM, "Edward Kmett" wrote:
> As a data point I now get thousands of occurrences of this warning across
> my packages.
>
> It is quite annoying.
>
> class Foo a where
> t
As a data point I now get thousands of occurrences of this warning across
my packages.
It is quite annoying.
class Foo a where
type Bar a
instance Foo [a] where
type Bar [a] = Int
is enough to trigger it.
And you can't turn it off by using _ as
instance Foo [_] where
type Bar [_] = Int
On Mon, 11 Jan 2016, Richard Eisenberg wrote:
On Jan 9, 2016, at 6:44 PM, Henning Thielemann
wrote:
instance (Natural n) => Num.Integer (Un n) where
type Repr (Un _n) = Unary
GHC-7.6.3 and GHC-7.4.2 complain:
Type indexes must match class instance head
Found `Un _n' but expected
On Jan 9, 2016, at 6:44 PM, Henning Thielemann
wrote:
>
> instance (Natural n) => Num.Integer (Un n) where
>type Repr (Un _n) = Unary
>
>
> GHC-7.6.3 and GHC-7.4.2 complain:
>Type indexes must match class instance head
>Found `Un _n' but expected `Un n'
>In the type synonym in
On Sat, 9 Jan 2016, Carter Schonwald wrote:
Have you tried _x instead?
Ah, this solves the problem! Almost.
I have an instance like this one:
instance (Natural n) => Num.Integer (Un n) where
type Repr (Un _n) = Unary
GHC-7.6.3 and GHC-7.4.2 complain:
Type indexes must match class
Have you tried _x instead?
On Saturday, January 9, 2016, Henning Thielemann <
lemm...@henning-thielemann.de> wrote:
>
> GHC-8.0 emits several new warnings of this kind:
>
>Defined but not used: type variable ‘x’
>
> for declarations like
>
>type instance Snd x y = y
>
> Enthusiastically,
10 matches
Mail list logo