Skip to content

Commit

Permalink
This time it should really work
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniil Frumin committed Jun 25, 2013
1 parent b22536a commit 90fba2e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/System/Process/Vado.hs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import Data.Maybe (catMaybes, fromMaybe)
#if MIN_VERSION_base(4,6,0)
import Text.Read (readMaybe)
#else
import Text.Read (readEither)
import Text.Read (reads)
#endif
import System.Exit (ExitCode)
import System.Process (readProcess)
Expand All @@ -50,9 +50,9 @@ import System.Directory (getHomeDirectory, getCurrentDirectory)
-- | Parse a string using the 'Read' instance.
-- Succeeds if there is exactly one valid result.
readMaybe :: Read a => String -> Maybe a
readMaybe s = case readEither s of
Left _ -> Nothing
Right a -> Just a
readMaybe s = case reads s of
[(x, "")] -> Just x
_ -> Nothing
#endif

-- | Remote file system mount point
Expand Down

0 comments on commit 90fba2e

Please sign in to comment.