respond-0.2.0.0: process and route HTTP requests and generate responses on top of WAI

Safe HaskellNone
LanguageHaskell2010

Web.Respond.HListUtils

Description

These are some tools for working with HLists; this is relevant when you are using path extractors.

Synopsis

Documentation

type family HListElim ts a :: * Source

this type family represents functions that can take all of the elements of an HList.

Instances

type HListElim ([] *) a = a 
type HListElim ((:) * t ts) a = t -> HListElim ts a 

type HList0 = HList [] Source

empty HList (useful for keeping other modules from needing to add several language extensions).

type HList1 a = HList `[a]` Source

HList with one element.

hListUncurry :: HListElim ts a -> HList ts -> a Source

uncurrys a function by applying it to the elements of the HList.

hListMapTo1 :: HListElim ts a -> HList ts -> HList1 a Source

uncurrys the function by applying it to the HList, then returns the result of that uncurrying as a single-element HList. useful for transforming PathExtractors.