-
Herbert Valerio Riedel authored
GHC 8.0 changed the `ErrorCall` type to have an extended constructor, and backward compatibility has been provided via PatternSynonyms: data ErrorCall = ErrorCallWithLocation String String deriving (Eq, Ord) pattern ErrorCall :: String -> ErrorCall pattern ErrorCall err <- ErrorCallWithLocation err _ where ErrorCall err = ErrorCallWithLocation err "" However, due to https://ghc.haskell.org/ticket/8779 the exhaustive-checker doesn't cope well with pattern-synonyms yet, and so we get a non-exhaustive pattern-match failure when matching on 'ErrorCall' now. As the matching on the constructor 'ErrorCall' is done here to help infer the Exception instance, we can also just annotate the type directly, and eschew the problematic pattern match. While at it, this commit also makes this module CPP-free.
4e33454f