{-# LANGUAGE NoImplicitPrelude #-}

module DSV.ZipViewStop
  ( ZipViewStop (..)
  ) where

import DSV.Prelude

-- | A description of what prompted the program to stop reading a DSV file with a header. This is similar to 'ParseStop', but includes some additional header-specific concerns.

data ZipViewStop headerError =

    ZipViewEmpty
      -- ^ The input contained no rows, not even a header.

  | ZipViewComplete
      -- ^ All of the input was consumed.

  | ZipViewParseError
      -- ^ The parsing stopped where the data was malformed.

  | ZipViewHeaderError headerError
      -- ^ There is some problem with the header that would prevent us from interpreting the subsequent rows.

  deriving (ZipViewStop headerError -> ZipViewStop headerError -> Bool
(ZipViewStop headerError -> ZipViewStop headerError -> Bool)
-> (ZipViewStop headerError -> ZipViewStop headerError -> Bool)
-> Eq (ZipViewStop headerError)
forall headerError.
Eq headerError =>
ZipViewStop headerError -> ZipViewStop headerError -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ZipViewStop headerError -> ZipViewStop headerError -> Bool
$c/= :: forall headerError.
Eq headerError =>
ZipViewStop headerError -> ZipViewStop headerError -> Bool
== :: ZipViewStop headerError -> ZipViewStop headerError -> Bool
$c== :: forall headerError.
Eq headerError =>
ZipViewStop headerError -> ZipViewStop headerError -> Bool
Eq, Int -> ZipViewStop headerError -> ShowS
[ZipViewStop headerError] -> ShowS
ZipViewStop headerError -> String
(Int -> ZipViewStop headerError -> ShowS)
-> (ZipViewStop headerError -> String)
-> ([ZipViewStop headerError] -> ShowS)
-> Show (ZipViewStop headerError)
forall headerError.
Show headerError =>
Int -> ZipViewStop headerError -> ShowS
forall headerError.
Show headerError =>
[ZipViewStop headerError] -> ShowS
forall headerError.
Show headerError =>
ZipViewStop headerError -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ZipViewStop headerError] -> ShowS
$cshowList :: forall headerError.
Show headerError =>
[ZipViewStop headerError] -> ShowS
show :: ZipViewStop headerError -> String
$cshow :: forall headerError.
Show headerError =>
ZipViewStop headerError -> String
showsPrec :: Int -> ZipViewStop headerError -> ShowS
$cshowsPrec :: forall headerError.
Show headerError =>
Int -> ZipViewStop headerError -> ShowS
Show)