]> gitweb.michael.orlitzky.com - dead/htsn-import.git/blobdiff - src/TSN/Picklers.hs
Fix a bug in the earnings pickler and mangle the sample XML document to test it.
[dead/htsn-import.git] / src / TSN / Picklers.hs
index be4caa64c382b2dd5a995677e2fd1a3f549e59af..ea335c81f2894e8de38a44bddea3c5b2938f82c4 100644 (file)
@@ -126,7 +126,7 @@ xp_earnings =
     to_earnings :: String -> Maybe Int
     to_earnings s
       | s == "TBA" = Nothing
-      | otherwise = (read . strip_commas . show) s
+      | otherwise = Just  $ (read . strip_commas) s
 
     from_earnings :: Maybe Int -> String
     from_earnings Nothing = "TBA"