fix warnings

This commit is contained in:
Stephen Diehl
2016-04-07 17:14:42 -04:00
parent e94c364d65
commit 28dad7fca1
5 changed files with 17 additions and 15 deletions
+8 -7
View File
@@ -14,33 +14,34 @@ module Debug (
import qualified Prelude as P
import qualified Debug.Trace as T
--{-# WARNING undefined "Do not use 'undefined' in production code" #-}
{-# WARNING undefined "'undefined' remains in code" #-}
undefined :: a
undefined = P.undefined
--{-# WARNING error "Do not use 'error' in production code" #-}
{-# WARNING error "'error' remains in code" #-}
error :: P.String -> a
error = P.error
--{-# WARNING trace "Do not use 'trace' in production code" #-}
{-# WARNING trace "'trace' remains in code" #-}
trace :: P.String -> a -> a
trace = T.trace
--{-# WARNING trace "Do not use 'trace' in production code" #-}
{-# WARNING traceShow "'traceShow' remains in code" #-}
traceShow :: P.Show a => a -> a
traceShow a = T.trace (P.show a) a
--{-# WARNING trace "Do not use 'trace' in production code" #-}
{-# WARNING traceShowM "'traceShowM' remains in code" #-}
traceShowM :: (P.Show a, P.Monad m) => a -> m ()
traceShowM a = T.traceM (P.show a)
--{-# WARNING traceM "Do not use 'traceM' in production code" #-}
{-# WARNING traceM "'traceM' remains in code" #-}
traceM :: P.Monad m => P.String -> m ()
traceM = T.traceM
--{-# WARNING traceIO "Do not use 'traceIO' in production code" #-}
{-# WARNING traceIO "'traceIO' remains in code" #-}
traceIO :: P.String -> P.IO ()
traceIO = T.traceIO
{-# WARNING notImplemented "'notImplemented' remains in code" #-}
notImplemented :: a
notImplemented = P.error "Not implemented"