summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authormarkwright <markwright@internode.on.net>2011-08-29 11:11:05 +0000
committermarkwright <markwright@internode.on.net>2011-08-29 11:11:05 +0000
commit943f2db1bce8c5984673b7242ccc0e27a1eb0772 (patch)
tree68d01b30a8316fd87e64f89db3ba117e43900220 /lib
parent8c6ab067ac5b5f55f6eb21bdcd544121e6001a11 (diff)
Conditional patch to allow compilation with vector 0.8
Diffstat (limited to 'lib')
-rw-r--r--lib/Numeric/Vector.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Numeric/Vector.hs b/lib/Numeric/Vector.hs
index 3fcd880..5b72951 100644
--- a/lib/Numeric/Vector.hs
+++ b/lib/Numeric/Vector.hs
@@ -41,11 +41,13 @@ instance (Show a, Storable a) => (Show (Vector a)) where
41 41
42#ifdef VECTOR 42#ifdef VECTOR
43 43
44#if !MIN_VERSION_vector(0,8,0)
44instance (Element a, Read a) => Read (Vector a) where 45instance (Element a, Read a) => Read (Vector a) where
45 readsPrec _ s = [(fromList . read $ listnums, rest)] 46 readsPrec _ s = [(fromList . read $ listnums, rest)]
46 where (thing,trest) = breakAt ']' s 47 where (thing,trest) = breakAt ']' s
47 (dims,listnums) = breakAt ' ' (dropWhile (==' ') thing) 48 (dims,listnums) = breakAt ' ' (dropWhile (==' ') thing)
48 rest = drop 31 trest 49 rest = drop 31 trest
50#endif
49#else 51#else
50 52
51instance (Element a, Read a) => Read (Vector a) where 53instance (Element a, Read a) => Read (Vector a) where