{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}

module Data.Char.Space(
  -- * Individual space characters
  HasHorizontalTab(..)
, AsHorizontalTab(..)
, parseHorizontalTab
, HasLineFeed(..)
, AsLineFeed(..)
, parseLineFeed
, HasVerticalTab(..)
, AsVerticalTab(..)
, parseVerticalTab
, HasFormFeed(..)
, AsFormFeed(..)
, parseFormFeed
, HasCarriageReturn(..)
, AsCarriageReturn(..)
, parseCarriageReturn
, HasWhitespace(..)
, AsWhitespace(..)
, parseWhitespace
, HasNoBreakSpace(..)
, AsNoBreakSpace(..)
, parseNoBreakSpace
, HasOghamSpaceMark(..)
, AsOghamSpaceMark(..)
, parseOghamSpaceMark
, HasEnQuad(..)
, AsEnQuad(..)
, parseEnQuad
, HasEmQuad(..)
, AsEmQuad(..)
, parseEmQuad
, HasEnSpace(..)
, AsEnSpace(..)
, parseEnSpace
, HasEmSpace(..)
, AsEmSpace(..)
, parseEmSpace
, HasThreePerEmSpace(..)
, AsThreePerEmSpace(..)
, parseThreePerEmSpace
, HasFourPerEmSpace(..)
, AsFourPerEmSpace(..)
, parseFourPerEmSpace
, HasSixPerEmSpace(..)
, AsSixPerEmSpace(..)
, parseSixPerEmSpace
, HasFigureSpace(..)
, AsFigureSpace(..)
, parseFigureSpace
, HasPunctuationSpace(..)
, AsPunctuationSpace(..)
, parsePunctuationSpace
, HasThinSpace(..)
, AsThinSpace(..)
, parseThinSpace
, HasHairSpace(..)
, AsHairSpace(..)
, parseHairSpace
, HasNarrowNoBreakSpace(..)
, AsNarrowNoBreakSpace(..)
, parseNarrowNoBreakSpace
, HasMediumMathematicalSpace(..)
, AsMediumMathematicalSpace(..)
, parseMediumMathematicalSpace
, HasIdeographicSpace(..)
, AsIdeographicSpace(..)
, parseIdeographicSpace
-- * All space characters
, SpaceChar(..)
, HasSpaceChar(..)
, AsSpaceChar(..)
, parseSpaceChar
-- * ISO Latin-1 space characters /(horizontal tab, line feed, form feed, carriage return, whitespace)/
, IsoLatin1(..)
, HasIsoLatin1(..)
, AsIsoLatin1(..)
, parseIsoLatin1
) where

import Control.Category ( Category(id, (.)) )
import Control.Lens ( Prism', prism', (#), preview, review, Lens' )
import Data.Bool ( Bool )
import Data.Char ( Char )
import Data.Eq ( Eq((==)) )
import Data.Int ( Int )
import Data.Foldable ( asum )
import Data.Functor ( Functor((<$)), (<$>) )
import Data.Maybe ( Maybe(Nothing, Just) )
import Data.Ord ( Ord )
import GHC.Generics ( Generic )
import GHC.Show ( Show )
import Prelude(Integer)
import Text.Parser.Char ( CharParsing(satisfy) )
import Text.Parser.Combinators ( Parsing((<?>)) )

class HasHorizontalTab a where
  horizontalTab :: Lens' a ()

instance HasHorizontalTab () where
  horizontalTab :: Lens' () ()
horizontalTab =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

class AsHorizontalTab a where
  _HorizontalTab :: Prism' a ()
  _HorizontalTab' :: a
  _HorizontalTab' = forall a. AsHorizontalTab a => Prism' a ()
_HorizontalTab forall t b. AReview t b -> b -> t
# ()

instance AsHorizontalTab () where
  _HorizontalTab :: Prism' () ()
_HorizontalTab =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

instance AsHorizontalTab Char where
  _HorizontalTab :: Prism' Char ()
_HorizontalTab =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Char
'\9')
      (\case
          Char
'\9' -> forall a. a -> Maybe a
Just ()
          Char
_ -> forall a. Maybe a
Nothing
      )

instance AsHorizontalTab Int where
  _HorizontalTab :: Prism' Int ()
_HorizontalTab =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Int
9)
      (\case
          Int
9 -> forall a. a -> Maybe a
Just ()
          Int
_ -> forall a. Maybe a
Nothing
      )

instance AsHorizontalTab Integer where
  _HorizontalTab :: Prism' Integer ()
_HorizontalTab =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Integer
9)
      (\case
          Integer
9 -> forall a. a -> Maybe a
Just ()
          Integer
_ -> forall a. Maybe a
Nothing
      )

parseHorizontalTab ::
  CharParsing p =>
  p ()
parseHorizontalTab :: forall (p :: * -> *). CharParsing p => p ()
parseHorizontalTab =
  forall (f :: * -> *). CharParsing f => (Char -> Bool) -> f ()
satisfy' (forall a. Eq a => a -> a -> Bool
== Char
'\9') forall (m :: * -> *) a. Parsing m => m a -> String -> m a
<?> String
"horizontal tab character"

class HasLineFeed a where
  lineFeed :: Lens' a ()

instance HasLineFeed () where
  lineFeed :: Lens' () ()
lineFeed =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

class AsLineFeed a where
  _LineFeed :: Prism' a ()
  _LineFeed' :: a
  _LineFeed' = forall a. AsLineFeed a => Prism' a ()
_LineFeed forall t b. AReview t b -> b -> t
# ()

instance AsLineFeed () where
  _LineFeed :: Prism' () ()
_LineFeed =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

instance AsLineFeed Char where
  _LineFeed :: Prism' Char ()
_LineFeed =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Char
'\10')
      (\case
          Char
'\10' -> forall a. a -> Maybe a
Just ()
          Char
_ -> forall a. Maybe a
Nothing
      )

instance AsLineFeed Int where
  _LineFeed :: Prism' Int ()
_LineFeed =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Int
10)
      (\case
          Int
10 -> forall a. a -> Maybe a
Just ()
          Int
_ -> forall a. Maybe a
Nothing
      )

instance AsLineFeed Integer where
  _LineFeed :: Prism' Integer ()
_LineFeed =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Integer
10)
      (\case
          Integer
10 -> forall a. a -> Maybe a
Just ()
          Integer
_ -> forall a. Maybe a
Nothing
      )

parseLineFeed ::
  CharParsing p =>
  p ()
parseLineFeed :: forall (p :: * -> *). CharParsing p => p ()
parseLineFeed =
  forall (f :: * -> *). CharParsing f => (Char -> Bool) -> f ()
satisfy' (forall a. Eq a => a -> a -> Bool
== Char
'\10') forall (m :: * -> *) a. Parsing m => m a -> String -> m a
<?> String
"line feed character"

class HasVerticalTab a where
  verticalTab :: Lens' a ()

instance HasVerticalTab () where
  verticalTab :: Lens' () ()
verticalTab =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

class AsVerticalTab a where
  _VerticalTab :: Prism' a ()
  _VerticalTab' :: a
  _VerticalTab' = forall a. AsVerticalTab a => Prism' a ()
_VerticalTab forall t b. AReview t b -> b -> t
# ()

instance AsVerticalTab () where
  _VerticalTab :: Prism' () ()
_VerticalTab =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

instance AsVerticalTab Char where
  _VerticalTab :: Prism' Char ()
_VerticalTab =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Char
'\11')
      (\case
          Char
'\11' -> forall a. a -> Maybe a
Just ()
          Char
_ -> forall a. Maybe a
Nothing
      )

instance AsVerticalTab Int where
  _VerticalTab :: Prism' Int ()
_VerticalTab =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Int
11)
      (\case
          Int
11 -> forall a. a -> Maybe a
Just ()
          Int
_ -> forall a. Maybe a
Nothing
      )

instance AsVerticalTab Integer where
  _VerticalTab :: Prism' Integer ()
_VerticalTab =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Integer
11)
      (\case
          Integer
11 -> forall a. a -> Maybe a
Just ()
          Integer
_ -> forall a. Maybe a
Nothing
      )

parseVerticalTab ::
  CharParsing p =>
  p ()
parseVerticalTab :: forall (p :: * -> *). CharParsing p => p ()
parseVerticalTab =
  forall (f :: * -> *). CharParsing f => (Char -> Bool) -> f ()
satisfy' (forall a. Eq a => a -> a -> Bool
== Char
'\11') forall (m :: * -> *) a. Parsing m => m a -> String -> m a
<?> String
"vertical tab character"

class HasFormFeed a where
  formFeed :: Lens' a ()

instance HasFormFeed () where
  formFeed :: Lens' () ()
formFeed =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

class AsFormFeed a where
  _FormFeed :: Prism' a ()
  _FormFeed' :: a
  _FormFeed' = forall a. AsFormFeed a => Prism' a ()
