From 611ff4782c261a6c6e52fe7ed0c122a0eac22691 Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Sun, 26 Sep 2010 17:05:09 +0000 Subject: fix imports, examples --- examples/vector.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'examples/vector.hs') diff --git a/examples/vector.hs b/examples/vector.hs index eda9290..f531cbd 100644 --- a/examples/vector.hs +++ b/examples/vector.hs @@ -14,7 +14,7 @@ fromVector :: Storable t => V.Vector t -> H.Vector t fromVector v = unsafeFromForeignPtr p i n where (p,i,n) = V.unsafeToForeignPtr v -toVector :: H.Vector t -> V.Vector t +toVector :: Storable t => H.Vector t -> V.Vector t toVector v = V.unsafeFromForeignPtr p i n where (p,i,n) = unsafeToForeignPtr v @@ -22,11 +22,10 @@ toVector v = V.unsafeFromForeignPtr p i n where v = V.slice 5 10 (V.fromList [1 .. 10::Double] V.++ V.replicate 10 7) -w = subVector 2 3 (linspace 10 (0,2)) +w = subVector 2 3 (linspace 5 (0,1)) :: Vector Double main = do print v print $ fromVector v print w print $ toVector w - -- cgit v1.2.3