servant-queryparam-core-0.0.1: Use records for query parameters in servant APIs.
Safe HaskellSafe-Inferred
LanguageGHC2021

Servant.TypeLevel

Description

This module provides functions to modify Symbols and type-level lists.

The workflow to define a modification function can be as follows.

  1. Use ToList to convert a Symbol to a type-level list of Chars.
  2. Use functions from here and from the package first-class-families for type-level lists (Fcf.Data.List).
  3. Use FromList to convert a type-level list of Chars back to a Symbol.

Example (see DropPrefix):

>>> :kind! DropPrefix "_userParams_category"
DropPrefix "_userParams_category" :: Symbol
= "category"

Modules that use the Eval type family (e.g., Servant.Record) must be imported together with modules that export instances of Eval (see the GHC documentation on Type families).

Synopsis

Re-exports from first-class-families

type family Eval (e :: Exp a) :: a #

Expression evaluator.

Instances

Instances details
type Eval (Not 'False) 
Instance details

Defined in Fcf.Data.Bool

type Eval (Not 'False) = 'True
type Eval (Not 'True) 
Instance details

Defined in Fcf.Data.Bool

type Eval (Not 'True) = 'False
type Eval (Constraints (a ': as) :: Constraint -> Type) 
Instance details

Defined in Fcf.Utils

type Eval (Constraints (a ': as) :: Constraint -> Type) = (a, Eval (Constraints as))
type Eval (Constraints ('[] :: [Constraint])) 
Instance details

Defined in Fcf.Utils

type Eval (Constraints ('[] :: [Constraint])) = ()
type Eval (MEmpty_ :: a -> Type) 
Instance details

Defined in Fcf.Class.Monoid

type Eval (MEmpty_ :: a -> Type) = MEmpty :: a
type Eval (Sum ns :: Nat -> Type) 
Instance details

Defined in Fcf.Class.Foldable

type Eval (Sum ns :: Nat -> Type) = Eval (Foldr (+) 0 ns)
type Eval (Length ('[] :: [a]) :: Nat -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Length ('[] :: [a]) :: Nat -> Type) = 0
type Eval (Length (a2 ': as) :: Nat -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Length (a2 ': as) :: Nat -> Type) = 1 + Eval (Length as)
type Eval (a * b :: Nat -> Type) 
Instance details

Defined in Fcf.Data.Nat

type Eval (a * b :: Nat -> Type) = a * b
type Eval (a + b :: Nat -> Type) 
Instance details

Defined in Fcf.Data.Nat

type Eval (a + b :: Nat -> Type) = a + b
type Eval (a - b :: Nat -> Type) 
Instance details

Defined in Fcf.Data.Nat

type Eval (a - b :: Nat -> Type) = a - b
type Eval (a ^ b :: Nat -> Type) 
Instance details

Defined in Fcf.Data.Nat

type Eval (a ^ b :: Nat -> Type) = a ^ b
type Eval (And lst :: Bool -> Type) 
Instance details

Defined in Fcf.Class.Foldable

type Eval (And lst :: Bool -> Type) = Eval (Foldr (&&) 'True lst)
type Eval (Or lst :: Bool -> Type) 
Instance details

Defined in Fcf.Class.Foldable

type Eval (Or lst :: Bool -> Type) = Eval (Foldr (||) 'False lst)
type Eval ('False && b :: Bool -> Type) 
Instance details

Defined in Fcf.Data.Bool

type Eval ('False && b :: Bool -> Type) = 'False
type Eval ('True && b :: Bool -> Type) 
Instance details

Defined in Fcf.Data.Bool

type Eval ('True && b :: Bool -> Type) = b
type Eval (a && 'False :: Bool -> Type) 
Instance details

Defined in Fcf.Data.Bool

type Eval (a && 'False :: Bool -> Type) = 'False
type Eval (a && 'True :: Bool -> Type) 
Instance details

Defined in Fcf.Data.Bool

type Eval (a && 'True :: Bool -> Type) = a
type Eval ('False || b :: Bool -> Type) 
Instance details

Defined in Fcf.Data.Bool

type Eval ('False || b :: Bool -> Type) = b
type Eval ('True || b :: Bool -> Type) 
Instance details

Defined in Fcf.Data.Bool

type Eval ('True || b :: Bool -> Type) = 'True
type Eval (a || 'False :: Bool -> Type) 
Instance details

Defined in Fcf.Data.Bool

type Eval (a || 'False :: Bool -> Type) = a
type Eval (a || 'True :: Bool -> Type) 
Instance details

Defined in Fcf.Data.Bool

type Eval (a || 'True :: Bool -> Type) = 'True
type Eval (IsJust ('Just _a) :: Bool -> Type) 
Instance details

Defined in Fcf.Data.Common

type Eval (IsJust ('Just _a) :: Bool -> Type) = 'True
type Eval (IsJust ('Nothing :: Maybe a) :: Bool -> Type) 
Instance details

Defined in Fcf.Data.Common

type Eval (IsJust ('Nothing :: Maybe a) :: Bool -> Type) = 'False
type Eval (IsNothing ('Just _a) :: Bool -> Type) 
Instance details

Defined in Fcf.Data.Common

type Eval (IsNothing ('Just _a) :: Bool -> Type) = 'False
type Eval (IsNothing ('Nothing :: Maybe a) :: Bool -> Type) 
Instance details

Defined in Fcf.Data.Common

type Eval (IsNothing ('Nothing :: Maybe a) :: Bool -> Type) = 'True
type Eval (Null ('[] :: [a]) :: Bool -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Null ('[] :: [a]) :: Bool -> Type) = 'True
type Eval (Null (a2 ': as) :: Bool -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Null (a2 ': as) :: Bool -> Type) = 'False
type Eval (a < b :: Bool -> Type) 
Instance details

Defined in Fcf.Data.Nat

type Eval (a < b :: Bool -> Type) = Eval (Not =<< (a >= b))
type Eval (a <= b :: Bool -> Type) 
Instance details

Defined in Fcf.Data.Nat

type Eval (a <= b :: Bool -> Type) = a <=? b
type Eval (a > b :: Bool -> Type) 
Instance details

Defined in Fcf.Data.Nat

type Eval (a > b :: Bool -> Type) = Eval (Not =<< (a <= b))
type Eval (a >= b :: Bool -> Type) 
Instance details

Defined in Fcf.Data.Nat

type Eval (a >= b :: Bool -> Type) = b <=? a
type Eval (Join e :: a -> Type) 
Instance details

Defined in Fcf.Combinators

type Eval (Join e :: a -> Type) = Eval (Eval e)
type Eval (Pure x :: a -> Type) 
Instance details

Defined in Fcf.Combinators

type Eval (Pure x :: a -> Type) = x
type Eval (Error msg :: a -> Type) 
Instance details

Defined in Fcf.Utils

type Eval (Error msg :: a -> Type) = TypeError ('Text msg) :: a
type Eval (TError msg :: a -> Type) 
Instance details

Defined in Fcf.Utils

type Eval (TError msg :: a -> Type) = TypeError msg :: a
type Eval (IsLeft ('Left _a :: Either a b) :: Bool -> Type) 
Instance details

Defined in Fcf.Data.Common

type Eval (IsLeft ('Left _a :: Either a b) :: Bool -> Type) = 'True
type Eval (IsLeft ('Right _a :: Either a b) :: Bool -> Type) 
Instance details

Defined in Fcf.Data.Common

type Eval (IsLeft ('Right _a :: Either a b) :: Bool -> Type) = 'False
type Eval (IsRight ('Left _a :: Either a b) :: Bool -> Type) 
Instance details

Defined in Fcf.Data.Common

type Eval (IsRight ('Left _a :: Either a b) :: Bool -> Type) = 'False
type Eval (IsRight ('Right _a :: Either a b) :: Bool -> Type) 
Instance details

Defined in Fcf.Data.Common

type Eval (IsRight ('Right _a :: Either a b) :: Bool -> Type) = 'True
type Eval (Elem a2 as :: Bool -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Elem a2 as :: Bool -> Type) = Eval ((IsJust :: Maybe Nat -> Bool -> Type) =<< FindIndex (TyEq a2 :: a1 -> Bool -> Type) as)
type Eval (IsInfixOf xs ys :: Bool -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (IsInfixOf xs ys :: Bool -> Type) = Eval ((Any (IsPrefixOf xs) :: [[a]] -> Bool -> Type) =<< Tails ys)
type Eval (IsPrefixOf xs ys :: Bool -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (IsPrefixOf xs ys :: Bool -> Type) = IsPrefixOf_ xs ys
type Eval (IsSuffixOf xs ys :: Bool -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (IsSuffixOf xs ys :: Bool -> Type) = Eval (IsPrefixOf ((Reverse :: [a] -> [a] -> Type) @@ xs) ((Reverse :: [a] -> [a] -> Type) @@ ys))
type Eval (Concat xs :: a -> Type) 
Instance details

Defined in Fcf.Class.Foldable

type Eval (Concat xs :: a -> Type) = Eval (FoldMap (Pure :: a -> a -> Type) xs)
type Eval (x .<> y :: a -> Type) 
Instance details

Defined in Fcf.Class.Monoid

type Eval (x .<> y :: a -> Type) = x <> y
type Eval (FromMaybe _a ('Just b) :: a -> Type) 
Instance details

Defined in Fcf.Data.Common

type Eval (FromMaybe _a ('Just b) :: a -> Type) = b
type Eval (FromMaybe a2 ('Nothing :: Maybe a1) :: a1 -> Type) 
Instance details

Defined in Fcf.Data.Common

type Eval (FromMaybe a2 ('Nothing :: Maybe a1) :: a1 -> Type) = a2
type Eval (Fst '(a2, _b) :: a1 -> Type) 
Instance details

Defined in Fcf.Data.Common

type Eval (Fst '(a2, _b) :: a1 -> Type) = a2
type Eval (Snd '(_a, b) :: a1 -> Type) 
Instance details

Defined in Fcf.Data.Common

type Eval (Snd '(_a, b) :: a1 -> Type) = b
type Eval (All p lst :: Bool -> Type) 
Instance details

Defined in Fcf.Class.Foldable

type Eval (All p lst :: Bool -> Type) = Eval (Foldr (Bicomap p (Pure :: Bool -> Bool -> Type) (&&)) 'True lst)
type Eval (Any p lst :: Bool -> Type) 
Instance details

Defined in Fcf.Class.Foldable

type Eval (Any p lst :: Bool -> Type) = Eval (Foldr (Bicomap p (Pure :: Bool -> Bool -> Type) (||)) 'False lst)
type Eval (TyEq a b :: Bool -> Type) 
Instance details

Defined in Fcf.Utils

type Eval (TyEq a b :: Bool -> Type) = TyEqImpl a b
type Eval (NotTyEq a b :: Bool -> Type) Source # 
Instance details

Defined in Servant.TypeLevel

type Eval (NotTyEq a b :: Bool -> Type)
type Eval (UnBool fal tru 'False :: a -> Type) 
Instance details

Defined in Fcf.Data.Bool

type Eval (UnBool fal tru 'False :: a -> Type) = Eval fal
type Eval (UnBool fal tru 'True :: a -> Type) 
Instance details

Defined in Fcf.Data.Bool

type Eval (UnBool fal tru 'True :: a -> Type) = Eval tru
type Eval (f $ a3 :: a1 -> Type) 
Instance details

Defined in Fcf.Combinators

type Eval (f $ a3 :: a1 -> Type) = Eval (f a3)
type Eval (f <$> e :: a1 -> Type) 
Instance details

Defined in Fcf.Combinators

type Eval (f <$> e :: a1 -> Type) = f (Eval e)
type Eval (f <*> e :: a1 -> Type) 
Instance details

Defined in Fcf.Combinators

type Eval (f <*> e :: a1 -> Type) = Eval f (Eval e)
type Eval (k =<< e :: a1 -> Type) 
Instance details

Defined in Fcf.Combinators

type Eval (k =<< e :: a1 -> Type) = Eval (k (Eval e))
type Eval (e >>= k :: a1 -> Type) 
Instance details

Defined in Fcf.Combinators

type Eval (e >>= k :: a1 -> Type) = Eval (k (Eval e))
type Eval (ConstFn a2 _b :: a1 -> Type) 
Instance details

Defined in Fcf.Combinators

type Eval (ConstFn a2 _b :: a1 -> Type) = a2
type Eval (Pure1 f x :: a1 -> Type) 
Instance details

Defined in Fcf.Combinators

type Eval (Pure1 f x :: a1 -> Type) = f x
type Eval (x & f :: a1 -> Type) 
Instance details

Defined in Fcf.Data.Function

type Eval (x & f :: a1 -> Type) = Eval (f x)
type Eval (Case ms a :: k -> Type) 
Instance details

Defined in Fcf.Utils

type Eval (Case ms a :: k -> Type) = Case_ ms a
type Eval (FoldMap f ('Left _a :: Either a3 a2) :: a1 -> Type) 
Instance details

Defined in Fcf.Class.Foldable

type Eval (FoldMap f ('Left _a :: Either a3 a2) :: a1 -> Type) = MEmpty :: a1
type Eval (FoldMap f ('Right x :: Either a3 a2) :: a1 -> Type) 
Instance details

Defined in Fcf.Class.Foldable

type Eval (FoldMap f ('Right x :: Either a3 a2) :: a1 -> Type) = Eval (f x)
type Eval (FoldMap f ('Just x) :: a1 -> Type) 
Instance details

Defined in Fcf.Class.Foldable

type Eval (FoldMap f ('Just x) :: a1 -> Type) = Eval (f x)
type Eval (FoldMap f ('Nothing :: Maybe a2) :: a1 -> Type) 
Instance details

Defined in Fcf.Class.Foldable

type Eval (FoldMap f ('Nothing :: Maybe a2) :: a1 -> Type) = MEmpty :: a1
type Eval (FoldMap f (x ': xs) :: a1 -> Type) 
Instance details

Defined in Fcf.Class.Foldable

type Eval (FoldMap f (x ': xs) :: a1 -> Type) = Eval (f x) <> Eval (FoldMap f xs)
type Eval (FoldMap f ('[] :: [a2]) :: a1 -> Type) 
Instance details

Defined in Fcf.Class.Foldable

type Eval (FoldMap f ('[] :: [a2]) :: a1 -> Type) = MEmpty :: a1
type Eval (UnMaybe y f ('Just x) :: a1 -> Type) 
Instance details

Defined in Fcf.Data.Common

type Eval (UnMaybe y f ('Just x) :: a1 -> Type) = Eval (f x)
type Eval (UnMaybe y f ('Nothing :: Maybe a2) :: a1 -> Type) 
Instance details

Defined in Fcf.Data.Common

type Eval (UnMaybe y f ('Nothing :: Maybe a2) :: a1 -> Type) = Eval y
type Eval (Uncurry f '(x, y) :: a1 -> Type) 
Instance details

Defined in Fcf.Data.Common

type Eval (Uncurry f '(x, y) :: a1 -> Type) = Eval (f x y)
type Eval (UnList y f xs :: a1 -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (UnList y f xs :: a1 -> Type) = Eval (Foldr f y xs)
type Eval (Foldr f y ('Left _a :: Either a3 a2) :: a1 -> Type) 
Instance details

Defined in Fcf.Class.Foldable

type Eval (Foldr f y ('Left _a :: Either a3 a2) :: a1 -> Type) = y
type Eval (Foldr f y ('Right x :: Either a3 a2) :: a1 -> Type) 
Instance details

Defined in Fcf.Class.Foldable

type Eval (Foldr f y ('Right x :: Either a3 a2) :: a1 -> Type) = Eval (f x y)
type Eval (Foldr f y ('Just x) :: a1 -> Type) 
Instance details

Defined in Fcf.Class.Foldable

type Eval (Foldr f y ('Just x) :: a1 -> Type) = Eval (f x y)
type Eval (Foldr f y ('Nothing :: Maybe a2) :: a1 -> Type) 
Instance details

Defined in Fcf.Class.Foldable

type Eval (Foldr f y ('Nothing :: Maybe a2) :: a1 -> Type) = y
type Eval (Foldr f y (x ': xs) :: a1 -> Type) 
Instance details

Defined in Fcf.Class.Foldable

type Eval (Foldr f y (x ': xs) :: a1 -> Type) = Eval (f x (Eval (Foldr f y xs)))
type Eval (Foldr f y ('[] :: [a2]) :: a1 -> Type) 
Instance details

Defined in Fcf.Class.Foldable

type Eval (Foldr f y ('[] :: [a2]) :: a1 -> Type) = y
type Eval ((f <=< g) x :: a1 -> Type) 
Instance details

Defined in Fcf.Combinators

type Eval ((f <=< g) x :: a1 -> Type) = Eval (f (Eval (g x)))
type Eval (Flip f y x :: a1 -> Type) 
Instance details

Defined in Fcf.Combinators

type Eval (Flip f y x :: a1 -> Type) = Eval (f x y)
type Eval (LiftM2 f x y :: a1 -> Type) 
Instance details

Defined in Fcf.Combinators

type Eval (LiftM2 f x y :: a1 -> Type) = Eval (f (Eval x) (Eval y))
type Eval (Pure2 f x y :: a1 -> Type) 
Instance details

Defined in Fcf.Combinators

type Eval (Pure2 f x y :: a1 -> Type) = f x y
type Eval (UnEither f g ('Left x :: Either a2 b) :: a1 -> Type) 
Instance details

Defined in Fcf.Data.Common

type Eval (UnEither f g ('Left x :: Either a2 b) :: a1 -> Type) = Eval (f x)
type Eval (UnEither f g ('Right y :: Either a2 b) :: a1 -> Type) 
Instance details

Defined in Fcf.Data.Common

type Eval (UnEither f g ('Right y :: Either a2 b) :: a1 -> Type) = Eval (g y)
type Eval (On r f x y :: a1 -> Type) 
Instance details

Defined in Fcf.Data.Function

type Eval (On r f x y :: a1 -> Type) = Eval (r (Eval (f x)) (Eval (f y)))
type Eval (LiftM3 f x y z :: a1 -> Type) 
Instance details

Defined in Fcf.Combinators

type Eval (LiftM3 f x y z :: a1 -> Type) = Eval (f (Eval x) (Eval y) (Eval z))
type Eval (Pure3 f x y z :: a1 -> Type) 
Instance details

Defined in Fcf.Combinators

type Eval (Pure3 f x y z :: a1 -> Type) = f x y z
type Eval (Bicomap f g r x y :: a1 -> Type) 
Instance details

Defined in Fcf.Data.Function

type Eval (Bicomap f g r x y :: a1 -> Type) = Eval (r (Eval (f x)) (Eval (g y)))
type Eval (Init ('[] :: [a]) :: Maybe [a] -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Init ('[] :: [a]) :: Maybe [a] -> Type) = 'Nothing :: Maybe [a]
type Eval (Tail (_a ': as) :: Maybe [a] -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Tail (_a ': as) :: Maybe [a] -> Type) = 'Just as
type Eval (Tail ('[] :: [a]) :: Maybe [a] -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Tail ('[] :: [a]) :: Maybe [a] -> Type) = 'Nothing :: Maybe [a]
type Eval (Init (a2 ': (b ': as)) :: Maybe [a1] -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Init (a2 ': (b ': as)) :: Maybe [a1] -> Type) = Eval ((Map (Cons a2) :: Maybe [a1] -> Maybe [a1] -> Type) =<< Init (b ': as))
type Eval (Init '[a2] :: Maybe [a1] -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Init '[a2] :: Maybe [a1] -> Type) = 'Just ('[] :: [a1])
type Eval (Head ('[] :: [a]) :: Maybe a -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Head ('[] :: [a]) :: Maybe a -> Type) = 'Nothing :: Maybe a
type Eval (Last ('[] :: [a]) :: Maybe a -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Last ('[] :: [a]) :: Maybe a -> Type) = 'Nothing :: Maybe a
type Eval (Head (a2 ': _as) :: Maybe a1 -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Head (a2 ': _as) :: Maybe a1 -> Type) = 'Just a2
type Eval (Last (a2 ': (b ': as)) :: Maybe a1 -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Last (a2 ': (b ': as)) :: Maybe a1 -> Type) = Eval (Last (b ': as))
type Eval (Last '[a2] :: Maybe a1 -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Last '[a2] :: Maybe a1 -> Type) = 'Just a2
type Eval (Tails ('[] :: [a]) :: [[a]] -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Tails ('[] :: [a]) :: [[a]] -> Type) = '[] :: [[a]]
type Eval (Tails (a2 ': as) :: [[a1]] -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Tails (a2 ': as) :: [[a1]] -> Type) = (a2 ': as) ': Eval (Tails as)
type Eval (Reverse l :: [a] -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Reverse l :: [a] -> Type) = Eval (Rev l ('[] :: [a]))
type Eval (FindIndex _p ('[] :: [a]) :: Maybe Nat -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (FindIndex _p ('[] :: [a]) :: Maybe Nat -> Type) = 'Nothing :: Maybe Nat
type Eval (FindIndex p (a2 ': as) :: Maybe Nat -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (FindIndex p (a2 ': as) :: Maybe Nat -> Type) = Eval (If (Eval (p a2)) (Pure ('Just 0)) ((Map ((+) 1) :: Maybe Nat -> Maybe Nat -> Type) =<< FindIndex p as))
type Eval (NumIter a s :: Maybe (k, Nat) -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (NumIter a s :: Maybe (k, Nat) -> Type) = If (Eval (s > 0)) ('Just '(a, s - 1)) ('Nothing :: Maybe (k, Natural))
type Eval (Find _p ('[] :: [a]) :: Maybe a -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Find _p ('[] :: [a]) :: Maybe a -> Type) = 'Nothing :: Maybe a
type Eval (Find p (a2 ': as) :: Maybe a1 -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Find p (a2 ': as) :: Maybe a1 -> Type) = Eval (If (Eval (p a2)) (Pure ('Just a2)) (Find p as))
type Eval (xs ++ ys :: [a] -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (xs ++ ys :: [a] -> Type) = xs <> ys
type Eval (Drop n as :: [a] -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Drop n as :: [a] -> Type) = Drop_ n as
type Eval (DropWhile p (x ': xs) :: [a] -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (DropWhile p (x ': xs) :: [a] -> Type) = Eval (If (Eval (p x)) (DropWhile p xs) (Pure (x ': xs)))
type Eval (DropWhile p ('[] :: [a]) :: [a] -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (DropWhile p ('[] :: [a]) :: [a] -> Type) = '[] :: [a]
type Eval (Filter _p ('[] :: [a]) :: [a] -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Filter _p ('[] :: [a]) :: [a] -> Type) = '[] :: [a]
type Eval (Intercalate xs xss :: [a] -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Intercalate xs xss :: [a] -> Type) = Eval ((Concat :: [[a]] -> [a] -> Type) =<< Intersperse xs xss)
type Eval (Intersperse _1 ('[] :: [a]) :: [a] -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Intersperse _1 ('[] :: [a]) :: [a] -> Type) = '[] :: [a]
type Eval (Intersperse sep (x ': xs) :: [a] -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Intersperse sep (x ': xs) :: [a] -> Type) = x ': Eval (PrependToAll sep xs)
type Eval (PrependToAll _1 ('[] :: [a]) :: [a] -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (PrependToAll _1 ('[] :: [a]) :: [a] -> Type) = '[] :: [a]
type Eval (PrependToAll sep (x ': xs) :: [a] -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (PrependToAll sep (x ': xs) :: [a] -> Type) = sep ': (x ': Eval (PrependToAll sep xs))
type Eval (Rev (x ': xs) ys :: [a] -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Rev (x ': xs) ys :: [a] -> Type) = Eval (Rev xs (x ': ys))
type Eval (Rev ('[] :: [a]) ys :: [a] -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Rev ('[] :: [a]) ys :: [a] -> Type) = ys
type Eval (Take n as :: [a] -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Take n as :: [a] -> Type) = Take_ n as
type Eval (TakeWhile p (x ': xs) :: [a] -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (TakeWhile p (x ': xs) :: [a] -> Type) = Eval (If (Eval (p x)) ('(:) x <$> TakeWhile p xs) (Pure ('[] :: [a])))
type Eval (TakeWhile p ('[] :: [a]) :: [a] -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (TakeWhile p ('[] :: [a]) :: [a] -> Type) = '[] :: [a]
type Eval (Cons a2 as :: [a1] -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Cons a2 as :: [a1] -> Type) = a2 ': as
type Eval (Filter p (a2 ': as) :: [a1] -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Filter p (a2 ': as) :: [a1] -> Type) = Eval (If (Eval (p a2)) ('(:) a2 <$> Filter p as) (Filter p as))
type Eval (Replicate n a2 :: [a1] -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Replicate n a2 :: [a1] -> Type) = Eval (Unfoldr (NumIter a2) n)
type Eval (Snoc lst a :: [k] -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Snoc lst a :: [k] -> Type) = Eval (lst ++ '[a])
type Eval (Lookup a as :: Maybe b -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Lookup a as :: Maybe b -> Type) = Eval (Map (Snd :: (k, b) -> b -> Type) (Eval (Find ((TyEq a :: k -> Bool -> Type) <=< (Fst :: (k, b) -> k -> Type)) as)))
type Eval (Zip as bs :: [(a, b)] -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Zip as bs :: [(a, b)] -> Type) = Eval (ZipWith (Pure2 ('(,) :: a -> b -> (a, b))) as bs)
type Eval (Unfoldr f c :: [a] -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Unfoldr f c :: [a] -> Type) = Eval (UnfoldrCase f (f @@ c))
type Eval (UnfoldrCase _1 ('Nothing :: Maybe (a, b)) :: [a] -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (UnfoldrCase _1 ('Nothing :: Maybe (a, b)) :: [a] -> Type) = '[] :: [a]
type Eval (UnfoldrCase f ('Just ab) :: [a1] -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (UnfoldrCase f ('Just ab) :: [a1] -> Type) = Eval (Fst ab) ': Eval (Unfoldr f (Eval (Snd ab)))
type Eval (SetIndex n a' as :: [k] -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (SetIndex n a' as :: [k] -> Type) = SetIndexImpl n a' as
type Eval (Map f ('Just a3) :: Maybe a1 -> Type) 
Instance details

Defined in Fcf.Class.Functor

type Eval (Map f ('Just a3) :: Maybe a1 -> Type) = 'Just (Eval (f a3))
type Eval (Map f ('Nothing :: Maybe a) :: Maybe b -> Type) 
Instance details

Defined in Fcf.Class.Functor

type Eval (Map f ('Nothing :: Maybe a) :: Maybe b -> Type) = 'Nothing :: Maybe b
type Eval (ConcatMap f xs :: [b] -> Type) 
Instance details

Defined in Fcf.Class.Foldable

type Eval (ConcatMap f xs :: [b] -> Type) = Eval (FoldMap f xs)
type Eval (Map f ('[] :: [a]) :: [b] -> Type) 
Instance details

Defined in Fcf.Class.Functor

type Eval (Map f ('[] :: [a]) :: [b] -> Type) = '[] :: [b]
type Eval (Map f (a2 ': as) :: [b] -> Type) 
Instance details

Defined in Fcf.Class.Functor

type Eval (Map f (a2 ': as) :: [b] -> Type) = Eval (f a2) ': Eval (Map f as)
type Eval (ZipWith _f ('[] :: [a]) _bs :: [c] -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (ZipWith _f ('[] :: [a]) _bs :: [c] -> Type) = '[] :: [c]
type Eval (ZipWith _f _as ('[] :: [b]) :: [c] -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (ZipWith _f _as ('[] :: [b]) :: [c] -> Type) = '[] :: [c]
type Eval (ZipWith f (a2 ': as) (b2 ': bs) :: [c] -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (ZipWith f (a2 ': as) (b2 ': bs) :: [c] -> Type) = Eval (f a2 b2) ': Eval (ZipWith f as bs)
type Eval (Break p lst :: ([a], [a]) -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Break p lst :: ([a], [a]) -> Type) = Eval (Span (Not <=< p) lst)
type Eval (Partition p lst :: ([a], [a]) -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Partition p lst :: ([a], [a]) -> Type) = Eval (Foldr (PartHelp p) '('[] :: [a], '[] :: [a]) lst)
type Eval (Span p lst :: ([a], [a]) -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Span p lst :: ([a], [a]) -> Type) = '(Eval (TakeWhile p lst), Eval (DropWhile p lst))
type Eval (Unzip as :: ([a], [b]) -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Unzip as :: ([a], [b]) -> Type) = Eval (Foldr (Cons2 :: (a, b) -> ([a], [b]) -> ([a], [b]) -> Type) '('[] :: [a], '[] :: [b]) (Eval as))
type Eval (PartHelp p a2 '(xs, ys) :: ([a1], [a1]) -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (PartHelp p a2 '(xs, ys) :: ([a1], [a1]) -> Type) = If (Eval (p a2)) '(a2 ': xs, ys) '(xs, a2 ': ys)
type Eval (Cons2 '(a3, b) '(as, bs) :: ([a1], [a2]) -> Type) 
Instance details

Defined in Fcf.Data.List

type Eval (Cons2 '(a3, b) '(as, bs) :: ([a1], [a2]) -> Type) = '(a3 ': as, b ': bs)
type Eval (Map f ('Left x :: Either a1 a2) :: Either a1 b -> Type) 
Instance details

Defined in Fcf.Class.Functor

type Eval (Map f ('Left x :: Either a1 a2) :: Either a1 b -> Type) = 'Left x :: Either a1 b
type Eval (Map f ('Right a3 :: Either a1 a2) :: Either a1 b -> Type) 
Instance details

Defined in Fcf.Class.Functor

type Eval (Map f ('Right a3 :: Either a1 a2) :: Either a1 b -> Type) = 'Right (Eval (f a3)) :: Either a1 b
type Eval (Map f '(x, a2) :: (k1, k2) -> Type) 
Instance details

Defined in Fcf.Class.Functor

type Eval (Map f '(x, a2) :: (k1, k2) -> Type) = '(x, Eval (f a2))
type Eval ((f *** f') '(b2, b'2) :: (k1, k2) -> Type) 
Instance details

Defined in Fcf.Data.Common

type Eval ((f *** f') '(b2, b'2) :: (k1, k2) -> Type) = '(Eval (f b2), Eval (f' b'2))
type Eval (Second g x :: f a' b' -> Type) 
Instance details

Defined in Fcf.Class.Bifunctor

type Eval (Second g x :: f a' b' -> Type) = Eval (Bimap (Pure :: a' -> a' -> Type) g x)
type Eval (First f2 x :: f1 a' b' -> Type) 
Instance details

Defined in Fcf.Class.Bifunctor

type Eval (First f2 x :: f1 a' b' -> Type) = Eval (Bimap f2 (Pure :: b' -> b' -> Type) x)
type Eval (Bimap f g ('Right y :: Either a b2) :: Either a' b1 -> Type) 
Instance details

Defined in Fcf.Class.Bifunctor

type Eval (Bimap f g ('Right y :: Either a b2) :: Either a' b1 -> Type) = 'Right (Eval (g y)) :: Either a' b1
type Eval (Bimap f g ('Left x :: Either a2 b) :: Either a1 b' -> Type) 
Instance details

Defined in Fcf.Class.Bifunctor

type Eval (Bimap f g ('Left x :: Either a2 b) :: Either a1 b' -> Type) = 'Left (Eval (f x)) :: Either a1 b'
type Eval (Bimap f g '(x, y) :: (k1, k2) -> Type) 
Instance details

Defined in Fcf.Class.Bifunctor

type Eval (Bimap f g '(x, y) :: (k1, k2) -> Type) = '(Eval (f x), Eval (g y))
type Eval (Map f '(x, y, a2) :: (k1, k2, k3) -> Type) 
Instance details

Defined in Fcf.Class.Functor

type Eval (Map f '(x, y, a2) :: (k1, k2, k3) -> Type) = '(x, y, Eval (f a2))
type Eval (Map f '(x, y, z, a2) :: (k1, k2, k3, k4) -> Type) 
Instance details

Defined in Fcf.Class.Functor

type Eval (Map f '(x, y, z, a2) :: (k1, k2, k3, k4) -> Type) = '(x, y, z, Eval (f a2))
type Eval (Map f '(x, y, z, w, a2) :: (k1, k2, k3, k4, k5) -> Type) 
Instance details

Defined in Fcf.Class.Functor

type Eval (Map f '(x, y, z, w, a2) :: (k1, k2, k3, k4, k5) -> Type) = '(x, y, z, w, Eval (f a2))

type Exp a = a -> Type #

Kind of type-level expressions indexed by their result type.

List functions

type family FromList (cs :: [Char]) :: Symbol where ... Source #

Convert a list of Chars to a Symbol.

>>> :kind! FromList ['a', '+', 'c']
FromList ['a', '+', 'c'] :: Symbol
= "a+c"

Equations

FromList cs = FromList1 (Eval (Reverse cs)) "" 

type family FromList1 (syms :: [Char]) (sym :: Symbol) :: Symbol where ... Source #

Convert a list of Chars to a Symbol.

In this list, Chars go in a reverse order.

>>> :kind! FromList1 ['a', 'b', 'c'] ""
FromList1 ['a', 'b', 'c'] "" :: Symbol
= "cba"

Equations

FromList1 '[] s = s 
FromList1 (x ': xs) s = FromList1 xs (ConsSymbol x s) 

type family ToList (sym :: Symbol) :: [Char] where ... Source #

Convert a Symbol to a list of Chars.

Equations

ToList sym = ToList1 (UnconsSymbol sym) 

type family ToList1 (sym :: Maybe (Char, Symbol)) :: [Char] where ... Source #

Convert a possibly unconsed Symbol to a list of Chars.

Equations

ToList1 'Nothing = '[] 
ToList1 ('Just '(c, sym)) = c ': ToList1 (UnconsSymbol sym) 

Comparison functions

data TyEq (c :: a) (d :: b) (e :: Bool) #

Type equality.

Details

Expand

The base library also defines a similar (==); it differs from TyEq in the following ways:

  • TyEq is heterogeneous: its arguments may have different kinds;
  • TyEq is reflexive: TyEq a a always reduces to True even if a is a variable.

Instances

Instances details
type Eval (TyEq a b :: Bool -> Type) 
Instance details

Defined in Fcf.Utils

type Eval (TyEq a b :: Bool -> Type) = TyEqImpl a b

data NotTyEq :: a -> b -> Exp Bool Source #

Type inequality

Instances

Instances details
type Eval (NotTyEq a b :: Bool -> Type) Source # 
Instance details

Defined in Servant.TypeLevel

type Eval (NotTyEq a b :: Bool -> Type)

Examples

type DropUnderscores = DropWhile (TyEq '_') Source #

Drop leading underscores.

>>> :kind! Eval (DropUnderscores ['_', '_', 'a'])
Eval (DropUnderscores ['_', '_', 'a']) :: [Char]
= '['a']

type DropNonUnderscores = DropWhile (NotTyEq '_') Source #

Drop leading non-underscores.

>>> :kind! Eval (DropNonUnderscores ['a', 'a', '_'])
Eval (DropNonUnderscores ['a', 'a', '_']) :: [Char]
= '['_']

type family DropPrefix (sym :: Symbol) :: Symbol where ... Source #

Drop the prefix of a Symbol.

>>> :kind! DropPrefix "_userParams_category"
DropPrefix "_userParams_category" :: Symbol
= "category"