From 492e6044577519b59f390008362de98e9517e04d Mon Sep 17 00:00:00 2001 From: David Feuer Date: Mon, 15 Jan 2018 12:38:29 -0500 Subject: Kill off irrefutable pattern errors Distinguishing between "refutable" and "irrefutable" patterns (as described by the Haskell Report) in incomplete pattern errors was more confusing than helpful. Remove references to irrefutable patterns. Reviewers: hvr, bgamari, simonpj Reviewed By: simonpj Subscribers: simonpj, rwbarton, thomie, carter GHC Trac Issues: #14569 Differential Revision: https://phabricator.haskell.org/D4261 --- libraries/base/Control/Exception/Base.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'libraries/base') diff --git a/libraries/base/Control/Exception/Base.hs b/libraries/base/Control/Exception/Base.hs index d443159cb3..e675e0c017 100644 --- a/libraries/base/Control/Exception/Base.hs +++ b/libraries/base/Control/Exception/Base.hs @@ -93,7 +93,7 @@ module Control.Exception.Base ( finally, -- * Calls for GHC runtime - recSelError, recConError, irrefutPatError, runtimeError, + recSelError, recConError, runtimeError, nonExhaustiveGuardsError, patError, noMethodBindingError, absentError, typeError, nonTermination, nestedAtomically, @@ -375,7 +375,7 @@ instance Exception NestedAtomically ----- -recSelError, recConError, irrefutPatError, runtimeError, +recSelError, recConError, runtimeError, nonExhaustiveGuardsError, patError, noMethodBindingError, absentError, typeError :: Addr# -> a -- All take a UTF8-encoded C string @@ -386,7 +386,6 @@ runtimeError s = errorWithoutStackTrace (unpackCStringUtf8# s) absentError s = errorWithoutStackTrace ("Oops! Entered absent arg " ++ unpackCStringUtf8# s) nonExhaustiveGuardsError s = throw (PatternMatchFail (untangle s "Non-exhaustive guards in")) -irrefutPatError s = throw (PatternMatchFail (untangle s "Irrefutable pattern failed for pattern")) recConError s = throw (RecConError (untangle s "Missing field in record construction")) noMethodBindingError s = throw (NoMethodError (untangle s "No instance nor default method for class operation")) patError s = throw (PatternMatchFail (untangle s "Non-exhaustive patterns in")) -- cgit v1.2.1