Skip to content

Commit 67df572

Browse files
committed
Don't use view patterns conditionally
Summary: Test Plan:
1 parent 0efe3d0 commit 67df572

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/General/Extra.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{-# LANGUAGE CPP, ScopedTypeVariables, ConstraintKinds, GeneralizedNewtypeDeriving, ViewPatterns #-}
1+
{-# LANGUAGE CPP, ScopedTypeVariables, ConstraintKinds, GeneralizedNewtypeDeriving #-}
22
{-# OPTIONS_GHC -Wno-x-partial -Wno-unrecognised-warning-flags #-}
33

44
module General.Extra(
@@ -288,7 +288,7 @@ parseCallStack = reverse . map trimStart . drop1 . lines
288288
callStackFull = parseCallStack $ prettyCallStack $ popCallStack callStack
289289

290290
#if __GLASGOW_HASKELL__ < 912
291-
callStackFromException (fromException -> Just (ErrorCallWithLocation msg loc)) = (parseCallStack loc, toException $ ErrorCall msg)
291+
callStackFromException e | Just (ErrorCallWithLocation msg loc) <- fromException e = (parseCallStack loc, toException $ ErrorCall msg)
292292
#endif
293293
callStackFromException e = ([], e)
294294

0 commit comments

Comments
 (0)