_FormFeed forall t b. AReview t b -> b -> t
# ()

instance AsFormFeed () where
  _FormFeed :: Prism' () ()
_FormFeed =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

instance AsFormFeed Char where
  _FormFeed :: Prism' Char ()
_FormFeed =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Char
'\12')
      (\case
          Char
'\12' -> forall a. a -> Maybe a
Just ()
          Char
_ -> forall a. Maybe a
Nothing
      )

instance AsFormFeed Int where
  _FormFeed :: Prism' Int ()
_FormFeed =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Int
12)
      (\case
          Int
12 -> forall a. a -> Maybe a
Just ()
          Int
_ -> forall a. Maybe a
Nothing
      )

instance AsFormFeed Integer where
  _FormFeed :: Prism' Integer ()
_FormFeed =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Integer
12)
      (\case
          Integer
12 -> forall a. a -> Maybe a
Just ()
          Integer
_ -> forall a. Maybe a
Nothing
      )

parseFormFeed ::
  CharParsing p =>
  p ()
parseFormFeed :: forall (p :: * -> *). CharParsing p => p ()
parseFormFeed =
  forall (f :: * -> *). CharParsing f => (Char -> Bool) -> f ()
satisfy' (forall a. Eq a => a -> a -> Bool
== Char
'\12') forall (m :: * -> *) a. Parsing m => m a -> String -> m a
<?> String
"form feed character"

class HasCarriageReturn a where
  carriageReturn :: Lens' a ()

instance HasCarriageReturn () where
  carriageReturn :: Lens' () ()
carriageReturn =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

class AsCarriageReturn a where
  _CarriageReturn :: Prism' a ()
  _CarriageReturn' :: a
  _CarriageReturn' = forall a. AsCarriageReturn a => Prism' a ()
_CarriageReturn forall t b. AReview t b -> b -> t
# ()

instance AsCarriageReturn () where
  _CarriageReturn :: Prism' () ()
_CarriageReturn =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

instance AsCarriageReturn Char where
  _CarriageReturn :: Prism' Char ()
_CarriageReturn =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Char
'\13')
      (\case
          Char
'\13' -> forall a. a -> Maybe a
Just ()
          Char
_ -> forall a. Maybe a
Nothing
      )

instance AsCarriageReturn Int where
  _CarriageReturn :: Prism' Int ()
_CarriageReturn =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Int
13)
      (\case
          Int
13 -> forall a. a -> Maybe a
Just ()
          Int
_ -> forall a. Maybe a
Nothing
      )

instance AsCarriageReturn Integer where
  _CarriageReturn :: Prism' Integer ()
_CarriageReturn =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Integer
13)
      (\case
          Integer
13 -> forall a. a -> Maybe a
Just ()
          Integer
_ -> forall a. Maybe a
Nothing
      )

parseCarriageReturn ::
  CharParsing p =>
  p ()
parseCarriageReturn :: forall (p :: * -> *). CharParsing p => p ()
parseCarriageReturn =
  forall (f :: * -> *). CharParsing f => (Char -> Bool) -> f ()
satisfy' (forall a. Eq a => a -> a -> Bool
== Char
'\13') forall (m :: * -> *) a. Parsing m => m a -> String -> m a
<?> String
"carriage return character"

class HasWhitespace a where
  whitespace :: Lens' a ()

instance HasWhitespace () where
  whitespace :: Lens' () ()
whitespace =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

class AsWhitespace a where
  _Whitespace :: Prism' a ()
  _Whitespace' :: a
  _Whitespace' = forall a. AsWhitespace a => Prism' a ()
_Whitespace forall t b. AReview t b -> b -> t
# ()

instance AsWhitespace () where
  _Whitespace :: Prism' () ()
_Whitespace =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

instance AsWhitespace Char where
  _Whitespace :: Prism' Char ()
_Whitespace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Char
'\32')
      (\case
          Char
'\32' -> forall a. a -> Maybe a
Just ()
          Char
_ -> forall a. Maybe a
Nothing
      )

instance AsWhitespace Int where
  _Whitespace :: Prism' Int ()
_Whitespace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Int
32)
      (\case
          Int
32 -> forall a. a -> Maybe a
Just ()
          Int
_ -> forall a. Maybe a
Nothing
      )

instance AsWhitespace Integer where
  _Whitespace :: Prism' Integer ()
_Whitespace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Integer
32)
      (\case
          Integer
32 -> forall a. a -> Maybe a
Just ()
          Integer
_ -> forall a. Maybe a
Nothing
      )

parseWhitespace ::
  CharParsing p =>
  p ()
parseWhitespace :: forall (p :: * -> *). CharParsing p => p ()
parseWhitespace =
  forall (f :: * -> *). CharParsing f => (Char -> Bool) -> f ()
satisfy' (forall a. Eq a => a -> a -> Bool
== Char
'\32') forall (m :: * -> *) a. Parsing m => m a -> String -> m a
<?> String
"whitespace character"

class HasNoBreakSpace a where
  noBreakSpace :: Lens' a ()

instance HasNoBreakSpace () where
  noBreakSpace :: Lens' () ()
noBreakSpace =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

class AsNoBreakSpace a where
  _NoBreakSpace :: Prism' a ()
  _NoBreakSpace' :: a
  _NoBreakSpace' = forall a. AsNoBreakSpace a => Prism' a ()
_NoBreakSpace forall t b. AReview t b -> b -> t
# ()

instance AsNoBreakSpace () where
  _NoBreakSpace :: Prism' () ()
_NoBreakSpace =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

instance AsNoBreakSpace Char where
  _NoBreakSpace :: Prism' Char ()
_NoBreakSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Char
'\160')
      (\case
          Char
'\160' -> forall a. a -> Maybe a
Just ()
          Char
_ -> forall a. Maybe a
Nothing
      )

instance AsNoBreakSpace Int where
  _NoBreakSpace :: Prism' Int ()
_NoBreakSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Int
160)
      (\case
          Int
160 -> forall a. a -> Maybe a
Just ()
          Int
_ -> forall a. Maybe a
Nothing
      )

instance AsNoBreakSpace Integer where
  _NoBreakSpace :: Prism' Integer ()
_NoBreakSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Integer
160)
      (\case
          Integer
160 -> forall a. a -> Maybe a
Just ()
          Integer
_ -> forall a. Maybe a
Nothing
      )

parseNoBreakSpace ::
  CharParsing p =>
  p ()
parseNoBreakSpace :: forall (p :: * -> *). CharParsing p => p ()
parseNoBreakSpace =
  forall (f :: * -> *). CharParsing f => (Char -> Bool) -> f ()
satisfy' (forall a. Eq a => a -> a -> Bool
== Char
'\160') forall (m :: * -> *) a. Parsing m => m a -> String -> m a
<?> String
"no break space character"

class HasOghamSpaceMark a where
  oghamSpaceMark :: Lens' a ()

instance HasOghamSpaceMark () where
  oghamSpaceMark :: Lens' () ()
oghamSpaceMark =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

class AsOghamSpaceMark a where
  _OghamSpaceMark :: Prism' a ()
  _OghamSpaceMark' :: a
  _OghamSpaceMark' = forall a. AsOghamSpaceMark a => Prism' a ()
_OghamSpaceMark forall t b. AReview t b -> b -> t
# ()

instance AsOghamSpaceMark () where
  _OghamSpaceMark :: Prism' () ()
_OghamSpaceMark =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

instance AsOghamSpaceMark Char where
  _OghamSpaceMark :: Prism' Char ()
_OghamSpaceMark =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Char
'\5760')
      (\case
          Char
'\5760' -> forall a. a -> Maybe a
Just ()
          Char
_ -> forall a. Maybe a
Nothing
      )

instance AsOghamSpaceMark Int where
  _OghamSpaceMark :: Prism' Int ()
_OghamSpaceMark =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Int
5760)
      (\case
          Int
5760 -> forall a. a -> Maybe a
Just ()
          Int
_ -> forall a. Maybe a
Nothing
      )

instance AsOghamSpaceMark Integer where
  _OghamSpaceMark :: Prism' Integer ()
_OghamSpaceMark =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Integer
5760)
      (\case
          Integer
5760 -> forall a. a -> Maybe a
Just ()
          Integer
_ -> forall a. Maybe a
Nothing
      )

parseOghamSpaceMark ::
  CharParsing p =>
  p ()
parseOghamSpaceMark :: forall (p :: * -> *). CharParsing p => p ()
parseOghamSpaceMark =
  forall (f :: * -> *). CharParsing f => (Char -> Bool) -> f ()
satisfy' (forall a. Eq a => a -> a -> Bool
== Char
'\5760') forall (m :: * -> *) a. Parsing m => m a -> String -> m a
<?> String
"ogham space mark character"

class HasEnQuad a where
  enQuad :: Lens' a ()

