From 90fba2ed7c42eac4a534af87957b07f59147eea6 Mon Sep 17 00:00:00 2001 From: Daniil Frumin Date: Tue, 25 Jun 2013 09:39:11 +0400 Subject: [PATCH] This time it should really work --- src/System/Process/Vado.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/System/Process/Vado.hs b/src/System/Process/Vado.hs index 6629321..d7c6412 100644 --- a/src/System/Process/Vado.hs +++ b/src/System/Process/Vado.hs @@ -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) @@ -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