okapi-0.2.0.0: A bidirectional HTTP description language
Safe HaskellNone
LanguageGHC2024

Okapi.Tree

Synopsis

Documentation

type family Context (t :: Type -> Type) Source #

Instances

Instances details
type Context RFC9651 Source # 
Instance details

Defined in Okapi.HTTP.RFC9651

type Context Dictionary Source # 
Instance details

Defined in Okapi.HTTP.RFC9651.Dictionary

type Context Item Source # 
Instance details

Defined in Okapi.HTTP.RFC9651.Item

type Context List Source # 
Instance details

Defined in Okapi.HTTP.RFC9651.List

type Context Parameters Source # 
Instance details

Defined in Okapi.HTTP.RFC9651.Parameters

type Context Body Source # 
Instance details

Defined in Okapi.HTTP.Request.Body

type Context Headers Source # 
Instance details

Defined in Okapi.HTTP.Request.Headers

type Context Method Source # 
Instance details

Defined in Okapi.HTTP.Request.Method

type Context Path Source # 
Instance details

Defined in Okapi.HTTP.Request.Path

type Context Path = [Text]
type Context Query Source # 
Instance details

Defined in Okapi.HTTP.Request.Query

type Context Attributes Source # 
Instance details

Defined in Okapi.HTTP.Response.Attributes

type Context Body Source # 
Instance details

Defined in Okapi.HTTP.Response.Body

type Context Headers Source # 
Instance details

Defined in Okapi.HTTP.Response.Headers

type Context Status Source # 
Instance details

Defined in Okapi.HTTP.Response.Status

type family Failure (t :: Type -> Type) Source #

Instances

Instances details
type Failure RFC9651 Source # 
Instance details

Defined in Okapi.HTTP.RFC9651

type Failure Dictionary Source # 
Instance details

Defined in Okapi.HTTP.RFC9651.Dictionary

type Failure Item Source # 
Instance details

Defined in Okapi.HTTP.RFC9651.Item

type Failure List Source # 
Instance details

Defined in Okapi.HTTP.RFC9651.List

type Failure Parameters Source # 
Instance details

Defined in Okapi.HTTP.RFC9651.Parameters

type Failure Body Source # 
Instance details

Defined in Okapi.HTTP.Request.Body

type Failure Cookie Source # 
Instance details

Defined in Okapi.HTTP.Request.Cookies

type Failure Headers Source # 
Instance details

Defined in Okapi.HTTP.Request.Headers

type Failure Method Source # 
Instance details

Defined in Okapi.HTTP.Request.Method

type Failure Path Source # 
Instance details

Defined in Okapi.HTTP.Request.Path

type Failure Query Source # 
Instance details

Defined in Okapi.HTTP.Request.Query

type Failure Attributes Source # 
Instance details

Defined in Okapi.HTTP.Response.Attributes

type Failure Body Source # 
Instance details

Defined in Okapi.HTTP.Response.Body

type Failure Headers Source # 
Instance details

Defined in Okapi.HTTP.Response.Headers

type Failure SetCookie Source # 
Instance details

Defined in Okapi.HTTP.Response.SetCookies

type Failure Status Source # 
Instance details

Defined in Okapi.HTTP.Response.Status

type Failure (BareItem :: Type -> Type) Source # 
Instance details

Defined in Okapi.HTTP.RFC9651.BareItem

type family Piece (t :: Type -> Type) Source #

Instances

Instances details
type Piece Cookie Source # 
Instance details

Defined in Okapi.HTTP.Request.Cookies

type Piece Headers Source # 
Instance details

Defined in Okapi.HTTP.Request.Headers

type Piece Path Source # 
Instance details

Defined in Okapi.HTTP.Request.Path

type Piece Path = Text
type Piece Query Source # 
Instance details

Defined in Okapi.HTTP.Request.Query

type Piece Attributes Source # 
Instance details

Defined in Okapi.HTTP.Response.Attributes

type Piece Headers Source # 
Instance details

Defined in Okapi.HTTP.Response.Headers

type Piece SetCookie Source # 
Instance details

Defined in Okapi.HTTP.Response.SetCookies

type Piece (BareItem :: Type -> Type) Source # 
Instance details

Defined in Okapi.HTTP.RFC9651.BareItem

type Parser (t :: Type -> Type) a = Context t -> (Either (Failure t) a, Context t) Source #

type Printer (t :: Type -> Type) a = a -> Context t Source #

data Info Source #

Constructors

Info 

Fields

Instances

Instances details
Show Info Source # 
Instance details