instance HasEnQuad () where
  enQuad :: Lens' () ()
enQuad =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

class AsEnQuad a where
  _EnQuad :: Prism' a ()
  _EnQuad' :: a
  _EnQuad' = forall a. AsEnQuad a => Prism' a ()
_EnQuad forall t b. AReview t b -> b -> t
# ()

instance AsEnQuad () where
  _EnQuad :: Prism' () ()
_EnQuad =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

instance AsEnQuad Char where
  _EnQuad :: Prism' Char ()
_EnQuad =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Char
'\8192')
      (\case
          Char
'\8192' -> forall a. a -> Maybe a
Just ()
          Char
_ -> forall a. Maybe a
Nothing
      )

instance AsEnQuad Int where
  _EnQuad :: Prism' Int ()
_EnQuad =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Int
8192)
      (\case
          Int
8192 -> forall a. a -> Maybe a
Just ()
          Int
_ -> forall a. Maybe a
Nothing
      )

instance AsEnQuad Integer where
  _EnQuad :: Prism' Integer ()
_EnQuad =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Integer
8192)
      (\case
          Integer
8192 -> forall a. a -> Maybe a
Just ()
          Integer
_ -> forall a. Maybe a
Nothing
      )

parseEnQuad ::
  CharParsing p =>
  p ()
parseEnQuad :: forall (p :: * -> *). CharParsing p => p ()
parseEnQuad =
  forall (f :: * -> *). CharParsing f => (Char -> Bool) -> f ()
satisfy' (forall a. Eq a => a -> a -> Bool
== Char
'\8192') forall (m :: * -> *) a. Parsing m => m a -> String -> m a
<?> String
"en quad character"

class HasEmQuad a where
  emQuad :: Lens' a ()

instance HasEmQuad () where
  emQuad :: Lens' () ()
emQuad =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

class AsEmQuad a where
  _EmQuad :: Prism' a ()
  _EmQuad' :: a
  _EmQuad' = forall a. AsEmQuad a => Prism' a ()
_EmQuad forall t b. AReview t b -> b -> t
# ()

instance AsEmQuad () where
  _EmQuad :: Prism' () ()
_EmQuad =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

instance AsEmQuad Char where
  _EmQuad :: Prism' Char ()
_EmQuad =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Char
'\8193')
      (\case
          Char
'\8193' -> forall a. a -> Maybe a
Just ()
          Char
_ -> forall a. Maybe a
Nothing
      )

instance AsEmQuad Int where
  _EmQuad :: Prism' Int ()
_EmQuad =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Int
8193)
      (\case
          Int
8193 -> forall a. a -> Maybe a
Just ()
          Int
_ -> forall a. Maybe a
Nothing
      )

instance AsEmQuad Integer where
  _EmQuad :: Prism' Integer ()
_EmQuad =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Integer
8193)
      (\case
          Integer
8193 -> forall a. a -> Maybe a
Just ()
          Integer
_ -> forall a. Maybe a
Nothing
      )

parseEmQuad ::
  CharParsing p =>
  p ()
parseEmQuad :: forall (p :: * -> *). CharParsing p => p ()
parseEmQuad =
  forall (f :: * -> *). CharParsing f => (Char -> Bool) -> f ()
satisfy' (forall a. Eq a => a -> a -> Bool
== Char
'\8193') forall (m :: * -> *) a. Parsing m => m a -> String -> m a
<?> String
"em quad character"

class HasEnSpace a where
  enSpace :: Lens' a ()

instance HasEnSpace () where
  enSpace :: Lens' () ()
enSpace =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

class AsEnSpace a where
  _EnSpace :: Prism' a ()
  _EnSpace' :: a
  _EnSpace' = forall a. AsEnSpace a => Prism' a ()
_EnSpace forall t b. AReview t b -> b -> t
# ()

instance AsEnSpace () where
  _EnSpace :: Prism' () ()
_EnSpace =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

instance AsEnSpace Char where
  _EnSpace :: Prism' Char ()
_EnSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Char
'\8194')
      (\case
          Char
'\8194' -> forall a. a -> Maybe a
Just ()
          Char
_ -> forall a. Maybe a
Nothing
      )

instance AsEnSpace Int where
  _EnSpace :: Prism' Int ()
_EnSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Int
8194)
      (\case
          Int
8194 -> forall a. a -> Maybe a
Just ()
          Int
_ -> forall a. Maybe a
Nothing
      )

instance AsEnSpace Integer where
  _EnSpace :: Prism' Integer ()
_EnSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Integer
8194)
      (\case
          Integer
8194 -> forall a. a -> Maybe a
Just ()
          Integer
_ -> forall a. Maybe a
Nothing
      )

parseEnSpace ::
  CharParsing p =>
  p ()
parseEnSpace :: forall (p :: * -> *). CharParsing p => p ()
parseEnSpace =
  forall (f :: * -> *). CharParsing f => (Char -> Bool) -> f ()
satisfy' (forall a. Eq a => a -> a -> Bool
== Char
'\8194') forall (m :: * -> *) a. Parsing m => m a -> String -> m a
<?> String
"en space character"

class HasEmSpace a where
  emSpace :: Lens' a ()

instance HasEmSpace () where
  emSpace :: Lens' () ()
emSpace =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

class AsEmSpace a where
  _EmSpace :: Prism' a ()
  _EmSpace' :: a
  _EmSpace' = forall a. AsEmSpace a => Prism' a ()
_EmSpace forall t b. AReview t b -> b -> t
# ()

instance AsEmSpace () where
  _EmSpace :: Prism' () ()
_EmSpace =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

instance AsEmSpace Char where
  _EmSpace :: Prism' Char ()
_EmSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Char
'\8195')
      (\case
          Char
'\8195' -> forall a. a -> Maybe a
Just ()
          Char
_ -> forall a. Maybe a
Nothing
      )

instance AsEmSpace Int where
  _EmSpace :: Prism' Int ()
_EmSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Int
8195)
      (\case
          Int
8195 -> forall a. a -> Maybe a
Just ()
          Int
_ -> forall a. Maybe a
Nothing
      )

instance AsEmSpace Integer where
  _EmSpace :: Prism' Integer ()
_EmSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Integer
8195)
      (\case
          Integer
8195 -> forall a. a -> Maybe a
Just ()
          Integer
_ -> forall a. Maybe a
Nothing
      )

parseEmSpace ::
  CharParsing p =>
  p ()
parseEmSpace :: forall (p :: * -> *). CharParsing p => p ()
parseEmSpace =
  forall (f :: * -> *). CharParsing f => (Char -> Bool) -> f ()
satisfy' (forall a. Eq a => a -> a -> Bool
== Char
'\8195') forall (m :: * -> *) a. Parsing m => m a -> String -> m a
<?> String
"em space character"

class HasThreePerEmSpace a where
  threePerEmSpace :: Lens' a ()

instance HasThreePerEmSpace () where
  threePerEmSpace :: Lens' () ()
threePerEmSpace =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

class AsThreePerEmSpace a where
  _ThreePerEmSpace :: Prism' a ()
  _ThreePerEmSpace' :: a
  _ThreePerEmSpace' = forall a. AsThreePerEmSpace a => Prism' a ()
_ThreePerEmSpace forall t b. AReview t b -> b -> t
# ()

instance AsThreePerEmSpace () where
  _ThreePerEmSpace :: Prism' () ()
_ThreePerEmSpace =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

instance AsThreePerEmSpace Char where
  _ThreePerEmSpace :: Prism' Char ()
_ThreePerEmSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Char
'\8196')
      (\case
          Char
'\8196' -> forall a. a -> Maybe a
Just ()
          Char
_ -> forall a. Maybe a
Nothing
      )

instance AsThreePerEmSpace Int where
  _ThreePerEmSpace :: Prism' Int ()
_ThreePerEmSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Int
8196)
      (\case
          Int
8196 -> forall a. a -> Maybe a
Just ()
          Int
_ -> forall a. Maybe a
Nothing
      )

instance AsThreePerEmSpace Integer where
  _ThreePerEmSpace :: Prism' Integer ()
_ThreePerEmSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Integer
8196)
      (\case
          Integer
8196 -> forall a. a -> Maybe a
Just ()
          Integer
_ -> forall a. Maybe a
Nothing
      )

parseThreePerEmSpace ::
  CharParsing p =>
  p ()
parseThreePerEmSpace :: forall (p :: * -> *). CharParsing p => p ()
parseThreePerEmSpace =
  forall (f :: * -> *). CharParsing f => (Char -> Bool) -> f ()
satisfy' (forall a. Eq a => a -> a -> Bool
== Char
'\8196') forall (m :: * -> *) a. Parsing m => m a -> String -> m a
<?> String
"three per em space character"

class HasFourPerEmSpace a where
  fourPerEmSpace :: Lens' a ()

