use hierarchical namespace for all modules
This commit is contained in:
+15
-15
@@ -39,21 +39,21 @@ library
|
||||
Debug
|
||||
|
||||
other-modules:
|
||||
Exceptions
|
||||
Base
|
||||
Applicative
|
||||
Bool
|
||||
List
|
||||
Monad
|
||||
Show
|
||||
Conv
|
||||
Either
|
||||
Functor
|
||||
Semiring
|
||||
Bifunctor
|
||||
CallStack
|
||||
Error
|
||||
Panic
|
||||
Protolude.Exceptions
|
||||
Protolude.Base
|
||||
Protolude.Applicative
|
||||
Protolude.Bool
|
||||
Protolude.List
|
||||
Protolude.Monad
|
||||
Protolude.Show
|
||||
Protolude.Conv
|
||||
Protolude.Either
|
||||
Protolude.Functor
|
||||
Protolude.Semiring
|
||||
Protolude.Bifunctor
|
||||
Protolude.CallStack
|
||||
Protolude.Error
|
||||
Protolude.Panic
|
||||
|
||||
default-extensions:
|
||||
NoImplicitPrelude
|
||||
|
||||
+3
-3
@@ -16,9 +16,9 @@ module Debug (
|
||||
import Data.Text (Text, unpack)
|
||||
import Control.Monad (Monad, return)
|
||||
|
||||
import qualified Base as P
|
||||
import Error (error)
|
||||
import Show (Print, hPutStrLn)
|
||||
import qualified Protolude.Base as P
|
||||
import Protolude.Error (error)
|
||||
import Protolude.Show (Print, hPutStrLn)
|
||||
|
||||
import System.IO(stderr)
|
||||
import System.IO.Unsafe (unsafePerformIO)
|
||||
|
||||
+19
-19
@@ -32,20 +32,20 @@ module Protolude (
|
||||
) where
|
||||
|
||||
-- Protolude module exports.
|
||||
import List as X
|
||||
import Show as X
|
||||
import Bool as X
|
||||
import Debug as X
|
||||
import Monad as X
|
||||
import Functor as X
|
||||
import Either as X
|
||||
import Applicative as X
|
||||
import Conv as X
|
||||
import Panic as X
|
||||
import Exceptions as X
|
||||
import Semiring as X
|
||||
import Protolude.List as X
|
||||
import Protolude.Show as X
|
||||
import Protolude.Bool as X
|
||||
import Protolude.Monad as X
|
||||
import Protolude.Functor as X
|
||||
import Protolude.Either as X
|
||||
import Protolude.Applicative as X
|
||||
import Protolude.Conv as X
|
||||
import Protolude.Panic as X
|
||||
import Protolude.Exceptions as X
|
||||
import Protolude.Semiring as X
|
||||
|
||||
import Base as Base hiding (
|
||||
import Protolude.Base as Base hiding (
|
||||
putStr -- Overriden by Show.putStr
|
||||
, putStrLn -- Overriden by Show.putStrLn
|
||||
, print -- Overriden by Protolude.print
|
||||
@@ -56,7 +56,7 @@ import Base as Base hiding (
|
||||
, showSignedFloat -- Custom Show instances deprecated.
|
||||
, showsPrec -- Custom Show instances deprecated.
|
||||
)
|
||||
import qualified Base as PBase
|
||||
import qualified Protolude.Base as PBase
|
||||
|
||||
-- Used for 'show', not exported.
|
||||
import Data.String (String)
|
||||
@@ -155,10 +155,10 @@ import Control.DeepSeq as X (
|
||||
import Data.Tuple as X (
|
||||
fst
|
||||
, snd
|
||||
, curry
|
||||
, curry
|
||||
, uncurry
|
||||
, swap
|
||||
)
|
||||
)
|
||||
|
||||
import Data.List as X (
|
||||
splitAt
|
||||
@@ -325,7 +325,7 @@ import Data.Word as X (
|
||||
|
||||
import Data.Either as X (
|
||||
Either(..)
|
||||
, either
|
||||
, either
|
||||
, lefts
|
||||
, rights
|
||||
, partitionEithers
|
||||
@@ -431,7 +431,7 @@ import Data.Text.Encoding.Error as X (
|
||||
|
||||
-- IO
|
||||
import System.Environment as X (getArgs)
|
||||
import qualified System.Exit
|
||||
import qualified System.Exit
|
||||
import System.Exit as X (
|
||||
ExitCode(..)
|
||||
, exitWith
|
||||
@@ -475,7 +475,7 @@ import Control.Monad.STM as X (
|
||||
, retry
|
||||
, orElse
|
||||
, check
|
||||
, throwSTM
|
||||
, throwSTM
|
||||
, catchSTM
|
||||
)
|
||||
import Control.Concurrent as X hiding (
|
||||
@@ -494,7 +494,7 @@ import Control.Concurrent.Async as X (
|
||||
, wait
|
||||
, poll
|
||||
, waitCatch
|
||||
, cancel
|
||||
, cancel
|
||||
, cancelWith
|
||||
, asyncThreadId
|
||||
, waitAny
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
|
||||
module Applicative (
|
||||
module Protolude.Applicative (
|
||||
orAlt,
|
||||
orEmpty,
|
||||
eitherA,
|
||||
@@ -4,7 +4,7 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE ExplicitNamespaces #-}
|
||||
|
||||
module Base (
|
||||
module Protolude.Base (
|
||||
module X,
|
||||
($!),
|
||||
) where
|
||||
@@ -1,7 +1,7 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
|
||||
module Bifunctor (
|
||||
module Protolude.Bifunctor (
|
||||
Bifunctor(..)
|
||||
) where
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
|
||||
module Bool (
|
||||
module Protolude.Bool (
|
||||
whenM
|
||||
, unlessM
|
||||
, ifM
|
||||
@@ -3,7 +3,7 @@
|
||||
{-# LANGUAGE ImplicitParams #-}
|
||||
{-# LANGUAGE ConstraintKinds #-}
|
||||
|
||||
module CallStack
|
||||
module Protolude.CallStack
|
||||
( HasCallStack
|
||||
) where
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{-# LANGUAGE FlexibleInstances #-}
|
||||
{-# LANGUAGE TypeSynonymInstances #-}
|
||||
|
||||
module Conv (
|
||||
module Protolude.Conv (
|
||||
StringConv (..)
|
||||
, toS
|
||||
, toSL
|
||||
@@ -17,7 +17,7 @@ import Data.Text.Encoding.Error as T
|
||||
import Data.Text.Lazy as LT
|
||||
import Data.Text.Lazy.Encoding as LT
|
||||
|
||||
import Base
|
||||
import Protolude.Base
|
||||
import Data.Eq (Eq(..))
|
||||
import Data.Ord (Ord(..))
|
||||
import Data.Function ((.), id)
|
||||
@@ -1,7 +1,7 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
|
||||
module Either (
|
||||
module Protolude.Either (
|
||||
maybeToLeft
|
||||
, maybeToRight
|
||||
, leftToMaybe
|
||||
@@ -8,7 +8,7 @@
|
||||
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
|
||||
#endif
|
||||
|
||||
module Error
|
||||
module Protolude.Error
|
||||
( error
|
||||
) where
|
||||
|
||||
@@ -19,7 +19,7 @@ import Data.Text (Text, unpack)
|
||||
-- Full stack trace.
|
||||
|
||||
import GHC.Types (RuntimeRep)
|
||||
import CallStack (HasCallStack)
|
||||
import Protolude.CallStack (HasCallStack)
|
||||
import GHC.Exception (errorCallWithCallStackException)
|
||||
|
||||
error :: forall (r :: RuntimeRep) . forall (a :: TYPE r) . HasCallStack => Text -> a
|
||||
@@ -2,13 +2,13 @@
|
||||
{-# LANGUAGE Trustworthy #-}
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
|
||||
module Exceptions (
|
||||
module Protolude.Exceptions (
|
||||
hush,
|
||||
note,
|
||||
tryIO,
|
||||
) where
|
||||
|
||||
import Base (IO)
|
||||
import Protolude.Base (IO)
|
||||
import Data.Function ((.))
|
||||
import Control.Monad.Trans (liftIO)
|
||||
import Control.Monad.IO.Class (MonadIO)
|
||||
@@ -2,7 +2,7 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
|
||||
module Functor (
|
||||
module Protolude.Functor (
|
||||
Functor(..),
|
||||
($>),
|
||||
(<$>),
|
||||
@@ -1,7 +1,7 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
|
||||
module List (
|
||||
module Protolude.List (
|
||||
head,
|
||||
ordNub,
|
||||
sortOn,
|
||||
@@ -2,7 +2,7 @@
|
||||
{-# LANGUAGE Trustworthy #-}
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
|
||||
module Monad (
|
||||
module Protolude.Monad (
|
||||
Monad((>>=), return)
|
||||
, MonadPlus(..)
|
||||
|
||||
@@ -40,7 +40,7 @@ module Monad (
|
||||
, (<$!>)
|
||||
) where
|
||||
|
||||
import Base (seq)
|
||||
import Protolude.Base (seq)
|
||||
import Data.List (concat)
|
||||
import Control.Monad
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
|
||||
#endif
|
||||
|
||||
module Panic (
|
||||
module Protolude.Panic (
|
||||
FatalError(..),
|
||||
panic,
|
||||
) where
|
||||
|
||||
import Base (Show)
|
||||
import Protolude.Base (Show)
|
||||
import Protolude.CallStack (HasCallStack)
|
||||
import Data.Text (Text)
|
||||
import Data.Typeable (Typeable)
|
||||
import CallStack (HasCallStack)
|
||||
import Control.Exception as X
|
||||
|
||||
-- | Uncatchable exceptions thrown and never caught.
|
||||
@@ -1,7 +1,7 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
|
||||
module Semiring (
|
||||
module Protolude.Semiring (
|
||||
Semiring(..),
|
||||
zero,
|
||||
) where
|
||||
@@ -5,7 +5,7 @@
|
||||
{-# LANGUAGE TypeSynonymInstances #-}
|
||||
{-# LANGUAGE ExtendedDefaultRules #-}
|
||||
|
||||
module Show (
|
||||
module Protolude.Show (
|
||||
Print(..),
|
||||
putText,
|
||||
putLText,
|
||||
@@ -13,8 +13,8 @@ module Show (
|
||||
putLByteString,
|
||||
) where
|
||||
|
||||
import qualified Base
|
||||
import qualified System.IO as Base
|
||||
import qualified Protolude.Base as Base
|
||||
import Data.Function ((.))
|
||||
|
||||
import Control.Monad.IO.Class (MonadIO, liftIO)
|
||||
+1
-1
@@ -11,7 +11,7 @@ module Unsafe (
|
||||
unsafeThrow,
|
||||
) where
|
||||
|
||||
import Base (Int)
|
||||
import Protolude.Base (Int)
|
||||
import qualified Data.List as List
|
||||
import qualified Data.Maybe as Maybe
|
||||
import qualified Control.Exception as Exc
|
||||
|
||||
Reference in New Issue
Block a user