Defined in Okapi.Tree

Methods

showsPrec :: Int -> Info -> ShowS #

show :: Info -> String #

showList :: [Info] -> ShowS #

Eq Info Source # 
Instance details

Defined in Okapi.Tree

Methods

(==) :: Info -> Info -> Bool #

(/=) :: Info -> Info -> Bool #

data Leaf (t :: Type -> Type) a Source #

Constructors

Leaf 

Fields

class HasLeaf (t :: Type -> Type) a where Source #

Methods

leaf :: Leaf t a Source #

Instances

Instances details
HasLeaf Cookie ByteString Source # 
Instance details

Defined in Okapi.HTTP.Request.Cookies

HasLeaf Cookie Int16 Source # 
Instance details

Defined in Okapi.HTTP.Request.Cookies

HasLeaf Cookie Int32 Source # 
Instance details

Defined in Okapi.HTTP.Request.Cookies

HasLeaf Cookie Int64 Source # 
Instance details

Defined in Okapi.HTTP.Request.Cookies

HasLeaf Cookie Text Source # 
Instance details

Defined in Okapi.HTTP.Request.Cookies

HasLeaf Cookie Day Source # 
Instance details

Defined in Okapi.HTTP.Request.Cookies

HasLeaf Cookie UUID Source # 
Instance details

Defined in Okapi.HTTP.Request.Cookies

HasLeaf Cookie Integer Source # 
Instance details

Defined in Okapi.HTTP.Request.Cookies

HasLeaf Cookie Bool Source # 
Instance details

Defined in Okapi.HTTP.Request.Cookies

HasLeaf Cookie Int Source # 
Instance details

Defined in Okapi.HTTP.Request.Cookies

HasLeaf Headers ByteString Source # 
Instance details

Defined in Okapi.HTTP.Request.Headers

HasLeaf Headers Int16 Source # 
Instance details

Defined in Okapi.HTTP.Request.Headers

HasLeaf Headers Int32 Source # 
Instance details

Defined in Okapi.HTTP.Request.Headers

HasLeaf Headers Int64 Source # 
Instance details

Defined in Okapi.HTTP.Request.Headers

HasLeaf Headers Text Source # 
Instance details

Defined in Okapi.HTTP.Request.Headers

HasLeaf Headers Day Source # 
Instance details

Defined in Okapi.HTTP.Request.Headers

HasLeaf Headers DiffTime Source # 
Instance details

Defined in Okapi.HTTP.Request.Headers

HasLeaf Headers UTCTime Source # 
Instance details

Defined in Okapi.HTTP.Request.Headers

HasLeaf Headers LocalTime Source # 
Instance details

Defined in Okapi.HTTP.Request.Headers

HasLeaf Headers TimeOfDay Source # 
Instance details

Defined in Okapi.HTTP.Request.Headers

HasLeaf Headers UUID Source # 
Instance details

Defined in Okapi.HTTP.Request.Headers

HasLeaf Headers Integer Source # 
Instance details

Defined in Okapi.HTTP.Request.Headers

HasLeaf Headers Bool Source # 
Instance details

Defined in Okapi.HTTP.Request.Headers

HasLeaf Headers Double Source # 
Instance details

Defined in Okapi.HTTP.Request.Headers

HasLeaf Headers Float Source # 
Instance details

Defined in Okapi.HTTP.Request.Headers

HasLeaf Headers Int Source # 
Instance details

Defined in Okapi.HTTP.Request.Headers

HasLeaf Path Int16 Source # 
Instance details

Defined in Okapi.HTTP.Request.Path

HasLeaf Path Int32 Source # 
Instance details

Defined in Okapi.HTTP.Request.Path

HasLeaf Path Int64 Source # 
Instance details

Defined in Okapi.HTTP.Request.Path

HasLeaf Path Text Source # 
Instance details

Defined in Okapi.HTTP.Request.Path

HasLeaf Path UUID Source # 
Instance details

Defined in Okapi.HTTP.Request.Path

HasLeaf Path Integer Source # 
Instance details

Defined in Okapi.HTTP.Request.Path

HasLeaf Path Int Source # 
Instance details

Defined in Okapi.HTTP.Request.Path

Methods

leaf :: Leaf Path Int Source #

HasLeaf Query Int16 Source # 
Instance details

Defined in Okapi.HTTP.Request.Query

HasLeaf Query Int32 Source # 
Instance details

Defined in Okapi.HTTP.Request.Query

HasLeaf Query Int64 Source # 
Instance details

