takeWord :: AsString a => String -> Either String (a, String)
takeWord s =
    case break (== ' ') s of
        (x, _:y) -> do
            (x', s') <- fromString x
            if null s'
                then Right (x', y)
                else Left $ "Unconsumed input in takeWord call"
        (_, []) -> Left "takeWord failed"
takeWord :: AsString a => String -> Either String (a, String)
takeWord s =
    case break (== ' ') s of
        (x, _:y) -> do
            (x', s') <- fromString x
            if null s'
                then Right (x', y)
                else Left $ "Unconsumed input in takeWord call"
        (_, []) -> Left "takeWord failed"
takeWord s =
    case break (== ' ') s of
        (x, _:y) -> do
            (x', s') <- fromString x
            if null s'
                then Right (x', y)
                else Left $ "Unconsumed input in takeWord call"
        (_, []) -> Left "takeWord failed"