instance HasFourPerEmSpace () where
  fourPerEmSpace :: Lens' () ()
fourPerEmSpace =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

class AsFourPerEmSpace a where
  _FourPerEmSpace :: Prism' a ()
  _FourPerEmSpace' :: a
  _FourPerEmSpace' = forall a. AsFourPerEmSpace a => Prism' a ()
_FourPerEmSpace forall t b. AReview t b -> b -> t
# ()

instance AsFourPerEmSpace () where
  _FourPerEmSpace :: Prism' () ()
_FourPerEmSpace =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

instance AsFourPerEmSpace Char where
  _FourPerEmSpace :: Prism' Char ()
_FourPerEmSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Char
'\8197')
      (\case
          Char
'\8197' -> forall a. a -> Maybe a
Just ()
          Char
_ -> forall a. Maybe a
Nothing
      )

instance AsFourPerEmSpace Int where
  _FourPerEmSpace :: Prism' Int ()
_FourPerEmSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Int
8197)
      (\case
          Int
8197 -> forall a. a -> Maybe a
Just ()
          Int
_ -> forall a. Maybe a
Nothing
      )

instance AsFourPerEmSpace Integer where
  _FourPerEmSpace :: Prism' Integer ()
_FourPerEmSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Integer
8197)
      (\case
          Integer
8197 -> forall a. a -> Maybe a
Just ()
          Integer
_ -> forall a. Maybe a
Nothing
      )

parseFourPerEmSpace ::
  CharParsing p =>
  p ()
parseFourPerEmSpace :: forall (p :: * -> *). CharParsing p => p ()
parseFourPerEmSpace =
  forall (f :: * -> *). CharParsing f => (Char -> Bool) -> f ()
satisfy' (forall a. Eq a => a -> a -> Bool
== Char
'\8197') forall (m :: * -> *) a. Parsing m => m a -> String -> m a
<?> String
"four per em space character"

class HasSixPerEmSpace a where
  sixPerEmSpace :: Lens' a ()

instance HasSixPerEmSpace () where
  sixPerEmSpace :: Lens' () ()
sixPerEmSpace =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

class AsSixPerEmSpace a where
  _SixPerEmSpace :: Prism' a ()
  _SixPerEmSpace' :: a
  _SixPerEmSpace' = forall a. AsSixPerEmSpace a => Prism' a ()
_SixPerEmSpace forall t b. AReview t b -> b -> t
# ()

instance AsSixPerEmSpace () where
  _SixPerEmSpace :: Prism' () ()
_SixPerEmSpace =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

instance AsSixPerEmSpace Char where
  _SixPerEmSpace :: Prism' Char ()
_SixPerEmSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Char
'\8198')
      (\case
          Char
'\8198' -> forall a. a -> Maybe a
Just ()
          Char
_ -> forall a. Maybe a
Nothing
      )

instance AsSixPerEmSpace Int where
  _SixPerEmSpace :: Prism' Int ()
_SixPerEmSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Int
8198)
      (\case
          Int
8198 -> forall a. a -> Maybe a
Just ()
          Int
_ -> forall a. Maybe a
Nothing
      )

instance AsSixPerEmSpace Integer where
  _SixPerEmSpace :: Prism' Integer ()
_SixPerEmSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Integer
8198)
      (\case
          Integer
8198 -> forall a. a -> Maybe a
Just ()
          Integer
_ -> forall a. Maybe a
Nothing
      )

parseSixPerEmSpace ::
  CharParsing p =>
  p ()
parseSixPerEmSpace :: forall (p :: * -> *). CharParsing p => p ()
parseSixPerEmSpace =
  forall (f :: * -> *). CharParsing f => (Char -> Bool) -> f ()
satisfy' (forall a. Eq a => a -> a -> Bool
== Char
'\8198') forall (m :: * -> *) a. Parsing m => m a -> String -> m a
<?> String
"six per em space character"

class HasFigureSpace a where
  figureSpace :: Lens' a ()

instance HasFigureSpace () where
  figureSpace :: Lens' () ()
figureSpace =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

class AsFigureSpace a where
  _FigureSpace :: Prism' a ()
  _FigureSpace' :: a
  _FigureSpace' = forall a. AsFigureSpace a => Prism' a ()
_FigureSpace forall t b. AReview t b -> b -> t
# ()

instance AsFigureSpace () where
  _FigureSpace :: Prism' () ()
_FigureSpace =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

instance AsFigureSpace Char where
  _FigureSpace :: Prism' Char ()
_FigureSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Char
'\8199')
      (\case
          Char
'\8199' -> forall a. a -> Maybe a
Just ()
          Char
_ -> forall a. Maybe a
Nothing
      )

instance AsFigureSpace Int where
  _FigureSpace :: Prism' Int ()
_FigureSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Int
8199)
      (\case
          Int
8199 -> forall a. a -> Maybe a
Just ()
          Int
_ -> forall a. Maybe a
Nothing
      )

instance AsFigureSpace Integer where
  _FigureSpace :: Prism' Integer ()
_FigureSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Integer
8199)
      (\case
          Integer
8199 -> forall a. a -> Maybe a
Just ()
          Integer
_ -> forall a. Maybe a
Nothing
      )

parseFigureSpace ::
  CharParsing p =>
  p ()
parseFigureSpace :: forall (p :: * -> *). CharParsing p => p ()
parseFigureSpace =
  forall (f :: * -> *). CharParsing f => (Char -> Bool) -> f ()
satisfy' (forall a. Eq a => a -> a -> Bool
== Char
'\8199') forall (m :: * -> *) a. Parsing m => m a -> String -> m a
<?> String
"figure space character"

class HasPunctuationSpace a where
  punctuationSpace :: Lens' a ()

instance HasPunctuationSpace () where
  punctuationSpace :: Lens' () ()
punctuationSpace =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

class AsPunctuationSpace a where
  _PunctuationSpace :: Prism' a ()
  _PunctuationSpace' :: a
  _PunctuationSpace' = forall a. AsPunctuationSpace a => Prism' a ()
_PunctuationSpace forall t b. AReview t b -> b -> t
# ()

instance AsPunctuationSpace () where
  _PunctuationSpace :: Prism' () ()
_PunctuationSpace =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

instance AsPunctuationSpace Char where
  _PunctuationSpace :: Prism' Char ()
_PunctuationSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Char
'\8200')
      (\case
          Char
'\8200' -> forall a. a -> Maybe a
Just ()
          Char
_ -> forall a. Maybe a
Nothing
      )

instance AsPunctuationSpace Int where
  _PunctuationSpace :: Prism' Int ()
_PunctuationSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Int
8200)
      (\case
          Int
8200 -> forall a. a -> Maybe a
Just ()
          Int
_ -> forall a. Maybe a
Nothing
      )

instance AsPunctuationSpace Integer where
  _PunctuationSpace :: Prism' Integer ()
_PunctuationSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Integer
8200)
      (\case
          Integer
8200 -> forall a. a -> Maybe a
Just ()
          Integer
_ -> forall a. Maybe a
Nothing
      )

parsePunctuationSpace ::
  CharParsing p =>
  p ()
parsePunctuationSpace :: forall (p :: * -> *). CharParsing p => p ()
parsePunctuationSpace =
  forall (f :: * -> *). CharParsing f => (Char -> Bool) -> f ()
satisfy' (forall a. Eq a => a -> a -> Bool
== Char
'\8200') forall (m :: * -> *) a. Parsing m => m a -> String -> m a
<?> String
"punctuation space character"

class HasThinSpace a where
  thinSpace :: Lens' a ()

instance HasThinSpace () where
  thinSpace :: Lens' () ()
thinSpace =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

class AsThinSpace a where
  _ThinSpace :: Prism' a ()
  _ThinSpace' :: a
  _ThinSpace' = forall a. AsThinSpace a => Prism' a ()
_ThinSpace forall t b. AReview t b -> b -> t
# ()

instance AsThinSpace () where
  _ThinSpace :: Prism' () ()
_ThinSpace =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

instance AsThinSpace Char where
  _ThinSpace :: Prism' Char ()
_ThinSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Char
'\8201')
      (\case
          Char
'\8201' -> forall a. a -> Maybe a
Just ()
          Char
_ -> forall a. Maybe a
Nothing
      )

instance AsThinSpace Int where
  _ThinSpace :: Prism' Int ()
_ThinSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Int
8201)
      (\case
          Int
8201 -> forall a. a -> Maybe a
Just ()
          Int
_ -> forall a. Maybe a
Nothing
      )

instance AsThinSpace Integer where
  _ThinSpace :: Prism' Integer ()
_ThinSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Integer
8201)
      (\case
          Integer
8201 -> forall a. a -> Maybe a
Just ()
          Integer
_ -> forall a. Maybe a
Nothing
      )

parseThinSpace ::
  CharParsing p =>
  p ()
