Skip to content

Commit

Permalink
Remove custom 'trim' implementation (#1406)
Browse files Browse the repository at this point in the history
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Junyoung/Clare Jang <[email protected]>
  • Loading branch information
3 people authored Feb 21, 2021
1 parent da496a1 commit 8946578
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 3 additions & 1 deletion install/src/Env.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 )

Expand Down
7 changes: 1 addition & 6 deletions install/src/Print.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions install/src/Stack.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{-# LANGUAGE CPP #-}
module Stack where

import Data.List.Extra ( trim )
import Development.Shake
import Development.Shake.FilePath
import Control.Monad
Expand Down

0 comments on commit 8946578

Please sign in to comment.