Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small tweaks for GHC 7.6.1 support #8

Merged
merged 1 commit into from Oct 28, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion HSH.cabal
@@ -1,5 +1,5 @@
Name: HSH
Version: 2.0.3
Version: 2.0.5
License: LGPL
Maintainer: John Goerzen <jgoerzen@complete.org>
Author: John Goerzen
Expand Down
4 changes: 2 additions & 2 deletions HSH/Command.hs
Expand Up @@ -39,11 +39,11 @@ import Prelude hiding (catch)
import System.IO
import System.Exit
import System.Log.Logger
import System.IO.Error hiding (catch)
import System.IO.Error (isUserError, ioeGetErrorString)
import Data.Maybe.Utils
import Data.Maybe
import Data.List.Utils(uniq)
import Control.Exception(evaluate, SomeException, catch)
import Control.Exception(evaluate, SomeException, catch, try)
import Text.Regex.Posix
import Control.Monad(when)
import Data.String.Utils(rstrip)
Expand Down
7 changes: 4 additions & 3 deletions HSH/ShellEquivs.hs
@@ -1,3 +1,4 @@
{-# LANGUAGE ScopedTypeVariables #-}
{- Shell Equivalents
Copyright (C) 2004-2009 John Goerzen <jgoerzen@complete.org>
Please see the COPYRIGHT file
Expand Down Expand Up @@ -84,7 +85,7 @@ import Text.Regex (matchRegex, mkRegex)
import Text.Printf (printf)
import Control.Monad (foldM)
import System.Directory hiding (createDirectory)
import Control.Exception(evaluate)
import qualified Control.Exception as E
-- import System.FilePath (splitPath)

#ifdef __HSH_POSIX__
Expand Down Expand Up @@ -250,7 +251,7 @@ cut pos = cutR [pos]
discard :: Channel -> IO Channel
discard inh =
do c <- chanAsBSL inh
evaluate (BSL.length c)
E.evaluate (BSL.length c)
return (ChanString "")

{- | Split a list by a given character and select ranges of the resultant lists.
Expand Down Expand Up @@ -314,7 +315,7 @@ The tilde with no username equates to the current user.
Non-tilde expansion is done by the MissingH module System.Path.Glob. -}
glob :: FilePath -> IO [FilePath]
glob inp@('~':remainder) =
catch expanduser (\_ -> Glob.glob rest)
E.catch expanduser (\(e::E.SomeException) -> Glob.glob rest)
where (username, rest) = span (/= '/') remainder
#ifdef __HSH_POSIX__
expanduser =
Expand Down