parseThinSpace :: forall (p :: * -> *). CharParsing p => p ()
parseThinSpace =
  forall (f :: * -> *). CharParsing f => (Char -> Bool) -> f ()
satisfy' (forall a. Eq a => a -> a -> Bool
== Char
'\8201') forall (m :: * -> *) a. Parsing m => m a -> String -> m a
<?> String
"thin space character"

class HasHairSpace a where
  hairSpace :: Lens' a ()

instance HasHairSpace () where
  hairSpace :: Lens' () ()
hairSpace =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

class AsHairSpace a where
  _HairSpace :: Prism' a ()
  _HairSpace' :: a
  _HairSpace' = forall a. AsHairSpace a => Prism' a ()
_HairSpace forall t b. AReview t b -> b -> t
# ()

instance AsHairSpace () where
  _HairSpace :: Prism' () ()
_HairSpace =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

instance AsHairSpace Char where
  _HairSpace :: Prism' Char ()
_HairSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Char
'\8202')
      (\case
          Char
'\8202' -> forall a. a -> Maybe a
Just ()
          Char
_ -> forall a. Maybe a
Nothing
      )

instance AsHairSpace Int where
  _HairSpace :: Prism' Int ()
_HairSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Int
8202)
      (\case
          Int
8202 -> forall a. a -> Maybe a
Just ()
          Int
_ -> forall a. Maybe a
Nothing
      )

instance AsHairSpace Integer where
  _HairSpace :: Prism' Integer ()
_HairSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Integer
8202)
      (\case
          Integer
8202 -> forall a. a -> Maybe a
Just ()
          Integer
_ -> forall a. Maybe a
Nothing
      )

parseHairSpace ::
  CharParsing p =>
  p ()
parseHairSpace :: forall (p :: * -> *). CharParsing p => p ()
parseHairSpace =
  forall (f :: * -> *). CharParsing f => (Char -> Bool) -> f ()
satisfy' (forall a. Eq a => a -> a -> Bool
== Char
'\8202') forall (m :: * -> *) a. Parsing m => m a -> String -> m a
<?> String
"hair space character"

class HasNarrowNoBreakSpace a where
  narrowNoBreakSpace :: Lens' a ()

instance HasNarrowNoBreakSpace () where
  narrowNoBreakSpace :: Lens' () ()
narrowNoBreakSpace =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

class AsNarrowNoBreakSpace a where
  _NarrowNoBreakSpace :: Prism' a ()
  _NarrowNoBreakSpace' :: a
  _NarrowNoBreakSpace' = forall a. AsNarrowNoBreakSpace a => Prism' a ()
_NarrowNoBreakSpace forall t b. AReview t b -> b -> t
# ()

instance AsNarrowNoBreakSpace () where
  _NarrowNoBreakSpace :: Prism' () ()
_NarrowNoBreakSpace =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

instance AsNarrowNoBreakSpace Char where
  _NarrowNoBreakSpace :: Prism' Char ()
_NarrowNoBreakSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Char
'\8239')
      (\case
          Char
'\8239' -> forall a. a -> Maybe a
Just ()
          Char
_ -> forall a. Maybe a
Nothing
      )

instance AsNarrowNoBreakSpace Int where
  _NarrowNoBreakSpace :: Prism' Int ()
_NarrowNoBreakSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Int
8239)
      (\case
          Int
8239 -> forall a. a -> Maybe a
Just ()
          Int
_ -> forall a. Maybe a
Nothing
      )

instance AsNarrowNoBreakSpace Integer where
  _NarrowNoBreakSpace :: Prism' Integer ()
_NarrowNoBreakSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Integer
8239)
      (\case
          Integer
8239 -> forall a. a -> Maybe a
Just ()
          Integer
_ -> forall a. Maybe a
Nothing
      )

parseNarrowNoBreakSpace ::
  CharParsing p =>
  p ()
parseNarrowNoBreakSpace :: forall (p :: * -> *). CharParsing p => p ()
parseNarrowNoBreakSpace =
  forall (f :: * -> *). CharParsing f => (Char -> Bool) -> f ()
satisfy' (forall a. Eq a => a -> a -> Bool
== Char
'\8239') forall (m :: * -> *) a. Parsing m => m a -> String -> m a
<?> String
"narrow no break space character"

class HasMediumMathematicalSpace a where
  mediumMathematicalSpace :: Lens' a ()

instance HasMediumMathematicalSpace () where
  mediumMathematicalSpace :: Lens' () ()
mediumMathematicalSpace =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

class AsMediumMathematicalSpace a where
  _MediumMathematicalSpace :: Prism' a ()
  _MediumMathematicalSpace' :: a
  _MediumMathematicalSpace' = forall a. AsMediumMathematicalSpace a => Prism' a ()
_MediumMathematicalSpace forall t b. AReview t b -> b -> t
# ()

instance AsMediumMathematicalSpace () where
  _MediumMathematicalSpace :: Prism' () ()
_MediumMathematicalSpace =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

instance AsMediumMathematicalSpace Char where
  _MediumMathematicalSpace :: Prism' Char ()
_MediumMathematicalSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Char
'\8287')
      (\case
          Char
'\8287' -> forall a. a -> Maybe a
Just ()
          Char
_ -> forall a. Maybe a
Nothing
      )

instance AsMediumMathematicalSpace Int where
  _MediumMathematicalSpace :: Prism' Int ()
_MediumMathematicalSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Int
8287)
      (\case
          Int
8287 -> forall a. a -> Maybe a
Just ()
          Int
_ -> forall a. Maybe a
Nothing
      )

instance AsMediumMathematicalSpace Integer where
  _MediumMathematicalSpace :: Prism' Integer ()
_MediumMathematicalSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Integer
8287)
      (\case
          Integer
8287 -> forall a. a -> Maybe a
Just ()
          Integer
_ -> forall a. Maybe a
Nothing
      )

parseMediumMathematicalSpace ::
  CharParsing p =>
  p ()
parseMediumMathematicalSpace :: forall (p :: * -> *). CharParsing p => p ()
parseMediumMathematicalSpace =
  forall (f :: * -> *). CharParsing f => (Char -> Bool) -> f ()
satisfy' (forall a. Eq a => a -> a -> Bool
== Char
'\8287') forall (m :: * -> *) a. Parsing m => m a -> String -> m a
<?> String
"medium mathematical space character"

class HasIdeographicSpace a where
  ideographicSpace :: Lens' a ()

instance HasIdeographicSpace () where
  ideographicSpace :: Lens' () ()
ideographicSpace =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

class AsIdeographicSpace a where
  _IdeographicSpace :: Prism' a ()
  _IdeographicSpace' :: a
  _IdeographicSpace' = forall a. AsIdeographicSpace a => Prism' a ()
_IdeographicSpace forall t b. AReview t b -> b -> t
# ()

instance AsIdeographicSpace () where
  _IdeographicSpace :: Prism' () ()
_IdeographicSpace =
    forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

instance AsIdeographicSpace Char where
  _IdeographicSpace :: Prism' Char ()
_IdeographicSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Char
'\12288')
      (\case
          Char
'\12288' -> forall a. a -> Maybe a
Just ()
          Char
_ -> forall a. Maybe a
Nothing
      )

instance AsIdeographicSpace Int where
  _IdeographicSpace :: Prism' Int ()
_IdeographicSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Int
12288)
      (\case
          Int
12288 -> forall a. a -> Maybe a
Just ()
          Int
_ -> forall a. Maybe a
Nothing
      )

instance AsIdeographicSpace Integer where
  _IdeographicSpace :: Prism' Integer ()
_IdeographicSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> Integer
12288)
      (\case
          Integer
12288 -> forall a. a -> Maybe a
Just ()
          Integer
_ -> forall a. Maybe a
Nothing
      )

parseIdeographicSpace ::
  CharParsing p =>
  p ()
parseIdeographicSpace :: forall (p :: * -> *). CharParsing p => p ()
parseIdeographicSpace =
  forall (f :: * -> *). CharParsing f => (Char -> Bool) -> f ()
satisfy' (forall a. Eq a => a -> a -> Bool
== Char
'\12288') forall (m :: * -> *) a. Parsing m => m a -> String -> m a
<?> String
"ideographic space character"

