
Hi All, I'm trying to extract elements from a Vector using 'head' and 'tail' function in Data.Vector package, but it gives me the following error now. <interactive>:41:18: Couldn't match expected type ‘Data.Vector.Vector a’ with actual type ‘vector-0.10.9.1:Data.Vector.Vector Int’ NB: ‘Data.Vector.Vector’ is defined in ‘Data.Vector’ in package ‘vector-0.10.12.3’ ‘vector-0.10.9.1:Data.Vector.Vector’ is defined in ‘Data.Vector’ in package ‘vector-0.10.9.1’ Relevant bindings include it :: a (bound at <interactive>:41:1) In the first argument of ‘Data.Vector.head’, namely ‘it’ In the expression: Data.Vector.head it It was working fine before. Any help would be appreciated. Thanks in advance! -- Regards, Dananji Liyanage

On Wed, May 27, 2015 at 4:15 AM, Dananji Liyanage
<interactive>:41:18: Couldn't match expected type ‘Data.Vector.Vector a’ with actual type ‘vector-0.10.9.1:Data.Vector.Vector Int’ NB: ‘Data.Vector.Vector’ is defined in ‘Data.Vector’ in package ‘vector-0.10.12.3’ ‘vector-0.10.9.1:Data.Vector.Vector’ is defined in ‘Data.Vector’ in package ‘vector-0.10.9.1’
Did you read the message? It is telling you that you have two versions of the vector package installed, and it is unable to reconcile them. You should likely remove one of them --- and in the future use sandboxes so that you can avoid this kind of conflict. -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

To that end, I've got an example for firing up a little Cabal project and
using a sandbox for the dependencies here:
http://howistart.org/posts/haskell/1
The short version:
mkdir project && cd project && cabal sandbox init && cabal install vector
&& cabal repl
Hope this helps,
Chris
On Thu, May 28, 2015 at 4:01 PM, Brandon Allbery
On Wed, May 27, 2015 at 4:15 AM, Dananji Liyanage
wrote: <interactive>:41:18: Couldn't match expected type ‘Data.Vector.Vector a’ with actual type ‘vector-0.10.9.1:Data.Vector.Vector Int’ NB: ‘Data.Vector.Vector’ is defined in ‘Data.Vector’ in package ‘vector-0.10.12.3’ ‘vector-0.10.9.1:Data.Vector.Vector’ is defined in ‘Data.Vector’ in package ‘vector-0.10.9.1’
Did you read the message? It is telling you that you have two versions of the vector package installed, and it is unable to reconcile them.
You should likely remove one of them --- and in the future use sandboxes so that you can avoid this kind of conflict.
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
_______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners

On Thu, 28 May 2015 16:03:42 -0500
Christopher Allen
To that end, I've got an example for firing up a little Cabal project and using a sandbox for the dependencies here: http://howistart.org/posts/haskell/1
The short version:
mkdir project && cd project && cabal sandbox init && cabal install vector && cabal repl
very nice. i've bookmarked it!! Brian
participants (4)
-
Brandon Allbery
-
briand@aracnet.com
-
Christopher Allen
-
Dananji Liyanage