From 2c47ec726277125c8cb19981cd4751914b8c2cc3 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Sat, 9 Apr 2016 15:53:25 -0400 Subject: [PATCH] selectively expose more of ghc.base --- src/Protolude.hs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/Protolude.hs b/src/Protolude.hs index b7222a193..edf505fc8 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE NoImplicitPrelude #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module Protolude ( @@ -51,10 +52,6 @@ import Data.Traversable as X import Data.Foldable as X hiding ( foldr1 , foldl1 - , maximum - , maximumBy - , minimum - , minimumBy ) import Data.Semiring as X import Data.Functor.Identity as X @@ -78,6 +75,7 @@ import Data.List as X ( , filter , reverse , replicate + , take ) import Data.Map as X (Map) import Data.Set as X (Set) @@ -139,9 +137,9 @@ import Data.Either as X import Data.Complex as X import Data.Function as X ( - id - , const + const , (.) + , ($) , flip , fix , on @@ -160,6 +158,10 @@ import GHC.Exts as X ( , FunPtr , the ) +import GHC.Base as X ( + (++) + , ($!) + ) -- Genericss import GHC.Generics ( @@ -256,7 +258,7 @@ uncons [] = Nothing uncons (x:xs) = Just (x, xs) applyN :: Int -> (a -> a) -> a -> a -applyN n f = X.foldr (.) id (X.replicate n f) +applyN n f = X.foldr (.) identity (X.replicate n f) print :: (X.MonadIO m, P.Show a) => a -> m () print = liftIO . P.print