diff --git a/install/src/Env.hs b/install/src/Env.hs index 5dc77e1dfb..fcdfc3f78b 100644 --- a/install/src/Env.hs +++ b/install/src/Env.hs @@ -19,7 +19,9 @@ import Data.List ( sort , sortBy , isInfixOf ) -import Data.List.Extra ( nubOrdBy ) +import Data.List.Extra ( nubOrdBy + , trim + ) import Data.Ord ( comparing ) import Control.Monad.Extra ( mapMaybeM ) diff --git a/install/src/Print.hs b/install/src/Print.hs index b81a92a6c4..eb20854585 100644 --- a/install/src/Print.hs +++ b/install/src/Print.hs @@ -3,7 +3,7 @@ module Print where import Development.Shake import Control.Monad.IO.Class import Data.List ( dropWhileEnd ) -import Data.List.Extra ( trimStart, trimEnd ) +import Data.List.Extra ( trim ) import Data.Char ( isSpace ) -- | lift putStrLn to MonadIO @@ -22,11 +22,6 @@ embedInStars str = printInStars :: MonadIO m => String -> m () printInStars = liftIO . putStrLn . embedInStars - --- | Trim whitespace of both ends of a string -trim :: String -> String -trim = trimEnd . trimStart - -- | Trim the whitespace of the stdout of a command trimmedStdout :: Stdout String -> String trimmedStdout (Stdout s) = trim s diff --git a/install/src/Stack.hs b/install/src/Stack.hs index 012abf9594..e21bf8d549 100644 --- a/install/src/Stack.hs +++ b/install/src/Stack.hs @@ -1,6 +1,7 @@ {-# LANGUAGE CPP #-} module Stack where +import Data.List.Extra ( trim ) import Development.Shake import Development.Shake.FilePath import Control.Monad