Newer
Older
{-# LANGUAGE NoImplicitPrelude #-}
module Prelude
( module BasePrelude,
Control.Monad.forever,
Control.Monad.unless,
Control.Monad.void,
Control.Monad.when,
Control.Monad.IO.Class.MonadIO,
Control.Monad.IO.Class.liftIO,
Text.Text,
Maybe.listToMaybe,
error,
errorWithoutStackTrace,
trace,
traceId,
traceShow,
traceShowId,
traceIO,
traceShowIO,
traceShowIdIO,
)
where
import BasePrelude hiding
( error,
errorWithoutStackTrace,
head,
undefined,
)
import qualified BasePrelude as P
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import qualified Data.ByteString as ByteString
import qualified Data.Maybe as Maybe
import qualified Data.Text.Lazy as Text
import qualified Debug.Trace as Trace
import qualified GHC.Stack.Types
{-# DEPRECATED head "Partial Function." #-}
head :: [a] -> a
head = P.head
{-# DEPRECATED error "Partial Function." #-}
error :: GHC.Stack.Types.HasCallStack => String -> a
error = P.error
{-# DEPRECATED errorWithoutStackTrace "Partial Function." #-}
errorWithoutStackTrace :: String -> a
errorWithoutStackTrace = P.errorWithoutStackTrace
{-# DEPRECATED undefined "Partial Function." #-}
undefined :: GHC.Stack.Types.HasCallStack => a
undefined = P.undefined
{-# DEPRECATED trace "Partitial Function." #-}
trace :: String -> a -> a
trace = Trace.trace
{-# DEPRECATED traceId "Partitial Function." #-}
traceId :: String -> String
traceId = Trace.traceId
{-# DEPRECATED traceShow "Partitial Function." #-}
traceShow :: Show a => a -> b -> b
traceShow = Trace.traceShow
{-# DEPRECATED traceShowId "Partitial Function." #-}
traceShowId :: Show a => a -> a
traceShowId = Trace.traceShowId
{-# DEPRECATED traceM "Partitial Function." #-}
traceM :: Applicative m => String -> m ()
traceM = Trace.traceM
{-# DEPRECATED traceShowM "Partitial Function." #-}
traceShowM :: (Show a, Applicative m) => a -> m ()
traceShowM = Trace.traceShowM
{-# DEPRECATED traceIO "Partitial Function." #-}
traceIO :: Control.Monad.IO.Class.MonadIO m => String -> m ()
traceIO = Control.Monad.IO.Class.liftIO . Trace.traceIO
{-# DEPRECATED traceShowIO "Partitial Function." #-}
traceShowIO :: (Control.Monad.IO.Class.MonadIO m, Show a) => a -> m ()
traceShowIO = traceIO . show
{-# DEPRECATED traceShowIdIO "Partitial Function." #-}
traceShowIdIO :: (Control.Monad.IO.Class.MonadIO m, Show a) => a -> m a
traceShowIdIO a = traceShowIO a >> return a
intercalate :: Monoid a => a -> [a] -> a
intercalate _ [] = mempty
intercalate _ [x] = x
intercalate inter (x : xs) = x <> inter <> intercalate inter xs