I am trying to implement a ray data type using the Vector type found here: http://www.haskell.org/haskellwiki/Numeric_Haskell:_A_Vector_Tutorial#Importing_the_library
The Vector will only hold doubles, so I would like to use the Unboxed version of the Vector type.
Here is the code I am trying to compile:
module Main where
import qualified Data.Vector.Unboxed as Vector
data Ray = Ray Data.Vector.Unboxed Data.Vector.Unboxed
The error I get is
Not in scope: type constructor or class `Data.Vector.Unboxed'
Failed, modules loaded: none.
The module
Data.Vector.Unboxedexports a type constructorVectorwhich takes as an argument the type you want to store. Since you renamed this module toVectoras well, the qualified name for this type isVector.Vector. Assuming you want two vectors of doubles, you should therefore use it like this: