I have a file with NaNs and Haskell should cope with NaNs: Prelude.read "NaN" :: Double
But if I use cassava then I get errors
Left "parse error (Failed reading: conversion error: expected Double, got \"NaN\" (Failed reading: takeWhile1)) at \n-20.885,-21.039,3.0853,NaN,4,5\n-20.885,-18.039,3.0853,NaN,4,5\n-20.885,-15.039,3.0853,NaN,4,5\n-20.88 (truncated)"
So I have this
newtype LaxDouble = LaxDouble { laxDouble :: Double }
deriving Show
instance FromField LaxDouble where
parseField s = do
f <- parseField s
return $ LaxDouble $ Prelude.read f
I have a file with NaNs and Haskell should cope with NaNs:
Prelude.read "NaN" :: Double
But if I use cassava then I get errors
So I have this
IMHO reading NaNs should just work(TM)