diff options
author | markwright <markwright@internode.on.net> | 2011-08-29 11:11:05 +0000 |
---|---|---|
committer | markwright <markwright@internode.on.net> | 2011-08-29 11:11:05 +0000 |
commit | 943f2db1bce8c5984673b7242ccc0e27a1eb0772 (patch) | |
tree | 68d01b30a8316fd87e64f89db3ba117e43900220 /lib | |
parent | 8c6ab067ac5b5f55f6eb21bdcd544121e6001a11 (diff) |
Conditional patch to allow compilation with vector 0.8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Numeric/Vector.hs | 2 |
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) | ||
44 | instance (Element a, Read a) => Read (Vector a) where | 45 | instance (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 | ||
51 | instance (Element a, Read a) => Read (Vector a) where | 53 | instance (Element a, Read a) => Read (Vector a) where |