data SpaceChar =
    IsoLatin1SpaceChar IsoLatin1
  | VerticalTab
  | NoBreakSpace
  | OghamSpaceMark
  | EnQuad
  | EmQuad
  | EnSpace
  | EmSpace
  | ThreePerEmSpace
  | FourPerEmSpace
  | SixPerEmSpace
  | FigureSpace
  | PunctuationSpace
  | ThinSpace
  | HairSpace
  | NarrowNoBreakSpace
  | MediumMathematicalSpace
  | IdeographicSpace
  deriving (SpaceChar -> SpaceChar -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SpaceChar -> SpaceChar -> Bool
$c/= :: SpaceChar -> SpaceChar -> Bool
== :: SpaceChar -> SpaceChar -> Bool
$c== :: SpaceChar -> SpaceChar -> Bool
Eq, Eq SpaceChar
SpaceChar -> SpaceChar -> Bool
SpaceChar -> SpaceChar -> Ordering
SpaceChar -> SpaceChar -> SpaceChar
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
min :: SpaceChar -> SpaceChar -> SpaceChar
$cmin :: SpaceChar -> SpaceChar -> SpaceChar
max :: SpaceChar -> SpaceChar -> SpaceChar
$cmax :: SpaceChar -> SpaceChar -> SpaceChar
>= :: SpaceChar -> SpaceChar -> Bool
$c>= :: SpaceChar -> SpaceChar -> Bool
> :: SpaceChar -> SpaceChar -> Bool
$c> :: SpaceChar -> SpaceChar -> Bool
<= :: SpaceChar -> SpaceChar -> Bool
$c<= :: SpaceChar -> SpaceChar -> Bool
< :: SpaceChar -> SpaceChar -> Bool
$c< :: SpaceChar -> SpaceChar -> Bool
compare :: SpaceChar -> SpaceChar -> Ordering
$ccompare :: SpaceChar -> SpaceChar -> Ordering
Ord, Int -> SpaceChar -> ShowS
[SpaceChar] -> ShowS
SpaceChar -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SpaceChar] -> ShowS
$cshowList :: [SpaceChar] -> ShowS
show :: SpaceChar -> String
$cshow :: SpaceChar -> String
showsPrec :: Int -> SpaceChar -> ShowS
$cshowsPrec :: Int -> SpaceChar -> ShowS
Show, forall x. Rep SpaceChar x -> SpaceChar
forall x. SpaceChar -> Rep SpaceChar x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SpaceChar x -> SpaceChar
$cfrom :: forall x. SpaceChar -> Rep SpaceChar x
Generic)

class HasSpaceChar a where
  spaceChar :: Lens' a SpaceChar

instance HasSpaceChar SpaceChar where
  spaceChar :: Lens' SpaceChar SpaceChar
spaceChar = forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

class AsSpaceChar a where
  _SpaceChar :: Prism' a SpaceChar

instance AsSpaceChar SpaceChar where
  _SpaceChar :: Prism' SpaceChar SpaceChar
_SpaceChar = forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

instance AsSpaceChar Char where
  _SpaceChar :: Prism' Char SpaceChar
_SpaceChar =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\case
        IsoLatin1SpaceChar IsoLatin1
c ->
          forall b (m :: * -> *) t. MonadReader b m => AReview t b -> m t
review forall a. AsIsoLatin1 a => Prism' a IsoLatin1
_IsoLatin1 IsoLatin1
c
        SpaceChar
VerticalTab ->
          Char
'\11'
        SpaceChar
NoBreakSpace ->
          Char
'\160'
        SpaceChar
OghamSpaceMark ->
          Char
'\5760'
        SpaceChar
EnQuad ->
          Char
'\8192'
        SpaceChar
EmQuad ->
          Char
'\8193'
        SpaceChar
EnSpace ->
          Char
'\8194'
        SpaceChar
EmSpace ->
          Char
'\8195'
        SpaceChar
ThreePerEmSpace ->
          Char
'\8196'
        SpaceChar
FourPerEmSpace ->
          Char
'\8197'
        SpaceChar
SixPerEmSpace ->
          Char
'\8198'
        SpaceChar
FigureSpace ->
          Char
'\8199'
        SpaceChar
PunctuationSpace ->
          Char
'\8200'
        SpaceChar
ThinSpace ->
          Char
'\8201'
        SpaceChar
HairSpace ->
          Char
'\8202'
        SpaceChar
NarrowNoBreakSpace ->
          Char
'\8239'
        SpaceChar
MediumMathematicalSpace ->
          Char
'\8287'
        SpaceChar
IdeographicSpace ->
          Char
'\12288'
      )
      (\case
        Char
'\9' ->
          forall a. a -> Maybe a
Just (IsoLatin1 -> SpaceChar
IsoLatin1SpaceChar IsoLatin1
HorizontalTab)
        Char
'\10' ->
          forall a. a -> Maybe a
Just (IsoLatin1 -> SpaceChar
IsoLatin1SpaceChar IsoLatin1
LineFeed)
        Char
'\11' ->
          forall a. a -> Maybe a
Just SpaceChar
VerticalTab
        Char
'\12' ->
          forall a. a -> Maybe a
Just (IsoLatin1 -> SpaceChar
IsoLatin1SpaceChar IsoLatin1
FormFeed)
        Char
'\13' ->
          forall a. a -> Maybe a
Just (IsoLatin1 -> SpaceChar
IsoLatin1SpaceChar IsoLatin1
CarriageReturn)
        Char
'\32' ->
          forall a. a -> Maybe a
Just (IsoLatin1 -> SpaceChar
IsoLatin1SpaceChar IsoLatin1
Whitespace)
        Char
'\160' ->
          forall a. a -> Maybe a
Just SpaceChar
NoBreakSpace
        Char
'\5760' ->
          forall a. a -> Maybe a
Just SpaceChar
OghamSpaceMark
        Char
'\8192' ->
          forall a. a -> Maybe a
Just SpaceChar
EnQuad
        Char
'\8193' ->
          forall a. a -> Maybe a
Just SpaceChar
EmQuad
        Char
'\8194' ->
          forall a. a -> Maybe a
Just SpaceChar
EnSpace
        Char
'\8195' ->
          forall a. a -> Maybe a
Just SpaceChar
EmSpace
        Char
'\8196' ->
          forall a. a -> Maybe a
Just SpaceChar
ThreePerEmSpace
        Char
'\8197' ->
          forall a. a -> Maybe a
Just SpaceChar
FourPerEmSpace
        Char
'\8198' ->
          forall a. a -> Maybe a
Just SpaceChar
SixPerEmSpace
        Char
'\8199' ->
          forall a. a -> Maybe a
Just SpaceChar
FigureSpace
        Char
'\8200' ->
          forall a. a -> Maybe a
Just SpaceChar
PunctuationSpace
        Char
'\8201' ->
          forall a. a -> Maybe a
Just SpaceChar
ThinSpace
        Char
'\8202' ->
          forall a. a -> Maybe a
Just SpaceChar
HairSpace
        Char
'\8239' ->
          forall a. a -> Maybe a
Just SpaceChar
NarrowNoBreakSpace
        Char
'\8287' ->
          forall a. a -> Maybe a
Just SpaceChar
MediumMathematicalSpace
        Char
'\12288' ->
          forall a. a -> Maybe a
Just SpaceChar
IdeographicSpace
        Char
c ->
          IsoLatin1 -> SpaceChar
IsoLatin1SpaceChar forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall s (m :: * -> *) a.
MonadReader s m =>
Getting (First a) s a -> m (Maybe a)
preview forall a. AsIsoLatin1 a => Prism' a IsoLatin1
_IsoLatin1 Char
c
      )

parseSpaceChar ::
  CharParsing p =>
  p SpaceChar
parseSpaceChar :: forall (p :: * -> *). CharParsing p => p SpaceChar
parseSpaceChar =
  forall (t :: * -> *) (f :: * -> *) a.
