| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Okapi.Tree
Synopsis
- type family Context (t :: Type -> Type)
- type family Failure (t :: Type -> Type)
- type family Piece (t :: Type -> Type)
- type Parser (t :: Type -> Type) a = Context t -> (Either (Failure t) a, Context t)
- type Printer (t :: Type -> Type) a = a -> Context t
- data Info = Info {}
- data Leaf (t :: Type -> Type) a = Leaf {}
- class HasLeaf (t :: Type -> Type) a where
- int :: forall (t :: Type -> Type). HasLeaf t Int => Leaf t Int
- int16 :: forall (t :: Type -> Type). HasLeaf t Int16 => Leaf t Int16
- int32 :: forall (t :: Type -> Type). HasLeaf t Int32 => Leaf t Int32
- int64 :: forall (t :: Type -> Type). HasLeaf t Int64 => Leaf t Int64
- integer :: forall (t :: Type -> Type). HasLeaf t Integer => Leaf t Integer
- bool :: forall (t :: Type -> Type). HasLeaf t Bool => Leaf t Bool
- float :: forall (t :: Type -> Type). HasLeaf t Float => Leaf t Float
- double :: forall (t :: Type -> Type). HasLeaf t Double => Leaf t Double
- scientific :: forall (t :: Type -> Type). HasLeaf t Scientific => Leaf t Scientific
- text :: forall (t :: Type -> Type). HasLeaf t Text => Leaf t Text
- day :: forall (t :: Type -> Type). HasLeaf t Day => Leaf t Day
- localTime :: forall (t :: Type -> Type). HasLeaf t LocalTime => Leaf t LocalTime
- utcTime :: forall (t :: Type -> Type). HasLeaf t UTCTime => Leaf t UTCTime
- timeOfDay :: forall (t :: Type -> Type). HasLeaf t TimeOfDay => Leaf t TimeOfDay
- uuid :: forall (t :: Type -> Type). HasLeaf t UUID => Leaf t UUID
- data Tree (t :: Type -> Type) i o where
- FMap :: forall o1 o (t :: Type -> Type) i. (o1 -> o) -> Tree t i o1 -> Tree t i o
- LMap :: forall i i' (t :: Type -> Type) o. (i -> i') -> Tree t i' o -> Tree t i o
- Pure :: forall o (t :: Type -> Type) i. o -> Tree t i o
- Apply :: forall (t :: Type -> Type) i o1 o. Tree t i (o1 -> o) -> Tree t i o1 -> Tree t i o
- Node :: forall (t :: Type -> Type) i. t i -> Tree t i i
- type SymTree (t :: Type -> Type) a = Tree t a a
- (=.) :: Profunctor p => (a -> b) -> p b c -> p a c
- cost :: forall (t :: Type -> Type) i o. Tree t i o -> Int
- parser :: (forall a. t a -> Parser t a) -> Tree t i o -> Parser t o
- printer :: Monoid (Context t) => (forall a. t a -> Printer t a) -> Tree t i o -> Printer t i
- printParse :: forall a (t :: Type -> Type). (Eq a, Eq (Failure t), Eq (Context t), Monoid (Context t)) => (SymTree t a -> Parser t a) -> (SymTree t a -> Printer t a) -> SymTree t a -> a -> Bool
- printStable :: forall (t :: Type -> Type) a. (Eq (Context t), Monoid (Context t)) => (SymTree t a -> Parser t a) -> (SymTree t a -> Printer t a) -> SymTree t a -> a -> Bool
Documentation
type family Context (t :: Type -> Type) Source #
Instances
| type Context RFC9651 Source # | |
Defined in Okapi.HTTP.RFC9651 | |
| type Context Dictionary Source # | |
Defined in Okapi.HTTP.RFC9651.Dictionary | |
| type Context Item Source # | |
Defined in Okapi.HTTP.RFC9651.Item | |
| type Context List Source # | |
Defined in Okapi.HTTP.RFC9651.List | |
| type Context Parameters Source # | |
Defined in Okapi.HTTP.RFC9651.Parameters | |
| type Context Body Source # | |
Defined in Okapi.HTTP.Request.Body | |
| type Context Headers Source # | |
Defined in Okapi.HTTP.Request.Headers | |
| type Context Method Source # | |
Defined in Okapi.HTTP.Request.Method | |
| type Context Path Source # | |
Defined in Okapi.HTTP.Request.Path | |
| type Context Query Source # | |
Defined in Okapi.HTTP.Request.Query | |
| type Context Attributes Source # | |
Defined in Okapi.HTTP.Response.Attributes | |
| type Context Body Source # | |
Defined in Okapi.HTTP.Response.Body | |
| type Context Headers Source # | |
Defined in Okapi.HTTP.Response.Headers | |
| type Context Status Source # | |
Defined in Okapi.HTTP.Response.Status | |
type family Failure (t :: Type -> Type) Source #
Instances
type family Piece (t :: Type -> Type) Source #
Instances
| type Piece Cookie Source # | |
Defined in Okapi.HTTP.Request.Cookies | |
| type Piece Headers Source # | |
Defined in Okapi.HTTP.Request.Headers | |
| type Piece Path Source # | |
Defined in Okapi.HTTP.Request.Path | |
| type Piece Query Source # | |
Defined in Okapi.HTTP.Request.Query | |
| type Piece Attributes Source # | |
Defined in Okapi.HTTP.Response.Attributes | |
| type Piece Headers Source # | |
Defined in Okapi.HTTP.Response.Headers | |
| type Piece SetCookie Source # | |
Defined in Okapi.HTTP.Response.SetCookies | |
| type Piece (BareItem :: Type -> Type) Source # | |
Defined in Okapi.HTTP.RFC9651.BareItem | |
class HasLeaf (t :: Type -> Type) a where Source #
Instances
scientific :: forall (t :: Type -> Type). HasLeaf t Scientific => Leaf t Scientific Source #
data Tree (t :: Type -> Type) i o where Source #
Constructors
| FMap :: forall o1 o (t :: Type -> Type) i. (o1 -> o) -> Tree t i o1 -> Tree t i o | |
| LMap :: forall i i' (t :: Type -> Type) o. (i -> i') -> Tree t i' o -> Tree t i o | |
| Pure :: forall o (t :: Type -> Type) i. o -> Tree t i o | |
| Apply :: forall (t :: Type -> Type) i o1 o. Tree t i (o1 -> o) -> Tree t i o1 -> Tree t i o | |
| Node :: forall (t :: Type -> Type) i. t i -> Tree t i i |
Instances
| Profunctor (Tree t) Source # | |
Defined in Okapi.Tree Methods dimap :: (a -> b) -> (c -> d) -> Tree t b c -> Tree t a d # lmap :: (a -> b) -> Tree t b c -> Tree t a c # rmap :: (b -> c) -> Tree t a b -> Tree t a c # (#.) :: forall a b c q. Coercible c b => q b c -> Tree t a b -> Tree t a c # (.#) :: forall a b c q. Coercible b a => Tree t b c -> q a b -> Tree t a c # | |
| Applicative (Tree t i) Source # | |
| Functor (Tree t i) Source # | |
(=.) :: Profunctor p => (a -> b) -> p b c -> p a c infixr 5 Source #
printer :: Monoid (Context t) => (forall a. t a -> Printer t a) -> Tree t i o -> Printer t i Source #