From 027d0848780bba407830ac68faae5f04f62b24d2 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Wed, 24 Oct 2018 12:26:14 +0200 Subject: [PATCH] Drop undecidable Ord instance for ParseError. That code fails to compile with ghc-8.6.1 because the instance is undecidable. I suppose we could enable the appropriate compiler extension to support it, but I've found that simply removing the instance causes no problems whatsoever: the entire repository still compiles fine and it passes all test suites, too. --- hledger-lib/Text/Megaparsec/Custom.hs | 3 --- 1 file changed, 3 deletions(-) diff --git a/hledger-lib/Text/Megaparsec/Custom.hs b/hledger-lib/Text/Megaparsec/Custom.hs index c71df3e7a..e43defa0d 100644 --- a/hledger-lib/Text/Megaparsec/Custom.hs +++ b/hledger-lib/Text/Megaparsec/Custom.hs @@ -2,7 +2,6 @@ {-# LANGUAGE LambdaCase #-} {-# LANGUAGE PackageImports #-} {-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE StandaloneDeriving #-} module Text.Megaparsec.Custom ( -- * Custom parse error type @@ -67,8 +66,6 @@ data CustomErr -- derive it, but this requires an (orphan) instance for 'ParseError'. -- Hopefully this does not cause any trouble. -deriving instance (Eq (Token c), Ord (Token c), Ord c, Ord e) => Ord (ParseError c e) - instance ShowErrorComponent CustomErr where showErrorComponent (ErrorFailAt _ _ errMsg) = errMsg errorComponentLen (ErrorFailAt startOffset endOffset _) =