on master help sign in
drop leading spaces in 'read'
b68d95cAntoine Latter
Data/UUID/Internal.hs+5−3
@@ -269,9 +269,11 @@ instance Show UUID where
269 show = toString
269 show = toString
270
270
271instance Read UUID where
271instance Read UUID where
272+ readsPrec _ str =
273+ let noSpaces = dropWhile isSpace str
272− readsPrec _ str = case fromString (take 36 str) of
274+ in case fromString (take 36 noSpaces) of
273− Nothing -> []
275+ Nothing -> []
274− Just u -> [(u,drop 36 str)]
276+ Just u -> [(u,drop 36 noSpaces)]
275
277
276
278
277instance Storable UUID where
279instance Storable UUID where