{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE QuantifiedConstraints #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
module Brassica.SoundChange.Types
(
Grapheme
, PWord
, addBoundaries
, removeBoundaries
, concatWithBoundary
, Lexeme(..)
, LexemeType(..)
, generalise
, mapCategory
, mapCategoryA
, CategoryElement
, CategorySpec(..)
, CategoryModification(..)
, Expanded(..)
, generaliseExpanded
, Rule(..)
, Environment
, Direction(..)
, Sporadicity(..)
, Flags(..)
, defFlags
, Filter(..)
, Statement(..)
, plaintext'
, SoundChanges
, Directive(..)
, CategoryDefinition(..)
, FeatureSpec(..)
, GraphemeList(..)
) where
import Control.DeepSeq (NFData(..), deepseq)
import GHC.Generics (Generic)
import GHC.OldList (dropWhileEnd)
type Grapheme = [Char]
type PWord = [Grapheme]
addBoundaries :: PWord -> PWord
addBoundaries :: PWord -> PWord
addBoundaries PWord
w = Grapheme
"#" Grapheme -> PWord -> PWord
forall a. a -> [a] -> [a]
: PWord
w PWord -> PWord -> PWord
forall a. [a] -> [a] -> [a]
++ [Grapheme
"#"]
removeBoundaries :: PWord -> PWord
removeBoundaries :: PWord -> PWord
removeBoundaries = (Grapheme -> Bool) -> PWord -> PWord
forall a. (a -> Bool) -> [a] -> [a]
dropWhile (Grapheme -> Grapheme -> Bool
forall a. Eq a => a -> a -> Bool
==Grapheme
"#") (PWord -> PWord) -> (PWord -> PWord) -> PWord -> PWord
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Grapheme -> Bool) -> PWord -> PWord
forall a. (a -> Bool) -> [a] -> [a]
dropWhileEnd (Grapheme -> Grapheme -> Bool
forall a. Eq a => a -> a -> Bool
==Grapheme
"#")
concatWithBoundary :: PWord -> String
concatWithBoundary :: PWord -> Grapheme
concatWithBoundary = PWord -> Grapheme
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
concat (PWord -> Grapheme) -> (PWord -> PWord) -> PWord -> Grapheme
forall b c a. (b -> c) -> (a -> b) -> a -> c
. PWord -> PWord
removeBoundaries
data LexemeType
= Matched
| Replacement
| AnyPart
data Lexeme category (a :: LexemeType) where
Grapheme :: Grapheme -> Lexeme category a
Category :: category a -> Lexeme category a
GreedyCategory :: category 'Matched -> Lexeme category 'Matched
Optional :: [Lexeme category a] -> Lexeme category a
GreedyOptional :: [Lexeme category 'Matched] -> Lexeme category 'Matched
Metathesis :: Lexeme category 'Replacement
Geminate :: Lexeme category a
Wildcard :: Lexeme category a -> Lexeme category a
Kleene :: Lexeme category a -> Lexeme category a
Discard :: Lexeme category 'Replacement
Backreference :: Either String Int -> category a -> Lexeme category a
Multiple :: category 'Replacement -> Lexeme category 'Replacement
Feature
:: Bool
-> String
-> Maybe String
-> [[Grapheme]]
-> Lexeme category a
-> Lexeme category a
Autosegment
:: Grapheme
-> [[(Grapheme, Bool)]]
-> [Grapheme]
-> Lexeme category a
mapCategory :: (forall x. c x -> c' x) -> Lexeme c a -> Lexeme c' a
mapCategory :: forall (c :: LexemeType -> *) (c' :: LexemeType -> *)
(a :: LexemeType).
(forall (x :: LexemeType). c x -> c' x)
-> Lexeme c a -> Lexeme c' a
mapCategory forall (x :: LexemeType). c x -> c' x
_ (Grapheme Grapheme
g) = Grapheme -> Lexeme c' a
forall (category :: LexemeType -> *) (a :: LexemeType).
Grapheme -> Lexeme category a
Grapheme Grapheme
g
mapCategory forall (x :: LexemeType). c x -> c' x
f (Category c a
c) = c' a -> Lexeme c' a
forall (category :: LexemeType -> *) (a :: LexemeType).
category a -> Lexeme category a
Category (c a -> c' a
forall (x :: LexemeType). c x -> c' x
f c a
c)
mapCategory forall (x :: LexemeType). c x -> c' x
f (GreedyCategory c 'Matched
c) = c' 'Matched -> Lexeme c' 'Matched
forall (category :: LexemeType -> *).
category 'Matched -> Lexeme category 'Matched
GreedyCategory (c 'Matched -> c' 'Matched
forall (x :: LexemeType). c x -> c' x
f c 'Matched
c)
mapCategory forall (x :: LexemeType). c x -> c' x
f (Optional [Lexeme c a]
ls) = [Lexeme c' a] -> Lexeme c' a
forall (category :: LexemeType -> *) (a :: LexemeType).
[Lexeme category a] -> Lexeme category a
Optional ((forall (x :: LexemeType). c x -> c' x)
-> Lexeme c a -> Lexeme c' a
forall (c :: LexemeType -> *) (c' :: LexemeType -> *)
(a :: LexemeType).
(forall (x :: LexemeType). c x -> c' x)
-> Lexeme c a -> Lexeme c' a
mapCategory c x -> c' x
forall (x :: LexemeType). c x -> c' x
f (Lexeme c a -> Lexeme c' a) -> [Lexeme c a] -> [Lexeme c' a]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [Lexeme c a]
ls)
mapCategory forall (x :: LexemeType). c x -> c' x
f (GreedyOptional [Lexeme c 'Matched]
ls) = [Lexeme c' 'Matched] -> Lexeme c' 'Matched
forall (category :: LexemeType -> *).
[Lexeme category 'Matched] -> Lexeme category 'Matched
GreedyOptional ((forall (x :: LexemeType). c x -> c' x)
-> Lexeme c 'Matched -> Lexeme c' 'Matched
forall (c :: LexemeType -> *) (c' :: LexemeType -> *)
(a :: LexemeType).
(forall (x :: LexemeType). c x -> c' x)
-> Lexeme c a -> Lexeme c' a
mapCategory c x -> c' x
forall (x :: LexemeType). c x -> c' x
f (Lexeme c 'Matched -> Lexeme c' 'Matched)
-> [Lexeme c 'Matched] -> [Lexeme c' 'Matched]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [Lexeme c 'Matched]
ls)
mapCategory forall (x :: LexemeType). c x -> c' x
_ Lexeme c a
Metathesis = Lexeme c' a
Lexeme c' 'Replacement
forall (category :: LexemeType -> *). Lexeme category 'Replacement
Metathesis
mapCategory forall (x :: LexemeType). c x -> c' x
_ Lexeme c a
Geminate = Lexeme c' a
forall (category :: LexemeType -> *) (a :: LexemeType).
Lexeme category a
Geminate
mapCategory forall (x :: LexemeType). c x -> c' x
f (Wildcard Lexeme c a
l) = Lexeme c' a -> Lexeme c' a
forall (category :: LexemeType -> *) (a :: LexemeType).
Lexeme category a -> Lexeme category a
Wildcard ((forall (x :: LexemeType). c x -> c' x)
-> Lexeme c a -> Lexeme c' a
forall (c :: LexemeType -> *) (c' :: LexemeType -> *)
(a :: LexemeType).
(forall (x :: LexemeType). c x -> c' x)
-> Lexeme c a -> Lexeme c' a
mapCategory c x -> c' x
forall (x :: LexemeType). c x -> c' x
f Lexeme c a
l)
mapCategory forall (x :: LexemeType). c x -> c' x
f (Kleene Lexeme c a
l) = Lexeme c' a -> Lexeme c' a
forall (category :: LexemeType -> *) (a :: LexemeType).
Lexeme category a -> Lexeme category a
Kleene ((forall (x :: LexemeType). c x -> c' x)
-> Lexeme c a -> Lexeme c' a
forall (c :: LexemeType -> *) (c' :: LexemeType -> *)
(a :: LexemeType).
(forall (x :: LexemeType). c x -> c' x)
-> Lexeme c a -> Lexeme c' a
mapCategory c x -> c' x
forall (x :: LexemeType). c x -> c' x
f Lexeme c a
l)
mapCategory forall (x :: LexemeType). c x -> c' x
_ Lexeme c a
Discard = Lexeme c' a
Lexeme c' 'Replacement
forall (category :: LexemeType -> *). Lexeme category 'Replacement
Discard
mapCategory forall (x :: LexemeType). c x -> c' x
f (Backreference Either Grapheme Int
i c a
c) = Either Grapheme Int -> c' a -> Lexeme c' a
forall (category :: LexemeType -> *) (a :: LexemeType).
Either Grapheme Int -> category a -> Lexeme category a
Backreference Either Grapheme Int
i (c a -> c' a
forall (x :: LexemeType). c x -> c' x
f c a
c)
mapCategory forall (x :: LexemeType). c x -> c' x
f (Multiple c 'Replacement
c) = c' 'Replacement -> Lexeme c' 'Replacement
forall (category :: LexemeType -> *).
category 'Replacement -> Lexeme category 'Replacement
Multiple (c 'Replacement -> c' 'Replacement
forall (x :: LexemeType). c x -> c' x
f c 'Replacement
c)
mapCategory forall (x :: LexemeType). c x -> c' x
f (Feature Bool
r Grapheme
n Maybe Grapheme
i [PWord]
kvs Lexeme c a
l) = Bool
-> Grapheme
-> Maybe Grapheme
-> [PWord]
-> Lexeme c' a
-> Lexeme c' a
forall (category :: LexemeType -> *) (a :: LexemeType).
Bool
-> Grapheme
-> Maybe Grapheme
-> [PWord]
-> Lexeme category a
-> Lexeme category a
Feature Bool
r Grapheme
n Maybe Grapheme
i [PWord]
kvs (Lexeme c' a -> Lexeme c' a) -> Lexeme c' a -> Lexeme c' a
forall a b. (a -> b) -> a -> b
$ (forall (x :: LexemeType). c x -> c' x)
-> Lexeme c a -> Lexeme c' a
forall (c :: LexemeType -> *) (c' :: LexemeType -> *)
(a :: LexemeType).
(forall (x :: LexemeType). c x -> c' x)
-> Lexeme c a -> Lexeme c' a
mapCategory c x -> c' x
forall (x :: LexemeType). c x -> c' x
f Lexeme c a
l
mapCategory forall (x :: LexemeType). c x -> c' x
_ (Autosegment Grapheme
n [[(Grapheme, Bool)]]
kvs PWord
gs) = Grapheme -> [[(Grapheme, Bool)]] -> PWord -> Lexeme c' a
forall (category :: LexemeType -> *) (a :: LexemeType).
Grapheme -> [[(Grapheme, Bool)]] -> PWord -> Lexeme category a
Autosegment Grapheme
n [[(Grapheme, Bool)]]
kvs PWord
gs
mapCategoryA
:: Applicative t
=> (forall x. c x -> t (c' x))
-> Lexeme c a
-> t (Lexeme c' a)
mapCategoryA :: forall (t :: * -> *) (c :: LexemeType -> *) (c' :: LexemeType -> *)
(a :: LexemeType).
Applicative t =>
(forall (x :: LexemeType). c x -> t (c' x))
-> Lexeme c a -> t (Lexeme c' a)
mapCategoryA forall (x :: LexemeType). c x -> t (c' x)
_ (Grapheme Grapheme
g) = Lexeme c' a -> t (Lexeme c' a)
forall a. a -> t a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Lexeme c' a -> t (Lexeme c' a)) -> Lexeme c' a -> t (Lexeme c' a)
forall a b. (a -> b) -> a -> b
$ Grapheme -> Lexeme c' a
forall (category :: LexemeType -> *) (a :: LexemeType).
Grapheme -> Lexeme category a
Grapheme Grapheme
g
mapCategoryA forall (x :: LexemeType). c x -> t (c' x)
f (Category c a
c) = c' a -> Lexeme c' a
forall (category :: LexemeType -> *) (a :: LexemeType).
category a -> Lexeme category a
Category (c' a -> Lexeme c' a) -> t (c' a) -> t (Lexeme c' a)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> c a -> t (c' a)
forall (x :: LexemeType). c x -> t (c' x)
f c a
c
mapCategoryA forall (x :: LexemeType). c x -> t (c' x)
f (GreedyCategory c 'Matched
c) = c' 'Matched -> Lexeme c' a
c' 'Matched -> Lexeme c' 'Matched
forall (category :: LexemeType -> *).
category 'Matched -> Lexeme category 'Matched
GreedyCategory (c' 'Matched -> Lexeme c' a) -> t (c' 'Matched) -> t (Lexeme c' a)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> c 'Matched -> t (c' 'Matched)
forall (x :: LexemeType). c x -> t (c' x)
f c 'Matched
c
mapCategoryA forall (x :: LexemeType). c x -> t (c' x)
f (Optional [Lexeme c a]
ls) = [Lexeme c' a] -> Lexeme c' a
forall (category :: LexemeType -> *) (a :: LexemeType).
[Lexeme category a] -> Lexeme category a
Optional ([Lexeme c' a] -> Lexeme c' a)
-> t [Lexeme c' a] -> t (Lexeme c' a)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Lexeme c a -> t (Lexeme c' a)) -> [Lexeme c a] -> t [Lexeme c' a]
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> [a] -> f [b]
traverse ((forall (x :: LexemeType). c x -> t (c' x))
-> Lexeme c a -> t (Lexeme c' a)
forall (t :: * -> *) (c :: LexemeType -> *) (c' :: LexemeType -> *)
(a :: LexemeType).
Applicative t =>
(forall (x :: LexemeType). c x -> t (c' x))
-> Lexeme c a -> t (Lexeme c' a)
mapCategoryA c x -> t (c' x)
forall (x :: LexemeType). c x -> t (c' x)
f) [Lexeme c a]
ls
mapCategoryA forall (x :: LexemeType). c x -> t (c' x)
f (GreedyOptional [Lexeme c 'Matched]
ls) = [Lexeme c' 'Matched] -> Lexeme c' a
[Lexeme c' 'Matched] -> Lexeme c' 'Matched
forall (category :: LexemeType -> *).
[Lexeme category 'Matched] -> Lexeme category 'Matched
GreedyOptional ([Lexeme c' 'Matched] -> Lexeme c' a)
-> t [Lexeme c' 'Matched] -> t (Lexeme c' a)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Lexeme c 'Matched -> t (Lexeme c' 'Matched))
-> [Lexeme c 'Matched] -> t [Lexeme c' 'Matched]
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> [a] -> f [b]
traverse ((forall (x :: LexemeType). c x -> t (c' x))
-> Lexeme c 'Matched -> t (Lexeme c' 'Matched)
forall (t :: * -> *) (c :: LexemeType -> *) (c' :: LexemeType -> *)
(a :: LexemeType).
Applicative t =>
(forall (x :: LexemeType). c x -> t (c' x))
-> Lexeme c a -> t (Lexeme c' a)
mapCategoryA c x -> t (c' x)
forall (x :: LexemeType). c x -> t (c' x)
f) [Lexeme c 'Matched]
ls
mapCategoryA forall (x :: LexemeType). c x -> t (c' x)
_ Lexeme c a
Metathesis = Lexeme c' a -> t (Lexeme c' a)
forall a. a -> t a
forall (f :: * -> *) a. Applicative f => a -> f a
pure Lexeme c' a
Lexeme c' 'Replacement
forall (category :: LexemeType -> *). Lexeme category 'Replacement
Metathesis
mapCategoryA forall (x :: LexemeType). c x -> t (c' x)
_ Lexeme c a
Geminate = Lexeme c' a -> t (Lexeme c' a)
forall a. a -> t a
forall (f :: * -> *) a. Applicative f => a -> f a
pure Lexeme c' a
forall (category :: LexemeType -> *) (a :: LexemeType).
Lexeme category a
Geminate
mapCategoryA forall (x :: LexemeType). c x -> t (c' x)
f (Wildcard Lexeme c a
l) = Lexeme c' a -> Lexeme c' a
forall (category :: LexemeType -> *) (a :: LexemeType).
Lexeme category a -> Lexeme category a
Wildcard (Lexeme c' a -> Lexeme c' a) -> t (Lexeme c' a) -> t (Lexeme c' a)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (forall (x :: LexemeType). c x -> t (c' x))
-> Lexeme c a -> t (Lexeme c' a)
forall (t :: * -> *) (c :: LexemeType -> *) (c' :: LexemeType -> *)
(a :: LexemeType).
Applicative t =>
(forall (x :: LexemeType). c x -> t (c' x))
-> Lexeme c a -> t (Lexeme c' a)
mapCategoryA c x -> t (c' x)
forall (x :: LexemeType). c x -> t (c' x)
f Lexeme c a
l
mapCategoryA forall (x :: LexemeType). c x -> t (c' x)
f (Kleene Lexeme c a
l) = Lexeme c' a -> Lexeme c' a
forall (category :: LexemeType -> *) (a :: LexemeType).
Lexeme category a -> Lexeme category a
Kleene (Lexeme c' a -> Lexeme c' a) -> t (Lexeme c' a) -> t (Lexeme c' a)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (forall (x :: LexemeType). c x -> t (c' x))
-> Lexeme c a -> t (Lexeme c' a)
forall (t :: * -> *) (c :: LexemeType -> *) (c' :: LexemeType -> *)
(a :: LexemeType).
Applicative t =>
(forall (x :: LexemeType). c x -> t (c' x))
-> Lexeme c a -> t (Lexeme c' a)
mapCategoryA c x -> t (c' x)
forall (x :: LexemeType). c x -> t (c' x)
f Lexeme c a
l
mapCategoryA forall (x :: LexemeType). c x -> t (c' x)
_ Lexeme c a
Discard = Lexeme c' a -> t (Lexeme c' a)
forall a. a -> t a
forall (f :: * -> *) a. Applicative f => a -> f a
pure Lexeme c' a
Lexeme c' 'Replacement
forall (category :: LexemeType -> *). Lexeme category 'Replacement
Discard
mapCategoryA forall (x :: LexemeType). c x -> t (c' x)
f (Backreference Either Grapheme Int
i c a
c) = Either Grapheme Int -> c' a -> Lexeme c' a
forall (category :: LexemeType -> *) (a :: LexemeType).
Either Grapheme Int -> category a -> Lexeme category a
Backreference Either Grapheme Int
i (c' a -> Lexeme c' a) -> t (c' a) -> t (Lexeme c' a)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> c a -> t (c' a)
forall (x :: LexemeType). c x -> t (c' x)
f c a
c
mapCategoryA forall (x :: LexemeType). c x -> t (c' x)
f (Multiple c 'Replacement
c) = c' 'Replacement -> Lexeme c' a
c' 'Replacement -> Lexeme c' 'Replacement
forall (category :: LexemeType -> *).
category 'Replacement -> Lexeme category 'Replacement
Multiple (c' 'Replacement -> Lexeme c' a)
-> t (c' 'Replacement) -> t (Lexeme c' a)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> c 'Replacement -> t (c' 'Replacement)
forall (x :: LexemeType). c x -> t (c' x)
f c 'Replacement
c
mapCategoryA forall (x :: LexemeType). c x -> t (c' x)
f (Feature Bool
r Grapheme
n Maybe Grapheme
i [PWord]
kvs Lexeme c a
l) = Bool
-> Grapheme
-> Maybe Grapheme
-> [PWord]
-> Lexeme c' a
-> Lexeme c' a
forall (category :: LexemeType -> *) (a :: LexemeType).
Bool
-> Grapheme
-> Maybe Grapheme
-> [PWord]
-> Lexeme category a
-> Lexeme category a
Feature Bool
r Grapheme
n Maybe Grapheme
i [PWord]
kvs (Lexeme c' a -> Lexeme c' a) -> t (Lexeme c' a) -> t (Lexeme c' a)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (forall (x :: LexemeType). c x -> t (c' x))
-> Lexeme c a -> t (Lexeme c' a)
forall (t :: * -> *) (c :: LexemeType -> *) (c' :: LexemeType -> *)
(a :: LexemeType).
Applicative t =>
(forall (x :: LexemeType). c x -> t (c' x))
-> Lexeme c a -> t (Lexeme c' a)
mapCategoryA c x -> t (c' x)
forall (x :: LexemeType). c x -> t (c' x)
f Lexeme c a
l
mapCategoryA forall (x :: LexemeType). c x -> t (c' x)
_ (Autosegment Grapheme
n [[(Grapheme, Bool)]]
kvs PWord
gs) = Lexeme c' a -> t (Lexeme c' a)
forall a. a -> t a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Lexeme c' a -> t (Lexeme c' a)) -> Lexeme c' a -> t (Lexeme c' a)
forall a b. (a -> b) -> a -> b
$ Grapheme -> [[(Grapheme, Bool)]] -> PWord -> Lexeme c' a
forall (category :: LexemeType -> *) (a :: LexemeType).
Grapheme -> [[(Grapheme, Bool)]] -> PWord -> Lexeme category a
Autosegment Grapheme
n [[(Grapheme, Bool)]]
kvs PWord
gs
newtype Expanded a = FromElements { forall (a :: LexemeType).
Expanded a -> [CategoryElement Expanded a]
elements :: [CategoryElement Expanded a] }
deriving (Expanded a -> Expanded a -> Bool
(Expanded a -> Expanded a -> Bool)
-> (Expanded a -> Expanded a -> Bool) -> Eq (Expanded a)
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
forall (a :: LexemeType). Expanded a -> Expanded a -> Bool
$c== :: forall (a :: LexemeType). Expanded a -> Expanded a -> Bool
== :: Expanded a -> Expanded a -> Bool
$c/= :: forall (a :: LexemeType). Expanded a -> Expanded a -> Bool
/= :: Expanded a -> Expanded a -> Bool
Eq, Eq (Expanded a)
Eq (Expanded a) =>
(Expanded a -> Expanded a -> Ordering)
-> (Expanded a -> Expanded a -> Bool)
-> (Expanded a -> Expanded a -> Bool)
-> (Expanded a -> Expanded a -> Bool)
-> (Expanded a -> Expanded a -> Bool)
-> (Expanded a -> Expanded a -> Expanded a)
-> (Expanded a -> Expanded a -> Expanded a)
-> Ord (Expanded a)
Expanded a -> Expanded a -> Bool
Expanded a -> Expanded a -> Ordering
Expanded a -> Expanded a -> Expanded a
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
forall (x :: LexemeType). Eq (Expanded x)
forall (a :: LexemeType). Expanded a -> Expanded a -> Bool
forall (a :: LexemeType). Expanded a -> Expanded a -> Ordering
forall (a :: LexemeType). Expanded a -> Expanded a -> Expanded a
$ccompare :: forall (a :: LexemeType). Expanded a -> Expanded a -> Ordering
compare :: Expanded a -> Expanded a -> Ordering
$c< :: forall (a :: LexemeType). Expanded a -> Expanded a -> Bool
< :: Expanded a -> Expanded a -> Bool
$c<= :: forall (a :: LexemeType). Expanded a -> Expanded a -> Bool
<= :: Expanded a -> Expanded a -> Bool
$c> :: forall (a :: LexemeType). Expanded a -> Expanded a -> Bool
> :: Expanded a -> Expanded a -> Bool
$c>= :: forall (a :: LexemeType). Expanded a -> Expanded a -> Bool
>= :: Expanded a -> Expanded a -> Bool
$cmax :: forall (a :: LexemeType). Expanded a -> Expanded a -> Expanded a
max :: Expanded a -> Expanded a -> Expanded a
$cmin :: forall (a :: LexemeType). Expanded a -> Expanded a -> Expanded a
min :: Expanded a -> Expanded a -> Expanded a
Ord, Int -> Expanded a -> ShowS
[Expanded a] -> ShowS
Expanded a -> Grapheme
(Int -> Expanded a -> ShowS)
-> (Expanded a -> Grapheme)
-> ([Expanded a] -> ShowS)
-> Show (Expanded a)
forall a.
(Int -> a -> ShowS) -> (a -> Grapheme) -> ([a] -> ShowS) -> Show a
forall (a :: LexemeType). Int -> Expanded a -> ShowS
forall (a :: LexemeType). [Expanded a] -> ShowS
forall (a :: LexemeType). Expanded a -> Grapheme
$cshowsPrec :: forall (a :: LexemeType). Int -> Expanded a -> ShowS
showsPrec :: Int -> Expanded a -> ShowS
$cshow :: forall (a :: LexemeType). Expanded a -> Grapheme
show :: Expanded a -> Grapheme
$cshowList :: forall (a :: LexemeType). [Expanded a] -> ShowS
showList :: [Expanded a] -> ShowS
Show, (forall x. Expanded a -> Rep (Expanded a) x)
-> (forall x. Rep (Expanded a) x -> Expanded a)
-> Generic (Expanded a)
forall x. Rep (Expanded a) x -> Expanded a
forall x. Expanded a -> Rep (Expanded a) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall (a :: LexemeType) x. Rep (Expanded a) x -> Expanded a
forall (a :: LexemeType) x. Expanded a -> Rep (Expanded a) x
$cfrom :: forall (a :: LexemeType) x. Expanded a -> Rep (Expanded a) x
from :: forall x. Expanded a -> Rep (Expanded a) x
$cto :: forall (a :: LexemeType) x. Rep (Expanded a) x -> Expanded a
to :: forall x. Rep (Expanded a) x -> Expanded a
Generic, Expanded a -> ()
(Expanded a -> ()) -> NFData (Expanded a)
forall a. (a -> ()) -> NFData a
forall (a :: LexemeType). Expanded a -> ()
$crnf :: forall (a :: LexemeType). Expanded a -> ()
rnf :: Expanded a -> ()
NFData)
instance Semigroup (Expanded a) where
(FromElements [CategoryElement Expanded a]
es) <> :: Expanded a -> Expanded a -> Expanded a
<> (FromElements [CategoryElement Expanded a]
es') = [CategoryElement Expanded a] -> Expanded a
forall (a :: LexemeType).
[CategoryElement Expanded a] -> Expanded a
FromElements ([CategoryElement Expanded a]
es [CategoryElement Expanded a]
-> [CategoryElement Expanded a] -> [CategoryElement Expanded a]
forall a. Semigroup a => a -> a -> a
<> [CategoryElement Expanded a]
es')
instance Monoid (Expanded a) where
mempty :: Expanded a
mempty = [CategoryElement Expanded a] -> Expanded a
forall (a :: LexemeType).
[CategoryElement Expanded a] -> Expanded a
FromElements []
generalise :: (c 'AnyPart -> c a) -> Lexeme c 'AnyPart -> Lexeme c a
generalise :: forall (c :: LexemeType -> *) (a :: LexemeType).
(c 'AnyPart -> c a) -> Lexeme c 'AnyPart -> Lexeme c a
generalise c 'AnyPart -> c a
_ (Grapheme Grapheme
g) = Grapheme -> Lexeme c a
forall (category :: LexemeType -> *) (a :: LexemeType).
Grapheme -> Lexeme category a
Grapheme Grapheme
g
generalise c 'AnyPart -> c a
f (Category c 'AnyPart
es) = c a -> Lexeme c a
forall (category :: LexemeType -> *) (a :: LexemeType).
category a -> Lexeme category a
Category (c a -> Lexeme c a) -> c a -> Lexeme c a
forall a b. (a -> b) -> a -> b
$ c 'AnyPart -> c a
f c 'AnyPart
es
generalise c 'AnyPart -> c a
f (Optional [Lexeme c 'AnyPart]
ls) = [Lexeme c a] -> Lexeme c a
forall (category :: LexemeType -> *) (a :: LexemeType).
[Lexeme category a] -> Lexeme category a
Optional ([Lexeme c a] -> Lexeme c a) -> [Lexeme c a] -> Lexeme c a
forall a b. (a -> b) -> a -> b
$ (c 'AnyPart -> c a) -> Lexeme c 'AnyPart -> Lexeme c a
forall (c :: LexemeType -> *) (a :: LexemeType).
(c 'AnyPart -> c a) -> Lexeme c 'AnyPart -> Lexeme c a
generalise c 'AnyPart -> c a
f (Lexeme c 'AnyPart -> Lexeme c a)
-> [Lexeme c 'AnyPart] -> [Lexeme c a]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [Lexeme c 'AnyPart]
ls
generalise c 'AnyPart -> c a
_ Lexeme c 'AnyPart
Geminate = Lexeme c a
forall (category :: LexemeType -> *) (a :: LexemeType).
Lexeme category a
Geminate
generalise c 'AnyPart -> c a
f (Backreference Either Grapheme Int
i c 'AnyPart
es) = Either Grapheme Int -> c a -> Lexeme c a
forall (category :: LexemeType -> *) (a :: LexemeType).
Either Grapheme Int -> category a -> Lexeme category a
Backreference Either Grapheme Int
i (c a -> Lexeme c a) -> c a -> Lexeme c a
forall a b. (a -> b) -> a -> b
$ c 'AnyPart -> c a
f c 'AnyPart
es
generalise c 'AnyPart -> c a
f (Wildcard Lexeme c 'AnyPart
l) = Lexeme c a -> Lexeme c a
forall (category :: LexemeType -> *) (a :: LexemeType).
Lexeme category a -> Lexeme category a
Wildcard (Lexeme c a -> Lexeme c a) -> Lexeme c a -> Lexeme c a
forall a b. (a -> b) -> a -> b
$ (c 'AnyPart -> c a) -> Lexeme c 'AnyPart -> Lexeme c a
forall (c :: LexemeType -> *) (a :: LexemeType).
(c 'AnyPart -> c a) -> Lexeme c 'AnyPart -> Lexeme c a
generalise c 'AnyPart -> c a
f Lexeme c 'AnyPart
l
generalise c 'AnyPart -> c a
f (Kleene Lexeme c 'AnyPart
l) = Lexeme c a -> Lexeme c a
forall (category :: LexemeType -> *) (a :: LexemeType).
Lexeme category a -> Lexeme category a
Kleene (Lexeme c a -> Lexeme c a) -> Lexeme c a -> Lexeme c a
forall a b. (a -> b) -> a -> b
$ (c 'AnyPart -> c a) -> Lexeme c 'AnyPart -> Lexeme c a
forall (c :: LexemeType -> *) (a :: LexemeType).
(c 'AnyPart -> c a) -> Lexeme c 'AnyPart -> Lexeme c a
generalise c 'AnyPart -> c a
f Lexeme c 'AnyPart
l
generalise c 'AnyPart -> c a
f (Feature Bool
r Grapheme
n Maybe Grapheme
i [PWord]
kvs Lexeme c 'AnyPart
l) = Bool
-> Grapheme
-> Maybe Grapheme
-> [PWord]
-> Lexeme c a
-> Lexeme c a
forall (category :: LexemeType -> *) (a :: LexemeType).
Bool
-> Grapheme
-> Maybe Grapheme
-> [PWord]
-> Lexeme category a
-> Lexeme category a
Feature Bool
r Grapheme
n Maybe Grapheme
i [PWord]
kvs (Lexeme c a -> Lexeme c a) -> Lexeme c a -> Lexeme c a
forall a b. (a -> b) -> a -> b
$ (c 'AnyPart -> c a) -> Lexeme c 'AnyPart -> Lexeme c a
forall (c :: LexemeType -> *) (a :: LexemeType).
(c 'AnyPart -> c a) -> Lexeme c 'AnyPart -> Lexeme c a
generalise c 'AnyPart -> c a
f Lexeme c 'AnyPart
l
generalise c 'AnyPart -> c a
_ (Autosegment Grapheme
n [[(Grapheme, Bool)]]
kvs PWord
gs) = Grapheme -> [[(Grapheme, Bool)]] -> PWord -> Lexeme c a
forall (category :: LexemeType -> *) (a :: LexemeType).
Grapheme -> [[(Grapheme, Bool)]] -> PWord -> Lexeme category a
Autosegment Grapheme
n [[(Grapheme, Bool)]]
kvs PWord
gs
generaliseExpanded :: Expanded 'AnyPart -> Expanded a
generaliseExpanded :: forall (a :: LexemeType). Expanded 'AnyPart -> Expanded a
generaliseExpanded = [CategoryElement Expanded a] -> Expanded a
forall (a :: LexemeType).
[CategoryElement Expanded a] -> Expanded a
FromElements ([CategoryElement Expanded a] -> Expanded a)
-> (Expanded 'AnyPart -> [CategoryElement Expanded a])
-> Expanded 'AnyPart
-> Expanded a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (([Lexeme Expanded 'AnyPart] -> CategoryElement Expanded a)
-> [[Lexeme Expanded 'AnyPart]] -> [CategoryElement Expanded a]
forall a b. (a -> b) -> [a] -> [b]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap(([Lexeme Expanded 'AnyPart] -> CategoryElement Expanded a)
-> [[Lexeme Expanded 'AnyPart]] -> [CategoryElement Expanded a])
-> ((Lexeme Expanded 'AnyPart -> Lexeme Expanded a)
-> [Lexeme Expanded 'AnyPart] -> CategoryElement Expanded a)
-> (Lexeme Expanded 'AnyPart -> Lexeme Expanded a)
-> [[Lexeme Expanded 'AnyPart]]
-> [CategoryElement Expanded a]
forall b c a. (b -> c) -> (a -> b) -> a -> c
.(Lexeme Expanded 'AnyPart -> Lexeme Expanded a)
-> [Lexeme Expanded 'AnyPart] -> CategoryElement Expanded a
forall a b. (a -> b) -> [a] -> [b]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap) ((Expanded 'AnyPart -> Expanded a)
-> Lexeme Expanded 'AnyPart -> Lexeme Expanded a
forall (c :: LexemeType -> *) (a :: LexemeType).
(c 'AnyPart -> c a) -> Lexeme c 'AnyPart -> Lexeme c a
generalise Expanded 'AnyPart -> Expanded a
forall (a :: LexemeType). Expanded 'AnyPart -> Expanded a
generaliseExpanded) ([[Lexeme Expanded 'AnyPart]] -> [CategoryElement Expanded a])
-> (Expanded 'AnyPart -> [[Lexeme Expanded 'AnyPart]])
-> Expanded 'AnyPart
-> [CategoryElement Expanded a]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Expanded 'AnyPart -> [[Lexeme Expanded 'AnyPart]]
forall (a :: LexemeType).
Expanded a -> [CategoryElement Expanded a]
elements
deriving instance (forall x. Show (c x)) => Show (Lexeme c a)
deriving instance (forall x. Eq (c x)) => Eq (Lexeme c a)
deriving instance (forall x. Ord (c x)) => Ord (Lexeme c a)
instance (forall x. NFData (c x)) => NFData (Lexeme c a) where
rnf :: Lexeme c a -> ()
rnf (Grapheme Grapheme
g) = Grapheme -> ()
forall a. NFData a => a -> ()
rnf Grapheme
g
rnf (Category c a
cs) = c a -> ()
forall a. NFData a => a -> ()
rnf c a
cs
rnf (GreedyCategory c 'Matched
cs) = c 'Matched -> ()
forall a. NFData a => a -> ()
rnf c 'Matched
cs
rnf (Optional [Lexeme c a]
ls) = [Lexeme c a] -> ()
forall a. NFData a => a -> ()
rnf [Lexeme c a]
ls
rnf (GreedyOptional [Lexeme c 'Matched]
ls) = [Lexeme c 'Matched] -> ()
forall a. NFData a => a -> ()
rnf [Lexeme c 'Matched]
ls
rnf Lexeme c a
Metathesis = ()
rnf Lexeme c a
Geminate = ()
rnf (Wildcard Lexeme c a
l) = Lexeme c a -> ()
forall a. NFData a => a -> ()
rnf Lexeme c a
l
rnf (Kleene Lexeme c a
l) = Lexeme c a -> ()
forall a. NFData a => a -> ()
rnf Lexeme c a
l
rnf Lexeme c a
Discard = ()
rnf (Backreference Either Grapheme Int
i c a
l) = Either Grapheme Int
i Either Grapheme Int -> () -> ()
forall a b. NFData a => a -> b -> b
`deepseq` c a -> ()
forall a. NFData a => a -> ()
rnf c a
l
rnf (Multiple c 'Replacement
l) = c 'Replacement -> ()
forall a. NFData a => a -> ()
rnf c 'Replacement
l
rnf (Feature Bool
r Grapheme
n Maybe Grapheme
i [PWord]
kvs Lexeme c a
l) = Bool
r Bool -> () -> ()
forall a b. NFData a => a -> b -> b
`deepseq` Lexeme c a
l Lexeme c a -> () -> ()
forall a b. NFData a => a -> b -> b
`deepseq` Grapheme
n Grapheme -> () -> ()
forall a b. NFData a => a -> b -> b
`deepseq` Maybe Grapheme
i Maybe Grapheme -> () -> ()
forall a b. NFData a => a -> b -> b
`deepseq` [PWord] -> ()
forall a. NFData a => a -> ()
rnf [PWord]
kvs
rnf (Autosegment Grapheme
n [[(Grapheme, Bool)]]
kvs PWord
gs) = Grapheme
n Grapheme -> () -> ()
forall a b. NFData a => a -> b -> b
`deepseq` [[(Grapheme, Bool)]]
kvs [[(Grapheme, Bool)]] -> () -> ()
forall a b. NFData a => a -> b -> b
`deepseq` PWord -> ()
forall a. NFData a => a -> ()
rnf PWord
gs
type Environment c = ([Lexeme c 'Matched], [Lexeme c 'Matched])
data Direction = LTR | RTL
deriving (Direction -> Direction -> Bool
(Direction -> Direction -> Bool)
-> (Direction -> Direction -> Bool) -> Eq Direction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Direction -> Direction -> Bool
== :: Direction -> Direction -> Bool
$c/= :: Direction -> Direction -> Bool
/= :: Direction -> Direction -> Bool
Eq, Int -> Direction -> ShowS
[Direction] -> ShowS
Direction -> Grapheme
(Int -> Direction -> ShowS)
-> (Direction -> Grapheme)
-> ([Direction] -> ShowS)
-> Show Direction
forall a.
(Int -> a -> ShowS) -> (a -> Grapheme) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Direction -> ShowS
showsPrec :: Int -> Direction -> ShowS
$cshow :: Direction -> Grapheme
show :: Direction -> Grapheme
$cshowList :: [Direction] -> ShowS
showList :: [Direction] -> ShowS
Show, (forall x. Direction -> Rep Direction x)
-> (forall x. Rep Direction x -> Direction) -> Generic Direction
forall x. Rep Direction x -> Direction
forall x. Direction -> Rep Direction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. Direction -> Rep Direction x
from :: forall x. Direction -> Rep Direction x
$cto :: forall x. Rep Direction x -> Direction
to :: forall x. Rep Direction x -> Direction
Generic, Direction -> ()
(Direction -> ()) -> NFData Direction
forall a. (a -> ()) -> NFData a
$crnf :: Direction -> ()
rnf :: Direction -> ()
NFData)
data Sporadicity
= ApplyAlways
| PerWord
| PerApplication
deriving (Sporadicity -> Sporadicity -> Bool
(Sporadicity -> Sporadicity -> Bool)
-> (Sporadicity -> Sporadicity -> Bool) -> Eq Sporadicity
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Sporadicity -> Sporadicity -> Bool
== :: Sporadicity -> Sporadicity -> Bool
$c/= :: Sporadicity -> Sporadicity -> Bool
/= :: Sporadicity -> Sporadicity -> Bool
Eq, Int -> Sporadicity -> ShowS
[Sporadicity] -> ShowS
Sporadicity -> Grapheme
(Int -> Sporadicity -> ShowS)
-> (Sporadicity -> Grapheme)
-> ([Sporadicity] -> ShowS)
-> Show Sporadicity
forall a.
(Int -> a -> ShowS) -> (a -> Grapheme) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Sporadicity -> ShowS
showsPrec :: Int -> Sporadicity -> ShowS
$cshow :: Sporadicity -> Grapheme
show :: Sporadicity -> Grapheme
$cshowList :: [Sporadicity] -> ShowS
showList :: [Sporadicity] -> ShowS
Show, (forall x. Sporadicity -> Rep Sporadicity x)
-> (forall x. Rep Sporadicity x -> Sporadicity)
-> Generic Sporadicity
forall x. Rep Sporadicity x -> Sporadicity
forall x. Sporadicity -> Rep Sporadicity x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. Sporadicity -> Rep Sporadicity x
from :: forall x. Sporadicity -> Rep Sporadicity x
$cto :: forall x. Rep Sporadicity x -> Sporadicity
to :: forall x. Rep Sporadicity x -> Sporadicity
Generic, Sporadicity -> ()
(Sporadicity -> ()) -> NFData Sporadicity
forall a. (a -> ()) -> NFData a
$crnf :: Sporadicity -> ()
rnf :: Sporadicity -> ()
NFData)
data Flags = Flags
{ Flags -> Bool
highlightChanges :: Bool
, Flags -> Direction
applyDirection :: Direction
, Flags -> Bool
applyOnceOnly :: Bool
, Flags -> Sporadicity
sporadic :: Sporadicity
, Flags -> Bool
nonOverlappingTarget :: Bool
} deriving (Int -> Flags -> ShowS
[Flags] -> ShowS
Flags -> Grapheme
(Int -> Flags -> ShowS)
-> (Flags -> Grapheme) -> ([Flags] -> ShowS) -> Show Flags
forall a.
(Int -> a -> ShowS) -> (a -> Grapheme) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Flags -> ShowS
showsPrec :: Int -> Flags -> ShowS
$cshow :: Flags -> Grapheme
show :: Flags -> Grapheme
$cshowList :: [Flags] -> ShowS
showList :: [Flags] -> ShowS
Show, (forall x. Flags -> Rep Flags x)
-> (forall x. Rep Flags x -> Flags) -> Generic Flags
forall x. Rep Flags x -> Flags
forall x. Flags -> Rep Flags x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. Flags -> Rep Flags x
from :: forall x. Flags -> Rep Flags x
$cto :: forall x. Rep Flags x -> Flags
to :: forall x. Rep Flags x -> Flags
Generic, Flags -> ()
(Flags -> ()) -> NFData Flags
forall a. (a -> ()) -> NFData a
$crnf :: Flags -> ()
rnf :: Flags -> ()
NFData)
defFlags :: Flags
defFlags :: Flags
defFlags = Flags
{ highlightChanges :: Bool
highlightChanges = Bool
True
, applyDirection :: Direction
applyDirection = Direction
LTR
, applyOnceOnly :: Bool
applyOnceOnly = Bool
False
, sporadic :: Sporadicity
sporadic = Sporadicity
ApplyAlways
, nonOverlappingTarget :: Bool
nonOverlappingTarget = Bool
False
}
data Rule c = Rule
{ forall (c :: LexemeType -> *). Rule c -> [Lexeme c 'Matched]
target :: [Lexeme c 'Matched]
, forall (c :: LexemeType -> *). Rule c -> [Lexeme c 'Replacement]
replacement :: [Lexeme c 'Replacement]
, forall (c :: LexemeType -> *). Rule c -> [Environment c]
environment :: [Environment c]
, forall (c :: LexemeType -> *). Rule c -> Maybe (Environment c)
exception :: Maybe (Environment c)
, forall (c :: LexemeType -> *). Rule c -> Flags
flags :: Flags
, forall (c :: LexemeType -> *). Rule c -> Grapheme
plaintext :: String
} deriving ((forall x. Rule c -> Rep (Rule c) x)
-> (forall x. Rep (Rule c) x -> Rule c) -> Generic (Rule c)
forall x. Rep (Rule c) x -> Rule c
forall x. Rule c -> Rep (Rule c) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall (c :: LexemeType -> *) x. Rep (Rule c) x -> Rule c
forall (c :: LexemeType -> *) x. Rule c -> Rep (Rule c) x
$cfrom :: forall (c :: LexemeType -> *) x. Rule c -> Rep (Rule c) x
from :: forall x. Rule c -> Rep (Rule c) x
$cto :: forall (c :: LexemeType -> *) x. Rep (Rule c) x -> Rule c
to :: forall x. Rep (Rule c) x -> Rule c
Generic)
deriving instance (forall a. Show (c a)) => Show (Rule c)
deriving instance (forall a. NFData (c a)) => NFData (Rule c)
data Filter c = Filter String [Lexeme c 'Matched]
deriving ((forall x. Filter c -> Rep (Filter c) x)
-> (forall x. Rep (Filter c) x -> Filter c) -> Generic (Filter c)
forall x. Rep (Filter c) x -> Filter c
forall x. Filter c -> Rep (Filter c) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall (c :: LexemeType -> *) x. Rep (Filter c) x -> Filter c
forall (c :: LexemeType -> *) x. Filter c -> Rep (Filter c) x
$cfrom :: forall (c :: LexemeType -> *) x. Filter c -> Rep (Filter c) x
from :: forall x. Filter c -> Rep (Filter c) x
$cto :: forall (c :: LexemeType -> *) x. Rep (Filter c) x -> Filter c
to :: forall x. Rep (Filter c) x -> Filter c
Generic)
deriving instance (forall a. Show (c a)) => Show (Filter c)
deriving instance (forall a. NFData (c a)) => NFData (Filter c)
data Statement c decl
= RuleS (Rule c)
| FilterS (Filter c)
| ReportS
| DeclS decl
deriving ((forall x. Statement c decl -> Rep (Statement c decl) x)
-> (forall x. Rep (Statement c decl) x -> Statement c decl)
-> Generic (Statement c decl)
forall x. Rep (Statement c decl) x -> Statement c decl
forall x. Statement c decl -> Rep (Statement c decl) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall (c :: LexemeType -> *) decl x.
Rep (Statement c decl) x -> Statement c decl
forall (c :: LexemeType -> *) decl x.
Statement c decl -> Rep (Statement c decl) x
$cfrom :: forall (c :: LexemeType -> *) decl x.
Statement c decl -> Rep (Statement c decl) x
from :: forall x. Statement c decl -> Rep (Statement c decl) x
$cto :: forall (c :: LexemeType -> *) decl x.
Rep (Statement c decl) x -> Statement c decl
to :: forall x. Rep (Statement c decl) x -> Statement c decl
Generic)
deriving instance (forall a. Show (c a), Show decl) => Show (Statement c decl)
deriving instance (forall a. NFData (c a), NFData decl) => NFData (Statement c decl)
plaintext' :: Statement c decl -> String
plaintext' :: forall (c :: LexemeType -> *) decl. Statement c decl -> Grapheme
plaintext' (RuleS Rule c
r) = Rule c -> Grapheme
forall (c :: LexemeType -> *). Rule c -> Grapheme
plaintext Rule c
r
plaintext' (FilterS (Filter Grapheme
p [Lexeme c 'Matched]
_)) = Grapheme
p
plaintext' Statement c decl
ReportS = Grapheme
"intermediate result"
plaintext' (DeclS decl
_) = Grapheme
"<declaration>"
type SoundChanges c decl = [Statement c decl]
data CategoryModification
= Union
| Intersect
| Subtract
deriving (Int -> CategoryModification -> ShowS
[CategoryModification] -> ShowS
CategoryModification -> Grapheme
(Int -> CategoryModification -> ShowS)
-> (CategoryModification -> Grapheme)
-> ([CategoryModification] -> ShowS)
-> Show CategoryModification
forall a.
(Int -> a -> ShowS) -> (a -> Grapheme) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CategoryModification -> ShowS
showsPrec :: Int -> CategoryModification -> ShowS
$cshow :: CategoryModification -> Grapheme
show :: CategoryModification -> Grapheme
$cshowList :: [CategoryModification] -> ShowS
showList :: [CategoryModification] -> ShowS
Show, CategoryModification -> CategoryModification -> Bool
(CategoryModification -> CategoryModification -> Bool)
-> (CategoryModification -> CategoryModification -> Bool)
-> Eq CategoryModification
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CategoryModification -> CategoryModification -> Bool
== :: CategoryModification -> CategoryModification -> Bool
$c/= :: CategoryModification -> CategoryModification -> Bool
/= :: CategoryModification -> CategoryModification -> Bool
Eq, Eq CategoryModification
Eq CategoryModification =>
(CategoryModification -> CategoryModification -> Ordering)
-> (CategoryModification -> CategoryModification -> Bool)
-> (CategoryModification -> CategoryModification -> Bool)
-> (CategoryModification -> CategoryModification -> Bool)
-> (CategoryModification -> CategoryModification -> Bool)
-> (CategoryModification
-> CategoryModification -> CategoryModification)
-> (CategoryModification
-> CategoryModification -> CategoryModification)
-> Ord CategoryModification
CategoryModification -> CategoryModification -> Bool
CategoryModification -> CategoryModification -> Ordering
CategoryModification
-> CategoryModification -> CategoryModification
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 :: CategoryModification -> CategoryModification -> Ordering
compare :: CategoryModification -> CategoryModification -> Ordering
$c< :: CategoryModification -> CategoryModification -> Bool
< :: CategoryModification -> CategoryModification -> Bool
$c<= :: CategoryModification -> CategoryModification -> Bool
<= :: CategoryModification -> CategoryModification -> Bool
$c> :: CategoryModification -> CategoryModification -> Bool
> :: CategoryModification -> CategoryModification -> Bool
$c>= :: CategoryModification -> CategoryModification -> Bool
>= :: CategoryModification -> CategoryModification -> Bool
$cmax :: CategoryModification
-> CategoryModification -> CategoryModification
max :: CategoryModification
-> CategoryModification -> CategoryModification
$cmin :: CategoryModification
-> CategoryModification -> CategoryModification
min :: CategoryModification
-> CategoryModification -> CategoryModification
Ord, (forall x. CategoryModification -> Rep CategoryModification x)
-> (forall x. Rep CategoryModification x -> CategoryModification)
-> Generic CategoryModification
forall x. Rep CategoryModification x -> CategoryModification
forall x. CategoryModification -> Rep CategoryModification x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. CategoryModification -> Rep CategoryModification x
from :: forall x. CategoryModification -> Rep CategoryModification x
$cto :: forall x. Rep CategoryModification x -> CategoryModification
to :: forall x. Rep CategoryModification x -> CategoryModification
Generic, CategoryModification -> ()
(CategoryModification -> ()) -> NFData CategoryModification
forall a. (a -> ()) -> NFData a
$crnf :: CategoryModification -> ()
rnf :: CategoryModification -> ()
NFData)
type CategoryElement category a = [Lexeme category a]
data CategorySpec a
= CategorySpec [(CategoryModification, CategoryElement CategorySpec a)]
| MustInline String
deriving (Int -> CategorySpec a -> ShowS
[CategorySpec a] -> ShowS
CategorySpec a -> Grapheme
(Int -> CategorySpec a -> ShowS)
-> (CategorySpec a -> Grapheme)
-> ([CategorySpec a] -> ShowS)
-> Show (CategorySpec a)
forall a.
(Int -> a -> ShowS) -> (a -> Grapheme) -> ([a] -> ShowS) -> Show a
forall (a :: LexemeType). Int -> CategorySpec a -> ShowS
forall (a :: LexemeType). [CategorySpec a] -> ShowS
forall (a :: LexemeType). CategorySpec a -> Grapheme
$cshowsPrec :: forall (a :: LexemeType). Int -> CategorySpec a -> ShowS
showsPrec :: Int -> CategorySpec a -> ShowS
$cshow :: forall (a :: LexemeType). CategorySpec a -> Grapheme
show :: CategorySpec a -> Grapheme
$cshowList :: forall (a :: LexemeType). [CategorySpec a] -> ShowS
showList :: [CategorySpec a] -> ShowS
Show, CategorySpec a -> CategorySpec a -> Bool
(CategorySpec a -> CategorySpec a -> Bool)
-> (CategorySpec a -> CategorySpec a -> Bool)
-> Eq (CategorySpec a)
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
forall (a :: LexemeType). CategorySpec a -> CategorySpec a -> Bool
$c== :: forall (a :: LexemeType). CategorySpec a -> CategorySpec a -> Bool
== :: CategorySpec a -> CategorySpec a -> Bool
$c/= :: forall (a :: LexemeType). CategorySpec a -> CategorySpec a -> Bool
/= :: CategorySpec a -> CategorySpec a -> Bool
Eq, Eq (CategorySpec a)
Eq (CategorySpec a) =>
(CategorySpec a -> CategorySpec a -> Ordering)
-> (CategorySpec a -> CategorySpec a -> Bool)
-> (CategorySpec a -> CategorySpec a -> Bool)
-> (CategorySpec a -> CategorySpec a -> Bool)
-> (CategorySpec a -> CategorySpec a -> Bool)
-> (CategorySpec a -> CategorySpec a -> CategorySpec a)
-> (CategorySpec a -> CategorySpec a -> CategorySpec a)
-> Ord (CategorySpec a)
CategorySpec a -> CategorySpec a -> Bool
CategorySpec a -> CategorySpec a -> Ordering
CategorySpec a -> CategorySpec a -> CategorySpec a
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
forall (x :: LexemeType). Eq (CategorySpec x)
forall (a :: LexemeType). CategorySpec a -> CategorySpec a -> Bool
forall (a :: LexemeType).
CategorySpec a -> CategorySpec a -> Ordering
forall (a :: LexemeType).
CategorySpec a -> CategorySpec a -> CategorySpec a
$ccompare :: forall (a :: LexemeType).
CategorySpec a -> CategorySpec a -> Ordering
compare :: CategorySpec a -> CategorySpec a -> Ordering
$c< :: forall (a :: LexemeType). CategorySpec a -> CategorySpec a -> Bool
< :: CategorySpec a -> CategorySpec a -> Bool
$c<= :: forall (a :: LexemeType). CategorySpec a -> CategorySpec a -> Bool
<= :: CategorySpec a -> CategorySpec a -> Bool
$c> :: forall (a :: LexemeType). CategorySpec a -> CategorySpec a -> Bool
> :: CategorySpec a -> CategorySpec a -> Bool
$c>= :: forall (a :: LexemeType). CategorySpec a -> CategorySpec a -> Bool
>= :: CategorySpec a -> CategorySpec a -> Bool
$cmax :: forall (a :: LexemeType).
CategorySpec a -> CategorySpec a -> CategorySpec a
max :: CategorySpec a -> CategorySpec a -> CategorySpec a
$cmin :: forall (a :: LexemeType).
CategorySpec a -> CategorySpec a -> CategorySpec a
min :: CategorySpec a -> CategorySpec a -> CategorySpec a
Ord, (forall x. CategorySpec a -> Rep (CategorySpec a) x)
-> (forall x. Rep (CategorySpec a) x -> CategorySpec a)
-> Generic (CategorySpec a)
forall x. Rep (CategorySpec a) x -> CategorySpec a
forall x. CategorySpec a -> Rep (CategorySpec a) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall (a :: LexemeType) x.
Rep (CategorySpec a) x -> CategorySpec a
forall (a :: LexemeType) x.
CategorySpec a -> Rep (CategorySpec a) x
$cfrom :: forall (a :: LexemeType) x.
CategorySpec a -> Rep (CategorySpec a) x
from :: forall x. CategorySpec a -> Rep (CategorySpec a) x
$cto :: forall (a :: LexemeType) x.
Rep (CategorySpec a) x -> CategorySpec a
to :: forall x. Rep (CategorySpec a) x -> CategorySpec a
Generic, CategorySpec a -> ()
(CategorySpec a -> ()) -> NFData (CategorySpec a)
forall a. (a -> ()) -> NFData a
forall (a :: LexemeType). CategorySpec a -> ()
$crnf :: forall (a :: LexemeType). CategorySpec a -> ()
rnf :: CategorySpec a -> ()
NFData)
data FeatureSpec = FeatureSpec
{ FeatureSpec -> Maybe Grapheme
featureBaseName :: Maybe String
, FeatureSpec -> CategorySpec 'AnyPart
featureBaseValues :: CategorySpec 'AnyPart
, FeatureSpec -> [(Grapheme, CategorySpec 'AnyPart)]
featureDerived :: [(String, CategorySpec 'AnyPart)]
}
deriving (Int -> FeatureSpec -> ShowS
[FeatureSpec] -> ShowS
FeatureSpec -> Grapheme
(Int -> FeatureSpec -> ShowS)
-> (FeatureSpec -> Grapheme)
-> ([FeatureSpec] -> ShowS)
-> Show FeatureSpec
forall a.
(Int -> a -> ShowS) -> (a -> Grapheme) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FeatureSpec -> ShowS
showsPrec :: Int -> FeatureSpec -> ShowS
$cshow :: FeatureSpec -> Grapheme
show :: FeatureSpec -> Grapheme
$cshowList :: [FeatureSpec] -> ShowS
showList :: [FeatureSpec] -> ShowS
Show, FeatureSpec -> FeatureSpec -> Bool
(FeatureSpec -> FeatureSpec -> Bool)
-> (FeatureSpec -> FeatureSpec -> Bool) -> Eq FeatureSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FeatureSpec -> FeatureSpec -> Bool
== :: FeatureSpec -> FeatureSpec -> Bool
$c/= :: FeatureSpec -> FeatureSpec -> Bool
/= :: FeatureSpec -> FeatureSpec -> Bool
Eq, Eq FeatureSpec
Eq FeatureSpec =>
(FeatureSpec -> FeatureSpec -> Ordering)
-> (FeatureSpec -> FeatureSpec -> Bool)
-> (FeatureSpec -> FeatureSpec -> Bool)
-> (FeatureSpec -> FeatureSpec -> Bool)
-> (FeatureSpec -> FeatureSpec -> Bool)
-> (FeatureSpec -> FeatureSpec -> FeatureSpec)
-> (FeatureSpec -> FeatureSpec -> FeatureSpec)
-> Ord FeatureSpec
FeatureSpec -> FeatureSpec -> Bool
FeatureSpec -> FeatureSpec -> Ordering
FeatureSpec -> FeatureSpec -> FeatureSpec
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 :: FeatureSpec -> FeatureSpec -> Ordering
compare :: FeatureSpec -> FeatureSpec -> Ordering
$c< :: FeatureSpec -> FeatureSpec -> Bool
< :: FeatureSpec -> FeatureSpec -> Bool
$c<= :: FeatureSpec -> FeatureSpec -> Bool
<= :: FeatureSpec -> FeatureSpec -> Bool
$c> :: FeatureSpec -> FeatureSpec -> Bool
> :: FeatureSpec -> FeatureSpec -> Bool
$c>= :: FeatureSpec -> FeatureSpec -> Bool
>= :: FeatureSpec -> FeatureSpec -> Bool
$cmax :: FeatureSpec -> FeatureSpec -> FeatureSpec
max :: FeatureSpec -> FeatureSpec -> FeatureSpec
$cmin :: FeatureSpec -> FeatureSpec -> FeatureSpec
min :: FeatureSpec -> FeatureSpec -> FeatureSpec
Ord, (forall x. FeatureSpec -> Rep FeatureSpec x)
-> (forall x. Rep FeatureSpec x -> FeatureSpec)
-> Generic FeatureSpec
forall x. Rep FeatureSpec x -> FeatureSpec
forall x. FeatureSpec -> Rep FeatureSpec x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. FeatureSpec -> Rep FeatureSpec x
from :: forall x. FeatureSpec -> Rep FeatureSpec x
$cto :: forall x. Rep FeatureSpec x -> FeatureSpec
to :: forall x. Rep FeatureSpec x -> FeatureSpec
Generic, FeatureSpec -> ()
(FeatureSpec -> ()) -> NFData FeatureSpec
forall a. (a -> ()) -> NFData a
$crnf :: FeatureSpec -> ()
rnf :: FeatureSpec -> ()
NFData)
data CategoryDefinition
= DefineCategory String (CategorySpec 'AnyPart)
| DefineFeature FeatureSpec
| DefineAuto String
deriving (Int -> CategoryDefinition -> ShowS
[CategoryDefinition] -> ShowS
CategoryDefinition -> Grapheme
(Int -> CategoryDefinition -> ShowS)
-> (CategoryDefinition -> Grapheme)
-> ([CategoryDefinition] -> ShowS)
-> Show CategoryDefinition
forall a.
(Int -> a -> ShowS) -> (a -> Grapheme) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CategoryDefinition -> ShowS
showsPrec :: Int -> CategoryDefinition -> ShowS
$cshow :: CategoryDefinition -> Grapheme
show :: CategoryDefinition -> Grapheme
$cshowList :: [CategoryDefinition] -> ShowS
showList :: [CategoryDefinition] -> ShowS
Show, CategoryDefinition -> CategoryDefinition -> Bool
(CategoryDefinition -> CategoryDefinition -> Bool)
-> (CategoryDefinition -> CategoryDefinition -> Bool)
-> Eq CategoryDefinition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CategoryDefinition -> CategoryDefinition -> Bool
== :: CategoryDefinition -> CategoryDefinition -> Bool
$c/= :: CategoryDefinition -> CategoryDefinition -> Bool
/= :: CategoryDefinition -> CategoryDefinition -> Bool
Eq, Eq CategoryDefinition
Eq CategoryDefinition =>
(CategoryDefinition -> CategoryDefinition -> Ordering)
-> (CategoryDefinition -> CategoryDefinition -> Bool)
-> (CategoryDefinition -> CategoryDefinition -> Bool)
-> (CategoryDefinition -> CategoryDefinition -> Bool)
-> (CategoryDefinition -> CategoryDefinition -> Bool)
-> (CategoryDefinition -> CategoryDefinition -> CategoryDefinition)
-> (CategoryDefinition -> CategoryDefinition -> CategoryDefinition)
-> Ord CategoryDefinition
CategoryDefinition -> CategoryDefinition -> Bool
CategoryDefinition -> CategoryDefinition -> Ordering
CategoryDefinition -> CategoryDefinition -> CategoryDefinition
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 :: CategoryDefinition -> CategoryDefinition -> Ordering
compare :: CategoryDefinition -> CategoryDefinition -> Ordering
$c< :: CategoryDefinition -> CategoryDefinition -> Bool
< :: CategoryDefinition -> CategoryDefinition -> Bool
$c<= :: CategoryDefinition -> CategoryDefinition -> Bool
<= :: CategoryDefinition -> CategoryDefinition -> Bool
$c> :: CategoryDefinition -> CategoryDefinition -> Bool
> :: CategoryDefinition -> CategoryDefinition -> Bool
$c>= :: CategoryDefinition -> CategoryDefinition -> Bool
>= :: CategoryDefinition -> CategoryDefinition -> Bool
$cmax :: CategoryDefinition -> CategoryDefinition -> CategoryDefinition
max :: CategoryDefinition -> CategoryDefinition -> CategoryDefinition
$cmin :: CategoryDefinition -> CategoryDefinition -> CategoryDefinition
min :: CategoryDefinition -> CategoryDefinition -> CategoryDefinition
Ord, (forall x. CategoryDefinition -> Rep CategoryDefinition x)
-> (forall x. Rep CategoryDefinition x -> CategoryDefinition)
-> Generic CategoryDefinition
forall x. Rep CategoryDefinition x -> CategoryDefinition
forall x. CategoryDefinition -> Rep CategoryDefinition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. CategoryDefinition -> Rep CategoryDefinition x
from :: forall x. CategoryDefinition -> Rep CategoryDefinition x
$cto :: forall x. Rep CategoryDefinition x -> CategoryDefinition
to :: forall x. Rep CategoryDefinition x -> CategoryDefinition
Generic, CategoryDefinition -> ()
(CategoryDefinition -> ()) -> NFData CategoryDefinition
forall a. (a -> ()) -> NFData a
$crnf :: CategoryDefinition -> ()
rnf :: CategoryDefinition -> ()
NFData)
data Directive
= Categories
Bool
Bool
[CategoryDefinition]
| [String]
deriving (Int -> Directive -> ShowS
[Directive] -> ShowS
Directive -> Grapheme
(Int -> Directive -> ShowS)
-> (Directive -> Grapheme)
-> ([Directive] -> ShowS)
-> Show Directive
forall a.
(Int -> a -> ShowS) -> (a -> Grapheme) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Directive -> ShowS
showsPrec :: Int -> Directive -> ShowS
$cshow :: Directive -> Grapheme
show :: Directive -> Grapheme
$cshowList :: [Directive] -> ShowS
showList :: [Directive] -> ShowS
Show, Directive -> Directive -> Bool
(Directive -> Directive -> Bool)
-> (Directive -> Directive -> Bool) -> Eq Directive
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Directive -> Directive -> Bool
== :: Directive -> Directive -> Bool
$c/= :: Directive -> Directive -> Bool
/= :: Directive -> Directive -> Bool
Eq, Eq Directive
Eq Directive =>
(Directive -> Directive -> Ordering)
-> (Directive -> Directive -> Bool)
-> (Directive -> Directive -> Bool)
-> (Directive -> Directive -> Bool)
-> (Directive -> Directive -> Bool)
-> (Directive -> Directive -> Directive)
-> (Directive -> Directive -> Directive)
-> Ord Directive
Directive -> Directive -> Bool
Directive -> Directive -> Ordering
Directive -> Directive -> Directive
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 :: Directive -> Directive -> Ordering
compare :: Directive -> Directive -> Ordering
$c< :: Directive -> Directive -> Bool
< :: Directive -> Directive -> Bool
$c<= :: Directive -> Directive -> Bool
<= :: Directive -> Directive -> Bool
$c> :: Directive -> Directive -> Bool
> :: Directive -> Directive -> Bool
$c>= :: Directive -> Directive -> Bool
>= :: Directive -> Directive -> Bool
$cmax :: Directive -> Directive -> Directive
max :: Directive -> Directive -> Directive
$cmin :: Directive -> Directive -> Directive
min :: Directive -> Directive -> Directive
Ord, (forall x. Directive -> Rep Directive x)
-> (forall x. Rep Directive x -> Directive) -> Generic Directive
forall x. Rep Directive x -> Directive
forall x. Directive -> Rep Directive x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. Directive -> Rep Directive x
from :: forall x. Directive -> Rep Directive x
$cto :: forall x. Rep Directive x -> Directive
to :: forall x. Rep Directive x -> Directive
Generic, Directive -> ()
(Directive -> ()) -> NFData Directive
forall a. (a -> ()) -> NFData a
$crnf :: Directive -> ()
rnf :: Directive -> ()
NFData)
data GraphemeList = GraphemeList Bool [Grapheme]
deriving (GraphemeList -> GraphemeList -> Bool
(GraphemeList -> GraphemeList -> Bool)
-> (GraphemeList -> GraphemeList -> Bool) -> Eq GraphemeList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GraphemeList -> GraphemeList -> Bool
== :: GraphemeList -> GraphemeList -> Bool
$c/= :: GraphemeList -> GraphemeList -> Bool
/= :: GraphemeList -> GraphemeList -> Bool
Eq, Int -> GraphemeList -> ShowS
[GraphemeList] -> ShowS
GraphemeList -> Grapheme
(Int -> GraphemeList -> ShowS)
-> (GraphemeList -> Grapheme)
-> ([GraphemeList] -> ShowS)
-> Show GraphemeList
forall a.
(Int -> a -> ShowS) -> (a -> Grapheme) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GraphemeList -> ShowS
showsPrec :: Int -> GraphemeList -> ShowS
$cshow :: GraphemeList -> Grapheme
show :: GraphemeList -> Grapheme
$cshowList :: [GraphemeList] -> ShowS
showList :: [GraphemeList] -> ShowS
Show, Eq GraphemeList
Eq GraphemeList =>
(GraphemeList -> GraphemeList -> Ordering)
-> (GraphemeList -> GraphemeList -> Bool)
-> (GraphemeList -> GraphemeList -> Bool)
-> (GraphemeList -> GraphemeList -> Bool)
-> (GraphemeList -> GraphemeList -> Bool)
-> (GraphemeList -> GraphemeList -> GraphemeList)
-> (GraphemeList -> GraphemeList -> GraphemeList)
-> Ord GraphemeList
GraphemeList -> GraphemeList -> Bool
GraphemeList -> GraphemeList -> Ordering
GraphemeList -> GraphemeList -> GraphemeList
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 :: GraphemeList -> GraphemeList -> Ordering
compare :: GraphemeList -> GraphemeList -> Ordering
$c< :: GraphemeList -> GraphemeList -> Bool
< :: GraphemeList -> GraphemeList -> Bool
$c<= :: GraphemeList -> GraphemeList -> Bool
<= :: GraphemeList -> GraphemeList -> Bool
$c> :: GraphemeList -> GraphemeList -> Bool
> :: GraphemeList -> GraphemeList -> Bool
$c>= :: GraphemeList -> GraphemeList -> Bool
>= :: GraphemeList -> GraphemeList -> Bool
$cmax :: GraphemeList -> GraphemeList -> GraphemeList
max :: GraphemeList -> GraphemeList -> GraphemeList
$cmin :: GraphemeList -> GraphemeList -> GraphemeList
min :: GraphemeList -> GraphemeList -> GraphemeList
Ord, (forall x. GraphemeList -> Rep GraphemeList x)
-> (forall x. Rep GraphemeList x -> GraphemeList)
-> Generic GraphemeList
forall x. Rep GraphemeList x -> GraphemeList
forall x. GraphemeList -> Rep GraphemeList x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. GraphemeList -> Rep GraphemeList x
from :: forall x. GraphemeList -> Rep GraphemeList x
$cto :: forall x. Rep GraphemeList x -> GraphemeList
to :: forall x. Rep GraphemeList x -> GraphemeList
Generic, GraphemeList -> ()
(GraphemeList -> ()) -> NFData GraphemeList
forall a. (a -> ()) -> NFData a
$crnf :: GraphemeList -> ()
rnf :: GraphemeList -> ()
NFData)