Defined in Okapi.HTTP.Request.Query

HasLeaf Query Text Source # 
Instance details

Defined in Okapi.HTTP.Request.Query

HasLeaf Query Day Source # 
Instance details

Defined in Okapi.HTTP.Request.Query

HasLeaf Query UTCTime Source # 
Instance details

Defined in Okapi.HTTP.Request.Query

HasLeaf Query UUID Source # 
Instance details

Defined in Okapi.HTTP.Request.Query

HasLeaf Query Integer Source # 
Instance details

Defined in Okapi.HTTP.Request.Query

HasLeaf Query Bool Source # 
Instance details

Defined in Okapi.HTTP.Request.Query

HasLeaf Query Double Source # 
Instance details

Defined in Okapi.HTTP.Request.Query

HasLeaf Query Float Source # 
Instance details

Defined in Okapi.HTTP.Request.Query

HasLeaf Query Int Source # 
Instance details

Defined in Okapi.HTTP.Request.Query

HasLeaf Attributes ByteString Source # 
Instance details

Defined in Okapi.HTTP.Response.Attributes

HasLeaf Attributes Integer Source # 
Instance details

Defined in Okapi.HTTP.Response.Attributes

HasLeaf Attributes Int Source # 
Instance details

Defined in Okapi.HTTP.Response.Attributes

HasLeaf Headers ByteString Source # 
Instance details

Defined in Okapi.HTTP.Response.Headers

HasLeaf Headers Int16 Source # 
Instance details

Defined in Okapi.HTTP.Response.Headers

HasLeaf Headers Int32 Source # 
Instance details

Defined in Okapi.HTTP.Response.Headers

HasLeaf Headers Int64 Source # 
Instance details

Defined in Okapi.HTTP.Response.Headers

HasLeaf Headers Text Source # 
Instance details

Defined in Okapi.HTTP.Response.Headers

HasLeaf Headers Day Source # 
Instance details

Defined in Okapi.HTTP.Response.Headers

HasLeaf Headers DiffTime Source # 
Instance details

Defined in Okapi.HTTP.Response.Headers

HasLeaf Headers UTCTime Source # 
Instance details

Defined in Okapi.HTTP.Response.Headers

HasLeaf Headers LocalTime Source # 
Instance details

Defined in Okapi.HTTP.Response.Headers

HasLeaf Headers TimeOfDay Source # 
Instance details

Defined in Okapi.HTTP.Response.Headers

HasLeaf Headers UUID Source # 
Instance details

Defined in Okapi.HTTP.Response.Headers

HasLeaf Headers Integer Source # 
Instance details

Defined in Okapi.HTTP.Response.Headers

HasLeaf Headers Bool Source # 
Instance details

Defined in Okapi.HTTP.Response.Headers

HasLeaf Headers Double Source # 
Instance details

Defined in Okapi.HTTP.Response.Headers

HasLeaf Headers Float Source # 
Instance details

Defined in Okapi.HTTP.Response.Headers

HasLeaf Headers Int Source # 
Instance details

Defined in Okapi.HTTP.Response.Headers

HasLeaf SetCookie ByteString Source # 
Instance details

Defined in Okapi.HTTP.Response.SetCookies

HasLeaf SetCookie Int16 Source # 
Instance details

Defined in Okapi.HTTP.Response.SetCookies

HasLeaf SetCookie Int32 Source # 
Instance details

Defined in Okapi.HTTP.Response.SetCookies

HasLeaf SetCookie Int64 Source # 
Instance details

Defined in Okapi.HTTP.Response.SetCookies

HasLeaf SetCookie Text Source # 
Instance details

Defined in Okapi.HTTP.Response.SetCookies

HasLeaf SetCookie Day Source # 
Instance details

Defined in Okapi.HTTP.Response.SetCookies

HasLeaf SetCookie UUID Source # 
Instance details

Defined in Okapi.HTTP.Response.SetCookies

HasLeaf SetCookie Integer Source # 
Instance details

Defined in Okapi.HTTP.Response.SetCookies

HasLeaf SetCookie Bool Source # 
Instance details

Defined in Okapi.HTTP.Response.SetCookies

HasLeaf SetCookie Int Source # 
Instance details

Defined in Okapi.HTTP.Response.SetCookies

HasLeaf Headers (TimeOfDay, TimeZone) Source # 
Instance details

Defined in Okapi.HTTP.Request.Headers

HasLeaf Headers (TimeOfDay, TimeZone) Source # 
Instance details

