@@ -5,7 +5,6 @@ import ProjectM36.Error
55import qualified Data.Text as T
66import Text.Read (readMaybe)
77import Data.Time.Format
8−--import System.Locale
98
109relationForAtom :: Atom -> Either RelationalError Relation
1110relationForAtom (RelationAtom rel) = Right rel
@@ -34,14 +33,13 @@ atomFromString BoolAtomType strIn = case strIn of
3433 _ -> Left (ParseError "Failed to parse boolean")
3534atomFromString (RelationAtomType _) _ = Left $ ParseError "Nested relation parsing not supported"
3635atomFromString DateTimeAtomType strIn =
37− --deprecated in time 1.5- needs update for GHC 7.10
38− case parseTime defaultTimeLocale "%Y-%m-%d %H:%M:%S" strIn of
36+ case parseTimeM False defaultTimeLocale "%Y-%m-%d %H:%M:%S" strIn of
3937 Just utctime -> Right $ DateTimeAtom utctime
4038 Nothing -> Left $ ParseError "Failed to parse datetime"
4139atomFromString DoubleAtomType strIn = case readMaybe strIn of
4240 Just d -> Right $ DoubleAtom d
4341 Nothing -> Left (ParseError "Failed to parse double")
44−atomFromString DateAtomType strIn = case parseTime defaultTimeLocale "%Y-%m-%d" strIn of
42+atomFromString DateAtomType strIn = case parseTimeM False defaultTimeLocale "%Y-%m-%d" strIn of
4543 Just date -> Right $ DateAtom date
4644 Nothing -> Left $ ParseError "Failed to parse datetime"
4745atomFromString AnyAtomType _ = Left $ ParseError "Parsing AnyAtomType is not supported"