mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-25 19:31:44 +03:00
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.
This commit is contained in:
parent
4e8f2c11d3
commit
027d084878
@ -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 _) =
|
||||
|
Loading…
Reference in New Issue
Block a user