Skip to content
Snippets Groups Projects
Verified Commit a77d5cad authored by Legy (Beini)'s avatar Legy (Beini)
Browse files

Add an internal prelude to make things easier

parent 362e7fa8
No related branches found
No related tags found
No related merge requests found
......@@ -59,6 +59,9 @@ ghc-options:
library:
source-dirs: src
other-modules:
- Prelude
- BasePrelude
executables:
qbar:
......
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE NoImplicitPrelude #-}
module BasePrelude
( module Prelude,
)
where
import "base" Prelude
{-# LANGUAGE NoImplicitPrelude #-}
module Prelude
( module BasePrelude,
head,
error,
errorWithoutStackTrace,
undefined,
Text.Text,
ByteString.ByteString,
trace,
traceId,
traceShow,
traceShowId,
Maybe.listToMaybe,
)
where
import BasePrelude hiding
( error,
errorWithoutStackTrace,
head,
undefined,
)
import qualified BasePrelude as P
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment