[Haskell-cafe] Problems on installing sizes-types package
Mateusz Kowalczyk
fuuzetsu at fuuzetsu.co.uk
Fri Feb 21 19:01:34 UTC 2014
On 21/02/14 18:52, Rodrigo Ribeiro wrote:
> Hello to all!
>
> I'm trying to install the sized-types package, a dependency for kansas lava:
>
> http://hackage.haskell.org/package/sized-types
>
> using cabal, and the following error message is returned:
>
> Data/Sized/Sparse/Matrix.hs:61:26:
> Could not deduce (Eq a) arising from a use of `prune'
> from the context (Size m, Size n, Size m', Size n', n ~ m', Num a)
> bound by the type signature for
> mm :: (Size m, Size n, Size m', Size n', n ~ m', Num a) =>
> Matrix (m, n) a -> Matrix (m', n') a -> Matrix (m,
> n') a
> at Data/Sized/Sparse/Matrix.hs:50:7-112
>
> Is it a known issue? Is there some way to solve it? I'm using GHC 7.6.3 and
> plataform 2013.2.0.0.
>
> Best,
>
> Rodrigo
>
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
You can just add the ‘Eq a’ constraint to the relevant line and it all
compiles fine with 7.6.3. It might be worth-while to e-mail the authors
and ask for a new release with the fix in place (and removing all the
hard tabs from the code…). You can use ‘cabal unpack sized-types’ to
fetch the package source, make the change and then ‘cabal install’ it
from there.
The relevant line becomes:
mm :: (Eq a, Size m, Size n, Size m', Size n', n ~ m', Num a) => Matrix
(m,n) a -> Matrix (m',n') a -> Matrix (m,n') a
--
Mateusz K.
More information about the Haskell-Cafe
mailing list