(Foldable t, Alternative f) =>
t (f a) -> f a
asum [
    IsoLatin1 -> SpaceChar
IsoLatin1SpaceChar forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall (p :: * -> *). CharParsing p => p IsoLatin1
parseIsoLatin1
  , SpaceChar
VerticalTab forall (f :: * -> *) a b. Functor f => a -> f b -> f a
<$ forall (p :: * -> *). CharParsing p => p ()
parseVerticalTab
  , SpaceChar
NoBreakSpace forall (f :: * -> *) a b. Functor f => a -> f b -> f a
<$ forall (p :: * -> *). CharParsing p => p ()
parseNoBreakSpace
  , SpaceChar
OghamSpaceMark forall (f :: * -> *) a b. Functor f => a -> f b -> f a
<$ forall (p :: * -> *). CharParsing p => p ()
parseOghamSpaceMark
  , SpaceChar
EnQuad forall (f :: * -> *) a b. Functor f => a -> f b -> f a
<$ forall (p :: * -> *). CharParsing p => p ()
parseEnQuad
  , SpaceChar
EmQuad forall (f :: * -> *) a b. Functor f => a -> f b -> f a
<$ forall (p :: * -> *). CharParsing p => p ()
parseEmQuad
  , SpaceChar
EnSpace forall (f :: * -> *) a b. Functor f => a -> f b -> f a
<$ forall (p :: * -> *). CharParsing p => p ()
parseEnSpace
  , SpaceChar
EmSpace forall (f :: * -> *) a b. Functor f => a -> f b -> f a
<$ forall (p :: * -> *). CharParsing p => p ()
parseEmSpace
  , SpaceChar
ThreePerEmSpace forall (f :: * -> *) a b. Functor f => a -> f b -> f a
<$ forall (p :: * -> *). CharParsing p => p ()
parseThreePerEmSpace
  , SpaceChar
FourPerEmSpace forall (f :: * -> *) a b. Functor f => a -> f b -> f a
<$ forall (p :: * -> *). CharParsing p => p ()
parseFourPerEmSpace
  , SpaceChar
SixPerEmSpace forall (f :: * -> *) a b. Functor f => a -> f b -> f a
<$ forall (p :: * -> *). CharParsing p => p ()
parseSixPerEmSpace
  , SpaceChar
FigureSpace forall (f :: * -> *) a b. Functor f => a -> f b -> f a
<$ forall (p :: * -> *). CharParsing p => p ()
parseFigureSpace
  , SpaceChar
PunctuationSpace forall (f :: * -> *) a b. Functor f => a -> f b -> f a
<$ forall (p :: * -> *). CharParsing p => p ()
parsePunctuationSpace
  , SpaceChar
ThinSpace forall (f :: * -> *) a b. Functor f => a -> f b -> f a
<$ forall (p :: * -> *). CharParsing p => p ()
parseThinSpace
  , SpaceChar
HairSpace forall (f :: * -> *) a b. Functor f => a -> f b -> f a
<$ forall (p :: * -> *). CharParsing p => p ()
parseHairSpace
  , SpaceChar
NarrowNoBreakSpace forall (f :: * -> *) a b. Functor f => a -> f b -> f a
<$ forall (p :: * -> *). CharParsing p => p ()
parseNarrowNoBreakSpace
  , SpaceChar
MediumMathematicalSpace forall (f :: * -> *) a b. Functor f => a -> f b -> f a
<$ forall (p :: * -> *). CharParsing p => p ()
parseMediumMathematicalSpace
  , SpaceChar
IdeographicSpace forall (f :: * -> *) a b. Functor f => a -> f b -> f a
<$ forall (p :: * -> *). CharParsing p => p ()
parseIdeographicSpace
  ]

instance AsIsoLatin1 SpaceChar where
  _IsoLatin1 :: Prism' SpaceChar IsoLatin1
_IsoLatin1 =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      IsoLatin1 -> SpaceChar
IsoLatin1SpaceChar
      (\case
          IsoLatin1SpaceChar IsoLatin1
x -> forall a. a -> Maybe a
Just IsoLatin1
x
          SpaceChar
_ -> forall a. Maybe a
Nothing
      )

instance AsHorizontalTab SpaceChar where
  _HorizontalTab :: Prism' SpaceChar ()
_HorizontalTab =
    forall a. AsIsoLatin1 a => Prism' a IsoLatin1
_IsoLatin1 forall {k} (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. forall a. AsHorizontalTab a => Prism' a ()
_HorizontalTab

instance AsLineFeed SpaceChar where
  _LineFeed :: Prism' SpaceChar ()
_LineFeed =
    forall a. AsIsoLatin1 a => Prism' a IsoLatin1
_IsoLatin1 forall {k} (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. forall a. AsLineFeed a => Prism' a ()
_LineFeed

instance AsVerticalTab SpaceChar where
  _VerticalTab :: Prism' SpaceChar ()
_VerticalTab =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> SpaceChar
VerticalTab)
      (\case
          SpaceChar
VerticalTab -> forall a. a -> Maybe a
Just ()
          SpaceChar
_ -> forall a. Maybe a
Nothing
      )

instance AsFormFeed SpaceChar where
  _FormFeed :: Prism' SpaceChar ()
_FormFeed =
    forall a. AsIsoLatin1 a => Prism' a IsoLatin1
_IsoLatin1 forall {k} (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. forall a. AsFormFeed a => Prism' a ()
_FormFeed

instance AsCarriageReturn SpaceChar where
  _CarriageReturn :: Prism' SpaceChar ()
_CarriageReturn =
    forall a. AsIsoLatin1 a => Prism' a IsoLatin1
_IsoLatin1 forall {k} (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. forall a. AsCarriageReturn a => Prism' a ()
_CarriageReturn

instance AsWhitespace SpaceChar where
  _Whitespace :: Prism' SpaceChar ()
_Whitespace =
    forall a. AsIsoLatin1 a => Prism' a IsoLatin1
_IsoLatin1 forall {k} (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. forall a. AsWhitespace a => Prism' a ()
_Whitespace

instance AsNoBreakSpace SpaceChar where
  _NoBreakSpace :: Prism' SpaceChar ()
_NoBreakSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> SpaceChar
NoBreakSpace)
      (\case
          SpaceChar
NoBreakSpace -> forall a. a -> Maybe a
Just ()
          SpaceChar
_ -> forall a. Maybe a
Nothing
      )

instance AsOghamSpaceMark SpaceChar where
  _OghamSpaceMark :: Prism' SpaceChar ()
_OghamSpaceMark =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> SpaceChar
OghamSpaceMark)
      (\case
          SpaceChar
OghamSpaceMark -> forall a. a -> Maybe a
Just ()
          SpaceChar
_ -> forall a. Maybe a
Nothing
      )

instance AsEnQuad SpaceChar where
  _EnQuad :: Prism' SpaceChar ()
_EnQuad =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> SpaceChar
EnQuad)
      (\case
          SpaceChar
EnQuad -> forall a. a -> Maybe a
Just ()
          SpaceChar
_ -> forall a. Maybe a
Nothing
      )

instance AsEmQuad SpaceChar where
  _EmQuad :: Prism' SpaceChar ()
_EmQuad =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> SpaceChar
EmQuad)
      (\case
          SpaceChar
EmQuad -> forall a. a -> Maybe a
Just ()
          SpaceChar
_ -> forall a. Maybe a
Nothing
      )

instance AsEnSpace SpaceChar where
  _EnSpace :: Prism' SpaceChar ()
_EnSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> SpaceChar
EnSpace)
      (\case
          SpaceChar
EnSpace -> forall a. a -> Maybe a
Just ()
          SpaceChar
_ -> forall a. Maybe a
Nothing
      )

instance AsEmSpace SpaceChar where
  _EmSpace :: Prism' SpaceChar ()
_EmSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> SpaceChar
EmSpace)
      (\case
          SpaceChar
EmSpace -> forall a. a -> Maybe a
Just ()
          SpaceChar
_ -> forall a. Maybe a
Nothing
      )

instance AsThreePerEmSpace SpaceChar where
  _ThreePerEmSpace :: Prism' SpaceChar ()
_ThreePerEmSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> SpaceChar
ThreePerEmSpace)
      (\case
          SpaceChar
ThreePerEmSpace -> forall a. a -> Maybe a
Just ()
          SpaceChar
_ -> forall a. Maybe a
Nothing
      )

instance AsFourPerEmSpace SpaceChar where
  _FourPerEmSpace :: Prism' SpaceChar ()
_FourPerEmSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> SpaceChar
FourPerEmSpace)
      (\case
          SpaceChar
FourPerEmSpace -> forall a. a -> Maybe a
Just ()
          SpaceChar
_ -> forall a. Maybe a
Nothing
      )

instance AsSixPerEmSpace SpaceChar where
  _SixPerEmSpace :: Prism' SpaceChar ()
_SixPerEmSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> SpaceChar
SixPerEmSpace)
      (\case
          SpaceChar
SixPerEmSpace -> forall a. a -> Maybe a
Just ()
          SpaceChar
_ -> forall a. Maybe a
Nothing
      )

instance AsFigureSpace SpaceChar where
  _FigureSpace :: Prism' SpaceChar ()
_FigureSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> SpaceChar
FigureSpace)
      (\case
          SpaceChar
FigureSpace -> forall a. a -> Maybe a
Just ()
          SpaceChar
_ -> forall a. Maybe a
Nothing
      )

instance AsPunctuationSpace SpaceChar where
  _PunctuationSpace :: Prism' SpaceChar ()
_PunctuationSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> SpaceChar
PunctuationSpace)
      (\case
          SpaceChar
PunctuationSpace -> forall a. a -> Maybe a
Just ()
          SpaceChar
_ -> forall a. Maybe a
Nothing
      )

instance AsThinSpace SpaceChar where
  _ThinSpace :: Prism' SpaceChar ()
_ThinSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> SpaceChar
ThinSpace)
      (\case
          SpaceChar
ThinSpace -> forall a. a -> Maybe a
Just ()
          SpaceChar
_ -> forall a. Maybe a
Nothing
      )

instance AsHairSpace SpaceChar where
  _HairSpace :: Prism' SpaceChar ()
_HairSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> SpaceChar
HairSpace)
      (\case
          SpaceChar
HairSpace -> forall a. a -> Maybe a
Just ()
          SpaceChar
_ -> forall a. Maybe a
Nothing
      )

