Skip to content
Snippets Groups Projects
Commit 3452a7a0 authored by Jens Nolte's avatar Jens Nolte
Browse files

Use warning pragma for partial functions


Co-authored-by: default avatarJan Beinke <git@janbeinke.com>
parent 458784d7
No related branches found
No related tags found
No related merge requests found
......@@ -51,6 +51,7 @@ common shared-properties
-Wno-missing-import-lists
-Wno-unsafe
-Wno-all-missed-specialisations
-Werror=incomplete-patterns
-Werror=missing-methods
common shared-executable-properties
......
......@@ -87,62 +87,62 @@ import GHC.Stack.Types qualified
import GHC.Types qualified
import Quasar.PreludeExtras
{-# DEPRECATED head "Partial Function." #-}
{-# WARNING head "Partial Function." #-}
head :: [a] -> a
head = P.head
{-# DEPRECATED last "Partial Function." #-}
{-# WARNING last "Partial Function." #-}
last :: [a] -> a
last = P.last
{-# DEPRECATED read "Partial Function." #-}
{-# WARNING read "Partial Function." #-}
read :: Read a => String -> a
read = P.read
{-# DEPRECATED error "Undefined." #-}
{-# WARNING error "Undefined." #-}
error :: forall (r :: GHC.Types.RuntimeRep). forall (a :: GHC.Types.TYPE r). GHC.Stack.Types.HasCallStack => String -> a
error = P.error
{-# DEPRECATED errorWithoutStackTrace "Undefined." #-}
{-# WARNING errorWithoutStackTrace "Undefined." #-}
errorWithoutStackTrace :: String -> a
errorWithoutStackTrace = P.errorWithoutStackTrace
{-# DEPRECATED undefined "Undefined." #-}
{-# WARNING undefined "Undefined." #-}
undefined :: forall (r :: GHC.Types.RuntimeRep). forall (a :: GHC.Types.TYPE r). GHC.Stack.Types.HasCallStack => a
undefined = P.undefined
{-# DEPRECATED trace "Trace." #-}
{-# WARNING trace "Trace." #-}
trace :: String -> a -> a
trace = Trace.trace
{-# DEPRECATED traceId "Trace." #-}
{-# WARNING traceId "Trace." #-}
traceId :: String -> String
traceId = Trace.traceId
{-# DEPRECATED traceShow "Trace." #-}
{-# WARNING traceShow "Trace." #-}
traceShow :: Show a => a -> b -> b
traceShow = Trace.traceShow
{-# DEPRECATED traceShowId "Trace." #-}
{-# WARNING traceShowId "Trace." #-}
traceShowId :: Show a => a -> a
traceShowId = Trace.traceShowId
{-# DEPRECATED traceM "Trace." #-}
{-# WARNING traceM "Trace." #-}
traceM :: Applicative m => String -> m ()
traceM = Trace.traceM
{-# DEPRECATED traceShowM "Trace." #-}
{-# WARNING traceShowM "Trace." #-}
traceShowM :: (Show a, Applicative m) => a -> m ()
traceShowM = Trace.traceShowM
{-# DEPRECATED traceIO "Trace." #-}
{-# WARNING traceIO "Trace." #-}
traceIO :: Control.Monad.IO.Class.MonadIO m => String -> m ()
traceIO = Control.Monad.IO.Class.liftIO . Trace.traceIO
{-# DEPRECATED traceShowIO "Trace." #-}
{-# WARNING traceShowIO "Trace." #-}
traceShowIO :: (Control.Monad.IO.Class.MonadIO m, Show a) => a -> m ()
traceShowIO = traceIO . show
{-# DEPRECATED traceShowIdIO "Trace." #-}
{-# WARNING traceShowIdIO "Trace." #-}
traceShowIdIO :: (Control.Monad.IO.Class.MonadIO m, Show a) => a -> m a
traceShowIdIO a = traceShowIO a >> pure a
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