[Haskell-cafe] Best idiom for avoiding Defaulting warnings with ghc -Wall -Werror ??

Henning Thielemann lemming at henning-thielemann.de
Mon Jun 25 15:35:13 EDT 2007


On Mon, 25 Jun 2007, Ian Lynagh wrote:

> On Fri, Jun 22, 2007 at 11:37:15AM -0700, Dave Bayer wrote:
> >
> > >       z = r Prelude.^ 3
>
> I don't know if (^) in particular is what is causing you problems, but
> IMO it has the wrong type; just as we have
>     (!!)         ::                 [a] -> Int -> a
>     genericIndex :: (Integral b) => [a] -> b   -> a
> we should also have
>     (^)          :: (Num a)             => a -> Int -> a
>     genericPower :: (Num a, Integral b) => a -> b   -> a
> (or some other function name).

Seconded!

> I've mentioned this before, but until
>     http://hackage.haskell.org/trac/haskell-prime/ticket/118
> is resolved we don't know where to discuss it (the haskell-prime or
> libraries list).


More information about the Haskell-Cafe mailing list