From 7491e92f2aafd404600e8828863af0c6c1d9a709 Mon Sep 17 00:00:00 2001 From: Thomas Scholtes Date: Wed, 10 Apr 2019 16:38:14 +0200 Subject: [PATCH] 'Protolude.Error.error' produces call stacks (#102) Calling `Protolude.Error.error` will now include the call stack in the `ErrorCall` that is raised. Before this was not the case because we used the wrong implicit variable. --- src/Protolude/Error.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Protolude/Error.hs b/src/Protolude/Error.hs index 194b5c153..d8803ed53 100644 --- a/src/Protolude/Error.hs +++ b/src/Protolude/Error.hs @@ -27,7 +27,7 @@ import GHC.Exception (errorCallWithCallStackException) {-# WARNING error "'error' remains in code" #-} error :: forall (r :: RuntimeRep) . forall (a :: TYPE r) . HasCallStack => Text -> a -error s = raise# (errorCallWithCallStackException (unpack s) ?callstack) +error s = raise# (errorCallWithCallStackException (unpack s) ?callStack) #elif MIN_VERSION_base(4,7,0) -- Basic Call Stack with callsite.