Reference
Every module's exports as GHCi's :browse prints them for the compiled library (scripts/site/capture.py). The umbrella module Quaalude re-exports all of these except Braket and Type, together with the libraries it builds on. The guide explains how the pieces fit together.
Quaalude.Alias101Notation: number-set types (ℤ, ℕ, ℚ, ℝ, 𝔹, 𝕊, 𝕋), logic and function operators (∘ ≡ ≤ ∧ ∨ ⋅), ⊥, sorting with 🎜 and 🎝, and the ??? conditional.
type ℤ' :: *type ℤ' = Inttype ℤ₆₄ :: *type ℤ₆₄ = Inttype ℤ :: *type ℤ = Integertype ℤ² :: *type ℤ² = (ℤ, ℤ)type ℤ³ :: *type ℤ³ = (ℤ, ℤ, ℤ)type ℤ⁴ :: *type ℤ⁴ = (ℤ, ℤ, ℤ, ℤ)type ℤ⁵ :: *type ℤ⁵ = (ℤ, ℤ, ℤ, ℤ, ℤ)type ℤ⁶ :: *type ℤ⁶ = (ℤ, ℤ, ℤ, ℤ, ℤ, ℤ)type ℤ⁷ :: *type ℤ⁷ = (ℤ, ℤ, ℤ, ℤ, ℤ, ℤ, ℤ)type ℤ⁸ :: *type ℤ⁸ = (ℤ, ℤ, ℤ, ℤ, ℤ, ℤ, ℤ, ℤ)type ℤ⁹ :: *type ℤ⁹ = (ℤ, ℤ, ℤ, ℤ, ℤ, ℤ, ℤ, ℤ, ℤ)type ℤ¹⁰ :: *type ℤ¹⁰ = (ℤ, ℤ, ℤ, ℤ, ℤ, ℤ, ℤ, ℤ, ℤ, ℤ)type ℕ :: *type ℕ = Naturaltype Nat10 :: Data.Nat.Nattype Nat10 = Data.Nat.S Data.Type.Nat.Nat9 :: Data.Nat.Nattype ℕ₁ :: *type ℕ₁ = Data.Fin.Fin Data.Type.Nat.Nat1type ℕ₂ :: *type ℕ₂ = Data.Fin.Fin Data.Type.Nat.Nat2type ℕ₃ :: *type ℕ₃ = Data.Fin.Fin Data.Type.Nat.Nat3type ℕ₄ :: *type ℕ₄ = Data.Fin.Fin Data.Type.Nat.Nat4type ℕ₅ :: *type ℕ₅ = Data.Fin.Fin Data.Type.Nat.Nat5type ℕ₆ :: *type ℕ₆ = Data.Fin.Fin Data.Type.Nat.Nat6type ℕ₇ :: *type ℕ₇ = Data.Fin.Fin Data.Type.Nat.Nat7type ℕ₈ :: *type ℕ₈ = Data.Fin.Fin Data.Type.Nat.Nat8type ℕ₉ :: *type ℕ₉ = Data.Fin.Fin Data.Type.Nat.Nat9type ℕ₁₀ :: *type ℕ₁₀ = Data.Fin.Fin Nat10type ℕ₁₀² :: *type ℕ₁₀² = (ℕ₁₀, ℕ₁₀)type ℚ :: *type ℚ = Rationaltype ℚ² :: *type ℚ² = (ℚ, ℚ)type ℝ :: *type ℝ = Doubletype ℝ² :: *type ℝ² = (ℝ, ℝ)type ℂ :: *type ℂ = Data.Complex.Complex ℝtype 𝔹 :: *type 𝔹 = Booltype 𝕊 :: *type 𝕊 = Stringtype 𝕋 :: *type 𝕋 = Texttype Inf :: * -> Constraintclass Inf a where
infinity :: a
(∞) :: a
ꝏ :: abottom :: a(⊥) :: a(∘) :: (b -> c) -> (a -> b) -> a -> c(⋅) :: Num a => a -> a -> a(≡) :: Eq a => a -> a -> Bool(≢) :: Eq a => a -> a -> Bool(≤) :: Ord a => a -> a -> Bool(≥) :: Ord a => a -> a -> Bool(∧) :: Bool -> Bool -> Bool(∨) :: Bool -> Bool -> Booltype QuestionableF :: * -> *type family QuestionableF a where
QuestionableF (Maybe a) = atype QuestionableFR :: * -> *type family QuestionableFR a where
QuestionableFR (Maybe a) = atype Questionable :: * -> Constraintclass Questionable a where
(?) :: a -> QuestionableF a -> QuestionableFR a(???) :: Bool -> a -> a -> a(<>.) :: Monoid c => (b -> [c]) -> (a -> b) -> a -> c(<>∘) :: Monoid c => (b -> [c]) -> (a -> b) -> a -> c(<>!) :: Monoid a => [a] -> a(<>?) :: [Maybe a] -> [a](±) :: Num a => a -> a(⇱) :: Bifunctor p => (a -> b) -> p a c -> p b c(⇲) :: Bifunctor p => p b a -> (a -> c) -> p b c(#) :: Applicative m => a -> m aφ :: Applicative m => a -> m atype (:|->) :: * -> * -> *type (:|->) k v = Map k vixℤ ::
(Control.Lens.At.Ixed m, Applicative f, Integral p,
Num (Control.Lens.At.Index m)) =>
p
-> (Control.Lens.At.IxValue m -> f (Control.Lens.At.IxValue m))
-> m
-> f m(🎜) :: (Ord a, Foldable f) => f a -> [a](🎝) :: (Ord a, Foldable f) => f a -> [a]type (≠) :: * -> (* -> *) -> *type family (≠) a nonEmptyMarker where
(≠) [a] [] = NonEmpty aQuaalude.Bits7Bit helpers: bits to and from integers, most and least common bit, hex to binary.
bitsToInt :: Bits a => a -> IntegerintToBits :: Int -> [Bool]zeroCount :: Bits a => a -> IntmostCommonBit :: Bits a => a -> BoolleastCommonBit :: Bits a => a -> BoolhexToBin :: Char -> StringbitArrayToInt ::
bitwise-1.0.0.1:Data.Array.BitArray.Internal.BitArray Int -> IntQuaalude.BoundedSet7Sets that track their bounds and an origin.
type Originable :: (* -> *) -> * -> Constraintclass Originable f a where
origin :: a
toOrigin :: f a -> f a
default toOrigin :: f a -> f a
(⌞) :: f a -> f a
default (⌞) :: f a -> f atype Bounded1 :: (* -> *) -> * -> Constraintclass Bounded1 f a where
minBound1 :: f a -> a
maxBound1 :: f a -> atype role BoundedSet nominaltype BoundedSet :: * -> *data BoundedSet a = BoundedSet !a !a !(Set a)Quaalude.Braket23An experiment with bra-ket notation. Not re-exported by Quaalude.
type Braket :: * -> * -> *data Braket a b = Braket !a !btype Bra' :: * -> *newtype Bra' a = Bra' atype Ket :: * -> *newtype Ket a = Ket atype Bra :: * -> *type Bra a =
() -> BraketClose -> Braket a ()type BraketDivider :: *data BraketDivider = Ⲓtype BraketClose :: *data BraketClose = BraketCloseᐳ :: BraketClosetype Braketed :: (* -> * -> *)
-> * -> * -> Constraintclass Braketed t a b where
く :: a
-> BraketDivider
-> b
-> BraketClose
-> t a b
unBraket :: t a b -> (a, b)
unBra :: t a b -> a
unKet :: t a b -> btype BraketedBra :: * -> * -> Constraintclass BraketedBra t a where
bra :: t -> Bra' atype BraketedKet :: * -> * -> Constraintclass BraketedKet t a where
ket :: t -> Ket aߊ ::
a -> BraketClose -> Ket aa :: Braket Int Intb :: Bra Intc :: Ket IntQuaalude.Collection229One vocabulary for lists, sets, maps, sequences, vectors and queues: mk, un and co for conversion, and operators for lookup, insertion, deletion, membership and size.
traceMk :: String -> a -> atraceUn :: String -> a -> atraceCo :: String -> a -> atype Packable :: * -> * -> Constraintclass Packable a b where
pack :: a -> b
unpack :: b -> atype MkWithable :: (* -> * -> *) -> Constraintclass MkWithable f where
mkWith :: (Ord k, Unable t) => (v -> v -> v) -> t (k, v) -> f k vtype Mkable :: (* -> *) -> * -> Constraintclass Mkable f a where
mk :: [a] -> f apattern Seq₁ :: a -> Seq amk₁ :: Mkable f a => a -> f atype MkableKey :: (* -> * -> *) -> Constraintclass MkableKey f where
mkKey :: Ord k => [(k, v)] -> f k vtype MkableOrd :: (* -> *) -> Constraintclass MkableOrd f where
mkOrd :: Ord a => [a] -> f atype Unable :: (* -> *) -> Constraintclass Unable f where
un :: f a -> [a]type UnableKey :: (* -> * -> *) -> Constraintclass UnableKey f where
unKey :: f k v -> [(k, v)]coMk :: (Mkable f y, a ~ [x], Convable x y, c ~ f y) => a -> ctype Convable :: * -> * -> Constraintclass Convable a c where
co :: a -> c
default co :: (Mkable f y, a ~ [x], Convable x y, c ~ f y) =>
a -> c(⊏⊐) :: Convable a c => a -> cͼͽ :: Convable a c => a -> c(⊏) :: Unable f => f a -> [a]ͽ :: Unable f => f a -> [a](⊐) :: Mkable f a => [a] -> f aͼ :: (Foldable f, Mkable g a) => f a -> g atype SplitOnable :: * -> Constraintclass SplitOnable a where
splitOn :: a -> a -> [a]chunksOf :: Int -> [a] -> [[a]]minimum :: Ord a => [a] -> amaximum :: Ord a => [a] -> anub :: Eq a => [a] -> [a]foldl1 :: (a -> a -> a) -> [a] -> afoldl1' :: (a -> a -> a) -> [a] -> afoldr1 :: (a -> a -> a) -> [a] -> amkVec :: [a] -> Vector aunVec :: Vector a -> [a]mkSet :: Ord a => [a] -> Set aunSet :: Set a -> [a]type Insertable :: (* -> *) -> * -> Constraintclass Insertable f a where
(<-|) :: f a -> a -> f a
default (<-|) :: f a -> a -> f a
(|->) :: a -> f a -> f a
default (|->) :: a -> f a -> f atype Differenceable :: forall {k}. (k -> *) -> k -> Constraintclass Differenceable f a where
(\\) :: f a -> f a -> f a
(∖) :: f a -> f a -> f atype Sizable :: * -> Constraintclass Sizable a where
size :: Integral i => a -> itype Memberable :: * -> * -> Constraintclass Memberable a b | b -> a where
(∈) :: a -> b -> Bool
(∉) :: a -> b -> Bool
(∋) :: b -> a -> Bool
(∌) :: b -> a -> Booltype Ixable :: * -> (* -> *) -> Constraintclass Ixable i f where
(!!) :: f a -> i -> a
(!.) :: f a -> (i, a) -> f a
(!?) :: f a -> i -> Maybe atype Gettable :: (* -> * -> *) -> * -> * -> Constraintclass Gettable f k v where
(|!) :: f k v -> k -> v
default (|!) :: Ixable k (f k) => f k v -> k -> vtype MaybeGettable :: (* -> * -> *) -> * -> * -> Constraintclass MaybeGettable f k v where
(|?) :: f k v -> k -> Maybe v
default (|?) :: Ixable k (f k) => f k v -> k -> Maybe vtype ValueGettable :: * -> * -> * -> Constraintclass ValueGettable f k v | f -> v where
(|?>) :: f -> v -> [k]
(|!>) :: f -> v -> k
default (|!>) :: f -> v -> ktype Settable :: (* -> * -> *) -> * -> * -> Constraintclass Settable f k v where
(|.) :: f k v -> (k, v) -> f k v
default (|.) :: Ixable k (f k) => f k v -> (k, v) -> f k vtype Modifiable :: (* -> * -> *) -> * -> * -> Constraintclass Modifiable f k v where
(|~) :: f k v -> (k, v -> v) -> f k v
default (|~) :: (Gettable f k v, Settable f k v) =>
f k v -> (k, v -> v) -> f k vtype Keysable :: * -> * -> Constraintclass Keysable f k where
keys :: f -> [k]type Valuesable :: forall {k}.
(k -> * -> *) -> k -> * -> Constraintclass Valuesable f k1 v where
values :: f k1 v -> [v]type Itemsable :: (* -> * -> *) -> * -> * -> Constraintclass Itemsable f k v where
items :: f k v -> [(k, v)]type Deletable :: * -> * -> Constraintclass Deletable m k where
delete :: k -> m -> m
default delete :: k -> m -> m
(|\) :: m -> k -> m
default (|\) :: m -> k -> m
(|\..) :: Foldable f => m -> f k -> m
default (|\..) :: Foldable f => m -> f k -> m
(∸) :: m -> k -> m(∅) :: Monoid a => aø :: Monoid a => atype ConvMonoidLeft :: forall {k}.
(k -> *) -> (k -> *) -> Constraintclass ConvMonoidLeft f g where
(<⊕) :: forall (a :: k). f a -> g a -> f atype ConvMonoidRight :: forall {k}.
(k -> *) -> (k -> *) -> Constraintclass ConvMonoidRight f g where
(⊕>) :: forall (a :: k). f a -> g a -> g atype ConvMonoid :: forall {k}.
(k -> *) -> (k -> *) -> (k -> *) -> Constraintclass ConvMonoid f g h where
(<⊕>) :: forall (a :: k). f a -> g a -> h a(⊆) :: Ord a => Set a -> Set a -> Bool(⊈) :: Ord a => Set a -> Set a -> Bool(⊂) :: Ord a => Set a -> Set a -> Bool(⊄) :: Ord a => Set a -> Set a -> Bool(⊇) :: Ord a => Set a -> Set a -> Bool(⊉) :: Ord a => Set a -> Set a -> Bool(⊃) :: Ord a => Set a -> Set a -> Bool(⊅) :: Ord a => Set a -> Set a -> Booltype SetMap :: (* -> *) -> Constraintclass SetMap f where
setMap :: Ord b => (a -> b) -> f a -> f bsetConcat :: Ord a => Set (Set a) -> Set asetConcatMap :: Ord b => (a -> Set b) -> Set a -> Set bsetFilter :: (a -> Bool) -> Set a -> Set amkHashMap :: Hashable k => [(k, v)] -> HashMap k vunHashMap :: HashMap k v -> [(k, v)]mkHashMapWith ::
Hashable k => (v -> v -> v) -> [(k, v)] -> HashMap k vmkMap :: Ord k => [(k, v)] -> Map k vunMap :: Map k v -> [(k, v)]mkMapWith :: Ord k => (v -> v -> v) -> [(k, v)] -> Map k vmapFilter :: (v -> Bool) -> Map k v -> Map k vmapSplit :: Ord k => k -> Map k v -> (Map k v, Map k v)(|/) :: Ord k => Map k v -> k -> Map k vmkBimap :: (Ord a, Ord b) => [(a, b)] -> Data.Bimap.Bimap a bunBimap :: Data.Bimap.Bimap a b -> [(a, b)]mkSeq :: [a] -> Seq aunSeq :: Seq a -> [a]emptySeq :: Seq a(<|) :: a -> Seq a -> Seq a(⊲) :: a -> Seq a -> Seq a(|>) :: Seq a -> a -> Seq a(⊳) :: Seq a -> a -> Seq a(><) :: Seq a -> Seq a -> Seq a(⋈) :: Seq a -> Seq a -> Seq a(>/<) :: Eq a => Seq a -> a -> Seq amkMinQ ::
Ord k =>
[(k, a)] -> pqueue-1.5.0.0:Data.PQueue.Prio.Internals.MinPQueue k amkQ ::
Ord k =>
[(k, a)] -> pqueue-1.5.0.0:Data.PQueue.Prio.Internals.MinPQueue k amkQ₁ ::
Ord k =>
(a -> k)
-> a -> pqueue-1.5.0.0:Data.PQueue.Prio.Internals.MinPQueue k amkK₁ ::
(MkableKey f, Ord k) =>
k -> a -> pqueue-1.5.0.0:Data.PQueue.Prio.Internals.MinPQueue k atype ZeroKey :: * -> Constraintclass ZeroKey k where
zeroKey :: kmkℤ₁ :: (Ord k, ZeroKey k, MkableKey f) => a -> f k aqInsert ::
Ord k =>
(a -> k)
-> a
-> pqueue-1.5.0.0:Data.PQueue.Prio.Internals.MinPQueue k a
-> pqueue-1.5.0.0:Data.PQueue.Prio.Internals.MinPQueue k a(<-||) ::
Ord k =>
pqueue-1.5.0.0:Data.PQueue.Prio.Internals.MinPQueue k a
-> (a -> k, [a])
-> pqueue-1.5.0.0:Data.PQueue.Prio.Internals.MinPQueue k a(||->) ::
Ord k =>
(a -> k, [a])
-> pqueue-1.5.0.0:Data.PQueue.Prio.Internals.MinPQueue k a
-> pqueue-1.5.0.0:Data.PQueue.Prio.Internals.MinPQueue k aqAppend ::
Ord k =>
(a -> k)
-> [a]
-> pqueue-1.5.0.0:Data.PQueue.Prio.Internals.MinPQueue k a
-> pqueue-1.5.0.0:Data.PQueue.Prio.Internals.MinPQueue k anullQ ::
pqueue-1.5.0.0:Data.PQueue.Prio.Internals.MinPQueue k a -> Booltype Emptyable :: * -> Constraintclass Emptyable fa where
(∅?) :: fa -> Boolpattern Φ
:: forall {k} (f :: k -> *) (a :: k). Emptyable (f a) => f atype MinQ :: * -> * -> *type MinQ =
pqueue-1.5.0.0:Data.PQueue.Prio.Internals.MinPQueue :: * -> * -> *pattern NullQ
:: pqueue-1.5.0.0:Data.PQueue.Prio.Internals.MinPQueue k apattern (:<!)
:: Ord k =>
(k, a)
-> pqueue-1.5.0.0:Data.PQueue.Prio.Internals.MinPQueue k a
-> pqueue-1.5.0.0:Data.PQueue.Prio.Internals.MinPQueue k apattern (:<!!)
:: Ord k =>
a
-> pqueue-1.5.0.0:Data.PQueue.Prio.Internals.MinPQueue k a
-> pqueue-1.5.0.0:Data.PQueue.Prio.Internals.MinPQueue k a(<!) ::
Ord k =>
pqueue-1.5.0.0:Data.PQueue.Prio.Internals.MinPQueue k a
-> ((k, a),
pqueue-1.5.0.0:Data.PQueue.Prio.Internals.MinPQueue k a)(<!!) ::
Ord k =>
pqueue-1.5.0.0:Data.PQueue.Prio.Internals.MinPQueue k a
-> (a, pqueue-1.5.0.0:Data.PQueue.Prio.Internals.MinPQueue k a)mkArray ::
ghc-internal-9.1003.0:GHC.Internal.Ix.Ix i =>
(i, i)
-> [(i, e)] -> ghc-internal-9.1003.0:GHC.Internal.Arr.Array i euhead :: [a] -> autail :: [a] -> [a]uinit :: [a] -> [a]ulast :: [a] -> auread :: Read a => String -> adigitToInt :: Char -> IntintToDigit :: Int -> Char(<%>) ::
(Functor g, Data.HList.HList.HMapOut f l e) =>
f -> g (HList l) -> g [e]hom ::
(Functor g, Data.HList.HList.HMapOut (a -> a) l e) =>
([e] -> b) -> g (HList l) -> g bhdup :: p -> HList [p, p]cartesian :: [a] -> [b] -> [(a, b)]type Swappable :: (* -> * -> *) -> * -> * -> Constraintclass Swappable f a b where
Quaalude.swap :: f a b -> f b a
default Quaalude.swap :: (Ord b, UnableKey f, MkableKey f) =>
f a b -> f b atype SwapWithable :: (* -> * -> *)
-> (* -> *) -> * -> * -> Constraintclass SwapWithable f m a b where
swapWith :: (m a -> m a -> m a) -> f a b -> f b (m a)
default swapWith :: (Applicative m, Ord b, UnableKey f,
MkWithable f) =>
(m a -> m a -> m a) -> f a b -> f b (m a)swapcat ::
(SwapWithable f m a b, Semigroup (m a)) => f a b -> f b (m a)type Filterable :: (* -> *) -> * -> Constraintclass Filterable f a where
Quaalude.filter :: (a -> Bool) -> f a -> f a
default Quaalude.filter :: (a -> Bool) -> f a -> f a
(|-?->) :: f a -> (a -> Bool) -> f a
default (|-?->) :: f a -> (a -> Bool) -> f a
(<-?-|) :: (a -> Bool) -> f a -> f a
default (<-?-|) :: (a -> Bool) -> f a -> f atype Takeable :: forall {k}. * -> (k -> *) -> k -> Constraintclass Takeable n f a where
Quaalude.take :: n -> f a -> f atype Droppable :: forall {k}. * -> (k -> *) -> k -> Constraintclass Droppable n f a where
Quaalude.drop :: n -> f a -> f atype Headable :: (* -> *) -> * -> Constraintclass Headable f a where
head' :: f a -> atype Tailable :: forall {k}. (k -> *) -> k -> Constraintclass Tailable f a where
tail' :: f a -> f atype role Ť representational nominaltype Ť :: forall {k}. (k -> *) -> k -> *data Ť f a = Ť !(f a)type role Ȟ representational nominaltype Ȟ :: forall {k}. (k -> *) -> k -> *data Ȟ f a = Ȟ !(f a)type Snocable :: (* -> *) -> * -> Constraintclass Snocable f a where
snoc' :: f a -> (a, f a)
default snoc' :: (Headable f a, Tailable f a) => f a -> (a, f a)type Consable :: (* -> *) -> * -> Constraintclass Consable f a where
cons' :: a -> f a -> f aQuaalude.splitAt ::
forall {k} n (f :: k -> *) (a :: k).
(Takeable n f a, Droppable n f a) =>
n -> f a -> (f a, f a)halve ::
forall {k} n (f :: k -> *) (a :: k).
(Sizable (f a), Integral n, Takeable n f a, Droppable n f a) =>
f a -> (f a, f a)type Arbitrary :: (* -> *) -> * -> Constraintclass Arbitrary f a where
arbitrary :: f a -> a
default arbitrary :: f a -> a
(⟒) :: f a -> a
arbitrarySnoc :: f a -> (a, f a)
default arbitrarySnoc :: (Unable f, Mkable f a) => f a -> (a, f a)
arb :: f a -> Maybe a
default arb :: Foldable f => f a -> Maybe atraceArb :: (Arbitrary f a, Show a) => f a -> f ainRange :: Ord a => (a, a) -> a -> Booltype RangeSize :: *data RangeSize = Incl | Exclrlen :: Num a => RangeSize -> (a, a) -> atype (|-|) :: forall {k}. * -> k -> *type (|-|) a b = RangeOf a(⊯) :: a -> a -> RangeOf2 a a(⊫) :: a -> a -> RangeOf2 a a(⥅) :: Num a => a -> a -> RangeOf2 a atype RangeOf2 :: * -> * -> *data RangeOf2 a b = RangeOf !RangeSize !(a, b)type RangeOf :: * -> *type RangeOf a = RangeOf2 a atype MagnitudeF :: * -> *type family MagnitudeF atype role MagnitudeOp phantom phantomtype MagnitudeOp :: forall {k} {k1}. k -> k1 -> *data MagnitudeOp a btype (|.|) :: forall {k}. * -> k -> *type family (|.|) a b where
forall k (_1 :: k) a. (|.|) a _1 = MagnitudeF atype Magnitude :: * -> Constraintclass Magnitude a where
(|.|) :: a -> MagnitudeF a
default (|.|) :: (Sizable a, Integral (MagnitudeF a)) =>
a -> MagnitudeF a
magnitude :: a -> MagnitudeF a
default magnitude :: a -> MagnitudeF a(|?|) ::
(Magnitude (m b), Alternative m, Monad m) =>
m b -> (b -> Bool) -> MagnitudeF (m b)(|≡|) ::
(MagnitudeF p1 ~ MagnitudeF p2, Eq (MagnitudeF p2), Magnitude p2,
Magnitude p1) =>
p2 -> p1 -> Bool(|≢|) ::
(MagnitudeF p1 ~ MagnitudeF p2, Eq (MagnitudeF p2), Magnitude p2,
Magnitude p1) =>
p2 -> p1 -> Bool(|≤|) ::
(MagnitudeF p1 ~ MagnitudeF p2, Ord (MagnitudeF p2), Magnitude p2,
Magnitude p1) =>
p2 -> p1 -> Bool(|≥|) ::
(MagnitudeF p1 ~ MagnitudeF p2, Ord (MagnitudeF p2), Magnitude p2,
Magnitude p1) =>
p2 -> p1 -> Bool(¦<¦) ::
(MagnitudeF p1 ~ MagnitudeF p2, Ord (MagnitudeF p2), Magnitude p2,
Magnitude p1) =>
p2 -> p1 -> Bool(¦>¦) ::
(MagnitudeF p1 ~ MagnitudeF p2, Ord (MagnitudeF p2), Magnitude p2,
Magnitude p1) =>
p2 -> p1 -> Booltype Transposable :: * -> Constraintclass Transposable a where
(⊤) :: a -> atype HMirrorable :: * -> Constraintclass HMirrorable a where
(◐) :: a -> atype VMirrorable :: * -> Constraintclass VMirrorable a where
(◓) :: a -> atype Rotatable :: * -> Constraintclass Rotatable a where
(↺) :: a -> a
(↻) :: a -> atype Bimaximum :: * -> Constraintclass Bimaximum a where
bimaximum :: Foldable f => f a -> a
default bimaximum :: (Bimaximum [a], Foldable f) => f a -> atype Biminimum :: * -> Constraintclass Biminimum a where
biminimum :: Foldable f => f a -> a
default biminimum :: (Biminimum [a], Foldable f) => f a -> atype Trifunctor :: (* -> * -> * -> *) -> Constraintclass Trifunctor f where
trimap :: (a -> a')
-> (b -> b') -> (c -> c') -> f a b c -> f a' b' c'
third :: (c -> c') -> f a b c -> f a b c'
default third :: (c -> c') -> f a b c -> f a b c'three :: Trifunctor f => (a -> b) -> f a a a -> f b b btype Thd :: (* -> * -> * -> *) -> Constraintclass Trifunctor f => Thd f where
thd :: f a b c -> ctype Middle :: (* -> *) -> Constraintclass Middle f where
middle :: f a -> asnoc :: [a] -> (a, [a])(⇑) :: [a] -> [b] -> [(a, b)]type ZipWithable :: (* -> *) -> Constraintclass ZipWithable f where
(⤊) :: ZipWithable f => (f a, f b) -> (a -> b -> c) -> f c
(⤊*) :: (Integral i, Mkable f a, Semigroup (f a), Foldable f,
Functor f) =>
f a -> f i -> f atype Uniqueable :: forall {k}. (k -> *) -> k -> Constraintclass Uniqueable f a where
uniq :: f a -> f aQuaalude.Compose4Composition of functions of any arity, through a type family.
type ComposeNF :: * -> * -> *type family ComposeNF g f where
forall (t1 :: ghc-prim-0.12.0:GHC.Types.RuntimeRep)
(t2 :: ghc-prim-0.12.0:GHC.Types.RuntimeRep)
(t3 :: ghc-prim-0.12.0:GHC.Types.RuntimeRep) (b :: TYPE t1)
(c :: TYPE t2) (a :: TYPE t3).
ComposeNF (b -> c) (a -> b) = a -> c
ComposeNF (b -> c) b = c
forall (t1 :: ghc-prim-0.12.0:GHC.Types.RuntimeRep)
(t2 :: ghc-prim-0.12.0:GHC.Types.RuntimeRep)
(t3 :: ghc-prim-0.12.0:GHC.Types.RuntimeRep)
(t4 :: ghc-prim-0.12.0:GHC.Types.RuntimeRep) (b :: TYPE t1)
(c :: TYPE t2) (x :: TYPE t3) (a :: TYPE t4).
ComposeNF (b -> c) (x -> a -> b) = x -> ComposeNF (b -> c) (a -> b)type ComposeN :: * -> * -> Constraintclass ComposeN g f where
composeN :: g -> f -> ComposeNF g fQuaalude.Coord54Directions in two and three dimensions, turning, coordinates, Manhattan and squared distances, neighbourhoods.
type Dir2 :: *data Dir2 = DirUp | DirDown | DirLeft | DirRighttype Dir² :: *type Dir² = Dir2type RelativeDir :: * -> * -> Constraintclass RelativeDir c d where
goingTo :: c -> c -> [d]
default goingTo :: Turnable d => c -> c -> [d]
comingFrom :: c -> c -> [d]
default comingFrom :: Turnable d => c -> c -> [d]type Turnable :: * -> Constraintclass Turnable d where
turnCW :: d -> d
turnDiff :: (Integral i, Ord i) => d -> d -> i
default turnDiff :: (Integral i, Ord i) => d -> d -> i
turnDiffCW :: (Integral i, Ord i) => d -> d -> i
default turnDiffCW :: (Integral i, Ord i, Eq d) => d -> d -> i
turnDiffCCW :: (Integral i, Ord i) => d -> d -> i
default turnDiffCCW :: (Integral i, Ord i, Eq d) => d -> d -> i
turnCCW :: d -> d
default turnCCW :: d -> d
turn180 :: d -> d
default turn180 :: d -> d
opposite :: d -> d
default opposite :: d -> dtype Dir3 :: *data Dir3 = D3xP | D3xN | D3yP | D3yN | D3zP | D3zNudlrToDir2 :: Char -> Dir2nsewToDir2 :: Char -> Dir2fromArrow² :: Char -> Dir2fromArrow2 :: Char -> Dir2toArrow² :: Dir2 -> ChartoArrow2 :: Dir2 -> Chartype Coord2' :: * -> *type Coord2' a = (a, a)type Coord2 :: *type Coord2 = Coord2' Inttype Coord3 :: *type Coord3 = (Int, Int, Int)type Coord4 :: *type Coord4 = (Int, Int, Int, Int)type Idem2 :: * -> *type family Idem2 a where
Idem2 (a, a) = (a, a)
Idem2 Integer = (Integer, Integer)
Idem2 Int = (Int, Int)
Idem2 Rational = (Rational, Rational)type Coord' :: * -> * -> * -> Constraintclass Coord' i a k where
fromXY :: (i, i) -> k
toXY :: k -> (i, i)
mapXY :: ((i, i) -> (i, i)) -> k -> k
default mapXY :: (k ~ (a, a)) => ((i, i) -> (i, i)) -> k -> ktype Coord :: * -> Constraintclass Coord' Int a a => Coord amanhattan0 :: Coord2 -> Intmanhattan :: (Coord (a, a), Num a) => (a, a) -> (a, a) -> amanhattan3 :: Coord3 -> Coord3 -> Intmanhattan4 :: Coord4 -> Coord4 -> Inttype SSDL :: Nat -> * -> * -> Constraintclass SSDL n a b where
ssdl :: a -> a -> btype SSD :: Nat -> * -> * -> Constraintclass SSD n t a where
ssd :: t -> t -> ads² :: Num a => (a, a) -> (a, a) -> assd² :: Num a => (a, a) -> (a, a) -> assd³ :: Num a => (a, a, a) -> (a, a, a) -> amove ::
(Num c, Num i, Coord' i c (c, c)) => Dir2 -> i -> (c, c) -> (c, c)move3 :: Dir3 -> Int -> Coord3 -> Coord3rlToTurn :: Char -> Dir2 -> Dir2type Neighbors :: Nat -> (* -> *) -> * -> * -> Constraintclass Neighbors n f a g where
neighs :: a -> g -> f atype Vicinity :: Nat -> (* -> *) -> * -> Constraintclass Vicinity n f a where
vicinity' :: Integral i => a -> i -> f a
vicinity :: a -> f a
default vicinity :: a -> f aneighbors :: Num a => (a, a) -> [(a, a)]neighborsNoDiags :: Num a => (a, a) -> [(a, a)]neighbors3 :: Coord3 -> [Coord3]partitionSpace :: Coord3 -> Coord3 -> [(Coord3, Coord3)]linePoints :: (Coord2, Coord2) -> [Coord2]wrap :: Int -> Int -> Coord2 -> Coord2Quaalude.Described44Functions and arguments tagged with type-level descriptions.
type role ArgDesc phantomtype ArgDesc :: Symbol -> *data ArgDesc desc = ArgDesctype role FnDesc phantomtype FnDesc :: Symbol -> *data FnDesc desc = FnDesctype role FnName phantomtype FnName :: Symbol -> *data FnName name = FnNametype (:@) :: * -> Symbol -> *type (:@) arg description =
Data.Tagged.Tagged (ArgDesc description) argtype (:#>) :: Symbol -> * -> *type (:#>) name fn = Data.Tagged.Tagged (FnName name) fntype (:@>) :: Symbol -> * -> *type (:@>) description fn =
Data.Tagged.Tagged (FnDesc description) fntype ArgName :: forall {k}. k -> Constraintclass ArgName a where
argName :: Texttype ArgType :: forall {k}. k -> Constraintclass ArgType a where
argType :: Texttype UnIdentity :: * -> *type family UnIdentity a where
UnIdentity (Identity x) = x
UnIdentity x = xtype ArgTypeIs :: forall {k} {k1}. k -> k1 -> Constraintclass ArgTypeIs a xtype ArgDescription :: forall {k}. k -> Constraintclass ArgDescription a where
argDescription :: Maybe Texttype IsFunction' :: * -> * -> Constraintclass IsFunction' t f where
getFunction :: t -> ftype IsFunction :: * -> Constraintclass IsFunction' f f => IsFunction ftype FName' :: * -> * -> Constraintclass IsFunction' t f => FName' t f where
fName :: Text
default fName :: FName f => Texttype FName :: * -> Constraintclass FName' f f => FName ftype FDescription' :: * -> * -> Constraintclass IsFunction' t f => FDescription' t f where
fDescription :: Maybe Text
default fDescription :: FDescription f => Maybe Texttype FDescription :: * -> Constraintclass FDescription' f f => FDescription ftype ShowArg :: forall {k}. k -> Constraintclass (ArgName a, ArgType a, ArgDescription a) => ShowArg a where
showArg :: Text
showArgT :: Text
default showArgT :: Text
showArgD :: Texttype ShowArgKW :: forall {k} {k1}.
k -> (k1 -> *) -> k1 -> Constraintclass (ShowArg a, ArgType a, ArgTypeIs a (g x)) =>
ShowArgKW a g x where
showArgKW :: g x -> TextparenArgs :: [Text] -> TextparenLinesArgs :: [Text] -> TextnameArgs :: FName' t f => Text -> TextQuaalude.Encoding.JSON26Aeson deriving helpers: prefix stripping, omitted Nothing fields.
type JSONPrefixed :: forall {k}. k -> Constraintclass KnownSymbol (RemovePrefix a) => JSONPrefixed a where
type RemovePrefix :: forall {k}. k -> Symbol
type family RemovePrefix atype role StripPrefixLowerFirst phantomtype StripPrefixLowerFirst :: forall {k}. k -> *data StripPrefixLowerFirst ttype OmitNothingUntagged :: Symbol -> * -> *type OmitNothingUntagged prefix =
Deriving.Aeson.CustomJSON
[Deriving.Aeson.OmitNothingFields, Deriving.Aeson.SumUntaggedValue]
:: * -> *type PrefixedCamel :: Symbol -> * -> *type PrefixedCamel prefix =
Deriving.Aeson.CustomJSON
'[Deriving.Aeson.FieldLabelModifier (StripPrefixLowerFirst prefix)]
:: * -> *type PrefixedCamelOmitNothing :: Symbol -> * -> *type PrefixedCamelOmitNothing prefix =
Deriving.Aeson.CustomJSON
[Deriving.Aeson.FieldLabelModifier (StripPrefixLowerFirst prefix),
Deriving.Aeson.OmitNothingFields]
:: * -> *type PrefixedCamelOmitNothingUntagged :: Symbol -> * -> *type PrefixedCamelOmitNothingUntagged prefix =
Deriving.Aeson.CustomJSON
[Deriving.Aeson.FieldLabelModifier (StripPrefixLowerFirst prefix),
Deriving.Aeson.OmitNothingFields, Deriving.Aeson.SumUntaggedValue]
:: * -> *type PrefixedCamelRejectUnknown :: Symbol -> * -> *type PrefixedCamelRejectUnknown prefix =
Deriving.Aeson.CustomJSON
[Deriving.Aeson.FieldLabelModifier (StripPrefixLowerFirst prefix),
Deriving.Aeson.RejectUnknownFields]
:: * -> *type PrefixedCamelRejectUnknownOmitNothing :: Symbol -> * -> *type PrefixedCamelRejectUnknownOmitNothing prefix =
Deriving.Aeson.CustomJSON
[Deriving.Aeson.FieldLabelModifier (StripPrefixLowerFirst prefix),
Deriving.Aeson.RejectUnknownFields]
:: * -> *type PrefixedSnakeOmitNothing :: Symbol -> * -> *type PrefixedSnakeOmitNothing prefix =
Deriving.Aeson.CustomJSON
[Deriving.Aeson.FieldLabelModifier
[StripPrefixLowerFirst prefix, Deriving.Aeson.CamelToSnake],
Deriving.Aeson.OmitNothingFields]
:: * -> *type PrefixedSnakeOmitNothingUntagged :: Symbol -> * -> *type PrefixedSnakeOmitNothingUntagged prefix =
Deriving.Aeson.CustomJSON
[Deriving.Aeson.FieldLabelModifier
[StripPrefixLowerFirst prefix, Deriving.Aeson.CamelToSnake],
Deriving.Aeson.OmitNothingFields, Deriving.Aeson.SumUntaggedValue]
:: * -> *type PrefixedSnakeRejectUnknown :: Symbol -> * -> *type PrefixedSnakeRejectUnknown prefix =
Deriving.Aeson.CustomJSON
[Deriving.Aeson.FieldLabelModifier
[StripPrefixLowerFirst prefix, Deriving.Aeson.CamelToSnake],
Deriving.Aeson.RejectUnknownFields]
:: * -> *type PrefixedSnakeRejectUnknownOmitNothing :: Symbol -> * -> *type PrefixedSnakeRejectUnknownOmitNothing prefix =
Deriving.Aeson.CustomJSON
[Deriving.Aeson.FieldLabelModifier
[StripPrefixLowerFirst prefix, Deriving.Aeson.CamelToSnake],
Deriving.Aeson.RejectUnknownFields]
:: * -> *unsafeCoerceViaJSON ::
(aeson-2.2.4.1:Data.Aeson.Types.ToJSON.ToJSON a,
aeson-2.2.4.1:Data.Aeson.Types.FromJSON.FromJSON b) =>
a -> bQuaalude.Encoding.JSON.Instances5JSON instances for the library's types.
tupleToJSON ::
(aeson-2.2.4.1:Data.Aeson.Types.ToJSON.ToJSON a, TupSnoc u a t,
aeson-2.2.4.1:Data.Aeson.Types.ToJSON.ToJSON t) =>
u -> aeson-2.2.4.1:Data.Aeson.Types.Internal.ValuetupleFromJSON ::
(aeson-2.2.4.1:Data.Aeson.Types.FromJSON.FromJSON a,
aeson-2.2.4.1:Data.Aeson.Types.FromJSON.FromJSON t,
TupCons a t u) =>
aeson-2.2.4.1:Data.Aeson.Types.Internal.Value
-> aeson-2.2.4.1:Data.Aeson.Types.Internal.Parser utype role TaggedKV phantom representationaltype TaggedKV :: forall {k}. k -> * -> *newtype TaggedKV k1 v
= TaggedKV {unTaggedKV :: Data.Tagged.Tagged k1 v}Quaalude.Encoding.JSON.TH6Template Haskell for JSON instances.
deriveJSONPrefixed ::
[Language.Haskell.TH.Syntax.Name]
-> Language.Haskell.TH.Syntax.Q [Language.Haskell.TH.Syntax.Dec]deriveJSONPrefixed' ::
String
-> [Language.Haskell.TH.Syntax.Name]
-> Language.Haskell.TH.Syntax.Q [Language.Haskell.TH.Syntax.Dec]deriveJSONVia ::
([Language.Haskell.TH.Syntax.Name]
-> Language.Haskell.TH.Syntax.Q Language.Haskell.TH.Syntax.Type)
-> [Language.Haskell.TH.Syntax.Name]
-> Language.Haskell.TH.Syntax.Q [Language.Haskell.TH.Syntax.Dec]deriveJSONRemovingPrefix' ::
Language.Haskell.TH.Syntax.Name
-> ([Language.Haskell.TH.Syntax.Name]
-> Language.Haskell.TH.Syntax.Q [Language.Haskell.TH.Syntax.Dec])
-> [Language.Haskell.TH.Syntax.Name]
-> Language.Haskell.TH.Syntax.Q [Language.Haskell.TH.Syntax.Dec]deriveJSONSnakeRemovingPrefix ::
Language.Haskell.TH.Syntax.Name
-> Language.Haskell.TH.Syntax.Q [Language.Haskell.TH.Syntax.Dec]deriveJSONCamelRemovingPrefix ::
Language.Haskell.TH.Syntax.Name
-> Language.Haskell.TH.Syntax.Q [Language.Haskell.TH.Syntax.Dec]Quaalude.Geometry9Rectangles and line segments: intersection, subtraction, outlines.
type Box :: (* -> *) -> * -> Constraintclass Box f a where
box :: (a, a) -> (a, a) -> f (a, a)
box₀ :: (a, a) -> f (a, a)
default box₀ :: Num a => (a, a) -> f (a, a)linesSubtractLines :: [ℤ² × ℤ²] -> [ℤ² × ℤ²] -> [ℤ² × ℤ²]lineSubtractLines :: [ℤ² × ℤ²] -> (ℤ² × ℤ²) -> [ℤ² × ℤ²]lineSubtractLine :: (ℤ² × ℤ²) -> (ℤ² × ℤ²) -> [ℤ² × ℤ²]intersectRectangles :: (ℤ² × ℤ²) -> (ℤ² × ℤ²) -> 𝔹(□?□) :: (ℤ² × ℤ²) -> (ℤ² × ℤ²) -> 𝔹turnOutside :: [ℤ² × ℤ²] -> Dir² -> Dir²outside :: [ℤ² × ℤ²] -> [ℤ² × ℤ²]Quaalude.Grid165The Griddable class over ten storage backends, pure and mutable; typed cells; reading, iterating, cropping and rotating grids.
emptyGrid :: Griddable Identity g k a => g k adefGrid :: (Default a, Griddable Identity g k a) => [k] -> g k amkGrid :: Griddable Identity g k a => [(k, a)] -> g k aunGrid :: Griddable Identity g k a => g k a -> [(k, a)]coords :: Griddable Identity g k a => g k a -> [k]cells :: Griddable Identity g k a => g k a -> [a]gridGetMaybe :: Griddable Identity g k a => k -> g k a -> Maybe a(||?) :: Griddable Identity g k a => g k a -> k -> Maybe agridGet :: Griddable Identity g k a => k -> g k a -> a(||!) :: Griddable Identity g k a => g k a -> k -> agridSet :: Griddable Identity g k a => a -> k -> g k a -> g k a(||.) :: Griddable Identity g k a => g k a -> (k, a) -> g k agridModify ::
Griddable Identity g k a => (a -> a) -> k -> g k a -> g k a(||~) :: Griddable Identity g k a => g k a -> (k, a -> a) -> g k amaxXY :: Griddable Identity g k a => g k a -> kminXY :: Griddable Identity g k a => g k a -> kgridDims :: Griddable Identity g k a => g k a -> kgridFind :: Griddable Identity g k a => a -> g k a -> [k]gridFindOne :: Griddable Identity g k a => a -> g k a -> Maybe kfromCoords ::
(Foldable f, Bounded a, Griddable Identity g k a) =>
a -> f k -> g k afillDef :: Griddable Identity g k a => a -> g k a -> g k afillEmpty ::
(Bounded a, Griddable Identity g k a) => g k a -> g k amapCoords :: Griddable Identity g k a => (k -> k) -> g k a -> g k afilterCoords ::
Griddable Identity g k a => (k -> Bool) -> g k a -> g k apartitionCoords ::
Griddable Identity g k a => (k -> Bool) -> g k a -> (g k a, g k a)gridMember :: Griddable Identity g k a => k -> g k a -> Booltype Griddable :: (* -> *) -> (* -> * -> *) -> * -> * -> Constraintclass (Monad m, Coord k, GridCell a) => Griddable m g k a where
emptyGridM :: m (g k a)
mkGridM :: [(k, a)] -> m (g k a)
unGridM :: g k a -> m [(k, a)]
coordsM :: g k a -> m [k]
cellsM :: g k a -> m [a]
gridGetMaybeM :: k -> g k a -> m (Maybe a)
(<||?>) :: g k a -> k -> m (Maybe a)
gridGetM :: k -> g k a -> m a
(<||!>) :: g k a -> k -> m a
gridSetM :: a -> k -> g k a -> m (g k a)
(<||.>) :: g k a -> (k, a) -> m (g k a)
gridModifyM :: (a -> a) -> k -> g k a -> m (g k a)
(<||~>) :: g k a -> (k, a -> a) -> m (g k a)
maxXYM :: g k a -> m k
minXYM :: g k a -> m k
gridDimsM :: g k a -> m k
gridFindM :: a -> g k a -> m [k]
gridFindOneM :: a -> g k a -> m (Maybe k)
fromCoordsM :: (Foldable f, Bounded a) => a -> f k -> m (g k a)
fillDefM :: a -> g k a -> m (g k a)
fillEmptyM :: Bounded a => g k a -> m (g k a)
mapCoordsM :: (k -> k) -> g k a -> m (g k a)
filterCoordsM :: (k -> Bool) -> g k a -> m (g k a)
partitionCoordsM :: (k -> Bool) -> g k a -> m (g k a, g k a)
gridMemberM :: k -> g k a -> m Bool
(<||∈>) :: k -> g k a -> m Bool
(<||∉>) :: k -> g k a -> m Bool
gridModifyM, maxXYM, minXYM #-}type role ListGrid' phantom representationaltype ListGrid' :: forall {k}. k -> * -> *newtype ListGrid' k1 a = ListGrid {unListGrid :: [[a]]}type ListGrid :: * -> *type ListGrid a = ListGrid' Coord2 atype role Grid' nominal representationaltype Grid' :: * -> * -> *newtype Grid' k a = Grid (Map k a)type Grid :: * -> *type Grid = Grid' Coord2 :: * -> *type G :: * -> * -> *type G = Grid' :: * -> * -> *type PrettyGrid :: * -> *newtype PrettyGrid g = PrettyGrid gtype role IntMapGrid' phantom representationaltype IntMapGrid' :: forall {k}. k -> * -> *newtype IntMapGrid' k1 a = IntMapGrid (IntMap (IntMap a))type IntMapGrid :: * -> *type IntMapGrid = IntMapGrid' Coord2 :: * -> *type role HashGrid' nominal representationaltype HashGrid' :: * -> * -> *newtype HashGrid' k a = HashGrid (HashMap k a)type HashGrid :: * -> *type HashGrid = HashGrid' Coord2 :: * -> *type role VectorGrid' phantom representationaltype VectorGrid' :: forall {k}. k -> * -> *newtype VectorGrid' k1 a = VectorGrid (Vector (Vector a))type VectorGrid :: * -> *type VectorGrid = VectorGrid' Coord2 :: * -> *type role AGrid' nominal representationaltype AGrid' :: * -> * -> *newtype AGrid' k a
= AGrid (ghc-internal-9.1003.0:GHC.Internal.Arr.Array k a)type AGrid :: * -> *type AGrid a = AGrid' Coord2 atype role ArrayGrid' nominal representationaltype ArrayGrid' :: * -> * -> *newtype ArrayGrid' k a
= ArrayGrid (ghc-internal-9.1003.0:GHC.Internal.IOArray.IOArray
k a)type ArrayGrid :: * -> *type ArrayGrid a = ArrayGrid' Coord2 atype role STUArrayGrid' nominal nominal nominaltype STUArrayGrid' :: * -> * -> * -> *newtype STUArrayGrid' s k a
= STUArrayGrid (Data.Array.Base.STUArray s k a)type STUArrayGrid :: * -> * -> *type STUArrayGrid s a = STUArrayGrid' s Coord2 atype role STArrayGrid' nominal nominal representationaltype STArrayGrid' :: * -> * -> * -> *newtype STArrayGrid' s k a
= STArrayGrid (ghc-internal-9.1003.0:GHC.Internal.Arr.STArray
s k a)type STArrayGrid :: * -> * -> *type STArrayGrid s a = STArrayGrid' s Coord2 atype role STVectorGrid' nominal phantom representationaltype STVectorGrid' :: forall {k}. * -> k -> * -> *newtype STVectorGrid' s k1 a
= STVectorGrid (Data.Vector.Mutable.STVector
s (Data.Vector.Mutable.STVector s a))type STVectorGrid :: * -> * -> *type STVectorGrid s a = STVectorGrid' s Coord2 atype role IOVectorGrid' phantom representationaltype IOVectorGrid' :: forall {k}. k -> * -> *newtype IOVectorGrid' k1 a
= IOVectorGrid (Data.Vector.Mutable.IOVector
(Data.Vector.Mutable.IOVector a))type IOVectorGrid :: * -> *type IOVectorGrid a = IOVectorGrid' Coord2 atype GridCell :: * -> Constraintclass Eq a => GridCell a where
charMap :: Data.Bimap.Bimap a Char
default charMap :: Ord a => Data.Bimap.Bimap a Char
cs :: [(a, Char)]
default cs :: [(a, Char)]
fromChar :: Char -> a
default fromChar :: Ord a => Char -> a
toChar :: a -> Char
default toChar :: Ord a => a -> Chartype EmptyCell :: * -> Constraintclass GridCell a => EmptyCell a where
emptyCell :: a -> BoolcellEmptyM ::
(Griddable m g k a, EmptyCell a) => k -> g k a -> m BoolcellEmpty ::
(Griddable Identity g k a, EmptyCell a) => k -> g k a -> Booltype DotHash :: *data DotHash = Dot | Hashtype role Cell nominaltype Cell :: Symbol -> *newtype Cell cs = Cell {unCell :: CharV cs}mkC :: (SChar c :< SymSChars cs, KnownChar c) => Cell cs(□) :: (SChar c :< SymSChars cs, KnownChar c) => SChar c -> Cell cstype DigitCell :: *newtype DigitCell = DigitCell (Data.Fin.Fin Nat10)cellToInt :: DigitCell -> IntegerintToCell :: Int -> DigitCelltype IntCell :: *newtype IntCell = IntCell IntreadGridM :: Griddable m g k a => Text -> m (g k a)readGrid :: Griddable Identity g k a => Text -> g k atoGridM :: Griddable m g k a => [Text] -> m (g k a)toGrid :: Griddable Identity g k a => [Text] -> g k apointsM :: Griddable m g k a => [k] -> g k a -> m [a]points :: Griddable Identity g k a => [k] -> g k a -> [a]type IterGrid :: (* -> *)
-> (* -> * -> *) -> * -> * -> * -> Constraintclass Griddable m g k a => IterGrid m g k d a where
iterGridM' :: d -> g k a -> m [(k, a)]
iterCoordsM' :: d -> g k a -> m [k]
default iterCoordsM' :: d -> g k a -> m [k]
iterCellsM' :: d -> g k a -> m [a]
default iterCellsM' :: d -> g k a -> m [a]iterGridM :: (IterGrid m g k d a, Default d) => g k a -> m [(k, a)]iterCoordsM :: (IterGrid m g k d a, Default d) => g k a -> m [k]iterCellsM :: (IterGrid m g k d a, Default d) => g k a -> m [a]iterGrid' :: IterGrid Identity g k d a => d -> g k a -> [(k, a)]iterGrid ::
(IterGrid Identity g k d a, Default d) => g k a -> [(k, a)]iterCoords' :: IterGrid Identity g k d a => d -> g k a -> [k]iterCoords ::
(IterGrid Identity g k d a, Default d) => g k a -> [k]foldGridM' ::
IterGrid m g k d a =>
d -> (acc -> (k, a) -> m acc) -> acc -> g k a -> m accfoldGridM ::
(IterGrid m g k d a, Default d) =>
(acc -> (k, a) -> m acc) -> acc -> g k a -> m accfoldGrid ::
(IterGrid Identity g k d a, Default d) =>
(acc -> (k, a) -> acc) -> acc -> g k a -> accfoldCoordsM' ::
IterGrid m g k d a =>
d -> (acc -> k -> m acc) -> acc -> g k a -> m accfoldCoordsM ::
(IterGrid m g k d a, Default d) =>
(acc -> k -> m acc) -> acc -> g k a -> m accfoldCoords ::
(IterGrid Identity g k d a, Default d) =>
(acc -> k -> acc) -> acc -> g k a -> acccropXM :: Griddable m g k a => Int -> Int -> g k a -> m (g k a)cropX :: Griddable Identity g k a => Int -> Int -> g k a -> g k amodifyCoordsM ::
Griddable m g k a => (k -> k) -> g k a -> m (g k a)modifyCoords ::
Griddable Identity g k a => (k -> k) -> g k a -> g k avariantsNubM ::
(Griddable m g k a, Eq (g k a)) => g k a -> m [g k a]variantsNub ::
(Griddable Identity g k a, Eq (g k a)) => g k a -> [g k a]rotations :: Griddable Identity g k a => g k a -> [g k a]variantsM' :: Griddable m g k a => g k a -> m [g k a]variants' :: Griddable Identity g k a => g k a -> [g k a]type role Variants representational nominal nominaltype Variants :: forall {k} {k1}. (k -> k1 -> *) -> k -> k1 -> *data Variants g k2 a
= Variants {vId :: !(g k2 a),
r90 :: !(g k2 a),
r180 :: !(g k2 a),
r270 :: !(g k2 a),
h0 :: !(g k2 a),
h90 :: !(g k2 a),
h180 :: !(g k2 a),
h270 :: !(g k2 a),
v0 :: !(g k2 a),
v90 :: !(g k2 a),
v180 :: !(g k2 a),
v270 :: !(g k2 a)}variantsM :: Griddable m g k a => g k a -> m (Variants g k a)variants :: Griddable Identity g k a => g k a -> Variants g k agridLinesM :: Griddable m g k a => g k a -> m [[a]]gridLines :: Griddable Identity g k a => g k a -> [[a]]prettyM :: Griddable m g k a => g k a -> m Textpretty :: Griddable Identity g k a => g k a -> Textconvolve ::
(Griddable Identity g Coord2 c, Griddable Identity g Coord2 d) =>
(Int, Int, Int, Int)
-> (g Coord2 c -> d) -> g Coord2 c -> g Coord2 dconvolveWith ::
(Griddable Identity g Coord2 c, Griddable Identity g Coord2 d) =>
(g Coord2 c -> g Coord2 c -> d)
-> g Coord2 c -> g Coord2 c -> g Coord2 dtype GridPerimeter :: * -> *data GridPerimeter k
= GridPerimeter {pTop :: ![k],
pRight :: ![k],
pBottom :: ![k],
pLeft :: ![k]}pFrom :: GridPerimeter Coord2 -> Dir2 -> [Coord2]gridPerimeterM ::
Griddable m g Coord2 a => g Coord2 a -> m (GridPerimeter Coord2)gridPerimeter ::
Griddable Identity g Coord2 a => g Coord2 a -> GridPerimeter Coord2type GridUnionable :: (* -> *) -> * -> Constraintclass GridUnionable g a where
gridUnionL :: g a -> g a -> g a
gridUnionR :: g a -> g a -> g a
gridUnionWith :: (a -> a -> a) -> g a -> g a -> g atype role MonoidalGrid representational nominal nominal nominaltype MonoidalGrid :: forall {k} {k1} {k2}.
(k -> *) -> (k1 -> k2 -> k) -> k1 -> k2 -> *newtype MonoidalGrid m g k3 a
= MonoidalGrid {unMonoidalGrid :: m (g k3 a)}idMonoidalGridSconcat ::
forall {k1} {k2} (g :: k1 -> k2 -> *) (k3 :: k1) (a :: k2).
Semigroup (MonoidalGrid Identity g k3 a) =>
g k3 a -> g k3 a -> g k3 aidMonoidalGridMempty ::
forall {k1} {k2} (g :: k1 -> k2 -> *) (k3 :: k1) (a :: k2).
Monoid (MonoidalGrid Identity g k3 a) =>
g k3 awildEq ::
(Eq k, Griddable Identity g k a, GridUnionable (g k) a) =>
a -> g k a -> g k a -> Boolx_x ::
(Eq k, Griddable Identity g k Char, GridUnionable (g k) Char) =>
g k Char -> g k Char -> Booltype (▦) :: Symbol -> * -> *type (▦) cs k = G k (Cell cs)gridParseCanonical ::
Griddable Identity g (CanonicalParseF k) (CanonicalParseF a) =>
Parser (g (CanonicalParseF k) (CanonicalParseF a))traceGrid ::
(Unable (g k), Griddable Identity g k a) => g k a -> p -> pQuaalude.Lists42Heterogeneous lists and length-indexed homogeneous lists.
type Nothings :: [*] -> Constraintclass Nothings l where
nothings :: HList ltype role HomList nominal representationaltype HomList :: Nat -> * -> *data HomList n a where
HomNil :: HomList 0 a
HomCons :: !a -> !(HomList (n - 1) a) -> HomList n atype HomConsF :: * -> * -> *type family HomConsF a b where
HomConsF a a = HomList 2 a
HomConsF a (HomList n a) = HomList (n + 1) atype HomConsEvidenceF :: Natural -> * -> Constrainttype family HomConsEvidenceF n a where
HomConsEvidenceF 2 a = HomConsF a a ~ HomList 2 a
HomConsEvidenceF n (HomList n a)
= (((n + 1) - 1) ~ n, HomConsF a (HomList n a) ~ HomList (n + 1) a)type HomConsEvidenceC :: * -> Constrainttype family HomConsEvidenceC na where
HomConsEvidenceC (SNat n, a) = HomConsEvidenceF n atype HomConsEvidenceT :: * -> *type family HomConsEvidenceT natype HomConsEvidence :: Nat -> * -> Constraintclass HomConsEvidenceC (HomConsEvidenceT (SNat n, a)) =>
HomConsEvidence n atype HomConsLHS :: * -> *type family HomConsLHS b where
HomConsLHS (HomList _1 a) = a
HomConsLHS a = atype NatSuccPred :: Natural -> Constraintclass (n ~ ((n + 1) - 1)) => NatSuccPred ntype HomConsC :: * -> Constraintclass HomConsC a where
(~:~) :: NatSuccPred n => a -> HomList n a -> HomList (n + 1) a
(~:|) :: a -> a -> HomList 2 atype role Question phantom representationaltype Question :: (* -> Constraint) -> * -> *data Question c a = Question !atype (:~:~) :: * -> * -> *type (:~:~) a b = HomConsF a btype ConstC :: forall k. (k -> Constraint) -> k -> Constraintclass ConstC cf atype AllEqF :: * -> * -> Constrainttype family AllEqF a where
AllEqF (HomList _1 _2) = ConstC AllEqtype (:≡) :: * -> * -> *type family (:≡) a b where
(:≡) a () = Question AllEq (HomList 1 a)
(:≡) a (Question c (HomList n a)) = Question c (HomList (n + 1) a)type AllEq :: * -> Constraintclass AllEq a where
allEq :: a -> Booltype QuestionResultF :: (* -> Constraint) -> *type family QuestionResultF c where
QuestionResultF AllEq = Booltype RunQuestionC :: * -> Constrainttype family RunQuestionC q where
RunQuestionC (Question c a) = c atype RunQuestionF :: * -> *type family RunQuestionF q where
RunQuestionF (Question c a) = a -> QuestionResultF ctype RunQuestion :: * -> Constraintclass RunQuestion q where
runQuestion :: RunQuestionC q => RunQuestionF qQuaalude.LossQ16Priority queues ordered by a loss function, for best-first search.
type LossF :: * -> *type family LossF atype role LossFn nominaltype LossFn :: * -> *data LossFn a = LossFn !(a -> LossF a)type role LossQ nominaltype LossQ :: * -> *data LossQ a where
LossQ :: Ord (LossF a) =>
!(LossFn a) -> !(MinQ (LossF a) a) -> LossQ atype role LossSet nominaltype LossSet :: * -> *data LossSet a = LossSet !(Set a) !(LossQ a)type IntLoss :: * -> Constraintclass IntLoss a where
loss :: a -> Integer
default loss :: Sizable a => a -> Integertype role IntLossSet nominaltype IntLossSet :: * -> *data IntLossSet a = IntLossSet !(Set a) !(MinQ Integer a)Quaalude.Math34Digits, differences, sign, triangular numbers, mean and median.
diff :: Num a => a -> a -> adiffs :: Num a => [a] -> [a]type DiffList :: * -> *data DiffList a = DiffList !(Seq a)type MkDiffList :: * -> Constraintclass MkDiffList a where
mkDiffList :: [a] -> DiffList adiffListConcatVia ::
MkDiffList a => DiffList a -> a -> a -> DiffList a -> DiffList asgn :: (Num a, Ord a) => a -> atriangular :: Integral a => a -> amedian :: Ord a => [a] -> amean :: Integral a => [a] -> atype ToDigit :: * -> * -> Constraintclass Integral n => ToDigit n a where
toDigit :: a -> ntype FromDigit :: * -> * -> Constraintclass FromDigit n a where
fromDigit :: n -> atype ToDigits :: * -> * -> Constraintclass Integral n => ToDigits n a where
toDigits :: a -> [n]type FromDigits :: * -> * -> Constraintclass Integral n => FromDigits n a where
fromDigits :: [n] -> atype OverDigits :: * -> * -> Constraintclass (ToDigits n a, FromDigits n a) => OverDigits n a where
overDigits :: ([n] -> [n]) -> a -> a
overDigits2 :: ([n] -> [n] -> [n]) -> a -> a -> atype ToDecimal :: * -> * -> Constraintclass ToDigits n a => ToDecimal n a where
toDecimal :: a -> ntype FromDecimal :: * -> * -> Constraintclass FromDigits n a => FromDecimal n a where
fromDecimal :: n -> atype OverDecimal :: * -> * -> Constraintclass (ToDecimal n a, FromDecimal n a) => OverDecimal n a where
overDecimal :: (n -> n) -> a -> a
overDecimal2 :: (n -> n -> n) -> a -> a -> atype role Dec phantom representationaltype Dec :: forall {k}. k -> * -> *newtype Dec n a = Dec {unDec :: a}type Dℤ :: * -> *type Dℤ = Dec ℤ :: * -> *decDigit :: Integral n => n -> n -> nshowDP ::
(Integral i, Floating n, RealFrac n, IsString s, Show n) =>
i -> n -> sQuaalude.MaxSet3A set that keeps track of its maximum.
type role MaxSet nominaltype MaxSet :: * -> *data MaxSet a = MaxSet !a !(Set a)Quaalude.Megaparsec4A Megaparsec parser type and helpers such as parseMatches.
type MParser :: * -> *type MParser a = Text.Megaparsec.Parsec Void String aparserM ::
(Text.Megaparsec.Stream.Stream s, Ord e) =>
Text.Megaparsec.Parsec e s a -> s -> aparseMatches :: MParser a -> String -> [a]Quaalude.QuasiSet3A wrapper that treats a container as a set.
type role QuasiSet representational nominaltype QuasiSet :: forall {k}. (k -> *) -> k -> *data QuasiSet f a = QuasiSet !(f a)Quaalude.Records8HList record helpers: prefix stripping and record conversion.
dropPrefix :: String -> String -> StringsnakeCaseNoPrefix :: String -> String -> Stringtype UnRecord :: * -> [*]type family UnRecord record where
UnRecord (Data.HList.Record.Record r) = r
UnRecord e = (TypeError ...)type NothingsR :: [*] -> Constraintclass NothingsR l where
nothingsR :: Data.HList.Record.Record ltype ConvertRecord :: [*] -> [*] -> Constraintclass NothingsR to => ConvertRecord from to where
convertRecord :: Data.HList.Record.Record from
-> Data.HList.Record.Record to
default convertRecord :: (from ~ to) =>
Data.HList.Record.Record from -> Data.HList.Record.Record toQuaalude.Reducible60Type-level machinery that reduces curried functions to a terminal value.
type Reduced :: * -> *data Reduced f where
Reduced :: !f -> Reduced ftype Terminal :: * -> *newtype Terminal b = Terminal {unTerminal :: b}type ReducedF :: * -> *type family ReducedF f where
ReducedF (f :@ d) = ReducedF f :@ d
ReducedF (Reduced f) = Reduced f
ReducedF (Terminal b) = Terminal b
forall (t :: ghc-prim-0.12.0:GHC.Types.RuntimeRep) (a :: TYPE t) b.
ReducedF (a -> b) = Reduced (a -> ReducedF b)
ReducedF b = Terminal btype Reducible :: * -> Constraintclass Reducible f where
reduce :: f -> ReducedF ftype StripDescriptionsF :: * -> *type family StripDescriptionsF f where
StripDescriptionsF (f :@ _1) = StripDescriptionsF f
StripDescriptionsF (Reduced f) = Reduced (StripDescriptionsF f)
StripDescriptionsF ((a :@ _1) -> b) = a -> StripDescriptionsF b
StripDescriptionsF b = btype StripDescriptions :: * -> Constraintclass StripDescriptions f where
stripDescriptions :: f -> StripDescriptionsF f
default stripDescriptions :: (f ~ StripDescriptionsF f) =>
f -> StripDescriptionsF ftype ArgL :: * -> [*]type family ArgL f where
ArgL (Reduced (a -> b)) = a : ArgL b
forall (t1 :: ghc-prim-0.12.0:GHC.Types.RuntimeRep)
(t2 :: ghc-prim-0.12.0:GHC.Types.RuntimeRep) (a :: TYPE t1)
(b :: TYPE t2).
ArgL (a -> b) = ArgL (ReducedF (a -> b))
ArgL _1 = '[]type CurryF :: * -> *type family CurryF f where
CurryF (HList '[] -> b) = b
forall (t :: ghc-prim-0.12.0:GHC.Types.RuntimeRep) a (b :: [*])
(c :: TYPE t).
CurryF (HList (a : b) -> c) = a -> CurryF (HList b -> c)type UncurryF :: * -> *type UncurryF f = HList (ArgL f) -> ReturnF ftype CurryHList :: * -> Constraintclass CurryHList f where
uncurryHList :: f -> UncurryF f
default uncurryHList :: (CurryHList (ReducedF f), Reducible f,
UncurryF f ~ UncurryF (ReducedF f)) =>
f -> UncurryF f
curryHList :: UncurryF f -> ftype ArgR :: * -> [*]type family ArgR f where
forall (t :: ghc-prim-0.12.0:GHC.Types.RuntimeRep) (_1 :: Symbol) a
(b :: TYPE t).
ArgR (Reduced ((a :@ _1) -> b)) = ArgR (Reduced (a -> b))
ArgR (Reduced (Named.Internal.NamedF g a name -> b))
= Data.Tagged.Tagged name (g a) : ArgR b
ArgR (Terminal _1) = '[]
ArgR (f :@ _1) = ArgR f
forall (t1 :: ghc-prim-0.12.0:GHC.Types.RuntimeRep)
(t2 :: ghc-prim-0.12.0:GHC.Types.RuntimeRep) (a :: TYPE t1)
(b :: TYPE t2).
ArgR (a -> b) = ArgR (ReducedF (a -> b))
ArgR _1 = '[]type HasArg :: forall {k}. * -> k -> * -> Constrainttype HasArg f name v =
Data.HList.Record.HasField
name (Data.HList.Record.Record (ArgR f)) v
:: Constrainttype RequiredArgs :: * -> Constraintclass Reducible f => RequiredArgs f where
requiredArgs :: [String]
default requiredArgs :: RequiredArgs (ReducedF f) => [String]
requiredArgs' :: f -> [String]type ReturnF :: * -> *type family ReturnF f where
forall (t :: ghc-prim-0.12.0:GHC.Types.RuntimeRep) (_1 :: TYPE t)
b.
ReturnF (Reduced (_1 -> b)) = ReturnF b
ReturnF (Terminal b) = b
ReturnF f = ReturnF (ReducedF f)type Return :: * -> * -> Constraintclass (ReturnF f ~ out) => Return f out where
returnF :: Proxy out
default returnF :: Return (ReducedF f) out => Proxy out
returnF' :: f -> Proxy outtype AppArgR :: * -> [*] -> * -> Constraintclass AppArgR f argR out where
appArgR :: f -> Data.HList.Record.Record argR -> outtype ShowArgR :: [*] -> Constraintclass ShowArgR a where
showArgR' :: [Text]
showArgR :: Text
showArgRT' :: [Text]
showArgRT :: Text
showArgRD' :: [Text]
showArgRD :: Texttype ShowArgRKW :: [*] -> Constraintclass ShowArgRKW a where
showArgRKW' :: Data.HList.Record.Record a -> [Text]
showArgRKW :: Data.HList.Record.Record a -> Texttype ShowArgs :: * -> Constraintclass ShowArgR (ArgR f) => ShowArgs f where
showArgs :: Text
showArgs' :: f -> Text
showArgsT :: Text
showArgsT' :: f -> Text
showArgsD :: Text
showArgsD' :: f -> Texttype ShowArgsKW :: * -> Constraintclass ShowArgRKW (ArgR f) => ShowArgsKW f where
showArgsKW :: Data.HList.Record.Record (ArgR f) -> Texttype ShowReturn :: * -> Constraintclass Typeable (ReturnF f) => ShowReturn f where
showReturn :: Text
showReturn' :: f -> TextnameArgsReturns :: (FName' t f, ShowReturn f) => Text -> TextnameArgsValue :: (FName' t f, Show x) => Text -> x -> Texttype ShowF' :: * -> * -> Constraintclass (IsFunction' t f, FName' t f, ShowArgs f, ShowReturn f) =>
ShowF' t f where
showF :: Text
showF' :: f -> Text
showFT :: Text
showFT' :: f -> Texttype ShowF :: * -> Constraintclass ShowF' f f => ShowF ftype ShowFD' :: * -> * -> Constraintclass (IsFunction' t f, FName' t f, FDescription' t f, ShowArgs f,
ShowReturn f) =>
ShowFD' t f where
showFD :: Text
showFD' :: f -> Texttype ShowFD :: * -> Constraintclass ShowFD' f f => ShowFD ftype ShowFKW' :: * -> * -> Constraintclass (IsFunction' t f, FName' t f, ShowArgsKW f) =>
ShowFKW' t f where
showFKW :: Data.HList.Record.Record (ArgR f) -> Text
showFKW' :: f -> Data.HList.Record.Record (ArgR f) -> Texttype ShowFKW :: * -> Constraintclass ShowFKW' f f => ShowFKW ftype ShowFKWR' :: * -> * -> Constraintclass (IsFunction' t f, FName' t f, ShowArgsKW f) =>
ShowFKWR' t f where
showFKWR :: Data.HList.Record.Record (ArgR f) -> Text -> Texttype ShowFKWR :: * -> Constraintclass ShowFKWR' f f => ShowFKWR fQuaalude.Shape18Shapes as sets of cells with their bounds, for falling-block and tiling puzzles.
type role Shape nominaltype Shape :: * -> *data Shape a where
EmptyShape :: Shape a
Invalid :: Shape a
Shape :: (Ord a, MkDiffList a) =>
!(Seq a) -> !(Set a) -> !(DiffList a) -> !(a, a) -> Shape atype ShapeLikeC :: (* -> *) -> * -> Constrainttype ShapeLikeC s i =
(Show i, Integral i, Coord' i i (i, i), Semigroup (s (i, i)),
Monoid (s (i, i)))
:: Constrainttype ShapeLike :: (* -> *) -> * -> Constraintclass ShapeLike s i where
mkShape :: (Foldable m, Unable m) => m (i, i) -> s (i, i)
validShape :: (i, i) -> s (i, i) -> 𝔹
boundedShape :: (i, i) -> s (i, i) -> 𝔹
shapeWH :: s (i, i) -> (i, i)
offsetShape :: (i, i) -> s (i, i) -> s (i, i)
(⇆⇅) :: s (i, i) -> (i, i) -> s (i, i)
(⇆) :: s (i, i) -> i -> s (i, i)
default (⇆) :: Num i => s (i, i) -> i -> s (i, i)
(⇅) :: s (i, i) -> i -> s (i, i)
default (⇅) :: Num i => s (i, i) -> i -> s (i, i)
area :: (a ~ (i, i)) => s (i, i) -> i
contiguous :: s (i, i) -> 𝔹
offsetShape, area, contiguous #-}toG ::
(Integral i, Eq (s (i, i)), Memberable (i, i) (s (i, i)),
Foldable s, Monoid (s (i, i)), Sizable (s (i, i)),
Coord' i i (i, i), ShapeLike s i) =>
s (i, i) -> ".#X" ▦ (i, i)showShape ::
(Integral i, Eq (s (i, i)), Memberable (i, i) (s (i, i)),
Foldable s, Monoid (s (i, i)), Sizable (s (i, i)),
Coord' i i (i, i), ShapeLike s i) =>
s (i, i) -> TextshowShapes ::
(Integral i, Eq (s (i, i)), Memberable (i, i) (s (i, i)),
Foldable s, Monoid (s (i, i)), Sizable (s (i, i)),
Coord' i i (i, i), ShapeLike s i) =>
[s (i, i)] -> TextshowShapess ::
(Integral i, Eq (s (i, i)), Memberable (i, i) (s (i, i)),
Foldable s, Monoid (s (i, i)), Sizable (s (i, i)),
Coord' i i (i, i), ShapeLike s i) =>
[[s (i, i)]] -> TexttraceShape ::
(Integral i, Eq (s (i, i)), Memberable (i, i) (s (i, i)),
Foldable s, Monoid (s (i, i)), Sizable (s (i, i)),
Coord' i i (i, i), ShapeLike s i) =>
s (i, i) -> b -> btraceShapeId ::
(Integral i, Eq (s (i, i)), Memberable (i, i) (s (i, i)),
Foldable s, Monoid (s (i, i)), Sizable (s (i, i)),
Coord' i i (i, i), ShapeLike s i) =>
s (i, i) -> s (i, i)traceShapeLabelled ::
(Integral i, Eq (s (i, i)), Memberable (i, i) (s (i, i)),
Foldable s, Monoid (s (i, i)), Sizable (s (i, i)),
Coord' i i (i, i), ShapeLike s i, Show t) =>
t -> s (i, i) -> a -> atraceShapeIdLabelled ::
(Integral i, Eq (s (i, i)), Memberable (i, i) (s (i, i)),
Foldable s, Monoid (s (i, i)), Sizable (s (i, i)),
Coord' i i (i, i), ShapeLike s i, Show t) =>
t -> s (i, i) -> s (i, i)type role LossShape nominaltype LossShape :: * -> *data LossShape a = LossShape {unLossShape :: !(Shape a)}Quaalude.Show0Show instances, such as arrows for directions.
Instances only.
Quaalude.Solve37Z3 from Haskell: solve and minimize, with results extracted by type.
z3 :: Z3 a -> az3IO :: MonadIO m => Z3 a -> m atype Z3SolverF :: * -> *type family Z3SolverF a where
Z3SolverF [a] = [Z3SolverF a]
Z3SolverF (Σ a) = [Z3SolverF a]
Z3SolverF a = atype Z3Solver :: * -> Constraintclass Z3Solver a where
eval1 :: Z3.Base.Model -> Z3.Base.AST -> Z3 (Maybe (Z3SolverF a))type SolveForF :: * -> *type family SolveForF a where
SolveForF [_1] = [Z3.Base.AST]
SolveForF (Σ _1) = [Z3.Base.AST]
SolveForF (a, b) = (SolveForF a, SolveForF b)
SolveForF _1 = Z3.Base.ASTtype Minimize :: * -> * -> Constraintclass (Integral i, SolveFor i, SolveFor a) => Minimize i a where
minimize :: String
-> Z3 (SolveForF i, SolveForF a) -> Z3 (Maybe (i, a))type SolveFor :: * -> Constraintclass SolveFor a where
solve :: SolveForF a -> Z3 (Maybe a)z3WithModel ::
(Applicative z3, Z3.Monad.MonadZ3 z3) =>
(Z3.Base.Model -> z3 a) -> z3 (Z3.Base.Result, Maybe a)traceModel :: Z3.Base.Model -> Z3 a -> Z3 aprintModel :: Z3.Base.Model -> Z3 ()printAST :: Z3.Base.AST -> Z3 ()fromZ3Maybe :: Maybe a -> az3Check :: Z3 Z3.Base.Resultz3EvalInt :: Z3.Monad.MonadZ3 z3 => Z3.Monad.EvalAst z3 Integerz3EvalReal :: Z3.Monad.MonadZ3 z3 => Z3.Monad.EvalAst z3 Rationalz3EvalBool :: Z3.Monad.MonadZ3 z3 => Z3.Monad.EvalAst z3 Boolz3Rational :: Z3.Monad.MonadZ3 z3 => Rational -> z3 Z3.Base.ASTz3Int :: Z3.Monad.MonadZ3 z3 => Integer -> z3 Z3.Base.ASTz3Bool :: Z3.Monad.MonadZ3 z3 => Bool -> z3 Z3.Base.ASTz3RealVar' ::
Z3.Monad.MonadZ3 z3 => Z3.Base.Symbol -> z3 Z3.Base.ASTz3IntVar' ::
Z3.Monad.MonadZ3 z3 => Z3.Base.Symbol -> z3 Z3.Base.ASTz3BoolVar' ::
Z3.Monad.MonadZ3 z3 => Z3.Base.Symbol -> z3 Z3.Base.ASTz3RealVar :: Z3.Monad.MonadZ3 z3 => String -> z3 Z3.Base.ASTz3IntVar :: Z3.Monad.MonadZ3 z3 => String -> z3 Z3.Base.ASTz3BoolVar :: Z3.Monad.MonadZ3 z3 => String -> z3 Z3.Base.ASTz3Add :: Z3.Monad.MonadZ3 z3 => [Z3.Base.AST] -> z3 Z3.Base.ASTz3Sub :: Z3.Monad.MonadZ3 z3 => [Z3.Base.AST] -> z3 Z3.Base.ASTz3Eq ::
Z3.Monad.MonadZ3 z3 => Z3.Base.AST -> Z3.Base.AST -> z3 Z3.Base.ASTz3Gt ::
Z3.Monad.MonadZ3 z3 => Z3.Base.AST -> Z3.Base.AST -> z3 Z3.Base.ASTz3Ge ::
Z3.Monad.MonadZ3 z3 => Z3.Base.AST -> Z3.Base.AST -> z3 Z3.Base.ASTz3And :: Z3.Monad.MonadZ3 z3 => [Z3.Base.AST] -> z3 Z3.Base.ASTz3Assert :: Z3.Monad.MonadZ3 z3 => Z3.Base.AST -> z3 ()Quaalude.TH22Compile-time embedding of puzzle input and examples (aoc, grid, …) and runners for every day.
runAllDays ::
Language.Haskell.TH.Syntax.Q Language.Haskell.TH.Syntax.ExprunAllDays' ::
Integral n =>
n -> Language.Haskell.TH.Syntax.Q Language.Haskell.TH.Syntax.Exptype EmbedInput :: * -> Constraintclass EmbedInput a where
input :: a
-> Language.Haskell.TH.Syntax.Q Language.Haskell.TH.Syntax.Expgrid ::
Int -> Language.Haskell.TH.Syntax.Q Language.Haskell.TH.Syntax.Expgridx ::
Int -> Language.Haskell.TH.Syntax.Q Language.Haskell.TH.Syntax.Expaoc ::
Int -> Language.Haskell.TH.Syntax.Q Language.Haskell.TH.Syntax.Expaocx ::
Int -> Language.Haskell.TH.Syntax.Q Language.Haskell.TH.Syntax.Expaocxn ::
Int
-> Int
-> Language.Haskell.TH.Syntax.Q Language.Haskell.TH.Syntax.Exptype Example :: *data Example = Example !Int | ExampleN !Int !IntinputS ::
EmbedInput a =>
a -> Language.Haskell.TH.Syntax.Q Language.Haskell.TH.Syntax.ExpgridsT ::
(Griddable Identity g k a, Packable t Text) => t -> [g k a]grids ::
(Int
-> Language.Haskell.TH.Syntax.Q Language.Haskell.TH.Syntax.Exp)
-> Int
-> Language.Haskell.TH.Syntax.Q Language.Haskell.TH.Syntax.ExpgridM ::
(Int
-> Language.Haskell.TH.Syntax.Q Language.Haskell.TH.Syntax.Exp)
-> Int
-> Language.Haskell.TH.Syntax.Q Language.Haskell.TH.Syntax.ExpgridsTM :: (Griddable m g k a, Packable t Text) => t -> m [g k a]gridsM ::
(Int
-> Language.Haskell.TH.Syntax.Q Language.Haskell.TH.Syntax.Exp)
-> Int
-> Language.Haskell.TH.Syntax.Q Language.Haskell.TH.Syntax.ExpfileLine ::
Language.Haskell.TH.Syntax.Q Language.Haskell.TH.Syntax.ExpgetJsonPrefix ::
[Language.Haskell.TH.Syntax.Name]
-> Language.Haskell.TH.Syntax.Q StringstringToSymbol ::
String
-> Language.Haskell.TH.Syntax.Q Language.Haskell.TH.Syntax.TypejoinNames ::
[Language.Haskell.TH.Syntax.Name]
-> Language.Haskell.TH.Syntax.Q Language.Haskell.TH.Syntax.TypenameSuffix ::
Language.Haskell.TH.Syntax.Name
-> String -> Language.Haskell.TH.Syntax.NameQuaalude.Tracers20Debug.Trace variants: conditional, prefixed, animated, and tracing inside parsers.
pauseId :: a -> atraceStrLn :: String -> a -> atraceStrLnId :: Show a => a -> atraceTextLn :: Text -> a -> atraceTextLnId :: Show a => a -> atraceWhen :: Bool -> (a -> a) -> a -> atraceShowIdWhen :: Show a => (a -> Bool) -> a -> atraceUnless :: Bool -> (a -> a) -> a -> atraceShowF :: Show b => (a -> b) -> a -> atraceTextF :: (a -> Text) -> a -> aptrace' :: Bool -> String -> Parser a -> Parser aptrace :: Parser a -> Parser atraceAnim :: Show a => Double -> a -> b -> btraceStack :: Text -> a -> atraceStackId :: a -> atraceIf :: Bool -> String -> a -> atracePrefixId :: (Show a, Show b) => a -> b -> btracePrefixIdM :: (Monad m, Show a, Show b) => a -> m b -> m btraceN :: Foldable t => (a -> p -> p) -> t a -> p -> ptraceNId :: Foldable t => (a -> t a -> t a) -> t a -> t aQuaalude.Tuple73Tuple construction, access and uncurried application for large arities ($@, dup, …).
type TupConsF :: * -> * -> *type family TupConsF a as where
TupConsF a () = Solo a
TupConsF a (Solo b) = (a, b)
TupConsF a (b, c) = (a, b, c)
TupConsF a (b, c, d) = (a, b, c, d)
TupConsF a (b, c, d, e) = (a, b, c, d, e)
TupConsF a (b, c, d, e, f) = (a, b, c, d, e, f)
TupConsF a (b, c, d, e, f, g) = (a, b, c, d, e, f, g)
TupConsF a (b, c, d, e, f, g, h) = (a, b, c, d, e, f, g, h)
TupConsF a (b, c, d, e, f, g, h, i) = (a, b, c, d, e, f, g, h, i)
TupConsF a (b, c, d, e, f, g, h, i, j)
= (a, b, c, d, e, f, g, h, i, j)
TupConsF a (b, c, d, e, f, g, h, i, j, k)
= (a, b, c, d, e, f, g, h, i, j, k)
TupConsF a (b, c, d, e, f, g, h, i, j, k, l)
= (a, b, c, d, e, f, g, h, i, j, k, l)
TupConsF a (b, c, d, e, f, g, h, i, j, k, l, m)
= (a, b, c, d, e, f, g, h, i, j, k, l, m)
TupConsF a (b, c, d, e, f, g, h, i, j, k, l, m, n)
= (a, b, c, d, e, f, g, h, i, j, k, l, m, n)
TupConsF a (b, c, d, e, f, g, h, i, j, k, l, m, n, o)
= (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)
TupConsF a (b, c, d, e, f, g, h, i, j, k, l, m, n, o, p)
= (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p)
TupConsF a (b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q)
= (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q)
TupConsF a (b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r)
= (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r)
TupConsF a (b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s)
= (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s)
TupConsF
a (b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t)
= (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t)
TupConsF
a (b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u)
= (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u)
TupConsF
a (b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v)
= (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u,
v)
TupConsF
a (b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v,
w)
= (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u,
v, w)
TupConsF
a (b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v,
w, x)
= (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u,
v, w, x)
TupConsF
a (b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v,
w, x, y)
= (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u,
v, w, x, y)
TupConsF
a (b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v,
w, x, y, z)
= (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u,
v, w, x, y, z)
TupConsF a b = (a, b)type (×) :: * -> * -> *type (×) a b = (a, b)type TupCons :: * -> * -> * -> Constraintclass TupCons a b c where
tupCons :: a -> b -> ctype TupSnocF :: * -> *type family TupSnocF a where
TupSnocF () = (TypeError ...)
TupSnocF (Solo a) = (a, ())
TupSnocF (a, b) = (a, Solo b)
TupSnocF (a, b, c) = (a, (b, c))
TupSnocF (a, b, c, d) = (a, (b, c, d))
TupSnocF (a, b, c, d, e) = (a, (b, c, d, e))
TupSnocF (a, b, c, d, e, f) = (a, (b, c, d, e, f))
TupSnocF (a, b, c, d, e, f, g) = (a, (b, c, d, e, f, g))
TupSnocF (a, b, c, d, e, f, g, h) = (a, (b, c, d, e, f, g, h))
TupSnocF (a, b, c, d, e, f, g, h, i)
= (a, (b, c, d, e, f, g, h, i))
TupSnocF (a, b, c, d, e, f, g, h, i, j)
= (a, (b, c, d, e, f, g, h, i, j))
TupSnocF (a, b, c, d, e, f, g, h, i, j, k)
= (a, (b, c, d, e, f, g, h, i, j, k))
TupSnocF (a, b, c, d, e, f, g, h, i, j, k, l)
= (a, (b, c, d, e, f, g, h, i, j, k, l))
TupSnocF (a, b, c, d, e, f, g, h, i, j, k, l, m)
= (a, (b, c, d, e, f, g, h, i, j, k, l, m))
TupSnocF (a, b, c, d, e, f, g, h, i, j, k, l, m, n)
= (a, (b, c, d, e, f, g, h, i, j, k, l, m, n))
TupSnocF (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)
= (a, (b, c, d, e, f, g, h, i, j, k, l, m, n, o))
TupSnocF (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p)
= (a, (b, c, d, e, f, g, h, i, j, k, l, m, n, o, p))
TupSnocF (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q)
= (a, (b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q))
TupSnocF (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r)
= (a, (b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r))
TupSnocF (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s)
= (a, (b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s))
TupSnocF
(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t)
= (a, (b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t))
TupSnocF
(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u)
= (a, (b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u))
TupSnocF
(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v)
= (a,
(b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v))
TupSnocF
(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v,
w)
= (a,
(b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w))
TupSnocF
(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v,
w, x)
= (a,
(b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w,
x))
TupSnocF
(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v,
w, x, y)
= (a,
(b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w,
x, y))
TupSnocF
(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v,
w, x, y, z)
= (a,
(b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w,
x, y, z))type TupSnoc :: * -> * -> * -> Constraintclass TupSnoc a head tail where
tupSnoc :: a -> (head, tail)type TupFstF :: * -> *type family TupFstF a where
TupFstF () = (TypeError ...)
TupFstF (Solo a) = a
TupFstF (a, b) = a
TupFstF (a, b, c) = a
TupFstF (a, b, c, d) = a
TupFstF (a, b, c, d, e) = a
TupFstF (a, b, c, d, e, f) = a
TupFstF (a, b, c, d, e, f, g) = a
TupFstF (a, b, c, d, e, f, g, h) = a
TupFstF (a, b, c, d, e, f, g, h, i) = a
TupFstF (a, b, c, d, e, f, g, h, i, j) = a
TupFstF (a, b, c, d, e, f, g, h, i, j, k) = a
TupFstF (a, b, c, d, e, f, g, h, i, j, k, l) = a
TupFstF (a, b, c, d, e, f, g, h, i, j, k, l, m) = a
TupFstF (a, b, c, d, e, f, g, h, i, j, k, l, m, n) = a
TupFstF (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) = a
TupFstF (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) = a
TupFstF (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) = a
TupFstF (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) = a
TupFstF (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s)
= a
TupFstF
(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t)
= a
TupFstF
(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u)
= a
TupFstF
(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v)
= a
TupFstF
(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v,
w)
= a
TupFstF
(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v,
w, x)
= a
TupFstF
(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v,
w, x, y)
= a
TupFstF
(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v,
w, x, y, z)
= atype TupFst :: * -> Constraintclass TupFst a where
tupFst :: a -> TupFstF atype TupNthF :: Natural -> * -> *type family TupNthF n a where
TupNthF 0 a = TupFstF a
TupNthF n a = TupNthF (n - 1) (TupTailF a)type TupNth :: Natural -> * -> Constraintclass TupNth n a where
tupNth :: a -> TupNthF n atype TupHeadF :: * -> *type family TupHeadF a where
TupHeadF () = (TypeError ...)
TupHeadF a = TupFstF atype TupHead :: * -> * -> Constraintclass TupHead a head where
tupHead :: a -> headtype TupSndF :: * -> *type family TupSndF a where
TupSndF (a, b) = btype TupTailF :: * -> *type family TupTailF a where
TupTailF () = (TypeError ...)
TupTailF a = TupSndF (TupSnocF a)type TupTail :: * -> * -> Constraintclass TupTail a tail where
tupTail :: a -> tailtype TupInitFL :: forall {a}. [a] -> [a]type family TupInitFL t where
TupInitFL '[] = '[]
forall a (t :: a). TupInitFL '[t] = '[]
forall a (t :: a) (ts :: [a]).
TupInitFL (t : ts) = t : TupInitFL tstype TupInitF :: * -> *type TupInitF t = List2TupF (TupInitFL (Tup2ListF t))type TupInit :: [*] -> Constraintclass TupInit t where
tupInit :: List2TupF t -> TupInitF (List2TupF t)type Tup2ListF :: * -> [*]type family Tup2ListF a where
Tup2ListF () = '[]
Tup2ListF (Solo a) = '[a]
Tup2ListF (a, b) = [a, b]
Tup2ListF (a, b, c) = [a, b, c]
Tup2ListF (a, b, c, d) = [a, b, c, d]
Tup2ListF (a, b, c, d, e) = [a, b, c, d, e]
Tup2ListF (a, b, c, d, e, f) = [a, b, c, d, e, f]
Tup2ListF (a, b, c, d, e, f, g) = [a, b, c, d, e, f, g]
Tup2ListF (a, b, c, d, e, f, g, h) = [a, b, c, d, e, f, g, h]
Tup2ListF (a, b, c, d, e, f, g, h, i) = [a, b, c, d, e, f, g, h, i]
Tup2ListF (a, b, c, d, e, f, g, h, i, j)
= [a, b, c, d, e, f, g, h, i, j]
Tup2ListF (a, b, c, d, e, f, g, h, i, j, k)
= [a, b, c, d, e, f, g, h, i, j, k]
Tup2ListF (a, b, c, d, e, f, g, h, i, j, k, l)
= [a, b, c, d, e, f, g, h, i, j, k, l]
Tup2ListF (a, b, c, d, e, f, g, h, i, j, k, l, m)
= [a, b, c, d, e, f, g, h, i, j, k, l, m]
Tup2ListF (a, b, c, d, e, f, g, h, i, j, k, l, m, n)
= [a, b, c, d, e, f, g, h, i, j, k, l, m, n]
Tup2ListF (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)
= [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o]
Tup2ListF (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p)
= [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p]
Tup2ListF (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q)
= [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q]
Tup2ListF (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r)
= [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r]
Tup2ListF (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s)
= [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s]
Tup2ListF
(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t)
= [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t]
Tup2ListF
(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u)
= [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u]
Tup2ListF
(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v)
= [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u,
v]
Tup2ListF
(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v,
w)
= [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u,
v, w]
Tup2ListF
(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v,
w, x)
= [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u,
v, w, x]
Tup2ListF
(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v,
w, x, y)
= [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u,
v, w, x, y]
Tup2ListF
(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v,
w, x, y, z)
= [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u,
v, w, x, y, z]type List2TupF :: [*] -> *type family List2TupF a where
List2TupF '[] = ()
List2TupF '[a] = Solo a
List2TupF [a, b] = (a, b)
List2TupF [a, b, c] = (a, b, c)
List2TupF [a, b, c, d] = (a, b, c, d)
List2TupF [a, b, c, d, e] = (a, b, c, d, e)
List2TupF [a, b, c, d, e, f] = (a, b, c, d, e, f)
List2TupF [a, b, c, d, e, f, g] = (a, b, c, d, e, f, g)
List2TupF [a, b, c, d, e, f, g, h] = (a, b, c, d, e, f, g, h)
List2TupF [a, b, c, d, e, f, g, h, i] = (a, b, c, d, e, f, g, h, i)
List2TupF [a, b, c, d, e, f, g, h, i, j]
= (a, b, c, d, e, f, g, h, i, j)
List2TupF [a, b, c, d, e, f, g, h, i, j, k]
= (a, b, c, d, e, f, g, h, i, j, k)
List2TupF [a, b, c, d, e, f, g, h, i, j, k, l]
= (a, b, c, d, e, f, g, h, i, j, k, l)
List2TupF [a, b, c, d, e, f, g, h, i, j, k, l, m]
= (a, b, c, d, e, f, g, h, i, j, k, l, m)
List2TupF [a, b, c, d, e, f, g, h, i, j, k, l, m, n]
= (a, b, c, d, e, f, g, h, i, j, k, l, m, n)
List2TupF [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o]
= (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)
List2TupF [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p]
= (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p)
List2TupF [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q]
= (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q)
List2TupF [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r]
= (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r)
List2TupF [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s]
= (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s)
List2TupF
[a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t]
= (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t)
List2TupF
[a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u]
= (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u)
List2TupF
[a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v]
= (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u,
v)
List2TupF
[a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v,
w]
= (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u,
v, w)
List2TupF
[a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v,
w, x]
= (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u,
v, w, x)
List2TupF
[a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v,
w, x, y]
= (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u,
v, w, x, y)
List2TupF
[a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v,
w, x, y, z]
= (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u,
v, w, x, y, z)type Tup2List :: * -> [*] -> Constraintclass Tup2List t h where
tup2List :: t -> HList htype List2Tup :: [*] -> Constraintclass List2Tup l where
list2Tup :: HList l -> List2TupF l(<$@>) :: Functor f => (a -> b -> c) -> f (a, b) -> f c(<$$@>) ::
(Functor f, Functor g) => (a -> b -> c) -> g (f (a, b)) -> g (f c)(=<<@) :: Monad m => (a -> b -> m c) -> m (a, b) -> m c($@) :: (a -> b -> c) -> (a, b) -> c($$@) :: (a -> a -> b) -> a -> b(&@) :: (a, b) -> (a -> b -> c) -> c(&&@) :: a -> (a -> a -> b) -> baps :: Applicative f => (a -> b -> c) -> f a -> b -> f c($<@>) :: Applicative f => (a -> b -> c) -> (f a, b) -> f c(&<@>) :: Applicative f => (f a, b) -> (a -> b -> c) -> f cdup :: a -> (a, a)type role HomTup phantom representationaltype HomTup :: Nat -> * -> *newtype HomTup l a = HomTup [a]type ToTupF :: * -> *type family ToTupF a where
ToTupF (HomTup 0 _1) = ()
ToTupF (HomTup 1 a) = Solo a
ToTupF (HomTup n a) = TupConsF a (ToTupF (HomTup (n - 1) a))
ToTupF [a] = [ToTupF a]
ToTupF a = Solo atype (:^) :: * -> Nat -> *type (:^) a n = ToTupF (HomTup n a)type ToTup :: Nat -> * -> * -> Constraintclass ToTup n a b where
toTup :: a -> btype ToTupsF :: * -> *type family ToTupsF a where
ToTupsF () = ()
ToTupsF (HList a) = List2TupF a
ToTupsF a = atype ToTups :: * -> * -> Constraintclass ToTups a b where
toTups :: a -> btype MkHomTup :: forall {k}. k -> * -> * -> Constraintclass MkHomTup n a b where
mkHomTup :: a -> btype HomTupCons :: * -> * -> * -> Constraintclass HomTupCons a b c where
homTupCons :: a -> b -> chomTup ::
(KnownNat n, Text.Parsec.Prim.Stream [String] m t,
MkHomTup n [a] (HomTup n a)) =>
Text.Parsec.Prim.ParsecT String u m a
-> Text.Parsec.Prim.ParsecT String u m (HomTup n a)tuple ::
(KnownNat n, Text.Parsec.Prim.Stream s m tok,
ToTup n (HomTup n a) t, t ~ ToTupF (HomTup n a)) =>
Text.Parsec.Prim.ParsecT s u m a
-> Text.Parsec.Prim.ParsecT s u m (ToTupF (HomTup n a))tuples ::
(ToTup n (HomTup n a) t, ToTups [a] [HomTup n a]) =>
Text.Parsec.Prim.ParsecT s u m [a]
-> Text.Parsec.Prim.ParsecT s u m [t]Quaalude.Type26Type-level experiments, work in progress. Not re-exported by Quaalude.
type Z :: *data Z = Ztype S :: * -> *data S n = S !ntype N :: Nat -> *type family N n where
N 0 = Z
N n = S (N (n - 1))type Plus1IsSucc :: Natural -> Constraintclass (N (n + 1)
~ S (N n)) =>
Plus1IsSucc ntype IsNat :: * -> Constraintclass IsNat n where
nat :: n
sing :: Nattype FromNat :: Nat -> Constraintclass FromNat n where
fromNat :: N ntype If :: forall {t}. Bool -> t -> ErrorMessage -> ttype family If cond a msg where
forall t (_1 :: ErrorMessage) (a :: t).
If True a _1 = a
forall t (a :: t) (msg :: ErrorMessage).
If False a msg = (TypeError ...)type Not :: Bool -> Booltype family Not a where
Not True = False
Not False = Truetype (:==:) :: forall {k}. k -> k -> Booltype family (:==:) a b where
forall k (a :: k). (:==:) a a = True
forall k (_1 :: k) (_2 :: k). (:==:) _1 _2 = Falsetype (:/=:) :: forall {k}. k -> k -> Booltype (:/=:) a b =
Not (a :==: b) :: Booltype Even :: Natural -> *type Even n =
If
(Mod n 2 :==: 0)
(N n)
('Text "Expected an even number")type Odd :: Natural -> *type Odd n =
If
(Mod n 2 :==: 1)
(N n)
('Text "Expected an even number")type Without :: forall {k}. k -> k -> ktype Without without n =
If
(Not (n :==: without))
n
('Text "Expected any except " :<>: ShowType without)
:: kQuaalude.Unary79Operators taking () for prefix forms, set union and intersection, and Ѓ, the Maybe alias.
type (?) :: forall {k} {k1}. k -> k1 -> Constraintclass (?) a btype Ѓ :: forall {k} {k1}. * -> (k -> k1 -> Constraint) -> *type family Ѓ a f where
Ѓ a (?) = Maybe atype UnMonoid :: * -> * -> Constraintclass Monoid m => UnMonoid m a where
unMonoid :: m -> a(|=<) ::
forall {k} (m :: k -> *) (a :: k) (f :: * -> *) b.
(Monoid (m a), Monad f, Foldable f) =>
(b -> f (m a)) -> f b -> m atype UnaryApply :: * -> * -> * -> Constraintclass UnaryApply a b c where
(˙) :: a -> b -> ctype Intersectable :: * -> Constraintclass Intersectable a where
(∩) :: a -> a -> a
(⋂) :: Foldable f => () -> f a -> atype UnaryIntersect :: *data UnaryIntersect = Ⴖtype Unionable :: * -> Constraintclass Unionable a where
(∪) :: a -> a -> a
(⋃) :: Foldable f => () -> f a -> atype UnaryUnion :: *data UnaryUnion = Սtype Σ :: * -> *newtype Σ a = Σ {getΣ :: a}type Π :: * -> *newtype Π a = Π {getΠ :: a}type ConsAlias :: * -> (* -> *) -> * -> Constraintclass ConsAlias u f a where
consAlias :: u -> f a -> atype UnaryNot :: *data UnaryNot = Ⴈⴈ :: Bool -> Booltype FoldLeft :: *data FoldLefttype FoldRight :: *data FoldRighttype InitAcc :: *data InitAcctype Init1 :: *data Init1type FoldAccF :: forall {k}. * -> k -> k -> ktype family FoldAccF init acc a where
forall k (_1 :: k) (acc :: k). FoldAccF InitAcc acc _1 = acc
forall k (_1 :: k) (a :: k). FoldAccF Init1 _1 a = atype FoldAccFnF :: * -> * -> * -> * -> *type family FoldAccFnF dir init acc a where
FoldAccFnF FoldLeft init acc a
= FoldAccF init acc a -> a -> FoldAccF init acc a
FoldAccFnF FoldRight init acc a
= a -> FoldAccF init acc a -> FoldAccF init acc atype GetFoldableF :: forall {k} {k1}. (k1 -> k) -> k1 -> ktype family GetFoldableF m a where
forall k1 k2 (m :: k1 -> k2) (a :: k1). GetFoldableF m a = m atype FoldFnF :: * -> * -> (* -> *) -> * -> * -> *type family FoldFnF dir init m acc a where
FoldFnF dir init m acc a
= FoldAccFnF dir init acc a
-> FoldAccF init acc a -> GetFoldableF m a -> FoldAccF init acc atype role UnaryFold nominal nominal nominal nominal nominaltype UnaryFold :: * -> * -> (* -> *) -> * -> * -> *data UnaryFold dir init m acc a
= UnaryFold !(FoldAccFnF dir init acc a)
!(FoldAccF init acc a)
!(GetFoldableF m a)type Fold :: * -> * -> (* -> *) -> * -> * -> *data family Fold dir init m acc adata instance Fold FoldLeft InitAcc m acc a
= Ł !(FoldAccFnF FoldLeft InitAcc acc a)
!(FoldAccF InitAcc acc a)
!(GetFoldableF m a)data instance Fold FoldRight InitAcc m acc a
= Ɍ !(FoldAccFnF FoldRight InitAcc acc a)
!(FoldAccF InitAcc acc a)
!(GetFoldableF m a)data instance Fold FoldLeft Init1 m acc a
= Ŀ !(FoldAccFnF FoldLeft Init1 acc a) !(GetFoldableF m a)data instance Fold FoldRight Init1 m acc a
= Ṛ !(FoldAccFnF FoldRight Init1 acc a) !(GetFoldableF m a)type FoldAccDF :: * -> *type family FoldAccDF f where
FoldAccDF (Fold dir init m acc a) = FoldAccF init acc atype FoldAccFnDF :: * -> *type family FoldAccFnDF f where
FoldAccFnDF (Fold dir init m acc a) = FoldAccFnF dir init acc atype GetFoldableDF :: * -> *type family GetFoldableDF f where
GetFoldableDF (Fold dir init m acc a) = GetFoldableF m atype FoldFnDF :: * -> *type family FoldFnDF f where
FoldFnDF (Fold dir init m acc a) = FoldFnF dir init m acc atype FoldAccFn :: * -> Constraintclass FoldAccFn f where
foldAccFn :: f -> FoldAccFnDF ftype FoldAcc :: * -> Constraintclass FoldAcc f where
foldAcc :: f -> FoldAccDF ftype GetFoldable :: * -> Constraintclass GetFoldable f where
getFoldable :: f -> GetFoldableDF ftype FoldFn :: * -> Constraintclass FoldFn f where
foldFn :: f -> FoldFnDF ftype ApplyUF :: * -> *type family ApplyUF ftype ApplyU :: * -> * -> Constraintclass (o ~ ApplyUF f) => ApplyU f o where
(!>) :: f -> otype UnaryForce :: *data UnaryForce = Λȣ :: ()ɾ :: a -> () -> atype IsUnary :: * -> * -> Constraintclass IsUnary u a where
unary :: u -> a
(⁻) :: u -> a
λ :: u -> aⵉ :: (Foldable f, Num a) => f a -> aꛛ :: (Foldable f, Num a) => f a -> aQuaalude.Util302Parsing helpers (|-, number, numbers), conversion with as, memoisation, iteration and more.
inputPath :: Int -> FilePathexampleInputPath :: Int -> FilePathexampleInputNPath :: Int -> Int -> FilePathreadAsIO :: Data.Text.Read.Reader a -> FilePath -> IO [a](!<<) :: IO a -> aflines :: Text -> [Text]readAs :: Data.Text.Read.Reader a -> Text -> [a]readOne :: Data.Text.Read.Reader a -> Text -> aparseWithIO :: Parser a -> FilePath -> IO aparseWith :: Parser a -> String -> aparseEitherWith :: Parser a -> String -> Either ParseError aparseLinesWith :: Parser a -> String -> [a]parseLinesWith' :: Parser a -> String -> [a]parseLinesEitherWith :: Parser a -> String -> [Either ParseError a](|-?) :: String -> Parser a -> Either ParseError a(|-..?) :: String -> Parser a -> [Either ParseError a](|-..?!) :: String -> Parser a -> [a](|-<..?!>) :: Monoid a => String -> Parser a -> a(-|) :: Parser a -> String -> a(|-) :: String -> Parser a -> a(|-..) :: String -> Parser a -> [a](|-.) :: String -> Parser a -> a(|-<..>) :: (UnMonoid m a, m ~ m' a) => String -> Parser m -> a(|-<.>) :: UnMonoid m a => String -> Parser m -> a(|-<>) :: Monoid a => String -> Parser [a] -> a(|-..<>) :: Monoid a => String -> Parser a -> a(⊢) :: String -> Parser a -> atwoOf :: Parser a -> Parser (a, a)spaceTab :: Parser CharspaceTabs :: Parser Stringsurrounding :: Parser a -> Parser b -> Parser bwordOf :: Parser a -> Parser awordsOf :: Parser a -> Parser [a]nums :: (Read a, Num a) => Parser [a]numbers :: (Read a, Num a) => Parser [a]nondigit :: Parser Charnonnumber :: Parser StringoneInLineDiscarding :: Parser a -> Parser aoneDiscarding :: Parser a -> Parser amanyInLineDiscarding :: Parser a -> Parser [a]type role PairSep phantom representational representationaltype PairSep :: Symbol -> * -> * -> *data PairSep sep a b = PairSep !a !btype role TupSep phantom representationaltype TupSep :: Symbol -> * -> *data TupSep sep t = TupSep !ttype (⯻) :: * -> Symbol -> *type family (⯻) t sep where
(⯻) (a, b) sep = TupSep sep (a, b)
(⯻) (a, b, c) sep = TupSep sep (a, b, c)
(⯻) (a, b, c, d) sep = TupSep sep (a, b, c, d)
(⯻) (a, b, c, d, e) sep = TupSep sep (a, b, c, d, e)
(⯻) (a, b, c, d, e, f) sep = TupSep sep (a, b, c, d, e, f)
(⯻) [a] sep = SepByMany sep atype role LinesSep phantom representationaltype LinesSep :: Symbol -> * -> *data LinesSep sep a = LinesSep !atype role MapSep phantom representational representationaltype MapSep :: Symbol -> * -> * -> *data MapSep sep k v = MapSep !k !vtype role CSV nominal nominaltype CSV :: * -> Nat -> *data CSV a n = CSV !(a :^ n)type (⹉) :: * -> Nat -> *type (⹉) a n = CSV a ntype CSVAny :: * -> *data CSVAny a = CSVAny ![a]type role HListSep phantom nominaltype HListSep :: forall {k}. k -> [*] -> *data HListSep sep xs = HListSep !(HList xs)type role SepByMany phantom representationaltype SepByMany :: Symbol -> * -> *data SepByMany sep a = SepByMany !atype role Between phantom phantom representationaltype Between :: Symbol -> Symbol -> * -> *data Between l r a = Between !atype ℕw :: *data ℕw = ℕw !String !ℕunℕw :: ℕw -> Stringtype ℕc :: *data ℕc = ℕc !(Maybe Char)unℕc :: ℕc -> Maybe Chartype role Exactly phantomtype Exactly :: Symbol -> *data Exactly sym = Exactlytype role WithoutChars phantom representationaltype WithoutChars :: Symbol -> * -> *data WithoutChars sym t = Without !ttype (⊟) :: * -> Symbol -> *type (⊟) t sym = WithoutChars sym ttype AaZz :: Symboltype AaZz =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" :: Symboltype Whitespace :: Symboltype Whitespace = " \t\n\r" :: Symboltype EOLs :: Symboltype EOLs = "\n\r" :: Symboltype role OfChars phantom representationaltype OfChars :: Symbol -> * -> *data OfChars sym t = OfChars !ttype (⭀) :: * -> Symbol -> *type (⭀) t sym = OfChars sym ttype CanonicalParseListF :: [*] -> [*]type family CanonicalParseListF a where
CanonicalParseListF '[] = '[]
CanonicalParseListF (t : ts)
= CanonicalParseF t : CanonicalParseListF tstype CanonicalParseF :: * -> *type family CanonicalParseF a where
CanonicalParseF (SepByMany _1 a) = CanonicalParseF [a]
CanonicalParseF (Between _1 _2 a) = CanonicalParseF a
CanonicalParseF (Exactly _1) = String
CanonicalParseF (WithoutChars _1 a) = a
CanonicalParseF (OfChars _1 a) = a
CanonicalParseF (PairSep _1 a b) = CanonicalParseF (a, b)
CanonicalParseF (TupSep _1 t) = CanonicalParseF t
CanonicalParseF (LinesSep _1 a) = CanonicalParseF [a]
CanonicalParseF (MapSep _1 k v) = CanonicalParseF (Map k v)
CanonicalParseF (CSVAny a) = [CanonicalParseF a]
CanonicalParseF (CSV a n) = CanonicalParseF (a :^ n)
CanonicalParseF (RangeOf a) = RangeOf a
CanonicalParseF Char = Char
CanonicalParseF String = String
CanonicalParseF Text = Text
CanonicalParseF [a] = [CanonicalParseF a]
CanonicalParseF (Map k v)
= Map (CanonicalParseF k) (CanonicalParseF v)
CanonicalParseF (HList ts) = HList (CanonicalParseListF ts)
forall k (_1 :: k) (ts :: [*]).
CanonicalParseF (HListSep _1 ts) = CanonicalParseF (HList ts)
CanonicalParseF (Solo a) = Solo (CanonicalParseF a)
CanonicalParseF (a, b) = (CanonicalParseF a, CanonicalParseF b)
CanonicalParseF (a, b, c)
= (CanonicalParseF a, CanonicalParseF b, CanonicalParseF c)
CanonicalParseF (f a b) = f (CanonicalParseF a) (CanonicalParseF b)
CanonicalParseF (f a) = f (CanonicalParseF a)
CanonicalParseF a = atype CanonicalParse :: * -> Constraintclass CanonicalParse a where
parseCanonical :: Parser (CanonicalParseF a)type CanonicalParseSelf :: * -> Constraintclass (CanonicalParse a, a ~ CanonicalParseF a) =>
CanonicalParseSelf a where
parseCanonicalSelf :: Parser atype CanonicalParseTup :: * -> Constraintclass (CanonicalParseSelf (HList (CanonicalTupleL t)),
List2Tup (CanonicalTupleL t),
List2TupF (CanonicalTupleL t) ~ CanonicalParseF t) =>
CanonicalParseTup t where
parseCanonicalTuple :: Parser (CanonicalParseF t)type CanonicalTupleL :: * -> [*]type CanonicalTupleL t = Tup2ListF (MapCanonicalParseF t) :: [*]type CanonicalTupleHList :: * -> *type CanonicalTupleHList t = HList (CanonicalTupleL t)type MapCanonicalParseF :: * -> *type family MapCanonicalParseF t where
MapCanonicalParseF () = ()
MapCanonicalParseF (Solo a) = Solo (CanonicalParseF a)
MapCanonicalParseF (a, b) = (CanonicalParseF a, CanonicalParseF b)
MapCanonicalParseF (a, b, c)
= (CanonicalParseF a, CanonicalParseF b, CanonicalParseF c)(⋯) :: CanonicalParseSelf a => String -> atraceCanonical :: String -> Parser a -> Parser atype CanonicalParseVia :: * -> * -> Constraintclass CanonicalParse v => CanonicalParseVia v a where
parseVia :: Parser a
default parseVia :: (CanonicalParseF v ~ a) => Parser a
(⋮) :: (CanonicalParseF v ~ a, CanonicalParse v) => String -> a(⊏|⊐) ::
(CanonicalParse v, Convable (CanonicalParseF v) a) => String -> a(⋮⊏) ::
(CanonicalParseVia v (f x), CanonicalParseF v ~ f x, Unable f) =>
String -> [x](⋮×⋮) ::
CanonicalParseSelf (NonEmpty a, NonEmpty b) =>
Parser (NonEmpty a, NonEmpty b)(⋮↵⋮) ::
CanonicalParse (PairSep "\n" (NonEmpty a) (NonEmpty b)) =>
Parser (CanonicalParseF (PairSep "\n" (NonEmpty a) (NonEmpty b)))(⋮×⋯) ::
CanonicalParseSelf (NonEmpty a, [b]) => Parser (NonEmpty a, [b])(⋮↵⋯) ::
CanonicalParse (PairSep "\n" (NonEmpty a) [b]) =>
Parser (CanonicalParseF (PairSep "\n" (NonEmpty a) [b]))natRange :: Read a => RangeSize -> Parser (RangeOf a)naturals :: Read a => Parser [a]mathOpChars :: StringmathOp :: Integral a => Parser (a -> a -> a)nonMathOpChar :: Parser CharnonMathOp :: Parser Stringnats :: Read a => Parser [a]nonNatDigit :: Parser CharnonNatural :: Parser Stringnat₁₀ :: Parser ℕ₁₀anyWord :: Parser Stringsucceed :: a -> Parser atrying :: [Parser a] -> Parser aparend :: Parser a -> Parser aassocsSep ::
Parser kvSep
-> Parser itemSep -> Parser k -> Parser v -> Parser [(k, v)]mapSep ::
Ord k =>
Parser kvSep
-> Parser itemSep -> Parser k -> Parser v -> Parser (Map k v)mapSepWith ::
Ord k =>
(v -> v -> v)
-> Parser kvSep
-> Parser itemSep
-> Parser k
-> Parser v
-> Parser (Map k v)mapcat ::
Ord k => String -> Parser k -> Parser v -> Parser (Map k [v])abc :: Parser Stringabc123 :: Parser StringabcABC123 :: Parser Stringtype CParsersF :: [*] -> [*]type family CParsersF args where
CParsersF '[] = '[]
CParsersF (arg : args) = Parser arg : CParsersF argstype CFuncArgsF :: [*] -> [*]type family CFuncArgsF argParsers where
CFuncArgsF '[] = '[]
CFuncArgsF (Parser arg : argParsers) = arg : CFuncArgsF argParserstype CFuncArgs :: [*] -> Constraintclass CFuncArgs argParsers where
cfuncArgs :: HList argParsers
-> Parser (HList (CFuncArgsF argParsers))type CFnName :: *data CFnName = CFnName {unCFnName :: !String}cfunc ::
(CFuncArgsF (CParsersF args) ~ args, CFuncArgs (CParsersF args)) =>
CFnName -> HList (CParsersF args) -> Parser (String, HList args)cfunc_ :: CFnName -> Parser Stringcargs ::
(CFuncArgs (CParsersF args), CFuncArgsF (CParsersF args) ~ args) =>
CFnName -> HList (CParsersF args) -> Parser (HList args)type TShow :: * -> Constraintclass TShow a where
tshow :: Show a => a -> Text
tshowM :: Show a => Maybe a -> Text
ltshow :: Show a => a -> Text
utshow :: Show a => a -> Text(<$$>) :: (Functor f, Functor g) => (a -> b) -> f (g a) -> f (g b)(<$$$>) ::
(Functor f, Functor g, Functor h) =>
(a -> b) -> f (g (h a)) -> f (g (h b))(<&&>) :: (Functor f, Functor g) => f (g a) -> (a -> b) -> f (g b)both :: Bifunctor f => (a -> b) -> f a a -> f b b(<:>) :: Bifunctor f => (a -> b) -> f a a -> f b bbothM ::
(Bitraversable f, Monad m) => (a -> m b) -> f a a -> m (f b b)same :: Eq a => (a, a) -> Booltreverse ::
(Traversable t, Monad f) => (t a -> b) -> t (f a) -> f biterateFix :: Eq a => (a -> a) -> a -> astabilize :: Eq a => (a -> a) -> [a] -> acycleGet :: Ord a => Int -> [a] -> a(...) :: Ord a => [a] -> Int -> asplit ::
ghc-internal-9.1003.0:GHC.Internal.Control.Arrow.Arrow a =>
a b c -> a (b, b) (c, c)fanout ::
ghc-internal-9.1003.0:GHC.Internal.Control.Arrow.Arrow a =>
a b c -> a b (c, c)duping :: ((a, a) -> b) -> a -> bbicomp :: (b -> c, a -> b) -> a -> cbiap :: (a -> b, a) -> bfbiap :: Functor f => (a -> b, f a) -> f bfbibind :: Monad m => (a -> m b, m a) -> m b(&.&) :: (b1 -> b2 -> c) -> (b1 -> a -> b2) -> b1 -> a -> c(&$&) :: (a -> d -> b) -> (c -> d) -> (a, c) -> b(&<$>&) ::
Functor f => (a1 -> a2 -> b) -> (c -> f a2) -> (a1, c) -> f b(&<$>) :: Functor f => (a1 -> a2 -> b) -> (a1, f a2) -> f b(&=<<&) ::
Monad m => (a1 -> a2 -> m b) -> (c -> m a2) -> (a1, c) -> m b(⇄) :: b -> (a -> b -> c) -> a -> c(⥢) :: a -> ((a, a) -> b) -> bappWhen :: (a -> Bool) -> (a -> a) -> a -> a(<.>) :: Applicative f => f (b -> c) -> f (a -> b) -> f (a -> c)(<∘>) :: Applicative f => f (b -> c) -> f (a -> b) -> f (a -> c)(.<.) :: (c -> d) -> (a -> b -> c) -> a -> b -> d(∘<∘) :: (c -> d) -> (a -> b -> c) -> a -> b -> d(.>.) :: (a -> b -> c) -> (c -> d) -> a -> b -> d(∘>∘) :: (a -> b -> c) -> (c -> d) -> a -> b -> dtoTuple2 :: [a] -> (a, a)toTuple3 :: [a] -> (a, a, a)toTuple4 :: [a] -> (a, a, a, a)sortT2On :: Ord b => (a -> b) -> (a, a) -> (a, a)sortT2OnM :: (Ord b, Monad m) => (a -> m b) -> (a, a) -> m (a, a)toList2 :: (a, a) -> [a]toList3 :: (a, a, a) -> [a]uncurry4 :: (a -> b -> c -> d -> e) -> (a, b, c, d) -> efst4 :: (a, b, c, d) -> asnd4 :: (a, b, c, d) -> bthd4 :: (a, b, c, d) -> cfth4 :: (a, b, c, d) -> dperms3 :: [(Int, Int, Int) -> (Int, Int, Int)]permsV3 :: [Linear.V3.V3 a -> Linear.V3.V3 a]fromV3 :: Linear.V3.V3 a -> (a, a, a)toV3 :: (a, a, a) -> Linear.V3.V3 afsts2 :: ((a, b1), (b2, b3)) -> (a, b2)snds2 :: ((a1, a2), (a3, b)) -> (a2, b)eol :: Parser Charwhitespace :: Parser Stringnumber :: (Read a, Num a) => Parser anat :: Read a => Parser anatural :: Read a => Parser abitChar :: Parser BoolnBitInt :: Int -> Parser Integercoord2 :: Parser (Int, Int)csvLine :: Parser a -> Parser [a]csv :: Parser [String]csvOf :: Parser a -> Parser [a]lineOf :: Parser a -> Parser alinesOf :: Parser a -> Parser [a]manyOf :: String -> Parser StringmanyOf1 :: String -> Parser StringmanyNoneOf :: String -> Parser StringmanyNoneOf1 :: String -> Parser StringcountMap :: (Ord a, Num n) => [a] -> Map a ncounts :: (Ord a, Num n) => [a] -> Map a nadjustWithDefault ::
Ord k => a -> (a -> a) -> k -> Map k a -> Map k aadjustMany :: Ord k => (a -> a) -> [k] -> Map k a -> Map k ainsertMany :: Ord a => [a] -> Set a -> Set apowerset :: [a] -> [[a]]batch3 :: [a] -> [[a]]pair :: a -> a -> [a]about :: Integral a => a -> a -> [a]listAsInt :: Integral a => [a] -> aunlist :: [a] -> apairs :: [a] -> [(a, a)]loopPairs :: [a] -> [(a, a)]triPairs :: Unable t => t a -> [(a, a)]triples :: Unable t => t a -> [(a, a, a)]nSameIn :: Ord a => Int -> [a] -> Maybe acount :: (a -> Bool) -> [a] -> Intduplicates :: Ord a => [a] -> [a]enumerate :: Enum a => [a]enum ::
(Foldable f, Mkable f (a, b), Num a, Enum a) => f b -> f (a, b)(..#) ::
(Foldable f, Mkable f (a, b), Num a, Enum a) => f b -> f (a, b)permutationMaps :: (Enum a, Ord a) => [Map a a]permuteSet :: Ord a => Map a a -> Set a -> Set atype Solution :: * -> * -> Constraintclass Solution a b where
toSolution :: a -> bunjust :: Maybe a -> arange :: (Ord a, Enum a) => a -> a -> [a](|...|) :: (Ord a, Enum a, Mkable f a) => a -> a -> f a(-!) :: Num a => a -> a -> arandomElement ::
System.Random.Internal.RandomGen g => [a] -> g -> (a, g)randomElements ::
System.Random.Internal.RandomGen g => Int -> [a] -> g -> ([a], g)randomElementIO :: [a] -> IO arandomElementsIO :: Int -> [a] -> IO [a]randomFromEnum ::
(System.Random.Internal.RandomGen g, Enum a, Bounded a) =>
g -> (a, g)randomFromEnumIO :: (Enum a, Bounded a) => IO ashuffle :: System.Random.Internal.RandomGen g => [a] -> g -> [a]shuffleIO :: [a] -> IO [a]txt :: Language.Haskell.TH.Quote.QuasiQuotertype As :: * -> * -> Constraintclass As to from where
as :: from -> totype Mℤ :: * -> *data Mℤ k = Mℤ !ℤ !ktype MM :: * -> * -> *type MM k v = Memo k v vtype (.->.) :: * -> * -> *type (.->.) k v = k -> MM k v(.$.) :: Ord k => (k .->. v) -> k -> MM k v(.<$>.) :: (Ord k, Functor f) => (k .->. v) -> f k -> f (MM k v)(.=<<.) ::
(Ord k, Traversable m) =>
(k .->. v)
-> m k
-> Control.Monad.Trans.Memo.StateCache.StateCache
(Control.Monad.Trans.Memo.State.Container (Map k v)) Identity (m v)type Runnable :: (* -> *) -> Constraintclass Runnable f where
run :: f a -> apad :: Int -> c -> [c] -> [c]splitBy :: (a -> Bool) -> [a] -> [[a]]pcases :: a -> [(a -> Bool, b)] -> bcases :: Eq a => a -> [(a, b)] -> b(?>) :: p -> [(p -> Bool, b)] -> b(==?>) :: Eq p => p -> [(p, b)] -> b(->>) :: a -> b -> (a, b)(⊨) :: a -> Bool(⊭) :: a -> Booltype SymbolList :: forall {k}. Symbol -> k -> Constraintclass SymbolList cs l where
symbolList :: [Char]symbolHead :: (ConsSymbol c cs ~ css, KnownChar c) => Maybe Chartype ListToSymbol :: [Char] -> Symboltype family ListToSymbol l where
ListToSymbol '[] = ""
ListToSymbol (c : l) = ConsSymbol c (ListToSymbol l)type SymbolToList :: Symbol -> [Char]type family SymbolToList s where
SymbolToList "" = '[]
SymbolToList s = SymbolToListM (UnconsSymbol s)type SymbolToListM :: Maybe (Char, Symbol) -> [Char]type family SymbolToListM s where
SymbolToListM (Just '(c, s)) = c : SymbolToList s
SymbolToListM Nothing = '[]type SChars :: [Char] -> [*]type family SChars cs where
SChars '[] = '[]
SChars (c : cs) = SChar c : SChars cstype SymSChars :: Symbol -> [*]type SymSChars s = SChars (SymbolToList s) :: [*]type CharV :: Symbol -> *type CharV s = V (SymSChars s)type 𝘊 :: Symbol -> *type 𝘊 s = CharV ssortGroupOn :: Ord b => (a -> b) -> [a] -> [[a]]nubOn :: Ord b => (a -> b) -> [a] -> [a]Quaalude.Variadic18Variadic functions through type classes.
type role (|=>) nominal nominaltype (|=>) :: * -> * -> *data (|=>) a b where
Variadic :: (forall (n :: Nat). ToVariadic n a b) =>
!(forall (n :: Nat). ToVariadic n a b => ToVariadicF n a [b])
-> (|=>) a btype role (|=*->) nominal nominaltype (|=*->) :: * -> * -> *data (|=*->) a b where
Variadicat :: (forall (n :: Nat). ToVariadicConcat n a b) =>
!(forall (n :: Nat). ToVariadicConcat n a b => ToVariadicF n a b)
-> (|=*->) a btype VF :: * -> Nat -> *type family VF ab n where
VF (a |=> b) n = ToVariadicF n a [b]
VF (a |=*-> b) n = ToVariadicF n a btype VC :: * -> Nat -> Constrainttype family VC ab n where
VC (a |=> b) n = ToVariadic n a b
VC (a |=*-> b) n = ToVariadicConcat n a btype (-*=|) :: Nat -> * -> *type (-*=|) n ab = VC ab n => VF ab ntype ToVariadicF :: Nat -> * -> * -> *type family ToVariadicF arity a b where
ToVariadicF 0 _1 b = b
ToVariadicF arity a b = ToVariadicF (arity - 1) a (a -> b)type ToVariadic :: Nat -> * -> * -> Constraintclass ToVariadic arity a b where
variadic :: (a -> b) -> ToVariadicF arity a [b]type ToVariadicConcat :: Nat -> * -> * -> Constraintclass (ToVariadic arity a b,
ToVariadicF arity a b
~ ComposeNF ([b] -> b) (ToVariadicF arity a [b]),
ComposeN ([b] -> b) (ToVariadicF arity a [b]), Monoid b) =>
ToVariadicConcat arity a b where
variadicat :: (a -> b) -> ToVariadicF arity a b
default variadicat :: (a -> b) -> ToVariadicF arity a b