instance AsNarrowNoBreakSpace SpaceChar where
  _NarrowNoBreakSpace :: Prism' SpaceChar ()
_NarrowNoBreakSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> SpaceChar
NarrowNoBreakSpace)
      (\case
          SpaceChar
NarrowNoBreakSpace -> forall a. a -> Maybe a
Just ()
          SpaceChar
_ -> forall a. Maybe a
Nothing
      )

instance AsMediumMathematicalSpace SpaceChar where
  _MediumMathematicalSpace :: Prism' SpaceChar ()
_MediumMathematicalSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> SpaceChar
MediumMathematicalSpace)
      (\case
          SpaceChar
MediumMathematicalSpace -> forall a. a -> Maybe a
Just ()
          SpaceChar
_ -> forall a. Maybe a
Nothing
      )

instance AsIdeographicSpace SpaceChar where
  _IdeographicSpace :: Prism' SpaceChar ()
_IdeographicSpace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> SpaceChar
IdeographicSpace)
      (\case
          SpaceChar
IdeographicSpace -> forall a. a -> Maybe a
Just ()
          SpaceChar
_ -> forall a. Maybe a
Nothing
      )

data IsoLatin1 =
  HorizontalTab
  | LineFeed
  | FormFeed
  | CarriageReturn
  | Whitespace
  deriving (IsoLatin1 -> IsoLatin1 -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IsoLatin1 -> IsoLatin1 -> Bool
$c/= :: IsoLatin1 -> IsoLatin1 -> Bool
== :: IsoLatin1 -> IsoLatin1 -> Bool
$c== :: IsoLatin1 -> IsoLatin1 -> Bool
Eq, Eq IsoLatin1
IsoLatin1 -> IsoLatin1 -> Bool
IsoLatin1 -> IsoLatin1 -> Ordering
IsoLatin1 -> IsoLatin1 -> IsoLatin1
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
min :: IsoLatin1 -> IsoLatin1 -> IsoLatin1
$cmin :: IsoLatin1 -> IsoLatin1 -> IsoLatin1
max :: IsoLatin1 -> IsoLatin1 -> IsoLatin1
$cmax :: IsoLatin1 -> IsoLatin1 -> IsoLatin1
>= :: IsoLatin1 -> IsoLatin1 -> Bool
$c>= :: IsoLatin1 -> IsoLatin1 -> Bool
> :: IsoLatin1 -> IsoLatin1 -> Bool
$c> :: IsoLatin1 -> IsoLatin1 -> Bool
<= :: IsoLatin1 -> IsoLatin1 -> Bool
$c<= :: IsoLatin1 -> IsoLatin1 -> Bool
< :: IsoLatin1 -> IsoLatin1 -> Bool
$c< :: IsoLatin1 -> IsoLatin1 -> Bool
compare :: IsoLatin1 -> IsoLatin1 -> Ordering
$ccompare :: IsoLatin1 -> IsoLatin1 -> Ordering
Ord, Int -> IsoLatin1 -> ShowS
[IsoLatin1] -> ShowS
IsoLatin1 -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IsoLatin1] -> ShowS
$cshowList :: [IsoLatin1] -> ShowS
show :: IsoLatin1 -> String
$cshow :: IsoLatin1 -> String
showsPrec :: Int -> IsoLatin1 -> ShowS
$cshowsPrec :: Int -> IsoLatin1 -> ShowS
Show, forall x. Rep IsoLatin1 x -> IsoLatin1
forall x. IsoLatin1 -> Rep IsoLatin1 x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep IsoLatin1 x -> IsoLatin1
$cfrom :: forall x. IsoLatin1 -> Rep IsoLatin1 x
Generic)

class HasIsoLatin1 a where
  isoLatin1 :: Lens' a IsoLatin1

instance HasIsoLatin1 IsoLatin1 where
  isoLatin1 :: Lens' IsoLatin1 IsoLatin1
isoLatin1 = forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

class AsIsoLatin1 a where
  _IsoLatin1 :: Prism' a IsoLatin1

instance AsIsoLatin1 Char where
  _IsoLatin1 :: Prism' Char IsoLatin1
_IsoLatin1 =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\case
        IsoLatin1
HorizontalTab ->
          Char
'\9'
        IsoLatin1
LineFeed ->
          Char
'\10'
        IsoLatin1
FormFeed ->
          Char
'\12'
        IsoLatin1
CarriageReturn ->
          Char
'\13'
        IsoLatin1
Whitespace ->
          Char
'\32'
      )
      (\case
        Char
'\9' ->
          forall a. a -> Maybe a
Just IsoLatin1
HorizontalTab
        Char
'\10' ->
          forall a. a -> Maybe a
Just IsoLatin1
LineFeed
        Char
'\12' ->
          forall a. a -> Maybe a
Just IsoLatin1
FormFeed
        Char
'\13' ->
          forall a. a -> Maybe a
Just IsoLatin1
CarriageReturn
        Char
'\32' ->
          forall a. a -> Maybe a
Just IsoLatin1
Whitespace
        Char
_ ->
          forall a. Maybe a
Nothing
      )

instance AsIsoLatin1 IsoLatin1 where
  _IsoLatin1 :: Prism' IsoLatin1 IsoLatin1
_IsoLatin1 = forall {k} (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id

parseIsoLatin1 ::
  CharParsing p =>
  p IsoLatin1
parseIsoLatin1 :: forall (p :: * -> *). CharParsing p => p IsoLatin1
parseIsoLatin1 =
  forall (t :: * -> *) (f :: * -> *) a.
(Foldable t, Alternative f) =>
t (f a) -> f a
asum [
    IsoLatin1
HorizontalTab forall (f :: * -> *) a b. Functor f => a -> f b -> f a
<$ forall (p :: * -> *). CharParsing p => p ()
parseHorizontalTab
  , IsoLatin1
LineFeed forall (f :: * -> *) a b. Functor f => a -> f b -> f a
<$ forall (p :: * -> *). CharParsing p => p ()
parseLineFeed
  , IsoLatin1
FormFeed forall (f :: * -> *) a b. Functor f => a -> f b -> f a
<$ forall (p :: * -> *). CharParsing p => p ()
parseFormFeed
  , IsoLatin1
CarriageReturn forall (f :: * -> *) a b. Functor f => a -> f b -> f a
<$ forall (p :: * -> *). CharParsing p => p ()
parseCarriageReturn
  , IsoLatin1
Whitespace forall (f :: * -> *) a b. Functor f => a -> f b -> f a
<$ forall (p :: * -> *). CharParsing p => p ()
parseWhitespace
  ]

instance AsHorizontalTab IsoLatin1 where
  _HorizontalTab :: Prism' IsoLatin1 ()
_HorizontalTab =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> IsoLatin1
HorizontalTab)
      (\case
          IsoLatin1
HorizontalTab -> forall a. a -> Maybe a
Just ()
          IsoLatin1
_ -> forall a. Maybe a
Nothing
      )

instance AsLineFeed IsoLatin1 where
  _LineFeed :: Prism' IsoLatin1 ()
_LineFeed =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> IsoLatin1
LineFeed)
      (\case
          IsoLatin1
LineFeed -> forall a. a -> Maybe a
Just ()
          IsoLatin1
_ -> forall a. Maybe a
Nothing
      )

instance AsFormFeed IsoLatin1 where
  _FormFeed :: Prism' IsoLatin1 ()
_FormFeed =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> IsoLatin1
FormFeed)
      (\case
          IsoLatin1
FormFeed -> forall a. a -> Maybe a
Just ()
          IsoLatin1
_ -> forall a. Maybe a
Nothing
      )

instance AsCarriageReturn IsoLatin1 where
  _CarriageReturn :: Prism' IsoLatin1 ()
_CarriageReturn =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> IsoLatin1
CarriageReturn)
      (\case
          IsoLatin1
CarriageReturn -> forall a. a -> Maybe a
Just ()
          IsoLatin1
_ -> forall a. Maybe a
Nothing
      )

instance AsWhitespace IsoLatin1 where
  _Whitespace :: Prism' IsoLatin1 ()
_Whitespace =
    forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
prism'
      (\() -> IsoLatin1
Whitespace)
      (\case
          IsoLatin1
Whitespace -> forall a. a -> Maybe a
Just ()
          IsoLatin1
_ -> forall a. Maybe a
Nothing
      )

-- not exported

satisfy' ::
  CharParsing f =>
  (Char -> Bool)
  -> f ()
satisfy' :: forall (f :: * -> *). CharParsing f => (Char -> Bool) -> f ()
satisfy' Char -> Bool
p =
  () forall (f :: * -> *) a b. Functor f => a -> f b -> f a
<$ forall (m :: * -> *). CharParsing m => (Char -> Bool) -> m Char
satisfy Char -> Bool
p