freer-extras-0.1.0.0: Useful extensions to simple-freer
Safe HaskellNone
LanguageHaskell2010

Control.Monad.Freer.Extras.Pagination

Synopsis

Documentation

data PageQuery a Source #

Query parameters for pagination.

Constructors

PageQuery 

Fields

Instances

Instances details
Functor PageQuery Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Pagination

Methods

fmap :: (a -> b) -> PageQuery a -> PageQuery b Source #

(<$) :: a -> PageQuery b -> PageQuery a Source #

Eq a => Eq (PageQuery a) Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Pagination

Ord a => Ord (PageQuery a) Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Pagination

Show a => Show (PageQuery a) Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Pagination

Generic (PageQuery a) Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Pagination

Associated Types

type Rep (PageQuery a) :: Type -> Type Source #

Methods

from :: PageQuery a -> Rep (PageQuery a) x Source #

to :: Rep (PageQuery a) x -> PageQuery a Source #

ToJSON a => ToJSON (PageQuery a) Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Pagination

FromJSON a => FromJSON (PageQuery a) Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Pagination

Default (PageQuery a) Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Pagination

Methods

def :: PageQuery a Source #

ToSchema a => ToSchema (PageQuery a) Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Pagination

type Rep (PageQuery a) Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Pagination

type Rep (PageQuery a) = D1 ('MetaData "PageQuery" "Control.Monad.Freer.Extras.Pagination" "freer-extras-0.1.0.0-CfgIKUimrp7EKG4sAjImSV" 'False) (C1 ('MetaCons "PageQuery" 'PrefixI 'True) (S1 ('MetaSel ('Just "pageQuerySize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PageSize) :*: S1 ('MetaSel ('Just "pageQueryLastItem") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe a))))

data Page a Source #

Part of a collection.

Constructors

Page 

Fields

Instances

Instances details
Functor Page Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Pagination

Methods

fmap :: (a -> b) -> Page a -> Page b Source #

(<$) :: a -> Page b -> Page a Source #

Eq a => Eq (Page a) Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Pagination

Methods

(==) :: Page a -> Page a -> Bool Source #

(/=) :: Page a -> Page a -> Bool Source #

Ord a => Ord (Page a) Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Pagination

Methods

compare :: Page a -> Page a -> Ordering Source #

(<) :: Page a -> Page a -> Bool Source #

(<=) :: Page a -> Page a -> Bool Source #

(>) :: Page a -> Page a -> Bool Source #

(>=) :: Page a -> Page a -> Bool Source #

max :: Page a -> Page a -> Page a Source #

min :: Page a -> Page a -> Page a Source #

Show a => Show (Page a) Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Pagination

Methods

showsPrec :: Int -> Page a -> ShowS Source #

show :: Page a -> String Source #

showList :: [Page a] -> ShowS Source #

Generic (Page a) Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Pagination

Associated Types

type Rep (Page a) :: Type -> Type Source #

Methods

from :: Page a -> Rep (Page a) x Source #

to :: Rep (Page a) x -> Page a Source #

ToJSON a => ToJSON (Page a) Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Pagination

FromJSON a => FromJSON (Page a) Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Pagination

ToSchema a => ToSchema (Page a) Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Pagination

type Rep (Page a) Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Pagination

type Rep (Page a) = D1 ('MetaData "Page" "Control.Monad.Freer.Extras.Pagination" "freer-extras-0.1.0.0-CfgIKUimrp7EKG4sAjImSV" 'False) (C1 ('MetaCons "Page" 'PrefixI 'True) (S1 ('MetaSel ('Just "currentPageQuery") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PageQuery a)) :*: (S1 ('MetaSel ('Just "nextPageQuery") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (PageQuery a))) :*: S1 ('MetaSel ('Just "pageItems") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [a]))))

newtype PageSize Source #

Constructors

PageSize 

Fields

Instances

Instances details
Eq PageSize Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Pagination

Num PageSize Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Pagination

Ord PageSize Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Pagination

Show PageSize Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Pagination

Generic PageSize Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Pagination

Associated Types

type Rep PageSize :: Type -> Type Source #

ToJSON PageSize Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Pagination

FromJSON PageSize Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Pagination

Default PageSize Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Pagination

Methods

def :: PageSize Source #

ToSchema PageSize Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Pagination

type Rep PageSize Source # 
Instance details

Defined in Control.Monad.Freer.Extras.Pagination

type Rep PageSize = D1 ('MetaData "PageSize" "Control.Monad.Freer.Extras.Pagination" "freer-extras-0.1.0.0-CfgIKUimrp7EKG4sAjImSV" 'True) (C1 ('MetaCons "PageSize" 'PrefixI 'True) (S1 ('MetaSel ('Just "getPageSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural)))

pageOf Source #

Arguments

:: Eq a 
=> PageQuery a

Pagination query parameters.

-> Set a 
-> Page a 

Given a Set, request the Page with the given PageQuery.