Defined in Okapi.HTTP.Response.Headers

HasLeaf (BareItem :: Type -> Type) ByteString Source # 
Instance details

Defined in Okapi.HTTP.RFC9651.BareItem

HasLeaf (BareItem :: Type -> Type) Scientific Source # 
Instance details

Defined in Okapi.HTTP.RFC9651.BareItem

HasLeaf (BareItem :: Type -> Type) Text Source # 
Instance details

Defined in Okapi.HTTP.RFC9651.BareItem

Methods

leaf :: Leaf (BareItem :: Type -> Type) Text Source #

HasLeaf (BareItem :: Type -> Type) UTCTime Source # 
Instance details

Defined in Okapi.HTTP.RFC9651.BareItem

HasLeaf (BareItem :: Type -> Type) Integer Source # 
Instance details

Defined in Okapi.HTTP.RFC9651.BareItem

HasLeaf (BareItem :: Type -> Type) Bool Source # 
Instance details

Defined in Okapi.HTTP.RFC9651.BareItem

Methods

leaf :: Leaf (BareItem :: Type -> Type) Bool Source #

HasLeaf (BareItem :: Type -> Type) Double Source # 
Instance details

Defined in Okapi.HTTP.RFC9651.BareItem

Methods

leaf :: Leaf (BareItem :: Type -> Type) Double Source #

HasLeaf (BareItem :: Type -> Type) Float Source # 
Instance details

Defined in Okapi.HTTP.RFC9651.BareItem

Methods

leaf :: Leaf (BareItem :: Type -> Type) Float Source #

HasLeaf (BareItem :: Type -> Type) Int Source # 
Instance details

Defined in Okapi.HTTP.RFC9651.BareItem

Methods

leaf :: Leaf (BareItem :: Type -> Type) Int Source #

int :: forall (t :: Type -> Type). HasLeaf t Int => Leaf t Int Source #

int16 :: forall (t :: Type -> Type). HasLeaf t Int16 => Leaf t Int16 Source #

int32 :: forall (t :: Type -> Type). HasLeaf t Int32 => Leaf t Int32 Source #

int64 :: forall (t :: Type -> Type). HasLeaf t Int64 => Leaf t Int64 Source #

integer :: forall (t :: Type -> Type). HasLeaf t Integer => Leaf t Integer Source #

bool :: forall (t :: Type -> Type). HasLeaf t Bool => Leaf t Bool Source #

float :: forall (t :: Type -> Type). HasLeaf t Float => Leaf t Float Source #

double :: forall (t :: Type -> Type). HasLeaf t Double => Leaf t Double Source #

text :: forall (t :: Type -> Type). HasLeaf t Text => Leaf t Text Source #

day :: forall (t :: Type -> Type). HasLeaf t Day => Leaf t Day Source #

localTime :: forall (t :: Type -> Type). HasLeaf t LocalTime => Leaf t LocalTime Source #

utcTime :: forall (t :: Type -> Type). HasLeaf t UTCTime => Leaf t UTCTime Source #

timeOfDay :: forall (t :: Type -> Type). HasLeaf t TimeOfDay => Leaf t TimeOfDay Source #

uuid :: forall (t :: Type -> Type). HasLeaf t UUID => Leaf t UUID 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

Instances details
Profunctor (Tree t) Source # 
Instance details

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 # 
Instance details

Defined in Okapi.Tree

Methods

pure :: a -> Tree t i a #

(<*>) :: Tree t i (a -> b) -> Tree t i a -> Tree t i b #

liftA2 :: (a -> b -> c) -> Tree t i a -> Tree t i b -> Tree t i c #

(*>) :: Tree t i a -> Tree t i b -> Tree t i b #

(<*) :: Tree t i a -> Tree t i b -> Tree t i a #

Functor (Tree t i) Source # 
Instance details

Defined in Okapi.Tree

Methods

fmap :: (a -> b) -> Tree t i a -> Tree t i b #

(<$) :: a -> Tree t i b -> Tree t i a #

type SymTree (t :: Type -> Type) a = Tree t a a Source #

A symmetrical Tree t i o where i ~ o.

(=.) :: Profunctor p => (a -> b) -> p b c -> p a c infixr 5 Source #

cost :: forall (t :: Type -> Type) i o. Tree t i o -> Int Source #

parser :: (forall a. t a -> Parser t a) -> Tree t i o -> Parser t o Source #

printer :: Monoid (Context t) => (forall a. t a -> Printer t a) -> Tree t i o -> Printer t i Source #

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 Source #

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 Source #