{-# LANGUAGE Safe #-}
{-# OPTIONS_HADDOCK hide #-}
{-# OPTIONS_GHC -Wno-redundant-strictness-flags #-}
module Text.Gigaparsec.Internal.Errors.ErrorItem (
module Text.Gigaparsec.Internal.Errors.ErrorItem
) where
import Data.List.NonEmpty (NonEmpty)
import Text.Gigaparsec.Internal.Errors.CaretControl (CaretWidth)
type Input :: *
type Input = NonEmpty Char
type UnexpectItem :: *
data UnexpectItem = UnexpectRaw !Input {-# UNPACK #-} !Word
| UnexpectNamed !String {-# UNPACK #-} !CaretWidth
| UnexpectEndOfInput
type ExpectItem :: *
data ExpectItem = ExpectRaw !String
| ExpectNamed !String
| ExpectEndOfInput
deriving stock (ExpectItem -> ExpectItem -> Bool
(ExpectItem -> ExpectItem -> Bool)
-> (ExpectItem -> ExpectItem -> Bool) -> Eq ExpectItem
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ExpectItem -> ExpectItem -> Bool
== :: ExpectItem -> ExpectItem -> Bool
$c/= :: ExpectItem -> ExpectItem -> Bool
/= :: ExpectItem -> ExpectItem -> Bool
Eq, Eq ExpectItem
Eq ExpectItem =>
(ExpectItem -> ExpectItem -> Ordering)
-> (ExpectItem -> ExpectItem -> Bool)
-> (ExpectItem -> ExpectItem -> Bool)
-> (ExpectItem -> ExpectItem -> Bool)
-> (ExpectItem -> ExpectItem -> Bool)
-> (ExpectItem -> ExpectItem -> ExpectItem)
-> (ExpectItem -> ExpectItem -> ExpectItem)
-> Ord ExpectItem
ExpectItem -> ExpectItem -> Bool
ExpectItem -> ExpectItem -> Ordering
ExpectItem -> ExpectItem -> ExpectItem
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: ExpectItem -> ExpectItem -> Ordering
compare :: ExpectItem -> ExpectItem -> Ordering
$c< :: ExpectItem -> ExpectItem -> Bool
< :: ExpectItem -> ExpectItem -> Bool
$c<= :: ExpectItem -> ExpectItem -> Bool
<= :: ExpectItem -> ExpectItem -> Bool
$c> :: ExpectItem -> ExpectItem -> Bool
> :: ExpectItem -> ExpectItem -> Bool
$c>= :: ExpectItem -> ExpectItem -> Bool
>= :: ExpectItem -> ExpectItem -> Bool
$cmax :: ExpectItem -> ExpectItem -> ExpectItem
max :: ExpectItem -> ExpectItem -> ExpectItem
$cmin :: ExpectItem -> ExpectItem -> ExpectItem
min :: ExpectItem -> ExpectItem -> ExpectItem
Ord, Int -> ExpectItem -> ShowS
[ExpectItem] -> ShowS
ExpectItem -> String
(Int -> ExpectItem -> ShowS)
-> (ExpectItem -> String)
-> ([ExpectItem] -> ShowS)
-> Show ExpectItem
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ExpectItem -> ShowS
showsPrec :: Int -> ExpectItem -> ShowS
$cshow :: ExpectItem -> String
show :: ExpectItem -> String
$cshowList :: [ExpectItem] -> ShowS
showList :: [ExpectItem] -> ShowS
Show)