espial-0.0.20: Espial is an open-source, web-based bookmarking server.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Import.NoFoundation

Synopsis

Documentation

type Conduit i (m :: Type -> Type) o = ConduitT i o m () #

Consumes a stream of input values and produces a stream of output values, without producing a final result.

Since 0.5.0

newtype UnliftIO (m :: Type -> Type) #

The ability to run any monadic action m a as IO a.

This is more precisely a natural transformation. We need to new datatype (instead of simply using a forall) due to lack of support in GHC for impredicative types.

Since: unliftio-core-0.1.0.0

Constructors

UnliftIO 

Fields

class RenderRoute site => Yesod site where #

Define settings for a Yesod applications. All methods have intelligent defaults, and therefore no implementation is required.

Minimal complete definition

Nothing

Methods

approot :: Approot site #

An absolute URL to the root of the application. Do not include trailing slash.

Default value: guessApproot. If you know your application root statically, it will be more efficient and more reliable to instead use ApprootStatic or ApprootMaster. If you do not need full absolute URLs, you can use ApprootRelative instead.

Note: Prior to yesod-core 1.5, the default value was ApprootRelative.

catchHandlerExceptions :: MonadUnliftIO m => site -> m a -> (SomeException -> m a) -> m a #

allows the user to specify how exceptions are cought. by default all async exceptions are thrown and synchronous exceptions render a 500 page. To catch all exceptions (even async) to render a 500 page, set this to catchSyncOrAsync. Beware this may have negative effects with functions like timeout.

Since: yesod-core-1.6.24.0

errorHandler :: ErrorResponse -> HandlerFor site TypedContent #

Output error response pages.

Default value: defaultErrorHandler.

defaultLayout :: WidgetFor site () -> HandlerFor site Html #

Applies some form of layout to the contents of a page.

urlParamRenderOverride #

Arguments

:: site 
-> Route site 
-> [(Text, Text)]

query string

-> Maybe Builder 

Override the rendering function for a particular URL and query string parameters. One use case for this is to offload static hosting to a different domain name to avoid sending cookies.

For backward compatibility default implementation is in terms of urlRenderOverride, probably ineffective

Since 1.4.23

isAuthorized #

Arguments

:: Route site 
-> Bool

is this a write request?

-> HandlerFor site AuthResult 

Determine if a request is authorized or not.

Return Authorized if the request is authorized, Unauthorized a message if unauthorized. If authentication is required, return AuthenticationRequired.

isWriteRequest :: Route site -> HandlerFor site Bool #

Determines whether the current request is a write request. By default, this assumes you are following RESTful principles, and determines this from request method. In particular, all except the following request methods are considered write: GET HEAD OPTIONS TRACE.

This function is used to determine if a request is authorized; see isAuthorized.

authRoute :: site -> Maybe (Route site) #

The default route for authentication.

Used in particular by isAuthorized, but library users can do whatever they want with it.

cleanPath :: site -> [Text] -> Either [Text] [Text] #

A function used to clean up path segments. It returns Right with a clean path or Left with a new set of pieces the user should be redirected to. The default implementation enforces:

  • No double slashes
  • There is no trailing slash.

Note that versions of Yesod prior to 0.7 used a different set of rules involing trailing slashes.

joinPath #

Arguments

:: site 
-> Text

application root

-> [Text]

path pieces

-> [(Text, Text)]

query string

-> Builder 

Builds an absolute URL by concatenating the application root with the pieces of a path and a query string, if any. Note that the pieces of the path have been previously cleaned up by cleanPath.

addStaticContent #

Arguments

:: Text

filename extension

-> Text

mime-type

-> ByteString

content

-> HandlerFor site (Maybe (Either Text (Route site, [(Text, Text)]))) 

This function is used to store some static content to be served as an external file. The most common case of this is stashing CSS and JavaScript content in an external file; the Yesod.Widget module uses this feature.

The return value is Nothing if no storing was performed; this is the default implementation. A Just Left gives the absolute URL of the file, whereas a Just Right gives the type-safe URL. The former is necessary when you are serving the content outside the context of a Yesod application, such as via memcached.

maximumContentLength :: site -> Maybe (Route site) -> Maybe Word64 #

Maximum allowed length of the request body, in bytes. This method may be ignored if maximumContentLengthIO is overridden.

If Nothing, no maximum is applied.

Default: 2 megabytes.

maximumContentLengthIO :: site -> Maybe (Route site) -> IO (Maybe Word64) #

Maximum allowed length of the request body, in bytes. This is similar to maximumContentLength, but the result lives in IO. This allows you to dynamically change the maximum file size based on some external source like a database or an IORef.

The default implementation uses maximumContentLength. Future version of yesod will remove maximumContentLength and use this method exclusively.

Since: yesod-core-1.6.13

makeLogger :: site -> IO Logger #

Creates a Logger to use for log messages.

Note that a common technique (endorsed by the scaffolding) is to create a Logger value and place it in your foundation datatype, and have this method return that already created value. That way, you can use that same Logger for printing messages during app initialization.

Default: the defaultMakeLogger function.

messageLoggerSource #

Arguments

:: site 
-> Logger 
-> Loc

position in source code

-> LogSource 
-> LogLevel 
-> LogStr

message

-> IO () 

Send a message to the Logger provided by getLogger.

Default: the defaultMessageLoggerSource function, using shouldLogIO to check whether we should log.

jsLoader :: site -> ScriptLoadPosition site #

Where to Load sripts from. We recommend the default value, BottomOfBody.

jsAttributes :: site -> [(Text, Text)] #

Default attributes to put on the JavaScript script tag generated for julius files

jsAttributesHandler :: HandlerFor site [(Text, Text)] #

Same as jsAttributes but allows you to run arbitrary Handler code

This is useful if you need to add a randomised nonce value to the script tag generated by widgetFile. If this function is overridden then jsAttributes is ignored.

Since: yesod-core-1.6.16

makeSessionBackend :: site -> IO (Maybe SessionBackend) #

Create a session backend. Returning Nothing disables sessions. If you'd like to change the way that the session cookies are created, take a look at customizeSessionCookies.

Default: Uses clientsession with a 2 hour timeout.

fileUpload :: site -> RequestBodyLength -> FileUpload #

How to store uploaded files.

Default: When the request body is greater than 50kb, store in a temp file. For chunked request bodies, store in a temp file. Otherwise, store in memory.

shouldLogIO :: site -> LogSource -> LogLevel -> IO Bool #

Should we log the given log source/level combination.

Default: the defaultShouldLogIO function.

Since 1.2.4

yesodMiddleware :: ToTypedContent res => HandlerFor site res -> HandlerFor site res #

A Yesod middleware, which will wrap every handler function. This allows you to run code before and after a normal handler.

Default: the defaultYesodMiddleware function.

Since: 1.1.6

yesodWithInternalState :: site -> Maybe (Route site) -> (InternalState -> IO a) -> IO a #

How to allocate an InternalState for each request.

The default implementation is almost always what you want. However, if you know that you are never taking advantage of the MonadResource instance in your handler functions, setting this to a dummy implementation can provide a small optimization. Only do this if you really know what you're doing, otherwise you can turn safe code into a runtime error!

Since 1.4.2

defaultMessageWidget :: Html -> HtmlUrl (Route site) -> WidgetFor site () #

Convert a title and HTML snippet into a Widget. Used primarily for wrapping up error messages for better display.

Since: yesod-core-1.4.30

Instances

Instances details
Yesod App Source # 
Instance details

Defined in Foundation

Methods

approot :: Approot App #

catchHandlerExceptions :: MonadUnliftIO m => App -> m a -> (SomeException -> m a) -> m a #

errorHandler :: ErrorResponse -> HandlerFor App TypedContent #

defaultLayout :: WidgetFor App () -> HandlerFor App Html #

urlParamRenderOverride :: App -> Route App -> [(Text, Text)] -> Maybe Builder #

isAuthorized :: Route App -> Bool -> HandlerFor App AuthResult #

isWriteRequest :: Route App -> HandlerFor App Bool #

authRoute :: App -> Maybe (Route App) #

cleanPath :: App -> [Text] -> Either [Text] [Text] #

joinPath :: App -> Text -> [Text] -> [(Text, Text)] -> Builder #

addStaticContent :: Text -> Text -> ByteString -> HandlerFor App (Maybe (Either Text (Route App, [(Text, Text)]))) #

maximumContentLength :: App -> Maybe (Route App) -> Maybe Word64 #

maximumContentLengthIO :: App -> Maybe (Route App) -> IO (Maybe Word64) #

makeLogger :: App -> IO Logger #

messageLoggerSource :: App -> Logger -> Loc -> LogSource -> LogLevel -> LogStr -> IO () #

jsLoader :: App -> ScriptLoadPosition App #

jsAttributes :: App -> [(Text, Text)] #

jsAttributesHandler :: HandlerFor App [(Text, Text)] #

makeSessionBackend :: App -> IO (Maybe SessionBackend) #

fileUpload :: App -> RequestBodyLength -> FileUpload #

shouldLogIO :: App -> LogSource -> LogLevel -> IO Bool #

yesodMiddleware :: ToTypedContent res => HandlerFor App res -> HandlerFor App res #

yesodWithInternalState :: App -> Maybe (Route App) -> (InternalState -> IO a) -> IO a #

defaultMessageWidget :: Html -> HtmlUrl (Route App) -> WidgetFor App () #

Yesod LiteApp 
Instance details

Defined in Yesod.Core.Internal.LiteApp

Methods

approot :: Approot LiteApp #

catchHandlerExceptions :: MonadUnliftIO m => LiteApp -> m a -> (SomeException -> m a) -> m a #

errorHandler :: ErrorResponse -> HandlerFor LiteApp TypedContent #

defaultLayout :: WidgetFor LiteApp () -> HandlerFor LiteApp Html #

urlParamRenderOverride :: LiteApp -> Route LiteApp -> [(Text, Text)] -> Maybe Builder #

isAuthorized :: Route LiteApp -> Bool -> HandlerFor LiteApp AuthResult #

isWriteRequest :: Route LiteApp -> HandlerFor LiteApp Bool #

authRoute :: LiteApp -> Maybe (Route LiteApp) #

cleanPath :: LiteApp -> [Text] -> Either [Text] [Text] #

joinPath :: LiteApp -> Text -> [Text] -> [(Text, Text)] -> Builder #

addStaticContent :: Text -> Text -> ByteString -> HandlerFor LiteApp (Maybe (Either Text (Route LiteApp, [(Text, Text)]))) #

maximumContentLength :: LiteApp -> Maybe (Route LiteApp) -> Maybe Word64 #

maximumContentLengthIO :: LiteApp -> Maybe (Route LiteApp) -> IO (Maybe Word64) #

makeLogger :: LiteApp -> IO Logger #

messageLoggerSource :: LiteApp -> Logger -> Loc -> LogSource -> LogLevel -> LogStr -> IO () #

jsLoader :: LiteApp -> ScriptLoadPosition LiteApp #

jsAttributes :: LiteApp -> [(Text, Text)] #

jsAttributesHandler :: HandlerFor LiteApp [(Text, Text)] #

makeSessionBackend :: LiteApp -> IO (Maybe SessionBackend) #

fileUpload :: LiteApp -> RequestBodyLength -> FileUpload #

shouldLogIO :: LiteApp -> LogSource -> LogLevel -> IO Bool #

yesodMiddleware :: ToTypedContent res => HandlerFor LiteApp res -> HandlerFor LiteApp res #

yesodWithInternalState :: LiteApp -> Maybe (Route LiteApp) -> (InternalState -> IO a) -> IO a #

defaultMessageWidget :: Html -> HtmlUrl (Route LiteApp) -> WidgetFor LiteApp () #

type String = [Char] #

A String is a list of characters. String constants in Haskell are values of type String.

See Data.List for operations on lists.

data RealWorld #

RealWorld is deeply magical. It is primitive, but it is not unlifted (hence ptrArg). We never manipulate values of type RealWorld; it's only used in the type system, to parameterise State#.

data Bool #

Constructors

False 
True 

Instances

Instances details
FromJSON Bool 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSONKey Bool 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON Bool 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSONKey Bool 
Instance details

Defined in Data.Aeson.Types.ToJSON

Storable Bool

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Bool -> Int #

alignment :: Bool -> Int #

peekElemOff :: Ptr Bool -> Int -> IO Bool #

pokeElemOff :: Ptr Bool -> Int -> Bool -> IO () #

peekByteOff :: Ptr b -> Int -> IO Bool #

pokeByteOff :: Ptr b -> Int -> Bool -> IO () #

peek :: Ptr Bool -> IO Bool #

poke :: Ptr Bool -> Bool -> IO () #

Bounded Bool

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Bool

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

succ :: Bool -> Bool #

pred :: Bool -> Bool #

toEnum :: Int -> Bool #

fromEnum :: Bool -> Int #

enumFrom :: Bool -> [Bool] #

enumFromThen :: Bool -> Bool -> [Bool] #

enumFromTo :: Bool -> Bool -> [Bool] #

enumFromThenTo :: Bool -> Bool -> Bool -> [Bool] #

Generic Bool 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Bool :: Type -> Type #

Methods

from :: Bool -> Rep Bool x #

to :: Rep Bool x -> Bool #

SingKind Bool

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type DemoteRep Bool

Methods

fromSing :: forall (a :: Bool). Sing a -> DemoteRep Bool

Read Bool

Since: base-2.1

Instance details

Defined in GHC.Read

Show Bool

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> Bool -> ShowS #

show :: Bool -> String #

showList :: [Bool] -> ShowS #

BitOps Bool 
Instance details

Defined in Basement.Bits

FiniteBitsOps Bool 
Instance details

Defined in Basement.Bits

ToMarkup Bool 
Instance details

Defined in Text.Blaze

ToValue Bool 
Instance details

Defined in Text.Blaze

NFData Bool 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Bool -> () #

Eq Bool 
Instance details

Defined in GHC.Classes

Methods

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

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

Ord Bool 
Instance details

Defined in GHC.Classes

Methods

compare :: Bool -> Bool -> Ordering #

(<) :: Bool -> Bool -> Bool #

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

(>) :: Bool -> Bool -> Bool #

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

max :: Bool -> Bool -> Bool #

min :: Bool -> Bool -> Bool #

Hashable Bool 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Bool -> Int #

hash :: Bool -> Int #

FromFormKey Bool 
Instance details

Defined in Web.Internal.FormUrlEncoded

ToFormKey Bool 
Instance details

Defined in Web.Internal.FormUrlEncoded

Methods

toFormKey :: Bool -> Text #

FromHttpApiData Bool 
Instance details

Defined in Web.Internal.HttpApiData

ToHttpApiData Bool 
Instance details

Defined in Web.Internal.HttpApiData

PathPiece Bool 
Instance details

Defined in Web.PathPieces

PersistField Bool 
Instance details

Defined in Database.Persist.Class.PersistField

PersistFieldSql Bool 
Instance details

Defined in Database.Persist.Sql.Class

Methods

sqlType :: Proxy Bool -> SqlType #

Uniform Bool 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Bool #

UniformRange Bool 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Bool, Bool) -> g -> m Bool #

RawJS Bool 
Instance details

Defined in Text.Julius

Methods

rawJS :: Bool -> RawJavascript #

ToJavascript Bool 
Instance details

Defined in Text.Julius

Unbox Bool 
Instance details

Defined in Data.Vector.Unboxed.Base

SingI 'False

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

sing :: Sing 'False

SingI 'True

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

sing :: Sing 'True

Lift Bool 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Bool -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Bool -> Code m Bool #

Vector Vector Bool 
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Bool 
Instance details

Defined in Data.Vector.Unboxed.Base

SymbolToField "archiveDefault" User Bool Source # 
Instance details

Defined in Model

SymbolToField "isMarkdown" Note Bool Source # 
Instance details

Defined in Model

SymbolToField "privacyLock" User Bool Source # 
Instance details

Defined in Model

SymbolToField "privateDefault" User Bool Source # 
Instance details

Defined in Model

SymbolToField "selected" Bookmark Bool Source # 
Instance details

Defined in Model

SymbolToField "shared" Bookmark Bool Source # 
Instance details

Defined in Model

SymbolToField "shared" Note Bool Source # 
Instance details

Defined in Model

SymbolToField "toRead" Bookmark Bool Source # 
Instance details

Defined in Model

(ToFrom a a', SqlSelect b r, ToAlias b, ToAliasReference b, d ~ (a' :& b)) => DoInnerJoin Lateral a (a' -> SqlQuery b, d -> SqlExpr (Value Bool)) d 
Instance details

Defined in Database.Esqueleto.Experimental.From.Join

Methods

doInnerJoin :: Proxy Lateral -> a -> (a' -> SqlQuery b, d -> SqlExpr (Value Bool)) -> From d #

(ToFrom a a', ToMaybe b, d ~ (a' :& ToMaybeT b), SqlSelect b r, ToAlias b, ToAliasReference b) => DoLeftJoin Lateral a (a' -> SqlQuery b, d -> SqlExpr (Value Bool)) d 
Instance details

Defined in Database.Esqueleto.Experimental.From.Join

Methods

doLeftJoin :: Proxy Lateral -> a -> (a' -> SqlQuery b, d -> SqlExpr (Value Bool)) -> From d #

type DemoteRep Bool 
Instance details

Defined in GHC.Generics

type DemoteRep Bool = Bool
type Rep Bool

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

type Rep Bool = D1 ('MetaData "Bool" "GHC.Types" "ghc-prim" 'False) (C1 ('MetaCons "False" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "True" 'PrefixI 'False) (U1 :: Type -> Type))
data Sing (a :: Bool) 
Instance details

Defined in GHC.Generics

data Sing (a :: Bool) where
newtype Vector Bool 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Bool 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Bool = MV_Bool (MVector s Word8)

data Char #

The character type Char is an enumeration whose values represent Unicode (or equivalently ISO/IEC 10646) code points (i.e. characters, see http://www.unicode.org/ for details). This set extends the ISO 8859-1 (Latin-1) character set (the first 256 characters), which is itself an extension of the ASCII character set (the first 128 characters). A character literal in Haskell has type Char.

To convert a Char to or from the corresponding Int value defined by Unicode, use toEnum and fromEnum from the Enum class respectively (or equivalently ord and chr).

Instances

Instances details
FromJSON Char 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSONKey Char 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON Char 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSONKey Char 
Instance details

Defined in Data.Aeson.Types.ToJSON

Storable Char

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Char -> Int #

alignment :: Char -> Int #

peekElemOff :: Ptr Char -> Int -> IO Char #

pokeElemOff :: Ptr Char -> Int -> Char -> IO () #

peekByteOff :: Ptr b -> Int -> IO Char #

pokeByteOff :: Ptr b -> Int -> Char -> IO () #

peek :: Ptr Char -> IO Char #

poke :: Ptr Char -> Char -> IO () #

Bounded Char

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Char

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

succ :: Char -> Char #

pred :: Char -> Char #

toEnum :: Int -> Char #

fromEnum :: Char -> Int #

enumFrom :: Char -> [Char] #

enumFromThen :: Char -> Char -> [Char] #

enumFromTo :: Char -> Char -> [Char] #

enumFromThenTo :: Char -> Char -> Char -> [Char] #

Read Char

Since: base-2.1

Instance details

Defined in GHC.Read

Show Char

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> Char -> ShowS #

show :: Char -> String #

showList :: [Char] -> ShowS #

Subtractive Char 
Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference Char #

Methods

(-) :: Char -> Char -> Difference Char #

PrimMemoryComparable Char 
Instance details

Defined in Basement.PrimType

PrimType Char 
Instance details

Defined in Basement.PrimType

Associated Types

type PrimSize Char :: Nat #

ToMarkup String 
Instance details

Defined in Text.Blaze

ToMarkup Char 
Instance details

Defined in Text.Blaze

ToValue String 
Instance details

Defined in Text.Blaze

ToValue Char 
Instance details

Defined in Text.Blaze

FoldCase Char 
Instance details

Defined in Data.CaseInsensitive.Internal

Methods

foldCase :: Char -> Char #

foldCaseList :: [Char] -> [Char]

NFData Char 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Char -> () #

ToLogStr String 
Instance details

Defined in System.Log.FastLogger.LogStr

Methods

toLogStr :: String -> LogStr #

Eq Char 
Instance details

Defined in GHC.Classes

Methods

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

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

Ord Char 
Instance details

Defined in GHC.Classes

Methods

compare :: Char -> Char -> Ordering #

(<) :: Char -> Char -> Bool #

(<=) :: Char -> Char -> Bool #

(>) :: Char -> Char -> Bool #

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

max :: Char -> Char -> Char #

min :: Char -> Char -> Char #

Hashable Char 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Char -> Int #

hash :: Char -> Int #

FromFormKey String 
Instance details

Defined in Web.Internal.FormUrlEncoded

FromFormKey Char 
Instance details

Defined in Web.Internal.FormUrlEncoded

ToFormKey String 
Instance details

Defined in Web.Internal.FormUrlEncoded

Methods

toFormKey :: String -> Text #

ToFormKey Char 
Instance details

Defined in Web.Internal.FormUrlEncoded

Methods

toFormKey :: Char -> Text #

FromHttpApiData String 
Instance details

Defined in Web.Internal.HttpApiData

FromHttpApiData Char 
Instance details

Defined in Web.Internal.HttpApiData

ToHttpApiData String 
Instance details

Defined in Web.Internal.HttpApiData

ToHttpApiData Char 
Instance details

Defined in Web.Internal.HttpApiData

PathPiece String 
Instance details

Defined in Web.PathPieces

Prim Char 
Instance details

Defined in Data.Primitive.Types

Uniform Char 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Char #

UniformRange Char 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Char, Char) -> g -> m Char #

ToJavascript String 
Instance details

Defined in Text.Julius

ToMessage String 
Instance details

Defined in Text.Shakespeare.I18N

Methods

toMessage :: String -> Text #

Unbox Char 
Instance details

Defined in Data.Vector.Unboxed.Base

ToContent String 
Instance details

Defined in Yesod.Core.Content

Methods

toContent :: String -> Content #

ToFlushBuilder String 
Instance details

Defined in Yesod.Core.Content

TestCoercion SChar

Since: base-4.18.0.0

Instance details

Defined in GHC.TypeLits

Methods

testCoercion :: forall (a :: k) (b :: k). SChar a -> SChar b -> Maybe (Coercion a b) #

TestEquality SChar

Since: base-4.18.0.0

Instance details

Defined in GHC.TypeLits

Methods

testEquality :: forall (a :: k) (b :: k). SChar a -> SChar b -> Maybe (a :~: b) #

ToBuilder Char Builder 
Instance details

Defined in Data.Builder

Methods

toBuilder :: Char -> Builder #

ToBuilder Char Builder 
Instance details

Defined in Data.Builder

Methods

toBuilder :: Char -> Builder #

Lift Char 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Char -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Char -> Code m Char #

Vector Vector Char 
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Char 
Instance details

Defined in Data.Vector.Unboxed.Base

RedirectUrl master String 
Instance details

Defined in Yesod.Core.Handler

Methods

toTextUrl :: (MonadHandler m, HandlerSite m ~ master) => String -> m Text #

Selector s => GFromForm (t :: k) (M1 S s (K1 i String :: Type -> Type)) 
Instance details

Defined in Web.Internal.FormUrlEncoded

Methods

gFromForm :: Proxy t -> FormOptions -> Form -> Either Text (M1 S s (K1 i String) x) #

Selector s => GToForm (t :: k) (M1 S s (K1 i String :: Type -> Type)) 
Instance details

Defined in Web.Internal.FormUrlEncoded

Methods

gToForm :: Proxy t -> FormOptions -> M1 S s (K1 i String) x -> Form #

Generic1 (URec Char :: k -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (URec Char) :: k -> Type #

Methods

from1 :: forall (a :: k0). URec Char a -> Rep1 (URec Char) a #

to1 :: forall (a :: k0). Rep1 (URec Char) a -> URec Char a #

Lift (String -> CloseStyle) 
Instance details

Defined in Text.Hamlet.Parse

Methods

lift :: Quote m => (String -> CloseStyle) -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => (String -> CloseStyle) -> Code m (String -> CloseStyle) #

Foldable (UChar :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UChar m -> m #

foldMap :: Monoid m => (a -> m) -> UChar a -> m #

foldMap' :: Monoid m => (a -> m) -> UChar a -> m #

foldr :: (a -> b -> b) -> b -> UChar a -> b #

foldr' :: (a -> b -> b) -> b -> UChar a -> b #

foldl :: (b -> a -> b) -> b -> UChar a -> b #

foldl' :: (b -> a -> b) -> b -> UChar a -> b #

foldr1 :: (a -> a -> a) -> UChar a -> a #

foldl1 :: (a -> a -> a) -> UChar a -> a #

toList :: UChar a -> [a] #

null :: UChar a -> Bool #

length :: UChar a -> Int #

elem :: Eq a => a -> UChar a -> Bool #

maximum :: Ord a => UChar a -> a #

minimum :: Ord a => UChar a -> a #

sum :: Num a => UChar a -> a #

product :: Num a => UChar a -> a #

Traversable (UChar :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UChar a -> f (UChar b) #

sequenceA :: Applicative f => UChar (f a) -> f (UChar a) #

mapM :: Monad m => (a -> m b) -> UChar a -> m (UChar b) #

sequence :: Monad m => UChar (m a) -> m (UChar a) #

ToMarkup (NonEmpty Char) 
Instance details

Defined in Text.Blaze

ToValue (NonEmpty Char) 
Instance details

Defined in Text.Blaze

QueryKeyLike [Char] 
Instance details

Defined in Network.HTTP.Types.QueryLike

Methods

toQueryKey :: [Char] -> ByteString #

QueryValueLike [Char] 
Instance details

Defined in Network.HTTP.Types.QueryLike

PersistField [Char] 
Instance details

Defined in Database.Persist.Class.PersistField

PersistFieldSql [Char] 
Instance details

Defined in Database.Persist.Sql.Class

Methods

sqlType :: Proxy [Char] -> SqlType #

ToAttributes [(String, String)] 
Instance details

Defined in Text.Hamlet

Methods

toAttributes :: [(String, String)] -> [(Text, Text)] #

ToCss [Char] 
Instance details

Defined in Text.Internal.Css

Methods

toCss :: [Char] -> Builder #

RawJS [Char] 
Instance details

Defined in Text.Julius

Methods

rawJS :: [Char] -> RawJavascript #

ToFlushBuilder (Flush String) 
Instance details

Defined in Yesod.Core.Content

ToTypedContent [Char] 
Instance details

Defined in Yesod.Core.Content

Functor (URec Char :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec Char a -> URec Char b #

(<$) :: a -> URec Char b -> URec Char a #

ToAttributes (String, String) 
Instance details

Defined in Text.Hamlet

Methods

toAttributes :: (String, String) -> [(Text, Text)] #

Generic (URec Char p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Char p) :: Type -> Type #

Methods

from :: URec Char p -> Rep (URec Char p) x #

to :: Rep (URec Char p) x -> URec Char p #

Show (URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> URec Char p -> ShowS #

show :: URec Char p -> String #

showList :: [URec Char p] -> ShowS #

Eq (URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: URec Char p -> URec Char p -> Bool #

(/=) :: URec Char p -> URec Char p -> Bool #

Ord (URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: URec Char p -> URec Char p -> Ordering #

(<) :: URec Char p -> URec Char p -> Bool #

(<=) :: URec Char p -> URec Char p -> Bool #

(>) :: URec Char p -> URec Char p -> Bool #

(>=) :: URec Char p -> URec Char p -> Bool #

max :: URec Char p -> URec Char p -> URec Char p #

min :: URec Char p -> URec Char p -> URec Char p #

type NatNumMaxBound Char 
Instance details

Defined in Basement.Nat

type NatNumMaxBound Char = 1114111
type Difference Char 
Instance details

Defined in Basement.Numerical.Subtractive

type PrimSize Char 
Instance details

Defined in Basement.PrimType

type PrimSize Char = 4
newtype Vector Char 
Instance details

Defined in Data.Vector.Unboxed.Base

data URec Char (p :: k)

Used for marking occurrences of Char#

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

data URec Char (p :: k) = UChar {}
newtype MVector s Char 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Char = MV_Char (MVector s Char)
type Compare (a :: Char) (b :: Char) 
Instance details

Defined in Data.Type.Ord

type Compare (a :: Char) (b :: Char) = CmpChar a b
type Rep1 (URec Char :: k -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep1 (URec Char :: k -> Type) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UChar" 'PrefixI 'True) (S1 ('MetaSel ('Just "uChar#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UChar :: k -> Type)))
type Rep (URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep (URec Char p) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UChar" 'PrefixI 'True) (S1 ('MetaSel ('Just "uChar#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UChar :: Type -> Type)))

data Double #

Double-precision floating point numbers. It is desirable that this type be at least equal in range and precision to the IEEE double-precision type.

Instances

Instances details
FromJSON Double 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSONKey Double 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON Double 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSONKey Double 
Instance details

Defined in Data.Aeson.Types.ToJSON

Storable Double

Since: base-2.1

Instance details

Defined in Foreign.Storable

Floating Double

Since: base-2.1

Instance details

Defined in GHC.Float

RealFloat Double

Since: base-2.1

Instance details

Defined in GHC.Float

Read Double

Since: base-2.1

Instance details

Defined in GHC.Read

Subtractive Double 
Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference Double #

PrimType Double 
Instance details

Defined in Basement.PrimType

Associated Types

type PrimSize Double :: Nat #

ToMarkup Double 
Instance details

Defined in Text.Blaze

ToValue Double 
Instance details

Defined in Text.Blaze

Default Double 
Instance details

Defined in Data.Default.Class

Methods

def :: Double #

NFData Double 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Double -> () #

ToLogStr Double

Since: fast-logger-2.4.14

Instance details

Defined in System.Log.FastLogger.LogStr

Methods

toLogStr :: Double -> LogStr #

Eq Double

Note that due to the presence of NaN, Double's Eq instance does not satisfy reflexivity.

>>> 0/0 == (0/0 :: Double)
False

Also note that Double's Eq instance does not satisfy substitutivity:

>>> 0 == (-0 :: Double)
True
>>> recip 0 == recip (-0 :: Double)
False
Instance details

Defined in GHC.Classes

Methods

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

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

Ord Double

Note that due to the presence of NaN, Double's Ord instance does not satisfy reflexivity.

>>> 0/0 <= (0/0 :: Double)
False

Also note that, due to the same, Ord's operator interactions are not respected by Double's instance:

>>> (0/0 :: Double) > 1
False
>>> compare (0/0 :: Double) 1
GT
Instance details

Defined in GHC.Classes

Hashable Double

Note: prior to hashable-1.3.0.0, hash 0.0 /= hash (-0.0)

The hash of NaN is not well defined.

Since: hashable-1.3.0.0

Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Double -> Int #

hash :: Double -> Int #

FromFormKey Double 
Instance details

Defined in Web.Internal.FormUrlEncoded

ToFormKey Double 
Instance details

Defined in Web.Internal.FormUrlEncoded

Methods

toFormKey :: Double -> Text #

FromHttpApiData Double 
Instance details

Defined in Web.Internal.HttpApiData

ToHttpApiData Double 
Instance details

Defined in Web.Internal.HttpApiData

PersistField Double 
Instance details

Defined in Database.Persist.Class.PersistField

PersistFieldSql Double 
Instance details

Defined in Database.Persist.Sql.Class

Prim Double 
Instance details

Defined in Data.Primitive.Types

UniformRange Double

See Floating point number caveats.

Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Double, Double) -> g -> m Double #

Unbox Double 
Instance details

Defined in Data.Vector.Unboxed.Base

Lift Double 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Double -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Double -> Code m Double #

Vector Vector Double 
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Double 
Instance details

Defined in Data.Vector.Unboxed.Base

Generic1 (URec Double :: k -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (URec Double) :: k -> Type #

Methods

from1 :: forall (a :: k0). URec Double a -> Rep1 (URec Double) a #

to1 :: forall (a :: k0). Rep1 (URec Double) a -> URec Double a #

Foldable (UDouble :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UDouble m -> m #

foldMap :: Monoid m => (a -> m) -> UDouble a -> m #

foldMap' :: Monoid m => (a -> m) -> UDouble a -> m #

foldr :: (a -> b -> b) -> b -> UDouble a -> b #

foldr' :: (a -> b -> b) -> b -> UDouble a -> b #

foldl :: (b -> a -> b) -> b -> UDouble a -> b #

foldl' :: (b -> a -> b) -> b -> UDouble a -> b #

foldr1 :: (a -> a -> a) -> UDouble a -> a #

foldl1 :: (a -> a -> a) -> UDouble a -> a #

toList :: UDouble a -> [a] #

null :: UDouble a -> Bool #

length :: UDouble a -> Int #

elem :: Eq a => a -> UDouble a -> Bool #

maximum :: Ord a => UDouble a -> a #

minimum :: Ord a => UDouble a -> a #

sum :: Num a => UDouble a -> a #

product :: Num a => UDouble a -> a #

Traversable (UDouble :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UDouble a -> f (UDouble b) #

sequenceA :: Applicative f => UDouble (f a) -> f (UDouble a) #

mapM :: Monad m => (a -> m b) -> UDouble a -> m (UDouble b) #

sequence :: Monad m => UDouble (m a) -> m (UDouble a) #

Functor (URec Double :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec Double a -> URec Double b #

(<$) :: a -> URec Double b -> URec Double a #

Generic (URec Double p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Double p) :: Type -> Type #

Methods

from :: URec Double p -> Rep (URec Double p) x #

to :: Rep (URec Double p) x -> URec Double p #

Show (URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> URec Double p -> ShowS #

show :: URec Double p -> String #

showList :: [URec Double p] -> ShowS #

Eq (URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: URec Double p -> URec Double p -> Bool #

(/=) :: URec Double p -> URec Double p -> Bool #

Ord (URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: URec Double p -> URec Double p -> Ordering #

(<) :: URec Double p -> URec Double p -> Bool #

(<=) :: URec Double p -> URec Double p -> Bool #

(>) :: URec Double p -> URec Double p -> Bool #

(>=) :: URec Double p -> URec Double p -> Bool #

max :: URec Double p -> URec Double p -> URec Double p #

min :: URec Double p -> URec Double p -> URec Double p #

type Difference Double 
Instance details

Defined in Basement.Numerical.Subtractive

type PrimSize Double 
Instance details

Defined in Basement.PrimType

type PrimSize Double = 8
newtype Vector Double 
Instance details

Defined in Data.Vector.Unboxed.Base

data URec Double (p :: k)

Used for marking occurrences of Double#

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

data URec Double (p :: k) = UDouble {}
newtype MVector s Double 
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep1 (URec Double :: k -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep1 (URec Double :: k -> Type) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UDouble" 'PrefixI 'True) (S1 ('MetaSel ('Just "uDouble#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UDouble :: k -> Type)))
type Rep (URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep (URec Double p) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UDouble" 'PrefixI 'True) (S1 ('MetaSel ('Just "uDouble#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UDouble :: Type -> Type)))

data Float #

Single-precision floating point numbers. It is desirable that this type be at least equal in range and precision to the IEEE single-precision type.

Instances

Instances details
FromJSON Float 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSONKey Float 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON Float 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSONKey Float 
Instance details

Defined in Data.Aeson.Types.ToJSON

Storable Float

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Float -> Int #

alignment :: Float -> Int #

peekElemOff :: Ptr Float -> Int -> IO Float #

pokeElemOff :: Ptr Float -> Int -> Float -> IO () #

peekByteOff :: Ptr b -> Int -> IO Float #

pokeByteOff :: Ptr b -> Int -> Float -> IO () #

peek :: Ptr Float -> IO Float #

poke :: Ptr Float -> Float -> IO () #

Floating Float

Since: base-2.1

Instance details

Defined in GHC.Float

RealFloat Float

Since: base-2.1

Instance details

Defined in GHC.Float

Read Float

Since: base-2.1

Instance details

Defined in GHC.Read

Subtractive Float 
Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference Float #

Methods

(-) :: Float -> Float -> Difference Float #

PrimType Float 
Instance details

Defined in Basement.PrimType

Associated Types

type PrimSize Float :: Nat #

ToMarkup Float 
Instance details

Defined in Text.Blaze

ToValue Float 
Instance details

Defined in Text.Blaze

Default Float 
Instance details

Defined in Data.Default.Class

Methods

def :: Float #

NFData Float 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Float -> () #

ToLogStr Float

Since: fast-logger-2.4.14

Instance details

Defined in System.Log.FastLogger.LogStr

Methods

toLogStr :: Float -> LogStr #

Eq Float

Note that due to the presence of NaN, Float's Eq instance does not satisfy reflexivity.

>>> 0/0 == (0/0 :: Float)
False

Also note that Float's Eq instance does not satisfy extensionality:

>>> 0 == (-0 :: Float)
True
>>> recip 0 == recip (-0 :: Float)
False
Instance details

Defined in GHC.Classes

Methods

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

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

Ord Float

Note that due to the presence of NaN, Float's Ord instance does not satisfy reflexivity.

>>> 0/0 <= (0/0 :: Float)
False

Also note that, due to the same, Ord's operator interactions are not respected by Float's instance:

>>> (0/0 :: Float) > 1
False
>>> compare (0/0 :: Float) 1
GT
Instance details

Defined in GHC.Classes

Methods

compare :: Float -> Float -> Ordering #

(<) :: Float -> Float -> Bool #

(<=) :: Float -> Float -> Bool #

(>) :: Float -> Float -> Bool #

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

max :: Float -> Float -> Float #

min :: Float -> Float -> Float #

Hashable Float

Note: prior to hashable-1.3.0.0, hash 0.0 /= hash (-0.0)

The hash of NaN is not well defined.

Since: hashable-1.3.0.0

Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Float -> Int #

hash :: Float -> Int #

FromFormKey Float 
Instance details

Defined in Web.Internal.FormUrlEncoded

ToFormKey Float 
Instance details

Defined in Web.Internal.FormUrlEncoded

Methods

toFormKey :: Float -> Text #

FromHttpApiData Float 
Instance details

Defined in Web.Internal.HttpApiData

ToHttpApiData Float 
Instance details

Defined in Web.Internal.HttpApiData

Prim Float 
Instance details

Defined in Data.Primitive.Types

UniformRange Float

See Floating point number caveats.

Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Float, Float) -> g -> m Float #

Unbox Float 
Instance details

Defined in Data.Vector.Unboxed.Base

Lift Float 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Float -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Float -> Code m Float #

Vector Vector Float 
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Float 
Instance details

Defined in Data.Vector.Unboxed.Base

Generic1 (URec Float :: k -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (URec Float) :: k -> Type #

Methods

from1 :: forall (a :: k0). URec Float a -> Rep1 (URec Float) a #

to1 :: forall (a :: k0). Rep1 (URec Float) a -> URec Float a #

Foldable (UFloat :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UFloat m -> m #

foldMap :: Monoid m => (a -> m) -> UFloat a -> m #

foldMap' :: Monoid m => (a -> m) -> UFloat a -> m #

foldr :: (a -> b -> b) -> b -> UFloat a -> b #

foldr' :: (a -> b -> b) -> b -> UFloat a -> b #

foldl :: (b -> a -> b) -> b -> UFloat a -> b #

foldl' :: (b -> a -> b) -> b -> UFloat a -> b #

foldr1 :: (a -> a -> a) -> UFloat a -> a #

foldl1 :: (a -> a -> a) -> UFloat a -> a #

toList :: UFloat a -> [a] #

null :: UFloat a -> Bool #

length :: UFloat a -> Int #

elem :: Eq a => a -> UFloat a -> Bool #

maximum :: Ord a => UFloat a -> a #

minimum :: Ord a => UFloat a -> a #

sum :: Num a => UFloat a -> a #

product :: Num a => UFloat a -> a #

Traversable (UFloat :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UFloat a -> f (UFloat b) #

sequenceA :: Applicative f => UFloat (f a) -> f (UFloat a) #

mapM :: Monad m => (a -> m b) -> UFloat a -> m (UFloat b) #

sequence :: Monad m => UFloat (m a) -> m (UFloat a) #

Functor (URec Float :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec Float a -> URec Float b #

(<$) :: a -> URec Float b -> URec Float a #

Generic (URec Float p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Float p) :: Type -> Type #

Methods

from :: URec Float p -> Rep (URec Float p) x #

to :: Rep (URec Float p) x -> URec Float p #

Show (URec Float p) 
Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> URec Float p -> ShowS #

show :: URec Float p -> String #

showList :: [URec Float p] -> ShowS #

Eq (URec Float p) 
Instance details

Defined in GHC.Generics

Methods

(==) :: URec Float p -> URec Float p -> Bool #

(/=) :: URec Float p -> URec Float p -> Bool #

Ord (URec Float p) 
Instance details

Defined in GHC.Generics

Methods

compare :: URec Float p -> URec Float p -> Ordering #

(<) :: URec Float p -> URec Float p -> Bool #

(<=) :: URec Float p -> URec Float p -> Bool #

(>) :: URec Float p -> URec Float p -> Bool #

(>=) :: URec Float p -> URec Float p -> Bool #

max :: URec Float p -> URec Float p -> URec Float p #

min :: URec Float p -> URec Float p -> URec Float p #

type Difference Float 
Instance details

Defined in Basement.Numerical.Subtractive

type PrimSize Float 
Instance details

Defined in Basement.PrimType

type PrimSize Float = 4
newtype Vector Float 
Instance details

Defined in Data.Vector.Unboxed.Base

data URec Float (p :: k)

Used for marking occurrences of Float#

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

data URec Float (p :: k) = UFloat {}
newtype MVector s Float 
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep1 (URec Float :: k -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep1 (URec Float :: k -> Type) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UFloat" 'PrefixI 'True) (S1 ('MetaSel ('Just "uFloat#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UFloat :: k -> Type)))
type Rep (URec Float p) 
Instance details

Defined in GHC.Generics

type Rep (URec Float p) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UFloat" 'PrefixI 'True) (S1 ('MetaSel ('Just "uFloat#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UFloat :: Type -> Type)))

data Int #

A fixed-precision integer type with at least the range [-2^29 .. 2^29-1]. The exact range for a given implementation can be determined by using minBound and maxBound from the Bounded class.

Instances

Instances details
FromJSON Int 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSONKey Int 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON Int 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSONKey Int 
Instance details

Defined in Data.Aeson.Types.ToJSON

Storable Int

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Int -> Int #

alignment :: Int -> Int #

peekElemOff :: Ptr Int -> Int -> IO Int #

pokeElemOff :: Ptr Int -> Int -> Int -> IO () #

peekByteOff :: Ptr b -> Int -> IO Int #

pokeByteOff :: Ptr b -> Int -> Int -> IO () #

peek :: Ptr Int -> IO Int #

poke :: Ptr Int -> Int -> IO () #

Bounded Int

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: Int #

maxBound :: Int #

Enum Int

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

succ :: Int -> Int #

pred :: Int -> Int #

toEnum :: Int -> Int #

fromEnum :: Int -> Int #

enumFrom :: Int -> [Int] #

enumFromThen :: Int -> Int -> [Int] #

enumFromTo :: Int -> Int -> [Int] #

enumFromThenTo :: Int -> Int -> Int -> [Int] #

Num Int

Since: base-2.1

Instance details

Defined in GHC.Num

Methods

(+) :: Int -> Int -> Int #

(-) :: Int -> Int -> Int #

(*) :: Int -> Int -> Int #

negate :: Int -> Int #

abs :: Int -> Int #

signum :: Int -> Int #

fromInteger :: Integer -> Int #

Read Int

Since: base-2.1

Instance details

Defined in GHC.Read

Integral Int

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

quot :: Int -> Int -> Int #

rem :: Int -> Int -> Int #

div :: Int -> Int -> Int #

mod :: Int -> Int -> Int #

quotRem :: Int -> Int -> (Int, Int) #

divMod :: Int -> Int -> (Int, Int) #

toInteger :: Int -> Integer #

Real Int

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

toRational :: Int -> Rational #

Show Int

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> Int -> ShowS #

show :: Int -> String #

showList :: [Int] -> ShowS #

Subtractive Int 
Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference Int #

Methods

(-) :: Int -> Int -> Difference Int #

PrimMemoryComparable Int 
Instance details

Defined in Basement.PrimType

PrimType Int 
Instance details

Defined in Basement.PrimType

Associated Types

type PrimSize Int :: Nat #

ToMarkup Int 
Instance details

Defined in Text.Blaze

ToValue Int 
Instance details

Defined in Text.Blaze

Default Int 
Instance details

Defined in Data.Default.Class

Methods

def :: Int #

NFData Int 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Int -> () #

ToLogStr Int

Since: fast-logger-2.4.14

Instance details

Defined in System.Log.FastLogger.LogStr

Methods

toLogStr :: Int -> LogStr #

Eq Int 
Instance details

Defined in GHC.Classes

Methods

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

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

Ord Int 
Instance details

Defined in GHC.Classes

Methods

compare :: Int -> Int -> Ordering #

(<) :: Int -> Int -> Bool #

(<=) :: Int -> Int -> Bool #

(>) :: Int -> Int -> Bool #

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

max :: Int -> Int -> Int #

min :: Int -> Int -> Int #

Hashable Int 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int -> Int #

hash :: Int -> Int #

FromFormKey Int 
Instance details

Defined in Web.Internal.FormUrlEncoded

ToFormKey Int 
Instance details

Defined in Web.Internal.FormUrlEncoded

Methods

toFormKey :: Int -> Text #

FromHttpApiData Int 
Instance details

Defined in Web.Internal.HttpApiData

ToHttpApiData Int 
Instance details

Defined in Web.Internal.HttpApiData

PathPiece Int 
Instance details

Defined in Web.PathPieces

PersistField Int 
Instance details

Defined in Database.Persist.Class.PersistField

PersistFieldSql Int 
Instance details

Defined in Database.Persist.Sql.Class

Methods

sqlType :: Proxy Int -> SqlType #

Prim Int 
Instance details

Defined in Data.Primitive.Types

Uniform Int 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Int #

UniformRange Int 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Int, Int) -> g -> m Int #

ByteSource Int 
Instance details

Defined in Data.UUID.Types.Internal.Builder

Methods

(/-/) :: ByteSink Int g -> Int -> g

Unbox Int 
Instance details

Defined in Data.Vector.Unboxed.Base

Lift Int 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Int -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Int -> Code m Int #

Vector Vector Int 
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Int 
Instance details

Defined in Data.Vector.Unboxed.Base

SymbolToField "length" Note Int Source # 
Instance details

Defined in Model

SymbolToField "seq" BookmarkTag Int Source # 
Instance details

Defined in Model

Generic1 (URec Int :: k -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (URec Int) :: k -> Type #

Methods

from1 :: forall (a :: k0). URec Int a -> Rep1 (URec Int) a #

to1 :: forall (a :: k0). Rep1 (URec Int) a -> URec Int a #

Foldable (UInt :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UInt m -> m #

foldMap :: Monoid m => (a -> m) -> UInt a -> m #

foldMap' :: Monoid m => (a -> m) -> UInt a -> m #

foldr :: (a -> b -> b) -> b -> UInt a -> b #

foldr' :: (a -> b -> b) -> b -> UInt a -> b #

foldl :: (b -> a -> b) -> b -> UInt a -> b #

foldl' :: (b -> a -> b) -> b -> UInt a -> b #

foldr1 :: (a -> a -> a) -> UInt a -> a #

foldl1 :: (a -> a -> a) -> UInt a -> a #

toList :: UInt a -> [a] #

null :: UInt a -> Bool #

length :: UInt a -> Int #

elem :: Eq a => a -> UInt a -> Bool #

maximum :: Ord a => UInt a -> a #

minimum :: Ord a => UInt a -> a #

sum :: Num a => UInt a -> a #

product :: Num a => UInt a -> a #

Traversable (UInt :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UInt a -> f (UInt b) #

sequenceA :: Applicative f => UInt (f a) -> f (UInt a) #

mapM :: Monad m => (a -> m b) -> UInt a -> m (UInt b) #

sequence :: Monad m => UInt (m a) -> m (UInt a) #

Functor (URec Int :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec Int a -> URec Int b #

(<$) :: a -> URec Int b -> URec Int a #

Generic (URec Int p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Int p) :: Type -> Type #

Methods

from :: URec Int p -> Rep (URec Int p) x #

to :: Rep (URec Int p) x -> URec Int p #

Show (URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> URec Int p -> ShowS #

show :: URec Int p -> String #

showList :: [URec Int p] -> ShowS #

Eq (URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: URec Int p -> URec Int p -> Bool #

(/=) :: URec Int p -> URec Int p -> Bool #

Ord (URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: URec Int p -> URec Int p -> Ordering #

(<) :: URec Int p -> URec Int p -> Bool #

(<=) :: URec Int p -> URec Int p -> Bool #

(>) :: URec Int p -> URec Int p -> Bool #

(>=) :: URec Int p -> URec Int p -> Bool #

max :: URec Int p -> URec Int p -> URec Int p #

min :: URec Int p -> URec Int p -> URec Int p #

type NatNumMaxBound Int 
Instance details

Defined in Basement.Nat

type Difference Int 
Instance details

Defined in Basement.Numerical.Subtractive

type PrimSize Int 
Instance details

Defined in Basement.PrimType

type PrimSize Int = 8
newtype Vector Int 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector Int = V_Int (Vector Int)
data URec Int (p :: k)

Used for marking occurrences of Int#

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

data URec Int (p :: k) = UInt {}
type ByteSink Int g 
Instance details

Defined in Data.UUID.Types.Internal.Builder

type ByteSink Int g = Takes4Bytes g
newtype MVector s Int 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Int = MV_Int (MVector s Int)
type Rep1 (URec Int :: k -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep1 (URec Int :: k -> Type) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UInt" 'PrefixI 'True) (S1 ('MetaSel ('Just "uInt#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UInt :: k -> Type)))
type Rep (URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep (URec Int p) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UInt" 'PrefixI 'True) (S1 ('MetaSel ('Just "uInt#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UInt :: Type -> Type)))

data Word #

A Word is an unsigned integral type, with the same size as Int.

Instances

Instances details
FromJSON Word 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSONKey Word 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON Word 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSONKey Word 
Instance details

Defined in Data.Aeson.Types.ToJSON

Storable Word

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Word -> Int #

alignment :: Word -> Int #

peekElemOff :: Ptr Word -> Int -> IO Word #

pokeElemOff :: Ptr Word -> Int -> Word -> IO () #

peekByteOff :: Ptr b -> Int -> IO Word #

pokeByteOff :: Ptr b -> Int -> Word -> IO () #

peek :: Ptr Word -> IO Word #

poke :: Ptr Word -> Word -> IO () #

Bounded Word

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Word

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

succ :: Word -> Word #

pred :: Word -> Word #

toEnum :: Int -> Word #

fromEnum :: Word -> Int #

enumFrom :: Word -> [Word] #

enumFromThen :: Word -> Word -> [Word] #

enumFromTo :: Word -> Word -> [Word] #

enumFromThenTo :: Word -> Word -> Word -> [Word] #

Num Word

Since: base-2.1

Instance details

Defined in GHC.Num

Methods

(+) :: Word -> Word -> Word #

(-) :: Word -> Word -> Word #

(*) :: Word -> Word -> Word #

negate :: Word -> Word #

abs :: Word -> Word #

signum :: Word -> Word #

fromInteger :: Integer -> Word #

Read Word

Since: base-4.5.0.0

Instance details

Defined in GHC.Read

Integral Word

Since: base-2.1

Instance details

Defined in GHC.Real

Methods

quot :: Word -> Word -> Word #

rem :: Word -> Word -> Word #

div :: Word -> Word -> Word #

mod :: Word -> Word -> Word #

quotRem :: Word -> Word -> (Word, Word) #

divMod :: Word -> Word -> (Word, Word) #

toInteger :: Word -> Integer #

Real Word

Since: base-2.1

Instance details

Defined in GHC.Real

Methods

toRational :: Word -> Rational #

Show Word

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> Word -> ShowS #

show :: Word -> String #

showList :: [Word] -> ShowS #

BitOps Word 
Instance details

Defined in Basement.Bits

FiniteBitsOps Word 
Instance details

Defined in Basement.Bits

Subtractive Word 
Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference Word #

Methods

(-) :: Word -> Word -> Difference Word #

PrimMemoryComparable Word 
Instance details

Defined in Basement.PrimType

PrimType Word 
Instance details

Defined in Basement.PrimType

Associated Types

type PrimSize Word :: Nat #

ToMarkup Word 
Instance details

Defined in Text.Blaze

ToValue Word 
Instance details

Defined in Text.Blaze

Default Word 
Instance details

Defined in Data.Default.Class

Methods

def :: Word #

NFData Word 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Word -> () #

ToLogStr Word

Since: fast-logger-2.4.14

Instance details

Defined in System.Log.FastLogger.LogStr

Methods

toLogStr :: Word -> LogStr #

Eq Word 
Instance details

Defined in GHC.Classes

Methods

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

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

Ord Word 
Instance details

Defined in GHC.Classes

Methods

compare :: Word -> Word -> Ordering #

(<) :: Word -> Word -> Bool #

(<=) :: Word -> Word -> Bool #

(>) :: Word -> Word -> Bool #

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

max :: Word -> Word -> Word #

min :: Word -> Word -> Word #

Hashable Word 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word -> Int #

hash :: Word -> Int #

FromFormKey Word 
Instance details

Defined in Web.Internal.FormUrlEncoded

ToFormKey Word 
Instance details

Defined in Web.Internal.FormUrlEncoded

Methods

toFormKey :: Word -> Text #

FromHttpApiData Word 
Instance details

Defined in Web.Internal.HttpApiData

ToHttpApiData Word 
Instance details

Defined in Web.Internal.HttpApiData

PathPiece Word 
Instance details

Defined in Web.PathPieces

PersistField Word 
Instance details

Defined in Database.Persist.Class.PersistField

PersistFieldSql Word 
Instance details

Defined in Database.Persist.Sql.Class

Methods

sqlType :: Proxy Word -> SqlType #

Prim Word 
Instance details

Defined in Data.Primitive.Types

Uniform Word 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Word #

UniformRange Word 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Word, Word) -> g -> m Word #

Unbox Word 
Instance details

Defined in Data.Vector.Unboxed.Base

Lift Word 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Word -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Word -> Code m Word #

Vector Vector Word 
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Word 
Instance details

Defined in Data.Vector.Unboxed.Base

Generic1 (URec Word :: k -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (URec Word) :: k -> Type #

Methods

from1 :: forall (a :: k0). URec Word a -> Rep1 (URec Word) a #

to1 :: forall (a :: k0). Rep1 (URec Word) a -> URec Word a #

Foldable (UWord :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UWord m -> m #

foldMap :: Monoid m => (a -> m) -> UWord a -> m #

foldMap' :: Monoid m => (a -> m) -> UWord a -> m #

foldr :: (a -> b -> b) -> b -> UWord a -> b #

foldr' :: (a -> b -> b) -> b -> UWord a -> b #

foldl :: (b -> a -> b) -> b -> UWord a -> b #

foldl' :: (b -> a -> b) -> b -> UWord a -> b #

foldr1 :: (a -> a -> a) -> UWord a -> a #

foldl1 :: (a -> a -> a) -> UWord a -> a #

toList :: UWord a -> [a] #

null :: UWord a -> Bool #

length :: UWord a -> Int #

elem :: Eq a => a -> UWord a -> Bool #

maximum :: Ord a => UWord a -> a #

minimum :: Ord a => UWord a -> a #

sum :: Num a => UWord a -> a #

product :: Num a => UWord a -> a #

Traversable (UWord :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UWord a -> f (UWord b) #

sequenceA :: Applicative f => UWord (f a) -> f (UWord a) #

mapM :: Monad m => (a -> m b) -> UWord a -> m (UWord b) #

sequence :: Monad m => UWord (m a) -> m (UWord a) #

Functor (URec Word :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec Word a -> URec Word b #

(<$) :: a -> URec Word b -> URec Word a #

Generic (URec Word p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Word p) :: Type -> Type #

Methods

from :: URec Word p -> Rep (URec Word p) x #

to :: Rep (URec Word p) x -> URec Word p #

Show (URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> URec Word p -> ShowS #

show :: URec Word p -> String #

showList :: [URec Word p] -> ShowS #

Eq (URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: URec Word p -> URec Word p -> Bool #

(/=) :: URec Word p -> URec Word p -> Bool #

Ord (URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: URec Word p -> URec Word p -> Ordering #

(<) :: URec Word p -> URec Word p -> Bool #

(<=) :: URec Word p -> URec Word p -> Bool #

(>) :: URec Word p -> URec Word p -> Bool #

(>=) :: URec Word p -> URec Word p -> Bool #

max :: URec Word p -> URec Word p -> URec Word p #

min :: URec Word p -> URec Word p -> URec Word p #

type NatNumMaxBound Word 
Instance details

Defined in Basement.Nat

type Difference Word 
Instance details

Defined in Basement.Numerical.Subtractive

type PrimSize Word 
Instance details

Defined in Basement.PrimType

type PrimSize Word = 8
newtype Vector Word 
Instance details

Defined in Data.Vector.Unboxed.Base

data URec Word (p :: k)

Used for marking occurrences of Word#

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

data URec Word (p :: k) = UWord {}
newtype MVector s Word 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Word = MV_Word (MVector s Word)
type Rep1 (URec Word :: k -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep1 (URec Word :: k -> Type) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UWord" 'PrefixI 'True) (S1 ('MetaSel ('Just "uWord#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UWord :: k -> Type)))
type Rep (URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep (URec Word p) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UWord" 'PrefixI 'True) (S1 ('MetaSel ('Just "uWord#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UWord :: Type -> Type)))

data Ordering #

Constructors

LT 
EQ 
GT 

Instances

Instances details
FromJSON Ordering 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON Ordering 
Instance details

Defined in Data.Aeson.Types.ToJSON

Monoid Ordering

Since: base-2.1

Instance details

Defined in GHC.Base

Semigroup Ordering

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Bounded Ordering

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Ordering

Since: base-2.1

Instance details

Defined in GHC.Enum

Generic Ordering 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Ordering :: Type -> Type #

Methods

from :: Ordering -> Rep Ordering x #

to :: Rep Ordering x -> Ordering #

Read Ordering

Since: base-2.1

Instance details

Defined in GHC.Read

Show Ordering

Since: base-2.1

Instance details

Defined in GHC.Show

Default Ordering 
Instance details

Defined in Data.Default.Class

Methods

def :: Ordering #

NFData Ordering 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Ordering -> () #

Eq Ordering 
Instance details

Defined in GHC.Classes

Ord Ordering 
Instance details

Defined in GHC.Classes

Hashable Ordering 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Ordering -> Int #

hash :: Ordering -> Int #

FromFormKey Ordering 
Instance details

Defined in Web.Internal.FormUrlEncoded

ToFormKey Ordering 
Instance details

Defined in Web.Internal.FormUrlEncoded

Methods

toFormKey :: Ordering -> Text #

FromHttpApiData Ordering 
Instance details

Defined in Web.Internal.HttpApiData

ToHttpApiData Ordering 
Instance details

Defined in Web.Internal.HttpApiData

type Rep Ordering

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

type Rep Ordering = D1 ('MetaData "Ordering" "GHC.Types" "ghc-prim" 'False) (C1 ('MetaCons "LT" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "EQ" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GT" 'PrefixI 'False) (U1 :: Type -> Type)))

data Maybe a #

The Maybe type encapsulates an optional value. A value of type Maybe a either contains a value of type a (represented as Just a), or it is empty (represented as Nothing). Using Maybe is a good way to deal with errors or exceptional cases without resorting to drastic measures such as error.

The Maybe type is also a monad. It is a simple kind of error monad, where all errors are represented by Nothing. A richer error monad can be built using the Either type.

Constructors

Nothing 
Just a 

Instances

Instances details
FromJSON1 Maybe 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (Maybe a) #

liftParseJSONList :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [Maybe a] #

liftOmittedField :: Maybe a -> Maybe (Maybe a) #

ToJSON1 Maybe 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> Maybe a -> Value #

liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [Maybe a] -> Value #

liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> Maybe a -> Encoding #

liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [Maybe a] -> Encoding #

liftOmitField :: (a -> Bool) -> Maybe a -> Bool #

MonadFail Maybe

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fail

Methods

fail :: String -> Maybe a #

Foldable Maybe

Since: base-2.1

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Maybe m -> m #

foldMap :: Monoid m => (a -> m) -> Maybe a -> m #

foldMap' :: Monoid m => (a -> m) -> Maybe a -> m #

foldr :: (a -> b -> b) -> b -> Maybe a -> b #

foldr' :: (a -> b -> b) -> b -> Maybe a -> b #

foldl :: (b -> a -> b) -> b -> Maybe a -> b #

foldl' :: (b -> a -> b) -> b -> Maybe a -> b #

foldr1 :: (a -> a -> a) -> Maybe a -> a #

foldl1 :: (a -> a -> a) -> Maybe a -> a #

toList :: Maybe a -> [a] #

null :: Maybe a -> Bool #

length :: Maybe a -> Int #

elem :: Eq a => a -> Maybe a -> Bool #

maximum :: Ord a => Maybe a -> a #

minimum :: Ord a => Maybe a -> a #

sum :: Num a => Maybe a -> a #

product :: Num a => Maybe a -> a #

Traversable Maybe

Since: base-2.1

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Maybe a -> f (Maybe b) #

sequenceA :: Applicative f => Maybe (f a) -> f (Maybe a) #

mapM :: Monad m => (a -> m b) -> Maybe a -> m (Maybe b) #

sequence :: Monad m => Maybe (m a) -> m (Maybe a) #

Alternative Maybe

Picks the leftmost Just value, or, alternatively, Nothing.

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

empty :: Maybe a #

(<|>) :: Maybe a -> Maybe a -> Maybe a #

some :: Maybe a -> Maybe [a] #

many :: Maybe a -> Maybe [a] #

Applicative Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: a -> Maybe a #

(<*>) :: Maybe (a -> b) -> Maybe a -> Maybe b #

liftA2 :: (a -> b -> c) -> Maybe a -> Maybe b -> Maybe c #

(*>) :: Maybe a -> Maybe b -> Maybe b #

(<*) :: Maybe a -> Maybe b -> Maybe a #

Functor Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

fmap :: (a -> b) -> Maybe a -> Maybe b #

(<$) :: a -> Maybe b -> Maybe a #

Monad Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

(>>=) :: Maybe a -> (a -> Maybe b) -> Maybe b #

(>>) :: Maybe a -> Maybe b -> Maybe b #

return :: a -> Maybe a #

MonadPlus Maybe

Picks the leftmost Just value, or, alternatively, Nothing.

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mzero :: Maybe a #

mplus :: Maybe a -> Maybe a -> Maybe a #

MonadFailure Maybe 
Instance details

Defined in Basement.Monad

Associated Types

type Failure Maybe #

Methods

mFail :: Failure Maybe -> Maybe () #

NFData1 Maybe

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Maybe a -> () #

MonadThrow Maybe 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e) => e -> Maybe a #

Hashable1 Maybe 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> Maybe a -> Int #

FoldableWithKey Maybe 
Instance details

Defined in Data.Key

Methods

toKeyedList :: Maybe a -> [(Key Maybe, a)] #

foldMapWithKey :: Monoid m => (Key Maybe -> a -> m) -> Maybe a -> m #

foldrWithKey :: (Key Maybe -> a -> b -> b) -> b -> Maybe a -> b #

foldlWithKey :: (b -> Key Maybe -> a -> b) -> b -> Maybe a -> b #

Indexable Maybe 
Instance details

Defined in Data.Key

Methods

index :: Maybe a -> Key Maybe -> a #

Keyed Maybe 
Instance details

Defined in Data.Key

Methods

mapWithKey :: (Key Maybe -> a -> b) -> Maybe a -> Maybe b #

Lookup Maybe 
Instance details

Defined in Data.Key

Methods

lookup :: Key Maybe -> Maybe a -> Maybe a #

TraversableWithKey Maybe 
Instance details

Defined in Data.Key

Methods

traverseWithKey :: Applicative f => (Key Maybe -> a -> f b) -> Maybe a -> f (Maybe b) #

mapWithKeyM :: Monad m => (Key Maybe -> a -> m b) -> Maybe a -> m (Maybe b) #

Zip Maybe 
Instance details

Defined in Data.Key

Methods

zipWith :: (a -> b -> c) -> Maybe a -> Maybe b -> Maybe c #

zip :: Maybe a -> Maybe b -> Maybe (a, b) #

zap :: Maybe (a -> b) -> Maybe a -> Maybe b #

ZipWithKey Maybe 
Instance details

Defined in Data.Key

Methods

zipWithKey :: (Key Maybe -> a -> b -> c) -> Maybe a -> Maybe b -> Maybe c #

zapWithKey :: Maybe (Key Maybe -> a -> b) -> Maybe a -> Maybe b #

Generic1 Maybe 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 Maybe :: k -> Type #

Methods

from1 :: forall (a :: k). Maybe a -> Rep1 Maybe a #

to1 :: forall (a :: k). Rep1 Maybe a -> Maybe a #

MonadBaseControl Maybe Maybe 
Instance details

Defined in Control.Monad.Trans.Control

Associated Types

type StM Maybe a #

SymbolToField "apiToken" User (Maybe HashedApiKey) Source # 
Instance details

Defined in Model

SymbolToField "archiveHref" Bookmark (Maybe Text) Source # 
Instance details

Defined in Model

(PersistEntity rec, PersistField typ, SymbolToField sym rec typ) => HasField (sym :: Symbol) (SqlExpr (Maybe (Entity rec))) (SqlExpr (Value (Maybe typ)))

This instance allows you to use record.field notation with GC 9.2's OverloadedRecordDot extension.

Example:

-- persistent model:
Person
    name         Text

BlogPost
    title        Text
    authorId     PersonId

-- query:

select $ do
    (p :& bp) <- from $
        table Person
        leftJoin table BlogPost
        on do
            \(p :& bp) ->
                just p.id ==. bp.authorId
    pure (p.name, bp.title)

The following forms are all equivalent:

blogPost :: SqlExpr (Maybe (Entity BlogPost))

blogPost ?. BlogPostTitle
blogPost ?. #title
blogPost.title

Since: esqueleto-3.5.4.0

Instance details

Defined in Database.Esqueleto.Internal.Internal

Methods

getField :: SqlExpr (Maybe (Entity rec)) -> SqlExpr (Value (Maybe typ)) #

(Selector s, FromHttpApiData c) => GFromForm (t :: k) (M1 S s (K1 i (Maybe c) :: Type -> Type)) 
Instance details

Defined in Web.Internal.FormUrlEncoded

Methods

gFromForm :: Proxy t -> FormOptions -> Form -> Either Text (M1 S s (K1 i (Maybe c)) x) #

(Selector s, ToHttpApiData c) => GToForm (t :: k) (M1 S s (K1 i (Maybe c) :: Type -> Type)) 
Instance details

Defined in Web.Internal.FormUrlEncoded

Methods

gToForm :: Proxy t -> FormOptions -> M1 S s (K1 i (Maybe c)) x -> Form #

Lift a => Lift (Maybe a :: Type) 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Maybe a -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Maybe a -> Code m (Maybe a) #

FromJSON a => FromJSON (Maybe a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON a => ToJSON (Maybe a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Semigroup a => Monoid (Maybe a)

Lift a semigroup into Maybe forming a Monoid according to http://en.wikipedia.org/wiki/Monoid: "Any semigroup S may be turned into a monoid simply by adjoining an element e not in S and defining e*e = e and e*s = s = s*e for all s ∈ S."

Since 4.11.0: constraint on inner a value generalised from Monoid to Semigroup.

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: Maybe a #

mappend :: Maybe a -> Maybe a -> Maybe a #

mconcat :: [Maybe a] -> Maybe a #

Semigroup a => Semigroup (Maybe a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: Maybe a -> Maybe a -> Maybe a #

sconcat :: NonEmpty (Maybe a) -> Maybe a #

stimes :: Integral b => b -> Maybe a -> Maybe a #

Generic (Maybe a) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Maybe a) :: Type -> Type #

Methods

from :: Maybe a -> Rep (Maybe a) x #

to :: Rep (Maybe a) x -> Maybe a #

SingKind a => SingKind (Maybe a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type DemoteRep (Maybe a)

Methods

fromSing :: forall (a0 :: Maybe a). Sing a0 -> DemoteRep (Maybe a)

Read a => Read (Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Read

Show a => Show (Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> Maybe a -> ShowS #

show :: Maybe a -> String #

showList :: [Maybe a] -> ShowS #

Default (Maybe a) 
Instance details

Defined in Data.Default.Class

Methods

def :: Maybe a #

NFData a => NFData (Maybe a) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Maybe a -> () #

ToAlias (SqlExpr (Maybe (Entity a))) 
Instance details

Defined in Database.Esqueleto.Experimental.ToAlias

Methods

toAlias :: SqlExpr (Maybe (Entity a)) -> SqlQuery (SqlExpr (Maybe (Entity a))) #

ToAliasReference (SqlExpr (Maybe (Entity a))) 
Instance details

Defined in Database.Esqueleto.Experimental.ToAliasReference

ToMaybe (SqlExpr (Maybe a)) 
Instance details

Defined in Database.Esqueleto.Experimental.ToMaybe

Associated Types

type ToMaybeT (SqlExpr (Maybe a)) #

Methods

toMaybe :: SqlExpr (Maybe a) -> ToMaybeT (SqlExpr (Maybe a)) #

FromPreprocess (SqlExpr (Maybe (Entity val))) => From (SqlExpr (Maybe (Entity val))) 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Methods

from_ :: SqlQuery (SqlExpr (Maybe (Entity val))) #

(PersistEntity val, BackendCompatible SqlBackend (PersistEntityBackend val)) => FromPreprocess (SqlExpr (Maybe (Entity val))) 
Instance details

Defined in Database.Esqueleto.Internal.Internal

SqlString a => SqlString (Maybe a)

Since: esqueleto-2.4.0

Instance details

Defined in Database.Esqueleto.Internal.Internal

Eq a => Eq (Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Maybe

Methods

(==) :: Maybe a -> Maybe a -> Bool #

(/=) :: Maybe a -> Maybe a -> Bool #

Ord a => Ord (Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Maybe

Methods

compare :: Maybe a -> Maybe a -> Ordering #

(<) :: Maybe a -> Maybe a -> Bool #

(<=) :: Maybe a -> Maybe a -> Bool #

(>) :: Maybe a -> Maybe a -> Bool #

(>=) :: Maybe a -> Maybe a -> Bool #

max :: Maybe a -> Maybe a -> Maybe a #

min :: Maybe a -> Maybe a -> Maybe a #

Hashable a => Hashable (Maybe a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Maybe a -> Int #

hash :: Maybe a -> Int #

FromHttpApiData a => FromHttpApiData (Maybe a)
>>> parseUrlPiece "Just 123" :: Either Text (Maybe Int)
Right (Just 123)
Instance details

Defined in Web.Internal.HttpApiData

ToHttpApiData a => ToHttpApiData (Maybe a)
>>> toUrlPiece (Just "Hello")
"just Hello"
Instance details

Defined in Web.Internal.HttpApiData

(QueryKeyLike k, QueryValueLike v) => QueryLike [Maybe (k, v)] 
Instance details

Defined in Network.HTTP.Types.QueryLike

Methods

toQuery :: [Maybe (k, v)] -> Query #

QueryValueLike a => QueryValueLike (Maybe a) 
Instance details

Defined in Network.HTTP.Types.QueryLike

MonoFoldable (Maybe a) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (Maybe a) -> m) -> Maybe a -> m #

ofoldr :: (Element (Maybe a) -> b -> b) -> b -> Maybe a -> b #

ofoldl' :: (a0 -> Element (Maybe a) -> a0) -> a0 -> Maybe a -> a0 #

otoList :: Maybe a -> [Element (Maybe a)] #

oall :: (Element (Maybe a) -> Bool) -> Maybe a -> Bool #

oany :: (Element (Maybe a) -> Bool) -> Maybe a -> Bool #

onull :: Maybe a -> Bool #

olength :: Maybe a -> Int #

olength64 :: Maybe a -> Int64 #

ocompareLength :: Integral i => Maybe a -> i -> Ordering #

otraverse_ :: Applicative f => (Element (Maybe a) -> f b) -> Maybe a -> f () #

ofor_ :: Applicative f => Maybe a -> (Element (Maybe a) -> f b) -> f () #

omapM_ :: Applicative m => (Element (Maybe a) -> m ()) -> Maybe a -> m () #

oforM_ :: Applicative m => Maybe a -> (Element (Maybe a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (Maybe a) -> m a0) -> a0 -> Maybe a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (Maybe a) -> m) -> Maybe a -> m #

ofoldr1Ex :: (Element (Maybe a) -> Element (Maybe a) -> Element (Maybe a)) -> Maybe a -> Element (Maybe a) #

ofoldl1Ex' :: (Element (Maybe a) -> Element (Maybe a) -> Element (Maybe a)) -> Maybe a -> Element (Maybe a) #

headEx :: Maybe a -> Element (Maybe a) #

lastEx :: Maybe a -> Element (Maybe a) #

unsafeHead :: Maybe a -> Element (Maybe a) #

unsafeLast :: Maybe a -> Element (Maybe a) #

maximumByEx :: (Element (Maybe a) -> Element (Maybe a) -> Ordering) -> Maybe a -> Element (Maybe a) #

minimumByEx :: (Element (Maybe a) -> Element (Maybe a) -> Ordering) -> Maybe a -> Element (Maybe a) #

oelem :: Element (Maybe a) -> Maybe a -> Bool #

onotElem :: Element (Maybe a) -> Maybe a -> Bool #

MonoFunctor (Maybe a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (Maybe a) -> Element (Maybe a)) -> Maybe a -> Maybe a #

MonoPointed (Maybe a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (Maybe a) -> Maybe a #

MonoTraversable (Maybe a) 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element (Maybe a) -> f (Element (Maybe a))) -> Maybe a -> f (Maybe a) #

omapM :: Applicative m => (Element (Maybe a) -> m (Element (Maybe a))) -> Maybe a -> m (Maybe a) #

PathPiece a => PathPiece (Maybe a) 
Instance details

Defined in Web.PathPieces

PersistField a => PersistField (Maybe a) 
Instance details

Defined in Database.Persist.Class.PersistField

PersistFieldSql a => PersistFieldSql (Maybe a) 
Instance details

Defined in Database.Persist.Sql.Class

Methods

sqlType :: Proxy (Maybe a) -> SqlType #

RawSql a => RawSql (Maybe a)

Since: persistent-1.0.1

Instance details

Defined in Database.Persist.Sql.Class

SingI ('Nothing :: Maybe a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

sing :: Sing 'Nothing

PersistEntity a => SqlSelect (SqlExpr (Maybe (Entity a))) (Maybe (Entity a))

You may return a possibly-NULL Entity from a select query.

Instance details

Defined in Database.Esqueleto.Internal.Internal

Each (Maybe a) (Maybe b) a b 
Instance details

Defined in Lens.Micro.Internal

Methods

each :: Traversal (Maybe a) (Maybe b) a b #

SingI a2 => SingI ('Just a2 :: Maybe a1)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

sing :: Sing ('Just a2)

type Failure Maybe 
Instance details

Defined in Basement.Monad

type Failure Maybe = ()
type Key Maybe 
Instance details

Defined in Data.Key

type Key Maybe = ()
type Rep1 Maybe

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

type Rep1 Maybe = D1 ('MetaData "Maybe" "GHC.Maybe" "base" 'False) (C1 ('MetaCons "Nothing" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Just" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))
type StM Maybe a 
Instance details

Defined in Control.Monad.Trans.Control

type StM Maybe a = a
type DemoteRep (Maybe a) 
Instance details

Defined in GHC.Generics

type DemoteRep (Maybe a) = Maybe (DemoteRep a)
type Rep (Maybe a)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

type Rep (Maybe a) = D1 ('MetaData "Maybe" "GHC.Maybe" "base" 'False) (C1 ('MetaCons "Nothing" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Just" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
data Sing (b :: Maybe a) 
Instance details

Defined in GHC.Generics

data Sing (b :: Maybe a) where
type ToMaybeT (SqlExpr (Maybe a)) 
Instance details

Defined in Database.Esqueleto.Experimental.ToMaybe

type Element (Maybe a) 
Instance details

Defined in Data.MonoTraversable

type Element (Maybe a) = a

data Integer #

Arbitrary precision integers. In contrast with fixed-size integral types such as Int, the Integer type represents the entire infinite range of integers.

Integers are stored in a kind of sign-magnitude form, hence do not expect two's complement form when using bit operations.

If the value is small (fit into an Int), IS constructor is used. Otherwise Integer and IN constructors are used to store a BigNat representing respectively the positive or the negative value magnitude.

Invariant: Integer and IN are used iff value doesn't fit in IS

Instances

Instances details
FromJSON Integer

This instance includes a bounds check to prevent maliciously large inputs to fill up the memory of the target system. You can newtype Scientific and provide your own instance using withScientific if you want to allow larger inputs.

Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSONKey Integer 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON Integer 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSONKey Integer 
Instance details

Defined in Data.Aeson.Types.ToJSON

Enum Integer

Since: base-2.1

Instance details

Defined in GHC.Enum

Num Integer

Since: base-2.1

Instance details

Defined in GHC.Num

Read Integer

Since: base-2.1

Instance details

Defined in GHC.Read

Integral Integer

Since: base-2.0.1

Instance details

Defined in GHC.Real

Real Integer

Since: base-2.0.1

Instance details

Defined in GHC.Real

Show Integer

Since: base-2.1

Instance details

Defined in GHC.Show

Subtractive Integer 
Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference Integer #

ToMarkup Integer 
Instance details

Defined in Text.Blaze

ToValue Integer 
Instance details

Defined in Text.Blaze

Default Integer 
Instance details

Defined in Data.Default.Class

Methods

def :: Integer #

NFData Integer 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Integer -> () #

ToLogStr Integer

Since: fast-logger-2.4.14

Instance details

Defined in System.Log.FastLogger.LogStr

Methods

toLogStr :: Integer -> LogStr #

Eq Integer 
Instance details

Defined in GHC.Num.Integer

Methods

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

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

Ord Integer 
Instance details

Defined in GHC.Num.Integer

Hashable Integer 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Integer -> Int #

hash :: Integer -> Int #

FromFormKey Integer 
Instance details

Defined in Web.Internal.FormUrlEncoded

ToFormKey Integer 
Instance details

Defined in Web.Internal.FormUrlEncoded

Methods

toFormKey :: Integer -> Text #

FromHttpApiData Integer 
Instance details

Defined in Web.Internal.HttpApiData

ToHttpApiData Integer 
Instance details

Defined in Web.Internal.HttpApiData

PathPiece Integer 
Instance details

Defined in Web.PathPieces

PersistField Rational 
Instance details

Defined in Database.Persist.Class.PersistField

PersistFieldSql Rational 
Instance details

Defined in Database.Persist.Sql.Class

UniformRange Integer 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Integer, Integer) -> g -> m Integer #

Lift Integer 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Integer -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Integer -> Code m Integer #

type Difference Integer 
Instance details

Defined in Basement.Numerical.Subtractive

data IO a #

A value of type IO a is a computation which, when performed, does some I/O before returning a value of type a.

There is really only one way to "perform" an I/O action: bind it to Main.main in your program. When your program is run, the I/O will be performed. It isn't possible to perform I/O from an arbitrary function, unless that function is itself in the IO monad and called at some point, directly or indirectly, from Main.main.

IO is a monad, so IO actions can be combined using either the do-notation or the >> and >>= operations from the Monad class.

Instances

Instances details
MonadFail IO

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fail

Methods

fail :: String -> IO a #

MonadIO IO

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.IO.Class

Methods

liftIO :: IO a -> IO a #

Alternative IO

Takes the first non-throwing IO action's result. empty throws an exception.

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

empty :: IO a #

(<|>) :: IO a -> IO a -> IO a #

some :: IO a -> IO [a] #

many :: IO a -> IO [a] #

Applicative IO

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: a -> IO a #

(<*>) :: IO (a -> b) -> IO a -> IO b #

liftA2 :: (a -> b -> c) -> IO a -> IO b -> IO c #

(*>) :: IO a -> IO b -> IO b #

(<*) :: IO a -> IO b -> IO a #

Functor IO

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

fmap :: (a -> b) -> IO a -> IO b #

(<$) :: a -> IO b -> IO a #

Monad IO

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

(>>=) :: IO a -> (a -> IO b) -> IO b #

(>>) :: IO a -> IO b -> IO b #

return :: a -> IO a #

MonadPlus IO

Takes the first non-throwing IO action's result. mzero throws an exception.

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

mzero :: IO a #

mplus :: IO a -> IO a -> IO a #

PrimMonad IO 
Instance details

Defined in Basement.Monad

Associated Types

type PrimState IO #

type PrimVar IO :: Type -> Type #

Methods

primitive :: (State# (PrimState IO) -> (# State# (PrimState IO), a #)) -> IO a #

primThrow :: Exception e => e -> IO a #

unPrimMonad :: IO a -> State# (PrimState IO) -> (# State# (PrimState IO), a #) #

primVarNew :: a -> IO (PrimVar IO a) #

primVarRead :: PrimVar IO a -> IO a #

primVarWrite :: PrimVar IO a -> a -> IO () #

MonadCatch IO 
Instance details

Defined in Control.Monad.Catch

Methods

catch :: (HasCallStack, Exception e) => IO a -> (e -> IO a) -> IO a #

MonadMask IO 
Instance details

Defined in Control.Monad.Catch

Methods

mask :: HasCallStack => ((forall a. IO a -> IO a) -> IO b) -> IO b #

uninterruptibleMask :: HasCallStack => ((forall a. IO a -> IO a) -> IO b) -> IO b #

generalBracket :: HasCallStack => IO a -> (a -> ExitCase b -> IO c) -> (a -> IO b) -> IO (b, c) #

MonadThrow IO 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e) => e -> IO a #

PrimBase IO 
Instance details

Defined in Control.Monad.Primitive

Methods

internal :: IO a -> State# (PrimState IO) -> (# State# (PrimState IO), a #) #

PrimMonad IO 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState IO #

Methods

primitive :: (State# (PrimState IO) -> (# State# (PrimState IO), a #)) -> IO a #

Quasi IO 
Instance details

Defined in Language.Haskell.TH.Syntax

Quote IO 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

newName :: String -> IO Name #

MonadUnliftIO IO 
Instance details

Defined in Control.Monad.IO.Unlift

Methods

withRunInIO :: ((forall a. IO a -> IO a) -> IO b) -> IO b #

MonadBaseControl IO IO 
Instance details

Defined in Control.Monad.Trans.Control

Associated Types

type StM IO a #

Methods

liftBaseWith :: (RunInBase IO IO -> IO a) -> IO a #

restoreM :: StM IO a -> IO a #

Monoid a => Monoid (IO a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

mempty :: IO a #

mappend :: IO a -> IO a -> IO a #

mconcat :: [IO a] -> IO a #

Semigroup a => Semigroup (IO a)

Since: base-4.10.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: IO a -> IO a -> IO a #

sconcat :: NonEmpty (IO a) -> IO a #

stimes :: Integral b => b -> IO a -> IO a #

Default a => Default (IO a) 
Instance details

Defined in Data.Default.Class

Methods

def :: IO a #

MonoFunctor (IO a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (IO a) -> Element (IO a)) -> IO a -> IO a #

MonoPointed (IO a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (IO a) -> IO a #

ToFlushBuilder builder => ToContent (ConduitT () builder (ResourceT IO) ()) 
Instance details

Defined in Yesod.Core.Content

Methods

toContent :: ConduitT () builder (ResourceT IO) () -> Content #

ToFlushBuilder builder => ToContent (SealedConduitT () builder (ResourceT IO) ()) 
Instance details

Defined in Yesod.Core.Content

Methods

toContent :: SealedConduitT () builder (ResourceT IO) () -> Content #

ToFlushBuilder builder => ToContent (Pipe () () builder () (ResourceT IO) ()) 
Instance details

Defined in Yesod.Core.Content

Methods

toContent :: Pipe () () builder () (ResourceT IO) () -> Content #

type PrimState IO 
Instance details

Defined in Basement.Monad

type PrimVar IO 
Instance details

Defined in Basement.Monad

type PrimState IO 
Instance details

Defined in Control.Monad.Primitive

type StM IO a 
Instance details

Defined in Control.Monad.Trans.Control

type StM IO a = a
type Element (IO a) 
Instance details

Defined in Data.MonoTraversable

type Element (IO a) = a

class Show a where #

Conversion of values to readable Strings.

Derived instances of Show have the following properties, which are compatible with derived instances of Read:

  • The result of show is a syntactically correct Haskell expression containing only constants, given the fixity declarations in force at the point where the type is declared. It contains only the constructor names defined in the data type, parentheses, and spaces. When labelled constructor fields are used, braces, commas, field names, and equal signs are also used.
  • If the constructor is defined to be an infix operator, then showsPrec will produce infix applications of the constructor.
  • the representation will be enclosed in parentheses if the precedence of the top-level constructor in x is less than d (associativity is ignored). Thus, if d is 0 then the result is never surrounded in parentheses; if d is 11 it is always surrounded in parentheses, unless it is an atomic expression.
  • If the constructor is defined using record syntax, then show will produce the record-syntax form, with the fields given in the same order as the original declaration.

For example, given the declarations

infixr 5 :^:
data Tree a =  Leaf a  |  Tree a :^: Tree a

the derived instance of Show is equivalent to

instance (Show a) => Show (Tree a) where

       showsPrec d (Leaf m) = showParen (d > app_prec) $
            showString "Leaf " . showsPrec (app_prec+1) m
         where app_prec = 10

       showsPrec d (u :^: v) = showParen (d > up_prec) $
            showsPrec (up_prec+1) u .
            showString " :^: "      .
            showsPrec (up_prec+1) v
         where up_prec = 5

Note that right-associativity of :^: is ignored. For example,

  • show (Leaf 1 :^: Leaf 2 :^: Leaf 3) produces the string "Leaf 1 :^: (Leaf 2 :^: Leaf 3)".

Minimal complete definition

showsPrec | show

Methods

showsPrec #

Arguments

:: Int

the operator precedence of the enclosing context (a number from 0 to 11). Function application has precedence 10.

-> a

the value to be converted to a String

-> ShowS 

Convert a value to a readable String.

showsPrec should satisfy the law

showsPrec d x r ++ s  ==  showsPrec d x (r ++ s)

Derived instances of Read and Show satisfy the following:

That is, readsPrec parses the string produced by showsPrec, and delivers the value that showsPrec started with.

show :: a -> String #

A specialised variant of showsPrec, using precedence context zero, and returning an ordinary String.

showList :: [a] -> ShowS #

The method showList is provided to allow the programmer to give a specialised way of showing lists of values. For example, this is used by the predefined Show instance of the Char type, where values of type String should be shown in double quotes, rather than between square brackets.

Instances

Instances details
Show Key 
Instance details

Defined in Data.Aeson.Key

Methods

showsPrec :: Int -> Key -> ShowS #

show :: Key -> String #

showList :: [Key] -> ShowS #

Show AesonException 
Instance details

Defined in Data.Aeson.Types.Internal

Show DotNetTime 
Instance details

Defined in Data.Aeson.Types.Internal

Show JSONPathElement 
Instance details

Defined in Data.Aeson.Types.Internal

Show Options 
Instance details

Defined in Data.Aeson.Types.Internal

Show SumEncoding 
Instance details

Defined in Data.Aeson.Types.Internal

Show Value

Since version 1.5.6.0 version object values are printed in lexicographic key order

>>> toJSON $ H.fromList [("a", True), ("z", False)]
Object (fromList [("a",Bool True),("z",Bool False)])
>>> toJSON $ H.fromList [("z", False), ("a", True)]
Object (fromList [("a",Bool True),("z",Bool False)])
Instance details

Defined in Data.Aeson.Types.Internal

Methods

showsPrec :: Int -> Value -> ShowS #

show :: Value -> String #

showList :: [Value] -> ShowS #

Show AsyncCancelled 
Instance details

Defined in Control.Concurrent.Async.Internal

Show ExceptionInLinkedThread 
Instance details

Defined in Control.Concurrent.Async.Internal

Show More 
Instance details

Defined in Data.Attoparsec.Internal.Types

Methods

showsPrec :: Int -> More -> ShowS #

show :: More -> String #

showList :: [More] -> ShowS #

Show Pos 
Instance details

Defined in Data.Attoparsec.Internal.Types

Methods

showsPrec :: Int -> Pos -> ShowS #

show :: Pos -> String #

showList :: [Pos] -> ShowS #

Show NestedAtomically

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Show NoMatchingContinuationPrompt

Since: base-4.18

Instance details

Defined in Control.Exception.Base

Show NoMethodError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Show NonTermination

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Show PatternMatchFail

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Show RecConError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Show RecSelError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Show RecUpdError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Show TypeError

Since: base-4.9.0.0

Instance details

Defined in Control.Exception.Base

Show ByteArray

Since: base-4.17.0.0

Instance details

Defined in Data.Array.Byte

Show All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

showsPrec :: Int -> All -> ShowS #

show :: All -> String #

showList :: [All] -> ShowS #

Show Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

showsPrec :: Int -> Any -> ShowS #

show :: Any -> String #

showList :: [Any] -> ShowS #

Show SomeTypeRep

Since: base-4.10.0.0

Instance details

Defined in Data.Typeable.Internal

Show Version

Since: base-2.1

Instance details

Defined in Data.Version

Show CBool 
Instance details

Defined in Foreign.C.Types

Methods

showsPrec :: Int -> CBool -> ShowS #

show :: CBool -> String #

showList :: [CBool] -> ShowS #

Show CChar 
Instance details

Defined in Foreign.C.Types

Methods

showsPrec :: Int -> CChar -> ShowS #

show :: CChar -> String #

showList :: [CChar] -> ShowS #

Show CClock 
Instance details

Defined in Foreign.C.Types

Show CDouble 
Instance details

Defined in Foreign.C.Types

Show CFloat 
Instance details

Defined in Foreign.C.Types

Show CInt 
Instance details

Defined in Foreign.C.Types

Methods

showsPrec :: Int -> CInt -> ShowS #

show :: CInt -> String #

showList :: [CInt] -> ShowS #

Show CIntMax 
Instance details

Defined in Foreign.C.Types

Show CIntPtr 
Instance details

Defined in Foreign.C.Types

Show CLLong 
Instance details

Defined in Foreign.C.Types

Show CLong 
Instance details

Defined in Foreign.C.Types

Methods

showsPrec :: Int -> CLong -> ShowS #

show :: CLong -> String #

showList :: [CLong] -> ShowS #

Show CPtrdiff 
Instance details

Defined in Foreign.C.Types

Show CSChar 
Instance details

Defined in Foreign.C.Types

Show CSUSeconds 
Instance details

Defined in Foreign.C.Types

Show CShort 
Instance details

Defined in Foreign.C.Types

Show CSigAtomic 
Instance details

Defined in Foreign.C.Types

Show CSize 
Instance details

Defined in Foreign.C.Types

Methods

showsPrec :: Int -> CSize -> ShowS #

show :: CSize -> String #

showList :: [CSize] -> ShowS #

Show CTime 
Instance details

Defined in Foreign.C.Types

Methods

showsPrec :: Int -> CTime -> ShowS #

show :: CTime -> String #

showList :: [CTime] -> ShowS #

Show CUChar 
Instance details

Defined in Foreign.C.Types

Show CUInt 
Instance details

Defined in Foreign.C.Types

Methods

showsPrec :: Int -> CUInt -> ShowS #

show :: CUInt -> String #

showList :: [CUInt] -> ShowS #

Show CUIntMax 
Instance details

Defined in Foreign.C.Types

Show CUIntPtr 
Instance details

Defined in Foreign.C.Types

Show CULLong 
Instance details

Defined in Foreign.C.Types

Show CULong 
Instance details

Defined in Foreign.C.Types

Show CUSeconds 
Instance details

Defined in Foreign.C.Types

Show CUShort 
Instance details

Defined in Foreign.C.Types

Show CWchar 
Instance details

Defined in Foreign.C.Types

Show Void

Since: base-4.8.0.0

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> Void -> ShowS #

show :: Void -> String #

showList :: [Void] -> ShowS #

Show ByteOrder

Since: base-4.11.0.0

Instance details

Defined in GHC.ByteOrder

Show BlockReason

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Show ThreadId

Since: base-4.2.0.0

Instance details

Defined in GHC.Conc.Sync

Show ThreadStatus

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Show ErrorCall

Since: base-4.0.0.0

Instance details

Defined in GHC.Exception

Show ArithException

Since: base-4.0.0.0

Instance details

Defined in GHC.Exception.Type

Show SomeException

Since: base-3.0

Instance details

Defined in GHC.Exception.Type

Show Associativity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Show DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show Fixity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Show SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show MaskingState

Since: base-4.3.0.0

Instance details

Defined in GHC.IO

Show SeekMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Device

Show AllocationLimitExceeded

Since: base-4.7.1.0

Instance details

Defined in GHC.IO.Exception

Show ArrayException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show AssertionFailed

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show AsyncException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show BlockedIndefinitelyOnMVar

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show BlockedIndefinitelyOnSTM

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show CompactionFailed

Since: base-4.10.0.0

Instance details

Defined in GHC.IO.Exception

Show Deadlock

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show ExitCode 
Instance details

Defined in GHC.IO.Exception

Show FixIOException

Since: base-4.11.0.0

Instance details

Defined in GHC.IO.Exception

Show IOErrorType

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show IOException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show SomeAsyncException

Since: base-4.7.0.0

Instance details

Defined in GHC.IO.Exception

Show BufferMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Handle.Types

Show Handle

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Handle.Types

Show HandleType

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Handle.Types

Show Newline

Since: base-4.3.0.0

Instance details

Defined in GHC.IO.Handle.Types

Show NewlineMode

Since: base-4.3.0.0

Instance details

Defined in GHC.IO.Handle.Types

Show IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

Show Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

showsPrec :: Int -> Int16 -> ShowS #

show :: Int16 -> String #

showList :: [Int16] -> ShowS #

Show Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

showsPrec :: Int -> Int32 -> ShowS #

show :: Int32 -> String #

showList :: [Int32] -> ShowS #

Show Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

showsPrec :: Int -> Int64 -> ShowS #

show :: Int64 -> String #

showList :: [Int64] -> ShowS #

Show Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

showsPrec :: Int -> Int8 -> ShowS #

show :: Int8 -> String #

showList :: [Int8] -> ShowS #

Show CCFlags

Since: base-4.8.0.0

Instance details

Defined in GHC.RTS.Flags

Show ConcFlags

Since: base-4.8.0.0

Instance details

Defined in GHC.RTS.Flags

Show DebugFlags

Since: base-4.8.0.0

Instance details

Defined in GHC.RTS.Flags

Show DoCostCentres

Since: base-4.8.0.0

Instance details

Defined in GHC.RTS.Flags

Show DoHeapProfile

Since: base-4.8.0.0

Instance details

Defined in GHC.RTS.Flags

Show DoTrace

Since: base-4.8.0.0

Instance details

Defined in GHC.RTS.Flags

Show GCFlags

Since: base-4.8.0.0

Instance details

Defined in GHC.RTS.Flags

Show GiveGCStats

Since: base-4.8.0.0

Instance details

Defined in GHC.RTS.Flags

Show IoSubSystem 
Instance details

Defined in GHC.RTS.Flags

Show MiscFlags

Since: base-4.8.0.0

Instance details

Defined in GHC.RTS.Flags

Show ParFlags

Since: base-4.8.0.0

Instance details

Defined in GHC.RTS.Flags

Show ProfFlags

Since: base-4.8.0.0

Instance details

Defined in GHC.RTS.Flags

Show RTSFlags

Since: base-4.8.0.0

Instance details

Defined in GHC.RTS.Flags

Show TickyFlags

Since: base-4.8.0.0

Instance details

Defined in GHC.RTS.Flags

Show TraceFlags

Since: base-4.8.0.0

Instance details

Defined in GHC.RTS.Flags

Show FractionalExponentBase 
Instance details

Defined in GHC.Real

Show CallStack

Since: base-4.9.0.0

Instance details

Defined in GHC.Show

Show SrcLoc

Since: base-4.9.0.0

Instance details

Defined in GHC.Show

Show GCDetails

Since: base-4.10.0.0

Instance details

Defined in GHC.Stats

Show RTSStats

Since: base-4.10.0.0

Instance details

Defined in GHC.Stats

Show SomeChar 
Instance details

Defined in GHC.TypeLits

Show SomeSymbol

Since: base-4.7.0.0

Instance details

Defined in GHC.TypeLits

Show SomeNat

Since: base-4.7.0.0

Instance details

Defined in GHC.TypeNats

Show GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Unicode

Show Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Show Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Show Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Show Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

showsPrec :: Int -> Word8 -> ShowS #

show :: Word8 -> String #

showList :: [Word8] -> ShowS #

Show Lexeme

Since: base-2.1

Instance details

Defined in Text.Read.Lex

Show Number

Since: base-4.6.0.0

Instance details

Defined in Text.Read.Lex

Show Encoding 
Instance details

Defined in Basement.String

Show ASCII7_Invalid 
Instance details

Defined in Basement.String.Encoding.ASCII7

Methods

showsPrec :: Int -> ASCII7_Invalid -> ShowS #

show :: ASCII7_Invalid -> String #

showList :: [ASCII7_Invalid] -> ShowS #

Show ISO_8859_1_Invalid 
Instance details

Defined in Basement.String.Encoding.ISO_8859_1

Methods

showsPrec :: Int -> ISO_8859_1_Invalid -> ShowS #

show :: ISO_8859_1_Invalid -> String #

showList :: [ISO_8859_1_Invalid] -> ShowS #

Show UTF16_Invalid 
Instance details

Defined in Basement.String.Encoding.UTF16

Methods

showsPrec :: Int -> UTF16_Invalid -> ShowS #

show :: UTF16_Invalid -> String #

showList :: [UTF16_Invalid] -> ShowS #

Show UTF32_Invalid 
Instance details

Defined in Basement.String.Encoding.UTF32

Methods

showsPrec :: Int -> UTF32_Invalid -> ShowS #

show :: UTF32_Invalid -> String #

showList :: [UTF32_Invalid] -> ShowS #

Show FileSize 
Instance details

Defined in Basement.Types.OffsetSize

Show String 
Instance details

Defined in Basement.UTF8.Base

Show HashingPolicy 
Instance details

Defined in Crypto.BCrypt

Show ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

Show ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Show ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Show IV 
Instance details

Defined in Web.ClientSession

Methods

showsPrec :: Int -> IV -> ShowS #

show :: IV -> String #

showList :: [IV] -> ShowS #

Show Key

Dummy Show instance.

Instance details

Defined in Web.ClientSession

Methods

showsPrec :: Int -> Key -> ShowS #

show :: Key -> String #

showList :: [Key] -> ShowS #

Show IntSet 
Instance details

Defined in Data.IntSet.Internal

Show SameSiteOption 
Instance details

Defined in Web.Cookie

Show SetCookie 
Instance details

Defined in Web.Cookie

Show Curve_Edwards25519 
Instance details

Defined in Crypto.ECC

Show Curve_P256R1 
Instance details

Defined in Crypto.ECC

Show Curve_P384R1 
Instance details

Defined in Crypto.ECC

Show Curve_P521R1 
Instance details

Defined in Crypto.ECC

Show Curve_X25519 
Instance details

Defined in Crypto.ECC

Show Curve_X448 
Instance details

Defined in Crypto.ECC

Show CryptoError 
Instance details

Defined in Crypto.Error.Types

Show Blake2b_160 
Instance details

Defined in Crypto.Hash.Blake2b

Show Blake2b_224 
Instance details

Defined in Crypto.Hash.Blake2b

Show Blake2b_256 
Instance details

Defined in Crypto.Hash.Blake2b

Show Blake2b_384 
Instance details

Defined in Crypto.Hash.Blake2b

Show Blake2b_512 
Instance details

Defined in Crypto.Hash.Blake2b

Show Blake2bp_512 
Instance details

Defined in Crypto.Hash.Blake2bp

Show Blake2s_160 
Instance details

Defined in Crypto.Hash.Blake2s

Show Blake2s_224 
Instance details

Defined in Crypto.Hash.Blake2s

Show Blake2s_256 
Instance details

Defined in Crypto.Hash.Blake2s

Show Blake2sp_224 
Instance details

Defined in Crypto.Hash.Blake2sp

Show Blake2sp_256 
Instance details

Defined in Crypto.Hash.Blake2sp

Show Keccak_224 
Instance details

Defined in Crypto.Hash.Keccak

Show Keccak_256 
Instance details

Defined in Crypto.Hash.Keccak

Show Keccak_384 
Instance details

Defined in Crypto.Hash.Keccak

Show Keccak_512 
Instance details

Defined in Crypto.Hash.Keccak

Show MD2 
Instance details

Defined in Crypto.Hash.MD2

Methods

showsPrec :: Int -> MD2 -> ShowS #

show :: MD2 -> String #

showList :: [MD2] -> ShowS #

Show MD4 
Instance details

Defined in Crypto.Hash.MD4

Methods

showsPrec :: Int -> MD4 -> ShowS #

show :: MD4 -> String #

showList :: [MD4] -> ShowS #

Show MD5 
Instance details

Defined in Crypto.Hash.MD5

Methods

showsPrec :: Int -> MD5 -> ShowS #

show :: MD5 -> String #

showList :: [MD5] -> ShowS #

Show RIPEMD160 
Instance details

Defined in Crypto.Hash.RIPEMD160

Show SHA1 
Instance details

Defined in Crypto.Hash.SHA1

Methods

showsPrec :: Int -> SHA1 -> ShowS #

show :: SHA1 -> String #

showList :: [SHA1] -> ShowS #

Show SHA224 
Instance details

Defined in Crypto.Hash.SHA224

Show SHA256 
Instance details

Defined in Crypto.Hash.SHA256

Show SHA3_224 
Instance details

Defined in Crypto.Hash.SHA3

Show SHA3_256 
Instance details

Defined in Crypto.Hash.SHA3

Show SHA3_384 
Instance details

Defined in Crypto.Hash.SHA3

Show SHA3_512 
Instance details

Defined in Crypto.Hash.SHA3

Show SHA384 
Instance details

Defined in Crypto.Hash.SHA384

Show SHA512 
Instance details

Defined in Crypto.Hash.SHA512

Show SHA512t_224 
Instance details

Defined in Crypto.Hash.SHA512t

Show SHA512t_256 
Instance details

Defined in Crypto.Hash.SHA512t

Show Skein256_224 
Instance details

Defined in Crypto.Hash.Skein256

Show Skein256_256 
Instance details

Defined in Crypto.Hash.Skein256

Show Skein512_224 
Instance details

Defined in Crypto.Hash.Skein512

Show Skein512_256 
Instance details

Defined in Crypto.Hash.Skein512

Show Skein512_384 
Instance details

Defined in Crypto.Hash.Skein512

Show Skein512_512 
Instance details

Defined in Crypto.Hash.Skein512

Show Tiger 
Instance details

Defined in Crypto.Hash.Tiger

Methods

showsPrec :: Int -> Tiger -> ShowS #

show :: Tiger -> String #

showList :: [Tiger] -> ShowS #

Show Whirlpool 
Instance details

Defined in Crypto.Hash.Whirlpool

Show HostCannotConnect 
Instance details

Defined in Network.Connection

Show HostNotResolved 
Instance details

Defined in Network.Connection

Show LineTooLong 
Instance details

Defined in Network.Connection

Show TLSSettings 
Instance details

Defined in Network.Connection.Types

Show CryptoError 
Instance details

Defined in Crypto.Error.Types

Show Blake2b_160 
Instance details

Defined in Crypto.Hash.Blake2b

Show Blake2b_224 
Instance details

Defined in Crypto.Hash.Blake2b

Show Blake2b_256 
Instance details

Defined in Crypto.Hash.Blake2b

Show Blake2b_384 
Instance details

Defined in Crypto.Hash.Blake2b

Show Blake2b_512 
Instance details

Defined in Crypto.Hash.Blake2b

Show Blake2bp_512 
Instance details

Defined in Crypto.Hash.Blake2bp

Show Blake2s_160 
Instance details

Defined in Crypto.Hash.Blake2s

Show Blake2s_224 
Instance details

Defined in Crypto.Hash.Blake2s

Show Blake2s_256 
Instance details

Defined in Crypto.Hash.Blake2s

Show Blake2sp_224 
Instance details

Defined in Crypto.Hash.Blake2sp

Show Blake2sp_256 
Instance details

Defined in Crypto.Hash.Blake2sp

Show Keccak_224 
Instance details

Defined in Crypto.Hash.Keccak

Show Keccak_256 
Instance details

Defined in Crypto.Hash.Keccak

Show Keccak_384 
Instance details

Defined in Crypto.Hash.Keccak

Show Keccak_512 
Instance details

Defined in Crypto.Hash.Keccak

Show MD2 
Instance details

Defined in Crypto.Hash.MD2

Methods

showsPrec :: Int -> MD2 -> ShowS #

show :: MD2 -> String #

showList :: [MD2] -> ShowS #

Show MD4 
Instance details

Defined in Crypto.Hash.MD4

Methods

showsPrec :: Int -> MD4 -> ShowS #

show :: MD4 -> String #

showList :: [MD4] -> ShowS #

Show MD5 
Instance details

Defined in Crypto.Hash.MD5

Methods

showsPrec :: Int -> MD5 -> ShowS #

show :: MD5 -> String #

showList :: [MD5] -> ShowS #

Show RIPEMD160 
Instance details

Defined in Crypto.Hash.RIPEMD160

Show SHA1 
Instance details

Defined in Crypto.Hash.SHA1

Methods

showsPrec :: Int -> SHA1 -> ShowS #

show :: SHA1 -> String #

showList :: [SHA1] -> ShowS #

Show SHA224 
Instance details

Defined in Crypto.Hash.SHA224

Show SHA256 
Instance details

Defined in Crypto.Hash.SHA256

Show SHA3_224 
Instance details

Defined in Crypto.Hash.SHA3

Show SHA3_256 
Instance details

Defined in Crypto.Hash.SHA3

Show SHA3_384 
Instance details

Defined in Crypto.Hash.SHA3

Show SHA3_512 
Instance details

Defined in Crypto.Hash.SHA3

Show SHA384 
Instance details

Defined in Crypto.Hash.SHA384

Show SHA512 
Instance details

Defined in Crypto.Hash.SHA512

Show SHA512t_224 
Instance details

Defined in Crypto.Hash.SHA512t

Show SHA512t_256 
Instance details

Defined in Crypto.Hash.SHA512t

Show Skein256_224 
Instance details

Defined in Crypto.Hash.Skein256

Show Skein256_256 
Instance details

Defined in Crypto.Hash.Skein256

Show Skein512_224 
Instance details

Defined in Crypto.Hash.Skein512

Show Skein512_256 
Instance details

Defined in Crypto.Hash.Skein512

Show Skein512_384 
Instance details

Defined in Crypto.Hash.Skein512

Show Skein512_512 
Instance details

Defined in Crypto.Hash.Skein512

Show Tiger 
Instance details

Defined in Crypto.Hash.Tiger

Methods

showsPrec :: Int -> Tiger -> ShowS #

show :: Tiger -> String #

showList :: [Tiger] -> ShowS #

Show Whirlpool 
Instance details

Defined in Crypto.Hash.Whirlpool

Show EmailAddress 
Instance details

Defined in Text.Email.Parser

Show NoteForm Source # 
Instance details

Defined in Handler.Notes

Show AccountSettingsForm Source # 
Instance details

Defined in Model

Show Bookmark Source # 
Instance details

Defined in Model

Show BookmarkForm Source # 
Instance details

Defined in Model

Show BookmarkTag Source # 
Instance details

Defined in Model

Show FFBookmarkNode Source # 
Instance details

Defined in Model

Show FileBookmark Source # 
Instance details

Defined in Model

Show FileNote Source # 
Instance details

Defined in Model

Show FilterP Source # 
Instance details

Defined in Model

Show Note Source # 
Instance details

Defined in Model

Methods

showsPrec :: Int -> Note -> ShowS #

show :: Note -> String #

showList :: [Note] -> ShowS #

Show SharedP Source # 
Instance details

Defined in Model

Show TagCloudMode Source # 
Instance details

Defined in Model

Show TagsP Source # 
Instance details

Defined in Model

Methods

showsPrec :: Int -> TagsP -> ShowS #

show :: TagsP -> String #

showList :: [TagsP] -> ShowS #

Show UTCTimeStr Source # 
Instance details

Defined in Model

Show UnreadOnly Source # 
Instance details

Defined in Model

Show User Source # 
Instance details

Defined in Model

Methods

showsPrec :: Int -> User -> ShowS #

show :: User -> String #

showList :: [User] -> ShowS #

Show UserNameP Source # 
Instance details

Defined in Model

Show BCrypt Source # 
Instance details

Defined in ModelCustom

Show BmSlug Source # 
Instance details

Defined in ModelCustom

Show HashedApiKey Source # 
Instance details

Defined in ModelCustom

Show NtSlug Source # 
Instance details

Defined in ModelCustom

Show EsqueletoError 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Show FromClause 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Show Ident 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Methods

showsPrec :: Int -> Ident -> ShowS #

show :: Ident -> String #

showList :: [Ident] -> ShowS #

Show JoinKind 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Show OnClauseWithoutMatchingJoinException 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Show OnLockedBehavior 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Show RenderExprException 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Show SqlBinOpCompositeError 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Show SubQueryType 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Show UnexpectedCaseError 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Show UnexpectedValueError 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Show LogStr 
Instance details

Defined in System.Log.FastLogger.LogStr

Show OsChar 
Instance details

Defined in System.OsString.Internal.Types

Show OsString

On windows, decodes as UCS-2. On unix prints the raw bytes without decoding.

Instance details

Defined in System.OsString.Internal.Types

Show PosixChar 
Instance details

Defined in System.OsString.Internal.Types

Show PosixString

Prints the raw bytes without decoding.

Instance details

Defined in System.OsString.Internal.Types

Show WindowsChar 
Instance details

Defined in System.OsString.Internal.Types

Show WindowsString

Decodes as UCS-2.

Instance details

Defined in System.OsString.Internal.Types

Show ForeignSrcLang 
Instance details

Defined in GHC.ForeignSrcLang.Type

Show Extension 
Instance details

Defined in GHC.LanguageExtensions.Type

Show KindRep 
Instance details

Defined in GHC.Show

Show Module

Since: base-4.9.0.0

Instance details

Defined in GHC.Show

Show Ordering

Since: base-2.1

Instance details

Defined in GHC.Show

Show TrName

Since: base-4.9.0.0

Instance details

Defined in GHC.Show

Show TyCon

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> TyCon -> ShowS #

show :: TyCon -> String #

showList :: [TyCon] -> ShowS #

Show TypeLitSort

Since: base-4.11.0.0

Instance details

Defined in GHC.Show

Show Lit 
Instance details

Defined in Language.Haskell.HsColour

Methods

showsPrec :: Int -> Lit -> ShowS #

show :: Lit -> String #

showList :: [Lit] -> ShowS #

Show Colour 
Instance details

Defined in Language.Haskell.HsColour.ColourHighlight

Show Highlight 
Instance details

Defined in Language.Haskell.HsColour.ColourHighlight

Show ColourPrefs 
Instance details

Defined in Language.Haskell.HsColour.Colourise

Show Output 
Instance details

Defined in Language.Haskell.HsColour.Output

Show TerminalType 
Instance details

Defined in Language.Haskell.HsColour.Output

Show Form 
Instance details

Defined in Web.Internal.FormUrlEncoded

Methods

showsPrec :: Int -> Form -> ShowS #

show :: Form -> String #

showList :: [Form] -> ShowS #

Show EncapsulatedPopperException 
Instance details

Defined in Network.HTTP.Client.Request

Methods

showsPrec :: Int -> EncapsulatedPopperException -> ShowS #

show :: EncapsulatedPopperException -> String #

showList :: [EncapsulatedPopperException] -> ShowS #

Show ConnHost 
Instance details

Defined in Network.HTTP.Client.Types

Show ConnKey 
Instance details

Defined in Network.HTTP.Client.Types

Show Cookie 
Instance details

Defined in Network.HTTP.Client.Types

Show CookieJar 
Instance details

Defined in Network.HTTP.Client.Types

Show HttpException 
Instance details

Defined in Network.HTTP.Client.Types

Show HttpExceptionContent 
Instance details

Defined in Network.HTTP.Client.Types

Show HttpExceptionContentWrapper 
Instance details

Defined in Network.HTTP.Client.Types

Methods

showsPrec :: Int -> HttpExceptionContentWrapper -> ShowS #

show :: HttpExceptionContentWrapper -> String #

showList :: [HttpExceptionContentWrapper] -> ShowS #

Show MaxHeaderLength 
Instance details

Defined in Network.HTTP.Client.Types

Show Proxy 
Instance details

Defined in Network.HTTP.Client.Types

Methods

showsPrec :: Int -> Proxy -> ShowS #

show :: Proxy -> String #

showList :: [Proxy] -> ShowS #

Show ProxySecureMode 
Instance details

Defined in Network.HTTP.Client.Types

Show Request 
Instance details

Defined in Network.HTTP.Client.Types

Show ResponseClose 
Instance details

Defined in Network.HTTP.Client.Types

Show ResponseTimeout 
Instance details

Defined in Network.HTTP.Client.Types

Show StatusHeaders 
Instance details

Defined in Network.HTTP.Client.Types

Show StreamFileStatus 
Instance details

Defined in Network.HTTP.Client.Types

Show DigestAuthException 
Instance details

Defined in Network.HTTP.Client.TLS

Show DigestAuthExceptionDetails 
Instance details

Defined in Network.HTTP.Client.TLS

Show ByteRange

Since: http-types-0.8.4

Instance details

Defined in Network.HTTP.Types.Header

Show StdMethod 
Instance details

Defined in Network.HTTP.Types.Method

Show Status 
Instance details

Defined in Network.HTTP.Types.Status

Show EscapeItem 
Instance details

Defined in Network.HTTP.Types.URI

Show HttpVersion
>>> show http11
"HTTP/1.1"
Instance details

Defined in Network.HTTP.Types.Version

Show IP 
Instance details

Defined in Data.IP.Addr

Methods

showsPrec :: Int -> IP -> ShowS #

show :: IP -> String #

showList :: [IP] -> ShowS #

Show IPv4 
Instance details

Defined in Data.IP.Addr

Methods

showsPrec :: Int -> IPv4 -> ShowS #

show :: IPv4 -> String #

showList :: [IPv4] -> ShowS #

Show IPv6 
Instance details

Defined in Data.IP.Addr

Methods

showsPrec :: Int -> IPv6 -> ShowS #

show :: IPv6 -> String #

showList :: [IPv6] -> ShowS #

Show IPRange 
Instance details

Defined in Data.IP.Range

Show LogLevel 
Instance details

Defined in Control.Monad.Logger

Show NullError 
Instance details

Defined in Data.NonNull

Methods

showsPrec :: Int -> NullError -> ShowS #

show :: NullError -> String #

showList :: [NullError] -> ShowS #

Show AddrInfo 
Instance details

Defined in Network.Socket.Info

Show AddrInfoFlag 
Instance details

Defined in Network.Socket.Info

Show NameInfoFlag 
Instance details

Defined in Network.Socket.Info

Show Family 
Instance details

Defined in Network.Socket.Types

Show PortNumber 
Instance details

Defined in Network.Socket.Types

Show Socket 
Instance details

Defined in Network.Socket.Types

Show SocketType 
Instance details

Defined in Network.Socket.Types

Show URI 
Instance details

Defined in Network.URI

Methods

showsPrec :: Int -> URI -> ShowS #

show :: URI -> String #

showList :: [URI] -> ShowS #

Show URIAuth 
Instance details

Defined in Network.URI

Show OverflowNatural 
Instance details

Defined in Database.Persist.Class.PersistField

Show ConstraintNameDB 
Instance details

Defined in Database.Persist.Names

Show ConstraintNameHS 
Instance details

Defined in Database.Persist.Names

Show EntityNameDB 
Instance details

Defined in Database.Persist.Names

Show EntityNameHS 
Instance details

Defined in Database.Persist.Names

Show FieldNameDB 
Instance details

Defined in Database.Persist.Names

Show FieldNameHS 
Instance details

Defined in Database.Persist.Names

Show LiteralType 
Instance details

Defined in Database.Persist.PersistValue

Show PersistValue 
Instance details

Defined in Database.Persist.PersistValue

Show ForeignFieldReference 
Instance details

Defined in Database.Persist.Quasi.Internal

Show Line 
Instance details

Defined in Database.Persist.Quasi.Internal

Methods

showsPrec :: Int -> Line -> ShowS #

show :: Line -> String #

showList :: [Line] -> ShowS #

Show LinesWithComments 
Instance details

Defined in Database.Persist.Quasi.Internal

Show PrimarySpec 
Instance details

Defined in Database.Persist.Quasi.Internal

Show Token 
Instance details

Defined in Database.Persist.Quasi.Internal

Methods

showsPrec :: Int -> Token -> ShowS #

show :: Token -> String #

showList :: [Token] -> ShowS #

Show UnboundCompositeDef 
Instance details

Defined in Database.Persist.Quasi.Internal

Show UnboundEntityDef 
Instance details

Defined in Database.Persist.Quasi.Internal

Show UnboundFieldDef 
Instance details

Defined in Database.Persist.Quasi.Internal

Show UnboundForeignDef 
Instance details

Defined in Database.Persist.Quasi.Internal

Show UnboundForeignFieldList 
Instance details

Defined in Database.Persist.Quasi.Internal

Show UnboundIdDef 
Instance details

Defined in Database.Persist.Quasi.Internal

Show PersistUnsafeMigrationException

This Show instance renders an error message suitable for printing to the console. This is a little dodgy, but since GHC uses Show instances when displaying uncaught exceptions, we have little choice.

Instance details

Defined in Database.Persist.Sql.Migration

Show Column 
Instance details

Defined in Database.Persist.Sql.Types

Show ColumnReference 
Instance details

Defined in Database.Persist.Sql.Types

Show ConnectionPoolConfig 
Instance details

Defined in Database.Persist.Sql.Types

Show PersistentSqlException 
Instance details

Defined in Database.Persist.Sql.Types

Show IsolationLevel 
Instance details

Defined in Database.Persist.SqlBackend.Internal.IsolationLevel

Show FTTypeConDescr 
Instance details

Defined in Database.Persist.TH

Methods

showsPrec :: Int -> FTTypeConDescr -> ShowS #

show :: FTTypeConDescr -> String #

showList :: [FTTypeConDescr] -> ShowS #

Show SqlTypeExp 
Instance details

Defined in Database.Persist.TH

Methods

showsPrec :: Int -> SqlTypeExp -> ShowS #

show :: SqlTypeExp -> String #

showList :: [SqlTypeExp] -> ShowS #

Show CascadeAction 
Instance details

Defined in Database.Persist.Types.Base

Show Checkmark 
Instance details

Defined in Database.Persist.Types.Base

Show CompositeDef 
Instance details

Defined in Database.Persist.Types.Base

Show EmbedEntityDef 
Instance details

Defined in Database.Persist.Types.Base

Show EmbedFieldDef 
Instance details

Defined in Database.Persist.Types.Base

Show EntityDef 
Instance details

Defined in Database.Persist.Types.Base

Show EntityIdDef 
Instance details

Defined in Database.Persist.Types.Base

Show FieldAttr 
Instance details

Defined in Database.Persist.Types.Base

Show FieldCascade 
Instance details

Defined in Database.Persist.Types.Base

Show FieldDef 
Instance details

Defined in Database.Persist.Types.Base

Show FieldType 
Instance details

Defined in Database.Persist.Types.Base

Show FieldTypeLit 
Instance details

Defined in Database.Persist.Types.Base

Show ForeignDef 
Instance details

Defined in Database.Persist.Types.Base

Show IsNullable 
Instance details

Defined in Database.Persist.Types.Base

Show OnlyUniqueException 
Instance details

Defined in Database.Persist.Types.Base

Methods

showsPrec :: Int -> OnlyUniqueException -> ShowS #

show :: OnlyUniqueException -> String #

showList :: [OnlyUniqueException] -> ShowS #

Show PersistException 
Instance details

Defined in Database.Persist.Types.Base

Show PersistFilter 
Instance details

Defined in Database.Persist.Types.Base

Show PersistUpdate 
Instance details

Defined in Database.Persist.Types.Base

Show ReferenceDef 
Instance details

Defined in Database.Persist.Types.Base

Show SelfEmbed 
Instance details

Defined in Database.Persist.Types.Base

Methods

showsPrec :: Int -> SelfEmbed -> ShowS #

show :: SelfEmbed -> String #

showList :: [SelfEmbed] -> ShowS #

Show SqlType 
Instance details

Defined in Database.Persist.Types.Base

Show UniqueDef 
Instance details

Defined in Database.Persist.Types.Base

Show UpdateException 
Instance details

Defined in Database.Persist.Types.Base

Show WhyNullable 
Instance details

Defined in Database.Persist.Types.Base

Show ForeignKeyViolation 
Instance details

Defined in Database.Persist.Sqlite

Show SqliteConf 
Instance details

Defined in Database.Persist.Sqlite

Show SqliteConnectionInfo 
Instance details

Defined in Database.Persist.Sqlite

Show Mode 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

showsPrec :: Int -> Mode -> ShowS #

show :: Mode -> String #

showList :: [Mode] -> ShowS #

Show Style 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

showsPrec :: Int -> Style -> ShowS #

show :: Style -> String #

showList :: [Style] -> ShowS #

Show TextDetails 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Show Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Methods

showsPrec :: Int -> Doc -> ShowS #

show :: Doc -> String #

showList :: [Doc] -> ShowS #

Show StdGen 
Instance details

Defined in System.Random.Internal

Show InvalidAccess 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Show ResourceCleanupException 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Show ReleaseType 
Instance details

Defined in Data.Acquire.Internal

Show AsyncExceptionWrapper 
Instance details

Defined in Control.Exception.Safe

Show StringException 
Instance details

Defined in Control.Exception.Safe

Show SyncExceptionWrapper 
Instance details

Defined in Control.Exception.Safe

Show Scientific

See formatScientific if you need more control over the rendering.

Instance details

Defined in Data.Scientific

Show Binding 
Instance details

Defined in Text.Hamlet.Parse

Methods

showsPrec :: Int -> Binding -> ShowS #

show :: Binding -> String #

showList :: [Binding] -> ShowS #

Show Content 
Instance details

Defined in Text.Hamlet.Parse

Methods

showsPrec :: Int -> Content -> ShowS #

show :: Content -> String #

showList :: [Content] -> ShowS #

Show DataConstr 
Instance details

Defined in Text.Hamlet.Parse

Methods

showsPrec :: Int -> DataConstr -> ShowS #

show :: DataConstr -> String #

showList :: [DataConstr] -> ShowS #

Show Doc 
Instance details

Defined in Text.Hamlet.Parse

Methods

showsPrec :: Int -> Doc -> ShowS #

show :: Doc -> String #

showList :: [Doc] -> ShowS #

Show Line 
Instance details

Defined in Text.Hamlet.Parse

Methods

showsPrec :: Int -> Line -> ShowS #

show :: Line -> String #

showList :: [Line] -> ShowS #

Show Module 
Instance details

Defined in Text.Hamlet.Parse

Methods

showsPrec :: Int -> Module -> ShowS #

show :: Module -> String #

showList :: [Module] -> ShowS #

Show NewlineStyle 
Instance details

Defined in Text.Hamlet.Parse

Show TagPiece 
Instance details

Defined in Text.Hamlet.Parse

Methods

showsPrec :: Int -> TagPiece -> ShowS #

show :: TagPiece -> String #

showList :: [TagPiece] -> ShowS #

Show Content 
Instance details

Defined in Text.Internal.Css

Methods

showsPrec :: Int -> Content -> ShowS #

show :: Content -> String #

showList :: [Content] -> ShowS #

Show AbsoluteSize 
Instance details

Defined in Text.Internal.CssCommon

Show AbsoluteUnit 
Instance details

Defined in Text.Internal.CssCommon

Show Color 
Instance details

Defined in Text.Internal.CssCommon

Methods

showsPrec :: Int -> Color -> ShowS #

show :: Color -> String #

showList :: [Color] -> ShowS #

Show EmSize 
Instance details

Defined in Text.Internal.CssCommon

Show ExSize 
Instance details

Defined in Text.Internal.CssCommon

Show PercentageSize 
Instance details

Defined in Text.Internal.CssCommon

Show PixelSize 
Instance details

Defined in Text.Internal.CssCommon

Show Content 
Instance details

Defined in Text.Shakespeare

Methods

showsPrec :: Int -> Content -> ShowS #

show :: Content -> String #

showList :: [Content] -> ShowS #

Show VarType 
Instance details

Defined in Text.Shakespeare

Show Deref 
Instance details

Defined in Text.Shakespeare.Base

Methods

showsPrec :: Int -> Deref -> ShowS #

show :: Deref -> String #

showList :: [Deref] -> ShowS #

Show Ident 
Instance details

Defined in Text.Shakespeare.Base

Methods

showsPrec :: Int -> Ident -> ShowS #

show :: Ident -> String #

showList :: [Ident] -> ShowS #

Show HostPreference 
Instance details

Defined in Data.Streaming.Network.Internal

Show AnnLookup 
Instance details

Defined in Language.Haskell.TH.Syntax

Show AnnTarget 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Bang 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Bang -> ShowS #

show :: Bang -> String #

showList :: [Bang] -> ShowS #

Show Body 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Body -> ShowS #

show :: Body -> String #

showList :: [Body] -> ShowS #

Show Bytes 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Bytes -> ShowS #

show :: Bytes -> String #

showList :: [Bytes] -> ShowS #

Show Callconv 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Clause 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Con 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Con -> ShowS #

show :: Con -> String #

showList :: [Con] -> ShowS #

Show Dec 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Dec -> ShowS #

show :: Dec -> String #

showList :: [Dec] -> ShowS #

Show DecidedStrictness 
Instance details

Defined in Language.Haskell.TH.Syntax

Show DerivClause 
Instance details

Defined in Language.Haskell.TH.Syntax

Show DerivStrategy 
Instance details

Defined in Language.Haskell.TH.Syntax

Show DocLoc 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Exp 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Exp -> ShowS #

show :: Exp -> String #

showList :: [Exp] -> ShowS #

Show FamilyResultSig 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Fixity 
Instance details

Defined in Language.Haskell.TH.Syntax

Show FixityDirection 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Foreign 
Instance details

Defined in Language.Haskell.TH.Syntax

Show FunDep 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Guard 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Guard -> ShowS #

show :: Guard -> String #

showList :: [Guard] -> ShowS #

Show Info 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Info -> ShowS #

show :: Info -> String #

showList :: [Info] -> ShowS #

Show InjectivityAnn 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Inline 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Lit 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Lit -> ShowS #

show :: Lit -> String #

showList :: [Lit] -> ShowS #

Show Loc 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Loc -> ShowS #

show :: Loc -> String #

showList :: [Loc] -> ShowS #

Show Match 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Match -> ShowS #

show :: Match -> String #

showList :: [Match] -> ShowS #

Show ModName 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Module 
Instance details

Defined in Language.Haskell.TH.Syntax

Show ModuleInfo 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Name 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Name -> ShowS #

show :: Name -> String #

showList :: [Name] -> ShowS #

Show NameFlavour 
Instance details

Defined in Language.Haskell.TH.Syntax

Show NameSpace 
Instance details

Defined in Language.Haskell.TH.Syntax

Show OccName 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Overlap 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Pat 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Pat -> ShowS #

show :: Pat -> String #

showList :: [Pat] -> ShowS #

Show PatSynArgs 
Instance details

Defined in Language.Haskell.TH.Syntax

Show PatSynDir 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Phases 
Instance details

Defined in Language.Haskell.TH.Syntax

Show PkgName 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Pragma 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Range 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Range -> ShowS #

show :: Range -> String #

showList :: [Range] -> ShowS #

Show Role 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Role -> ShowS #

show :: Role -> String #

showList :: [Role] -> ShowS #

Show RuleBndr 
Instance details

Defined in Language.Haskell.TH.Syntax

Show RuleMatch 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Safety 
Instance details

Defined in Language.Haskell.TH.Syntax

Show SourceStrictness 
Instance details

Defined in Language.Haskell.TH.Syntax

Show SourceUnpackedness 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Specificity 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Stmt 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Stmt -> ShowS #

show :: Stmt -> String #

showList :: [Stmt] -> ShowS #

Show TyLit 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> TyLit -> ShowS #

show :: TyLit -> String #

showList :: [TyLit] -> ShowS #

Show TySynEqn 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Type 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Type -> ShowS #

show :: Type -> String #

showList :: [Type] -> ShowS #

Show TypeFamilyHead 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Decoding 
Instance details

Defined in Data.Text.Encoding

Show Builder 
Instance details

Defined in Data.Text.Internal.Builder

Show ShortText 
Instance details

Defined in Data.Text.Short.Internal

Show ConstructorInfo 
Instance details

Defined in Language.Haskell.TH.Datatype

Show ConstructorVariant 
Instance details

Defined in Language.Haskell.TH.Datatype

Show DatatypeInfo 
Instance details

Defined in Language.Haskell.TH.Datatype

Show DatatypeVariant 
Instance details

Defined in Language.Haskell.TH.Datatype

Show FieldStrictness 
Instance details

Defined in Language.Haskell.TH.Datatype

Show Strictness 
Instance details

Defined in Language.Haskell.TH.Datatype

Show Unpackedness 
Instance details

Defined in Language.Haskell.TH.Datatype

Show DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Show NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Show TimeLocale 
Instance details

Defined in Data.Time.Format.Locale

Show LocalTime 
Instance details

Defined in Data.Time.LocalTime.Internal.LocalTime

Show TimeOfDay 
Instance details

Defined in Data.Time.LocalTime.Internal.TimeOfDay

Show ZonedTime

For the time zone, this only shows the name, or offset if the name is empty.

Instance details

Defined in Data.Time.LocalTime.Internal.ZonedTime

Show StringException

Since: unliftio-0.1.0.0

Instance details

Defined in UnliftIO.Exception

Show ConcException 
Instance details

Defined in UnliftIO.Internals.Async

Show UUID

Pretty prints a UUID (without quotation marks). See also toString.

>>> show nil
"00000000-0000-0000-0000-000000000000"
Instance details

Defined in Data.UUID.Types.Internal

Methods

showsPrec :: Int -> UUID -> ShowS #

show :: UUID -> String #

showList :: [UUID] -> ShowS #

Show UnpackedUUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

showsPrec :: Int -> UnpackedUUID -> ShowS #

show :: UnpackedUUID -> String #

showList :: [UnpackedUUID] -> ShowS #

Show FilePart 
Instance details

Defined in Network.Wai.Internal

Show Request 
Instance details

Defined in Network.Wai.Internal

Show RequestBodyLength 
Instance details

Defined in Network.Wai.Internal

Show Piece 
Instance details

Defined in WaiAppStatic.Types

Methods

showsPrec :: Int -> Piece -> ShowS #

show :: Piece -> String #

showList :: [Piece] -> ShowS #

Show GzipFiles 
Instance details

Defined in Network.Wai.Middleware.Gzip

Show Bound 
Instance details

Defined in Network.Wai.Parse

Methods

showsPrec :: Int -> Bound -> ShowS #

show :: Bound -> String #

showList :: [Bound] -> ShowS #

Show RequestParseException 
Instance details

Defined in Network.Wai.Parse

Show ExceptionInsideResponseBody 
Instance details

Defined in Network.Wai.Handler.Warp.Types

Methods

showsPrec :: Int -> ExceptionInsideResponseBody -> ShowS #

show :: ExceptionInsideResponseBody -> String #

showList :: [ExceptionInsideResponseBody] -> ShowS #

Show InvalidRequest 
Instance details

Defined in Network.Wai.Handler.Warp.Types

Show Content 
Instance details

Defined in Data.XML.Types

Show Doctype 
Instance details

Defined in Data.XML.Types

Show Document 
Instance details

Defined in Data.XML.Types

Show Element 
Instance details

Defined in Data.XML.Types

Show Event 
Instance details

Defined in Data.XML.Types

Methods

showsPrec :: Int -> Event -> ShowS #

show :: Event -> String #

showList :: [Event] -> ShowS #

Show ExternalID 
Instance details

Defined in Data.XML.Types

Show Instruction 
Instance details

Defined in Data.XML.Types

Show Miscellaneous 
Instance details

Defined in Data.XML.Types

Show Name 
Instance details

Defined in Data.XML.Types

Methods

showsPrec :: Int -> Name -> ShowS #

show :: Name -> String #

showList :: [Name] -> ShowS #

Show Node 
Instance details

Defined in Data.XML.Types

Methods

showsPrec :: Int -> Node -> ShowS #

show :: Node -> String #

showList :: [Node] -> ShowS #

Show Prologue 
Instance details

Defined in Data.XML.Types

Show ParseException 
Instance details

Defined in Data.Yaml.Internal

Show Warning 
Instance details

Defined in Data.Yaml.Internal

Show AuthException 
Instance details

Defined in Yesod.Auth

Show Etag 
Instance details

Defined in Yesod.Core.Handler

Methods

showsPrec :: Int -> Etag -> ShowS #

show :: Etag -> String #

showList :: [Etag] -> ShowS #

Show AuthResult 
Instance details

Defined in Yesod.Core.Types

Show ClientSessionDateCache 
Instance details

Defined in Yesod.Core.Types

Show ErrorResponse 
Instance details

Defined in Yesod.Core.Types

Show HandlerContents 
Instance details

Defined in Yesod.Core.Types

Show Header 
Instance details

Defined in Yesod.Core.Types

Show SessionCookie 
Instance details

Defined in Yesod.Core.Types

Show TypeTree 
Instance details

Defined in Yesod.Routes.Parse

Methods

showsPrec :: Int -> TypeTree -> ShowS #

show :: TypeTree -> String #

showList :: [TypeTree] -> ShowS #

Show Textarea 
Instance details

Defined in Yesod.Form.Fields

Show FormMessage 
Instance details

Defined in Yesod.Form.Types

Show Ints 
Instance details

Defined in Yesod.Form.Types

Methods

showsPrec :: Int -> Ints -> ShowS #

show :: Ints -> String #

showList :: [Ints] -> ShowS #

Show CompressionLevel 
Instance details

Defined in Codec.Compression.Zlib.Stream

Show CompressionStrategy 
Instance details

Defined in Codec.Compression.Zlib.Stream

Show DictionaryHash 
Instance details

Defined in Codec.Compression.Zlib.Stream

Methods

showsPrec :: Int -> DictionaryHash -> ShowS #

show :: DictionaryHash -> String #

showList :: [DictionaryHash] -> ShowS #

Show Format 
Instance details

Defined in Codec.Compression.Zlib.Stream

Show MemoryLevel 
Instance details

Defined in Codec.Compression.Zlib.Stream

Show Method 
Instance details

Defined in Codec.Compression.Zlib.Stream

Show WindowBits 
Instance details

Defined in Codec.Compression.Zlib.Stream

Show Integer

Since: base-2.1

Instance details

Defined in GHC.Show

Show Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Show

Show ()

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> () -> ShowS #

show :: () -> String #

showList :: [()] -> ShowS #

Show Bool

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> Bool -> ShowS #

show :: Bool -> String #

showList :: [Bool] -> ShowS #

Show Char

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> Char -> ShowS #

show :: Char -> String #

showList :: [Char] -> ShowS #

Show Int

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> Int -> ShowS #

show :: Int -> String #

showList :: [Int] -> ShowS #

Show Levity

Since: base-4.15.0.0

Instance details

Defined in GHC.Show

Show RuntimeRep

Since: base-4.11.0.0

Instance details

Defined in GHC.Show

Show VecCount

Since: base-4.11.0.0

Instance details

Defined in GHC.Show

Show VecElem

Since: base-4.11.0.0

Instance details

Defined in GHC.Show

Show Word

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> Word -> ShowS #

show :: Word -> String #

showList :: [Word] -> ShowS #

Show (Encoding' a) 
Instance details

Defined in Data.Aeson.Encoding.Internal

Show v => Show (KeyMap v) 
Instance details

Defined in Data.Aeson.KeyMap

Methods

showsPrec :: Int -> KeyMap v -> ShowS #

show :: KeyMap v -> String #

showList :: [KeyMap v] -> ShowS #

Show a => Show (IResult a) 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

showsPrec :: Int -> IResult a -> ShowS #

show :: IResult a -> String #

showList :: [IResult a] -> ShowS #

Show a => Show (Result a) 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

showsPrec :: Int -> Result a -> ShowS #

show :: Result a -> String #

showList :: [Result a] -> ShowS #

Show a => Show (ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Methods

showsPrec :: Int -> ZipList a -> ShowS #

show :: ZipList a -> String #

showList :: [ZipList a] -> ShowS #

Show a => Show (Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Methods

showsPrec :: Int -> Complex a -> ShowS #

show :: Complex a -> String #

showList :: [Complex a] -> ShowS #

Show a => Show (Identity a)

This instance would be equivalent to the derived instances of the Identity newtype if the runIdentity field were removed

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

showsPrec :: Int -> Identity a -> ShowS #

show :: Identity a -> String #

showList :: [Identity a] -> ShowS #

Show a => Show (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

showsPrec :: Int -> First a -> ShowS #

show :: First a -> String #

showList :: [First a] -> ShowS #

Show a => Show (Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

showsPrec :: Int -> Last a -> ShowS #

show :: Last a -> String #

showList :: [Last a] -> ShowS #

Show a => Show (Down a)

This instance would be equivalent to the derived instances of the Down newtype if the getDown field were removed

Since: base-4.7.0.0

Instance details

Defined in Data.Ord

Methods

showsPrec :: Int -> Down a -> ShowS #

show :: Down a -> String #

showList :: [Down a] -> ShowS #

Show a => Show (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

showsPrec :: Int -> First a -> ShowS #

show :: First a -> String #

showList :: [First a] -> ShowS #

Show a => Show (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

showsPrec :: Int -> Last a -> ShowS #

show :: Last a -> String #

showList :: [Last a] -> ShowS #

Show a => Show (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

showsPrec :: Int -> Max a -> ShowS #

show :: Max a -> String #

showList :: [Max a] -> ShowS #

Show a => Show (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

showsPrec :: Int -> Min a -> ShowS #

show :: Min a -> String #

showList :: [Min a] -> ShowS #

Show m => Show (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Show a => Show (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

showsPrec :: Int -> Dual a -> ShowS #

show :: Dual a -> String #

showList :: [Dual a] -> ShowS #

Show a => Show (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

showsPrec :: Int -> Product a -> ShowS #

show :: Product a -> String #

showList :: [Product a] -> ShowS #

Show a => Show (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

showsPrec :: Int -> Sum a -> ShowS #

show :: Sum a -> String #

showList :: [Sum a] -> ShowS #

Show a => Show (NonEmpty a)

Since: base-4.11.0.0

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> NonEmpty a -> ShowS #

show :: NonEmpty a -> String #

showList :: [NonEmpty a] -> ShowS #

Show p => Show (Par1 p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> Par1 p -> ShowS #

show :: Par1 p -> String #

showList :: [Par1 p] -> ShowS #

Show a => Show (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

showsPrec :: Int -> Ratio a -> ShowS #

show :: Ratio a -> String #

showList :: [Ratio a] -> ShowS #

Show (SChar c)

Since: base-4.18.0.0

Instance details

Defined in GHC.TypeLits

Methods

showsPrec :: Int -> SChar c -> ShowS #

show :: SChar c -> String #

showList :: [SChar c] -> ShowS #

Show (SSymbol s)

Since: base-4.18.0.0

Instance details

Defined in GHC.TypeLits

Methods

showsPrec :: Int -> SSymbol s -> ShowS #

show :: SSymbol s -> String #

showList :: [SSymbol s] -> ShowS #

Show (SNat n)

Since: base-4.18.0.0

Instance details

Defined in GHC.TypeNats

Methods

showsPrec :: Int -> SNat n -> ShowS #

show :: SNat n -> String #

showList :: [SNat n] -> ShowS #

Show (Bits n) 
Instance details

Defined in Basement.Bits

Methods

showsPrec :: Int -> Bits n -> ShowS #

show :: Bits n -> String #

showList :: [Bits n] -> ShowS #

(PrimType ty, Show ty) => Show (Block ty) 
Instance details

Defined in Basement.Block.Base

Methods

showsPrec :: Int -> Block ty -> ShowS #

show :: Block ty -> String #

showList :: [Block ty] -> ShowS #

Show (Zn n) 
Instance details

Defined in Basement.Bounded

Methods

showsPrec :: Int -> Zn n -> ShowS #

show :: Zn n -> String #

showList :: [Zn n] -> ShowS #

Show (Zn64 n) 
Instance details

Defined in Basement.Bounded

Methods

showsPrec :: Int -> Zn64 n -> ShowS #

show :: Zn64 n -> String #

showList :: [Zn64 n] -> ShowS #

Show a => Show (NonEmpty a) 
Instance details

Defined in Basement.NonEmpty

Methods

showsPrec :: Int -> NonEmpty a -> ShowS #

show :: NonEmpty a -> String #

showList :: [NonEmpty a] -> ShowS #

Show (CountOf ty) 
Instance details

Defined in Basement.Types.OffsetSize

Methods

showsPrec :: Int -> CountOf ty -> ShowS #

show :: CountOf ty -> String #

showList :: [CountOf ty] -> ShowS #

Show (Offset ty) 
Instance details

Defined in Basement.Types.OffsetSize

Methods

showsPrec :: Int -> Offset ty -> ShowS #

show :: Offset ty -> String #

showList :: [Offset ty] -> ShowS #

(PrimType ty, Show ty) => Show (UArray ty) 
Instance details

Defined in Basement.UArray.Base

Methods

showsPrec :: Int -> UArray ty -> ShowS #

show :: UArray ty -> String #

showList :: [UArray ty] -> ShowS #

Show s => Show (CI s) 
Instance details

Defined in Data.CaseInsensitive.Internal

Methods

showsPrec :: Int -> CI s -> ShowS #

show :: CI s -> String #

showList :: [CI s] -> ShowS #

Show a => Show (Flush a) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

showsPrec :: Int -> Flush a -> ShowS #

show :: Flush a -> String #

showList :: [Flush a] -> ShowS #

Show a => Show (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

showsPrec :: Int -> IntMap a -> ShowS #

show :: IntMap a -> String #

showList :: [IntMap a] -> ShowS #

Show a => Show (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

showsPrec :: Int -> Seq a -> ShowS #

show :: Seq a -> String #

showList :: [Seq a] -> ShowS #

Show a => Show (ViewL a) 
Instance details

Defined in Data.Sequence.Internal

Methods

showsPrec :: Int -> ViewL a -> ShowS #

show :: ViewL a -> String #

showList :: [ViewL a] -> ShowS #

Show a => Show (ViewR a) 
Instance details

Defined in Data.Sequence.Internal

Methods

showsPrec :: Int -> ViewR a -> ShowS #

show :: ViewR a -> String #

showList :: [ViewR a] -> ShowS #

Show a => Show (Intersection a) 
Instance details

Defined in Data.Set.Internal

Show a => Show (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

showsPrec :: Int -> Set a -> ShowS #

show :: Set a -> String #

showList :: [Set a] -> ShowS #

Show a => Show (Tree a) 
Instance details

Defined in Data.Tree

Methods

showsPrec :: Int -> Tree a -> ShowS #

show :: Tree a -> String #

showList :: [Tree a] -> ShowS #

Show a => Show (CryptoFailable a) 
Instance details

Defined in Crypto.Error.Types

Show (Blake2b bitlen) 
Instance details

Defined in Crypto.Hash.Blake2

Methods

showsPrec :: Int -> Blake2b bitlen -> ShowS #

show :: Blake2b bitlen -> String #

showList :: [Blake2b bitlen] -> ShowS #

Show (Blake2bp bitlen) 
Instance details

Defined in Crypto.Hash.Blake2

Methods

showsPrec :: Int -> Blake2bp bitlen -> ShowS #

show :: Blake2bp bitlen -> String #

showList :: [Blake2bp bitlen] -> ShowS #

Show (Blake2s bitlen) 
Instance details

Defined in Crypto.Hash.Blake2

Methods

showsPrec :: Int -> Blake2s bitlen -> ShowS #

show :: Blake2s bitlen -> String #

showList :: [Blake2s bitlen] -> ShowS #

Show (Blake2sp bitlen) 
Instance details

Defined in Crypto.Hash.Blake2

Methods

showsPrec :: Int -> Blake2sp bitlen -> ShowS #

show :: Blake2sp bitlen -> String #

showList :: [Blake2sp bitlen] -> ShowS #

Show (SHAKE128 bitlen) 
Instance details

Defined in Crypto.Hash.SHAKE

Methods

showsPrec :: Int -> SHAKE128 bitlen -> ShowS #

show :: SHAKE128 bitlen -> String #

showList :: [SHAKE128 bitlen] -> ShowS #

Show (SHAKE256 bitlen) 
Instance details

Defined in Crypto.Hash.SHAKE

Methods

showsPrec :: Int -> SHAKE256 bitlen -> ShowS #

show :: SHAKE256 bitlen -> String #

showList :: [SHAKE256 bitlen] -> ShowS #

Show (Digest a) 
Instance details

Defined in Crypto.Hash.Types

Methods

showsPrec :: Int -> Digest a -> ShowS #

show :: Digest a -> String #

showList :: [Digest a] -> ShowS #

Show a => Show (CryptoFailable a) 
Instance details

Defined in Crypto.Error.Types

Show (Blake2b bitlen) 
Instance details

Defined in Crypto.Hash.Blake2

Methods

showsPrec :: Int -> Blake2b bitlen -> ShowS #

show :: Blake2b bitlen -> String #

showList :: [Blake2b bitlen] -> ShowS #

Show (Blake2bp bitlen) 
Instance details

Defined in Crypto.Hash.Blake2

Methods

showsPrec :: Int -> Blake2bp bitlen -> ShowS #

show :: Blake2bp bitlen -> String #

showList :: [Blake2bp bitlen] -> ShowS #

Show (Blake2s bitlen) 
Instance details

Defined in Crypto.Hash.Blake2

Methods

showsPrec :: Int -> Blake2s bitlen -> ShowS #

show :: Blake2s bitlen -> String #

showList :: [Blake2s bitlen] -> ShowS #

Show (Blake2sp bitlen) 
Instance details

Defined in Crypto.Hash.Blake2

Methods

showsPrec :: Int -> Blake2sp bitlen -> ShowS #

show :: Blake2sp bitlen -> String #

showList :: [Blake2sp bitlen] -> ShowS #

Show (SHAKE128 bitlen) 
Instance details

Defined in Crypto.Hash.SHAKE

Methods

showsPrec :: Int -> SHAKE128 bitlen -> ShowS #

show :: SHAKE128 bitlen -> String #

showList :: [SHAKE128 bitlen] -> ShowS #

Show (SHAKE256 bitlen) 
Instance details

Defined in Crypto.Hash.SHAKE

Methods

showsPrec :: Int -> SHAKE256 bitlen -> ShowS #

show :: SHAKE256 bitlen -> String #

showList :: [SHAKE256 bitlen] -> ShowS #

Show (Digest a) 
Instance details

Defined in Crypto.Hash.Types

Methods

showsPrec :: Int -> Digest a -> ShowS #

show :: Digest a -> String #

showList :: [Digest a] -> ShowS #

Show1 f => Show (Fix f) 
Instance details

Defined in Data.Fix

Methods

showsPrec :: Int -> Fix f -> ShowS #

show :: Fix f -> String #

showList :: [Fix f] -> ShowS #

(Functor f, Show1 f) => Show (Mu f) 
Instance details

Defined in Data.Fix

Methods

showsPrec :: Int -> Mu f -> ShowS #

show :: Mu f -> String #

showList :: [Mu f] -> ShowS #

(Functor f, Show1 f) => Show (Nu f) 
Instance details

Defined in Data.Fix

Methods

showsPrec :: Int -> Nu f -> ShowS #

show :: Nu f -> String #

showList :: [Nu f] -> ShowS #

Show a => Show (DNonEmpty a) 
Instance details

Defined in Data.DList.DNonEmpty.Internal

Show a => Show (DList a) 
Instance details

Defined in Data.DList.Internal

Methods

showsPrec :: Int -> DList a -> ShowS #

show :: DList a -> String #

showList :: [DList a] -> ShowS #

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

Defined in Model

Show a => Show (Value a) 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Methods

showsPrec :: Int -> Value a -> ShowS #

show :: Value a -> String #

showList :: [Value a] -> ShowS #

Show a => Show (ValueList a) 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Show a => Show (ExitCase a) 
Instance details

Defined in Control.Monad.Catch

Methods

showsPrec :: Int -> ExitCase a -> ShowS #

show :: ExitCase a -> String #

showList :: [ExitCase a] -> ShowS #

Show a => Show (Hashed a) 
Instance details

Defined in Data.Hashable.Class

Methods

showsPrec :: Int -> Hashed a -> ShowS #

show :: Hashed a -> String #

showList :: [Hashed a] -> ShowS #

Show a => Show (LenientData a) 
Instance details

Defined in Web.Internal.HttpApiData

Show body => Show (HistoriedResponse body) 
Instance details

Defined in Network.HTTP.Client

Show body => Show (Response body) 
Instance details

Defined in Network.HTTP.Client.Types

Methods

showsPrec :: Int -> Response body -> ShowS #

show :: Response body -> String #

showList :: [Response body] -> ShowS #

Show a => Show (AddrRange a) 
Instance details

Defined in Data.IP.Range

Show mono => Show (NonNull mono) 
Instance details

Defined in Data.NonNull

Methods

showsPrec :: Int -> NonNull mono -> ShowS #

show :: NonNull mono -> String #

showList :: [NonNull mono] -> ShowS #

(Show (Key record), Show record) => Show (Entity record) 
Instance details

Defined in Database.Persist.Class.PersistEntity

Methods

showsPrec :: Int -> Entity record -> ShowS #

show :: Entity record -> String #

showList :: [Entity record] -> ShowS #

Show (Key Bookmark) Source # 
Instance details

Defined in Model

Show (Key BookmarkTag) Source # 
Instance details

Defined in Model

Show (Key Note) Source # 
Instance details

Defined in Model

Methods

showsPrec :: Int -> Key Note -> ShowS #

show :: Key Note -> String #

showList :: [Key Note] -> ShowS #

Show (Key User) Source # 
Instance details

Defined in Model

Methods

showsPrec :: Int -> Key User -> ShowS #

show :: Key User -> String #

showList :: [Key User] -> ShowS #

(BackendCompatible b s, Show (BackendKey b)) => Show (BackendKey (Compatible b s)) 
Instance details

Defined in Database.Persist.Compatible.Types

(PersistCore b, PersistCore (RawSqlite b), Show (BackendKey b)) => Show (BackendKey (RawSqlite b)) 
Instance details

Defined in Database.Persist.Sqlite

Show a => Show (ParseState a) 
Instance details

Defined in Database.Persist.Quasi.Internal

Methods

showsPrec :: Int -> ParseState a -> ShowS #

show :: ParseState a -> String #

showList :: [ParseState a] -> ShowS #

Show a => Show (Single a) 
Instance details

Defined in Database.Persist.Sql.Types

Methods

showsPrec :: Int -> Single a -> ShowS #

show :: Single a -> String #

showList :: [Single a] -> ShowS #

Show a => Show (AnnotDetails a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Show (Doc a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

showsPrec :: Int -> Doc a -> ShowS #

show :: Doc a -> String #

showList :: [Doc a] -> ShowS #

Show a => Show (Span a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

showsPrec :: Int -> Span a -> ShowS #

show :: Span a -> String #

showList :: [Span a] -> ShowS #

Show a => Show (PreProc a) 
Instance details

Defined in Text.Show.Pretty

Methods

showsPrec :: Int -> PreProc a -> ShowS #

show :: PreProc a -> String #

showList :: [PreProc a] -> ShowS #

Show a => Show (Array a) 
Instance details

Defined in Data.Primitive.Array

Methods

showsPrec :: Int -> Array a -> ShowS #

show :: Array a -> String #

showList :: [Array a] -> ShowS #

(Show a, Prim a) => Show (PrimArray a)

Since: primitive-0.6.4.0

Instance details

Defined in Data.Primitive.PrimArray

Show a => Show (SmallArray a) 
Instance details

Defined in Data.Primitive.SmallArray

Show g => Show (StateGen g) 
Instance details

Defined in System.Random.Internal

Methods

showsPrec :: Int -> StateGen g -> ShowS #

show :: StateGen g -> String #

showList :: [StateGen g] -> ShowS #

Show g => Show (AtomicGen g) 
Instance details

Defined in System.Random.Stateful

Show g => Show (IOGen g) 
Instance details

Defined in System.Random.Stateful

Methods

showsPrec :: Int -> IOGen g -> ShowS #

show :: IOGen g -> String #

showList :: [IOGen g] -> ShowS #

Show g => Show (STGen g) 
Instance details

Defined in System.Random.Stateful

Methods

showsPrec :: Int -> STGen g -> ShowS #

show :: STGen g -> String #

showList :: [STGen g] -> ShowS #

Show g => Show (TGen g) 
Instance details

Defined in System.Random.Stateful

Methods

showsPrec :: Int -> TGen g -> ShowS #

show :: TGen g -> String #

showList :: [TGen g] -> ShowS #

Show v => Show (Result v) 
Instance details

Defined in Text.Hamlet.Parse

Methods

showsPrec :: Int -> Result v -> ShowS #

show :: Result v -> String #

showList :: [Result v] -> ShowS #

Show a => Show (Maybe a) 
Instance details

Defined in Data.Strict.Maybe

Methods

showsPrec :: Int -> Maybe a -> ShowS #

show :: Maybe a -> String #

showList :: [Maybe a] -> ShowS #

Show flag => Show (TyVarBndr flag) 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> TyVarBndr flag -> ShowS #

show :: TyVarBndr flag -> String #

showList :: [TyVarBndr flag] -> ShowS #

Show (Memoized a) 
Instance details

Defined in UnliftIO.Memoize

Methods

showsPrec :: Int -> Memoized a -> ShowS #

show :: Memoized a -> String #

showList :: [Memoized a] -> ShowS #

Show a => Show (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

showsPrec :: Int -> HashSet a -> ShowS #

show :: HashSet a -> String #

showList :: [HashSet a] -> ShowS #

Show a => Show (Vector a) 
Instance details

Defined in Data.Vector

Methods

showsPrec :: Int -> Vector a -> ShowS #

show :: Vector a -> String #

showList :: [Vector a] -> ShowS #

(Show a, Prim a) => Show (Vector a) 
Instance details

Defined in Data.Vector.Primitive

Methods

showsPrec :: Int -> Vector a -> ShowS #

show :: Vector a -> String #

showList :: [Vector a] -> ShowS #

(Show a, Storable a) => Show (Vector a) 
Instance details

Defined in Data.Vector.Storable

Methods

showsPrec :: Int -> Vector a -> ShowS #

show :: Vector a -> String #

showList :: [Vector a] -> ShowS #

Show c => Show (FileInfo c) 
Instance details

Defined in Network.Wai.Parse

Methods

showsPrec :: Int -> FileInfo c -> ShowS #

show :: FileInfo c -> String #

showList :: [FileInfo c] -> ShowS #

Show (Creds master) 
Instance details

Defined in Yesod.Auth

Methods

showsPrec :: Int -> Creds master -> ShowS #

show :: Creds master -> String #

showList :: [Creds master] -> ShowS #

Show url => Show (Location url) 
Instance details

Defined in Yesod.Core.Types

Methods

showsPrec :: Int -> Location url -> ShowS #

show :: Location url -> String #

showList :: [Location url] -> ShowS #

Show url => Show (Script url) 
Instance details

Defined in Yesod.Core.Types

Methods

showsPrec :: Int -> Script url -> ShowS #

show :: Script url -> String #

showList :: [Script url] -> ShowS #

Show url => Show (Stylesheet url) 
Instance details

Defined in Yesod.Core.Types

Methods

showsPrec :: Int -> Stylesheet url -> ShowS #

show :: Stylesheet url -> String #

showList :: [Stylesheet url] -> ShowS #

Show (Route App) Source # 
Instance details

Defined in Foundation

Show (Route Auth) 
Instance details

Defined in Yesod.Auth.Routes

Show (Route LiteApp) 
Instance details

Defined in Yesod.Core.Internal.LiteApp

Show (Route WaiSubsite) 
Instance details

Defined in Yesod.Core.Types

Show (Route WaiSubsiteWithAuth) 
Instance details

Defined in Yesod.Core.Types

Show (Route Static) 
Instance details

Defined in Yesod.Static

Show typ => Show (Dispatch typ) 
Instance details

Defined in Yesod.Routes.TH.Types

Methods

showsPrec :: Int -> Dispatch typ -> ShowS #

show :: Dispatch typ -> String #

showList :: [Dispatch typ] -> ShowS #

Show a => Show (FlatResource a) 
Instance details

Defined in Yesod.Routes.TH.Types

Show typ => Show (Piece typ) 
Instance details

Defined in Yesod.Routes.TH.Types

Methods

showsPrec :: Int -> Piece typ -> ShowS #

show :: Piece typ -> String #

showList :: [Piece typ] -> ShowS #

Show typ => Show (Resource typ) 
Instance details

Defined in Yesod.Routes.TH.Types

Methods

showsPrec :: Int -> Resource typ -> ShowS #

show :: Resource typ -> String #

showList :: [Resource typ] -> ShowS #

Show typ => Show (ResourceTree typ) 
Instance details

Defined in Yesod.Routes.TH.Types

Show a => Show (FormResult a) 
Instance details

Defined in Yesod.Form.Types

Show a => Show (Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> Maybe a -> ShowS #

show :: Maybe a -> String #

showList :: [Maybe a] -> ShowS #

Show a => Show (a)

Since: base-4.15

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a) -> ShowS #

show :: (a) -> String #

showList :: [(a)] -> ShowS #

Show a => Show [a]

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> [a] -> ShowS #

show :: [a] -> String #

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

(Show i, Show r) => Show (IResult i r) 
Instance details

Defined in Data.Attoparsec.Internal.Types

Methods

showsPrec :: Int -> IResult i r -> ShowS #

show :: IResult i r -> String #

showList :: [IResult i r] -> ShowS #

(Show a, Show b) => Show (Either a b)

Since: base-3.0

Instance details

Defined in Data.Either

Methods

showsPrec :: Int -> Either a b -> ShowS #

show :: Either a b -> String #

showList :: [Either a b] -> ShowS #

HasResolution a => Show (Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Methods

showsPrec :: Int -> Fixed a -> ShowS #

show :: Fixed a -> String #

showList :: [Fixed a] -> ShowS #

Show (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

showsPrec :: Int -> Proxy s -> ShowS #

show :: Proxy s -> String #

showList :: [Proxy s] -> ShowS #

(Show a, Show b) => Show (Arg a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

showsPrec :: Int -> Arg a b -> ShowS #

show :: Arg a b -> String #

showList :: [Arg a b] -> ShowS #

Show (TypeRep a) 
Instance details

Defined in Data.Typeable.Internal

Methods

showsPrec :: Int -> TypeRep a -> ShowS #

show :: TypeRep a -> String #

showList :: [TypeRep a] -> ShowS #

Show (U1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> U1 p -> ShowS #

show :: U1 p -> String #

showList :: [U1 p] -> ShowS #

Show (V1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> V1 p -> ShowS #

show :: V1 p -> String #

showList :: [V1 p] -> ShowS #

Show (ST s a)

Since: base-2.1

Instance details

Defined in GHC.ST

Methods

showsPrec :: Int -> ST s a -> ShowS #

show :: ST s a -> String #

showList :: [ST s a] -> ShowS #

(Show k, Show a) => Show (Map k a) 
Instance details

Defined in Data.Map.Internal

Methods

showsPrec :: Int -> Map k a -> ShowS #

show :: Map k a -> String #

showList :: [Map k a] -> ShowS #

(Show a, Show b) => Show (a :& b) 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Methods

showsPrec :: Int -> (a :& b) -> ShowS #

show :: (a :& b) -> String #

showList :: [a :& b] -> ShowS #

(Show1 f, Show a) => Show (Cofree f a) 
Instance details

Defined in Control.Comonad.Cofree

Methods

showsPrec :: Int -> Cofree f a -> ShowS #

show :: Cofree f a -> String #

showList :: [Cofree f a] -> ShowS #

(Show1 f, Show a) => Show (Free f a) 
Instance details

Defined in Control.Monad.Free

Methods

showsPrec :: Int -> Free f a -> ShowS #

show :: Free f a -> String #

showList :: [Free f a] -> ShowS #

Show (VarExp msg url) 
Instance details

Defined in Text.Hamlet

Methods

showsPrec :: Int -> VarExp msg url -> ShowS #

show :: VarExp msg url -> String #

showList :: [VarExp msg url] -> ShowS #

(Show a, Show b) => Show (Either a b) 
Instance details

Defined in Data.Strict.Either

Methods

showsPrec :: Int -> Either a b -> ShowS #

show :: Either a b -> String #

showList :: [Either a b] -> ShowS #

(Show a, Show b) => Show (These a b) 
Instance details

Defined in Data.Strict.These

Methods

showsPrec :: Int -> These a b -> ShowS #

show :: These a b -> String #

showList :: [These a b] -> ShowS #

(Show a, Show b) => Show (Pair a b) 
Instance details

Defined in Data.Strict.Tuple

Methods

showsPrec :: Int -> Pair a b -> ShowS #

show :: Pair a b -> String #

showList :: [Pair a b] -> ShowS #

(Show a, Show b) => Show (These a b) 
Instance details

Defined in Data.These

Methods

showsPrec :: Int -> These a b -> ShowS #

show :: These a b -> String #

showList :: [These a b] -> ShowS #

(Show1 f, Show a) => Show (Lift f a) 
Instance details

Defined in Control.Applicative.Lift

Methods

showsPrec :: Int -> Lift f a -> ShowS #

show :: Lift f a -> String #

showList :: [Lift f a] -> ShowS #

(Show1 m, Show a) => Show (MaybeT m a) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

showsPrec :: Int -> MaybeT m a -> ShowS #

show :: MaybeT m a -> String #

showList :: [MaybeT m a] -> ShowS #

(Show k, Show v) => Show (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

showsPrec :: Int -> HashMap k v -> ShowS #

show :: HashMap k v -> String #

showList :: [HashMap k v] -> ShowS #

(Show a, Show b) => Show (Fragment a b) 
Instance details

Defined in Yesod.Core.Handler

Methods

showsPrec :: Int -> Fragment a b -> ShowS #

show :: Fragment a b -> String #

showList :: [Fragment a b] -> ShowS #

(Show a, Show b) => Show (a, b)

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b) -> ShowS #

show :: (a, b) -> String #

showList :: [(a, b)] -> ShowS #

Show a => Show (Const a b)

This instance would be equivalent to the derived instances of the Const newtype if the getConst field were removed

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Const

Methods

showsPrec :: Int -> Const a b -> ShowS #

show :: Const a b -> String #

showList :: [Const a b] -> ShowS #

Show (f a) => Show (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

showsPrec :: Int -> Ap f a -> ShowS #

show :: Ap f a -> String #

showList :: [Ap f a] -> ShowS #

Show (f a) => Show (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

showsPrec :: Int -> Alt f a -> ShowS #

show :: Alt f a -> String #

showList :: [Alt f a] -> ShowS #

Show (OrderingI a b) 
Instance details

Defined in Data.Type.Ord

Methods

showsPrec :: Int -> OrderingI a b -> ShowS #

show :: OrderingI a b -> String #

showList :: [OrderingI a b] -> ShowS #

Show (f p) => Show (Rec1 f p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> Rec1 f p -> ShowS #

show :: Rec1 f p -> String #

showList :: [Rec1 f p] -> ShowS #

Show (URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> URec Char p -> ShowS #

show :: URec Char p -> String #

showList :: [URec Char p] -> ShowS #

Show (URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> URec Double p -> ShowS #

show :: URec Double p -> String #

showList :: [URec Double p] -> ShowS #

Show (URec Float p) 
Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> URec Float p -> ShowS #

show :: URec Float p -> String #

showList :: [URec Float p] -> ShowS #

Show (URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> URec Int p -> ShowS #

show :: URec Int p -> String #

showList :: [URec Int p] -> ShowS #

Show (URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> URec Word p -> ShowS #

show :: URec Word p -> String #

showList :: [URec Word p] -> ShowS #

Show (p a a) => Show (Join p a) 
Instance details

Defined in Data.Bifunctor.Join

Methods

showsPrec :: Int -> Join p a -> ShowS #

show :: Join p a -> String #

showList :: [Join p a] -> ShowS #

(Show a, Show (f b)) => Show (FreeF f a b) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

showsPrec :: Int -> FreeF f a b -> ShowS #

show :: FreeF f a b -> String #

showList :: [FreeF f a b] -> ShowS #

(Show1 f, Show1 m, Show a) => Show (FreeT f m a) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

showsPrec :: Int -> FreeT f m a -> ShowS #

show :: FreeT f m a -> String #

showList :: [FreeT f m a] -> ShowS #

Show b => Show (Tagged s b) 
Instance details

Defined in Data.Tagged

Methods

showsPrec :: Int -> Tagged s b -> ShowS #

show :: Tagged s b -> String #

showList :: [Tagged s b] -> ShowS #

(Show (f a), Show (g a), Show a) => Show (These1 f g a) 
Instance details

Defined in Data.Functor.These

Methods

showsPrec :: Int -> These1 f g a -> ShowS #

show :: These1 f g a -> String #

showList :: [These1 f g a] -> ShowS #

(Show1 f, Show a) => Show (Backwards f a) 
Instance details

Defined in Control.Applicative.Backwards

Methods

showsPrec :: Int -> Backwards f a -> ShowS #

show :: Backwards f a -> String #

showList :: [Backwards f a] -> ShowS #

(Show e, Show1 m, Show a) => Show (ExceptT e m a) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

showsPrec :: Int -> ExceptT e m a -> ShowS #

show :: ExceptT e m a -> String #

showList :: [ExceptT e m a] -> ShowS #

(Show1 f, Show a) => Show (IdentityT f a) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

showsPrec :: Int -> IdentityT f a -> ShowS #

show :: IdentityT f a -> String #

showList :: [IdentityT f a] -> ShowS #

(Show w, Show1 m, Show a) => Show (WriterT w m a) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

showsPrec :: Int -> WriterT w m a -> ShowS #

show :: WriterT w m a -> String #

showList :: [WriterT w m a] -> ShowS #

(Show w, Show1 m, Show a) => Show (WriterT w m a) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

showsPrec :: Int -> WriterT w m a -> ShowS #

show :: WriterT w m a -> String #

showList :: [WriterT w m a] -> ShowS #

Show a => Show (Constant a b) 
Instance details

Defined in Data.Functor.Constant

Methods

showsPrec :: Int -> Constant a b -> ShowS #

show :: Constant a b -> String #

showList :: [Constant a b] -> ShowS #

(Show1 f, Show a) => Show (Reverse f a) 
Instance details

Defined in Data.Functor.Reverse

Methods

showsPrec :: Int -> Reverse f a -> ShowS #

show :: Reverse f a -> String #

showList :: [Reverse f a] -> ShowS #

(Show a, Show b, Show c) => Show (a, b, c)

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c) -> ShowS #

show :: (a, b, c) -> String #

showList :: [(a, b, c)] -> ShowS #

(Show (f a), Show (g a)) => Show (Product f g a)

Since: base-4.18.0.0

Instance details

Defined in Data.Functor.Product

Methods

showsPrec :: Int -> Product f g a -> ShowS #

show :: Product f g a -> String #

showList :: [Product f g a] -> ShowS #

(Show (f a), Show (g a)) => Show (Sum f g a)

Since: base-4.18.0.0

Instance details

Defined in Data.Functor.Sum

Methods

showsPrec :: Int -> Sum f g a -> ShowS #

show :: Sum f g a -> String #

showList :: [Sum f g a] -> ShowS #

(Show (f p), Show (g p)) => Show ((f :*: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> (f :*: g) p -> ShowS #

show :: (f :*: g) p -> String #

showList :: [(f :*: g) p] -> ShowS #

(Show (f p), Show (g p)) => Show ((f :+: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> (f :+: g) p -> ShowS #

show :: (f :+: g) p -> String #

showList :: [(f :+: g) p] -> ShowS #

Show c => Show (K1 i c p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> K1 i c p -> ShowS #

show :: K1 i c p -> String #

showList :: [K1 i c p] -> ShowS #

(Show a, Show b, Show c, Show d) => Show (a, b, c, d)

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c, d) -> ShowS #

show :: (a, b, c, d) -> String #

showList :: [(a, b, c, d)] -> ShowS #

Show (f (g a)) => Show (Compose f g a)

Since: base-4.18.0.0

Instance details

Defined in Data.Functor.Compose

Methods

showsPrec :: Int -> Compose f g a -> ShowS #

show :: Compose f g a -> String #

showList :: [Compose f g a] -> ShowS #

Show (f (g p)) => Show ((f :.: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> (f :.: g) p -> ShowS #

show :: (f :.: g) p -> String #

showList :: [(f :.: g) p] -> ShowS #

Show (f p) => Show (M1 i c f p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> M1 i c f p -> ShowS #

show :: M1 i c f p -> String #

showList :: [M1 i c f p] -> ShowS #

Show (f a) => Show (Clown f a b) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

showsPrec :: Int -> Clown f a b -> ShowS #

show :: Clown f a b -> String #

showList :: [Clown f a b] -> ShowS #

Show (p b a) => Show (Flip p a b) 
Instance details

Defined in Data.Bifunctor.Flip

Methods

showsPrec :: Int -> Flip p a b -> ShowS #

show :: Flip p a b -> String #

showList :: [Flip p a b] -> ShowS #

Show (g b) => Show (Joker g a b) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

showsPrec :: Int -> Joker g a b -> ShowS #

show :: Joker g a b -> String #

showList :: [Joker g a b] -> ShowS #

Show (p a b) => Show (WrappedBifunctor p a b) 
Instance details

Defined in Data.Bifunctor.Wrapped

(Show a, Show b, Show c, Show d, Show e) => Show (a, b, c, d, e)

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c, d, e) -> ShowS #

show :: (a, b, c, d, e) -> String #

showList :: [(a, b, c, d, e)] -> ShowS #

(Show (f a b), Show (g a b)) => Show (Product f g a b) 
Instance details

Defined in Data.Bifunctor.Product

Methods

showsPrec :: Int -> Product f g a b -> ShowS #

show :: Product f g a b -> String #

showList :: [Product f g a b] -> ShowS #

(Show (p a b), Show (q a b)) => Show (Sum p q a b) 
Instance details

Defined in Data.Bifunctor.Sum

Methods

showsPrec :: Int -> Sum p q a b -> ShowS #

show :: Sum p q a b -> String #

showList :: [Sum p q a b] -> ShowS #

(Show a, Show b, Show c, Show d, Show e, Show f) => Show (a, b, c, d, e, f)

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f) -> ShowS #

show :: (a, b, c, d, e, f) -> String #

showList :: [(a, b, c, d, e, f)] -> ShowS #

Show (f (p a b)) => Show (Tannen f p a b) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

showsPrec :: Int -> Tannen f p a b -> ShowS #

show :: Tannen f p a b -> String #

showList :: [Tannen f p a b] -> ShowS #

(Show a, Show b, Show c, Show d, Show e, Show f, Show g) => Show (a, b, c, d, e, f, g)

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g) -> ShowS #

show :: (a, b, c, d, e, f, g) -> String #

showList :: [(a, b, c, d, e, f, g)] -> ShowS #

(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h) => Show (a, b, c, d, e, f, g, h)

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g, h) -> ShowS #

show :: (a, b, c, d, e, f, g, h) -> String #

showList :: [(a, b, c, d, e, f, g, h)] -> ShowS #

Show (p (f a) (g b)) => Show (Biff p f g a b) 
Instance details

Defined in Data.Bifunctor.Biff

Methods

showsPrec :: Int -> Biff p f g a b -> ShowS #

show :: Biff p f g a b -> String #

showList :: [Biff p f g a b] -> ShowS #

(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i) => Show (a, b, c, d, e, f, g, h, i)

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g, h, i) -> ShowS #

show :: (a, b, c, d, e, f, g, h, i) -> String #

showList :: [(a, b, c, d, e, f, g, h, i)] -> ShowS #

(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j) => Show (a, b, c, d, e, f, g, h, i, j)

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j) -> ShowS #

show :: (a, b, c, d, e, f, g, h, i, j) -> String #

showList :: [(a, b, c, d, e, f, g, h, i, j)] -> ShowS #

(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k) => Show (a, b, c, d, e, f, g, h, i, j, k)

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k) -> ShowS #

show :: (a, b, c, d, e, f, g, h, i, j, k) -> String #

showList :: [(a, b, c, d, e, f, g, h, i, j, k)] -> ShowS #

(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l) => Show (a, b, c, d, e, f, g, h, i, j, k, l)

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k, l) -> ShowS #

show :: (a, b, c, d, e, f, g, h, i, j, k, l) -> String #

showList :: [(a, b, c, d, e, f, g, h, i, j, k, l)] -> ShowS #

(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m) => Show (a, b, c, d, e, f, g, h, i, j, k, l, m)

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> ShowS #

show :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> String #

showList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m)] -> ShowS #

(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n) => Show (a, b, c, d, e, f, g, h, i, j, k, l, m, n)

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> ShowS #

show :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> String #

showList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] -> ShowS #

(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n, Show o) => Show (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> ShowS #

show :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> String #

showList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)] -> ShowS #

data Void #

Uninhabited data type

Since: base-4.8.0.0

Instances

Instances details
FromJSON Void 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSONKey Void

Since: aeson-2.1.2.0

Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON Void 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSONKey Void

Since: aeson-2.1.2.0

Instance details

Defined in Data.Aeson.Types.ToJSON

Semigroup Void

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: Void -> Void -> Void #

sconcat :: NonEmpty Void -> Void #

stimes :: Integral b => b -> Void -> Void #

Exception Void

Since: base-4.8.0.0

Instance details

Defined in GHC.Exception.Type

Generic Void 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Void :: Type -> Type #

Methods

from :: Void -> Rep Void x #

to :: Rep Void x -> Void #

Read Void

Reading a Void value is always a parse error, considering Void as a data type with no constructors.

Since: base-4.8.0.0

Instance details

Defined in GHC.Read

Show Void

Since: base-4.8.0.0

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> Void -> ShowS #

show :: Void -> String #

showList :: [Void] -> ShowS #

NFData Void

Defined as rnf = absurd.

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Void -> () #

Eq Void

Since: base-4.8.0.0

Instance details

Defined in GHC.Base

Methods

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

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

Ord Void

Since: base-4.8.0.0

Instance details

Defined in GHC.Base

Methods

compare :: Void -> Void -> Ordering #

(<) :: Void -> Void -> Bool #

(<=) :: Void -> Void -> Bool #

(>) :: Void -> Void -> Bool #

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

max :: Void -> Void -> Void #

min :: Void -> Void -> Void #

Hashable Void 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Void -> Int #

hash :: Void -> Int #

FromFormKey Void 
Instance details

Defined in Web.Internal.FormUrlEncoded

ToFormKey Void 
Instance details

Defined in Web.Internal.FormUrlEncoded

Methods

toFormKey :: Void -> Text #

FromHttpApiData Void

Parsing a Void value is always an error, considering Void as a data type with no constructors.

Instance details

Defined in Web.Internal.HttpApiData

ToHttpApiData Void 
Instance details

Defined in Web.Internal.HttpApiData

ToContent Void 
Instance details

Defined in Yesod.Core.Content

Methods

toContent :: Void -> Content #

ToTypedContent Void 
Instance details

Defined in Yesod.Core.Content

Lift Void

Since: template-haskell-2.15.0.0

Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Void -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Void -> Code m Void #

type Rep Void

Since: base-4.8.0.0

Instance details

Defined in GHC.Generics

type Rep Void = D1 ('MetaData "Void" "GHC.Base" "base" 'False) (V1 :: Type -> Type)

class Semigroup a => Monoid a where #

The class of monoids (types with an associative binary operation that has an identity). Instances should satisfy the following:

Right identity
x <> mempty = x
Left identity
mempty <> x = x
Associativity
x <> (y <> z) = (x <> y) <> z (Semigroup law)
Concatenation
mconcat = foldr (<>) mempty

You can alternatively define mconcat instead of mempty, in which case the laws are:

Unit
mconcat (pure x) = x
Multiplication
mconcat (join xss) = mconcat (fmap mconcat xss)
Subclass
mconcat (toList xs) = sconcat xs

The method names refer to the monoid of lists under concatenation, but there are many other instances.

Some types can be viewed as a monoid in more than one way, e.g. both addition and multiplication on numbers. In such cases we often define newtypes and make those instances of Monoid, e.g. Sum and Product.

NOTE: Semigroup is a superclass of Monoid since base-4.11.0.0.

Minimal complete definition

mempty | mconcat

Methods

mempty :: a #

Identity of mappend

>>> "Hello world" <> mempty
"Hello world"

mappend :: a -> a -> a #

An associative operation

NOTE: This method is redundant and has the default implementation mappend = (<>) since base-4.11.0.0. Should it be implemented manually, since mappend is a synonym for (<>), it is expected that the two functions are defined the same way. In a future GHC release mappend will be removed from Monoid.

mconcat :: [a] -> a #

Fold a list using the monoid.

For most types, the default definition for mconcat will be used, but the function is included in the class definition so that an optimized version can be provided for specific types.

>>> mconcat ["Hello", " ", "Haskell", "!"]
"Hello Haskell!"

Instances

Instances details
Monoid Series 
Instance details

Defined in Data.Aeson.Encoding.Internal

Monoid Key 
Instance details

Defined in Data.Aeson.Key

Methods

mempty :: Key #

mappend :: Key -> Key -> Key #

mconcat :: [Key] -> Key #

Monoid More 
Instance details

Defined in Data.Attoparsec.Internal.Types

Methods

mempty :: More #

mappend :: More -> More -> More #

mconcat :: [More] -> More #

Monoid ByteArray

Since: base-4.17.0.0

Instance details

Defined in Data.Array.Byte

Monoid All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: All #

mappend :: All -> All -> All #

mconcat :: [All] -> All #

Monoid Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Any #

mappend :: Any -> Any -> Any #

mconcat :: [Any] -> Any #

Monoid String 
Instance details

Defined in Basement.UTF8.Base

Monoid Attribute 
Instance details

Defined in Text.Blaze.Internal

Monoid AttributeValue 
Instance details

Defined in Text.Blaze.Internal

Monoid ChoiceString 
Instance details

Defined in Text.Blaze.Internal

Monoid Builder 
Instance details

Defined in Data.ByteString.Builder.Internal

Monoid ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

Monoid ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Monoid ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Monoid IntSet 
Instance details

Defined in Data.IntSet.Internal

Monoid DistinctClause 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Monoid GroupByClause 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Monoid LimitClause 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Monoid LockingClause 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Monoid SideData 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Monoid WhereClause 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Monoid LogStr 
Instance details

Defined in System.Log.FastLogger.LogStr

Monoid OsString

"String-Concatenation" for OsString. This is not the same as (</>).

Instance details

Defined in System.OsString.Internal.Types

Monoid PosixString 
Instance details

Defined in System.OsString.Internal.Types

Monoid WindowsString 
Instance details

Defined in System.OsString.Internal.Types

Monoid Ordering

Since: base-2.1

Instance details

Defined in GHC.Base

Monoid Form 
Instance details

Defined in Web.Internal.FormUrlEncoded

Methods

mempty :: Form #

mappend :: Form -> Form -> Form #

mconcat :: [Form] -> Form #

Monoid CookieJar

Since 1.9

Instance details

Defined in Network.HTTP.Client.Types

Monoid RequestBody 
Instance details

Defined in Network.HTTP.Client.Types

Monoid EntityConstraintDefs 
Instance details

Defined in Database.Persist.Quasi.Internal

Methods

mempty :: EntityConstraintDefs #

mappend :: EntityConstraintDefs -> EntityConstraintDefs -> EntityConstraintDefs #

mconcat :: [EntityConstraintDefs] -> EntityConstraintDefs #

Monoid Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Methods

mempty :: Doc #

mappend :: Doc -> Doc -> Doc #

mconcat :: [Doc] -> Doc #

Monoid Mixin 
Instance details

Defined in Text.Internal.Css

Methods

mempty :: Mixin #

mappend :: Mixin -> Mixin -> Mixin #

mconcat :: [Mixin] -> Mixin #

Monoid Javascript 
Instance details

Defined in Text.Julius

Monoid Builder 
Instance details

Defined in Data.Text.Internal.Builder

Monoid ShortText 
Instance details

Defined in Data.Text.Short.Internal

Monoid LiteApp 
Instance details

Defined in Yesod.Core.Internal.LiteApp

Monoid Enctype 
Instance details

Defined in Yesod.Form.Types

Monoid ()

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: () #

mappend :: () -> () -> () #

mconcat :: [()] -> () #

Monoid (KeyMap v) 
Instance details

Defined in Data.Aeson.KeyMap

Methods

mempty :: KeyMap v #

mappend :: KeyMap v -> KeyMap v -> KeyMap v #

mconcat :: [KeyMap v] -> KeyMap v #

Monoid (IResult a) 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

mempty :: IResult a #

mappend :: IResult a -> IResult a -> IResult a #

mconcat :: [IResult a] -> IResult a #

Monoid (Parser a) 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

mempty :: Parser a #

mappend :: Parser a -> Parser a -> Parser a #

mconcat :: [Parser a] -> Parser a #

Monoid (Result a) 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

mempty :: Result a #

mappend :: Result a -> Result a -> Result a #

mconcat :: [Result a] -> Result a #

(Semigroup a, Monoid a) => Monoid (Concurrently a)

Since: async-2.1.0

Instance details

Defined in Control.Concurrent.Async.Internal

Monoid a => Monoid (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Methods

mempty :: Identity a #

mappend :: Identity a -> Identity a -> Identity a #

mconcat :: [Identity a] -> Identity a #

Monoid (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

mempty :: First a #

mappend :: First a -> First a -> First a #

mconcat :: [First a] -> First a #

Monoid (Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

mempty :: Last a #

mappend :: Last a -> Last a -> Last a #

mconcat :: [Last a] -> Last a #

Monoid a => Monoid (Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

mempty :: Down a #

mappend :: Down a -> Down a -> Down a #

mconcat :: [Down a] -> Down a #

(Ord a, Bounded a) => Monoid (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mempty :: Max a #

mappend :: Max a -> Max a -> Max a #

mconcat :: [Max a] -> Max a #

(Ord a, Bounded a) => Monoid (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mempty :: Min a #

mappend :: Min a -> Min a -> Min a #

mconcat :: [Min a] -> Min a #

Monoid m => Monoid (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Monoid a => Monoid (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Dual a #

mappend :: Dual a -> Dual a -> Dual a #

mconcat :: [Dual a] -> Dual a #

Monoid (Endo a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Endo a #

mappend :: Endo a -> Endo a -> Endo a #

mconcat :: [Endo a] -> Endo a #

Num a => Monoid (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Product a #

mappend :: Product a -> Product a -> Product a #

mconcat :: [Product a] -> Product a #

Num a => Monoid (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Sum a #

mappend :: Sum a -> Sum a -> Sum a #

mconcat :: [Sum a] -> Sum a #

Monoid a => Monoid (STM a)

Since: base-4.17.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

mempty :: STM a #

mappend :: STM a -> STM a -> STM a #

mconcat :: [STM a] -> STM a #

(Generic a, Monoid (Rep a ())) => Monoid (Generically a)

Since: base-4.17.0.0

Instance details

Defined in GHC.Generics

Monoid p => Monoid (Par1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: Par1 p #

mappend :: Par1 p -> Par1 p -> Par1 p #

mconcat :: [Par1 p] -> Par1 p #

PrimType ty => Monoid (Block ty) 
Instance details

Defined in Basement.Block.Base

Methods

mempty :: Block ty #

mappend :: Block ty -> Block ty -> Block ty #

mconcat :: [Block ty] -> Block ty #

Monoid (CountOf ty) 
Instance details

Defined in Basement.Types.OffsetSize

Methods

mempty :: CountOf ty #

mappend :: CountOf ty -> CountOf ty -> CountOf ty #

mconcat :: [CountOf ty] -> CountOf ty #

PrimType ty => Monoid (UArray ty) 
Instance details

Defined in Basement.UArray.Base

Methods

mempty :: UArray ty #

mappend :: UArray ty -> UArray ty -> UArray ty #

mconcat :: [UArray ty] -> UArray ty #

Monoid a => Monoid (MarkupM a) 
Instance details

Defined in Text.Blaze.Internal

Methods

mempty :: MarkupM a #

mappend :: MarkupM a -> MarkupM a -> MarkupM a #

mconcat :: [MarkupM a] -> MarkupM a #

Monoid s => Monoid (CI s) 
Instance details

Defined in Data.CaseInsensitive.Internal

Methods

mempty :: CI s #

mappend :: CI s -> CI s -> CI s #

mconcat :: [CI s] -> CI s #

Monoid (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

mempty :: IntMap a #

mappend :: IntMap a -> IntMap a -> IntMap a #

mconcat :: [IntMap a] -> IntMap a #

Monoid (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

mempty :: Seq a #

mappend :: Seq a -> Seq a -> Seq a #

mconcat :: [Seq a] -> Seq a #

Monoid (MergeSet a) 
Instance details

Defined in Data.Set.Internal

Methods

mempty :: MergeSet a #

mappend :: MergeSet a -> MergeSet a -> MergeSet a #

mconcat :: [MergeSet a] -> MergeSet a #

Ord a => Monoid (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

mempty :: Set a #

mappend :: Set a -> Set a -> Set a #

mconcat :: [Set a] -> Set a #

Monoid (DList a) 
Instance details

Defined in Data.DList.Internal

Methods

mempty :: DList a #

mappend :: DList a -> DList a -> DList a #

mconcat :: [DList a] -> DList a #

Monoid a => Monoid (IO a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

mempty :: IO a #

mappend :: IO a -> IO a -> IO a #

mconcat :: [IO a] -> IO a #

Monoid (SetOnceAtMost a) 
Instance details

Defined in Database.Persist.Quasi.Internal

Methods

mempty :: SetOnceAtMost a #

mappend :: SetOnceAtMost a -> SetOnceAtMost a -> SetOnceAtMost a #

mconcat :: [SetOnceAtMost a] -> SetOnceAtMost a #

Monoid (Doc a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

mempty :: Doc a #

mappend :: Doc a -> Doc a -> Doc a #

mconcat :: [Doc a] -> Doc a #

Monoid (Array a) 
Instance details

Defined in Data.Primitive.Array

Methods

mempty :: Array a #

mappend :: Array a -> Array a -> Array a #

mconcat :: [Array a] -> Array a #

Monoid (PrimArray a)

Since: primitive-0.6.4.0

Instance details

Defined in Data.Primitive.PrimArray

Monoid (SmallArray a) 
Instance details

Defined in Data.Primitive.SmallArray

Semigroup a => Monoid (Maybe a) 
Instance details

Defined in Data.Strict.Maybe

Methods

mempty :: Maybe a #

mappend :: Maybe a -> Maybe a -> Maybe a #

mconcat :: [Maybe a] -> Maybe a #

Monoid a => Monoid (Q a)

Since: template-haskell-2.17.0.0

Instance details

Defined in Language.Haskell.TH.Syntax

Methods

mempty :: Q a #

mappend :: Q a -> Q a -> Q a #

mconcat :: [Q a] -> Q a #

(Hashable a, Eq a) => Monoid (HashSet a)

mempty = empty

mappend = union

\(O(n+m)\)

To obtain good performance, the smaller set must be presented as the first argument.

Examples

Expand
>>> mappend (fromList [1,2]) (fromList [2,3])
fromList [1,2,3]
Instance details

Defined in Data.HashSet.Internal

Methods

mempty :: HashSet a #

mappend :: HashSet a -> HashSet a -> HashSet a #

mconcat :: [HashSet a] -> HashSet a #

Monoid (Vault s) 
Instance details

Defined in Data.Vault.ST.Lazy

Methods

mempty :: Vault s #

mappend :: Vault s -> Vault s -> Vault s #

mconcat :: [Vault s] -> Vault s #

Monoid (Vector a) 
Instance details

Defined in Data.Vector

Methods

mempty :: Vector a #

mappend :: Vector a -> Vector a -> Vector a #

mconcat :: [Vector a] -> Vector a #

Prim a => Monoid (Vector a) 
Instance details

Defined in Data.Vector.Primitive

Methods

mempty :: Vector a #

mappend :: Vector a -> Vector a -> Vector a #

mconcat :: [Vector a] -> Vector a #

Storable a => Monoid (Vector a) 
Instance details

Defined in Data.Vector.Storable

Methods

mempty :: Vector a #

mappend :: Vector a -> Vector a -> Vector a #

mconcat :: [Vector a] -> Vector a #

Monoid (Body url) 
Instance details

Defined in Yesod.Core.Types

Methods

mempty :: Body url #

mappend :: Body url -> Body url -> Body url #

mconcat :: [Body url] -> Body url #

Monoid (GWData a) 
Instance details

Defined in Yesod.Core.Types

Methods

mempty :: GWData a #

mappend :: GWData a -> GWData a -> GWData a #

mconcat :: [GWData a] -> GWData a #

Monoid (Head url) 
Instance details

Defined in Yesod.Core.Types

Methods

mempty :: Head url #

mappend :: Head url -> Head url -> Head url #

mconcat :: [Head url] -> Head url #

Monoid (UniqueList x) 
Instance details

Defined in Yesod.Core.Types

Monoid m => Monoid (FormResult m) 
Instance details

Defined in Yesod.Form.Types

Semigroup a => Monoid (Maybe a)

Lift a semigroup into Maybe forming a Monoid according to http://en.wikipedia.org/wiki/Monoid: "Any semigroup S may be turned into a monoid simply by adjoining an element e not in S and defining e*e = e and e*s = s = s*e for all s ∈ S."

Since 4.11.0: constraint on inner a value generalised from Monoid to Semigroup.

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: Maybe a #

mappend :: Maybe a -> Maybe a -> Maybe a #

mconcat :: [Maybe a] -> Maybe a #

Monoid a => Monoid (a)

Since: base-4.15

Instance details

Defined in GHC.Base

Methods

mempty :: (a) #

mappend :: (a) -> (a) -> (a) #

mconcat :: [(a)] -> (a) #

Monoid [a]

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: [a] #

mappend :: [a] -> [a] -> [a] #

mconcat :: [[a]] -> [a] #

(Semigroup a, Monoid a) => Monoid (ConcurrentlyE e a) 
Instance details

Defined in Control.Concurrent.Async.Internal

Monoid (Parser i a) 
Instance details

Defined in Data.Attoparsec.Internal.Types

Methods

mempty :: Parser i a #

mappend :: Parser i a -> Parser i a -> Parser i a #

mconcat :: [Parser i a] -> Parser i a #

Monoid (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

mempty :: Proxy s #

mappend :: Proxy s -> Proxy s -> Proxy s #

mconcat :: [Proxy s] -> Proxy s #

Monoid (U1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: U1 p #

mappend :: U1 p -> U1 p -> U1 p #

mconcat :: [U1 p] -> U1 p #

Monoid a => Monoid (ST s a)

Since: base-4.11.0.0

Instance details

Defined in GHC.ST

Methods

mempty :: ST s a #

mappend :: ST s a -> ST s a -> ST s a #

mconcat :: [ST s a] -> ST s a #

Ord k => Monoid (Map k v) 
Instance details

Defined in Data.Map.Internal

Methods

mempty :: Map k v #

mappend :: Map k v -> Map k v -> Map k v #

mconcat :: [Map k v] -> Map k v #

Applicative f => Monoid (Traversed a f) 
Instance details

Defined in Lens.Micro

Methods

mempty :: Traversed a f #

mappend :: Traversed a f -> Traversed a f -> Traversed a f #

mconcat :: [Traversed a f] -> Traversed a f #

(Applicative m, Monoid a) => Monoid (LoggingT m a) 
Instance details

Defined in Control.Monad.Logger

Methods

mempty :: LoggingT m a #

mappend :: LoggingT m a -> LoggingT m a -> LoggingT m a #

mconcat :: [LoggingT m a] -> LoggingT m a #

(Applicative m, Monoid a) => Monoid (NoLoggingT m a) 
Instance details

Defined in Control.Monad.Logger

Methods

mempty :: NoLoggingT m a #

mappend :: NoLoggingT m a -> NoLoggingT m a -> NoLoggingT m a #

mconcat :: [NoLoggingT m a] -> NoLoggingT m a #

(Applicative m, Monoid a) => Monoid (WriterLoggingT m a) 
Instance details

Defined in Control.Monad.Logger

(Monoid a, Monoid b) => Monoid (Pair a b) 
Instance details

Defined in Data.Strict.Tuple

Methods

mempty :: Pair a b #

mappend :: Pair a b -> Pair a b -> Pair a b #

mconcat :: [Pair a b] -> Pair a b #

(Monoid a, MonadUnliftIO m) => Monoid (Conc m a)

Since: unliftio-0.2.9.0

Instance details

Defined in UnliftIO.Internals.Async

Methods

mempty :: Conc m a #

mappend :: Conc m a -> Conc m a -> Conc m a #

mconcat :: [Conc m a] -> Conc m a #

(Semigroup a, Monoid a, MonadUnliftIO m) => Monoid (Concurrently m a)

Since: unliftio-0.1.0.0

Instance details

Defined in UnliftIO.Internals.Async

(Eq k, Hashable k) => Monoid (HashMap k v)

mempty = empty

mappend = union

If a key occurs in both maps, the mapping from the first will be the mapping in the result.

Examples

Expand
>>> mappend (fromList [(1,'a'),(2,'b')]) (fromList [(2,'c'),(3,'d')])
fromList [(1,'a'),(2,'b'),(3,'d')]
Instance details

Defined in Data.HashMap.Internal

Methods

mempty :: HashMap k v #

mappend :: HashMap k v -> HashMap k v -> HashMap k v #

mconcat :: [HashMap k v] -> HashMap k v #

a ~ () => Monoid (WidgetFor site a) 
Instance details

Defined in Yesod.Core.Types

Methods

mempty :: WidgetFor site a #

mappend :: WidgetFor site a -> WidgetFor site a -> WidgetFor site a #

mconcat :: [WidgetFor site a] -> WidgetFor site a #

(Monad m, Monoid a) => Monoid (AForm m a) 
Instance details

Defined in Yesod.Form.Types

Methods

mempty :: AForm m a #

mappend :: AForm m a -> AForm m a -> AForm m a #

mconcat :: [AForm m a] -> AForm m a #

(Monoid a, Monoid b) => Monoid (a, b)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: (a, b) #

mappend :: (a, b) -> (a, b) -> (a, b) #

mconcat :: [(a, b)] -> (a, b) #

Monoid b => Monoid (a -> b)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: a -> b #

mappend :: (a -> b) -> (a -> b) -> a -> b #

mconcat :: [a -> b] -> a -> b #

Monoid a => Monoid (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

mempty :: Const a b #

mappend :: Const a b -> Const a b -> Const a b #

mconcat :: [Const a b] -> Const a b #

(Applicative f, Monoid a) => Monoid (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

mempty :: Ap f a #

mappend :: Ap f a -> Ap f a -> Ap f a #

mconcat :: [Ap f a] -> Ap f a #

Alternative f => Monoid (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Alt f a #

mappend :: Alt f a -> Alt f a -> Alt f a #

mconcat :: [Alt f a] -> Alt f a #

Monoid (f p) => Monoid (Rec1 f p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: Rec1 f p #

mappend :: Rec1 f p -> Rec1 f p -> Rec1 f p #

mconcat :: [Rec1 f p] -> Rec1 f p #

(Semigroup a, Monoid a) => Monoid (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

mempty :: Tagged s a #

mappend :: Tagged s a -> Tagged s a -> Tagged s a #

mconcat :: [Tagged s a] -> Tagged s a #

Monoid a => Monoid (Constant a b) 
Instance details

Defined in Data.Functor.Constant

Methods

mempty :: Constant a b #

mappend :: Constant a b -> Constant a b -> Constant a b #

mconcat :: [Constant a b] -> Constant a b #

(Monoid a, Monoid b, Monoid c) => Monoid (a, b, c)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: (a, b, c) #

mappend :: (a, b, c) -> (a, b, c) -> (a, b, c) #

mconcat :: [(a, b, c)] -> (a, b, c) #

(Monoid (f a), Monoid (g a)) => Monoid (Product f g a)

Since: base-4.16.0.0

Instance details

Defined in Data.Functor.Product

Methods

mempty :: Product f g a #

mappend :: Product f g a -> Product f g a -> Product f g a #

mconcat :: [Product f g a] -> Product f g a #

(Monoid (f p), Monoid (g p)) => Monoid ((f :*: g) p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: (f :*: g) p #

mappend :: (f :*: g) p -> (f :*: g) p -> (f :*: g) p #

mconcat :: [(f :*: g) p] -> (f :*: g) p #

Monoid c => Monoid (K1 i c p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: K1 i c p #

mappend :: K1 i c p -> K1 i c p -> K1 i c p #

mconcat :: [K1 i c p] -> K1 i c p #

Monad m => Monoid (ConduitT i o m ()) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

mempty :: ConduitT i o m () #

mappend :: ConduitT i o m () -> ConduitT i o m () -> ConduitT i o m () #

mconcat :: [ConduitT i o m ()] -> ConduitT i o m () #

(Monoid a, Monoid b, Monoid c, Monoid d) => Monoid (a, b, c, d)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: (a, b, c, d) #

mappend :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) #

mconcat :: [(a, b, c, d)] -> (a, b, c, d) #

Monoid (f (g a)) => Monoid (Compose f g a)

Since: base-4.16.0.0

Instance details

Defined in Data.Functor.Compose

Methods

mempty :: Compose f g a #

mappend :: Compose f g a -> Compose f g a -> Compose f g a #

mconcat :: [Compose f g a] -> Compose f g a #

Monoid (f (g p)) => Monoid ((f :.: g) p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: (f :.: g) p #

mappend :: (f :.: g) p -> (f :.: g) p -> (f :.: g) p #

mconcat :: [(f :.: g) p] -> (f :.: g) p #

Monoid (f p) => Monoid (M1 i c f p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: M1 i c f p #

mappend :: M1 i c f p -> M1 i c f p -> M1 i c f p #

mconcat :: [M1 i c f p] -> M1 i c f p #

(Monoid a, Monoid b, Monoid c, Monoid d, Monoid e) => Monoid (a, b, c, d, e)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: (a, b, c, d, e) #

mappend :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) #

mconcat :: [(a, b, c, d, e)] -> (a, b, c, d, e) #

Monad m => Monoid (Pipe l i o u m ()) 
Instance details

Defined in Data.Conduit.Internal.Pipe

Methods

mempty :: Pipe l i o u m () #

mappend :: Pipe l i o u m () -> Pipe l i o u m () -> Pipe l i o u m () #

mconcat :: [Pipe l i o u m ()] -> Pipe l i o u m () #

class Semigroup a where #

The class of semigroups (types with an associative binary operation).

Instances should satisfy the following:

Associativity
x <> (y <> z) = (x <> y) <> z

You can alternatively define sconcat instead of (<>), in which case the laws are:

Unit
sconcat (pure x) = x
Multiplication
sconcat (join xss) = sconcat (fmap sconcat xss)

Since: base-4.9.0.0

Minimal complete definition

(<>) | sconcat

Methods

(<>) :: a -> a -> a infixr 6 #

An associative operation.

>>> [1,2,3] <> [4,5,6]
[1,2,3,4,5,6]

sconcat :: NonEmpty a -> a #

Reduce a non-empty list with <>

The default definition should be sufficient, but this can be overridden for efficiency.

>>> import Data.List.NonEmpty (NonEmpty (..))
>>> sconcat $ "Hello" :| [" ", "Haskell", "!"]
"Hello Haskell!"

stimes :: Integral b => b -> a -> a #

Repeat a value n times.

Given that this works on a Semigroup it is allowed to fail if you request 0 or fewer repetitions, and the default definition will do so.

By making this a member of the class, idempotent semigroups and monoids can upgrade this to execute in \(\mathcal{O}(1)\) by picking stimes = stimesIdempotent or stimes = stimesIdempotentMonoid respectively.

>>> stimes 4 [1]
[1,1,1,1]

Instances

Instances details
Semigroup Series 
Instance details

Defined in Data.Aeson.Encoding.Internal

Semigroup Key 
Instance details

Defined in Data.Aeson.Key

Methods

(<>) :: Key -> Key -> Key #

sconcat :: NonEmpty Key -> Key #

stimes :: Integral b => b -> Key -> Key #

Semigroup More 
Instance details

Defined in Data.Attoparsec.Internal.Types

Methods

(<>) :: More -> More -> More #

sconcat :: NonEmpty More -> More #

stimes :: Integral b => b -> More -> More #

Semigroup ByteArray

Since: base-4.17.0.0

Instance details

Defined in Data.Array.Byte

Semigroup All

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: All -> All -> All #

sconcat :: NonEmpty All -> All #

stimes :: Integral b => b -> All -> All #

Semigroup Any

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Any -> Any -> Any #

sconcat :: NonEmpty Any -> Any #

stimes :: Integral b => b -> Any -> Any #

Semigroup Void

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: Void -> Void -> Void #

sconcat :: NonEmpty Void -> Void #

stimes :: Integral b => b -> Void -> Void #

Semigroup String 
Instance details

Defined in Basement.UTF8.Base

Semigroup Attribute 
Instance details

Defined in Text.Blaze.Internal

Semigroup AttributeValue 
Instance details

Defined in Text.Blaze.Internal

Semigroup ChoiceString 
Instance details

Defined in Text.Blaze.Internal

Semigroup Builder 
Instance details

Defined in Data.ByteString.Builder.Internal

Semigroup ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

Semigroup ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Semigroup ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Semigroup IntSet

Since: containers-0.5.7

Instance details

Defined in Data.IntSet.Internal

Semigroup DistinctClause 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Semigroup GroupByClause 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Semigroup LimitClause 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Semigroup LockingClause 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Semigroup SideData 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Semigroup WhereClause 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Semigroup LogStr 
Instance details

Defined in System.Log.FastLogger.LogStr

Semigroup OsString 
Instance details

Defined in System.OsString.Internal.Types

Semigroup PosixString 
Instance details

Defined in System.OsString.Internal.Types

Semigroup WindowsString 
Instance details

Defined in System.OsString.Internal.Types

Semigroup Ordering

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Semigroup Form 
Instance details

Defined in Web.Internal.FormUrlEncoded

Methods

(<>) :: Form -> Form -> Form #

sconcat :: NonEmpty Form -> Form #

stimes :: Integral b => b -> Form -> Form #

Semigroup CookieJar 
Instance details

Defined in Network.HTTP.Client.Types

Semigroup RequestBody 
Instance details

Defined in Network.HTTP.Client.Types

Semigroup EntityConstraintDefs 
Instance details

Defined in Database.Persist.Quasi.Internal

Methods

(<>) :: EntityConstraintDefs -> EntityConstraintDefs -> EntityConstraintDefs #

sconcat :: NonEmpty EntityConstraintDefs -> EntityConstraintDefs #

stimes :: Integral b => b -> EntityConstraintDefs -> EntityConstraintDefs #

Semigroup LinesWithComments 
Instance details

Defined in Database.Persist.Quasi.Internal

Semigroup Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Methods

(<>) :: Doc -> Doc -> Doc #

sconcat :: NonEmpty Doc -> Doc #

stimes :: Integral b => b -> Doc -> Doc #

Semigroup Mixin 
Instance details

Defined in Text.Internal.Css

Methods

(<>) :: Mixin -> Mixin -> Mixin #

sconcat :: NonEmpty Mixin -> Mixin #

stimes :: Integral b => b -> Mixin -> Mixin #

Semigroup Javascript 
Instance details

Defined in Text.Julius

Semigroup Builder 
Instance details

Defined in Data.Text.Internal.Builder

Semigroup ShortText 
Instance details

Defined in Data.Text.Short.Internal

Semigroup MergedValue 
Instance details

Defined in Data.Yaml.Config

Methods

(<>) :: MergedValue -> MergedValue -> MergedValue #

sconcat :: NonEmpty MergedValue -> MergedValue #

stimes :: Integral b => b -> MergedValue -> MergedValue #

Semigroup MergedValue 
Instance details

Defined in Yesod.Default.Config2

Semigroup LiteApp 
Instance details

Defined in Yesod.Core.Internal.LiteApp

Semigroup Enctype 
Instance details

Defined in Yesod.Form.Types

Semigroup ()

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: () -> () -> () #

sconcat :: NonEmpty () -> () #

stimes :: Integral b => b -> () -> () #

Semigroup (KeyMap v) 
Instance details

Defined in Data.Aeson.KeyMap

Methods

(<>) :: KeyMap v -> KeyMap v -> KeyMap v #

sconcat :: NonEmpty (KeyMap v) -> KeyMap v #

stimes :: Integral b => b -> KeyMap v -> KeyMap v #

Semigroup (IResult a) 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

(<>) :: IResult a -> IResult a -> IResult a #

sconcat :: NonEmpty (IResult a) -> IResult a #

stimes :: Integral b => b -> IResult a -> IResult a #

Semigroup (Parser a) 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

(<>) :: Parser a -> Parser a -> Parser a #

sconcat :: NonEmpty (Parser a) -> Parser a #

stimes :: Integral b => b -> Parser a -> Parser a #

Semigroup (Result a) 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

(<>) :: Result a -> Result a -> Result a #

sconcat :: NonEmpty (Result a) -> Result a #

stimes :: Integral b => b -> Result a -> Result a #

Semigroup a => Semigroup (Concurrently a)

Only defined by async for base >= 4.9

Since: async-2.1.0

Instance details

Defined in Control.Concurrent.Async.Internal

Semigroup a => Semigroup (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Methods

(<>) :: Identity a -> Identity a -> Identity a #

sconcat :: NonEmpty (Identity a) -> Identity a #

stimes :: Integral b => b -> Identity a -> Identity a #

Semigroup (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Monoid

Methods

(<>) :: First a -> First a -> First a #

sconcat :: NonEmpty (First a) -> First a #

stimes :: Integral b => b -> First a -> First a #

Semigroup (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Monoid

Methods

(<>) :: Last a -> Last a -> Last a #

sconcat :: NonEmpty (Last a) -> Last a #

stimes :: Integral b => b -> Last a -> Last a #

Semigroup a => Semigroup (Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

(<>) :: Down a -> Down a -> Down a #

sconcat :: NonEmpty (Down a) -> Down a #

stimes :: Integral b => b -> Down a -> Down a #

Semigroup (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(<>) :: First a -> First a -> First a #

sconcat :: NonEmpty (First a) -> First a #

stimes :: Integral b => b -> First a -> First a #

Semigroup (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(<>) :: Last a -> Last a -> Last a #

sconcat :: NonEmpty (Last a) -> Last a #

stimes :: Integral b => b -> Last a -> Last a #

Ord a => Semigroup (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(<>) :: Max a -> Max a -> Max a #

sconcat :: NonEmpty (Max a) -> Max a #

stimes :: Integral b => b -> Max a -> Max a #

Ord a => Semigroup (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(<>) :: Min a -> Min a -> Min a #

sconcat :: NonEmpty (Min a) -> Min a #

stimes :: Integral b => b -> Min a -> Min a #

Monoid m => Semigroup (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Semigroup a => Semigroup (Dual a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Dual a -> Dual a -> Dual a #

sconcat :: NonEmpty (Dual a) -> Dual a #

stimes :: Integral b => b -> Dual a -> Dual a #

Semigroup (Endo a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Endo a -> Endo a -> Endo a #

sconcat :: NonEmpty (Endo a) -> Endo a #

stimes :: Integral b => b -> Endo a -> Endo a #

Num a => Semigroup (Product a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Product a -> Product a -> Product a #

sconcat :: NonEmpty (Product a) -> Product a #

stimes :: Integral b => b -> Product a -> Product a #

Num a => Semigroup (Sum a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Sum a -> Sum a -> Sum a #

sconcat :: NonEmpty (Sum a) -> Sum a #

stimes :: Integral b => b -> Sum a -> Sum a #

Semigroup (NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: NonEmpty a -> NonEmpty a -> NonEmpty a #

sconcat :: NonEmpty (NonEmpty a) -> NonEmpty a #

stimes :: Integral b => b -> NonEmpty a -> NonEmpty a #

Semigroup a => Semigroup (STM a)

Since: base-4.17.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

(<>) :: STM a -> STM a -> STM a #

sconcat :: NonEmpty (STM a) -> STM a #

stimes :: Integral b => b -> STM a -> STM a #

(Generic a, Semigroup (Rep a ())) => Semigroup (Generically a)

Since: base-4.17.0.0

Instance details

Defined in GHC.Generics

Semigroup p => Semigroup (Par1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: Par1 p -> Par1 p -> Par1 p #

sconcat :: NonEmpty (Par1 p) -> Par1 p #

stimes :: Integral b => b -> Par1 p -> Par1 p #

PrimType ty => Semigroup (Block ty) 
Instance details

Defined in Basement.Block.Base

Methods

(<>) :: Block ty -> Block ty -> Block ty #

sconcat :: NonEmpty (Block ty) -> Block ty #

stimes :: Integral b => b -> Block ty -> Block ty #

Semigroup (CountOf ty) 
Instance details

Defined in Basement.Types.OffsetSize

Methods

(<>) :: CountOf ty -> CountOf ty -> CountOf ty #

sconcat :: NonEmpty (CountOf ty) -> CountOf ty #

stimes :: Integral b => b -> CountOf ty -> CountOf ty #

PrimType ty => Semigroup (UArray ty) 
Instance details

Defined in Basement.UArray.Base

Methods

(<>) :: UArray ty -> UArray ty -> UArray ty #

sconcat :: NonEmpty (UArray ty) -> UArray ty #

stimes :: Integral b => b -> UArray ty -> UArray ty #

Monoid a => Semigroup (MarkupM a) 
Instance details

Defined in Text.Blaze.Internal

Methods

(<>) :: MarkupM a -> MarkupM a -> MarkupM a #

sconcat :: NonEmpty (MarkupM a) -> MarkupM a #

stimes :: Integral b => b -> MarkupM a -> MarkupM a #

Semigroup s => Semigroup (CI s) 
Instance details

Defined in Data.CaseInsensitive.Internal

Methods

(<>) :: CI s -> CI s -> CI s #

sconcat :: NonEmpty (CI s) -> CI s #

stimes :: Integral b => b -> CI s -> CI s #

Semigroup (IntMap a)

Since: containers-0.5.7

Instance details

Defined in Data.IntMap.Internal

Methods

(<>) :: IntMap a -> IntMap a -> IntMap a #

sconcat :: NonEmpty (IntMap a) -> IntMap a #

stimes :: Integral b => b -> IntMap a -> IntMap a #

Semigroup (Seq a)

Since: containers-0.5.7

Instance details

Defined in Data.Sequence.Internal

Methods

(<>) :: Seq a -> Seq a -> Seq a #

sconcat :: NonEmpty (Seq a) -> Seq a #

stimes :: Integral b => b -> Seq a -> Seq a #

Ord a => Semigroup (Intersection a) 
Instance details

Defined in Data.Set.Internal

Semigroup (MergeSet a) 
Instance details

Defined in Data.Set.Internal

Methods

(<>) :: MergeSet a -> MergeSet a -> MergeSet a #

sconcat :: NonEmpty (MergeSet a) -> MergeSet a #

stimes :: Integral b => b -> MergeSet a -> MergeSet a #

Ord a => Semigroup (Set a)

Since: containers-0.5.7

Instance details

Defined in Data.Set.Internal

Methods

(<>) :: Set a -> Set a -> Set a #

sconcat :: NonEmpty (Set a) -> Set a #

stimes :: Integral b => b -> Set a -> Set a #

Semigroup (DNonEmpty a) 
Instance details

Defined in Data.DList.DNonEmpty.Internal

Methods

(<>) :: DNonEmpty a -> DNonEmpty a -> DNonEmpty a #

sconcat :: NonEmpty (DNonEmpty a) -> DNonEmpty a #

stimes :: Integral b => b -> DNonEmpty a -> DNonEmpty a #

Semigroup (DList a) 
Instance details

Defined in Data.DList.Internal

Methods

(<>) :: DList a -> DList a -> DList a #

sconcat :: NonEmpty (DList a) -> DList a #

stimes :: Integral b => b -> DList a -> DList a #

Semigroup a => Semigroup (IO a)

Since: base-4.10.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: IO a -> IO a -> IO a #

sconcat :: NonEmpty (IO a) -> IO a #

stimes :: Integral b => b -> IO a -> IO a #

(Semigroup mono, GrowingAppend mono) => Semigroup (NonNull mono) 
Instance details

Defined in Data.NonNull

Methods

(<>) :: NonNull mono -> NonNull mono -> NonNull mono #

sconcat :: NonEmpty (NonNull mono) -> NonNull mono #

stimes :: Integral b => b -> NonNull mono -> NonNull mono #

Semigroup (SetOnceAtMost a) 
Instance details

Defined in Database.Persist.Quasi.Internal

Methods

(<>) :: SetOnceAtMost a -> SetOnceAtMost a -> SetOnceAtMost a #

sconcat :: NonEmpty (SetOnceAtMost a) -> SetOnceAtMost a #

stimes :: Integral b => b -> SetOnceAtMost a -> SetOnceAtMost a #

Semigroup (Doc a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

(<>) :: Doc a -> Doc a -> Doc a #

sconcat :: NonEmpty (Doc a) -> Doc a #

stimes :: Integral b => b -> Doc a -> Doc a #

Semigroup (Array a)

Since: primitive-0.6.3.0

Instance details

Defined in Data.Primitive.Array

Methods

(<>) :: Array a -> Array a -> Array a #

sconcat :: NonEmpty (Array a) -> Array a #

stimes :: Integral b => b -> Array a -> Array a #

Semigroup (PrimArray a)

Since: primitive-0.6.4.0

Instance details

Defined in Data.Primitive.PrimArray

Methods

(<>) :: PrimArray a -> PrimArray a -> PrimArray a #

sconcat :: NonEmpty (PrimArray a) -> PrimArray a #

stimes :: Integral b => b -> PrimArray a -> PrimArray a #

Semigroup (SmallArray a)

Since: primitive-0.6.3.0

Instance details

Defined in Data.Primitive.SmallArray

Semigroup a => Semigroup (Maybe a) 
Instance details

Defined in Data.Strict.Maybe

Methods

(<>) :: Maybe a -> Maybe a -> Maybe a #

sconcat :: NonEmpty (Maybe a) -> Maybe a #

stimes :: Integral b => b -> Maybe a -> Maybe a #

Semigroup a => Semigroup (Q a)

Since: template-haskell-2.17.0.0

Instance details

Defined in Language.Haskell.TH.Syntax

Methods

(<>) :: Q a -> Q a -> Q a #

sconcat :: NonEmpty (Q a) -> Q a #

stimes :: Integral b => b -> Q a -> Q a #

(Hashable a, Eq a) => Semigroup (HashSet a)

<> = union

\(O(n+m)\)

To obtain good performance, the smaller set must be presented as the first argument.

Examples

Expand
>>> fromList [1,2] <> fromList [2,3]
fromList [1,2,3]
Instance details

Defined in Data.HashSet.Internal

Methods

(<>) :: HashSet a -> HashSet a -> HashSet a #

sconcat :: NonEmpty (HashSet a) -> HashSet a #

stimes :: Integral b => b -> HashSet a -> HashSet a #

Semigroup (Vault s) 
Instance details

Defined in Data.Vault.ST.Lazy

Methods

(<>) :: Vault s -> Vault s -> Vault s #

sconcat :: NonEmpty (Vault s) -> Vault s #

stimes :: Integral b => b -> Vault s -> Vault s #

Semigroup (Vector a) 
Instance details

Defined in Data.Vector

Methods

(<>) :: Vector a -> Vector a -> Vector a #

sconcat :: NonEmpty (Vector a) -> Vector a #

stimes :: Integral b => b -> Vector a -> Vector a #

Prim a => Semigroup (Vector a) 
Instance details

Defined in Data.Vector.Primitive

Methods

(<>) :: Vector a -> Vector a -> Vector a #

sconcat :: NonEmpty (Vector a) -> Vector a #

stimes :: Integral b => b -> Vector a -> Vector a #

Storable a => Semigroup (Vector a) 
Instance details

Defined in Data.Vector.Storable

Methods

(<>) :: Vector a -> Vector a -> Vector a #

sconcat :: NonEmpty (Vector a) -> Vector a #

stimes :: Integral b => b -> Vector a -> Vector a #

Semigroup (Body url) 
Instance details

Defined in Yesod.Core.Types

Methods

(<>) :: Body url -> Body url -> Body url #

sconcat :: NonEmpty (Body url) -> Body url #

stimes :: Integral b => b -> Body url -> Body url #

Semigroup (GWData a) 
Instance details

Defined in Yesod.Core.Types

Methods

(<>) :: GWData a -> GWData a -> GWData a #

sconcat :: NonEmpty (GWData a) -> GWData a #

stimes :: Integral b => b -> GWData a -> GWData a #

Semigroup (Head url) 
Instance details

Defined in Yesod.Core.Types

Methods

(<>) :: Head url -> Head url -> Head url #

sconcat :: NonEmpty (Head url) -> Head url #

stimes :: Integral b => b -> Head url -> Head url #

Semigroup (UniqueList x) 
Instance details

Defined in Yesod.Core.Types

Semigroup m => Semigroup (FormResult m) 
Instance details

Defined in Yesod.Form.Types

Semigroup a => Semigroup (Maybe a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: Maybe a -> Maybe a -> Maybe a #

sconcat :: NonEmpty (Maybe a) -> Maybe a #

stimes :: Integral b => b -> Maybe a -> Maybe a #

Semigroup a => Semigroup (a)

Since: base-4.15

Instance details

Defined in GHC.Base

Methods

(<>) :: (a) -> (a) -> (a) #

sconcat :: NonEmpty (a) -> (a) #

stimes :: Integral b => b -> (a) -> (a) #

Semigroup [a]

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: [a] -> [a] -> [a] #

sconcat :: NonEmpty [a] -> [a] #

stimes :: Integral b => b -> [a] -> [a] #

Semigroup a => Semigroup (ConcurrentlyE e a)

Either the combination of the successful results, or the first failure.

Instance details

Defined in Control.Concurrent.Async.Internal

Semigroup (Parser i a) 
Instance details

Defined in Data.Attoparsec.Internal.Types

Methods

(<>) :: Parser i a -> Parser i a -> Parser i a #

sconcat :: NonEmpty (Parser i a) -> Parser i a #

stimes :: Integral b => b -> Parser i a -> Parser i a #

Semigroup (Either a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Either

Methods

(<>) :: Either a b -> Either a b -> Either a b #

sconcat :: NonEmpty (Either a b) -> Either a b #

stimes :: Integral b0 => b0 -> Either a b -> Either a b #

Semigroup (Proxy s)

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Methods

(<>) :: Proxy s -> Proxy s -> Proxy s #

sconcat :: NonEmpty (Proxy s) -> Proxy s #

stimes :: Integral b => b -> Proxy s -> Proxy s #

Semigroup (U1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: U1 p -> U1 p -> U1 p #

sconcat :: NonEmpty (U1 p) -> U1 p #

stimes :: Integral b => b -> U1 p -> U1 p #

Semigroup (V1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: V1 p -> V1 p -> V1 p #

sconcat :: NonEmpty (V1 p) -> V1 p #

stimes :: Integral b => b -> V1 p -> V1 p #

Semigroup a => Semigroup (ST s a)

Since: base-4.11.0.0

Instance details

Defined in GHC.ST

Methods

(<>) :: ST s a -> ST s a -> ST s a #

sconcat :: NonEmpty (ST s a) -> ST s a #

stimes :: Integral b => b -> ST s a -> ST s a #

Ord k => Semigroup (Map k v) 
Instance details

Defined in Data.Map.Internal

Methods

(<>) :: Map k v -> Map k v -> Map k v #

sconcat :: NonEmpty (Map k v) -> Map k v #

stimes :: Integral b => b -> Map k v -> Map k v #

Apply f => Semigroup (Act f a) 
Instance details

Defined in Data.Key

Methods

(<>) :: Act f a -> Act f a -> Act f a #

sconcat :: NonEmpty (Act f a) -> Act f a #

stimes :: Integral b => b -> Act f a -> Act f a #

Applicative f => Semigroup (Traversed a f) 
Instance details

Defined in Lens.Micro

Methods

(<>) :: Traversed a f -> Traversed a f -> Traversed a f #

sconcat :: NonEmpty (Traversed a f) -> Traversed a f #

stimes :: Integral b => b -> Traversed a f -> Traversed a f #

(Applicative m, Semigroup a) => Semigroup (LoggingT m a) 
Instance details

Defined in Control.Monad.Logger

Methods

(<>) :: LoggingT m a -> LoggingT m a -> LoggingT m a #

sconcat :: NonEmpty (LoggingT m a) -> LoggingT m a #

stimes :: Integral b => b -> LoggingT m a -> LoggingT m a #

(Applicative m, Semigroup a) => Semigroup (NoLoggingT m a) 
Instance details

Defined in Control.Monad.Logger

Methods

(<>) :: NoLoggingT m a -> NoLoggingT m a -> NoLoggingT m a #

sconcat :: NonEmpty (NoLoggingT m a) -> NoLoggingT m a #

stimes :: Integral b => b -> NoLoggingT m a -> NoLoggingT m a #

(Applicative m, Semigroup a) => Semigroup (WriterLoggingT m a) 
Instance details

Defined in Control.Monad.Logger

Semigroup (Either a b) 
Instance details

Defined in Data.Strict.Either

Methods

(<>) :: Either a b -> Either a b -> Either a b #

sconcat :: NonEmpty (Either a b) -> Either a b #

stimes :: Integral b0 => b0 -> Either a b -> Either a b #

(Semigroup a, Semigroup b) => Semigroup (These a b) 
Instance details

Defined in Data.Strict.These

Methods

(<>) :: These a b -> These a b -> These a b #

sconcat :: NonEmpty (These a b) -> These a b #

stimes :: Integral b0 => b0 -> These a b -> These a b #

(Semigroup a, Semigroup b) => Semigroup (Pair a b) 
Instance details

Defined in Data.Strict.Tuple

Methods

(<>) :: Pair a b -> Pair a b -> Pair a b #

sconcat :: NonEmpty (Pair a b) -> Pair a b #

stimes :: Integral b0 => b0 -> Pair a b -> Pair a b #

(Semigroup a, Semigroup b) => Semigroup (These a b) 
Instance details

Defined in Data.These

Methods

(<>) :: These a b -> These a b -> These a b #

sconcat :: NonEmpty (These a b) -> These a b #

stimes :: Integral b0 => b0 -> These a b -> These a b #

(MonadUnliftIO m, Semigroup a) => Semigroup (Conc m a)

Since: unliftio-0.2.9.0

Instance details

Defined in UnliftIO.Internals.Async

Methods

(<>) :: Conc m a -> Conc m a -> Conc m a #

sconcat :: NonEmpty (Conc m a) -> Conc m a #

stimes :: Integral b => b -> Conc m a -> Conc m a #

(MonadUnliftIO m, Semigroup a) => Semigroup (Concurrently m a)

Only defined by async for base >= 4.9.

Since: unliftio-0.1.0.0

Instance details

Defined in UnliftIO.Internals.Async

Methods

(<>) :: Concurrently m a -> Concurrently m a -> Concurrently m a #

sconcat :: NonEmpty (Concurrently m a) -> Concurrently m a #

stimes :: Integral b => b -> Concurrently m a -> Concurrently m a #

(Eq k, Hashable k) => Semigroup (HashMap k v)

<> = union

If a key occurs in both maps, the mapping from the first will be the mapping in the result.

Examples

Expand
>>> fromList [(1,'a'),(2,'b')] <> fromList [(2,'c'),(3,'d')]
fromList [(1,'a'),(2,'b'),(3,'d')]
Instance details

Defined in Data.HashMap.Internal

Methods

(<>) :: HashMap k v -> HashMap k v -> HashMap k v #

sconcat :: NonEmpty (HashMap k v) -> HashMap k v #

stimes :: Integral b => b -> HashMap k v -> HashMap k v #

a ~ () => Semigroup (WidgetFor site a) 
Instance details

Defined in Yesod.Core.Types

Methods

(<>) :: WidgetFor site a -> WidgetFor site a -> WidgetFor site a #

sconcat :: NonEmpty (WidgetFor site a) -> WidgetFor site a #

stimes :: Integral b => b -> WidgetFor site a -> WidgetFor site a #

(Monad m, Semigroup a) => Semigroup (AForm m a) 
Instance details

Defined in Yesod.Form.Types

Methods

(<>) :: AForm m a -> AForm m a -> AForm m a #

sconcat :: NonEmpty (AForm m a) -> AForm m a #

stimes :: Integral b => b -> AForm m a -> AForm m a #

(Semigroup a, Semigroup b) => Semigroup (a, b)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: (a, b) -> (a, b) -> (a, b) #

sconcat :: NonEmpty (a, b) -> (a, b) #

stimes :: Integral b0 => b0 -> (a, b) -> (a, b) #

Semigroup b => Semigroup (a -> b)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: (a -> b) -> (a -> b) -> a -> b #

sconcat :: NonEmpty (a -> b) -> a -> b #

stimes :: Integral b0 => b0 -> (a -> b) -> a -> b #

Semigroup a => Semigroup (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

(<>) :: Const a b -> Const a b -> Const a b #

sconcat :: NonEmpty (Const a b) -> Const a b #

stimes :: Integral b0 => b0 -> Const a b -> Const a b #

(Applicative f, Semigroup a) => Semigroup (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

(<>) :: Ap f a -> Ap f a -> Ap f a #

sconcat :: NonEmpty (Ap f a) -> Ap f a #

stimes :: Integral b => b -> Ap f a -> Ap f a #

Alternative f => Semigroup (Alt f a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Alt f a -> Alt f a -> Alt f a #

sconcat :: NonEmpty (Alt f a) -> Alt f a #

stimes :: Integral b => b -> Alt f a -> Alt f a #

Semigroup (f p) => Semigroup (Rec1 f p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: Rec1 f p -> Rec1 f p -> Rec1 f p #

sconcat :: NonEmpty (Rec1 f p) -> Rec1 f p #

stimes :: Integral b => b -> Rec1 f p -> Rec1 f p #

Semigroup a => Semigroup (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

(<>) :: Tagged s a -> Tagged s a -> Tagged s a #

sconcat :: NonEmpty (Tagged s a) -> Tagged s a #

stimes :: Integral b => b -> Tagged s a -> Tagged s a #

Semigroup a => Semigroup (Constant a b) 
Instance details

Defined in Data.Functor.Constant

Methods

(<>) :: Constant a b -> Constant a b -> Constant a b #

sconcat :: NonEmpty (Constant a b) -> Constant a b #

stimes :: Integral b0 => b0 -> Constant a b -> Constant a b #

(Semigroup a, Semigroup b, Semigroup c) => Semigroup (a, b, c)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: (a, b, c) -> (a, b, c) -> (a, b, c) #

sconcat :: NonEmpty (a, b, c) -> (a, b, c) #

stimes :: Integral b0 => b0 -> (a, b, c) -> (a, b, c) #

(Semigroup (f a), Semigroup (g a)) => Semigroup (Product f g a)

Since: base-4.16.0.0

Instance details

Defined in Data.Functor.Product

Methods

(<>) :: Product f g a -> Product f g a -> Product f g a #

sconcat :: NonEmpty (Product f g a) -> Product f g a #

stimes :: Integral b => b -> Product f g a -> Product f g a #

(Semigroup (f p), Semigroup (g p)) => Semigroup ((f :*: g) p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: (f :*: g) p -> (f :*: g) p -> (f :*: g) p #

sconcat :: NonEmpty ((f :*: g) p) -> (f :*: g) p #

stimes :: Integral b => b -> (f :*: g) p -> (f :*: g) p #

Semigroup c => Semigroup (K1 i c p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: K1 i c p -> K1 i c p -> K1 i c p #

sconcat :: NonEmpty (K1 i c p) -> K1 i c p #

stimes :: Integral b => b -> K1 i c p -> K1 i c p #

Monad m => Semigroup (ConduitT i o m ()) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

(<>) :: ConduitT i o m () -> ConduitT i o m () -> ConduitT i o m () #

sconcat :: NonEmpty (ConduitT i o m ()) -> ConduitT i o m () #

stimes :: Integral b => b -> ConduitT i o m () -> ConduitT i o m () #

(Semigroup a, Semigroup b, Semigroup c, Semigroup d) => Semigroup (a, b, c, d)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) #

sconcat :: NonEmpty (a, b, c, d) -> (a, b, c, d) #

stimes :: Integral b0 => b0 -> (a, b, c, d) -> (a, b, c, d) #

Semigroup (f (g a)) => Semigroup (Compose f g a)

Since: base-4.16.0.0

Instance details

Defined in Data.Functor.Compose

Methods

(<>) :: Compose f g a -> Compose f g a -> Compose f g a #

sconcat :: NonEmpty (Compose f g a) -> Compose f g a #

stimes :: Integral b => b -> Compose f g a -> Compose f g a #

Semigroup (f (g p)) => Semigroup ((f :.: g) p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: (f :.: g) p -> (f :.: g) p -> (f :.: g) p #

sconcat :: NonEmpty ((f :.: g) p) -> (f :.: g) p #

stimes :: Integral b => b -> (f :.: g) p -> (f :.: g) p #

Semigroup (f p) => Semigroup (M1 i c f p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: M1 i c f p -> M1 i c f p -> M1 i c f p #

sconcat :: NonEmpty (M1 i c f p) -> M1 i c f p #

stimes :: Integral b => b -> M1 i c f p -> M1 i c f p #

(Semigroup a, Semigroup b, Semigroup c, Semigroup d, Semigroup e) => Semigroup (a, b, c, d, e)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) #

sconcat :: NonEmpty (a, b, c, d, e) -> (a, b, c, d, e) #

stimes :: Integral b0 => b0 -> (a, b, c, d, e) -> (a, b, c, d, e) #

Monad m => Semigroup (Pipe l i o u m ()) 
Instance details

Defined in Data.Conduit.Internal.Pipe

Methods

(<>) :: Pipe l i o u m () -> Pipe l i o u m () -> Pipe l i o u m () #

sconcat :: NonEmpty (Pipe l i o u m ()) -> Pipe l i o u m () #

stimes :: Integral b => b -> Pipe l i o u m () -> Pipe l i o u m () #

class Functor f => Applicative (f :: Type -> Type) where #

A functor with application, providing operations to

  • embed pure expressions (pure), and
  • sequence computations and combine their results (<*> and liftA2).

A minimal complete definition must include implementations of pure and of either <*> or liftA2. If it defines both, then they must behave the same as their default definitions:

(<*>) = liftA2 id
liftA2 f x y = f <$> x <*> y

Further, any definition must satisfy the following:

Identity
pure id <*> v = v
Composition
pure (.) <*> u <*> v <*> w = u <*> (v <*> w)
Homomorphism
pure f <*> pure x = pure (f x)
Interchange
u <*> pure y = pure ($ y) <*> u

The other methods have the following default definitions, which may be overridden with equivalent specialized implementations:

As a consequence of these laws, the Functor instance for f will satisfy

It may be useful to note that supposing

forall x y. p (q x y) = f x . g y

it follows from the above that

liftA2 p (liftA2 q u v) = liftA2 f u . liftA2 g v

If f is also a Monad, it should satisfy

(which implies that pure and <*> satisfy the applicative functor laws).

Minimal complete definition

pure, ((<*>) | liftA2)

Methods

pure :: a -> f a #

Lift a value.

(<*>) :: f (a -> b) -> f a -> f b infixl 4 #

Sequential application.

A few functors support an implementation of <*> that is more efficient than the default one.

Example

Expand

Used in combination with (<$>), (<*>) can be used to build a record.

>>> data MyState = MyState {arg1 :: Foo, arg2 :: Bar, arg3 :: Baz}
>>> produceFoo :: Applicative f => f Foo
>>> produceBar :: Applicative f => f Bar
>>> produceBaz :: Applicative f => f Baz
>>> mkState :: Applicative f => f MyState
>>> mkState = MyState <$> produceFoo <*> produceBar <*> produceBaz

liftA2 :: (a -> b -> c) -> f a -> f b -> f c #

Lift a binary function to actions.

Some functors support an implementation of liftA2 that is more efficient than the default one. In particular, if fmap is an expensive operation, it is likely better to use liftA2 than to fmap over the structure and then use <*>.

This became a typeclass method in 4.10.0.0. Prior to that, it was a function defined in terms of <*> and fmap.

Example

Expand
>>> liftA2 (,) (Just 3) (Just 5)
Just (3,5)

(*>) :: f a -> f b -> f b infixl 4 #

Sequence actions, discarding the value of the first argument.

Examples

Expand

If used in conjunction with the Applicative instance for Maybe, you can chain Maybe computations, with a possible "early return" in case of Nothing.

>>> Just 2 *> Just 3
Just 3
>>> Nothing *> Just 3
Nothing

Of course a more interesting use case would be to have effectful computations instead of just returning pure values.

>>> import Data.Char
>>> import Text.ParserCombinators.ReadP
>>> let p = string "my name is " *> munch1 isAlpha <* eof
>>> readP_to_S p "my name is Simon"
[("Simon","")]

(<*) :: f a -> f b -> f a infixl 4 #

Sequence actions, discarding the value of the second argument.

Instances

Instances details
Applicative IResult 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

pure :: a -> IResult a #

(<*>) :: IResult (a -> b) -> IResult a -> IResult b #

liftA2 :: (a -> b -> c) -> IResult a -> IResult b -> IResult c #

(*>) :: IResult a -> IResult b -> IResult b #

(<*) :: IResult a -> IResult b -> IResult a #

Applicative Parser 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

pure :: a -> Parser a #

(<*>) :: Parser (a -> b) -> Parser a -> Parser b #

liftA2 :: (a -> b -> c) -> Parser a -> Parser b -> Parser c #

(*>) :: Parser a -> Parser b -> Parser b #

(<*) :: Parser a -> Parser b -> Parser a #

Applicative Result 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

pure :: a -> Result a #

(<*>) :: Result (a -> b) -> Result a -> Result b #

liftA2 :: (a -> b -> c) -> Result a -> Result b -> Result c #

(*>) :: Result a -> Result b -> Result b #

(<*) :: Result a -> Result b -> Result a #

Applicative Concurrently 
Instance details

Defined in Control.Concurrent.Async.Internal

Applicative ZipList
f <$> ZipList xs1 <*> ... <*> ZipList xsN
    = ZipList (zipWithN f xs1 ... xsN)

where zipWithN refers to the zipWith function of the appropriate arity (zipWith, zipWith3, zipWith4, ...). For example:

(\a b c -> stimes c [a, b]) <$> ZipList "abcd" <*> ZipList "567" <*> ZipList [1..]
    = ZipList (zipWith3 (\a b c -> stimes c [a, b]) "abcd" "567" [1..])
    = ZipList {getZipList = ["a5","b6b6","c7c7c7"]}

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

pure :: a -> ZipList a #

(<*>) :: ZipList (a -> b) -> ZipList a -> ZipList b #

liftA2 :: (a -> b -> c) -> ZipList a -> ZipList b -> ZipList c #

(*>) :: ZipList a -> ZipList b -> ZipList b #

(<*) :: ZipList a -> ZipList b -> ZipList a #

Applicative Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Methods

pure :: a -> Complex a #

(<*>) :: Complex (a -> b) -> Complex a -> Complex b #

liftA2 :: (a -> b -> c) -> Complex a -> Complex b -> Complex c #

(*>) :: Complex a -> Complex b -> Complex b #

(<*) :: Complex a -> Complex b -> Complex a #

Applicative Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

pure :: a -> Identity a #

(<*>) :: Identity (a -> b) -> Identity a -> Identity b #

liftA2 :: (a -> b -> c) -> Identity a -> Identity b -> Identity c #

(*>) :: Identity a -> Identity b -> Identity b #

(<*) :: Identity a -> Identity b -> Identity a #

Applicative First

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

pure :: a -> First a #

(<*>) :: First (a -> b) -> First a -> First b #

liftA2 :: (a -> b -> c) -> First a -> First b -> First c #

(*>) :: First a -> First b -> First b #

(<*) :: First a -> First b -> First a #

Applicative Last

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

pure :: a -> Last a #

(<*>) :: Last (a -> b) -> Last a -> Last b #

liftA2 :: (a -> b -> c) -> Last a -> Last b -> Last c #

(*>) :: Last a -> Last b -> Last b #

(<*) :: Last a -> Last b -> Last a #

Applicative Down

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

pure :: a -> Down a #

(<*>) :: Down (a -> b) -> Down a -> Down b #

liftA2 :: (a -> b -> c) -> Down a -> Down b -> Down c #

(*>) :: Down a -> Down b -> Down b #

(<*) :: Down a -> Down b -> Down a #

Applicative First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

pure :: a -> First a #

(<*>) :: First (a -> b) -> First a -> First b #

liftA2 :: (a -> b -> c) -> First a -> First b -> First c #

(*>) :: First a -> First b -> First b #

(<*) :: First a -> First b -> First a #

Applicative Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

pure :: a -> Last a #

(<*>) :: Last (a -> b) -> Last a -> Last b #

liftA2 :: (a -> b -> c) -> Last a -> Last b -> Last c #

(*>) :: Last a -> Last b -> Last b #

(<*) :: Last a -> Last b -> Last a #

Applicative Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

pure :: a -> Max a #

(<*>) :: Max (a -> b) -> Max a -> Max b #

liftA2 :: (a -> b -> c) -> Max a -> Max b -> Max c #

(*>) :: Max a -> Max b -> Max b #

(<*) :: Max a -> Max b -> Max a #

Applicative Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

pure :: a -> Min a #

(<*>) :: Min (a -> b) -> Min a -> Min b #

liftA2 :: (a -> b -> c) -> Min a -> Min b -> Min c #

(*>) :: Min a -> Min b -> Min b #

(<*) :: Min a -> Min b -> Min a #

Applicative Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

pure :: a -> Dual a #

(<*>) :: Dual (a -> b) -> Dual a -> Dual b #

liftA2 :: (a -> b -> c) -> Dual a -> Dual b -> Dual c #

(*>) :: Dual a -> Dual b -> Dual b #

(<*) :: Dual a -> Dual b -> Dual a #

Applicative Product

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

pure :: a -> Product a #

(<*>) :: Product (a -> b) -> Product a -> Product b #

liftA2 :: (a -> b -> c) -> Product a -> Product b -> Product c #

(*>) :: Product a -> Product b -> Product b #

(<*) :: Product a -> Product b -> Product a #

Applicative Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

pure :: a -> Sum a #

(<*>) :: Sum (a -> b) -> Sum a -> Sum b #

liftA2 :: (a -> b -> c) -> Sum a -> Sum b -> Sum c #

(*>) :: Sum a -> Sum b -> Sum b #

(<*) :: Sum a -> Sum b -> Sum a #

Applicative NonEmpty

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

pure :: a -> NonEmpty a #

(<*>) :: NonEmpty (a -> b) -> NonEmpty a -> NonEmpty b #

liftA2 :: (a -> b -> c) -> NonEmpty a -> NonEmpty b -> NonEmpty c #

(*>) :: NonEmpty a -> NonEmpty b -> NonEmpty b #

(<*) :: NonEmpty a -> NonEmpty b -> NonEmpty a #

Applicative STM

Since: base-4.8.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

pure :: a -> STM a #

(<*>) :: STM (a -> b) -> STM a -> STM b #

liftA2 :: (a -> b -> c) -> STM a -> STM b -> STM c #

(*>) :: STM a -> STM b -> STM b #

(<*) :: STM a -> STM b -> STM a #

Applicative Par1

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> Par1 a #

(<*>) :: Par1 (a -> b) -> Par1 a -> Par1 b #

liftA2 :: (a -> b -> c) -> Par1 a -> Par1 b -> Par1 c #

(*>) :: Par1 a -> Par1 b -> Par1 b #

(<*) :: Par1 a -> Par1 b -> Par1 a #

Applicative P

Since: base-4.5.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

pure :: a -> P a #

(<*>) :: P (a -> b) -> P a -> P b #

liftA2 :: (a -> b -> c) -> P a -> P b -> P c #

(*>) :: P a -> P b -> P b #

(<*) :: P a -> P b -> P a #

Applicative ReadP

Since: base-4.6.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

pure :: a -> ReadP a #

(<*>) :: ReadP (a -> b) -> ReadP a -> ReadP b #

liftA2 :: (a -> b -> c) -> ReadP a -> ReadP b -> ReadP c #

(*>) :: ReadP a -> ReadP b -> ReadP b #

(<*) :: ReadP a -> ReadP b -> ReadP a #

Applicative ReadPrec

Since: base-4.6.0.0

Instance details

Defined in Text.ParserCombinators.ReadPrec

Methods

pure :: a -> ReadPrec a #

(<*>) :: ReadPrec (a -> b) -> ReadPrec a -> ReadPrec b #

liftA2 :: (a -> b -> c) -> ReadPrec a -> ReadPrec b -> ReadPrec c #

(*>) :: ReadPrec a -> ReadPrec b -> ReadPrec b #

(<*) :: ReadPrec a -> ReadPrec b -> ReadPrec a #

Applicative MarkupM 
Instance details

Defined in Text.Blaze.Internal

Methods

pure :: a -> MarkupM a #

(<*>) :: MarkupM (a -> b) -> MarkupM a -> MarkupM b #

liftA2 :: (a -> b -> c) -> MarkupM a -> MarkupM b -> MarkupM c #

(*>) :: MarkupM a -> MarkupM b -> MarkupM b #

(<*) :: MarkupM a -> MarkupM b -> MarkupM a #

Applicative Put 
Instance details

Defined in Data.ByteString.Builder.Internal

Methods

pure :: a -> Put a #

(<*>) :: Put (a -> b) -> Put a -> Put b #

liftA2 :: (a -> b -> c) -> Put a -> Put b -> Put c #

(*>) :: Put a -> Put b -> Put b #

(<*) :: Put a -> Put b -> Put a #

Applicative Seq

Since: containers-0.5.4

Instance details

Defined in Data.Sequence.Internal

Methods

pure :: a -> Seq a #

(<*>) :: Seq (a -> b) -> Seq a -> Seq b #

liftA2 :: (a -> b -> c) -> Seq a -> Seq b -> Seq c #

(*>) :: Seq a -> Seq b -> Seq b #

(<*) :: Seq a -> Seq b -> Seq a #

Applicative Tree 
Instance details

Defined in Data.Tree

Methods

pure :: a -> Tree a #

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

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

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

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

Applicative CryptoFailable 
Instance details

Defined in Crypto.Error.Types

Applicative CryptoFailable 
Instance details

Defined in Crypto.Error.Types

Applicative DNonEmpty 
Instance details

Defined in Data.DList.DNonEmpty.Internal

Methods

pure :: a -> DNonEmpty a #

(<*>) :: DNonEmpty (a -> b) -> DNonEmpty a -> DNonEmpty b #

liftA2 :: (a -> b -> c) -> DNonEmpty a -> DNonEmpty b -> DNonEmpty c #

(*>) :: DNonEmpty a -> DNonEmpty b -> DNonEmpty b #

(<*) :: DNonEmpty a -> DNonEmpty b -> DNonEmpty a #

Applicative DList 
Instance details

Defined in Data.DList.Internal

Methods

pure :: a -> DList a #

(<*>) :: DList (a -> b) -> DList a -> DList b #

liftA2 :: (a -> b -> c) -> DList a -> DList b -> DList c #

(*>) :: DList a -> DList b -> DList b #

(<*) :: DList a -> DList b -> DList a #

Applicative SqlQuery 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Methods

pure :: a -> SqlQuery a #

(<*>) :: SqlQuery (a -> b) -> SqlQuery a -> SqlQuery b #

liftA2 :: (a -> b -> c) -> SqlQuery a -> SqlQuery b -> SqlQuery c #

(*>) :: SqlQuery a -> SqlQuery b -> SqlQuery b #

(<*) :: SqlQuery a -> SqlQuery b -> SqlQuery a #

Applicative Value 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Methods

pure :: a -> Value a #

(<*>) :: Value (a -> b) -> Value a -> Value b #

liftA2 :: (a -> b -> c) -> Value a -> Value b -> Value c #

(*>) :: Value a -> Value b -> Value b #

(<*) :: Value a -> Value b -> Value a #

Applicative IO

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: a -> IO a #

(<*>) :: IO (a -> b) -> IO a -> IO b #

liftA2 :: (a -> b -> c) -> IO a -> IO b -> IO c #

(*>) :: IO a -> IO b -> IO b #

(<*) :: IO a -> IO b -> IO a #

Applicative Array 
Instance details

Defined in Data.Primitive.Array

Methods

pure :: a -> Array a #

(<*>) :: Array (a -> b) -> Array a -> Array b #

liftA2 :: (a -> b -> c) -> Array a -> Array b -> Array c #

(*>) :: Array a -> Array b -> Array b #

(<*) :: Array a -> Array b -> Array a #

Applicative SmallArray 
Instance details

Defined in Data.Primitive.SmallArray

Methods

pure :: a -> SmallArray a #

(<*>) :: SmallArray (a -> b) -> SmallArray a -> SmallArray b #

liftA2 :: (a -> b -> c) -> SmallArray a -> SmallArray b -> SmallArray c #

(*>) :: SmallArray a -> SmallArray b -> SmallArray b #

(<*) :: SmallArray a -> SmallArray b -> SmallArray a #

Applicative Acquire 
Instance details

Defined in Data.Acquire.Internal

Methods

pure :: a -> Acquire a #

(<*>) :: Acquire (a -> b) -> Acquire a -> Acquire b #

liftA2 :: (a -> b -> c) -> Acquire a -> Acquire b -> Acquire c #

(*>) :: Acquire a -> Acquire b -> Acquire b #

(<*) :: Acquire a -> Acquire b -> Acquire a #

Applicative Result 
Instance details

Defined in Text.Hamlet.Parse

Methods

pure :: a -> Result a #

(<*>) :: Result (a -> b) -> Result a -> Result b #

liftA2 :: (a -> b -> c) -> Result a -> Result b -> Result c #

(*>) :: Result a -> Result b -> Result b #

(<*) :: Result a -> Result b -> Result a #

Applicative Q 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

pure :: a -> Q a #

(<*>) :: Q (a -> b) -> Q a -> Q b #

liftA2 :: (a -> b -> c) -> Q a -> Q b -> Q c #

(*>) :: Q a -> Q b -> Q b #

(<*) :: Q a -> Q b -> Q a #

Applicative Flat 
Instance details

Defined in UnliftIO.Internals.Async

Methods

pure :: a -> Flat a #

(<*>) :: Flat (a -> b) -> Flat a -> Flat b #

liftA2 :: (a -> b -> c) -> Flat a -> Flat b -> Flat c #

(*>) :: Flat a -> Flat b -> Flat b #

(<*) :: Flat a -> Flat b -> Flat a #

Applicative FlatApp 
Instance details

Defined in UnliftIO.Internals.Async

Methods

pure :: a -> FlatApp a #

(<*>) :: FlatApp (a -> b) -> FlatApp a -> FlatApp b #

liftA2 :: (a -> b -> c) -> FlatApp a -> FlatApp b -> FlatApp c #

(*>) :: FlatApp a -> FlatApp b -> FlatApp b #

(<*) :: FlatApp a -> FlatApp b -> FlatApp a #

Applicative Memoized 
Instance details

Defined in UnliftIO.Memoize

Methods

pure :: a -> Memoized a #

(<*>) :: Memoized (a -> b) -> Memoized a -> Memoized b #

liftA2 :: (a -> b -> c) -> Memoized a -> Memoized b -> Memoized c #

(*>) :: Memoized a -> Memoized b -> Memoized b #

(<*) :: Memoized a -> Memoized b -> Memoized a #

Applicative Vector 
Instance details

Defined in Data.Vector

Methods

pure :: a -> Vector a #

(<*>) :: Vector (a -> b) -> Vector a -> Vector b #

liftA2 :: (a -> b -> c) -> Vector a -> Vector b -> Vector c #

(*>) :: Vector a -> Vector b -> Vector b #

(<*) :: Vector a -> Vector b -> Vector a #

Applicative FormResult 
Instance details

Defined in Yesod.Form.Types

Methods

pure :: a -> FormResult a #

(<*>) :: FormResult (a -> b) -> FormResult a -> FormResult b #

liftA2 :: (a -> b -> c) -> FormResult a -> FormResult b -> FormResult c #

(*>) :: FormResult a -> FormResult b -> FormResult b #

(<*) :: FormResult a -> FormResult b -> FormResult a #

Applicative Stream 
Instance details

Defined in Codec.Compression.Zlib.Stream

Methods

pure :: a -> Stream a #

(<*>) :: Stream (a -> b) -> Stream a -> Stream b #

liftA2 :: (a -> b -> c) -> Stream a -> Stream b -> Stream c #

(*>) :: Stream a -> Stream b -> Stream b #

(<*) :: Stream a -> Stream b -> Stream a #

Applicative Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: a -> Maybe a #

(<*>) :: Maybe (a -> b) -> Maybe a -> Maybe b #

liftA2 :: (a -> b -> c) -> Maybe a -> Maybe b -> Maybe c #

(*>) :: Maybe a -> Maybe b -> Maybe b #

(<*) :: Maybe a -> Maybe b -> Maybe a #

Applicative Solo

Since: base-4.15

Instance details

Defined in GHC.Base

Methods

pure :: a -> Solo a #

(<*>) :: Solo (a -> b) -> Solo a -> Solo b #

liftA2 :: (a -> b -> c) -> Solo a -> Solo b -> Solo c #

(*>) :: Solo a -> Solo b -> Solo b #

(<*) :: Solo a -> Solo b -> Solo a #

Applicative List

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: a -> [a] #

(<*>) :: [a -> b] -> [a] -> [b] #

liftA2 :: (a -> b -> c) -> [a] -> [b] -> [c] #

(*>) :: [a] -> [b] -> [b] #

(<*) :: [a] -> [b] -> [a] #

Representable f => Applicative (Co f) 
Instance details

Defined in Data.Functor.Rep

Methods

pure :: a -> Co f a #

(<*>) :: Co f (a -> b) -> Co f a -> Co f b #

liftA2 :: (a -> b -> c) -> Co f a -> Co f b -> Co f c #

(*>) :: Co f a -> Co f b -> Co f b #

(<*) :: Co f a -> Co f b -> Co f a #

Applicative (ConcurrentlyE e) 
Instance details

Defined in Control.Concurrent.Async.Internal

Methods

pure :: a -> ConcurrentlyE e a #

(<*>) :: ConcurrentlyE e (a -> b) -> ConcurrentlyE e a -> ConcurrentlyE e b #

liftA2 :: (a -> b -> c) -> ConcurrentlyE e a -> ConcurrentlyE e b -> ConcurrentlyE e c #

(*>) :: ConcurrentlyE e a -> ConcurrentlyE e b -> ConcurrentlyE e b #

(<*) :: ConcurrentlyE e a -> ConcurrentlyE e b -> ConcurrentlyE e a #

Applicative (Parser i) 
Instance details

Defined in Data.Attoparsec.Internal.Types

Methods

pure :: a -> Parser i a #

(<*>) :: Parser i (a -> b) -> Parser i a -> Parser i b #

liftA2 :: (a -> b -> c) -> Parser i a -> Parser i b -> Parser i c #

(*>) :: Parser i a -> Parser i b -> Parser i b #

(<*) :: Parser i a -> Parser i b -> Parser i a #

Monad m => Applicative (WrappedMonad m)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

pure :: a -> WrappedMonad m a #

(<*>) :: WrappedMonad m (a -> b) -> WrappedMonad m a -> WrappedMonad m b #

liftA2 :: (a -> b -> c) -> WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m c #

(*>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b #

(<*) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m a #

Arrow a => Applicative (ArrowMonad a)

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

Methods

pure :: a0 -> ArrowMonad a a0 #

(<*>) :: ArrowMonad a (a0 -> b) -> ArrowMonad a a0 -> ArrowMonad a b #

liftA2 :: (a0 -> b -> c) -> ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a c #

(*>) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a b #

(<*) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a a0 #

Applicative (Either e)

Since: base-3.0

Instance details

Defined in Data.Either

Methods

pure :: a -> Either e a #

(<*>) :: Either e (a -> b) -> Either e a -> Either e b #

liftA2 :: (a -> b -> c) -> Either e a -> Either e b -> Either e c #

(*>) :: Either e a -> Either e b -> Either e b #

(<*) :: Either e a -> Either e b -> Either e a #

Applicative (Proxy :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

pure :: a -> Proxy a #

(<*>) :: Proxy (a -> b) -> Proxy a -> Proxy b #

liftA2 :: (a -> b -> c) -> Proxy a -> Proxy b -> Proxy c #

(*>) :: Proxy a -> Proxy b -> Proxy b #

(<*) :: Proxy a -> Proxy b -> Proxy a #

Applicative (U1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> U1 a #

(<*>) :: U1 (a -> b) -> U1 a -> U1 b #

liftA2 :: (a -> b -> c) -> U1 a -> U1 b -> U1 c #

(*>) :: U1 a -> U1 b -> U1 b #

(<*) :: U1 a -> U1 b -> U1 a #

Applicative (ST s)

Since: base-4.4.0.0

Instance details

Defined in GHC.ST

Methods

pure :: a -> ST s a #

(<*>) :: ST s (a -> b) -> ST s a -> ST s b #

liftA2 :: (a -> b -> c) -> ST s a -> ST s b -> ST s c #

(*>) :: ST s a -> ST s b -> ST s b #

(<*) :: ST s a -> ST s b -> ST s a #

Monad m => Applicative (ZipSource m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

pure :: a -> ZipSource m a #

(<*>) :: ZipSource m (a -> b) -> ZipSource m a -> ZipSource m b #

liftA2 :: (a -> b -> c) -> ZipSource m a -> ZipSource m b -> ZipSource m c #

(*>) :: ZipSource m a -> ZipSource m b -> ZipSource m b #

(<*) :: ZipSource m a -> ZipSource m b -> ZipSource m a #

Monad m => Applicative (CatchT m) 
Instance details

Defined in Control.Monad.Catch.Pure

Methods

pure :: a -> CatchT m a #

(<*>) :: CatchT m (a -> b) -> CatchT m a -> CatchT m b #

liftA2 :: (a -> b -> c) -> CatchT m a -> CatchT m b -> CatchT m c #

(*>) :: CatchT m a -> CatchT m b -> CatchT m b #

(<*) :: CatchT m a -> CatchT m b -> CatchT m a #

Alternative f => Applicative (Cofree f) 
Instance details

Defined in Control.Comonad.Cofree

Methods

pure :: a -> Cofree f a #

(<*>) :: Cofree f (a -> b) -> Cofree f a -> Cofree f b #

liftA2 :: (a -> b -> c) -> Cofree f a -> Cofree f b -> Cofree f c #

(*>) :: Cofree f a -> Cofree f b -> Cofree f b #

(<*) :: Cofree f a -> Cofree f b -> Cofree f a #

Functor f => Applicative (Free f) 
Instance details

Defined in Control.Monad.Free

Methods

pure :: a -> Free f a #

(<*>) :: Free f (a -> b) -> Free f a -> Free f b #

liftA2 :: (a -> b -> c) -> Free f a -> Free f b -> Free f c #

(*>) :: Free f a -> Free f b -> Free f b #

(<*) :: Free f a -> Free f b -> Free f a #

Applicative (StateL s) 
Instance details

Defined in Data.Key

Methods

pure :: a -> StateL s a #

(<*>) :: StateL s (a -> b) -> StateL s a -> StateL s b #

liftA2 :: (a -> b -> c) -> StateL s a -> StateL s b -> StateL s c #

(*>) :: StateL s a -> StateL s b -> StateL s b #

(<*) :: StateL s a -> StateL s b -> StateL s a #

Applicative (StateR s) 
Instance details

Defined in Data.Key

Methods

pure :: a -> StateR s a #

(<*>) :: StateR s (a -> b) -> StateR s a -> StateR s b #

liftA2 :: (a -> b -> c) -> StateR s a -> StateR s b -> StateR s c #

(*>) :: StateR s a -> StateR s b -> StateR s b #

(<*) :: StateR s a -> StateR s b -> StateR s a #

Applicative m => Applicative (LoggingT m) 
Instance details

Defined in Control.Monad.Logger

Methods

pure :: a -> LoggingT m a #

(<*>) :: LoggingT m (a -> b) -> LoggingT m a -> LoggingT m b #

liftA2 :: (a -> b -> c) -> LoggingT m a -> LoggingT m b -> LoggingT m c #

(*>) :: LoggingT m a -> LoggingT m b -> LoggingT m b #

(<*) :: LoggingT m a -> LoggingT m b -> LoggingT m a #

Applicative m => Applicative (NoLoggingT m) 
Instance details

Defined in Control.Monad.Logger

Methods

pure :: a -> NoLoggingT m a #

(<*>) :: NoLoggingT m (a -> b) -> NoLoggingT m a -> NoLoggingT m b #

liftA2 :: (a -> b -> c) -> NoLoggingT m a -> NoLoggingT m b -> NoLoggingT m c #

(*>) :: NoLoggingT m a -> NoLoggingT m b -> NoLoggingT m b #

(<*) :: NoLoggingT m a -> NoLoggingT m b -> NoLoggingT m a #

Applicative m => Applicative (WriterLoggingT m) 
Instance details

Defined in Control.Monad.Logger

Methods

pure :: a -> WriterLoggingT m a #

(<*>) :: WriterLoggingT m (a -> b) -> WriterLoggingT m a -> WriterLoggingT m b #

liftA2 :: (a -> b -> c) -> WriterLoggingT m a -> WriterLoggingT m b -> WriterLoggingT m c #

(*>) :: WriterLoggingT m a -> WriterLoggingT m b -> WriterLoggingT m b #

(<*) :: WriterLoggingT m a -> WriterLoggingT m b -> WriterLoggingT m a #

Applicative f => Applicative (WrappedPoly f) 
Instance details

Defined in Data.MonoTraversable

Methods

pure :: a -> WrappedPoly f a #

(<*>) :: WrappedPoly f (a -> b) -> WrappedPoly f a -> WrappedPoly f b #

liftA2 :: (a -> b -> c) -> WrappedPoly f a -> WrappedPoly f b -> WrappedPoly f c #

(*>) :: WrappedPoly f a -> WrappedPoly f b -> WrappedPoly f b #

(<*) :: WrappedPoly f a -> WrappedPoly f b -> WrappedPoly f a #

Applicative m => Applicative (ResourceT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

pure :: a -> ResourceT m a #

(<*>) :: ResourceT m (a -> b) -> ResourceT m a -> ResourceT m b #

liftA2 :: (a -> b -> c) -> ResourceT m a -> ResourceT m b -> ResourceT m c #

(*>) :: ResourceT m a -> ResourceT m b -> ResourceT m b #

(<*) :: ResourceT m a -> ResourceT m b -> ResourceT m a #

Semigroup a => Applicative (These a) 
Instance details

Defined in Data.Strict.These

Methods

pure :: a0 -> These a a0 #

(<*>) :: These a (a0 -> b) -> These a a0 -> These a b #

liftA2 :: (a0 -> b -> c) -> These a a0 -> These a b -> These a c #

(*>) :: These a a0 -> These a b -> These a b #

(<*) :: These a a0 -> These a b -> These a a0 #

Semigroup a => Applicative (These a) 
Instance details

Defined in Data.These

Methods

pure :: a0 -> These a a0 #

(<*>) :: These a (a0 -> b) -> These a a0 -> These a b #

liftA2 :: (a0 -> b -> c) -> These a a0 -> These a b -> These a c #

(*>) :: These a a0 -> These a b -> These a b #

(<*) :: These a a0 -> These a b -> These a a0 #

Applicative f => Applicative (Lift f)

A combination is Pure only if both parts are.

Instance details

Defined in Control.Applicative.Lift

Methods

pure :: a -> Lift f a #

(<*>) :: Lift f (a -> b) -> Lift f a -> Lift f b #

liftA2 :: (a -> b -> c) -> Lift f a -> Lift f b -> Lift f c #

(*>) :: Lift f a -> Lift f b -> Lift f b #

(<*) :: Lift f a -> Lift f b -> Lift f a #

(Functor m, Monad m) => Applicative (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

pure :: a -> MaybeT m a #

(<*>) :: MaybeT m (a -> b) -> MaybeT m a -> MaybeT m b #

liftA2 :: (a -> b -> c) -> MaybeT m a -> MaybeT m b -> MaybeT m c #

(*>) :: MaybeT m a -> MaybeT m b -> MaybeT m b #

(<*) :: MaybeT m a -> MaybeT m b -> MaybeT m a #

MonadUnliftIO m => Applicative (Conc m)

Since: unliftio-0.2.9.0

Instance details

Defined in UnliftIO.Internals.Async

Methods

pure :: a -> Conc m a #

(<*>) :: Conc m (a -> b) -> Conc m a -> Conc m b #

liftA2 :: (a -> b -> c) -> Conc m a -> Conc m b -> Conc m c #

(*>) :: Conc m a -> Conc m b -> Conc m b #

(<*) :: Conc m a -> Conc m b -> Conc m a #

MonadUnliftIO m => Applicative (Concurrently m)

Since: unliftio-0.1.0.0

Instance details

Defined in UnliftIO.Internals.Async

Methods

pure :: a -> Concurrently m a #

(<*>) :: Concurrently m (a -> b) -> Concurrently m a -> Concurrently m b #

liftA2 :: (a -> b -> c) -> Concurrently m a -> Concurrently m b -> Concurrently m c #

(*>) :: Concurrently m a -> Concurrently m b -> Concurrently m b #

(<*) :: Concurrently m a -> Concurrently m b -> Concurrently m a #

Applicative (HandlerFor site) 
Instance details

Defined in Yesod.Core.Types

Methods

pure :: a -> HandlerFor site a #

(<*>) :: HandlerFor site (a -> b) -> HandlerFor site a -> HandlerFor site b #

liftA2 :: (a -> b -> c) -> HandlerFor site a -> HandlerFor site b -> HandlerFor site c #

(*>) :: HandlerFor site a -> HandlerFor site b -> HandlerFor site b #

(<*) :: HandlerFor site a -> HandlerFor site b -> HandlerFor site a #

Applicative (WidgetFor site) 
Instance details

Defined in Yesod.Core.Types

Methods

pure :: a -> WidgetFor site a #

(<*>) :: WidgetFor site (a -> b) -> WidgetFor site a -> WidgetFor site b #

liftA2 :: (a -> b -> c) -> WidgetFor site a -> WidgetFor site b -> WidgetFor site c #

(*>) :: WidgetFor site a -> WidgetFor site b -> WidgetFor site b #

(<*) :: WidgetFor site a -> WidgetFor site b -> WidgetFor site a #

Monad m => Applicative (FormInput m) 
Instance details

Defined in Yesod.Form.Input

Methods

pure :: a -> FormInput m a #

(<*>) :: FormInput m (a -> b) -> FormInput m a -> FormInput m b #

liftA2 :: (a -> b -> c) -> FormInput m a -> FormInput m b -> FormInput m c #

(*>) :: FormInput m a -> FormInput m b -> FormInput m b #

(<*) :: FormInput m a -> FormInput m b -> FormInput m a #

Monad m => Applicative (AForm m) 
Instance details

Defined in Yesod.Form.Types

Methods

pure :: a -> AForm m a #

(<*>) :: AForm m (a -> b) -> AForm m a -> AForm m b #

liftA2 :: (a -> b -> c) -> AForm m a -> AForm m b -> AForm m c #

(*>) :: AForm m a -> AForm m b -> AForm m b #

(<*) :: AForm m a -> AForm m b -> AForm m a #

Monoid a => Applicative ((,) a)

For tuples, the Monoid constraint on a determines how the first values merge. For example, Strings concatenate:

("hello ", (+15)) <*> ("world!", 2002)
("hello world!",2017)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: a0 -> (a, a0) #

(<*>) :: (a, a0 -> b) -> (a, a0) -> (a, b) #

liftA2 :: (a0 -> b -> c) -> (a, a0) -> (a, b) -> (a, c) #

(*>) :: (a, a0) -> (a, b) -> (a, b) #

(<*) :: (a, a0) -> (a, b) -> (a, a0) #

Arrow a => Applicative (WrappedArrow a b)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

pure :: a0 -> WrappedArrow a b a0 #

(<*>) :: WrappedArrow a b (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 #

liftA2 :: (a0 -> b0 -> c) -> WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b c #

(*>) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b b0 #

(<*) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 #

Applicative m => Applicative (Kleisli m a)

Since: base-4.14.0.0

Instance details

Defined in Control.Arrow

Methods

pure :: a0 -> Kleisli m a a0 #

(<*>) :: Kleisli m a (a0 -> b) -> Kleisli m a a0 -> Kleisli m a b #

liftA2 :: (a0 -> b -> c) -> Kleisli m a a0 -> Kleisli m a b -> Kleisli m a c #

(*>) :: Kleisli m a a0 -> Kleisli m a b -> Kleisli m a b #

(<*) :: Kleisli m a a0 -> Kleisli m a b -> Kleisli m a a0 #

Monoid m => Applicative (Const m :: Type -> Type)

Since: base-2.0.1

Instance details

Defined in Data.Functor.Const

Methods

pure :: a -> Const m a #

(<*>) :: Const m (a -> b) -> Const m a -> Const m b #

liftA2 :: (a -> b -> c) -> Const m a -> Const m b -> Const m c #

(*>) :: Const m a -> Const m b -> Const m b #

(<*) :: Const m a -> Const m b -> Const m a #

Applicative f => Applicative (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

pure :: a -> Ap f a #

(<*>) :: Ap f (a -> b) -> Ap f a -> Ap f b #

liftA2 :: (a -> b -> c) -> Ap f a -> Ap f b -> Ap f c #

(*>) :: Ap f a -> Ap f b -> Ap f b #

(<*) :: Ap f a -> Ap f b -> Ap f a #

Applicative f => Applicative (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

pure :: a -> Alt f a #

(<*>) :: Alt f (a -> b) -> Alt f a -> Alt f b #

liftA2 :: (a -> b -> c) -> Alt f a -> Alt f b -> Alt f c #

(*>) :: Alt f a -> Alt f b -> Alt f b #

(<*) :: Alt f a -> Alt f b -> Alt f a #

(Generic1 f, Applicative (Rep1 f)) => Applicative (Generically1 f)

Since: base-4.17.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> Generically1 f a #

(<*>) :: Generically1 f (a -> b) -> Generically1 f a -> Generically1 f b #

liftA2 :: (a -> b -> c) -> Generically1 f a -> Generically1 f b -> Generically1 f c #

(*>) :: Generically1 f a -> Generically1 f b -> Generically1 f b #

(<*) :: Generically1 f a -> Generically1 f b -> Generically1 f a #

Applicative f => Applicative (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> Rec1 f a #

(<*>) :: Rec1 f (a -> b) -> Rec1 f a -> Rec1 f b #

liftA2 :: (a -> b -> c) -> Rec1 f a -> Rec1 f b -> Rec1 f c #

(*>) :: Rec1 f a -> Rec1 f b -> Rec1 f b #

(<*) :: Rec1 f a -> Rec1 f b -> Rec1 f a #

Biapplicative p => Applicative (Join p) 
Instance details

Defined in Data.Bifunctor.Join

Methods

pure :: a -> Join p a #

(<*>) :: Join p (a -> b) -> Join p a -> Join p b #

liftA2 :: (a -> b -> c) -> Join p a -> Join p b -> Join p c #

(*>) :: Join p a -> Join p b -> Join p b #

(<*) :: Join p a -> Join p b -> Join p a #

Monad m => Applicative (ZipSink i m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

pure :: a -> ZipSink i m a #

(<*>) :: ZipSink i m (a -> b) -> ZipSink i m a -> ZipSink i m b #

liftA2 :: (a -> b -> c) -> ZipSink i m a -> ZipSink i m b -> ZipSink i m c #

(*>) :: ZipSink i m a -> ZipSink i m b -> ZipSink i m b #

(<*) :: ZipSink i m a -> ZipSink i m b -> ZipSink i m a #

(Applicative f, Monad f) => Applicative (WhenMissing f x)

Equivalent to ReaderT k (ReaderT x (MaybeT f)).

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

pure :: a -> WhenMissing f x a #

(<*>) :: WhenMissing f x (a -> b) -> WhenMissing f x a -> WhenMissing f x b #

liftA2 :: (a -> b -> c) -> WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x c #

(*>) :: WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x b #

(<*) :: WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x a #

(Functor f, Monad m) => Applicative (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

pure :: a -> FreeT f m a #

(<*>) :: FreeT f m (a -> b) -> FreeT f m a -> FreeT f m b #

liftA2 :: (a -> b -> c) -> FreeT f m a -> FreeT f m b -> FreeT f m c #

(*>) :: FreeT f m a -> FreeT f m b -> FreeT f m b #

(<*) :: FreeT f m a -> FreeT f m b -> FreeT f m a #

(Applicative f, Applicative g) => Applicative (Day f g) 
Instance details

Defined in Data.Functor.Day

Methods

pure :: a -> Day f g a #

(<*>) :: Day f g (a -> b) -> Day f g a -> Day f g b #

liftA2 :: (a -> b -> c) -> Day f g a -> Day f g b -> Day f g c #

(*>) :: Day f g a -> Day f g b -> Day f g b #

(<*) :: Day f g a -> Day f g b -> Day f g a #

Applicative (Bazaar a b) 
Instance details

Defined in Lens.Micro

Methods

pure :: a0 -> Bazaar a b a0 #

(<*>) :: Bazaar a b (a0 -> b0) -> Bazaar a b a0 -> Bazaar a b b0 #

liftA2 :: (a0 -> b0 -> c) -> Bazaar a b a0 -> Bazaar a b b0 -> Bazaar a b c #

(*>) :: Bazaar a b a0 -> Bazaar a b b0 -> Bazaar a b b0 #

(<*) :: Bazaar a b a0 -> Bazaar a b b0 -> Bazaar a b a0 #

(Functor m, Monad m) => Applicative (StateT s m) 
Instance details

Defined in Lens.Micro

Methods

pure :: a -> StateT s m a #

(<*>) :: StateT s m (a -> b) -> StateT s m a -> StateT s m b #

liftA2 :: (a -> b -> c) -> StateT s m a -> StateT s m b -> StateT s m c #

(*>) :: StateT s m a -> StateT s m b -> StateT s m b #

(<*) :: StateT s m a -> StateT s m b -> StateT s m a #

(Applicative (Rep p), Representable p) => Applicative (Prep p) 
Instance details

Defined in Data.Profunctor.Rep

Methods

pure :: a -> Prep p a #

(<*>) :: Prep p (a -> b) -> Prep p a -> Prep p b #

liftA2 :: (a -> b -> c) -> Prep p a -> Prep p b -> Prep p c #

(*>) :: Prep p a -> Prep p b -> Prep p b #

(<*) :: Prep p a -> Prep p b -> Prep p a #

Applicative (Tagged s) 
Instance details

Defined in Data.Tagged

Methods

pure :: a -> Tagged s a #

(<*>) :: Tagged s (a -> b) -> Tagged s a -> Tagged s b #

liftA2 :: (a -> b -> c) -> Tagged s a -> Tagged s b -> Tagged s c #

(*>) :: Tagged s a -> Tagged s b -> Tagged s b #

(<*) :: Tagged s a -> Tagged s b -> Tagged s a #

Applicative f => Applicative (Backwards f)

Apply f-actions in the reverse order.

Instance details

Defined in Control.Applicative.Backwards

Methods

pure :: a -> Backwards f a #

(<*>) :: Backwards f (a -> b) -> Backwards f a -> Backwards f b #

liftA2 :: (a -> b -> c) -> Backwards f a -> Backwards f b -> Backwards f c #

(*>) :: Backwards f a -> Backwards f b -> Backwards f b #

(<*) :: Backwards f a -> Backwards f b -> Backwards f a #

(Monoid w, Functor m, Monad m) => Applicative (AccumT w m) 
Instance details

Defined in Control.Monad.Trans.Accum

Methods

pure :: a -> AccumT w m a #

(<*>) :: AccumT w m (a -> b) -> AccumT w m a -> AccumT w m b #

liftA2 :: (a -> b -> c) -> AccumT w m a -> AccumT w m b -> AccumT w m c #

(*>) :: AccumT w m a -> AccumT w m b -> AccumT w m b #

(<*) :: AccumT w m a -> AccumT w m b -> AccumT w m a #

(Functor m, Monad m) => Applicative (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

pure :: a -> ExceptT e m a #

(<*>) :: ExceptT e m (a -> b) -> ExceptT e m a -> ExceptT e m b #

liftA2 :: (a -> b -> c) -> ExceptT e m a -> ExceptT e m b -> ExceptT e m c #

(*>) :: ExceptT e m a -> ExceptT e m b -> ExceptT e m b #

(<*) :: ExceptT e m a -> ExceptT e m b -> ExceptT e m a #

Applicative m => Applicative (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

pure :: a -> IdentityT m a #

(<*>) :: IdentityT m (a -> b) -> IdentityT m a -> IdentityT m b #

liftA2 :: (a -> b -> c) -> IdentityT m a -> IdentityT m b -> IdentityT m c #

(*>) :: IdentityT m a -> IdentityT m b -> IdentityT m b #

(<*) :: IdentityT m a -> IdentityT m b -> IdentityT m a #

Applicative m => Applicative (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

pure :: a -> ReaderT r m a #

(<*>) :: ReaderT r m (a -> b) -> ReaderT r m a -> ReaderT r m b #

liftA2 :: (a -> b -> c) -> ReaderT r m a -> ReaderT r m b -> ReaderT r m c #

(*>) :: ReaderT r m a -> ReaderT r m b -> ReaderT r m b #

(<*) :: ReaderT r m a -> ReaderT r m b -> ReaderT r m a #

(Functor m, Monad m) => Applicative (SelectT r m) 
Instance details

Defined in Control.Monad.Trans.Select

Methods

pure :: a -> SelectT r m a #

(<*>) :: SelectT r m (a -> b) -> SelectT r m a -> SelectT r m b #

liftA2 :: (a -> b -> c) -> SelectT r m a -> SelectT r m b -> SelectT r m c #

(*>) :: SelectT r m a -> SelectT r m b -> SelectT r m b #

(<*) :: SelectT r m a -> SelectT r m b -> SelectT r m a #

(Functor m, Monad m) => Applicative (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Lazy

Methods

pure :: a -> StateT s m a #

(<*>) :: StateT s m (a -> b) -> StateT s m a -> StateT s m b #

liftA2 :: (a -> b -> c) -> StateT s m a -> StateT s m b -> StateT s m c #

(*>) :: StateT s m a -> StateT s m b -> StateT s m b #

(<*) :: StateT s m a -> StateT s m b -> StateT s m a #

(Functor m, Monad m) => Applicative (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

pure :: a -> StateT s m a #

(<*>) :: StateT s m (a -> b) -> StateT s m a -> StateT s m b #

liftA2 :: (a -> b -> c) -> StateT s m a -> StateT s m b -> StateT s m c #

(*>) :: StateT s m a -> StateT s m b -> StateT s m b #

(<*) :: StateT s m a -> StateT s m b -> StateT s m a #

(Functor m, Monad m) => Applicative (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.CPS

Methods

pure :: a -> WriterT w m a #

(<*>) :: WriterT w m (a -> b) -> WriterT w m a -> WriterT w m b #

liftA2 :: (a -> b -> c) -> WriterT w m a -> WriterT w m b -> WriterT w m c #

(*>) :: WriterT w m a -> WriterT w m b -> WriterT w m b #

(<*) :: WriterT w m a -> WriterT w m b -> WriterT w m a #

(Monoid w, Applicative m) => Applicative (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

pure :: a -> WriterT w m a #

(<*>) :: WriterT w m (a -> b) -> WriterT w m a -> WriterT w m b #

liftA2 :: (a -> b -> c) -> WriterT w m a -> WriterT w m b -> WriterT w m c #

(*>) :: WriterT w m a -> WriterT w m b -> WriterT w m b #

(<*) :: WriterT w m a -> WriterT w m b -> WriterT w m a #

(Monoid w, Applicative m) => Applicative (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

pure :: a -> WriterT w m a #

(<*>) :: WriterT w m (a -> b) -> WriterT w m a -> WriterT w m b #

liftA2 :: (a -> b -> c) -> WriterT w m a -> WriterT w m b -> WriterT w m c #

(*>) :: WriterT w m a -> WriterT w m b -> WriterT w m b #

(<*) :: WriterT w m a -> WriterT w m b -> WriterT w m a #

Monoid a => Applicative (Constant a :: Type -> Type) 
Instance details

Defined in Data.Functor.Constant

Methods

pure :: a0 -> Constant a a0 #

(<*>) :: Constant a (a0 -> b) -> Constant a a0 -> Constant a b #

liftA2 :: (a0 -> b -> c) -> Constant a a0 -> Constant a b -> Constant a c #

(*>) :: Constant a a0 -> Constant a b -> Constant a b #

(<*) :: Constant a a0 -> Constant a b -> Constant a a0 #

Applicative f => Applicative (Reverse f)

Derived instance.

Instance details

Defined in Data.Functor.Reverse

Methods

pure :: a -> Reverse f a #

(<*>) :: Reverse f (a -> b) -> Reverse f a -> Reverse f b #

liftA2 :: (a -> b -> c) -> Reverse f a -> Reverse f b -> Reverse f c #

(*>) :: Reverse f a -> Reverse f b -> Reverse f b #

(<*) :: Reverse f a -> Reverse f b -> Reverse f a #

Applicative (SubHandlerFor child master) 
Instance details

Defined in Yesod.Core.Types

Methods

pure :: a -> SubHandlerFor child master a #

(<*>) :: SubHandlerFor child master (a -> b) -> SubHandlerFor child master a -> SubHandlerFor child master b #

liftA2 :: (a -> b -> c) -> SubHandlerFor child master a -> SubHandlerFor child master b -> SubHandlerFor child master c #

(*>) :: SubHandlerFor child master a -> SubHandlerFor child master b -> SubHandlerFor child master b #

(<*) :: SubHandlerFor child master a -> SubHandlerFor child master b -> SubHandlerFor child master a #

(Monoid a, Monoid b) => Applicative ((,,) a b)

Since: base-4.14.0.0

Instance details

Defined in GHC.Base

Methods

pure :: a0 -> (a, b, a0) #

(<*>) :: (a, b, a0 -> b0) -> (a, b, a0) -> (a, b, b0) #

liftA2 :: (a0 -> b0 -> c) -> (a, b, a0) -> (a, b, b0) -> (a, b, c) #

(*>) :: (a, b, a0) -> (a, b, b0) -> (a, b, b0) #

(<*) :: (a, b, a0) -> (a, b, b0) -> (a, b, a0) #

(Applicative f, Applicative g) => Applicative (Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

pure :: a -> Product f g a #

(<*>) :: Product f g (a -> b) -> Product f g a -> Product f g b #

liftA2 :: (a -> b -> c) -> Product f g a -> Product f g b -> Product f g c #

(*>) :: Product f g a -> Product f g b -> Product f g b #

(<*) :: Product f g a -> Product f g b -> Product f g a #

(Applicative f, Applicative g) => Applicative (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> (f :*: g) a #

(<*>) :: (f :*: g) (a -> b) -> (f :*: g) a -> (f :*: g) b #

liftA2 :: (a -> b -> c) -> (f :*: g) a -> (f :*: g) b -> (f :*: g) c #

(*>) :: (f :*: g) a -> (f :*: g) b -> (f :*: g) b #

(<*) :: (f :*: g) a -> (f :*: g) b -> (f :*: g) a #

Monoid c => Applicative (K1 i c :: Type -> Type)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> K1 i c a #

(<*>) :: K1 i c (a -> b) -> K1 i c a -> K1 i c b #

liftA2 :: (a -> b -> c0) -> K1 i c a -> K1 i c b -> K1 i c c0 #

(*>) :: K1 i c a -> K1 i c b -> K1 i c b #

(<*) :: K1 i c a -> K1 i c b -> K1 i c a #

Applicative (ConduitT i o m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

pure :: a -> ConduitT i o m a #

(<*>) :: ConduitT i o m (a -> b) -> ConduitT i o m a -> ConduitT i o m b #

liftA2 :: (a -> b -> c) -> ConduitT i o m a -> ConduitT i o m b -> ConduitT i o m c #

(*>) :: ConduitT i o m a -> ConduitT i o m b -> ConduitT i o m b #

(<*) :: ConduitT i o m a -> ConduitT i o m b -> ConduitT i o m a #

Monad m => Applicative (ZipConduit i o m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

pure :: a -> ZipConduit i o m a #

(<*>) :: ZipConduit i o m (a -> b) -> ZipConduit i o m a -> ZipConduit i o m b #

liftA2 :: (a -> b -> c) -> ZipConduit i o m a -> ZipConduit i o m b -> ZipConduit i o m c #

(*>) :: ZipConduit i o m a -> ZipConduit i o m b -> ZipConduit i o m b #

(<*) :: ZipConduit i o m a -> ZipConduit i o m b -> ZipConduit i o m a #

(Monad f, Applicative f) => Applicative (WhenMatched f x y)

Equivalent to ReaderT Key (ReaderT x (ReaderT y (MaybeT f)))

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

pure :: a -> WhenMatched f x y a #

(<*>) :: WhenMatched f x y (a -> b) -> WhenMatched f x y a -> WhenMatched f x y b #

liftA2 :: (a -> b -> c) -> WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y c #

(*>) :: WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y b #

(<*) :: WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y a #

(Applicative f, Monad f) => Applicative (WhenMissing f k x)

Equivalent to ReaderT k (ReaderT x (MaybeT f)) .

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

pure :: a -> WhenMissing f k x a #

(<*>) :: WhenMissing f k x (a -> b) -> WhenMissing f k x a -> WhenMissing f k x b #

liftA2 :: (a -> b -> c) -> WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x c #

(*>) :: WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x b #

(<*) :: WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x a #

Applicative (ContT r m) 
Instance details

Defined in Control.Monad.Trans.Cont

Methods

pure :: a -> ContT r m a #

(<*>) :: ContT r m (a -> b) -> ContT r m a -> ContT r m b #

liftA2 :: (a -> b -> c) -> ContT r m a -> ContT r m b -> ContT r m c #

(*>) :: ContT r m a -> ContT r m b -> ContT r m b #

(<*) :: ContT r m a -> ContT r m b -> ContT r m a #

(Monoid a, Monoid b, Monoid c) => Applicative ((,,,) a b c)

Since: base-4.14.0.0

Instance details

Defined in GHC.Base

Methods

pure :: a0 -> (a, b, c, a0) #

(<*>) :: (a, b, c, a0 -> b0) -> (a, b, c, a0) -> (a, b, c, b0) #

liftA2 :: (a0 -> b0 -> c0) -> (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, c0) #

(*>) :: (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, b0) #

(<*) :: (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, a0) #

Applicative ((->) r)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: a -> r -> a #

(<*>) :: (r -> (a -> b)) -> (r -> a) -> r -> b #

liftA2 :: (a -> b -> c) -> (r -> a) -> (r -> b) -> r -> c #

(*>) :: (r -> a) -> (r -> b) -> r -> b #

(<*) :: (r -> a) -> (r -> b) -> r -> a #

(Applicative f, Applicative g) => Applicative (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

pure :: a -> Compose f g a #

(<*>) :: Compose f g (a -> b) -> Compose f g a -> Compose f g b #

liftA2 :: (a -> b -> c) -> Compose f g a -> Compose f g b -> Compose f g c #

(*>) :: Compose f g a -> Compose f g b -> Compose f g b #

(<*) :: Compose f g a -> Compose f g b -> Compose f g a #

(Applicative f, Applicative g) => Applicative (f :.: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> (f :.: g) a #

(<*>) :: (f :.: g) (a -> b) -> (f :.: g) a -> (f :.: g) b #

liftA2 :: (a -> b -> c) -> (f :.: g) a -> (f :.: g) b -> (f :.: g) c #

(*>) :: (f :.: g) a -> (f :.: g) b -> (f :.: g) b #

(<*) :: (f :.: g) a -> (f :.: g) b -> (f :.: g) a #

Applicative f => Applicative (M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> M1 i c f a #

(<*>) :: M1 i c f (a -> b) -> M1 i c f a -> M1 i c f b #

liftA2 :: (a -> b -> c0) -> M1 i c f a -> M1 i c f b -> M1 i c f c0 #

(*>) :: M1 i c f a -> M1 i c f b -> M1 i c f b #

(<*) :: M1 i c f a -> M1 i c f b -> M1 i c f a #

(Monad f, Applicative f) => Applicative (WhenMatched f k x y)

Equivalent to ReaderT k (ReaderT x (ReaderT y (MaybeT f)))

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

pure :: a -> WhenMatched f k x y a #

(<*>) :: WhenMatched f k x y (a -> b) -> WhenMatched f k x y a -> WhenMatched f k x y b #

liftA2 :: (a -> b -> c) -> WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y c #

(*>) :: WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y b #

(<*) :: WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y a #

(Functor m, Monad m) => Applicative (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.CPS

Methods

pure :: a -> RWST r w s m a #

(<*>) :: RWST r w s m (a -> b) -> RWST r w s m a -> RWST r w s m b #

liftA2 :: (a -> b -> c) -> RWST r w s m a -> RWST r w s m b -> RWST r w s m c #

(*>) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m b #

(<*) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m a #

(Monoid w, Functor m, Monad m) => Applicative (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Lazy

Methods

pure :: a -> RWST r w s m a #

(<*>) :: RWST r w s m (a -> b) -> RWST r w s m a -> RWST r w s m b #

liftA2 :: (a -> b -> c) -> RWST r w s m a -> RWST r w s m b -> RWST r w s m c #

(*>) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m b #

(<*) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m a #

(Monoid w, Functor m, Monad m) => Applicative (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Strict

Methods

pure :: a -> RWST r w s m a #

(<*>) :: RWST r w s m (a -> b) -> RWST r w s m a -> RWST r w s m b #

liftA2 :: (a -> b -> c) -> RWST r w s m a -> RWST r w s m b -> RWST r w s m c #

(*>) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m b #

(<*) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m a #

Monad state => Applicative (Builder collection mutCollection step state err) 
Instance details

Defined in Basement.MutableBuilder

Methods

pure :: a -> Builder collection mutCollection step state err a #

(<*>) :: Builder collection mutCollection step state err (a -> b) -> Builder collection mutCollection step state err a -> Builder collection mutCollection step state err b #

liftA2 :: (a -> b -> c) -> Builder collection mutCollection step state err a -> Builder collection mutCollection step state err b -> Builder collection mutCollection step state err c #

(*>) :: Builder collection mutCollection step state err a -> Builder collection mutCollection step state err b -> Builder collection mutCollection step state err b #

(<*) :: Builder collection mutCollection step state err a -> Builder collection mutCollection step state err b -> Builder collection mutCollection step state err a #

Monad m => Applicative (Pipe l i o u m) 
Instance details

Defined in Data.Conduit.Internal.Pipe

Methods

pure :: a -> Pipe l i o u m a #

(<*>) :: Pipe l i o u m (a -> b) -> Pipe l i o u m a -> Pipe l i o u m b #

liftA2 :: (a -> b -> c) -> Pipe l i o u m a -> Pipe l i o u m b -> Pipe l i o u m c #

(*>) :: Pipe l i o u m a -> Pipe l i o u m b -> Pipe l i o u m b #

(<*) :: Pipe l i o u m a -> Pipe l i o u m b -> Pipe l i o u m a #

class Functor (f :: Type -> Type) where #

A type f is a Functor if it provides a function fmap which, given any types a and b lets you apply any function from (a -> b) to turn an f a into an f b, preserving the structure of f. Furthermore f needs to adhere to the following:

Identity
fmap id == id
Composition
fmap (f . g) == fmap f . fmap g

Note, that the second law follows from the free theorem of the type fmap and the first law, so you need only check that the former condition holds. See https://www.schoolofhaskell.com/user/edwardk/snippets/fmap or https://github.com/quchen/articles/blob/master/second_functor_law.md for an explanation.

Minimal complete definition

fmap

Methods

fmap :: (a -> b) -> f a -> f b #

fmap is used to apply a function of type (a -> b) to a value of type f a, where f is a functor, to produce a value of type f b. Note that for any type constructor with more than one parameter (e.g., Either), only the last type parameter can be modified with fmap (e.g., b in `Either a b`).

Some type constructors with two parameters or more have a Bifunctor instance that allows both the last and the penultimate parameters to be mapped over.

Examples

Expand

Convert from a Maybe Int to a Maybe String using show:

>>> fmap show Nothing
Nothing
>>> fmap show (Just 3)
Just "3"

Convert from an Either Int Int to an Either Int String using show:

>>> fmap show (Left 17)
Left 17
>>> fmap show (Right 17)
Right "17"

Double each element of a list:

>>> fmap (*2) [1,2,3]
[2,4,6]

Apply even to the second element of a pair:

>>> fmap even (2,2)
(2,True)

It may seem surprising that the function is only applied to the last element of the tuple compared to the list example above which applies it to every element in the list. To understand, remember that tuples are type constructors with multiple type parameters: a tuple of 3 elements (a,b,c) can also be written (,,) a b c and its Functor instance is defined for Functor ((,,) a b) (i.e., only the third parameter is free to be mapped over with fmap).

It explains why fmap can be used with tuples containing values of different types as in the following example:

>>> fmap even ("hello", 1.0, 4)
("hello",1.0,True)

(<$) :: a -> f b -> f a infixl 4 #

Replace all locations in the input with the same value. The default definition is fmap . const, but this may be overridden with a more efficient version.

Examples

Expand

Perform a computation with Maybe and replace the result with a constant value if it is Just:

>>> 'a' <$ Just 2
Just 'a'
>>> 'a' <$ Nothing
Nothing

Instances

Instances details
Functor KeyMap 
Instance details

Defined in Data.Aeson.KeyMap

Methods

fmap :: (a -> b) -> KeyMap a -> KeyMap b #

(<$) :: a -> KeyMap b -> KeyMap a #

Functor FromJSONKeyFunction

Only law abiding up to interpretation

Instance details

Defined in Data.Aeson.Types.FromJSON

Functor IResult 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

fmap :: (a -> b) -> IResult a -> IResult b #

(<$) :: a -> IResult b -> IResult a #

Functor Parser 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

fmap :: (a -> b) -> Parser a -> Parser b #

(<$) :: a -> Parser b -> Parser a #

Functor Result 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

fmap :: (a -> b) -> Result a -> Result b #

(<$) :: a -> Result b -> Result a #

Functor Async 
Instance details

Defined in Control.Concurrent.Async.Internal

Methods

fmap :: (a -> b) -> Async a -> Async b #

(<$) :: a -> Async b -> Async a #

Functor Concurrently 
Instance details

Defined in Control.Concurrent.Async.Internal

Methods

fmap :: (a -> b) -> Concurrently a -> Concurrently b #

(<$) :: a -> Concurrently b -> Concurrently a #

Functor ZipList

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

fmap :: (a -> b) -> ZipList a -> ZipList b #

(<$) :: a -> ZipList b -> ZipList a #

Functor Handler

Since: base-4.6.0.0

Instance details

Defined in Control.Exception

Methods

fmap :: (a -> b) -> Handler a -> Handler b #

(<$) :: a -> Handler b -> Handler a #

Functor Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Methods

fmap :: (a -> b) -> Complex a -> Complex b #

(<$) :: a -> Complex b -> Complex a #

Functor Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

fmap :: (a -> b) -> Identity a -> Identity b #

(<$) :: a -> Identity b -> Identity a #

Functor First

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

fmap :: (a -> b) -> First a -> First b #

(<$) :: a -> First b -> First a #

Functor Last

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

fmap :: (a -> b) -> Last a -> Last b #

(<$) :: a -> Last b -> Last a #

Functor Down

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

fmap :: (a -> b) -> Down a -> Down b #

(<$) :: a -> Down b -> Down a #

Functor First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fmap :: (a -> b) -> First a -> First b #

(<$) :: a -> First b -> First a #

Functor Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fmap :: (a -> b) -> Last a -> Last b #

(<$) :: a -> Last b -> Last a #

Functor Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fmap :: (a -> b) -> Max a -> Max b #

(<$) :: a -> Max b -> Max a #

Functor Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fmap :: (a -> b) -> Min a -> Min b #

(<$) :: a -> Min b -> Min a #

Functor Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

fmap :: (a -> b) -> Dual a -> Dual b #

(<$) :: a -> Dual b -> Dual a #

Functor Product

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

fmap :: (a -> b) -> Product a -> Product b #

(<$) :: a -> Product b -> Product a #

Functor Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

fmap :: (a -> b) -> Sum a -> Sum b #

(<$) :: a -> Sum b -> Sum a #

Functor NonEmpty

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

fmap :: (a -> b) -> NonEmpty a -> NonEmpty b #

(<$) :: a -> NonEmpty b -> NonEmpty a #

Functor STM

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

fmap :: (a -> b) -> STM a -> STM b #

(<$) :: a -> STM b -> STM a #

Functor Par1

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> Par1 a -> Par1 b #

(<$) :: a -> Par1 b -> Par1 a #

Functor P

Since: base-4.8.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

fmap :: (a -> b) -> P a -> P b #

(<$) :: a -> P b -> P a #

Functor ReadP

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

fmap :: (a -> b) -> ReadP a -> ReadP b #

(<$) :: a -> ReadP b -> ReadP a #

Functor ReadPrec

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadPrec

Methods

fmap :: (a -> b) -> ReadPrec a -> ReadPrec b #

(<$) :: a -> ReadPrec b -> ReadPrec a #

Functor MarkupM 
Instance details

Defined in Text.Blaze.Internal

Methods

fmap :: (a -> b) -> MarkupM a -> MarkupM b #

(<$) :: a -> MarkupM b -> MarkupM a #

Functor Put 
Instance details

Defined in Data.ByteString.Builder.Internal

Methods

fmap :: (a -> b) -> Put a -> Put b #

(<$) :: a -> Put b -> Put a #

Functor Flush 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

fmap :: (a -> b) -> Flush a -> Flush b #

(<$) :: a -> Flush b -> Flush a #

Functor IntMap 
Instance details

Defined in Data.IntMap.Internal

Methods

fmap :: (a -> b) -> IntMap a -> IntMap b #

(<$) :: a -> IntMap b -> IntMap a #

Functor Digit 
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> Digit a -> Digit b #

(<$) :: a -> Digit b -> Digit a #

Functor Elem 
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> Elem a -> Elem b #

(<$) :: a -> Elem b -> Elem a #

Functor FingerTree 
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> FingerTree a -> FingerTree b #

(<$) :: a -> FingerTree b -> FingerTree a #

Functor Node 
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> Node a -> Node b #

(<$) :: a -> Node b -> Node a #

Functor Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> Seq a -> Seq b #

(<$) :: a -> Seq b -> Seq a #

Functor ViewL 
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> ViewL a -> ViewL b #

(<$) :: a -> ViewL b -> ViewL a #

Functor ViewR 
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> ViewR a -> ViewR b #

(<$) :: a -> ViewR b -> ViewR a #

Functor Tree 
Instance details

Defined in Data.Tree

Methods

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

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

Functor CryptoFailable 
Instance details

Defined in Crypto.Error.Types

Methods

fmap :: (a -> b) -> CryptoFailable a -> CryptoFailable b #

(<$) :: a -> CryptoFailable b -> CryptoFailable a #

Functor CryptoFailable 
Instance details

Defined in Crypto.Error.Types

Methods

fmap :: (a -> b) -> CryptoFailable a -> CryptoFailable b #

(<$) :: a -> CryptoFailable b -> CryptoFailable a #

Functor DNonEmpty 
Instance details

Defined in Data.DList.DNonEmpty.Internal

Methods

fmap :: (a -> b) -> DNonEmpty a -> DNonEmpty b #

(<$) :: a -> DNonEmpty b -> DNonEmpty a #

Functor DList 
Instance details

Defined in Data.DList.Internal

Methods

fmap :: (a -> b) -> DList a -> DList b #

(<$) :: a -> DList b -> DList a #

Functor UpsertResult Source # 
Instance details

Defined in Model

Methods

fmap :: (a -> b) -> UpsertResult a -> UpsertResult b #

(<$) :: a -> UpsertResult b -> UpsertResult a #

(TypeError SqlExprFunctorMessage :: Constraint) => Functor SqlExpr

Folks often want the ability to promote a Haskell function into the SqlExpr expression language - and naturally reach for fmap. Unfortunately, this is impossible. We cannot send *functions* to the database, which is what we would need to do in order for this to make sense. Let's consider the type of fmap for SqlExpr:

fmap :: (a -> b) -> SqlExpr a -> SqlExpr b

This type signature is making a pretty strong claim: "Give me a Haskell function from a -> b. I will then transform a SQL expression representing a Haskell value of type a and turn it into a SQL expression representing a Haskell value of type b."

Let's suppose we *could* do this - fmap (+1) would have to somehow inspect the function expression means "add one", and then translate that to the appropriate SQL.

This is why esqueleto defines a bunch of operators: x +. (val 1) can be used instead of fmap (+1) x.

If you do have a SQL function, then you can provide a safe type and introduce it with unsafeSqlFunction or unsafeSqlBinOp.

Since: esqueleto-3.5.8.2

Instance details

Defined in Database.Esqueleto.Internal.Internal

Methods

fmap :: (a -> b) -> SqlExpr a -> SqlExpr b #

(<$) :: a -> SqlExpr b -> SqlExpr a #

Functor SqlQuery 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Methods

fmap :: (a -> b) -> SqlQuery a -> SqlQuery b #

(<$) :: a -> SqlQuery b -> SqlQuery a #

Functor Value

Since: esqueleto-1.4.4

Instance details

Defined in Database.Esqueleto.Internal.Internal

Methods

fmap :: (a -> b) -> Value a -> Value b #

(<$) :: a -> Value b -> Value a #

Functor IO

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

fmap :: (a -> b) -> IO a -> IO b #

(<$) :: a -> IO b -> IO a #

Functor LenientData 
Instance details

Defined in Web.Internal.HttpApiData

Methods

fmap :: (a -> b) -> LenientData a -> LenientData b #

(<$) :: a -> LenientData b -> LenientData a #

Functor HistoriedResponse 
Instance details

Defined in Network.HTTP.Client

Functor Response 
Instance details

Defined in Network.HTTP.Client.Types

Methods

fmap :: (a -> b) -> Response a -> Response b #

(<$) :: a -> Response b -> Response a #

Functor AnnotDetails 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

fmap :: (a -> b) -> AnnotDetails a -> AnnotDetails b #

(<$) :: a -> AnnotDetails b -> AnnotDetails a #

Functor Doc 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

fmap :: (a -> b) -> Doc a -> Doc b #

(<$) :: a -> Doc b -> Doc a #

Functor Span 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

fmap :: (a -> b) -> Span a -> Span b #

(<$) :: a -> Span b -> Span a #

Functor Array 
Instance details

Defined in Data.Primitive.Array

Methods

fmap :: (a -> b) -> Array a -> Array b #

(<$) :: a -> Array b -> Array a #

Functor SmallArray 
Instance details

Defined in Data.Primitive.SmallArray

Methods

fmap :: (a -> b) -> SmallArray a -> SmallArray b #

(<$) :: a -> SmallArray b -> SmallArray a #

Functor Acquire 
Instance details

Defined in Data.Acquire.Internal

Methods

fmap :: (a -> b) -> Acquire a -> Acquire b #

(<$) :: a -> Acquire b -> Acquire a #

Functor Result 
Instance details

Defined in Text.Hamlet.Parse

Methods

fmap :: (a -> b) -> Result a -> Result b #

(<$) :: a -> Result b -> Result a #

Functor Maybe 
Instance details

Defined in Data.Strict.Maybe

Methods

fmap :: (a -> b) -> Maybe a -> Maybe b #

(<$) :: a -> Maybe b -> Maybe a #

Functor Q 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

fmap :: (a -> b) -> Q a -> Q b #

(<$) :: a -> Q b -> Q a #

Functor TyVarBndr 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

fmap :: (a -> b) -> TyVarBndr a -> TyVarBndr b #

(<$) :: a -> TyVarBndr b -> TyVarBndr a #

Functor Flat 
Instance details

Defined in UnliftIO.Internals.Async

Methods

fmap :: (a -> b) -> Flat a -> Flat b #

(<$) :: a -> Flat b -> Flat a #

Functor FlatApp 
Instance details

Defined in UnliftIO.Internals.Async

Methods

fmap :: (a -> b) -> FlatApp a -> FlatApp b #

(<$) :: a -> FlatApp b -> FlatApp a #

Functor Memoized 
Instance details

Defined in UnliftIO.Memoize

Methods

fmap :: (a -> b) -> Memoized a -> Memoized b #

(<$) :: a -> Memoized b -> Memoized a #

Functor Vector 
Instance details

Defined in Data.Vector

Methods

fmap :: (a -> b) -> Vector a -> Vector b #

(<$) :: a -> Vector b -> Vector a #

Functor Dispatch 
Instance details

Defined in Yesod.Routes.TH.Types

Methods

fmap :: (a -> b) -> Dispatch a -> Dispatch b #

(<$) :: a -> Dispatch b -> Dispatch a #

Functor Piece 
Instance details

Defined in Yesod.Routes.TH.Types

Methods

fmap :: (a -> b) -> Piece a -> Piece b #

(<$) :: a -> Piece b -> Piece a #

Functor Resource 
Instance details

Defined in Yesod.Routes.TH.Types

Methods

fmap :: (a -> b) -> Resource a -> Resource b #

(<$) :: a -> Resource b -> Resource a #

Functor ResourceTree 
Instance details

Defined in Yesod.Routes.TH.Types

Methods

fmap :: (a -> b) -> ResourceTree a -> ResourceTree b #

(<$) :: a -> ResourceTree b -> ResourceTree a #

Functor Option

Since: yesod-form-1.4.6

Instance details

Defined in Yesod.Form.Fields

Methods

fmap :: (a -> b) -> Option a -> Option b #

(<$) :: a -> Option b -> Option a #

Functor OptionList

Since: yesod-form-1.4.6

Instance details

Defined in Yesod.Form.Fields

Methods

fmap :: (a -> b) -> OptionList a -> OptionList b #

(<$) :: a -> OptionList b -> OptionList a #

Functor FormResult 
Instance details

Defined in Yesod.Form.Types

Methods

fmap :: (a -> b) -> FormResult a -> FormResult b #

(<$) :: a -> FormResult b -> FormResult a #

Functor Stream 
Instance details

Defined in Codec.Compression.Zlib.Stream

Methods

fmap :: (a -> b) -> Stream a -> Stream b #

(<$) :: a -> Stream b -> Stream a #

Functor Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

fmap :: (a -> b) -> Maybe a -> Maybe b #

(<$) :: a -> Maybe b -> Maybe a #

Functor Solo

Since: base-4.15

Instance details

Defined in GHC.Base

Methods

fmap :: (a -> b) -> Solo a -> Solo b #

(<$) :: a -> Solo b -> Solo a #

Functor List

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

fmap :: (a -> b) -> [a] -> [b] #

(<$) :: a -> [b] -> [a] #

Functor f => Functor (Co f) 
Instance details

Defined in Data.Functor.Rep

Methods

fmap :: (a -> b) -> Co f a -> Co f b #

(<$) :: a -> Co f b -> Co f a #

Functor (Tagged2 s) 
Instance details

Defined in Data.Aeson.Types.Generic

Methods

fmap :: (a -> b) -> Tagged2 s a -> Tagged2 s b #

(<$) :: a -> Tagged2 s b -> Tagged2 s a #

Functor (ConcurrentlyE e) 
Instance details

Defined in Control.Concurrent.Async.Internal

Methods

fmap :: (a -> b) -> ConcurrentlyE e a -> ConcurrentlyE e b #

(<$) :: a -> ConcurrentlyE e b -> ConcurrentlyE e a #

Functor (IResult i) 
Instance details

Defined in Data.Attoparsec.Internal.Types

Methods

fmap :: (a -> b) -> IResult i a -> IResult i b #

(<$) :: a -> IResult i b -> IResult i a #

Functor (Parser i) 
Instance details

Defined in Data.Attoparsec.Internal.Types

Methods

fmap :: (a -> b) -> Parser i a -> Parser i b #

(<$) :: a -> Parser i b -> Parser i a #

Monad m => Functor (WrappedMonad m)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

fmap :: (a -> b) -> WrappedMonad m a -> WrappedMonad m b #

(<$) :: a -> WrappedMonad m b -> WrappedMonad m a #

Arrow a => Functor (ArrowMonad a)

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

Methods

fmap :: (a0 -> b) -> ArrowMonad a a0 -> ArrowMonad a b #

(<$) :: a0 -> ArrowMonad a b -> ArrowMonad a a0 #

Functor (Either a)

Since: base-3.0

Instance details

Defined in Data.Either

Methods

fmap :: (a0 -> b) -> Either a a0 -> Either a b #

(<$) :: a0 -> Either a b -> Either a a0 #

Functor (Proxy :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

fmap :: (a -> b) -> Proxy a -> Proxy b #

(<$) :: a -> Proxy b -> Proxy a #

Functor (Arg a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fmap :: (a0 -> b) -> Arg a a0 -> Arg a b #

(<$) :: a0 -> Arg a b -> Arg a a0 #

Functor (U1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> U1 a -> U1 b #

(<$) :: a -> U1 b -> U1 a #

Functor (V1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> V1 a -> V1 b #

(<$) :: a -> V1 b -> V1 a #

Functor (ST s)

Since: base-2.1

Instance details

Defined in GHC.ST

Methods

fmap :: (a -> b) -> ST s a -> ST s b #

(<$) :: a -> ST s b -> ST s a #

Monad m => Functor (ZipSource m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

fmap :: (a -> b) -> ZipSource m a -> ZipSource m b #

(<$) :: a -> ZipSource m b -> ZipSource m a #

Functor (Map k) 
Instance details

Defined in Data.Map.Internal

Methods

fmap :: (a -> b) -> Map k a -> Map k b #

(<$) :: a -> Map k b -> Map k a #

Monad m => Functor (Handler m) 
Instance details

Defined in Control.Monad.Catch

Methods

fmap :: (a -> b) -> Handler m a -> Handler m b #

(<$) :: a -> Handler m b -> Handler m a #

Monad m => Functor (CatchT m) 
Instance details

Defined in Control.Monad.Catch.Pure

Methods

fmap :: (a -> b) -> CatchT m a -> CatchT m b #

(<$) :: a -> CatchT m b -> CatchT m a #

Functor f => Functor (Cofree f) 
Instance details

Defined in Control.Comonad.Cofree

Methods

fmap :: (a -> b) -> Cofree f a -> Cofree f b #

(<$) :: a -> Cofree f b -> Cofree f a #

Functor f => Functor (Free f) 
Instance details

Defined in Control.Monad.Free

Methods

fmap :: (a -> b) -> Free f a -> Free f b #

(<$) :: a -> Free f b -> Free f a #

Functor f => Functor (Act f) 
Instance details

Defined in Data.Key

Methods

fmap :: (a -> b) -> Act f a -> Act f b #

(<$) :: a -> Act f b -> Act f a #

Functor (StateL s) 
Instance details

Defined in Data.Key

Methods

fmap :: (a -> b) -> StateL s a -> StateL s b #

(<$) :: a -> StateL s b -> StateL s a #

Functor (StateR s) 
Instance details

Defined in Data.Key

Methods

fmap :: (a -> b) -> StateR s a -> StateR s b #

(<$) :: a -> StateR s b -> StateR s a #

Functor m => Functor (LoggingT m) 
Instance details

Defined in Control.Monad.Logger

Methods

fmap :: (a -> b) -> LoggingT m a -> LoggingT m b #

(<$) :: a -> LoggingT m b -> LoggingT m a #

Functor m => Functor (NoLoggingT m) 
Instance details

Defined in Control.Monad.Logger

Methods

fmap :: (a -> b) -> NoLoggingT m a -> NoLoggingT m b #

(<$) :: a -> NoLoggingT m b -> NoLoggingT m a #

Functor m => Functor (WriterLoggingT m) 
Instance details

Defined in Control.Monad.Logger

Methods

fmap :: (a -> b) -> WriterLoggingT m a -> WriterLoggingT m b #

(<$) :: a -> WriterLoggingT m b -> WriterLoggingT m a #

Functor f => Functor (WrappedPoly f) 
Instance details

Defined in Data.MonoTraversable

Methods

fmap :: (a -> b) -> WrappedPoly f a -> WrappedPoly f b #

(<$) :: a -> WrappedPoly f b -> WrappedPoly f a #

Functor m => Functor (ResourceT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

fmap :: (a -> b) -> ResourceT m a -> ResourceT m b #

(<$) :: a -> ResourceT m b -> ResourceT m a #

Functor (Either a) 
Instance details

Defined in Data.Strict.Either

Methods

fmap :: (a0 -> b) -> Either a a0 -> Either a b #

(<$) :: a0 -> Either a b -> Either a a0 #

Functor (These a) 
Instance details

Defined in Data.Strict.These

Methods

fmap :: (a0 -> b) -> These a a0 -> These a b #

(<$) :: a0 -> These a b -> These a a0 #

Functor (Pair e) 
Instance details

Defined in Data.Strict.Tuple

Methods

fmap :: (a -> b) -> Pair e a -> Pair e b #

(<$) :: a -> Pair e b -> Pair e a #

Functor (These a) 
Instance details

Defined in Data.These

Methods

fmap :: (a0 -> b) -> These a a0 -> These a b #

(<$) :: a0 -> These a b -> These a a0 #

Functor f => Functor (Lift f) 
Instance details

Defined in Control.Applicative.Lift

Methods

fmap :: (a -> b) -> Lift f a -> Lift f b #

(<$) :: a -> Lift f b -> Lift f a #

Functor m => Functor (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

fmap :: (a -> b) -> MaybeT m a -> MaybeT m b #

(<$) :: a -> MaybeT m b -> MaybeT m a #

Functor m => Functor (Conc m) 
Instance details

Defined in UnliftIO.Internals.Async

Methods

fmap :: (a -> b) -> Conc m a -> Conc m b #

(<$) :: a -> Conc m b -> Conc m a #

Monad m => Functor (Concurrently m)

Since: unliftio-0.1.0.0

Instance details

Defined in UnliftIO.Internals.Async

Methods

fmap :: (a -> b) -> Concurrently m a -> Concurrently m b #

(<$) :: a -> Concurrently m b -> Concurrently m a #

Functor (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

fmap :: (a -> b) -> HashMap k a -> HashMap k b #

(<$) :: a -> HashMap k b -> HashMap k a #

Functor (HandlerFor site) 
Instance details

Defined in Yesod.Core.Types

Methods

fmap :: (a -> b) -> HandlerFor site a -> HandlerFor site b #

(<$) :: a -> HandlerFor site b -> HandlerFor site a #

Functor (WidgetFor site) 
Instance details

Defined in Yesod.Core.Types

Methods

fmap :: (a -> b) -> WidgetFor site a -> WidgetFor site b #

(<$) :: a -> WidgetFor site b -> WidgetFor site a #

Monad m => Functor (FormInput m) 
Instance details

Defined in Yesod.Form.Input

Methods

fmap :: (a -> b) -> FormInput m a -> FormInput m b #

(<$) :: a -> FormInput m b -> FormInput m a #

Monad m => Functor (AForm m) 
Instance details

Defined in Yesod.Form.Types

Methods

fmap :: (a -> b) -> AForm m a -> AForm m b #

(<$) :: a -> AForm m b -> AForm m a #

Functor ((,) a)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

fmap :: (a0 -> b) -> (a, a0) -> (a, b) #

(<$) :: a0 -> (a, b) -> (a, a0) #

Arrow a => Functor (WrappedArrow a b)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

fmap :: (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 #

(<$) :: a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 #

Functor m => Functor (Kleisli m a)

Since: base-4.14.0.0

Instance details

Defined in Control.Arrow

Methods

fmap :: (a0 -> b) -> Kleisli m a a0 -> Kleisli m a b #

(<$) :: a0 -> Kleisli m a b -> Kleisli m a a0 #

Functor (Const m :: Type -> Type)

Since: base-2.1

Instance details

Defined in Data.Functor.Const

Methods

fmap :: (a -> b) -> Const m a -> Const m b #

(<$) :: a -> Const m b -> Const m a #

Functor f => Functor (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

fmap :: (a -> b) -> Ap f a -> Ap f b #

(<$) :: a -> Ap f b -> Ap f a #

Functor f => Functor (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

fmap :: (a -> b) -> Alt f a -> Alt f b #

(<$) :: a -> Alt f b -> Alt f a #

(Generic1 f, Functor (Rep1 f)) => Functor (Generically1 f)

Since: base-4.17.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> Generically1 f a -> Generically1 f b #

(<$) :: a -> Generically1 f b -> Generically1 f a #

Functor f => Functor (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> Rec1 f a -> Rec1 f b #

(<$) :: a -> Rec1 f b -> Rec1 f a #

Functor (URec (Ptr ()) :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec (Ptr ()) a -> URec (Ptr ()) b #

(<$) :: a -> URec (Ptr ()) b -> URec (Ptr ()) a #

Functor (URec Char :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec Char a -> URec Char b #

(<$) :: a -> URec Char b -> URec Char a #

Functor (URec Double :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec Double a -> URec Double b #

(<$) :: a -> URec Double b -> URec Double a #

Functor (URec Float :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec Float a -> URec Float b #

(<$) :: a -> URec Float b -> URec Float a #

Functor (URec Int :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec Int a -> URec Int b #

(<$) :: a -> URec Int b -> URec Int a #

Functor (URec Word :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec Word a -> URec Word b #

(<$) :: a -> URec Word b -> URec Word a #

Bifunctor p => Functor (Join p) 
Instance details

Defined in Data.Bifunctor.Join

Methods

fmap :: (a -> b) -> Join p a -> Join p b #

(<$) :: a -> Join p b -> Join p a #

Monad m => Functor (ZipSink i m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

fmap :: (a -> b) -> ZipSink i m a -> ZipSink i m b #

(<$) :: a -> ZipSink i m b -> ZipSink i m a #

(Applicative f, Monad f) => Functor (WhenMissing f x)

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

fmap :: (a -> b) -> WhenMissing f x a -> WhenMissing f x b #

(<$) :: a -> WhenMissing f x b -> WhenMissing f x a #

Functor f => Functor (FreeF f a) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

fmap :: (a0 -> b) -> FreeF f a a0 -> FreeF f a b #

(<$) :: a0 -> FreeF f a b -> FreeF f a a0 #

(Functor f, Functor m) => Functor (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

fmap :: (a -> b) -> FreeT f m a -> FreeT f m b #

(<$) :: a -> FreeT f m b -> FreeT f m a #

Functor (Day f g) 
Instance details

Defined in Data.Functor.Day

Methods

fmap :: (a -> b) -> Day f g a -> Day f g b #

(<$) :: a -> Day f g b -> Day f g a #

Functor (Bazaar a b) 
Instance details

Defined in Lens.Micro

Methods

fmap :: (a0 -> b0) -> Bazaar a b a0 -> Bazaar a b b0 #

(<$) :: a0 -> Bazaar a b b0 -> Bazaar a b a0 #

Functor m => Functor (StateT s m) 
Instance details

Defined in Lens.Micro

Methods

fmap :: (a -> b) -> StateT s m a -> StateT s m b #

(<$) :: a -> StateT s m b -> StateT s m a #

Profunctor p => Functor (Coprep p) 
Instance details

Defined in Data.Profunctor.Rep

Methods

fmap :: (a -> b) -> Coprep p a -> Coprep p b #

(<$) :: a -> Coprep p b -> Coprep p a #

Profunctor p => Functor (Prep p) 
Instance details

Defined in Data.Profunctor.Rep

Methods

fmap :: (a -> b) -> Prep p a -> Prep p b #

(<$) :: a -> Prep p b -> Prep p a #

Functor (Tagged s) 
Instance details

Defined in Data.Tagged

Methods

fmap :: (a -> b) -> Tagged s a -> Tagged s b #

(<$) :: a -> Tagged s b -> Tagged s a #

(Functor f, Functor g) => Functor (These1 f g) 
Instance details

Defined in Data.Functor.These

Methods

fmap :: (a -> b) -> These1 f g a -> These1 f g b #

(<$) :: a -> These1 f g b -> These1 f g a #

Functor f => Functor (Backwards f)

Derived instance.

Instance details

Defined in Control.Applicative.Backwards

Methods

fmap :: (a -> b) -> Backwards f a -> Backwards f b #

(<$) :: a -> Backwards f b -> Backwards f a #

Functor m => Functor (AccumT w m) 
Instance details

Defined in Control.Monad.Trans.Accum

Methods

fmap :: (a -> b) -> AccumT w m a -> AccumT w m b #

(<$) :: a -> AccumT w m b -> AccumT w m a #

Functor m => Functor (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

fmap :: (a -> b) -> ExceptT e m a -> ExceptT e m b #

(<$) :: a -> ExceptT e m b -> ExceptT e m a #

Functor m => Functor (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

fmap :: (a -> b) -> IdentityT m a -> IdentityT m b #

(<$) :: a -> IdentityT m b -> IdentityT m a #

Functor m => Functor (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

fmap :: (a -> b) -> ReaderT r m a -> ReaderT r m b #

(<$) :: a -> ReaderT r m b -> ReaderT r m a #

Functor m => Functor (SelectT r m) 
Instance details

Defined in Control.Monad.Trans.Select

Methods

fmap :: (a -> b) -> SelectT r m a -> SelectT r m b #

(<$) :: a -> SelectT r m b -> SelectT r m a #

Functor m => Functor (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Lazy

Methods

fmap :: (a -> b) -> StateT s m a -> StateT s m b #

(<$) :: a -> StateT s m b -> StateT s m a #

Functor m => Functor (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

fmap :: (a -> b) -> StateT s m a -> StateT s m b #

(<$) :: a -> StateT s m b -> StateT s m a #

Functor m => Functor (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.CPS

Methods

fmap :: (a -> b) -> WriterT w m a -> WriterT w m b #

(<$) :: a -> WriterT w m b -> WriterT w m a #

Functor m => Functor (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

fmap :: (a -> b) -> WriterT w m a -> WriterT w m b #

(<$) :: a -> WriterT w m b -> WriterT w m a #

Functor m => Functor (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

fmap :: (a -> b) -> WriterT w m a -> WriterT w m b #

(<$) :: a -> WriterT w m b -> WriterT w m a #

Functor (Constant a :: Type -> Type) 
Instance details

Defined in Data.Functor.Constant

Methods

fmap :: (a0 -> b) -> Constant a a0 -> Constant a b #

(<$) :: a0 -> Constant a b -> Constant a a0 #

Functor f => Functor (Reverse f)

Derived instance.

Instance details

Defined in Data.Functor.Reverse

Methods

fmap :: (a -> b) -> Reverse f a -> Reverse f b #

(<$) :: a -> Reverse f b -> Reverse f a #

Functor (SubHandlerFor sub master) 
Instance details

Defined in Yesod.Core.Types

Methods

fmap :: (a -> b) -> SubHandlerFor sub master a -> SubHandlerFor sub master b #

(<$) :: a -> SubHandlerFor sub master b -> SubHandlerFor sub master a #

Functor ((,,) a b)

Since: base-4.14.0.0

Instance details

Defined in GHC.Base

Methods

fmap :: (a0 -> b0) -> (a, b, a0) -> (a, b, b0) #

(<$) :: a0 -> (a, b, b0) -> (a, b, a0) #

(Functor f, Functor g) => Functor (Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

fmap :: (a -> b) -> Product f g a -> Product f g b #

(<$) :: a -> Product f g b -> Product f g a #

(Functor f, Functor g) => Functor (Sum f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

Methods

fmap :: (a -> b) -> Sum f g a -> Sum f g b #

(<$) :: a -> Sum f g b -> Sum f g a #

(Functor f, Functor g) => Functor (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> (f :*: g) a -> (f :*: g) b #

(<$) :: a -> (f :*: g) b -> (f :*: g) a #

(Functor f, Functor g) => Functor (f :+: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> (f :+: g) a -> (f :+: g) b #

(<$) :: a -> (f :+: g) b -> (f :+: g) a #

Functor (K1 i c :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> K1 i c a -> K1 i c b #

(<$) :: a -> K1 i c b -> K1 i c a #

Functor (ConduitT i o m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

fmap :: (a -> b) -> ConduitT i o m a -> ConduitT i o m b #

(<$) :: a -> ConduitT i o m b -> ConduitT i o m a #

Functor (ZipConduit i o m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

fmap :: (a -> b) -> ZipConduit i o m a -> ZipConduit i o m b #

(<$) :: a -> ZipConduit i o m b -> ZipConduit i o m a #

Functor f => Functor (WhenMatched f x y)

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

fmap :: (a -> b) -> WhenMatched f x y a -> WhenMatched f x y b #

(<$) :: a -> WhenMatched f x y b -> WhenMatched f x y a #

(Applicative f, Monad f) => Functor (WhenMissing f k x)

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

fmap :: (a -> b) -> WhenMissing f k x a -> WhenMissing f k x b #

(<$) :: a -> WhenMissing f k x b -> WhenMissing f k x a #

Functor (ContT r m) 
Instance details

Defined in Control.Monad.Trans.Cont

Methods

fmap :: (a -> b) -> ContT r m a -> ContT r m b #

(<$) :: a -> ContT r m b -> ContT r m a #

Functor ((,,,) a b c)

Since: base-4.14.0.0

Instance details

Defined in GHC.Base

Methods

fmap :: (a0 -> b0) -> (a, b, c, a0) -> (a, b, c, b0) #

(<$) :: a0 -> (a, b, c, b0) -> (a, b, c, a0) #

Functor ((->) r)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

fmap :: (a -> b) -> (r -> a) -> r -> b #

(<$) :: a -> (r -> b) -> r -> a #

(Functor f, Functor g) => Functor (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

fmap :: (a -> b) -> Compose f g a -> Compose f g b #

(<$) :: a -> Compose f g b -> Compose f g a #

(Functor f, Functor g) => Functor (f :.: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> (f :.: g) a -> (f :.: g) b #

(<$) :: a -> (f :.: g) b -> (f :.: g) a #

Functor f => Functor (M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> M1 i c f a -> M1 i c f b #

(<$) :: a -> M1 i c f b -> M1 i c f a #

Functor (Clown f a :: Type -> Type) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

fmap :: (a0 -> b) -> Clown f a a0 -> Clown f a b #

(<$) :: a0 -> Clown f a b -> Clown f a a0 #

Bifunctor p => Functor (Flip p a) 
Instance details

Defined in Data.Bifunctor.Flip

Methods

fmap :: (a0 -> b) -> Flip p a a0 -> Flip p a b #

(<$) :: a0 -> Flip p a b -> Flip p a a0 #

Functor g => Functor (Joker g a) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

fmap :: (a0 -> b) -> Joker g a a0 -> Joker g a b #

(<$) :: a0 -> Joker g a b -> Joker g a a0 #

Bifunctor p => Functor (WrappedBifunctor p a) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

fmap :: (a0 -> b) -> WrappedBifunctor p a a0 -> WrappedBifunctor p a b #

(<$) :: a0 -> WrappedBifunctor p a b -> WrappedBifunctor p a a0 #

Functor f => Functor (WhenMatched f k x y)

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

fmap :: (a -> b) -> WhenMatched f k x y a -> WhenMatched f k x y b #

(<$) :: a -> WhenMatched f k x y b -> WhenMatched f k x y a #

Functor m => Functor (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.CPS

Methods

fmap :: (a -> b) -> RWST r w s m a -> RWST r w s m b #

(<$) :: a -> RWST r w s m b -> RWST r w s m a #

Functor m => Functor (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Lazy

Methods

fmap :: (a -> b) -> RWST r w s m a -> RWST r w s m b #

(<$) :: a -> RWST r w s m b -> RWST r w s m a #

Functor m => Functor (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Strict

Methods

fmap :: (a -> b) -> RWST r w s m a -> RWST r w s m b #

(<$) :: a -> RWST r w s m b -> RWST r w s m a #

Functor ((,,,,) a b c d)

Since: base-4.18.0.0

Instance details

Defined in GHC.Base

Methods

fmap :: (a0 -> b0) -> (a, b, c, d, a0) -> (a, b, c, d, b0) #

(<$) :: a0 -> (a, b, c, d, b0) -> (a, b, c, d, a0) #

Monad state => Functor (Builder collection mutCollection step state err) 
Instance details

Defined in Basement.MutableBuilder

Methods

fmap :: (a -> b) -> Builder collection mutCollection step state err a -> Builder collection mutCollection step state err b #

(<$) :: a -> Builder collection mutCollection step state err b -> Builder collection mutCollection step state err a #

(Functor (f a), Functor (g a)) => Functor (Product f g a) 
Instance details

Defined in Data.Bifunctor.Product

Methods

fmap :: (a0 -> b) -> Product f g a a0 -> Product f g a b #

(<$) :: a0 -> Product f g a b -> Product f g a a0 #

(Functor (f a), Functor (g a)) => Functor (Sum f g a) 
Instance details

Defined in Data.Bifunctor.Sum

Methods

fmap :: (a0 -> b) -> Sum f g a a0 -> Sum f g a b #

(<$) :: a0 -> Sum f g a b -> Sum f g a a0 #

Monad m => Functor (Pipe l i o u m) 
Instance details

Defined in Data.Conduit.Internal.Pipe

Methods

fmap :: (a -> b) -> Pipe l i o u m a -> Pipe l i o u m b #

(<$) :: a -> Pipe l i o u m b -> Pipe l i o u m a #

Functor ((,,,,,) a b c d e)

Since: base-4.18.0.0

Instance details

Defined in GHC.Base

Methods

fmap :: (a0 -> b0) -> (a, b, c, d, e, a0) -> (a, b, c, d, e, b0) #

(<$) :: a0 -> (a, b, c, d, e, b0) -> (a, b, c, d, e, a0) #

(Functor f, Bifunctor p) => Functor (Tannen f p a) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

fmap :: (a0 -> b) -> Tannen f p a a0 -> Tannen f p a b #

(<$) :: a0 -> Tannen f p a b -> Tannen f p a a0 #

Profunctor p => Functor (Procompose p q a) 
Instance details

Defined in Data.Profunctor.Composition

Methods

fmap :: (a0 -> b) -> Procompose p q a a0 -> Procompose p q a b #

(<$) :: a0 -> Procompose p q a b -> Procompose p q a a0 #

Profunctor p => Functor (Rift p q a) 
Instance details

Defined in Data.Profunctor.Composition

Methods

fmap :: (a0 -> b) -> Rift p q a a0 -> Rift p q a b #

(<$) :: a0 -> Rift p q a b -> Rift p q a a0 #

Functor ((,,,,,,) a b c d e f)

Since: base-4.18.0.0

Instance details

Defined in GHC.Base

Methods

fmap :: (a0 -> b0) -> (a, b, c, d, e, f, a0) -> (a, b, c, d, e, f, b0) #

(<$) :: a0 -> (a, b, c, d, e, f, b0) -> (a, b, c, d, e, f, a0) #

(Bifunctor p, Functor g) => Functor (Biff p f g a) 
Instance details

Defined in Data.Bifunctor.Biff

Methods

fmap :: (a0 -> b) -> Biff p f g a a0 -> Biff p f g a b #

(<$) :: a0 -> Biff p f g a b -> Biff p f g a a0 #

class Applicative m => Monad (m :: Type -> Type) where #

The Monad class defines the basic operations over a monad, a concept from a branch of mathematics known as category theory. From the perspective of a Haskell programmer, however, it is best to think of a monad as an abstract datatype of actions. Haskell's do expressions provide a convenient syntax for writing monadic expressions.

Instances of Monad should satisfy the following:

Left identity
return a >>= k = k a
Right identity
m >>= return = m
Associativity
m >>= (\x -> k x >>= h) = (m >>= k) >>= h

Furthermore, the Monad and Applicative operations should relate as follows:

The above laws imply:

and that pure and (<*>) satisfy the applicative functor laws.

The instances of Monad for lists, Maybe and IO defined in the Prelude satisfy these laws.

Minimal complete definition

(>>=)

Methods

(>>=) :: m a -> (a -> m b) -> m b infixl 1 #

Sequentially compose two actions, passing any value produced by the first as an argument to the second.

'as >>= bs' can be understood as the do expression

do a <- as
   bs a

(>>) :: m a -> m b -> m b infixl 1 #

Sequentially compose two actions, discarding any value produced by the first, like sequencing operators (such as the semicolon) in imperative languages.

'as >> bs' can be understood as the do expression

do as
   bs

return :: a -> m a #

Inject a value into the monadic type.

Instances

Instances details
Monad IResult 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

(>>=) :: IResult a -> (a -> IResult b) -> IResult b #

(>>) :: IResult a -> IResult b -> IResult b #

return :: a -> IResult a #

Monad Parser 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

(>>=) :: Parser a -> (a -> Parser b) -> Parser b #

(>>) :: Parser a -> Parser b -> Parser b #

return :: a -> Parser a #

Monad Result 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

(>>=) :: Result a -> (a -> Result b) -> Result b #

(>>) :: Result a -> Result b -> Result b #

return :: a -> Result a #

Monad Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Methods

(>>=) :: Complex a -> (a -> Complex b) -> Complex b #

(>>) :: Complex a -> Complex b -> Complex b #

return :: a -> Complex a #

Monad Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

(>>=) :: Identity a -> (a -> Identity b) -> Identity b #

(>>) :: Identity a -> Identity b -> Identity b #

return :: a -> Identity a #

Monad First

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

(>>=) :: First a -> (a -> First b) -> First b #

(>>) :: First a -> First b -> First b #

return :: a -> First a #

Monad Last

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

(>>=) :: Last a -> (a -> Last b) -> Last b #

(>>) :: Last a -> Last b -> Last b #

return :: a -> Last a #

Monad Down

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

(>>=) :: Down a -> (a -> Down b) -> Down b #

(>>) :: Down a -> Down b -> Down b #

return :: a -> Down a #

Monad First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(>>=) :: First a -> (a -> First b) -> First b #

(>>) :: First a -> First b -> First b #

return :: a -> First a #

Monad Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(>>=) :: Last a -> (a -> Last b) -> Last b #

(>>) :: Last a -> Last b -> Last b #

return :: a -> Last a #

Monad Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(>>=) :: Max a -> (a -> Max b) -> Max b #

(>>) :: Max a -> Max b -> Max b #

return :: a -> Max a #

Monad Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(>>=) :: Min a -> (a -> Min b) -> Min b #

(>>) :: Min a -> Min b -> Min b #

return :: a -> Min a #

Monad Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(>>=) :: Dual a -> (a -> Dual b) -> Dual b #

(>>) :: Dual a -> Dual b -> Dual b #

return :: a -> Dual a #

Monad Product

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(>>=) :: Product a -> (a -> Product b) -> Product b #

(>>) :: Product a -> Product b -> Product b #

return :: a -> Product a #

Monad Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(>>=) :: Sum a -> (a -> Sum b) -> Sum b #

(>>) :: Sum a -> Sum b -> Sum b #

return :: a -> Sum a #

Monad NonEmpty

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(>>=) :: NonEmpty a -> (a -> NonEmpty b) -> NonEmpty b #

(>>) :: NonEmpty a -> NonEmpty b -> NonEmpty b #

return :: a -> NonEmpty a #

Monad STM

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

(>>=) :: STM a -> (a -> STM b) -> STM b #

(>>) :: STM a -> STM b -> STM b #

return :: a -> STM a #

Monad Par1

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(>>=) :: Par1 a -> (a -> Par1 b) -> Par1 b #

(>>) :: Par1 a -> Par1 b -> Par1 b #

return :: a -> Par1 a #

Monad P

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

(>>=) :: P a -> (a -> P b) -> P b #

(>>) :: P a -> P b -> P b #

return :: a -> P a #

Monad ReadP

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

(>>=) :: ReadP a -> (a -> ReadP b) -> ReadP b #

(>>) :: ReadP a -> ReadP b -> ReadP b #

return :: a -> ReadP a #

Monad ReadPrec

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadPrec

Methods

(>>=) :: ReadPrec a -> (a -> ReadPrec b) -> ReadPrec b #

(>>) :: ReadPrec a -> ReadPrec b -> ReadPrec b #

return :: a -> ReadPrec a #

Monad MarkupM 
Instance details

Defined in Text.Blaze.Internal

Methods

(>>=) :: MarkupM a -> (a -> MarkupM b) -> MarkupM b #

(>>) :: MarkupM a -> MarkupM b -> MarkupM b #

return :: a -> MarkupM a #

Monad Put 
Instance details

Defined in Data.ByteString.Builder.Internal

Methods

(>>=) :: Put a -> (a -> Put b) -> Put b #

(>>) :: Put a -> Put b -> Put b #

return :: a -> Put a #

Monad Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

(>>=) :: Seq a -> (a -> Seq b) -> Seq b #

(>>) :: Seq a -> Seq b -> Seq b #

return :: a -> Seq a #

Monad Tree 
Instance details

Defined in Data.Tree

Methods

(>>=) :: Tree a -> (a -> Tree b) -> Tree b #

(>>) :: Tree a -> Tree b -> Tree b #

return :: a -> Tree a #

Monad CryptoFailable 
Instance details

Defined in Crypto.Error.Types

Monad CryptoFailable 
Instance details

Defined in Crypto.Error.Types

Monad DNonEmpty 
Instance details

Defined in Data.DList.DNonEmpty.Internal

Methods

(>>=) :: DNonEmpty a -> (a -> DNonEmpty b) -> DNonEmpty b #

(>>) :: DNonEmpty a -> DNonEmpty b -> DNonEmpty b #

return :: a -> DNonEmpty a #

Monad DList 
Instance details

Defined in Data.DList.Internal

Methods

(>>=) :: DList a -> (a -> DList b) -> DList b #

(>>) :: DList a -> DList b -> DList b #

return :: a -> DList a #

Monad SqlQuery 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Methods

(>>=) :: SqlQuery a -> (a -> SqlQuery b) -> SqlQuery b #

(>>) :: SqlQuery a -> SqlQuery b -> SqlQuery b #

return :: a -> SqlQuery a #

Monad Value 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Methods

(>>=) :: Value a -> (a -> Value b) -> Value b #

(>>) :: Value a -> Value b -> Value b #

return :: a -> Value a #

Monad IO

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

(>>=) :: IO a -> (a -> IO b) -> IO b #

(>>) :: IO a -> IO b -> IO b #

return :: a -> IO a #

Monad Array 
Instance details

Defined in Data.Primitive.Array

Methods

(>>=) :: Array a -> (a -> Array b) -> Array b #

(>>) :: Array a -> Array b -> Array b #

return :: a -> Array a #

Monad SmallArray 
Instance details

Defined in Data.Primitive.SmallArray

Methods

(>>=) :: SmallArray a -> (a -> SmallArray b) -> SmallArray b #

(>>) :: SmallArray a -> SmallArray b -> SmallArray b #

return :: a -> SmallArray a #

Monad Acquire 
Instance details

Defined in Data.Acquire.Internal

Methods

(>>=) :: Acquire a -> (a -> Acquire b) -> Acquire b #

(>>) :: Acquire a -> Acquire b -> Acquire b #

return :: a -> Acquire a #

Monad Result 
Instance details

Defined in Text.Hamlet.Parse

Methods

(>>=) :: Result a -> (a -> Result b) -> Result b #

(>>) :: Result a -> Result b -> Result b #

return :: a -> Result a #

Monad Q 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

(>>=) :: Q a -> (a -> Q b) -> Q b #

(>>) :: Q a -> Q b -> Q b #

return :: a -> Q a #

Monad Memoized 
Instance details

Defined in UnliftIO.Memoize

Methods

(>>=) :: Memoized a -> (a -> Memoized b) -> Memoized b #

(>>) :: Memoized a -> Memoized b -> Memoized b #

return :: a -> Memoized a #

Monad Vector 
Instance details

Defined in Data.Vector

Methods

(>>=) :: Vector a -> (a -> Vector b) -> Vector b #

(>>) :: Vector a -> Vector b -> Vector b #

return :: a -> Vector a #

Monad Stream 
Instance details

Defined in Codec.Compression.Zlib.Stream

Methods

(>>=) :: Stream a -> (a -> Stream b) -> Stream b #

(>>) :: Stream a -> Stream b -> Stream b #

return :: a -> Stream a #

Monad Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

(>>=) :: Maybe a -> (a -> Maybe b) -> Maybe b #

(>>) :: Maybe a -> Maybe b -> Maybe b #

return :: a -> Maybe a #

Monad Solo

Since: base-4.15

Instance details

Defined in GHC.Base

Methods

(>>=) :: Solo a -> (a -> Solo b) -> Solo b #

(>>) :: Solo a -> Solo b -> Solo b #

return :: a -> Solo a #

Monad List

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

(>>=) :: [a] -> (a -> [b]) -> [b] #

(>>) :: [a] -> [b] -> [b] #

return :: a -> [a] #

Representable f => Monad (Co f) 
Instance details

Defined in Data.Functor.Rep

Methods

(>>=) :: Co f a -> (a -> Co f b) -> Co f b #

(>>) :: Co f a -> Co f b -> Co f b #

return :: a -> Co f a #

Monad (Parser i) 
Instance details

Defined in Data.Attoparsec.Internal.Types

Methods

(>>=) :: Parser i a -> (a -> Parser i b) -> Parser i b #

(>>) :: Parser i a -> Parser i b -> Parser i b #

return :: a -> Parser i a #

Monad m => Monad (WrappedMonad m)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Methods

(>>=) :: WrappedMonad m a -> (a -> WrappedMonad m b) -> WrappedMonad m b #

(>>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b #

return :: a -> WrappedMonad m a #

ArrowApply a => Monad (ArrowMonad a)

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

(>>=) :: ArrowMonad a a0 -> (a0 -> ArrowMonad a b) -> ArrowMonad a b #

(>>) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a b #

return :: a0 -> ArrowMonad a a0 #

Monad (Either e)

Since: base-4.4.0.0

Instance details

Defined in Data.Either

Methods

(>>=) :: Either e a -> (a -> Either e b) -> Either e b #

(>>) :: Either e a -> Either e b -> Either e b #

return :: a -> Either e a #

Monad (Proxy :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

(>>=) :: Proxy a -> (a -> Proxy b) -> Proxy b #

(>>) :: Proxy a -> Proxy b -> Proxy b #

return :: a -> Proxy a #

Monad (U1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(>>=) :: U1 a -> (a -> U1 b) -> U1 b #

(>>) :: U1 a -> U1 b -> U1 b #

return :: a -> U1 a #

Monad (ST s)

Since: base-2.1

Instance details

Defined in GHC.ST

Methods

(>>=) :: ST s a -> (a -> ST s b) -> ST s b #

(>>) :: ST s a -> ST s b -> ST s b #

return :: a -> ST s a #

Monad m => Monad (CatchT m) 
Instance details

Defined in Control.Monad.Catch.Pure

Methods

(>>=) :: CatchT m a -> (a -> CatchT m b) -> CatchT m b #

(>>) :: CatchT m a -> CatchT m b -> CatchT m b #

return :: a -> CatchT m a #

Alternative f => Monad (Cofree f) 
Instance details

Defined in Control.Comonad.Cofree

Methods

(>>=) :: Cofree f a -> (a -> Cofree f b) -> Cofree f b #

(>>) :: Cofree f a -> Cofree f b -> Cofree f b #

return :: a -> Cofree f a #

Functor f => Monad (Free f) 
Instance details

Defined in Control.Monad.Free

Methods

(>>=) :: Free f a -> (a -> Free f b) -> Free f b #

(>>) :: Free f a -> Free f b -> Free f b #

return :: a -> Free f a #

Monad m => Monad (LoggingT m) 
Instance details

Defined in Control.Monad.Logger

Methods

(>>=) :: LoggingT m a -> (a -> LoggingT m b) -> LoggingT m b #

(>>) :: LoggingT m a -> LoggingT m b -> LoggingT m b #

return :: a -> LoggingT m a #

Monad m => Monad (NoLoggingT m) 
Instance details

Defined in Control.Monad.Logger

Methods

(>>=) :: NoLoggingT m a -> (a -> NoLoggingT m b) -> NoLoggingT m b #

(>>) :: NoLoggingT m a -> NoLoggingT m b -> NoLoggingT m b #

return :: a -> NoLoggingT m a #

Monad m => Monad (WriterLoggingT m) 
Instance details

Defined in Control.Monad.Logger

Methods

(>>=) :: WriterLoggingT m a -> (a -> WriterLoggingT m b) -> WriterLoggingT m b #

(>>) :: WriterLoggingT m a -> WriterLoggingT m b -> WriterLoggingT m b #

return :: a -> WriterLoggingT m a #

Monad f => Monad (WrappedPoly f) 
Instance details

Defined in Data.MonoTraversable

Methods

(>>=) :: WrappedPoly f a -> (a -> WrappedPoly f b) -> WrappedPoly f b #

(>>) :: WrappedPoly f a -> WrappedPoly f b -> WrappedPoly f b #

return :: a -> WrappedPoly f a #

Monad m => Monad (ResourceT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

(>>=) :: ResourceT m a -> (a -> ResourceT m b) -> ResourceT m b #

(>>) :: ResourceT m a -> ResourceT m b -> ResourceT m b #

return :: a -> ResourceT m a #

Semigroup a => Monad (These a) 
Instance details

Defined in Data.Strict.These

Methods

(>>=) :: These a a0 -> (a0 -> These a b) -> These a b #

(>>) :: These a a0 -> These a b -> These a b #

return :: a0 -> These a a0 #

Semigroup a => Monad (These a) 
Instance details

Defined in Data.These

Methods

(>>=) :: These a a0 -> (a0 -> These a b) -> These a b #

(>>) :: These a a0 -> These a b -> These a b #

return :: a0 -> These a a0 #

Monad m => Monad (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

(>>=) :: MaybeT m a -> (a -> MaybeT m b) -> MaybeT m b #

(>>) :: MaybeT m a -> MaybeT m b -> MaybeT m b #

return :: a -> MaybeT m a #

Monad (HandlerFor site) 
Instance details

Defined in Yesod.Core.Types

Methods

(>>=) :: HandlerFor site a -> (a -> HandlerFor site b) -> HandlerFor site b #

(>>) :: HandlerFor site a -> HandlerFor site b -> HandlerFor site b #

return :: a -> HandlerFor site a #

Monad (WidgetFor site) 
Instance details

Defined in Yesod.Core.Types

Methods

(>>=) :: WidgetFor site a -> (a -> WidgetFor site b) -> WidgetFor site b #

(>>) :: WidgetFor site a -> WidgetFor site b -> WidgetFor site b #

return :: a -> WidgetFor site a #

Monad m => Monad (AForm m) 
Instance details

Defined in Yesod.Form.Types

Methods

(>>=) :: AForm m a -> (a -> AForm m b) -> AForm m b #

(>>) :: AForm m a -> AForm m b -> AForm m b #

return :: a -> AForm m a #

Monoid a => Monad ((,) a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(>>=) :: (a, a0) -> (a0 -> (a, b)) -> (a, b) #

(>>) :: (a, a0) -> (a, b) -> (a, b) #

return :: a0 -> (a, a0) #

Monad m => Monad (Kleisli m a)

Since: base-4.14.0.0

Instance details

Defined in Control.Arrow

Methods

(>>=) :: Kleisli m a a0 -> (a0 -> Kleisli m a b) -> Kleisli m a b #

(>>) :: Kleisli m a a0 -> Kleisli m a b -> Kleisli m a b #

return :: a0 -> Kleisli m a a0 #

Monad f => Monad (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

(>>=) :: Ap f a -> (a -> Ap f b) -> Ap f b #

(>>) :: Ap f a -> Ap f b -> Ap f b #

return :: a -> Ap f a #

Monad f => Monad (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(>>=) :: Alt f a -> (a -> Alt f b) -> Alt f b #

(>>) :: Alt f a -> Alt f b -> Alt f b #

return :: a -> Alt f a #

Monad f => Monad (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(>>=) :: Rec1 f a -> (a -> Rec1 f b) -> Rec1 f b #

(>>) :: Rec1 f a -> Rec1 f b -> Rec1 f b #

return :: a -> Rec1 f a #

(Applicative f, Monad f) => Monad (WhenMissing f x)

Equivalent to ReaderT k (ReaderT x (MaybeT f)).

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

(>>=) :: WhenMissing f x a -> (a -> WhenMissing f x b) -> WhenMissing f x b #

(>>) :: WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x b #

return :: a -> WhenMissing f x a #

(Functor f, Monad m) => Monad (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

(>>=) :: FreeT f m a -> (a -> FreeT f m b) -> FreeT f m b #

(>>) :: FreeT f m a -> FreeT f m b -> FreeT f m b #

return :: a -> FreeT f m a #

Monad m => Monad (StateT s m) 
Instance details

Defined in Lens.Micro

Methods

(>>=) :: StateT s m a -> (a -> StateT s m b) -> StateT s m b #

(>>) :: StateT s m a -> StateT s m b -> StateT s m b #

return :: a -> StateT s m a #

(Monad (Rep p), Representable p) => Monad (Prep p) 
Instance details

Defined in Data.Profunctor.Rep

Methods

(>>=) :: Prep p a -> (a -> Prep p b) -> Prep p b #

(>>) :: Prep p a -> Prep p b -> Prep p b #

return :: a -> Prep p a #

Monad (Tagged s) 
Instance details

Defined in Data.Tagged

Methods

(>>=) :: Tagged s a -> (a -> Tagged s b) -> Tagged s b #

(>>) :: Tagged s a -> Tagged s b -> Tagged s b #

return :: a -> Tagged s a #

(Monoid w, Functor m, Monad m) => Monad (AccumT w m) 
Instance details

Defined in Control.Monad.Trans.Accum

Methods

(>>=) :: AccumT w m a -> (a -> AccumT w m b) -> AccumT w m b #

(>>) :: AccumT w m a -> AccumT w m b -> AccumT w m b #

return :: a -> AccumT w m a #

Monad m => Monad (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

(>>=) :: ExceptT e m a -> (a -> ExceptT e m b) -> ExceptT e m b #

(>>) :: ExceptT e m a -> ExceptT e m b -> ExceptT e m b #

return :: a -> ExceptT e m a #

Monad m => Monad (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

(>>=) :: IdentityT m a -> (a -> IdentityT m b) -> IdentityT m b #

(>>) :: IdentityT m a -> IdentityT m b -> IdentityT m b #

return :: a -> IdentityT m a #

Monad m => Monad (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

(>>=) :: ReaderT r m a -> (a -> ReaderT r m b) -> ReaderT r m b #

(>>) :: ReaderT r m a -> ReaderT r m b -> ReaderT r m b #

return :: a -> ReaderT r m a #

Monad m => Monad (SelectT r m) 
Instance details

Defined in Control.Monad.Trans.Select

Methods

(>>=) :: SelectT r m a -> (a -> SelectT r m b) -> SelectT r m b #

(>>) :: SelectT r m a -> SelectT r m b -> SelectT r m b #

return :: a -> SelectT r m a #

Monad m => Monad (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Lazy

Methods

(>>=) :: StateT s m a -> (a -> StateT s m b) -> StateT s m b #

(>>) :: StateT s m a -> StateT s m b -> StateT s m b #

return :: a -> StateT s m a #

Monad m => Monad (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

(>>=) :: StateT s m a -> (a -> StateT s m b) -> StateT s m b #

(>>) :: StateT s m a -> StateT s m b -> StateT s m b #

return :: a -> StateT s m a #

Monad m => Monad (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.CPS

Methods

(>>=) :: WriterT w m a -> (a -> WriterT w m b) -> WriterT w m b #

(>>) :: WriterT w m a -> WriterT w m b -> WriterT w m b #

return :: a -> WriterT w m a #

(Monoid w, Monad m) => Monad (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

(>>=) :: WriterT w m a -> (a -> WriterT w m b) -> WriterT w m b #

(>>) :: WriterT w m a -> WriterT w m b -> WriterT w m b #

return :: a -> WriterT w m a #

(Monoid w, Monad m) => Monad (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

(>>=) :: WriterT w m a -> (a -> WriterT w m b) -> WriterT w m b #

(>>) :: WriterT w m a -> WriterT w m b -> WriterT w m b #

return :: a -> WriterT w m a #

Monad m => Monad (Reverse m)

Derived instance.

Instance details

Defined in Data.Functor.Reverse

Methods

(>>=) :: Reverse m a -> (a -> Reverse m b) -> Reverse m b #

(>>) :: Reverse m a -> Reverse m b -> Reverse m b #

return :: a -> Reverse m a #

Monad (SubHandlerFor child master) 
Instance details

Defined in Yesod.Core.Types

Methods

(>>=) :: SubHandlerFor child master a -> (a -> SubHandlerFor child master b) -> SubHandlerFor child master b #

(>>) :: SubHandlerFor child master a -> SubHandlerFor child master b -> SubHandlerFor child master b #

return :: a -> SubHandlerFor child master a #

(Monoid a, Monoid b) => Monad ((,,) a b)

Since: base-4.14.0.0

Instance details

Defined in GHC.Base

Methods

(>>=) :: (a, b, a0) -> (a0 -> (a, b, b0)) -> (a, b, b0) #

(>>) :: (a, b, a0) -> (a, b, b0) -> (a, b, b0) #

return :: a0 -> (a, b, a0) #

(Monad f, Monad g) => Monad (Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

(>>=) :: Product f g a -> (a -> Product f g b) -> Product f g b #

(>>) :: Product f g a -> Product f g b -> Product f g b #

return :: a -> Product f g a #

(Monad f, Monad g) => Monad (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(>>=) :: (f :*: g) a -> (a -> (f :*: g) b) -> (f :*: g) b #

(>>) :: (f :*: g) a -> (f :*: g) b -> (f :*: g) b #

return :: a -> (f :*: g) a #

Monad (ConduitT i o m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

(>>=) :: ConduitT i o m a -> (a -> ConduitT i o m b) -> ConduitT i o m b #

(>>) :: ConduitT i o m a -> ConduitT i o m b -> ConduitT i o m b #

return :: a -> ConduitT i o m a #

(Monad f, Applicative f) => Monad (WhenMatched f x y)

Equivalent to ReaderT Key (ReaderT x (ReaderT y (MaybeT f)))

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

(>>=) :: WhenMatched f x y a -> (a -> WhenMatched f x y b) -> WhenMatched f x y b #

(>>) :: WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y b #

return :: a -> WhenMatched f x y a #

(Applicative f, Monad f) => Monad (WhenMissing f k x)

Equivalent to ReaderT k (ReaderT x (MaybeT f)) .

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

(>>=) :: WhenMissing f k x a -> (a -> WhenMissing f k x b) -> WhenMissing f k x b #

(>>) :: WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x b #

return :: a -> WhenMissing f k x a #

Monad (ContT r m) 
Instance details

Defined in Control.Monad.Trans.Cont

Methods

(>>=) :: ContT r m a -> (a -> ContT r m b) -> ContT r m b #

(>>) :: ContT r m a -> ContT r m b -> ContT r m b #

return :: a -> ContT r m a #

(Monoid a, Monoid b, Monoid c) => Monad ((,,,) a b c)

Since: base-4.14.0.0

Instance details

Defined in GHC.Base

Methods

(>>=) :: (a, b, c, a0) -> (a0 -> (a, b, c, b0)) -> (a, b, c, b0) #

(>>) :: (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, b0) #

return :: a0 -> (a, b, c, a0) #

Monad ((->) r)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

(>>=) :: (r -> a) -> (a -> r -> b) -> r -> b #

(>>) :: (r -> a) -> (r -> b) -> r -> b #

return :: a -> r -> a #

Monad f => Monad (M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(>>=) :: M1 i c f a -> (a -> M1 i c f b) -> M1 i c f b #

(>>) :: M1 i c f a -> M1 i c f b -> M1 i c f b #

return :: a -> M1 i c f a #

(Monad f, Applicative f) => Monad (WhenMatched f k x y)

Equivalent to ReaderT k (ReaderT x (ReaderT y (MaybeT f)))

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

(>>=) :: WhenMatched f k x y a -> (a -> WhenMatched f k x y b) -> WhenMatched f k x y b #

(>>) :: WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y b #

return :: a -> WhenMatched f k x y a #

Monad m => Monad (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.CPS

Methods

(>>=) :: RWST r w s m a -> (a -> RWST r w s m b) -> RWST r w s m b #

(>>) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m b #

return :: a -> RWST r w s m a #

(Monoid w, Monad m) => Monad (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Lazy

Methods

(>>=) :: RWST r w s m a -> (a -> RWST r w s m b) -> RWST r w s m b #

(>>) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m b #

return :: a -> RWST r w s m a #

(Monoid w, Monad m) => Monad (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Strict

Methods

(>>=) :: RWST r w s m a -> (a -> RWST r w s m b) -> RWST r w s m b #

(>>) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m b #

return :: a -> RWST r w s m a #

Monad state => Monad (Builder collection mutCollection step state err) 
Instance details

Defined in Basement.MutableBuilder

Methods

(>>=) :: Builder collection mutCollection step state err a -> (a -> Builder collection mutCollection step state err b) -> Builder collection mutCollection step state err b #

(>>) :: Builder collection mutCollection step state err a -> Builder collection mutCollection step state err b -> Builder collection mutCollection step state err b #

return :: a -> Builder collection mutCollection step state err a #

Monad m => Monad (Pipe l i o u m) 
Instance details

Defined in Data.Conduit.Internal.Pipe

Methods

(>>=) :: Pipe l i o u m a -> (a -> Pipe l i o u m b) -> Pipe l i o u m b #

(>>) :: Pipe l i o u m a -> Pipe l i o u m b -> Pipe l i o u m b #

return :: a -> Pipe l i o u m a #

class Generic a #

Representable types of kind *. This class is derivable in GHC with the DeriveGeneric flag on.

A Generic instance must satisfy the following laws:

from . toid
to . fromid

Minimal complete definition

from, to

Instances

Instances details
Generic Value 
Instance details

Defined in Data.Aeson.Types.Internal

Associated Types

type Rep Value :: Type -> Type #

Methods

from :: Value -> Rep Value x #

to :: Rep Value x -> Value #

Generic All 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep All :: Type -> Type #

Methods

from :: All -> Rep All x #

to :: Rep All x -> All #

Generic Any 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep Any :: Type -> Type #

Methods

from :: Any -> Rep Any x #

to :: Rep Any x -> Any #

Generic Version 
Instance details

Defined in Data.Version

Associated Types

type Rep Version :: Type -> Type #

Methods

from :: Version -> Rep Version x #

to :: Rep Version x -> Version #

Generic Void 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Void :: Type -> Type #

Methods

from :: Void -> Rep Void x #

to :: Rep Void x -> Void #

Generic ByteOrder 
Instance details

Defined in GHC.ByteOrder

Associated Types

type Rep ByteOrder :: Type -> Type #

Generic Fingerprint 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Fingerprint :: Type -> Type #

Generic Associativity 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Associativity :: Type -> Type #

Generic DecidedStrictness 
Instance details

Defined in GHC.Generics

Associated Types

type Rep DecidedStrictness :: Type -> Type #

Generic Fixity 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Fixity :: Type -> Type #

Methods

from :: Fixity -> Rep Fixity x #

to :: Rep Fixity x -> Fixity #

Generic SourceStrictness 
Instance details

Defined in GHC.Generics

Associated Types

type Rep SourceStrictness :: Type -> Type #

Generic SourceUnpackedness 
Instance details

Defined in GHC.Generics

Associated Types

type Rep SourceUnpackedness :: Type -> Type #

Generic ExitCode 
Instance details

Defined in GHC.IO.Exception

Associated Types

type Rep ExitCode :: Type -> Type #

Methods

from :: ExitCode -> Rep ExitCode x #

to :: Rep ExitCode x -> ExitCode #

Generic CCFlags 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep CCFlags :: Type -> Type #

Methods

from :: CCFlags -> Rep CCFlags x #

to :: Rep CCFlags x -> CCFlags #

Generic ConcFlags 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep ConcFlags :: Type -> Type #

Generic DebugFlags 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep DebugFlags :: Type -> Type #

Generic DoCostCentres 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep DoCostCentres :: Type -> Type #

Generic DoHeapProfile 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep DoHeapProfile :: Type -> Type #

Generic DoTrace 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep DoTrace :: Type -> Type #

Methods

from :: DoTrace -> Rep DoTrace x #

to :: Rep DoTrace x -> DoTrace #

Generic GCFlags 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep GCFlags :: Type -> Type #

Methods

from :: GCFlags -> Rep GCFlags x #

to :: Rep GCFlags x -> GCFlags #

Generic GiveGCStats 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep GiveGCStats :: Type -> Type #

Generic MiscFlags 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep MiscFlags :: Type -> Type #

Generic ParFlags 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep ParFlags :: Type -> Type #

Methods

from :: ParFlags -> Rep ParFlags x #

to :: Rep ParFlags x -> ParFlags #

Generic ProfFlags 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep ProfFlags :: Type -> Type #

Generic RTSFlags 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep RTSFlags :: Type -> Type #

Methods

from :: RTSFlags -> Rep RTSFlags x #

to :: Rep RTSFlags x -> RTSFlags #

Generic TickyFlags 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep TickyFlags :: Type -> Type #

Generic TraceFlags 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep TraceFlags :: Type -> Type #

Generic SrcLoc 
Instance details

Defined in GHC.Generics

Associated Types

type Rep SrcLoc :: Type -> Type #

Methods

from :: SrcLoc -> Rep SrcLoc x #

to :: Rep SrcLoc x -> SrcLoc #

Generic GCDetails 
Instance details

Defined in GHC.Stats

Associated Types

type Rep GCDetails :: Type -> Type #

Generic RTSStats 
Instance details

Defined in GHC.Stats

Associated Types

type Rep RTSStats :: Type -> Type #

Methods

from :: RTSStats -> Rep RTSStats x #

to :: Rep RTSStats x -> RTSStats #

Generic GeneralCategory 
Instance details

Defined in GHC.Generics

Associated Types

type Rep GeneralCategory :: Type -> Type #

Generic EmailAddress 
Instance details

Defined in Text.Email.Parser

Associated Types

type Rep EmailAddress :: Type -> Type #

Generic NoteForm Source # 
Instance details

Defined in Handler.Notes

Associated Types

type Rep NoteForm :: Type -> Type #

Methods

from :: NoteForm -> Rep NoteForm x #

to :: Rep NoteForm x -> NoteForm #

Generic AccountSettingsForm Source # 
Instance details

Defined in Model

Associated Types

type Rep AccountSettingsForm :: Type -> Type #

Generic BookmarkForm Source # 
Instance details

Defined in Model

Associated Types

type Rep BookmarkForm :: Type -> Type #

Generic TagCloudMode Source # 
Instance details

Defined in Model

Associated Types

type Rep TagCloudMode :: Type -> Type #

Generic UTCTimeStr Source # 
Instance details

Defined in Model

Associated Types

type Rep UTCTimeStr :: Type -> Type #

Generic OsChar 
Instance details

Defined in System.OsString.Internal.Types

Associated Types

type Rep OsChar :: Type -> Type #

Methods

from :: OsChar -> Rep OsChar x #

to :: Rep OsChar x -> OsChar #

Generic OsString 
Instance details

Defined in System.OsString.Internal.Types

Associated Types

type Rep OsString :: Type -> Type #

Methods

from :: OsString -> Rep OsString x #

to :: Rep OsString x -> OsString #

Generic PosixChar 
Instance details

Defined in System.OsString.Internal.Types

Associated Types

type Rep PosixChar :: Type -> Type #

Generic PosixString 
Instance details

Defined in System.OsString.Internal.Types

Associated Types

type Rep PosixString :: Type -> Type #

Generic WindowsChar 
Instance details

Defined in System.OsString.Internal.Types

Associated Types

type Rep WindowsChar :: Type -> Type #

Generic WindowsString 
Instance details

Defined in System.OsString.Internal.Types

Associated Types

type Rep WindowsString :: Type -> Type #

Generic ForeignSrcLang 
Instance details

Defined in GHC.ForeignSrcLang.Type

Associated Types

type Rep ForeignSrcLang :: Type -> Type #

Generic Extension 
Instance details

Defined in GHC.LanguageExtensions.Type

Associated Types

type Rep Extension :: Type -> Type #

Generic Ordering 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Ordering :: Type -> Type #

Methods

from :: Ordering -> Rep Ordering x #

to :: Rep Ordering x -> Ordering #

Generic Form 
Instance details

Defined in Web.Internal.FormUrlEncoded

Associated Types

type Rep Form :: Type -> Type #

Methods

from :: Form -> Rep Form x #

to :: Rep Form x -> Form #

Generic ByteRange 
Instance details

Defined in Network.HTTP.Types.Header

Associated Types

type Rep ByteRange :: Type -> Type #

Generic StdMethod 
Instance details

Defined in Network.HTTP.Types.Method

Associated Types

type Rep StdMethod :: Type -> Type #

Generic Status 
Instance details

Defined in Network.HTTP.Types.Status

Associated Types

type Rep Status :: Type -> Type #

Methods

from :: Status -> Rep Status x #

to :: Rep Status x -> Status #

Generic HttpVersion 
Instance details

Defined in Network.HTTP.Types.Version

Associated Types

type Rep HttpVersion :: Type -> Type #

Generic IP 
Instance details

Defined in Data.IP.Addr

Associated Types

type Rep IP :: Type -> Type #

Methods

from :: IP -> Rep IP x #

to :: Rep IP x -> IP #

Generic IPv4 
Instance details

Defined in Data.IP.Addr

Associated Types

type Rep IPv4 :: Type -> Type #

Methods

from :: IPv4 -> Rep IPv4 x #

to :: Rep IPv4 x -> IPv4 #

Generic IPv6 
Instance details

Defined in Data.IP.Addr

Associated Types

type Rep IPv6 :: Type -> Type #

Methods

from :: IPv6 -> Rep IPv6 x #

to :: Rep IPv6 x -> IPv6 #

Generic IPRange 
Instance details

Defined in Data.IP.Range

Associated Types

type Rep IPRange :: Type -> Type #

Methods

from :: IPRange -> Rep IPRange x #

to :: Rep IPRange x -> IPRange #

Generic URI 
Instance details

Defined in Network.URI

Associated Types

type Rep URI :: Type -> Type #

Methods

from :: URI -> Rep URI x #

to :: Rep URI x -> URI #

Generic URIAuth 
Instance details

Defined in Network.URI

Associated Types

type Rep URIAuth :: Type -> Type #

Methods

from :: URIAuth -> Rep URIAuth x #

to :: Rep URIAuth x -> URIAuth #

Generic Mode 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Associated Types

type Rep Mode :: Type -> Type #

Methods

from :: Mode -> Rep Mode x #

to :: Rep Mode x -> Mode #

Generic Style 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Associated Types

type Rep Style :: Type -> Type #

Methods

from :: Style -> Rep Style x #

to :: Rep Style x -> Style #

Generic TextDetails 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Associated Types

type Rep TextDetails :: Type -> Type #

Generic Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Associated Types

type Rep Doc :: Type -> Type #

Methods

from :: Doc -> Rep Doc x #

to :: Rep Doc x -> Doc #

Generic VarType 
Instance details

Defined in Text.Shakespeare

Associated Types

type Rep VarType :: Type -> Type #

Methods

from :: VarType -> Rep VarType x #

to :: Rep VarType x -> VarType #

Generic AnnLookup 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep AnnLookup :: Type -> Type #

Generic AnnTarget 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep AnnTarget :: Type -> Type #

Generic Bang 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Bang :: Type -> Type #

Methods

from :: Bang -> Rep Bang x #

to :: Rep Bang x -> Bang #

Generic Body 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Body :: Type -> Type #

Methods

from :: Body -> Rep Body x #

to :: Rep Body x -> Body #

Generic Bytes 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Bytes :: Type -> Type #

Methods

from :: Bytes -> Rep Bytes x #

to :: Rep Bytes x -> Bytes #

Generic Callconv 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Callconv :: Type -> Type #

Methods

from :: Callconv -> Rep Callconv x #

to :: Rep Callconv x -> Callconv #

Generic Clause 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Clause :: Type -> Type #

Methods

from :: Clause -> Rep Clause x #

to :: Rep Clause x -> Clause #

Generic Con 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Con :: Type -> Type #

Methods

from :: Con -> Rep Con x #

to :: Rep Con x -> Con #

Generic Dec 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Dec :: Type -> Type #

Methods

from :: Dec -> Rep Dec x #

to :: Rep Dec x -> Dec #

Generic DecidedStrictness 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep DecidedStrictness :: Type -> Type #

Generic DerivClause 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep DerivClause :: Type -> Type #

Generic DerivStrategy 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep DerivStrategy :: Type -> Type #

Generic DocLoc 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep DocLoc :: Type -> Type #

Methods

from :: DocLoc -> Rep DocLoc x #

to :: Rep DocLoc x -> DocLoc #

Generic Exp 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Exp :: Type -> Type #

Methods

from :: Exp -> Rep Exp x #

to :: Rep Exp x -> Exp #

Generic FamilyResultSig 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep FamilyResultSig :: Type -> Type #

Generic Fixity 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Fixity :: Type -> Type #

Methods

from :: Fixity -> Rep Fixity x #

to :: Rep Fixity x -> Fixity #

Generic FixityDirection 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep FixityDirection :: Type -> Type #

Generic Foreign 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Foreign :: Type -> Type #

Methods

from :: Foreign -> Rep Foreign x #

to :: Rep Foreign x -> Foreign #

Generic FunDep 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep FunDep :: Type -> Type #

Methods

from :: FunDep -> Rep FunDep x #

to :: Rep FunDep x -> FunDep #

Generic Guard 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Guard :: Type -> Type #

Methods

from :: Guard -> Rep Guard x #

to :: Rep Guard x -> Guard #

Generic Info 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Info :: Type -> Type #

Methods

from :: Info -> Rep Info x #

to :: Rep Info x -> Info #

Generic InjectivityAnn 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep InjectivityAnn :: Type -> Type #

Generic Inline 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Inline :: Type -> Type #

Methods

from :: Inline -> Rep Inline x #

to :: Rep Inline x -> Inline #

Generic Lit 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Lit :: Type -> Type #

Methods

from :: Lit -> Rep Lit x #

to :: Rep Lit x -> Lit #

Generic Loc 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Loc :: Type -> Type #

Methods

from :: Loc -> Rep Loc x #

to :: Rep Loc x -> Loc #

Generic Match 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Match :: Type -> Type #

Methods

from :: Match -> Rep Match x #

to :: Rep Match x -> Match #

Generic ModName 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep ModName :: Type -> Type #

Methods

from :: ModName -> Rep ModName x #

to :: Rep ModName x -> ModName #

Generic Module 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Module :: Type -> Type #

Methods

from :: Module -> Rep Module x #

to :: Rep Module x -> Module #

Generic ModuleInfo 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep ModuleInfo :: Type -> Type #

Generic Name 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Name :: Type -> Type #

Methods

from :: Name -> Rep Name x #

to :: Rep Name x -> Name #

Generic NameFlavour 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep NameFlavour :: Type -> Type #

Generic NameSpace 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep NameSpace :: Type -> Type #

Generic OccName 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep OccName :: Type -> Type #

Methods

from :: OccName -> Rep OccName x #

to :: Rep OccName x -> OccName #

Generic Overlap 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Overlap :: Type -> Type #

Methods

from :: Overlap -> Rep Overlap x #

to :: Rep Overlap x -> Overlap #

Generic Pat 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Pat :: Type -> Type #

Methods

from :: Pat -> Rep Pat x #

to :: Rep Pat x -> Pat #

Generic PatSynArgs 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep PatSynArgs :: Type -> Type #

Generic PatSynDir 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep PatSynDir :: Type -> Type #

Generic Phases 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Phases :: Type -> Type #

Methods

from :: Phases -> Rep Phases x #

to :: Rep Phases x -> Phases #

Generic PkgName 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep PkgName :: Type -> Type #

Methods

from :: PkgName -> Rep PkgName x #

to :: Rep PkgName x -> PkgName #

Generic Pragma 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Pragma :: Type -> Type #

Methods

from :: Pragma -> Rep Pragma x #

to :: Rep Pragma x -> Pragma #

Generic Range 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Range :: Type -> Type #

Methods

from :: Range -> Rep Range x #

to :: Rep Range x -> Range #

Generic Role 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Role :: Type -> Type #

Methods

from :: Role -> Rep Role x #

to :: Rep Role x -> Role #

Generic RuleBndr 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep RuleBndr :: Type -> Type #

Methods

from :: RuleBndr -> Rep RuleBndr x #

to :: Rep RuleBndr x -> RuleBndr #

Generic RuleMatch 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep RuleMatch :: Type -> Type #

Generic Safety 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Safety :: Type -> Type #

Methods

from :: Safety -> Rep Safety x #

to :: Rep Safety x -> Safety #

Generic SourceStrictness 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep SourceStrictness :: Type -> Type #

Generic SourceUnpackedness 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep SourceUnpackedness :: Type -> Type #

Generic Specificity 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Specificity :: Type -> Type #

Generic Stmt 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Stmt :: Type -> Type #

Methods

from :: Stmt -> Rep Stmt x #

to :: Rep Stmt x -> Stmt #

Generic TyLit 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep TyLit :: Type -> Type #

Methods

from :: TyLit -> Rep TyLit x #

to :: Rep TyLit x -> TyLit #

Generic TySynEqn 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep TySynEqn :: Type -> Type #

Methods

from :: TySynEqn -> Rep TySynEqn x #

to :: Rep TySynEqn x -> TySynEqn #

Generic Type 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Type :: Type -> Type #

Methods

from :: Type -> Rep Type x #

to :: Rep Type x -> Type #

Generic TypeFamilyHead 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep TypeFamilyHead :: Type -> Type #

Generic ConstructorInfo 
Instance details

Defined in Language.Haskell.TH.Datatype

Associated Types

type Rep ConstructorInfo :: Type -> Type #

Generic ConstructorVariant 
Instance details

Defined in Language.Haskell.TH.Datatype

Associated Types

type Rep ConstructorVariant :: Type -> Type #

Generic DatatypeInfo 
Instance details

Defined in Language.Haskell.TH.Datatype

Associated Types

type Rep DatatypeInfo :: Type -> Type #

Generic DatatypeVariant 
Instance details

Defined in Language.Haskell.TH.Datatype

Associated Types

type Rep DatatypeVariant :: Type -> Type #

Generic FieldStrictness 
Instance details

Defined in Language.Haskell.TH.Datatype

Associated Types

type Rep FieldStrictness :: Type -> Type #

Generic Strictness 
Instance details

Defined in Language.Haskell.TH.Datatype

Associated Types

type Rep Strictness :: Type -> Type #

Generic Unpackedness 
Instance details

Defined in Language.Haskell.TH.Datatype

Associated Types

type Rep Unpackedness :: Type -> Type #

Generic ConcException 
Instance details

Defined in UnliftIO.Internals.Async

Associated Types

type Rep ConcException :: Type -> Type #

Generic Content 
Instance details

Defined in Data.XML.Types

Associated Types

type Rep Content :: Type -> Type #

Methods

from :: Content -> Rep Content x #

to :: Rep Content x -> Content #

Generic Doctype 
Instance details

Defined in Data.XML.Types

Associated Types

type Rep Doctype :: Type -> Type #

Methods

from :: Doctype -> Rep Doctype x #

to :: Rep Doctype x -> Doctype #

Generic Document 
Instance details

Defined in Data.XML.Types

Associated Types

type Rep Document :: Type -> Type #

Methods

from :: Document -> Rep Document x #

to :: Rep Document x -> Document #

Generic Element 
Instance details

Defined in Data.XML.Types

Associated Types

type Rep Element :: Type -> Type #

Methods

from :: Element -> Rep Element x #

to :: Rep Element x -> Element #

Generic Event 
Instance details

Defined in Data.XML.Types

Associated Types

type Rep Event :: Type -> Type #

Methods

from :: Event -> Rep Event x #

to :: Rep Event x -> Event #

Generic ExternalID 
Instance details

Defined in Data.XML.Types

Associated Types

type Rep ExternalID :: Type -> Type #

Generic Instruction 
Instance details

Defined in Data.XML.Types

Associated Types

type Rep Instruction :: Type -> Type #

Generic Miscellaneous 
Instance details

Defined in Data.XML.Types

Associated Types

type Rep Miscellaneous :: Type -> Type #

Generic Name 
Instance details

Defined in Data.XML.Types

Associated Types

type Rep Name :: Type -> Type #

Methods

from :: Name -> Rep Name x #

to :: Rep Name x -> Name #

Generic Node 
Instance details

Defined in Data.XML.Types

Associated Types

type Rep Node :: Type -> Type #

Methods

from :: Node -> Rep Node x #

to :: Rep Node x -> Node #

Generic Prologue 
Instance details

Defined in Data.XML.Types

Associated Types

type Rep Prologue :: Type -> Type #

Methods

from :: Prologue -> Rep Prologue x #

to :: Rep Prologue x -> Prologue #

Generic ErrorResponse 
Instance details

Defined in Yesod.Core.Types

Associated Types

type Rep ErrorResponse :: Type -> Type #

Generic CompressionLevel 
Instance details

Defined in Codec.Compression.Zlib.Stream

Associated Types

type Rep CompressionLevel :: Type -> Type #

Generic CompressionStrategy 
Instance details

Defined in Codec.Compression.Zlib.Stream

Associated Types

type Rep CompressionStrategy :: Type -> Type #

Generic Format 
Instance details

Defined in Codec.Compression.Zlib.Stream

Associated Types

type Rep Format :: Type -> Type #

Methods

from :: Format -> Rep Format x #

to :: Rep Format x -> Format #

Generic MemoryLevel 
Instance details

Defined in Codec.Compression.Zlib.Stream

Associated Types

type Rep MemoryLevel :: Type -> Type #

Generic Method 
Instance details

Defined in Codec.Compression.Zlib.Stream

Associated Types

type Rep Method :: Type -> Type #

Methods

from :: Method -> Rep Method x #

to :: Rep Method x -> Method #

Generic WindowBits 
Instance details

Defined in Codec.Compression.Zlib.Stream

Associated Types

type Rep WindowBits :: Type -> Type #

Generic () 
Instance details

Defined in GHC.Generics

Associated Types

type Rep () :: Type -> Type #

Methods

from :: () -> Rep () x #

to :: Rep () x -> () #

Generic Bool 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Bool :: Type -> Type #

Methods

from :: Bool -> Rep Bool x #

to :: Rep Bool x -> Bool #

Generic (ZipList a) 
Instance details

Defined in Control.Applicative

Associated Types

type Rep (ZipList a) :: Type -> Type #

Methods

from :: ZipList a -> Rep (ZipList a) x #

to :: Rep (ZipList a) x -> ZipList a #

Generic (Complex a) 
Instance details

Defined in Data.Complex

Associated Types

type Rep (Complex a) :: Type -> Type #

Methods

from :: Complex a -> Rep (Complex a) x #

to :: Rep (Complex a) x -> Complex a #

Generic (Identity a) 
Instance details

Defined in Data.Functor.Identity

Associated Types

type Rep (Identity a) :: Type -> Type #

Methods

from :: Identity a -> Rep (Identity a) x #

to :: Rep (Identity a) x -> Identity a #

Generic (First a) 
Instance details

Defined in Data.Monoid

Associated Types

type Rep (First a) :: Type -> Type #

Methods

from :: First a -> Rep (First a) x #

to :: Rep (First a) x -> First a #

Generic (Last a) 
Instance details

Defined in Data.Monoid

Associated Types

type Rep (Last a) :: Type -> Type #

Methods

from :: Last a -> Rep (Last a) x #

to :: Rep (Last a) x -> Last a #

Generic (Down a) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Down a) :: Type -> Type #

Methods

from :: Down a -> Rep (Down a) x #

to :: Rep (Down a) x -> Down a #

Generic (First a) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (First a) :: Type -> Type #

Methods

from :: First a -> Rep (First a) x #

to :: Rep (First a) x -> First a #

Generic (Last a) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (Last a) :: Type -> Type #

Methods

from :: Last a -> Rep (Last a) x #

to :: Rep (Last a) x -> Last a #

Generic (Max a) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (Max a) :: Type -> Type #

Methods

from :: Max a -> Rep (Max a) x #

to :: Rep (Max a) x -> Max a #

Generic (Min a) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (Min a) :: Type -> Type #

Methods

from :: Min a -> Rep (Min a) x #

to :: Rep (Min a) x -> Min a #

Generic (WrappedMonoid m) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (WrappedMonoid m) :: Type -> Type #

Generic (Dual a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Dual a) :: Type -> Type #

Methods

from :: Dual a -> Rep (Dual a) x #

to :: Rep (Dual a) x -> Dual a #

Generic (Endo a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Endo a) :: Type -> Type #

Methods

from :: Endo a -> Rep (Endo a) x #

to :: Rep (Endo a) x -> Endo a #

Generic (Product a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Product a) :: Type -> Type #

Methods

from :: Product a -> Rep (Product a) x #

to :: Rep (Product a) x -> Product a #

Generic (Sum a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Sum a) :: Type -> Type #

Methods

from :: Sum a -> Rep (Sum a) x #

to :: Rep (Sum a) x -> Sum a #

Generic (NonEmpty a) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (NonEmpty a) :: Type -> Type #

Methods

from :: NonEmpty a -> Rep (NonEmpty a) x #

to :: Rep (NonEmpty a) x -> NonEmpty a #

Generic (Par1 p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Par1 p) :: Type -> Type #

Methods

from :: Par1 p -> Rep (Par1 p) x #

to :: Rep (Par1 p) x -> Par1 p #

Generic (Digit a) 
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep (Digit a) :: Type -> Type #

Methods

from :: Digit a -> Rep (Digit a) x #

to :: Rep (Digit a) x -> Digit a #

Generic (Elem a) 
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep (Elem a) :: Type -> Type #

Methods

from :: Elem a -> Rep (Elem a) x #

to :: Rep (Elem a) x -> Elem a #

Generic (FingerTree a) 
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep (FingerTree a) :: Type -> Type #

Methods

from :: FingerTree a -> Rep (FingerTree a) x #

to :: Rep (FingerTree a) x -> FingerTree a #

Generic (Node a) 
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep (Node a) :: Type -> Type #

Methods

from :: Node a -> Rep (Node a) x #

to :: Rep (Node a) x -> Node a #

Generic (ViewL a) 
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep (ViewL a) :: Type -> Type #

Methods

from :: ViewL a -> Rep (ViewL a) x #

to :: Rep (ViewL a) x -> ViewL a #

Generic (ViewR a) 
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep (ViewR a) :: Type -> Type #

Methods

from :: ViewR a -> Rep (ViewR a) x #

to :: Rep (ViewR a) x -> ViewR a #

Generic (Tree a) 
Instance details

Defined in Data.Tree

Associated Types

type Rep (Tree a) :: Type -> Type #

Methods

from :: Tree a -> Rep (Tree a) x #

to :: Rep (Tree a) x -> Tree a #

Generic (Fix f) 
Instance details

Defined in Data.Fix

Associated Types

type Rep (Fix f) :: Type -> Type #

Methods

from :: Fix f -> Rep (Fix f) x #

to :: Rep (Fix f) x -> Fix f #

Generic (HistoriedResponse body) 
Instance details

Defined in Network.HTTP.Client

Associated Types

type Rep (HistoriedResponse body) :: Type -> Type #

Methods

from :: HistoriedResponse body -> Rep (HistoriedResponse body) x #

to :: Rep (HistoriedResponse body) x -> HistoriedResponse body #

Generic (AddrRange a) 
Instance details

Defined in Data.IP.Range

Associated Types

type Rep (AddrRange a) :: Type -> Type #

Methods

from :: AddrRange a -> Rep (AddrRange a) x #

to :: Rep (AddrRange a) x -> AddrRange a #

(Generic (Key record), Generic record) => Generic (Entity record) 
Instance details

Defined in Database.Persist.Class.PersistEntity

Associated Types

type Rep (Entity record) :: Type -> Type #

Methods

from :: Entity record -> Rep (Entity record) x #

to :: Rep (Entity record) x -> Entity record #

Generic (Doc a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Associated Types

type Rep (Doc a) :: Type -> Type #

Methods

from :: Doc a -> Rep (Doc a) x #

to :: Rep (Doc a) x -> Doc a #

Generic (Maybe a) 
Instance details

Defined in Data.Strict.Maybe

Associated Types

type Rep (Maybe a) :: Type -> Type #

Methods

from :: Maybe a -> Rep (Maybe a) x #

to :: Rep (Maybe a) x -> Maybe a #

Generic (TyVarBndr flag) 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep (TyVarBndr flag) :: Type -> Type #

Methods

from :: TyVarBndr flag -> Rep (TyVarBndr flag) x #

to :: Rep (TyVarBndr flag) x -> TyVarBndr flag #

Generic (Route App) Source # 
Instance details

Defined in Foundation

Associated Types

type Rep (Route App) :: Type -> Type #

Methods

from :: Route App -> Rep (Route App) x #

to :: Rep (Route App) x -> Route App #

Generic (Maybe a) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Maybe a) :: Type -> Type #

Methods

from :: Maybe a -> Rep (Maybe a) x #

to :: Rep (Maybe a) x -> Maybe a #

Generic (a) 
Instance details

Defined in GHC.Generics

Associated Types

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

Methods

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

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

Generic [a] 
Instance details

Defined in GHC.Generics

Associated Types

type Rep [a] :: Type -> Type #

Methods

from :: [a] -> Rep [a] x #

to :: Rep [a] x -> [a] #

Generic (WrappedMonad m a) 
Instance details

Defined in Control.Applicative

Associated Types

type Rep (WrappedMonad m a) :: Type -> Type #

Methods

from :: WrappedMonad m a -> Rep (WrappedMonad m a) x #

to :: Rep (WrappedMonad m a) x -> WrappedMonad m a #

Generic (Either a b) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Either a b) :: Type -> Type #

Methods

from :: Either a b -> Rep (Either a b) x #

to :: Rep (Either a b) x -> Either a b #

Generic (Proxy t) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Proxy t) :: Type -> Type #

Methods

from :: Proxy t -> Rep (Proxy t) x #

to :: Rep (Proxy t) x -> Proxy t #

Generic (Arg a b) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (Arg a b) :: Type -> Type #

Methods

from :: Arg a b -> Rep (Arg a b) x #

to :: Rep (Arg a b) x -> Arg a b #

Generic (U1 p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (U1 p) :: Type -> Type #

Methods

from :: U1 p -> Rep (U1 p) x #

to :: Rep (U1 p) x -> U1 p #

Generic (V1 p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (V1 p) :: Type -> Type #

Methods

from :: V1 p -> Rep (V1 p) x #

to :: Rep (V1 p) x -> V1 p #

Generic (Cofree f a) 
Instance details

Defined in Control.Comonad.Cofree

Associated Types

type Rep (Cofree f a) :: Type -> Type #

Methods

from :: Cofree f a -> Rep (Cofree f a) x #

to :: Rep (Cofree f a) x -> Cofree f a #

Generic (Free f a) 
Instance details

Defined in Control.Monad.Free

Associated Types

type Rep (Free f a) :: Type -> Type #

Methods

from :: Free f a -> Rep (Free f a) x #

to :: Rep (Free f a) x -> Free f a #

Generic (Either a b) 
Instance details

Defined in Data.Strict.Either

Associated Types

type Rep (Either a b) :: Type -> Type #

Methods

from :: Either a b -> Rep (Either a b) x #

to :: Rep (Either a b) x -> Either a b #

Generic (These a b) 
Instance details

Defined in Data.Strict.These

Associated Types

type Rep (These a b) :: Type -> Type #

Methods

from :: These a b -> Rep (These a b) x #

to :: Rep (These a b) x -> These a b #

Generic (Pair a b) 
Instance details

Defined in Data.Strict.Tuple

Associated Types

type Rep (Pair a b) :: Type -> Type #

Methods

from :: Pair a b -> Rep (Pair a b) x #

to :: Rep (Pair a b) x -> Pair a b #

Generic (These a b) 
Instance details

Defined in Data.These

Associated Types

type Rep (These a b) :: Type -> Type #

Methods

from :: These a b -> Rep (These a b) x #

to :: Rep (These a b) x -> These a b #

Generic (Lift f a) 
Instance details

Defined in Control.Applicative.Lift

Associated Types

type Rep (Lift f a) :: Type -> Type #

Methods

from :: Lift f a -> Rep (Lift f a) x #

to :: Rep (Lift f a) x -> Lift f a #

Generic (MaybeT m a) 
Instance details

Defined in Control.Monad.Trans.Maybe

Associated Types

type Rep (MaybeT m a) :: Type -> Type #

Methods

from :: MaybeT m a -> Rep (MaybeT m a) x #

to :: Rep (MaybeT m a) x -> MaybeT m a #

Generic (a, b) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b) :: Type -> Type #

Methods

from :: (a, b) -> Rep (a, b) x #

to :: Rep (a, b) x -> (a, b) #

Generic (WrappedArrow a b c) 
Instance details

Defined in Control.Applicative

Associated Types

type Rep (WrappedArrow a b c) :: Type -> Type #

Methods

from :: WrappedArrow a b c -> Rep (WrappedArrow a b c) x #

to :: Rep (WrappedArrow a b c) x -> WrappedArrow a b c #

Generic (Kleisli m a b) 
Instance details

Defined in Control.Arrow

Associated Types

type Rep (Kleisli m a b) :: Type -> Type #

Methods

from :: Kleisli m a b -> Rep (Kleisli m a b) x #

to :: Rep (Kleisli m a b) x -> Kleisli m a b #

Generic (Const a b) 
Instance details

Defined in Data.Functor.Const

Associated Types

type Rep (Const a b) :: Type -> Type #

Methods

from :: Const a b -> Rep (Const a b) x #

to :: Rep (Const a b) x -> Const a b #

Generic (Ap f a) 
Instance details

Defined in Data.Monoid

Associated Types

type Rep (Ap f a) :: Type -> Type #

Methods

from :: Ap f a -> Rep (Ap f a) x #

to :: Rep (Ap f a) x -> Ap f a #

Generic (Alt f a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Alt f a) :: Type -> Type #

Methods

from :: Alt f a -> Rep (Alt f a) x #

to :: Rep (Alt f a) x -> Alt f a #

Generic (Rec1 f p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Rec1 f p) :: Type -> Type #

Methods

from :: Rec1 f p -> Rep (Rec1 f p) x #

to :: Rep (Rec1 f p) x -> Rec1 f p #

Generic (URec (Ptr ()) p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec (Ptr ()) p) :: Type -> Type #

Methods

from :: URec (Ptr ()) p -> Rep (URec (Ptr ()) p) x #

to :: Rep (URec (Ptr ()) p) x -> URec (Ptr ()) p #

Generic (URec Char p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Char p) :: Type -> Type #

Methods

from :: URec Char p -> Rep (URec Char p) x #

to :: Rep (URec Char p) x -> URec Char p #

Generic (URec Double p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Double p) :: Type -> Type #

Methods

from :: URec Double p -> Rep (URec Double p) x #

to :: Rep (URec Double p) x -> URec Double p #

Generic (URec Float p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Float p) :: Type -> Type #

Methods

from :: URec Float p -> Rep (URec Float p) x #

to :: Rep (URec Float p) x -> URec Float p #

Generic (URec Int p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Int p) :: Type -> Type #

Methods

from :: URec Int p -> Rep (URec Int p) x #

to :: Rep (URec Int p) x -> URec Int p #

Generic (URec Word p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Word p) :: Type -> Type #

Methods

from :: URec Word p -> Rep (URec Word p) x #

to :: Rep (URec Word p) x -> URec Word p #

Generic (Join p a) 
Instance details

Defined in Data.Bifunctor.Join

Associated Types

type Rep (Join p a) :: Type -> Type #

Methods

from :: Join p a -> Rep (Join p a) x #

to :: Rep (Join p a) x -> Join p a #

Generic (FreeF f a b) 
Instance details

Defined in Control.Monad.Trans.Free

Associated Types

type Rep (FreeF f a b) :: Type -> Type #

Methods

from :: FreeF f a b -> Rep (FreeF f a b) x #

to :: Rep (FreeF f a b) x -> FreeF f a b #

Generic (Tagged s b) 
Instance details

Defined in Data.Tagged

Associated Types

type Rep (Tagged s b) :: Type -> Type #

Methods

from :: Tagged s b -> Rep (Tagged s b) x #

to :: Rep (Tagged s b) x -> Tagged s b #

Generic (These1 f g a) 
Instance details

Defined in Data.Functor.These

Associated Types

type Rep (These1 f g a) :: Type -> Type #

Methods

from :: These1 f g a -> Rep (These1 f g a) x #

to :: Rep (These1 f g a) x -> These1 f g a #

Generic (Backwards f a) 
Instance details

Defined in Control.Applicative.Backwards

Associated Types

type Rep (Backwards f a) :: Type -> Type #

Methods

from :: Backwards f a -> Rep (Backwards f a) x #

to :: Rep (Backwards f a) x -> Backwards f a #

Generic (AccumT w m a) 
Instance details

Defined in Control.Monad.Trans.Accum

Associated Types

type Rep (AccumT w m a) :: Type -> Type #

Methods

from :: AccumT w m a -> Rep (AccumT w m a) x #

to :: Rep (AccumT w m a) x -> AccumT w m a #

Generic (ExceptT e m a) 
Instance details

Defined in Control.Monad.Trans.Except

Associated Types

type Rep (ExceptT e m a) :: Type -> Type #

Methods

from :: ExceptT e m a -> Rep (ExceptT e m a) x #

to :: Rep (ExceptT e m a) x -> ExceptT e m a #

Generic (IdentityT f a) 
Instance details

Defined in Control.Monad.Trans.Identity

Associated Types

type Rep (IdentityT f a) :: Type -> Type #

Methods

from :: IdentityT f a -> Rep (IdentityT f a) x #

to :: Rep (IdentityT f a) x -> IdentityT f a #

Generic (ReaderT r m a) 
Instance details

Defined in Control.Monad.Trans.Reader

Associated Types

type Rep (ReaderT r m a) :: Type -> Type #

Methods

from :: ReaderT r m a -> Rep (ReaderT r m a) x #

to :: Rep (ReaderT r m a) x -> ReaderT r m a #

Generic (SelectT r m a) 
Instance details

Defined in Control.Monad.Trans.Select

Associated Types

type Rep (SelectT r m a) :: Type -> Type #

Methods

from :: SelectT r m a -> Rep (SelectT r m a) x #

to :: Rep (SelectT r m a) x -> SelectT r m a #

Generic (StateT s m a) 
Instance details

Defined in Control.Monad.Trans.State.Lazy

Associated Types

type Rep (StateT s m a) :: Type -> Type #

Methods

from :: StateT s m a -> Rep (StateT s m a) x #

to :: Rep (StateT s m a) x -> StateT s m a #

Generic (StateT s m a) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Associated Types

type Rep (StateT s m a) :: Type -> Type #

Methods

from :: StateT s m a -> Rep (StateT s m a) x #

to :: Rep (StateT s m a) x -> StateT s m a #

Generic (WriterT w m a) 
Instance details

Defined in Control.Monad.Trans.Writer.CPS

Associated Types

type Rep (WriterT w m a) :: Type -> Type #

Methods

from :: WriterT w m a -> Rep (WriterT w m a) x #

to :: Rep (WriterT w m a) x -> WriterT w m a #

Generic (WriterT w m a) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Associated Types

type Rep (WriterT w m a) :: Type -> Type #

Methods

from :: WriterT w m a -> Rep (WriterT w m a) x #

to :: Rep (WriterT w m a) x -> WriterT w m a #

Generic (WriterT w m a) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Associated Types

type Rep (WriterT w m a) :: Type -> Type #

Methods

from :: WriterT w m a -> Rep (WriterT w m a) x #

to :: Rep (WriterT w m a) x -> WriterT w m a #

Generic (Constant a b) 
Instance details

Defined in Data.Functor.Constant

Associated Types

type Rep (Constant a b) :: Type -> Type #

Methods

from :: Constant a b -> Rep (Constant a b) x #

to :: Rep (Constant a b) x -> Constant a b #

Generic (Reverse f a) 
Instance details

Defined in Data.Functor.Reverse

Associated Types

type Rep (Reverse f a) :: Type -> Type #

Methods

from :: Reverse f a -> Rep (Reverse f a) x #

to :: Rep (Reverse f a) x -> Reverse f a #

Generic (a, b, c) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c) :: Type -> Type #

Methods

from :: (a, b, c) -> Rep (a, b, c) x #

to :: Rep (a, b, c) x -> (a, b, c) #

Generic (Product f g a) 
Instance details

Defined in Data.Functor.Product

Associated Types

type Rep (Product f g a) :: Type -> Type #

Methods

from :: Product f g a -> Rep (Product f g a) x #

to :: Rep (Product f g a) x -> Product f g a #

Generic (Sum f g a) 
Instance details

Defined in Data.Functor.Sum

Associated Types

type Rep (Sum f g a) :: Type -> Type #

Methods

from :: Sum f g a -> Rep (Sum f g a) x #

to :: Rep (Sum f g a) x -> Sum f g a #

Generic ((f :*: g) p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep ((f :*: g) p) :: Type -> Type #

Methods

from :: (f :*: g) p -> Rep ((f :*: g) p) x #

to :: Rep ((f :*: g) p) x -> (f :*: g) p #

Generic ((f :+: g) p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep ((f :+: g) p) :: Type -> Type #

Methods

from :: (f :+: g) p -> Rep ((f :+: g) p) x #

to :: Rep ((f :+: g) p) x -> (f :+: g) p #

Generic (K1 i c p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (K1 i c p) :: Type -> Type #

Methods

from :: K1 i c p -> Rep (K1 i c p) x #

to :: Rep (K1 i c p) x -> K1 i c p #

Generic (ContT r m a) 
Instance details

Defined in Control.Monad.Trans.Cont

Associated Types

type Rep (ContT r m a) :: Type -> Type #

Methods

from :: ContT r m a -> Rep (ContT r m a) x #

to :: Rep (ContT r m a) x -> ContT r m a #

Generic (a, b, c, d) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d) :: Type -> Type #

Methods

from :: (a, b, c, d) -> Rep (a, b, c, d) x #

to :: Rep (a, b, c, d) x -> (a, b, c, d) #

Generic (Compose f g a) 
Instance details

Defined in Data.Functor.Compose

Associated Types

type Rep (Compose f g a) :: Type -> Type #

Methods

from :: Compose f g a -> Rep (Compose f g a) x #

to :: Rep (Compose f g a) x -> Compose f g a #

Generic ((f :.: g) p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep ((f :.: g) p) :: Type -> Type #

Methods

from :: (f :.: g) p -> Rep ((f :.: g) p) x #

to :: Rep ((f :.: g) p) x -> (f :.: g) p #

Generic (M1 i c f p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (M1 i c f p) :: Type -> Type #

Methods

from :: M1 i c f p -> Rep (M1 i c f p) x #

to :: Rep (M1 i c f p) x -> M1 i c f p #

Generic (Clown f a b) 
Instance details

Defined in Data.Bifunctor.Clown

Associated Types

type Rep (Clown f a b) :: Type -> Type #

Methods

from :: Clown f a b -> Rep (Clown f a b) x #

to :: Rep (Clown f a b) x -> Clown f a b #

Generic (Flip p a b) 
Instance details

Defined in Data.Bifunctor.Flip

Associated Types

type Rep (Flip p a b) :: Type -> Type #

Methods

from :: Flip p a b -> Rep (Flip p a b) x #

to :: Rep (Flip p a b) x -> Flip p a b #

Generic (Joker g a b) 
Instance details

Defined in Data.Bifunctor.Joker

Associated Types

type Rep (Joker g a b) :: Type -> Type #

Methods

from :: Joker g a b -> Rep (Joker g a b) x #

to :: Rep (Joker g a b) x -> Joker g a b #

Generic (WrappedBifunctor p a b) 
Instance details

Defined in Data.Bifunctor.Wrapped

Associated Types

type Rep (WrappedBifunctor p a b) :: Type -> Type #

Methods

from :: WrappedBifunctor p a b -> Rep (WrappedBifunctor p a b) x #

to :: Rep (WrappedBifunctor p a b) x -> WrappedBifunctor p a b #

Generic (RWST r w s m a) 
Instance details

Defined in Control.Monad.Trans.RWS.CPS

Associated Types

type Rep (RWST r w s m a) :: Type -> Type #

Methods

from :: RWST r w s m a -> Rep (RWST r w s m a) x #

to :: Rep (RWST r w s m a) x -> RWST r w s m a #

Generic (RWST r w s m a) 
Instance details

Defined in Control.Monad.Trans.RWS.Lazy

Associated Types

type Rep (RWST r w s m a) :: Type -> Type #

Methods

from :: RWST r w s m a -> Rep (RWST r w s m a) x #

to :: Rep (RWST r w s m a) x -> RWST r w s m a #

Generic (RWST r w s m a) 
Instance details

Defined in Control.Monad.Trans.RWS.Strict

Associated Types

type Rep (RWST r w s m a) :: Type -> Type #

Methods

from :: RWST r w s m a -> Rep (RWST r w s m a) x #

to :: Rep (RWST r w s m a) x -> RWST r w s m a #

Generic (a, b, c, d, e) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e) :: Type -> Type #

Methods

from :: (a, b, c, d, e) -> Rep (a, b, c, d, e) x #

to :: Rep (a, b, c, d, e) x -> (a, b, c, d, e) #

Generic (Product f g a b) 
Instance details

Defined in Data.Bifunctor.Product

Associated Types

type Rep (Product f g a b) :: Type -> Type #

Methods

from :: Product f g a b -> Rep (Product f g a b) x #

to :: Rep (Product f g a b) x -> Product f g a b #

Generic (Sum p q a b) 
Instance details

Defined in Data.Bifunctor.Sum

Associated Types

type Rep (Sum p q a b) :: Type -> Type #

Methods

from :: Sum p q a b -> Rep (Sum p q a b) x #

to :: Rep (Sum p q a b) x -> Sum p q a b #

Generic (a, b, c, d, e, f) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f) -> Rep (a, b, c, d, e, f) x #

to :: Rep (a, b, c, d, e, f) x -> (a, b, c, d, e, f) #

Generic (Tannen f p a b) 
Instance details

Defined in Data.Bifunctor.Tannen

Associated Types

type Rep (Tannen f p a b) :: Type -> Type #

Methods

from :: Tannen f p a b -> Rep (Tannen f p a b) x #

to :: Rep (Tannen f p a b) x -> Tannen f p a b #

Generic (a, b, c, d, e, f, g) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f, g) -> Rep (a, b, c, d, e, f, g) x #

to :: Rep (a, b, c, d, e, f, g) x -> (a, b, c, d, e, f, g) #

Generic (a, b, c, d, e, f, g, h) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f, g, h) -> Rep (a, b, c, d, e, f, g, h) x #

to :: Rep (a, b, c, d, e, f, g, h) x -> (a, b, c, d, e, f, g, h) #

Generic (Biff p f g a b) 
Instance details

Defined in Data.Bifunctor.Biff

Associated Types

type Rep (Biff p f g a b) :: Type -> Type #

Methods

from :: Biff p f g a b -> Rep (Biff p f g a b) x #

to :: Rep (Biff p f g a b) x -> Biff p f g a b #

Generic (a, b, c, d, e, f, g, h, i) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h, i) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f, g, h, i) -> Rep (a, b, c, d, e, f, g, h, i) x #

to :: Rep (a, b, c, d, e, f, g, h, i) x -> (a, b, c, d, e, f, g, h, i) #

Generic (a, b, c, d, e, f, g, h, i, j) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h, i, j) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f, g, h, i, j) -> Rep (a, b, c, d, e, f, g, h, i, j) x #

to :: Rep (a, b, c, d, e, f, g, h, i, j) x -> (a, b, c, d, e, f, g, h, i, j) #

Generic (a, b, c, d, e, f, g, h, i, j, k) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h, i, j, k) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k) -> Rep (a, b, c, d, e, f, g, h, i, j, k) x #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k) x -> (a, b, c, d, e, f, g, h, i, j, k) #

Generic (a, b, c, d, e, f, g, h, i, j, k, l) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h, i, j, k, l) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l) x #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l) x -> (a, b, c, d, e, f, g, h, i, j, k, l) #

Generic (a, b, c, d, e, f, g, h, i, j, k, l, m) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h, i, j, k, l, m) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l, m) x #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l, m) x -> (a, b, c, d, e, f, g, h, i, j, k, l, m) #

Generic (a, b, c, d, e, f, g, h, i, j, k, l, m, n) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n) x #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n) x -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) #

Generic (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) x #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) x -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) #

class Bounded a where #

The Bounded class is used to name the upper and lower limits of a type. Ord is not a superclass of Bounded since types that are not totally ordered may also have upper and lower bounds.

The Bounded class may be derived for any enumeration type; minBound is the first constructor listed in the data declaration and maxBound is the last. Bounded may also be derived for single-constructor datatypes whose constituent types are in Bounded.

Methods

minBound :: a #

maxBound :: a #

Instances

Instances details
Bounded All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

minBound :: All #

maxBound :: All #

Bounded Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

minBound :: Any #

maxBound :: Any #

Bounded CBool 
Instance details

Defined in Foreign.C.Types

Bounded CChar 
Instance details

Defined in Foreign.C.Types

Bounded CInt 
Instance details

Defined in Foreign.C.Types

Bounded CIntMax 
Instance details

Defined in Foreign.C.Types

Bounded CIntPtr 
Instance details

Defined in Foreign.C.Types

Bounded CLLong 
Instance details

Defined in Foreign.C.Types

Bounded CLong 
Instance details

Defined in Foreign.C.Types

Bounded CPtrdiff 
Instance details

Defined in Foreign.C.Types

Bounded CSChar 
Instance details

Defined in Foreign.C.Types

Bounded CShort 
Instance details

Defined in Foreign.C.Types

Bounded CSigAtomic 
Instance details

Defined in Foreign.C.Types

Bounded CSize 
Instance details

Defined in Foreign.C.Types

Bounded CUChar 
Instance details

Defined in Foreign.C.Types

Bounded CUInt 
Instance details

Defined in Foreign.C.Types

Bounded CUIntMax 
Instance details

Defined in Foreign.C.Types

Bounded CUIntPtr 
Instance details

Defined in Foreign.C.Types

Bounded CULLong 
Instance details

Defined in Foreign.C.Types

Bounded CULong 
Instance details

Defined in Foreign.C.Types

Bounded CUShort 
Instance details

Defined in Foreign.C.Types

Bounded CWchar 
Instance details

Defined in Foreign.C.Types

Bounded ByteOrder

Since: base-4.11.0.0

Instance details

Defined in GHC.ByteOrder

Bounded Associativity

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Bounded DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Bounded SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Bounded SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Bounded Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Bounded Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Bounded Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Bounded Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Bounded GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Unicode

Bounded Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Bounded Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Bounded Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Bounded Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Bounded Encoding 
Instance details

Defined in Basement.String

Bounded UTF32_Invalid 
Instance details

Defined in Basement.String.Encoding.UTF32

Methods

minBound :: UTF32_Invalid #

maxBound :: UTF32_Invalid #

Bounded Extension 
Instance details

Defined in GHC.LanguageExtensions.Type

Bounded Ordering

Since: base-2.1

Instance details

Defined in GHC.Enum

Bounded StdMethod 
Instance details

Defined in Network.HTTP.Types.Method

Bounded Status

Since: http-types-0.11

Instance details

Defined in Network.HTTP.Types.Status

Bounded IPv4 
Instance details

Defined in Data.IP.Addr

Bounded IPv6 
Instance details

Defined in Data.IP.Addr

Bounded PortNumber 
Instance details

Defined in Network.Socket.Types

Bounded IsolationLevel 
Instance details

Defined in Database.Persist.SqlBackend.Internal.IsolationLevel

Bounded Checkmark 
Instance details

Defined in Database.Persist.Types.Base

Bounded VarType 
Instance details

Defined in Text.Shakespeare

Bounded Enctype 
Instance details

Defined in Yesod.Form.Types

Bounded CompressionStrategy 
Instance details

Defined in Codec.Compression.Zlib.Stream

Bounded Format 
Instance details

Defined in Codec.Compression.Zlib.Stream

Bounded Method 
Instance details

Defined in Codec.Compression.Zlib.Stream

Bounded ()

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: () #

maxBound :: () #

Bounded Bool

Since: base-2.1

Instance details

Defined in GHC.Enum

Bounded Char

Since: base-2.1

Instance details

Defined in GHC.Enum

Bounded Int

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: Int #

maxBound :: Int #

Bounded Levity

Since: base-4.16.0.0

Instance details

Defined in GHC.Enum

Bounded VecCount

Since: base-4.10.0.0

Instance details

Defined in GHC.Enum

Bounded VecElem

Since: base-4.10.0.0

Instance details

Defined in GHC.Enum

Bounded Word

Since: base-2.1

Instance details

Defined in GHC.Enum

Bounded a => Bounded (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Bounded a => Bounded (Down a)

Swaps minBound and maxBound of the underlying type.

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

minBound :: Down a #

maxBound :: Down a #

Bounded a => Bounded (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

minBound :: First a #

maxBound :: First a #

Bounded a => Bounded (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

minBound :: Last a #

maxBound :: Last a #

Bounded a => Bounded (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

minBound :: Max a #

maxBound :: Max a #

Bounded a => Bounded (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

minBound :: Min a #

maxBound :: Min a #

Bounded m => Bounded (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Bounded a => Bounded (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

minBound :: Dual a #

maxBound :: Dual a #

Bounded a => Bounded (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Bounded a => Bounded (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

minBound :: Sum a #

maxBound :: Sum a #

SizeValid n => Bounded (Bits n) 
Instance details

Defined in Basement.Bits

Methods

minBound :: Bits n #

maxBound :: Bits n #

(BackendCompatible b s, Bounded (BackendKey b)) => Bounded (BackendKey (Compatible b s)) 
Instance details

Defined in Database.Persist.Compatible.Types

(PersistCore b, PersistCore (RawSqlite b), Bounded (BackendKey b)) => Bounded (BackendKey (RawSqlite b)) 
Instance details

Defined in Database.Persist.Sqlite

Bounded a => Bounded (a) 
Instance details

Defined in GHC.Enum

Methods

minBound :: (a) #

maxBound :: (a) #

Bounded (Proxy t)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

minBound :: Proxy t #

maxBound :: Proxy t #

(Bounded a, Bounded b) => Bounded (Pair a b) 
Instance details

Defined in Data.Strict.Tuple

Methods

minBound :: Pair a b #

maxBound :: Pair a b #

(Bounded a, Bounded b) => Bounded (a, b)

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: (a, b) #

maxBound :: (a, b) #

Bounded a => Bounded (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

minBound :: Const a b #

maxBound :: Const a b #

(Applicative f, Bounded a) => Bounded (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

minBound :: Ap f a #

maxBound :: Ap f a #

Bounded b => Bounded (Tagged s b) 
Instance details

Defined in Data.Tagged

Methods

minBound :: Tagged s b #

maxBound :: Tagged s b #

(Bounded a, Bounded b, Bounded c) => Bounded (a, b, c)

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: (a, b, c) #

maxBound :: (a, b, c) #

(Bounded a, Bounded b, Bounded c, Bounded d) => Bounded (a, b, c, d)

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: (a, b, c, d) #

maxBound :: (a, b, c, d) #

(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e) => Bounded (a, b, c, d, e)

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: (a, b, c, d, e) #

maxBound :: (a, b, c, d, e) #

(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f) => Bounded (a, b, c, d, e, f)

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: (a, b, c, d, e, f) #

maxBound :: (a, b, c, d, e, f) #

(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g) => Bounded (a, b, c, d, e, f, g)

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: (a, b, c, d, e, f, g) #

maxBound :: (a, b, c, d, e, f, g) #

(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h) => Bounded (a, b, c, d, e, f, g, h)

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: (a, b, c, d, e, f, g, h) #

maxBound :: (a, b, c, d, e, f, g, h) #

(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i) => Bounded (a, b, c, d, e, f, g, h, i)

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: (a, b, c, d, e, f, g, h, i) #

maxBound :: (a, b, c, d, e, f, g, h, i) #

(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j) => Bounded (a, b, c, d, e, f, g, h, i, j)

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: (a, b, c, d, e, f, g, h, i, j) #

maxBound :: (a, b, c, d, e, f, g, h, i, j) #

(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k) => Bounded (a, b, c, d, e, f, g, h, i, j, k)

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: (a, b, c, d, e, f, g, h, i, j, k) #

maxBound :: (a, b, c, d, e, f, g, h, i, j, k) #

(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k, Bounded l) => Bounded (a, b, c, d, e, f, g, h, i, j, k, l)

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: (a, b, c, d, e, f, g, h, i, j, k, l) #

maxBound :: (a, b, c, d, e, f, g, h, i, j, k, l) #

(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k, Bounded l, Bounded m) => Bounded (a, b, c, d, e, f, g, h, i, j, k, l, m)

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: (a, b, c, d, e, f, g, h, i, j, k, l, m) #

maxBound :: (a, b, c, d, e, f, g, h, i, j, k, l, m) #

(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k, Bounded l, Bounded m, Bounded n) => Bounded (a, b, c, d, e, f, g, h, i, j, k, l, m, n)

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) #

maxBound :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) #

(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k, Bounded l, Bounded m, Bounded n, Bounded o) => Bounded (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) #

maxBound :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) #

class Enum a where #

Class Enum defines operations on sequentially ordered types.

The enumFrom... methods are used in Haskell's translation of arithmetic sequences.

Instances of Enum may be derived for any enumeration type (types whose constructors have no fields). The nullary constructors are assumed to be numbered left-to-right by fromEnum from 0 through n-1. See Chapter 10 of the Haskell Report for more details.

For any type that is an instance of class Bounded as well as Enum, the following should hold:

   enumFrom     x   = enumFromTo     x maxBound
   enumFromThen x y = enumFromThenTo x y bound
     where
       bound | fromEnum y >= fromEnum x = maxBound
             | otherwise                = minBound

Minimal complete definition

toEnum, fromEnum

Methods

succ :: a -> a #

the successor of a value. For numeric types, succ adds 1.

pred :: a -> a #

the predecessor of a value. For numeric types, pred subtracts 1.

toEnum :: Int -> a #

Convert from an Int.

fromEnum :: a -> Int #

Convert to an Int. It is implementation-dependent what fromEnum returns when applied to a value that is too large to fit in an Int.

enumFrom :: a -> [a] #

Used in Haskell's translation of [n..] with [n..] = enumFrom n, a possible implementation being enumFrom n = n : enumFrom (succ n). For example:

  • enumFrom 4 :: [Integer] = [4,5,6,7,...]
  • enumFrom 6 :: [Int] = [6,7,8,9,...,maxBound :: Int]

enumFromThen :: a -> a -> [a] #

Used in Haskell's translation of [n,n'..] with [n,n'..] = enumFromThen n n', a possible implementation being enumFromThen n n' = n : n' : worker (f x) (f x n'), worker s v = v : worker s (s v), x = fromEnum n' - fromEnum n and f n y | n > 0 = f (n - 1) (succ y) | n < 0 = f (n + 1) (pred y) | otherwise = y For example:

  • enumFromThen 4 6 :: [Integer] = [4,6,8,10...]
  • enumFromThen 6 2 :: [Int] = [6,2,-2,-6,...,minBound :: Int]

enumFromTo :: a -> a -> [a] #

Used in Haskell's translation of [n..m] with [n..m] = enumFromTo n m, a possible implementation being enumFromTo n m | n <= m = n : enumFromTo (succ n) m | otherwise = []. For example:

  • enumFromTo 6 10 :: [Int] = [6,7,8,9,10]
  • enumFromTo 42 1 :: [Integer] = []

enumFromThenTo :: a -> a -> a -> [a] #

Used in Haskell's translation of [n,n'..m] with [n,n'..m] = enumFromThenTo n n' m, a possible implementation being enumFromThenTo n n' m = worker (f x) (c x) n m, x = fromEnum n' - fromEnum n, c x = bool (>=) ((x 0) f n y | n > 0 = f (n - 1) (succ y) | n < 0 = f (n + 1) (pred y) | otherwise = y and worker s c v m | c v m = v : worker s c (s v) m | otherwise = [] For example:

  • enumFromThenTo 4 2 -6 :: [Integer] = [4,2,0,-2,-4,-6]
  • enumFromThenTo 6 8 2 :: [Int] = []

Instances

Instances details
Enum CBool 
Instance details

Defined in Foreign.C.Types

Enum CChar 
Instance details

Defined in Foreign.C.Types

Enum CClock 
Instance details

Defined in Foreign.C.Types

Enum CDouble 
Instance details

Defined in Foreign.C.Types

Enum CFloat 
Instance details

Defined in Foreign.C.Types

Enum CInt 
Instance details

Defined in Foreign.C.Types

Methods

succ :: CInt -> CInt #

pred :: CInt -> CInt #

toEnum :: Int -> CInt #

fromEnum :: CInt -> Int #

enumFrom :: CInt -> [CInt] #

enumFromThen :: CInt -> CInt -> [CInt] #

enumFromTo :: CInt -> CInt -> [CInt] #

enumFromThenTo :: CInt -> CInt -> CInt -> [CInt] #

Enum CIntMax 
Instance details

Defined in Foreign.C.Types

Enum CIntPtr 
Instance details

Defined in Foreign.C.Types

Enum CLLong 
Instance details

Defined in Foreign.C.Types

Enum CLong 
Instance details

Defined in Foreign.C.Types

Enum CPtrdiff 
Instance details

Defined in Foreign.C.Types

Enum CSChar 
Instance details

Defined in Foreign.C.Types

Enum CSUSeconds 
Instance details

Defined in Foreign.C.Types

Enum CShort 
Instance details

Defined in Foreign.C.Types

Enum CSigAtomic 
Instance details

Defined in Foreign.C.Types

Enum CSize 
Instance details

Defined in Foreign.C.Types

Enum CTime 
Instance details

Defined in Foreign.C.Types

Enum CUChar 
Instance details

Defined in Foreign.C.Types

Enum CUInt 
Instance details

Defined in Foreign.C.Types

Enum CUIntMax 
Instance details

Defined in Foreign.C.Types

Enum CUIntPtr 
Instance details

Defined in Foreign.C.Types

Enum CULLong 
Instance details

Defined in Foreign.C.Types

Enum CULong 
Instance details

Defined in Foreign.C.Types

Enum CUSeconds 
Instance details

Defined in Foreign.C.Types

Enum CUShort 
Instance details

Defined in Foreign.C.Types

Enum CWchar 
Instance details

Defined in Foreign.C.Types

Enum ByteOrder

Since: base-4.11.0.0

Instance details

Defined in GHC.ByteOrder

Enum Associativity

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Enum DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Enum SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Enum SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Enum SeekMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Device

Enum IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

Enum Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

succ :: Int8 -> Int8 #

pred :: Int8 -> Int8 #

toEnum :: Int -> Int8 #

fromEnum :: Int8 -> Int #

enumFrom :: Int8 -> [Int8] #

enumFromThen :: Int8 -> Int8 -> [Int8] #

enumFromTo :: Int8 -> Int8 -> [Int8] #

enumFromThenTo :: Int8 -> Int8 -> Int8 -> [Int8] #

Enum DoCostCentres

Since: base-4.8.0.0

Instance details

Defined in GHC.RTS.Flags

Enum DoHeapProfile

Since: base-4.8.0.0

Instance details

Defined in GHC.RTS.Flags

Enum DoTrace

Since: base-4.8.0.0

Instance details

Defined in GHC.RTS.Flags

Enum GiveGCStats

Since: base-4.8.0.0

Instance details

Defined in GHC.RTS.Flags

Enum IoSubSystem

Since: base-4.9.0.0

Instance details

Defined in GHC.RTS.Flags

Enum GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Unicode

Enum Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Encoding 
Instance details

Defined in Basement.String

Enum UTF32_Invalid 
Instance details

Defined in Basement.String.Encoding.UTF32

Methods

succ :: UTF32_Invalid -> UTF32_Invalid #

pred :: UTF32_Invalid -> UTF32_Invalid #

toEnum :: Int -> UTF32_Invalid #

fromEnum :: UTF32_Invalid -> Int #

enumFrom :: UTF32_Invalid -> [UTF32_Invalid] #

enumFromThen :: UTF32_Invalid -> UTF32_Invalid -> [UTF32_Invalid] #

enumFromTo :: UTF32_Invalid -> UTF32_Invalid -> [UTF32_Invalid] #

enumFromThenTo :: UTF32_Invalid -> UTF32_Invalid -> UTF32_Invalid -> [UTF32_Invalid] #

Enum CryptoError 
Instance details

Defined in Crypto.Error.Types

Enum CryptoError 
Instance details

Defined in Crypto.Error.Types

Enum Extension 
Instance details

Defined in GHC.LanguageExtensions.Type

Enum Ordering

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Colour 
Instance details

Defined in Language.Haskell.HsColour.ColourHighlight

Enum StdMethod 
Instance details

Defined in Network.HTTP.Types.Method

Enum Status

Be advised, that when using the "enumFrom*" family of methods or ranges in lists, it will generate all possible status codes.

E.g. [status100 .. status200] generates Statuses of 100, 101, 102 .. 198, 199, 200

The statuses not included in this library will have an empty message.

Since: http-types-0.7.3

Instance details

Defined in Network.HTTP.Types.Status

Enum IP 
Instance details

Defined in Data.IP.Addr

Methods

succ :: IP -> IP #

pred :: IP -> IP #

toEnum :: Int -> IP #

fromEnum :: IP -> Int #

enumFrom :: IP -> [IP] #

enumFromThen :: IP -> IP -> [IP] #

enumFromTo :: IP -> IP -> [IP] #

enumFromThenTo :: IP -> IP -> IP -> [IP] #

Enum IPv4 
Instance details

Defined in Data.IP.Addr

Methods

succ :: IPv4 -> IPv4 #

pred :: IPv4 -> IPv4 #

toEnum :: Int -> IPv4 #

fromEnum :: IPv4 -> Int #

enumFrom :: IPv4 -> [IPv4] #

enumFromThen :: IPv4 -> IPv4 -> [IPv4] #

enumFromTo :: IPv4 -> IPv4 -> [IPv4] #

enumFromThenTo :: IPv4 -> IPv4 -> IPv4 -> [IPv4] #

Enum IPv6 
Instance details

Defined in Data.IP.Addr

Methods

succ :: IPv6 -> IPv6 #

pred :: IPv6 -> IPv6 #

toEnum :: Int -> IPv6 #

fromEnum :: IPv6 -> Int #

enumFrom :: IPv6 -> [IPv6] #

enumFromThen :: IPv6 -> IPv6 -> [IPv6] #

enumFromTo :: IPv6 -> IPv6 -> [IPv6] #

enumFromThenTo :: IPv6 -> IPv6 -> IPv6 -> [IPv6] #

Enum PortNumber 
Instance details

Defined in Network.Socket.Types

Enum IsolationLevel 
Instance details

Defined in Database.Persist.SqlBackend.Internal.IsolationLevel

Enum Checkmark 
Instance details

Defined in Database.Persist.Types.Base

Enum VarType 
Instance details

Defined in Text.Shakespeare

Enum Day 
Instance details

Defined in Data.Time.Calendar.Days

Methods

succ :: Day -> Day #

pred :: Day -> Day #

toEnum :: Int -> Day #

fromEnum :: Day -> Int #

enumFrom :: Day -> [Day] #

enumFromThen :: Day -> Day -> [Day] #

enumFromTo :: Day -> Day -> [Day] #

enumFromThenTo :: Day -> Day -> Day -> [Day] #

Enum DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Enum NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Enum Enctype 
Instance details

Defined in Yesod.Form.Types

Enum CompressionStrategy 
Instance details

Defined in Codec.Compression.Zlib.Stream

Enum Format 
Instance details

Defined in Codec.Compression.Zlib.Stream

Enum Method 
Instance details

Defined in Codec.Compression.Zlib.Stream

Enum Integer

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Enum

Enum ()

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

succ :: () -> () #

pred :: () -> () #

toEnum :: Int -> () #

fromEnum :: () -> Int #

enumFrom :: () -> [()] #

enumFromThen :: () -> () -> [()] #

enumFromTo :: () -> () -> [()] #

enumFromThenTo :: () -> () -> () -> [()] #

Enum Bool

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

succ :: Bool -> Bool #

pred :: Bool -> Bool #

toEnum :: Int -> Bool #

fromEnum :: Bool -> Int #

enumFrom :: Bool -> [Bool] #

enumFromThen :: Bool -> Bool -> [Bool] #

enumFromTo :: Bool -> Bool -> [Bool] #

enumFromThenTo :: Bool -> Bool -> Bool -> [Bool] #

Enum Char

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

succ :: Char -> Char #

pred :: Char -> Char #

toEnum :: Int -> Char #

fromEnum :: Char -> Int #

enumFrom :: Char -> [Char] #

enumFromThen :: Char -> Char -> [Char] #

enumFromTo :: Char -> Char -> [Char] #

enumFromThenTo :: Char -> Char -> Char -> [Char] #

Enum Int

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

succ :: Int -> Int #

pred :: Int -> Int #

toEnum :: Int -> Int #

fromEnum :: Int -> Int #

enumFrom :: Int -> [Int] #

enumFromThen :: Int -> Int -> [Int] #

enumFromTo :: Int -> Int -> [Int] #

enumFromThenTo :: Int -> Int -> Int -> [Int] #

Enum Levity

Since: base-4.16.0.0

Instance details

Defined in GHC.Enum

Enum VecCount

Since: base-4.10.0.0

Instance details

Defined in GHC.Enum

Enum VecElem

Since: base-4.10.0.0

Instance details

Defined in GHC.Enum

Enum Word

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

succ :: Word -> Word #

pred :: Word -> Word #

toEnum :: Int -> Word #

fromEnum :: Word -> Int #

enumFrom :: Word -> [Word] #

enumFromThen :: Word -> Word -> [Word] #

enumFromTo :: Word -> Word -> [Word] #

enumFromThenTo :: Word -> Word -> Word -> [Word] #

Enum a => Enum (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

(Enum a, Bounded a, Eq a) => Enum (Down a)

Swaps succ and pred of the underlying type.

Since: base-4.18.0.0

Instance details

Defined in Data.Ord

Methods

succ :: Down a -> Down a #

pred :: Down a -> Down a #

toEnum :: Int -> Down a #

fromEnum :: Down a -> Int #

enumFrom :: Down a -> [Down a] #

enumFromThen :: Down a -> Down a -> [Down a] #

enumFromTo :: Down a -> Down a -> [Down a] #

enumFromThenTo :: Down a -> Down a -> Down a -> [Down a] #

Enum a => Enum (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

succ :: First a -> First a #

pred :: First a -> First a #

toEnum :: Int -> First a #

fromEnum :: First a -> Int #

enumFrom :: First a -> [First a] #

enumFromThen :: First a -> First a -> [First a] #

enumFromTo :: First a -> First a -> [First a] #

enumFromThenTo :: First a -> First a -> First a -> [First a] #

Enum a => Enum (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

succ :: Last a -> Last a #

pred :: Last a -> Last a #

toEnum :: Int -> Last a #

fromEnum :: Last a -> Int #

enumFrom :: Last a -> [Last a] #

enumFromThen :: Last a -> Last a -> [Last a] #

enumFromTo :: Last a -> Last a -> [Last a] #

enumFromThenTo :: Last a -> Last a -> Last a -> [Last a] #

Enum a => Enum (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

succ :: Max a -> Max a #

pred :: Max a -> Max a #

toEnum :: Int -> Max a #

fromEnum :: Max a -> Int #

enumFrom :: Max a -> [Max a] #

enumFromThen :: Max a -> Max a -> [Max a] #

enumFromTo :: Max a -> Max a -> [Max a] #

enumFromThenTo :: Max a -> Max a -> Max a -> [Max a] #

Enum a => Enum (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

succ :: Min a -> Min a #

pred :: Min a -> Min a #

toEnum :: Int -> Min a #

fromEnum :: Min a -> Int #

enumFrom :: Min a -> [Min a] #

enumFromThen :: Min a -> Min a -> [Min a] #

enumFromTo :: Min a -> Min a -> [Min a] #

enumFromThenTo :: Min a -> Min a -> Min a -> [Min a] #

Enum a => Enum (WrappedMonoid a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Integral a => Enum (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

succ :: Ratio a -> Ratio a #

pred :: Ratio a -> Ratio a #

toEnum :: Int -> Ratio a #

fromEnum :: Ratio a -> Int #

enumFrom :: Ratio a -> [Ratio a] #

enumFromThen :: Ratio a -> Ratio a -> [Ratio a] #

enumFromTo :: Ratio a -> Ratio a -> [Ratio a] #

enumFromThenTo :: Ratio a -> Ratio a -> Ratio a -> [Ratio a] #

SizeValid n => Enum (Bits n) 
Instance details

Defined in Basement.Bits

Methods

succ :: Bits n -> Bits n #

pred :: Bits n -> Bits n #

toEnum :: Int -> Bits n #

fromEnum :: Bits n -> Int #

enumFrom :: Bits n -> [Bits n] #

enumFromThen :: Bits n -> Bits n -> [Bits n] #

enumFromTo :: Bits n -> Bits n -> [Bits n] #

enumFromThenTo :: Bits n -> Bits n -> Bits n -> [Bits n] #

Enum (CountOf ty) 
Instance details

Defined in Basement.Types.OffsetSize

Methods

succ :: CountOf ty -> CountOf ty #

pred :: CountOf ty -> CountOf ty #

toEnum :: Int -> CountOf ty #

fromEnum :: CountOf ty -> Int #

enumFrom :: CountOf ty -> [CountOf ty] #

enumFromThen :: CountOf ty -> CountOf ty -> [CountOf ty] #

enumFromTo :: CountOf ty -> CountOf ty -> [CountOf ty] #

enumFromThenTo :: CountOf ty -> CountOf ty -> CountOf ty -> [CountOf ty] #

Enum (Offset ty) 
Instance details

Defined in Basement.Types.OffsetSize

Methods

succ :: Offset ty -> Offset ty #

pred :: Offset ty -> Offset ty #

toEnum :: Int -> Offset ty #

fromEnum :: Offset ty -> Int #

enumFrom :: Offset ty -> [Offset ty] #

enumFromThen :: Offset ty -> Offset ty -> [Offset ty] #

enumFromTo :: Offset ty -> Offset ty -> [Offset ty] #

enumFromThenTo :: Offset ty -> Offset ty -> Offset ty -> [Offset ty] #

(BackendCompatible b s, Enum (BackendKey b)) => Enum (BackendKey (Compatible b s)) 
Instance details

Defined in Database.Persist.Compatible.Types

(PersistCore b, PersistCore (RawSqlite b), Enum (BackendKey b)) => Enum (BackendKey (RawSqlite b)) 
Instance details

Defined in Database.Persist.Sqlite

Enum a => Enum (a) 
Instance details

Defined in GHC.Enum

Methods

succ :: (a) -> (a) #

pred :: (a) -> (a) #

toEnum :: Int -> (a) #

fromEnum :: (a) -> Int #

enumFrom :: (a) -> [(a)] #

enumFromThen :: (a) -> (a) -> [(a)] #

enumFromTo :: (a) -> (a) -> [(a)] #

enumFromThenTo :: (a) -> (a) -> (a) -> [(a)] #

Enum (Fixed a)

Recall that, for numeric types, succ and pred typically add and subtract 1, respectively. This is not true in the case of Fixed, whose successor and predecessor functions intuitively return the "next" and "previous" values in the enumeration. The results of these functions thus depend on the resolution of the Fixed value. For example, when enumerating values of resolution 10^-3 of type Milli = Fixed E3,

  succ (0.000 :: Milli) == 0.001

and likewise

  pred (0.000 :: Milli) == -0.001

In other words, succ and pred increment and decrement a fixed-precision value by the least amount such that the value's resolution is unchanged. For example, 10^-12 is the smallest (positive) amount that can be added to a value of type Pico = Fixed E12 without changing its resolution, and so

  succ (0.000000000000 :: Pico) == 0.000000000001

and similarly

  pred (0.000000000000 :: Pico) == -0.000000000001

This is worth bearing in mind when defining Fixed arithmetic sequences. In particular, you may be forgiven for thinking the sequence

  [1..10] :: [Pico]

evaluates to [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] :: [Pico].

However, this is not true. On the contrary, similarly to the above implementations of succ and pred, enumFromTo :: Pico -> Pico -> [Pico] has a "step size" of 10^-12. Hence, the list [1..10] :: [Pico] has the form

  [1.000000000000, 1.00000000001, 1.00000000002, ..., 10.000000000000]

and contains 9 * 10^12 + 1 values.

Since: base-2.1

Instance details

Defined in Data.Fixed

Methods

succ :: Fixed a -> Fixed a #

pred :: Fixed a -> Fixed a #

toEnum :: Int -> Fixed a #

fromEnum :: Fixed a -> Int #

enumFrom :: Fixed a -> [Fixed a] #

enumFromThen :: Fixed a -> Fixed a -> [Fixed a] #

enumFromTo :: Fixed a -> Fixed a -> [Fixed a] #

enumFromThenTo :: Fixed a -> Fixed a -> Fixed a -> [Fixed a] #

Enum (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

succ :: Proxy s -> Proxy s #

pred :: Proxy s -> Proxy s #

toEnum :: Int -> Proxy s #

fromEnum :: Proxy s -> Int #

enumFrom :: Proxy s -> [Proxy s] #

enumFromThen :: Proxy s -> Proxy s -> [Proxy s] #

enumFromTo :: Proxy s -> Proxy s -> [Proxy s] #

enumFromThenTo :: Proxy s -> Proxy s -> Proxy s -> [Proxy s] #

Enum a => Enum (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

succ :: Const a b -> Const a b #

pred :: Const a b -> Const a b #

toEnum :: Int -> Const a b #

fromEnum :: Const a b -> Int #

enumFrom :: Const a b -> [Const a b] #

enumFromThen :: Const a b -> Const a b -> [Const a b] #

enumFromTo :: Const a b -> Const a b -> [Const a b] #

enumFromThenTo :: Const a b -> Const a b -> Const a b -> [Const a b] #

Enum (f a) => Enum (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

succ :: Ap f a -> Ap f a #

pred :: Ap f a -> Ap f a #

toEnum :: Int -> Ap f a #

fromEnum :: Ap f a -> Int #

enumFrom :: Ap f a -> [Ap f a] #

enumFromThen :: Ap f a -> Ap f a -> [Ap f a] #

enumFromTo :: Ap f a -> Ap f a -> [Ap f a] #

enumFromThenTo :: Ap f a -> Ap f a -> Ap f a -> [Ap f a] #

Enum (f a) => Enum (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

succ :: Alt f a -> Alt f a #

pred :: Alt f a -> Alt f a #

toEnum :: Int -> Alt f a #

fromEnum :: Alt f a -> Int #

enumFrom :: Alt f a -> [Alt f a] #

enumFromThen :: Alt f a -> Alt f a -> [Alt f a] #

enumFromTo :: Alt f a -> Alt f a -> [Alt f a] #

enumFromThenTo :: Alt f a -> Alt f a -> Alt f a -> [Alt f a] #

Enum a => Enum (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

succ :: Tagged s a -> Tagged s a #

pred :: Tagged s a -> Tagged s a #

toEnum :: Int -> Tagged s a #

fromEnum :: Tagged s a -> Int #

enumFrom :: Tagged s a -> [Tagged s a] #

enumFromThen :: Tagged s a -> Tagged s a -> [Tagged s a] #

enumFromTo :: Tagged s a -> Tagged s a -> [Tagged s a] #

enumFromThenTo :: Tagged s a -> Tagged s a -> Tagged s a -> [Tagged s a] #

class (Real a, Fractional a) => RealFrac a where #

Extracting components of fractions.

Minimal complete definition

properFraction

Methods

properFraction :: Integral b => a -> (b, a) #

The function properFraction takes a real fractional number x and returns a pair (n,f) such that x = n+f, and:

  • n is an integral number with the same sign as x; and
  • f is a fraction with the same type and sign as x, and with absolute value less than 1.

The default definitions of the ceiling, floor, truncate and round functions are in terms of properFraction.

truncate :: Integral b => a -> b #

truncate x returns the integer nearest x between zero and x

round :: Integral b => a -> b #

round x returns the nearest integer to x; the even integer if x is equidistant between two integers

ceiling :: Integral b => a -> b #

ceiling x returns the least integer not less than x

floor :: Integral b => a -> b #

floor x returns the greatest integer not greater than x

Instances

Instances details
RealFrac CDouble 
Instance details

Defined in Foreign.C.Types

Methods

properFraction :: Integral b => CDouble -> (b, CDouble) #

truncate :: Integral b => CDouble -> b #

round :: Integral b => CDouble -> b #

ceiling :: Integral b => CDouble -> b #

floor :: Integral b => CDouble -> b #

RealFrac CFloat 
Instance details

Defined in Foreign.C.Types

Methods

properFraction :: Integral b => CFloat -> (b, CFloat) #

truncate :: Integral b => CFloat -> b #

round :: Integral b => CFloat -> b #

ceiling :: Integral b => CFloat -> b #

floor :: Integral b => CFloat -> b #

RealFrac Scientific

WARNING: the methods of the RealFrac instance need to compute the magnitude 10^e. If applied to a huge exponent this could take a long time. Even worse, when the destination type is unbounded (i.e. Integer) it could fill up all space and crash your program!

Instance details

Defined in Data.Scientific

RealFrac DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Methods

properFraction :: Integral b => DiffTime -> (b, DiffTime) #

truncate :: Integral b => DiffTime -> b #

round :: Integral b => DiffTime -> b #

ceiling :: Integral b => DiffTime -> b #

floor :: Integral b => DiffTime -> b #

RealFrac NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

RealFrac a => RealFrac (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Methods

properFraction :: Integral b => Identity a -> (b, Identity a) #

truncate :: Integral b => Identity a -> b #

round :: Integral b => Identity a -> b #

ceiling :: Integral b => Identity a -> b #

floor :: Integral b => Identity a -> b #

RealFrac a => RealFrac (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

properFraction :: Integral b => Down a -> (b, Down a) #

truncate :: Integral b => Down a -> b #

round :: Integral b => Down a -> b #

ceiling :: Integral b => Down a -> b #

floor :: Integral b => Down a -> b #

Integral a => RealFrac (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

properFraction :: Integral b => Ratio a -> (b, Ratio a) #

truncate :: Integral b => Ratio a -> b #

round :: Integral b => Ratio a -> b #

ceiling :: Integral b => Ratio a -> b #

floor :: Integral b => Ratio a -> b #

HasResolution a => RealFrac (Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Methods

properFraction :: Integral b => Fixed a -> (b, Fixed a) #

truncate :: Integral b => Fixed a -> b #

round :: Integral b => Fixed a -> b #

ceiling :: Integral b => Fixed a -> b #

floor :: Integral b => Fixed a -> b #

RealFrac a => RealFrac (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

properFraction :: Integral b0 => Const a b -> (b0, Const a b) #

truncate :: Integral b0 => Const a b -> b0 #

round :: Integral b0 => Const a b -> b0 #

ceiling :: Integral b0 => Const a b -> b0 #

floor :: Integral b0 => Const a b -> b0 #

RealFrac a => RealFrac (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

properFraction :: Integral b => Tagged s a -> (b, Tagged s a) #

truncate :: Integral b => Tagged s a -> b #

round :: Integral b => Tagged s a -> b #

ceiling :: Integral b => Tagged s a -> b #

floor :: Integral b => Tagged s a -> b #

class (Real a, Enum a) => Integral a where #

Integral numbers, supporting integer division.

The Haskell Report defines no laws for Integral. However, Integral instances are customarily expected to define a Euclidean domain and have the following properties for the div/mod and quot/rem pairs, given suitable Euclidean functions f and g:

  • x = y * quot x y + rem x y with rem x y = fromInteger 0 or g (rem x y) < g y
  • x = y * div x y + mod x y with mod x y = fromInteger 0 or f (mod x y) < f y

An example of a suitable Euclidean function, for Integer's instance, is abs.

In addition, toInteger should be total, and fromInteger should be a left inverse for it, i.e. fromInteger (toInteger i) = i.

Minimal complete definition

quotRem, toInteger

Methods

quot :: a -> a -> a infixl 7 #

integer division truncated toward zero

WARNING: This function is partial (because it throws when 0 is passed as the divisor) for all the integer types in base.

rem :: a -> a -> a infixl 7 #

integer remainder, satisfying

(x `quot` y)*y + (x `rem` y) == x

WARNING: This function is partial (because it throws when 0 is passed as the divisor) for all the integer types in base.

div :: a -> a -> a infixl 7 #

integer division truncated toward negative infinity

WARNING: This function is partial (because it throws when 0 is passed as the divisor) for all the integer types in base.

mod :: a -> a -> a infixl 7 #

integer modulus, satisfying

(x `div` y)*y + (x `mod` y) == x

WARNING: This function is partial (because it throws when 0 is passed as the divisor) for all the integer types in base.

quotRem :: a -> a -> (a, a) #

simultaneous quot and rem

WARNING: This function is partial (because it throws when 0 is passed as the divisor) for all the integer types in base.

divMod :: a -> a -> (a, a) #

simultaneous div and mod

WARNING: This function is partial (because it throws when 0 is passed as the divisor) for all the integer types in base.

toInteger :: a -> Integer #

conversion to Integer

Instances

Instances details
Integral CBool 
Instance details

Defined in Foreign.C.Types

Integral CChar 
Instance details

Defined in Foreign.C.Types

Integral CInt 
Instance details

Defined in Foreign.C.Types

Methods

quot :: CInt -> CInt -> CInt #

rem :: CInt -> CInt -> CInt #

div :: CInt -> CInt -> CInt #

mod :: CInt -> CInt -> CInt #

quotRem :: CInt -> CInt -> (CInt, CInt) #

divMod :: CInt -> CInt -> (CInt, CInt) #

toInteger :: CInt -> Integer #

Integral CIntMax 
Instance details

Defined in Foreign.C.Types

Integral CIntPtr 
Instance details

Defined in Foreign.C.Types

Integral CLLong 
Instance details

Defined in Foreign.C.Types

Integral CLong 
Instance details

Defined in Foreign.C.Types

Integral CPtrdiff 
Instance details

Defined in Foreign.C.Types

Integral CSChar 
Instance details

Defined in Foreign.C.Types

Integral CShort 
Instance details

Defined in Foreign.C.Types

Integral CSigAtomic 
Instance details

Defined in Foreign.C.Types

Integral CSize 
Instance details

Defined in Foreign.C.Types

Integral CUChar 
Instance details

Defined in Foreign.C.Types

Integral CUInt 
Instance details

Defined in Foreign.C.Types

Integral CUIntMax 
Instance details

Defined in Foreign.C.Types

Integral CUIntPtr 
Instance details

Defined in Foreign.C.Types

Integral CULLong 
Instance details

Defined in Foreign.C.Types

Integral CULong 
Instance details

Defined in Foreign.C.Types

Integral CUShort 
Instance details

Defined in Foreign.C.Types

Integral CWchar 
Instance details

Defined in Foreign.C.Types

Integral Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Integral Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Integral Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Integral Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

quot :: Int8 -> Int8 -> Int8 #

rem :: Int8 -> Int8 -> Int8 #

div :: Int8 -> Int8 -> Int8 #

mod :: Int8 -> Int8 -> Int8 #

quotRem :: Int8 -> Int8 -> (Int8, Int8) #

divMod :: Int8 -> Int8 -> (Int8, Int8) #

toInteger :: Int8 -> Integer #

Integral Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Integral Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Integral Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Integral Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Integral PortNumber 
Instance details

Defined in Network.Socket.Types

Integral Integer

Since: base-2.0.1

Instance details

Defined in GHC.Real

Integral Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Real

Integral Int

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

quot :: Int -> Int -> Int #

rem :: Int -> Int -> Int #

div :: Int -> Int -> Int #

mod :: Int -> Int -> Int #

quotRem :: Int -> Int -> (Int, Int) #

divMod :: Int -> Int -> (Int, Int) #

toInteger :: Int -> Integer #

Integral Word

Since: base-2.1

Instance details

Defined in GHC.Real

Methods

quot :: Word -> Word -> Word #

rem :: Word -> Word -> Word #

div :: Word -> Word -> Word #

mod :: Word -> Word -> Word #

quotRem :: Word -> Word -> (Word, Word) #

divMod :: Word -> Word -> (Word, Word) #

toInteger :: Word -> Integer #

Integral a => Integral (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

(BackendCompatible b s, Integral (BackendKey b)) => Integral (BackendKey (Compatible b s)) 
Instance details

Defined in Database.Persist.Compatible.Types

(PersistCore b, PersistCore (RawSqlite b), Integral (BackendKey b)) => Integral (BackendKey (RawSqlite b)) 
Instance details

Defined in Database.Persist.Sqlite

Integral a => Integral (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

quot :: Const a b -> Const a b -> Const a b #

rem :: Const a b -> Const a b -> Const a b #

div :: Const a b -> Const a b -> Const a b #

mod :: Const a b -> Const a b -> Const a b #

quotRem :: Const a b -> Const a b -> (Const a b, Const a b) #

divMod :: Const a b -> Const a b -> (Const a b, Const a b) #

toInteger :: Const a b -> Integer #

Integral a => Integral (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

quot :: Tagged s a -> Tagged s a -> Tagged s a #

rem :: Tagged s a -> Tagged s a -> Tagged s a #

div :: Tagged s a -> Tagged s a -> Tagged s a #

mod :: Tagged s a -> Tagged s a -> Tagged s a #

quotRem :: Tagged s a -> Tagged s a -> (Tagged s a, Tagged s a) #

divMod :: Tagged s a -> Tagged s a -> (Tagged s a, Tagged s a) #

toInteger :: Tagged s a -> Integer #

class Read a #

Parsing of Strings, producing values.

Derived instances of Read make the following assumptions, which derived instances of Show obey:

  • If the constructor is defined to be an infix operator, then the derived Read instance will parse only infix applications of the constructor (not the prefix form).
  • Associativity is not used to reduce the occurrence of parentheses, although precedence may be.
  • If the constructor is defined using record syntax, the derived Read will parse only the record-syntax form, and furthermore, the fields must be given in the same order as the original declaration.
  • The derived Read instance allows arbitrary Haskell whitespace between tokens of the input string. Extra parentheses are also allowed.

For example, given the declarations

infixr 5 :^:
data Tree a =  Leaf a  |  Tree a :^: Tree a

the derived instance of Read in Haskell 2010 is equivalent to

instance (Read a) => Read (Tree a) where

        readsPrec d r =  readParen (d > app_prec)
                         (\r -> [(Leaf m,t) |
                                 ("Leaf",s) <- lex r,
                                 (m,t) <- readsPrec (app_prec+1) s]) r

                      ++ readParen (d > up_prec)
                         (\r -> [(u:^:v,w) |
                                 (u,s) <- readsPrec (up_prec+1) r,
                                 (":^:",t) <- lex s,
                                 (v,w) <- readsPrec (up_prec+1) t]) r

          where app_prec = 10
                up_prec = 5

Note that right-associativity of :^: is unused.

The derived instance in GHC is equivalent to

instance (Read a) => Read (Tree a) where

        readPrec = parens $ (prec app_prec $ do
                                 Ident "Leaf" <- lexP
                                 m <- step readPrec
                                 return (Leaf m))

                     +++ (prec up_prec $ do
                                 u <- step readPrec
                                 Symbol ":^:" <- lexP
                                 v <- step readPrec
                                 return (u :^: v))

          where app_prec = 10
                up_prec = 5

        readListPrec = readListPrecDefault

Why do both readsPrec and readPrec exist, and why does GHC opt to implement readPrec in derived Read instances instead of readsPrec? The reason is that readsPrec is based on the ReadS type, and although ReadS is mentioned in the Haskell 2010 Report, it is not a very efficient parser data structure.

readPrec, on the other hand, is based on a much more efficient ReadPrec datatype (a.k.a "new-style parsers"), but its definition relies on the use of the RankNTypes language extension. Therefore, readPrec (and its cousin, readListPrec) are marked as GHC-only. Nevertheless, it is recommended to use readPrec instead of readsPrec whenever possible for the efficiency improvements it brings.

As mentioned above, derived Read instances in GHC will implement readPrec instead of readsPrec. The default implementations of readsPrec (and its cousin, readList) will simply use readPrec under the hood. If you are writing a Read instance by hand, it is recommended to write it like so:

instance Read T where
  readPrec     = ...
  readListPrec = readListPrecDefault

Minimal complete definition

readsPrec | readPrec

Instances

Instances details
Read Key 
Instance details

Defined in Data.Aeson.Key

Read DotNetTime 
Instance details

Defined in Data.Aeson.Types.Internal

Read Value 
Instance details

Defined in Data.Aeson.Types.Internal

Read All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Read Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Read Version

Since: base-2.1

Instance details

Defined in Data.Version

Read CBool 
Instance details

Defined in Foreign.C.Types

Read CChar 
Instance details

Defined in Foreign.C.Types

Read CClock 
Instance details

Defined in Foreign.C.Types

Read CDouble 
Instance details

Defined in Foreign.C.Types

Read CFloat 
Instance details

Defined in Foreign.C.Types

Read CInt 
Instance details

Defined in Foreign.C.Types

Read CIntMax 
Instance details

Defined in Foreign.C.Types

Read CIntPtr 
Instance details

Defined in Foreign.C.Types

Read CLLong 
Instance details

Defined in Foreign.C.Types

Read CLong 
Instance details

Defined in Foreign.C.Types

Read CPtrdiff 
Instance details

Defined in Foreign.C.Types

Read CSChar 
Instance details

Defined in Foreign.C.Types

Read CSUSeconds 
Instance details

Defined in Foreign.C.Types

Read CShort 
Instance details

Defined in Foreign.C.Types

Read CSigAtomic 
Instance details

Defined in Foreign.C.Types

Read CSize 
Instance details

Defined in Foreign.C.Types

Read CTime 
Instance details

Defined in Foreign.C.Types

Read CUChar 
Instance details

Defined in Foreign.C.Types

Read CUInt 
Instance details

Defined in Foreign.C.Types

Read CUIntMax 
Instance details

Defined in Foreign.C.Types

Read CUIntPtr 
Instance details

Defined in Foreign.C.Types

Read CULLong 
Instance details

Defined in Foreign.C.Types

Read CULong 
Instance details

Defined in Foreign.C.Types

Read CUSeconds 
Instance details

Defined in Foreign.C.Types

Read CUShort 
Instance details

Defined in Foreign.C.Types

Read CWchar 
Instance details

Defined in Foreign.C.Types

Read Void

Reading a Void value is always a parse error, considering Void as a data type with no constructors.

Since: base-4.8.0.0

Instance details

Defined in GHC.Read

Read ByteOrder

Since: base-4.11.0.0

Instance details

Defined in GHC.ByteOrder

Read Associativity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Read DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Read Fixity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Read SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Read SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Read SeekMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Device

Read ExitCode 
Instance details

Defined in GHC.IO.Exception

Read BufferMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Handle.Types

Read Newline

Since: base-4.3.0.0

Instance details

Defined in GHC.IO.Handle.Types

Read NewlineMode

Since: base-4.3.0.0

Instance details

Defined in GHC.IO.Handle.Types

Read IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

Read Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Read Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Read Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Read Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Read GCDetails

Since: base-4.10.0.0

Instance details

Defined in GHC.Stats

Read RTSStats

Since: base-4.10.0.0

Instance details

Defined in GHC.Stats

Read SomeChar 
Instance details

Defined in GHC.TypeLits

Read SomeSymbol

Since: base-4.7.0.0

Instance details

Defined in GHC.TypeLits

Read SomeNat

Since: base-4.7.0.0

Instance details

Defined in GHC.TypeNats

Read GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Read

Read Word16

Since: base-2.1

Instance details

Defined in GHC.Read

Read Word32

Since: base-2.1

Instance details

Defined in GHC.Read

Read Word64

Since: base-2.1

Instance details

Defined in GHC.Read

Read Word8

Since: base-2.1

Instance details

Defined in GHC.Read

Read Lexeme

Since: base-2.1

Instance details

Defined in GHC.Read

Read ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

Read ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Read ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Read IntSet 
Instance details

Defined in Data.IntSet.Internal

Read EmailAddress 
Instance details

Defined in Text.Email.Parser

Read NoteForm Source # 
Instance details

Defined in Handler.Notes

Read AccountSettingsForm Source # 
Instance details

Defined in Model

Read BookmarkForm Source # 
Instance details

Defined in Model

Read FilterP Source # 
Instance details

Defined in Model

Read SharedP Source # 
Instance details

Defined in Model

Read TagCloudMode Source # 
Instance details

Defined in Model

Read TagsP Source # 
Instance details

Defined in Model

Read UTCTimeStr Source # 
Instance details

Defined in Model

Read UnreadOnly Source # 
Instance details

Defined in Model

Read UserNameP Source # 
Instance details

Defined in Model

Read BmSlug Source # 
Instance details

Defined in ModelCustom

Read NtSlug Source # 
Instance details

Defined in ModelCustom

Read Ordering

Since: base-2.1

Instance details

Defined in GHC.Read

Read Colour 
Instance details

Defined in Language.Haskell.HsColour.ColourHighlight

Read Highlight 
Instance details

Defined in Language.Haskell.HsColour.ColourHighlight

Read ColourPrefs 
Instance details

Defined in Language.Haskell.HsColour.Colourise

Read Form 
Instance details

Defined in Web.Internal.FormUrlEncoded

Read Cookie 
Instance details

Defined in Network.HTTP.Client.Types

Read CookieJar 
Instance details

Defined in Network.HTTP.Client.Types

Read Proxy 
Instance details

Defined in Network.HTTP.Client.Types

Read ProxySecureMode 
Instance details

Defined in Network.HTTP.Client.Types

Read DigestAuthExceptionDetails 
Instance details

Defined in Network.HTTP.Client.TLS

Read StdMethod 
Instance details

Defined in Network.HTTP.Types.Method

Read IP 
Instance details

Defined in Data.IP.Addr

Read IPv4 
Instance details

Defined in Data.IP.Addr

Read IPv6 
Instance details

Defined in Data.IP.Addr

Read IPRange 
Instance details

Defined in Data.IP.Range

Read LogLevel 
Instance details

Defined in Control.Monad.Logger

Read AddrInfoFlag 
Instance details

Defined in Network.Socket.Info

Read NameInfoFlag 
Instance details

Defined in Network.Socket.Info

Read Family 
Instance details

Defined in Network.Socket.Types

Read PortNumber 
Instance details

Defined in Network.Socket.Types

Read SocketType 
Instance details

Defined in Network.Socket.Types

Read ConstraintNameDB 
Instance details

Defined in Database.Persist.Names

Read ConstraintNameHS 
Instance details

Defined in Database.Persist.Names

Read EntityNameDB 
Instance details

Defined in Database.Persist.Names

Read EntityNameHS 
Instance details

Defined in Database.Persist.Names

Read FieldNameDB 
Instance details

Defined in Database.Persist.Names

Read FieldNameHS 
Instance details

Defined in Database.Persist.Names

Read LiteralType 
Instance details

Defined in Database.Persist.PersistValue

Read PersistValue 
Instance details

Defined in Database.Persist.PersistValue

Read CascadeAction 
Instance details

Defined in Database.Persist.Types.Base

Read Checkmark 
Instance details

Defined in Database.Persist.Types.Base

Read CompositeDef 
Instance details

Defined in Database.Persist.Types.Base

Read EmbedEntityDef 
Instance details

Defined in Database.Persist.Types.Base

Read EmbedFieldDef 
Instance details

Defined in Database.Persist.Types.Base

Read EntityDef 
Instance details

Defined in Database.Persist.Types.Base

Read EntityIdDef 
Instance details

Defined in Database.Persist.Types.Base

Read FieldAttr 
Instance details

Defined in Database.Persist.Types.Base

Read FieldCascade 
Instance details

Defined in Database.Persist.Types.Base

Read FieldDef 
Instance details

Defined in Database.Persist.Types.Base

Read FieldType 
Instance details

Defined in Database.Persist.Types.Base

Read FieldTypeLit 
Instance details

Defined in Database.Persist.Types.Base

Read ForeignDef 
Instance details

Defined in Database.Persist.Types.Base

Read PersistFilter 
Instance details

Defined in Database.Persist.Types.Base

Read PersistUpdate 
Instance details

Defined in Database.Persist.Types.Base

Read ReferenceDef 
Instance details

Defined in Database.Persist.Types.Base

Read SelfEmbed 
Instance details

Defined in Database.Persist.Types.Base

Methods

readsPrec :: Int -> ReadS SelfEmbed #

readList :: ReadS [SelfEmbed] #

readPrec :: ReadPrec SelfEmbed #

readListPrec :: ReadPrec [SelfEmbed] #

Read SqlType 
Instance details

Defined in Database.Persist.Types.Base

Read UniqueDef 
Instance details

Defined in Database.Persist.Types.Base

Read Scientific

Supports the skipping of parentheses and whitespaces. Example:

> read " ( ((  -1.0e+3 ) ))" :: Scientific
-1000.0

(Note: This Read instance makes internal use of scientificP to parse the floating-point number.)

Instance details

Defined in Data.Scientific

Read Binding 
Instance details

Defined in Text.Hamlet.Parse

Methods

readsPrec :: Int -> ReadS Binding #

readList :: ReadS [Binding] #

readPrec :: ReadPrec Binding #

readListPrec :: ReadPrec [Binding] #

Read Content 
Instance details

Defined in Text.Hamlet.Parse

Methods

readsPrec :: Int -> ReadS Content #

readList :: ReadS [Content] #

readPrec :: ReadPrec Content #

readListPrec :: ReadPrec [Content] #

Read DataConstr 
Instance details

Defined in Text.Hamlet.Parse

Methods

readsPrec :: Int -> ReadS DataConstr #

readList :: ReadS [DataConstr] #

readPrec :: ReadPrec DataConstr #

readListPrec :: ReadPrec [DataConstr] #

Read Doc 
Instance details

Defined in Text.Hamlet.Parse

Methods

readsPrec :: Int -> ReadS Doc #

readList :: ReadS [Doc] #

readPrec :: ReadPrec Doc #

readListPrec :: ReadPrec [Doc] #

Read Line 
Instance details

Defined in Text.Hamlet.Parse

Methods

readsPrec :: Int -> ReadS Line #

readList :: ReadS [Line] #

readPrec :: ReadPrec Line #

readListPrec :: ReadPrec [Line] #

Read Module 
Instance details

Defined in Text.Hamlet.Parse

Methods

readsPrec :: Int -> ReadS Module #

readList :: ReadS [Module] #

readPrec :: ReadPrec Module #

readListPrec :: ReadPrec [Module] #

Read Deref 
Instance details

Defined in Text.Shakespeare.Base

Read Ident 
Instance details

Defined in Text.Shakespeare.Base

Read HostPreference 
Instance details

Defined in Data.Streaming.Network.Internal

Read ShortText 
Instance details

Defined in Data.Text.Short.Internal

Read DatatypeVariant 
Instance details

Defined in Language.Haskell.TH.Datatype

Read DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Read NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Read UUID 
Instance details

Defined in Data.UUID.Types.Internal

Read UnpackedUUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

readsPrec :: Int -> ReadS UnpackedUUID #

readList :: ReadS [UnpackedUUID] #

readPrec :: ReadPrec UnpackedUUID #

readListPrec :: ReadPrec [UnpackedUUID] #

Read GzipFiles 
Instance details

Defined in Network.Wai.Middleware.Gzip

Read AuthResult 
Instance details

Defined in Yesod.Core.Types

Read SessionCookie 
Instance details

Defined in Yesod.Core.Types

Read Textarea 
Instance details

Defined in Yesod.Form.Fields

Read FormMessage 
Instance details

Defined in Yesod.Form.Types

Read DictionaryHash 
Instance details

Defined in Codec.Compression.Zlib.Stream

Methods

readsPrec :: Int -> ReadS DictionaryHash #

readList :: ReadS [DictionaryHash] #

readPrec :: ReadPrec DictionaryHash #

readListPrec :: ReadPrec [DictionaryHash] #

Read Integer

Since: base-2.1

Instance details

Defined in GHC.Read

Read Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Read

Read ()

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS () #

readList :: ReadS [()] #

readPrec :: ReadPrec () #

readListPrec :: ReadPrec [()] #

Read Bool

Since: base-2.1

Instance details

Defined in GHC.Read

Read Char

Since: base-2.1

Instance details

Defined in GHC.Read

Read Double

Since: base-2.1

Instance details

Defined in GHC.Read

Read Float

Since: base-2.1

Instance details

Defined in GHC.Read

Read Int

Since: base-2.1

Instance details

Defined in GHC.Read

Read Word

Since: base-4.5.0.0

Instance details

Defined in GHC.Read

Read v => Read (KeyMap v) 
Instance details

Defined in Data.Aeson.KeyMap

Read a => Read (ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Read a => Read (Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Read a => Read (Identity a)

This instance would be equivalent to the derived instances of the Identity newtype if the runIdentity field were removed

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Read a => Read (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Read a => Read (Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Read a => Read (Down a)

This instance would be equivalent to the derived instances of the Down newtype if the getDown field were removed

Since: base-4.7.0.0

Instance details

Defined in Data.Ord

Read a => Read (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Read a => Read (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Read a => Read (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Read a => Read (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Read m => Read (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Read a => Read (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Read a => Read (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Read a => Read (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Read a => Read (NonEmpty a)

Since: base-4.11.0.0

Instance details

Defined in GHC.Read

Read p => Read (Par1 p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

(Integral a, Read a) => Read (Ratio a)

Since: base-2.1

Instance details

Defined in GHC.Read

(Read s, FoldCase s) => Read (CI s) 
Instance details

Defined in Data.CaseInsensitive.Internal

Read e => Read (IntMap e) 
Instance details

Defined in Data.IntMap.Internal

Read a => Read (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Read a => Read (ViewL a) 
Instance details

Defined in Data.Sequence.Internal

Read a => Read (ViewR a) 
Instance details

Defined in Data.Sequence.Internal

(Read a, Ord a) => Read (Set a) 
Instance details

Defined in Data.Set.Internal

Read a => Read (Tree a) 
Instance details

Defined in Data.Tree

HashAlgorithm a => Read (Digest a) 
Instance details

Defined in Crypto.Hash.Types

HashAlgorithm a => Read (Digest a) 
Instance details

Defined in Crypto.Hash.Types

Read1 f => Read (Fix f) 
Instance details

Defined in Data.Fix

(Functor f, Read1 f) => Read (Mu f) 
Instance details

Defined in Data.Fix

(Functor f, Read1 f) => Read (Nu f) 
Instance details

Defined in Data.Fix

Read a => Read (DNonEmpty a) 
Instance details

Defined in Data.DList.DNonEmpty.Internal

Read a => Read (DList a) 
Instance details

Defined in Data.DList.Internal

Read a => Read (LenientData a) 
Instance details

Defined in Web.Internal.HttpApiData

Read (AddrRange IPv4) 
Instance details

Defined in Data.IP.Range

Read (AddrRange IPv6) 
Instance details

Defined in Data.IP.Range

Read mono => Read (NonNull mono) 
Instance details

Defined in Data.NonNull

(Read (Key record), Read record) => Read (Entity record) 
Instance details

Defined in Database.Persist.Class.PersistEntity

Methods

readsPrec :: Int -> ReadS (Entity record) #

readList :: ReadS [Entity record] #

readPrec :: ReadPrec (Entity record) #

readListPrec :: ReadPrec [Entity record] #

Read (Key Bookmark) Source # 
Instance details

Defined in Model

Read (Key BookmarkTag) Source # 
Instance details

Defined in Model

Read (Key Note) Source # 
Instance details

Defined in Model

Read (Key User) Source # 
Instance details

Defined in Model

(BackendCompatible b s, Read (BackendKey b)) => Read (BackendKey (Compatible b s)) 
Instance details

Defined in Database.Persist.Compatible.Types

(PersistCore b, PersistCore (RawSqlite b), Read (BackendKey b)) => Read (BackendKey (RawSqlite b)) 
Instance details

Defined in Database.Persist.Sqlite

Read a => Read (Single a) 
Instance details

Defined in Database.Persist.Sql.Types

Read a => Read (Array a) 
Instance details

Defined in Data.Primitive.Array

Read a => Read (SmallArray a) 
Instance details

Defined in Data.Primitive.SmallArray

Read v => Read (Result v) 
Instance details

Defined in Text.Hamlet.Parse

Methods

readsPrec :: Int -> ReadS (Result v) #

readList :: ReadS [Result v] #

readPrec :: ReadPrec (Result v) #

readListPrec :: ReadPrec [Result v] #

Read a => Read (Maybe a) 
Instance details

Defined in Data.Strict.Maybe

(Eq a, Hashable a, Read a) => Read (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Read a => Read (Vector a) 
Instance details

Defined in Data.Vector

(Read a, Prim a) => Read (Vector a) 
Instance details

Defined in Data.Vector.Primitive

(Read a, Storable a) => Read (Vector a) 
Instance details

Defined in Data.Vector.Storable

Read (Route App) Source # 
Instance details

Defined in Foundation

Read (Route Auth) 
Instance details

Defined in Yesod.Auth.Routes

Read (Route LiteApp) 
Instance details

Defined in Yesod.Core.Internal.LiteApp

Read (Route WaiSubsite) 
Instance details

Defined in Yesod.Core.Types

Read (Route WaiSubsiteWithAuth) 
Instance details

Defined in Yesod.Core.Types

Read (Route Static) 
Instance details

Defined in Yesod.Static

Read a => Read (Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Read

Read a => Read (a)

Since: base-4.15

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a) #

readList :: ReadS [(a)] #

readPrec :: ReadPrec (a) #

readListPrec :: ReadPrec [(a)] #

Read a => Read [a]

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS [a] #

readList :: ReadS [[a]] #

readPrec :: ReadPrec [a] #

readListPrec :: ReadPrec [[a]] #

(Read a, Read b) => Read (Either a b)

Since: base-3.0

Instance details

Defined in Data.Either

HasResolution a => Read (Fixed a)

Since: base-4.3.0.0

Instance details

Defined in Data.Fixed

Read (Proxy t)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

(Read a, Read b) => Read (Arg a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

readsPrec :: Int -> ReadS (Arg a b) #

readList :: ReadS [Arg a b] #

readPrec :: ReadPrec (Arg a b) #

readListPrec :: ReadPrec [Arg a b] #

(Ix a, Read a, Read b) => Read (Array a b)

Since: base-2.1

Instance details

Defined in GHC.Read

Read (U1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Read (V1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

(Ord k, Read k, Read e) => Read (Map k e) 
Instance details

Defined in Data.Map.Internal

Methods

readsPrec :: Int -> ReadS (Map k e) #

readList :: ReadS [Map k e] #

readPrec :: ReadPrec (Map k e) #

readListPrec :: ReadPrec [Map k e] #

(Read1 f, Read a) => Read (Cofree f a) 
Instance details

Defined in Control.Comonad.Cofree

(Read1 f, Read a) => Read (Free f a) 
Instance details

Defined in Control.Monad.Free

Methods

readsPrec :: Int -> ReadS (Free f a) #

readList :: ReadS [Free f a] #

readPrec :: ReadPrec (Free f a) #

readListPrec :: ReadPrec [Free f a] #

(Read a, Read b) => Read (Either a b) 
Instance details

Defined in Data.Strict.Either

(Read a, Read b) => Read (These a b) 
Instance details

Defined in Data.Strict.These

(Read a, Read b) => Read (Pair a b) 
Instance details

Defined in Data.Strict.Tuple

Methods

readsPrec :: Int -> ReadS (Pair a b) #

readList :: ReadS [Pair a b] #

readPrec :: ReadPrec (Pair a b) #

readListPrec :: ReadPrec [Pair a b] #

(Read a, Read b) => Read (These a b) 
Instance details

Defined in Data.These

(Read1 f, Read a) => Read (Lift f a) 
Instance details

Defined in Control.Applicative.Lift

Methods

readsPrec :: Int -> ReadS (Lift f a) #

readList :: ReadS [Lift f a] #

readPrec :: ReadPrec (Lift f a) #

readListPrec :: ReadPrec [Lift f a] #

(Read1 m, Read a) => Read (MaybeT m a) 
Instance details

Defined in Control.Monad.Trans.Maybe

(Eq k, Hashable k, Read k, Read e) => Read (HashMap k e) 
Instance details

Defined in Data.HashMap.Internal

(Read a, Read b) => Read (a, b)

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a, b) #

readList :: ReadS [(a, b)] #

readPrec :: ReadPrec (a, b) #

readListPrec :: ReadPrec [(a, b)] #

Read a => Read (Const a b)

This instance would be equivalent to the derived instances of the Const newtype if the getConst field were removed

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Const

Read (f a) => Read (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

readsPrec :: Int -> ReadS (Ap f a) #

readList :: ReadS [Ap f a] #

readPrec :: ReadPrec (Ap f a) #

readListPrec :: ReadPrec [Ap f a] #

Read (f a) => Read (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

readsPrec :: Int -> ReadS (Alt f a) #

readList :: ReadS [Alt f a] #

readPrec :: ReadPrec (Alt f a) #

readListPrec :: ReadPrec [Alt f a] #

Read (f p) => Read (Rec1 f p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

readsPrec :: Int -> ReadS (Rec1 f p) #

readList :: ReadS [Rec1 f p] #

readPrec :: ReadPrec (Rec1 f p) #

readListPrec :: ReadPrec [Rec1 f p] #

Read (p a a) => Read (Join p a) 
Instance details

Defined in Data.Bifunctor.Join

Methods

readsPrec :: Int -> ReadS (Join p a) #

readList :: ReadS [Join p a] #

readPrec :: ReadPrec (Join p a) #

readListPrec :: ReadPrec [Join p a] #

(Read a, Read (f b)) => Read (FreeF f a b) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

readsPrec :: Int -> ReadS (FreeF f a b) #

readList :: ReadS [FreeF f a b] #

readPrec :: ReadPrec (FreeF f a b) #

readListPrec :: ReadPrec [FreeF f a b] #

(Read1 f, Read1 m, Read a) => Read (FreeT f m a) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

readsPrec :: Int -> ReadS (FreeT f m a) #

readList :: ReadS [FreeT f m a] #

readPrec :: ReadPrec (FreeT f m a) #

readListPrec :: ReadPrec [FreeT f m a] #

Read b => Read (Tagged s b) 
Instance details

Defined in Data.Tagged

(Read (f a), Read (g a), Read a) => Read (These1 f g a) 
Instance details

Defined in Data.Functor.These

Methods

readsPrec :: Int -> ReadS (These1 f g a) #

readList :: ReadS [These1 f g a] #

readPrec :: ReadPrec (These1 f g a) #

readListPrec :: ReadPrec [These1 f g a] #

(Read1 f, Read a) => Read (Backwards f a) 
Instance details

Defined in Control.Applicative.Backwards

(Read e, Read1 m, Read a) => Read (ExceptT e m a) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

readsPrec :: Int -> ReadS (ExceptT e m a) #

readList :: ReadS [ExceptT e m a] #

readPrec :: ReadPrec (ExceptT e m a) #

readListPrec :: ReadPrec [ExceptT e m a] #

(Read1 f, Read a) => Read (IdentityT f a) 
Instance details

Defined in Control.Monad.Trans.Identity

(Read w, Read1 m, Read a) => Read (WriterT w m a) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

readsPrec :: Int -> ReadS (WriterT w m a) #

readList :: ReadS [WriterT w m a] #

readPrec :: ReadPrec (WriterT w m a) #

readListPrec :: ReadPrec [WriterT w m a] #

(Read w, Read1 m, Read a) => Read (WriterT w m a) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

readsPrec :: Int -> ReadS (WriterT w m a) #

readList :: ReadS [WriterT w m a] #

readPrec :: ReadPrec (WriterT w m a) #

readListPrec :: ReadPrec [WriterT w m a] #

Read a => Read (Constant a b) 
Instance details

Defined in Data.Functor.Constant

(Read1 f, Read a) => Read (Reverse f a) 
Instance details

Defined in Data.Functor.Reverse

(Read a, Read b, Read c) => Read (a, b, c)

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a, b, c) #

readList :: ReadS [(a, b, c)] #

readPrec :: ReadPrec (a, b, c) #

readListPrec :: ReadPrec [(a, b, c)] #

(Read (f a), Read (g a)) => Read (Product f g a)

Since: base-4.18.0.0

Instance details

Defined in Data.Functor.Product

Methods

readsPrec :: Int -> ReadS (Product f g a) #

readList :: ReadS [Product f g a] #

readPrec :: ReadPrec (Product f g a) #

readListPrec :: ReadPrec [Product f g a] #

(Read (f a), Read (g a)) => Read (Sum f g a)

Since: base-4.18.0.0

Instance details

Defined in Data.Functor.Sum

Methods

readsPrec :: Int -> ReadS (Sum f g a) #

readList :: ReadS [Sum f g a] #

readPrec :: ReadPrec (Sum f g a) #

readListPrec :: ReadPrec [Sum f g a] #

(Read (f p), Read (g p)) => Read ((f :*: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

readsPrec :: Int -> ReadS ((f :*: g) p) #

readList :: ReadS [(f :*: g) p] #

readPrec :: ReadPrec ((f :*: g) p) #

readListPrec :: ReadPrec [(f :*: g) p] #

(Read (f p), Read (g p)) => Read ((f :+: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

readsPrec :: Int -> ReadS ((f :+: g) p) #

readList :: ReadS [(f :+: g) p] #

readPrec :: ReadPrec ((f :+: g) p) #

readListPrec :: ReadPrec [(f :+: g) p] #

Read c => Read (K1 i c p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

readsPrec :: Int -> ReadS (K1 i c p) #

readList :: ReadS [K1 i c p] #

readPrec :: ReadPrec (K1 i c p) #

readListPrec :: ReadPrec [K1 i c p] #

(Read a, Read b, Read c, Read d) => Read (a, b, c, d)

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a, b, c, d) #

readList :: ReadS [(a, b, c, d)] #

readPrec :: ReadPrec (a, b, c, d) #

readListPrec :: ReadPrec [(a, b, c, d)] #

Read (f (g a)) => Read (Compose f g a)

Since: base-4.18.0.0

Instance details

Defined in Data.Functor.Compose

Methods

readsPrec :: Int -> ReadS (Compose f g a) #

readList :: ReadS [Compose f g a] #

readPrec :: ReadPrec (Compose f g a) #

readListPrec :: ReadPrec [Compose f g a] #

Read (f (g p)) => Read ((f :.: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

readsPrec :: Int -> ReadS ((f :.: g) p) #

readList :: ReadS [(f :.: g) p] #

readPrec :: ReadPrec ((f :.: g) p) #

readListPrec :: ReadPrec [(f :.: g) p] #

Read (f p) => Read (M1 i c f p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

readsPrec :: Int -> ReadS (M1 i c f p) #

readList :: ReadS [M1 i c f p] #

readPrec :: ReadPrec (M1 i c f p) #

readListPrec :: ReadPrec [M1 i c f p] #

Read (f a) => Read (Clown f a b) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

readsPrec :: Int -> ReadS (Clown f a b) #

readList :: ReadS [Clown f a b] #

readPrec :: ReadPrec (Clown f a b) #

readListPrec :: ReadPrec [Clown f a b] #

Read (p b a) => Read (Flip p a b) 
Instance details

Defined in Data.Bifunctor.Flip

Methods

readsPrec :: Int -> ReadS (Flip p a b) #

readList :: ReadS [Flip p a b] #

readPrec :: ReadPrec (Flip p a b) #

readListPrec :: ReadPrec [Flip p a b] #

Read (g b) => Read (Joker g a b) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

readsPrec :: Int -> ReadS (Joker g a b) #

readList :: ReadS [Joker g a b] #

readPrec :: ReadPrec (Joker g a b) #

readListPrec :: ReadPrec [Joker g a b] #

Read (p a b) => Read (WrappedBifunctor p a b) 
Instance details

Defined in Data.Bifunctor.Wrapped

(Read a, Read b, Read c, Read d, Read e) => Read (a, b, c, d, e)

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a, b, c, d, e) #

readList :: ReadS [(a, b, c, d, e)] #

readPrec :: ReadPrec (a, b, c, d, e) #

readListPrec :: ReadPrec [(a, b, c, d, e)] #

(Read (f a b), Read (g a b)) => Read (Product f g a b) 
Instance details

Defined in Data.Bifunctor.Product

Methods

readsPrec :: Int -> ReadS (Product f g a b) #

readList :: ReadS [Product f g a b] #

readPrec :: ReadPrec (Product f g a b) #

readListPrec :: ReadPrec [Product f g a b] #

(Read (p a b), Read (q a b)) => Read (Sum p q a b) 
Instance details

Defined in Data.Bifunctor.Sum

Methods

readsPrec :: Int -> ReadS (Sum p q a b) #

readList :: ReadS [Sum p q a b] #

readPrec :: ReadPrec (Sum p q a b) #

readListPrec :: ReadPrec [Sum p q a b] #

(Read a, Read b, Read c, Read d, Read e, Read f) => Read (a, b, c, d, e, f)

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a, b, c, d, e, f) #

readList :: ReadS [(a, b, c, d, e, f)] #

readPrec :: ReadPrec (a, b, c, d, e, f) #

readListPrec :: ReadPrec [(a, b, c, d, e, f)] #

Read (f (p a b)) => Read (Tannen f p a b) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

readsPrec :: Int -> ReadS (Tannen f p a b) #

readList :: ReadS [Tannen f p a b] #

readPrec :: ReadPrec (Tannen f p a b) #

readListPrec :: ReadPrec [Tannen f p a b] #

(Read a, Read b, Read c, Read d, Read e, Read f, Read g) => Read (a, b, c, d, e, f, g)

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a, b, c, d, e, f, g) #

readList :: ReadS [(a, b, c, d, e, f, g)] #

readPrec :: ReadPrec (a, b, c, d, e, f, g) #

readListPrec :: ReadPrec [(a, b, c, d, e, f, g)] #

(Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h) => Read (a, b, c, d, e, f, g, h)

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a, b, c, d, e, f, g, h) #

readList :: ReadS [(a, b, c, d, e, f, g, h)] #

readPrec :: ReadPrec (a, b, c, d, e, f, g, h) #

readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h)] #

Read (p (f a) (g b)) => Read (Biff p f g a b) 
Instance details

Defined in Data.Bifunctor.Biff

Methods

readsPrec :: Int -> ReadS (Biff p f g a b) #

readList :: ReadS [Biff p f g a b] #

readPrec :: ReadPrec (Biff p f g a b) #

readListPrec :: ReadPrec [Biff p f g a b] #

(Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i) => Read (a, b, c, d, e, f, g, h, i)

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a, b, c, d, e, f, g, h, i) #

readList :: ReadS [(a, b, c, d, e, f, g, h, i)] #

readPrec :: ReadPrec (a, b, c, d, e, f, g, h, i) #

readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i)] #

(Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i, Read j) => Read (a, b, c, d, e, f, g, h, i, j)

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a, b, c, d, e, f, g, h, i, j) #

readList :: ReadS [(a, b, c, d, e, f, g, h, i, j)] #

readPrec :: ReadPrec (a, b, c, d, e, f, g, h, i, j) #

readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j)] #

(Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i, Read j, Read k) => Read (a, b, c, d, e, f, g, h, i, j, k)

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a, b, c, d, e, f, g, h, i, j, k) #

readList :: ReadS [(a, b, c, d, e, f, g, h, i, j, k)] #

readPrec :: ReadPrec (a, b, c, d, e, f, g, h, i, j, k) #

readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j, k)] #

(Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i, Read j, Read k, Read l) => Read (a, b, c, d, e, f, g, h, i, j, k, l)

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a, b, c, d, e, f, g, h, i, j, k, l) #

readList :: ReadS [(a, b, c, d, e, f, g, h, i, j, k, l)] #

readPrec :: ReadPrec (a, b, c, d, e, f, g, h, i, j, k, l) #

readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j, k, l)] #

(Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i, Read j, Read k, Read l, Read m) => Read (a, b, c, d, e, f, g, h, i, j, k, l, m)

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a, b, c, d, e, f, g, h, i, j, k, l, m) #

readList :: ReadS [(a, b, c, d, e, f, g, h, i, j, k, l, m)] #

readPrec :: ReadPrec (a, b, c, d, e, f, g, h, i, j, k, l, m) #

readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j, k, l, m)] #

(Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i, Read j, Read k, Read l, Read m, Read n) => Read (a, b, c, d, e, f, g, h, i, j, k, l, m, n)

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a, b, c, d, e, f, g, h, i, j, k, l, m, n) #

readList :: ReadS [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] #

readPrec :: ReadPrec (a, b, c, d, e, f, g, h, i, j, k, l, m, n) #

readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] #

(Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i, Read j, Read k, Read l, Read m, Read n, Read o) => Read (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) #

readList :: ReadS [(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)] #

readPrec :: ReadPrec (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) #

readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)] #

class Eq a => Ord a where #

The Ord class is used for totally ordered datatypes.

Instances of Ord can be derived for any user-defined datatype whose constituent types are in Ord. The declared order of the constructors in the data declaration determines the ordering in derived Ord instances. The Ordering datatype allows a single comparison to determine the precise ordering of two objects.

Ord, as defined by the Haskell report, implements a total order and has the following properties:

Comparability
x <= y || y <= x = True
Transitivity
if x <= y && y <= z = True, then x <= z = True
Reflexivity
x <= x = True
Antisymmetry
if x <= y && y <= x = True, then x == y = True

The following operator interactions are expected to hold:

  1. x >= y = y <= x
  2. x < y = x <= y && x /= y
  3. x > y = y < x
  4. x < y = compare x y == LT
  5. x > y = compare x y == GT
  6. x == y = compare x y == EQ
  7. min x y == if x <= y then x else y = True
  8. max x y == if x >= y then x else y = True

Note that (7.) and (8.) do not require min and max to return either of their arguments. The result is merely required to equal one of the arguments in terms of (==).

Minimal complete definition: either compare or <=. Using compare can be more efficient for complex types.

Minimal complete definition

compare | (<=)

Methods

compare :: a -> a -> Ordering #

(<) :: a -> a -> Bool infix 4 #

(<=) :: a -> a -> Bool infix 4 #

(>) :: a -> a -> Bool infix 4 #

(>=) :: a -> a -> Bool infix 4 #

max :: a -> a -> a #

min :: a -> a -> a #

Instances

Instances details
Ord Key 
Instance details

Defined in Data.Aeson.Key

Methods

compare :: Key -> Key -> Ordering #

(<) :: Key -> Key -> Bool #

(<=) :: Key -> Key -> Bool #

(>) :: Key -> Key -> Bool #

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

max :: Key -> Key -> Key #

min :: Key -> Key -> Key #

Ord DotNetTime 
Instance details

Defined in Data.Aeson.Types.Internal

Ord JSONPathElement 
Instance details

Defined in Data.Aeson.Types.Internal

Ord Value

The ordering is total, consistent with Eq instance. However, nothing else about the ordering is specified, and it may change from environment to environment and version to version of either this package or its dependencies (hashable and 'unordered-containers').

Since: aeson-1.5.2.0

Instance details

Defined in Data.Aeson.Types.Internal

Methods

compare :: Value -> Value -> Ordering #

(<) :: Value -> Value -> Bool #

(<=) :: Value -> Value -> Bool #

(>) :: Value -> Value -> Bool #

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

max :: Value -> Value -> Value #

min :: Value -> Value -> Value #

Ord Pos 
Instance details

Defined in Data.Attoparsec.Internal.Types

Methods

compare :: Pos -> Pos -> Ordering #

(<) :: Pos -> Pos -> Bool #

(<=) :: Pos -> Pos -> Bool #

(>) :: Pos -> Pos -> Bool #

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

max :: Pos -> Pos -> Pos #

min :: Pos -> Pos -> Pos #

Ord ByteArray

Non-lexicographic ordering. This compares the lengths of the byte arrays first and uses a lexicographic ordering if the lengths are equal. Subject to change between major versions.

Since: base-4.17.0.0

Instance details

Defined in Data.Array.Byte

Ord All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: All -> All -> Ordering #

(<) :: All -> All -> Bool #

(<=) :: All -> All -> Bool #

(>) :: All -> All -> Bool #

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

max :: All -> All -> All #

min :: All -> All -> All #

Ord Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: Any -> Any -> Ordering #

(<) :: Any -> Any -> Bool #

(<=) :: Any -> Any -> Bool #

(>) :: Any -> Any -> Bool #

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

max :: Any -> Any -> Any #

min :: Any -> Any -> Any #

Ord SomeTypeRep 
Instance details

Defined in Data.Typeable.Internal

Ord Version

Since: base-2.1

Instance details

Defined in Data.Version

Ord CBool 
Instance details

Defined in Foreign.C.Types

Methods

compare :: CBool -> CBool -> Ordering #

(<) :: CBool -> CBool -> Bool #

(<=) :: CBool -> CBool -> Bool #

(>) :: CBool -> CBool -> Bool #

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

max :: CBool -> CBool -> CBool #

min :: CBool -> CBool -> CBool #

Ord CChar 
Instance details

Defined in Foreign.C.Types

Methods

compare :: CChar -> CChar -> Ordering #

(<) :: CChar -> CChar -> Bool #

(<=) :: CChar -> CChar -> Bool #

(>) :: CChar -> CChar -> Bool #

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

max :: CChar -> CChar -> CChar #

min :: CChar -> CChar -> CChar #

Ord CClock 
Instance details

Defined in Foreign.C.Types

Ord CDouble 
Instance details

Defined in Foreign.C.Types

Ord CFloat 
Instance details

Defined in Foreign.C.Types

Ord CInt 
Instance details

Defined in Foreign.C.Types

Methods

compare :: CInt -> CInt -> Ordering #

(<) :: CInt -> CInt -> Bool #

(<=) :: CInt -> CInt -> Bool #

(>) :: CInt -> CInt -> Bool #

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

max :: CInt -> CInt -> CInt #

min :: CInt -> CInt -> CInt #

Ord CIntMax 
Instance details

Defined in Foreign.C.Types

Ord CIntPtr 
Instance details

Defined in Foreign.C.Types

Ord CLLong 
Instance details

Defined in Foreign.C.Types

Ord CLong 
Instance details

Defined in Foreign.C.Types

Methods

compare :: CLong -> CLong -> Ordering #

(<) :: CLong -> CLong -> Bool #

(<=) :: CLong -> CLong -> Bool #

(>) :: CLong -> CLong -> Bool #

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

max :: CLong -> CLong -> CLong #

min :: CLong -> CLong -> CLong #

Ord CPtrdiff 
Instance details

Defined in Foreign.C.Types

Ord CSChar 
Instance details

Defined in Foreign.C.Types

Ord CSUSeconds 
Instance details

Defined in Foreign.C.Types

Ord CShort 
Instance details

Defined in Foreign.C.Types

Ord CSigAtomic 
Instance details

Defined in Foreign.C.Types

Ord CSize 
Instance details

Defined in Foreign.C.Types

Methods

compare :: CSize -> CSize -> Ordering #

(<) :: CSize -> CSize -> Bool #

(<=) :: CSize -> CSize -> Bool #

(>) :: CSize -> CSize -> Bool #

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

max :: CSize -> CSize -> CSize #

min :: CSize -> CSize -> CSize #

Ord CTime 
Instance details

Defined in Foreign.C.Types

Methods

compare :: CTime -> CTime -> Ordering #

(<) :: CTime -> CTime -> Bool #

(<=) :: CTime -> CTime -> Bool #

(>) :: CTime -> CTime -> Bool #

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

max :: CTime -> CTime -> CTime #

min :: CTime -> CTime -> CTime #

Ord CUChar 
Instance details

Defined in Foreign.C.Types

Ord CUInt 
Instance details

Defined in Foreign.C.Types

Methods

compare :: CUInt -> CUInt -> Ordering #

(<) :: CUInt -> CUInt -> Bool #

(<=) :: CUInt -> CUInt -> Bool #

(>) :: CUInt -> CUInt -> Bool #

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

max :: CUInt -> CUInt -> CUInt #

min :: CUInt -> CUInt -> CUInt #

Ord CUIntMax 
Instance details

Defined in Foreign.C.Types

Ord CUIntPtr 
Instance details

Defined in Foreign.C.Types

Ord CULLong 
Instance details

Defined in Foreign.C.Types

Ord CULong 
Instance details

Defined in Foreign.C.Types

Ord CUSeconds 
Instance details

Defined in Foreign.C.Types

Ord CUShort 
Instance details

Defined in Foreign.C.Types

Ord CWchar 
Instance details

Defined in Foreign.C.Types

Ord Void

Since: base-4.8.0.0

Instance details

Defined in GHC.Base

Methods

compare :: Void -> Void -> Ordering #

(<) :: Void -> Void -> Bool #

(<=) :: Void -> Void -> Bool #

(>) :: Void -> Void -> Bool #

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

max :: Void -> Void -> Void #

min :: Void -> Void -> Void #

Ord ByteOrder

Since: base-4.11.0.0

Instance details

Defined in GHC.ByteOrder

Ord BlockReason

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Ord ThreadId

Since: base-4.2.0.0

Instance details

Defined in GHC.Conc.Sync

Ord ThreadStatus

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Ord ErrorCall

Since: base-4.7.0.0

Instance details

Defined in GHC.Exception

Ord ArithException

Since: base-3.0

Instance details

Defined in GHC.Exception.Type

Ord Associativity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Ord DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord Fixity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Ord SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord SeekMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Device

Ord ArrayException

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Exception

Ord AsyncException

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Exception

Ord ExitCode 
Instance details

Defined in GHC.IO.Exception

Ord BufferMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Handle.Types

Ord Newline

Since: base-4.3.0.0

Instance details

Defined in GHC.IO.Handle.Types

Ord NewlineMode

Since: base-4.3.0.0

Instance details

Defined in GHC.IO.Handle.Types

Ord IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

Ord Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

compare :: Int16 -> Int16 -> Ordering #

(<) :: Int16 -> Int16 -> Bool #

(<=) :: Int16 -> Int16 -> Bool #

(>) :: Int16 -> Int16 -> Bool #

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

max :: Int16 -> Int16 -> Int16 #

min :: Int16 -> Int16 -> Int16 #

Ord Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

compare :: Int32 -> Int32 -> Ordering #

(<) :: Int32 -> Int32 -> Bool #

(<=) :: Int32 -> Int32 -> Bool #

(>) :: Int32 -> Int32 -> Bool #

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

max :: Int32 -> Int32 -> Int32 #

min :: Int32 -> Int32 -> Int32 #

Ord Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

compare :: Int64 -> Int64 -> Ordering #

(<) :: Int64 -> Int64 -> Bool #

(<=) :: Int64 -> Int64 -> Bool #

(>) :: Int64 -> Int64 -> Bool #

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

max :: Int64 -> Int64 -> Int64 #

min :: Int64 -> Int64 -> Int64 #

Ord Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

compare :: Int8 -> Int8 -> Ordering #

(<) :: Int8 -> Int8 -> Bool #

(<=) :: Int8 -> Int8 -> Bool #

(>) :: Int8 -> Int8 -> Bool #

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

max :: Int8 -> Int8 -> Int8 #

min :: Int8 -> Int8 -> Int8 #

Ord SomeChar 
Instance details

Defined in GHC.TypeLits

Ord SomeSymbol

Since: base-4.7.0.0

Instance details

Defined in GHC.TypeLits

Ord SomeNat

Since: base-4.7.0.0

Instance details

Defined in GHC.TypeNats

Ord GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Unicode

Ord Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Ord Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Ord Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Ord Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

compare :: Word8 -> Word8 -> Ordering #

(<) :: Word8 -> Word8 -> Bool #

(<=) :: Word8 -> Word8 -> Bool #

(>) :: Word8 -> Word8 -> Bool #

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

max :: Word8 -> Word8 -> Word8 #

min :: Word8 -> Word8 -> Word8 #

Ord Encoding 
Instance details

Defined in Basement.String

Ord UTF32_Invalid 
Instance details

Defined in Basement.String.Encoding.UTF32

Methods

compare :: UTF32_Invalid -> UTF32_Invalid -> Ordering #

(<) :: UTF32_Invalid -> UTF32_Invalid -> Bool #

(<=) :: UTF32_Invalid -> UTF32_Invalid -> Bool #

(>) :: UTF32_Invalid -> UTF32_Invalid -> Bool #

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

max :: UTF32_Invalid -> UTF32_Invalid -> UTF32_Invalid #

min :: UTF32_Invalid -> UTF32_Invalid -> UTF32_Invalid #

Ord FileSize 
Instance details

Defined in Basement.Types.OffsetSize

Ord String 
Instance details

Defined in Basement.UTF8.Base

Ord ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

Ord ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Ord ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Ord IV 
Instance details

Defined in Web.ClientSession

Methods

compare :: IV -> IV -> Ordering #

(<) :: IV -> IV -> Bool #

(<=) :: IV -> IV -> Bool #

(>) :: IV -> IV -> Bool #

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

max :: IV -> IV -> IV #

min :: IV -> IV -> IV #

Ord IntSet 
Instance details

Defined in Data.IntSet.Internal

Ord EmailAddress 
Instance details

Defined in Text.Email.Parser

Ord Bookmark Source # 
Instance details

Defined in Model

Ord BookmarkTag Source # 
Instance details

Defined in Model

Ord FFBookmarkNode Source # 
Instance details

Defined in Model

Ord FileBookmark Source # 
Instance details

Defined in Model

Ord FileNote Source # 
Instance details

Defined in Model

Ord Note Source # 
Instance details

Defined in Model

Methods

compare :: Note -> Note -> Ordering #

(<) :: Note -> Note -> Bool #

(<=) :: Note -> Note -> Bool #

(>) :: Note -> Note -> Bool #

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

max :: Note -> Note -> Note #

min :: Note -> Note -> Note #

Ord User Source # 
Instance details

Defined in Model

Methods

compare :: User -> User -> Ordering #

(<) :: User -> User -> Bool #

(<=) :: User -> User -> Bool #

(>) :: User -> User -> Bool #

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

max :: User -> User -> User #

min :: User -> User -> User #

Ord BCrypt Source # 
Instance details

Defined in ModelCustom

Ord BmSlug Source # 
Instance details

Defined in ModelCustom

Ord HashedApiKey Source # 
Instance details

Defined in ModelCustom

Ord NtSlug Source # 
Instance details

Defined in ModelCustom

Ord Ident 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Methods

compare :: Ident -> Ident -> Ordering #

(<) :: Ident -> Ident -> Bool #

(<=) :: Ident -> Ident -> Bool #

(>) :: Ident -> Ident -> Bool #

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

max :: Ident -> Ident -> Ident #

min :: Ident -> Ident -> Ident #

Ord OnClauseWithoutMatchingJoinException 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Ord OnLockedBehavior 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Ord PostgresRowLevelLockStrength 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Ord OsChar

Byte ordering of the internal representation.

Instance details

Defined in System.OsString.Internal.Types

Ord OsString

Byte ordering of the internal representation.

Instance details

Defined in System.OsString.Internal.Types

Ord PosixChar 
Instance details

Defined in System.OsString.Internal.Types

Ord PosixString 
Instance details

Defined in System.OsString.Internal.Types

Ord WindowsChar 
Instance details

Defined in System.OsString.Internal.Types

Ord WindowsString 
Instance details

Defined in System.OsString.Internal.Types

Ord BigNat 
Instance details

Defined in GHC.Num.BigNat

Ord Extension 
Instance details

Defined in GHC.LanguageExtensions.Type

Ord Ordering 
Instance details

Defined in GHC.Classes

Ord TyCon 
Instance details

Defined in GHC.Classes

Methods

compare :: TyCon -> TyCon -> Ordering #

(<) :: TyCon -> TyCon -> Bool #

(<=) :: TyCon -> TyCon -> Bool #

(>) :: TyCon -> TyCon -> Bool #

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

max :: TyCon -> TyCon -> TyCon #

min :: TyCon -> TyCon -> TyCon #

Ord TerminalType 
Instance details

Defined in Language.Haskell.HsColour.Output

Ord ConnHost 
Instance details

Defined in Network.HTTP.Client.Types

Ord ConnKey 
Instance details

Defined in Network.HTTP.Client.Types

Ord Proxy 
Instance details

Defined in Network.HTTP.Client.Types

Methods

compare :: Proxy -> Proxy -> Ordering #

(<) :: Proxy -> Proxy -> Bool #

(<=) :: Proxy -> Proxy -> Bool #

(>) :: Proxy -> Proxy -> Bool #

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

max :: Proxy -> Proxy -> Proxy #

min :: Proxy -> Proxy -> Proxy #

Ord ProxySecureMode 
Instance details

Defined in Network.HTTP.Client.Types

Ord StatusHeaders 
Instance details

Defined in Network.HTTP.Client.Types

Ord StreamFileStatus 
Instance details

Defined in Network.HTTP.Client.Types

Ord DigestAuthExceptionDetails 
Instance details

Defined in Network.HTTP.Client.TLS

Ord ByteRange

Since: http-types-0.8.4

Instance details

Defined in Network.HTTP.Types.Header

Ord StdMethod 
Instance details

Defined in Network.HTTP.Types.Method

Ord Status

Statuses are ordered according to their status codes only.

Instance details

Defined in Network.HTTP.Types.Status

Ord EscapeItem 
Instance details

Defined in Network.HTTP.Types.URI

Ord HttpVersion 
Instance details

Defined in Network.HTTP.Types.Version

Ord IP 
Instance details

Defined in Data.IP.Addr

Methods

compare :: IP -> IP -> Ordering #

(<) :: IP -> IP -> Bool #

(<=) :: IP -> IP -> Bool #

(>) :: IP -> IP -> Bool #

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

max :: IP -> IP -> IP #

min :: IP -> IP -> IP #

Ord IPv4 
Instance details

Defined in Data.IP.Addr

Methods

compare :: IPv4 -> IPv4 -> Ordering #

(<) :: IPv4 -> IPv4 -> Bool #

(<=) :: IPv4 -> IPv4 -> Bool #

(>) :: IPv4 -> IPv4 -> Bool #

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

max :: IPv4 -> IPv4 -> IPv4 #

min :: IPv4 -> IPv4 -> IPv4 #

Ord IPv6 
Instance details

Defined in Data.IP.Addr

Methods

compare :: IPv6 -> IPv6 -> Ordering #

(<) :: IPv6 -> IPv6 -> Bool #

(<=) :: IPv6 -> IPv6 -> Bool #

(>) :: IPv6 -> IPv6 -> Bool #

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

max :: IPv6 -> IPv6 -> IPv6 #

min :: IPv6 -> IPv6 -> IPv6 #

Ord IPRange 
Instance details

Defined in Data.IP.Range

Ord LogLevel 
Instance details

Defined in Control.Monad.Logger

Ord Family 
Instance details

Defined in Network.Socket.Types

Ord PortNumber 
Instance details

Defined in Network.Socket.Types

Ord SockAddr 
Instance details

Defined in Network.Socket.Types

Ord SocketType 
Instance details

Defined in Network.Socket.Types

Ord URI 
Instance details

Defined in Network.URI

Methods

compare :: URI -> URI -> Ordering #

(<) :: URI -> URI -> Bool #

(<=) :: URI -> URI -> Bool #

(>) :: URI -> URI -> Bool #

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

max :: URI -> URI -> URI #

min :: URI -> URI -> URI #

Ord URIAuth 
Instance details

Defined in Network.URI

Ord OverflowNatural 
Instance details

Defined in Database.Persist.Class.PersistField

Ord ConstraintNameDB 
Instance details

Defined in Database.Persist.Names

Ord ConstraintNameHS 
Instance details

Defined in Database.Persist.Names

Ord EntityNameDB 
Instance details

Defined in Database.Persist.Names

Ord EntityNameHS 
Instance details

Defined in Database.Persist.Names

Ord FieldNameDB 
Instance details

Defined in Database.Persist.Names

Ord FieldNameHS 
Instance details

Defined in Database.Persist.Names

Ord LiteralType 
Instance details

Defined in Database.Persist.PersistValue

Ord PersistValue 
Instance details

Defined in Database.Persist.PersistValue

Ord ForeignFieldReference 
Instance details

Defined in Database.Persist.Quasi.Internal

Ord PrimarySpec 
Instance details

Defined in Database.Persist.Quasi.Internal

Ord UnboundCompositeDef 
Instance details

Defined in Database.Persist.Quasi.Internal

Ord UnboundEntityDef 
Instance details

Defined in Database.Persist.Quasi.Internal

Ord UnboundFieldDef 
Instance details

Defined in Database.Persist.Quasi.Internal

Ord UnboundForeignDef 
Instance details

Defined in Database.Persist.Quasi.Internal

Ord UnboundForeignFieldList 
Instance details

Defined in Database.Persist.Quasi.Internal

Ord UnboundIdDef 
Instance details

Defined in Database.Persist.Quasi.Internal

Ord Column 
Instance details

Defined in Database.Persist.Sql.Types

Ord ColumnReference 
Instance details

Defined in Database.Persist.Sql.Types

Ord IsolationLevel 
Instance details

Defined in Database.Persist.SqlBackend.Internal.IsolationLevel

Ord CascadeAction 
Instance details

Defined in Database.Persist.Types.Base

Ord Checkmark 
Instance details

Defined in Database.Persist.Types.Base

Ord CompositeDef 
Instance details

Defined in Database.Persist.Types.Base

Ord EmbedEntityDef 
Instance details

Defined in Database.Persist.Types.Base

Ord EmbedFieldDef 
Instance details

Defined in Database.Persist.Types.Base

Ord EntityDef 
Instance details

Defined in Database.Persist.Types.Base

Ord EntityIdDef 
Instance details

Defined in Database.Persist.Types.Base

Ord FieldAttr 
Instance details

Defined in Database.Persist.Types.Base

Ord FieldCascade 
Instance details

Defined in Database.Persist.Types.Base

Ord FieldDef 
Instance details

Defined in Database.Persist.Types.Base

Ord FieldType 
Instance details

Defined in Database.Persist.Types.Base

Ord FieldTypeLit 
Instance details

Defined in Database.Persist.Types.Base

Ord ForeignDef 
Instance details

Defined in Database.Persist.Types.Base

Ord ReferenceDef 
Instance details

Defined in Database.Persist.Types.Base

Ord SelfEmbed 
Instance details

Defined in Database.Persist.Types.Base

Methods

compare :: SelfEmbed -> SelfEmbed -> Ordering #

(<) :: SelfEmbed -> SelfEmbed -> Bool #

(<=) :: SelfEmbed -> SelfEmbed -> Bool #

(>) :: SelfEmbed -> SelfEmbed -> Bool #

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

max :: SelfEmbed -> SelfEmbed -> SelfEmbed #

min :: SelfEmbed -> SelfEmbed -> SelfEmbed #

Ord SqlType 
Instance details

Defined in Database.Persist.Types.Base

Ord UniqueDef 
Instance details

Defined in Database.Persist.Types.Base

Ord ForeignKeyViolation 
Instance details

Defined in Database.Persist.Sqlite

Ord Scientific

Scientific numbers can be safely compared for ordering. No magnitude 10^e is calculated so there's no risk of a blowup in space or time when comparing scientific numbers coming from untrusted sources.

Instance details

Defined in Data.Scientific

Ord AbsoluteSize 
Instance details

Defined in Text.Internal.CssCommon

Ord EmSize 
Instance details

Defined in Text.Internal.CssCommon

Ord ExSize 
Instance details

Defined in Text.Internal.CssCommon

Ord PercentageSize 
Instance details

Defined in Text.Internal.CssCommon

Ord PixelSize 
Instance details

Defined in Text.Internal.CssCommon

Ord VarType 
Instance details

Defined in Text.Shakespeare

Ord Deref 
Instance details

Defined in Text.Shakespeare.Base

Methods

compare :: Deref -> Deref -> Ordering #

(<) :: Deref -> Deref -> Bool #

(<=) :: Deref -> Deref -> Bool #

(>) :: Deref -> Deref -> Bool #

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

max :: Deref -> Deref -> Deref #

min :: Deref -> Deref -> Deref #

Ord Ident 
Instance details

Defined in Text.Shakespeare.Base

Methods

compare :: Ident -> Ident -> Ordering #

(<) :: Ident -> Ident -> Bool #

(<=) :: Ident -> Ident -> Bool #

(>) :: Ident -> Ident -> Bool #

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

max :: Ident -> Ident -> Ident #

min :: Ident -> Ident -> Ident #

Ord HostPreference 
Instance details

Defined in Data.Streaming.Network.Internal

Ord AnnLookup 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord AnnTarget 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Bang 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Bang -> Bang -> Ordering #

(<) :: Bang -> Bang -> Bool #

(<=) :: Bang -> Bang -> Bool #

(>) :: Bang -> Bang -> Bool #

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

max :: Bang -> Bang -> Bang #

min :: Bang -> Bang -> Bang #

Ord Body 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Body -> Body -> Ordering #

(<) :: Body -> Body -> Bool #

(<=) :: Body -> Body -> Bool #

(>) :: Body -> Body -> Bool #

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

max :: Body -> Body -> Body #

min :: Body -> Body -> Body #

Ord Bytes 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Bytes -> Bytes -> Ordering #

(<) :: Bytes -> Bytes -> Bool #

(<=) :: Bytes -> Bytes -> Bool #

(>) :: Bytes -> Bytes -> Bool #

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

max :: Bytes -> Bytes -> Bytes #

min :: Bytes -> Bytes -> Bytes #

Ord Callconv 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Clause 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Con 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Con -> Con -> Ordering #

(<) :: Con -> Con -> Bool #

(<=) :: Con -> Con -> Bool #

(>) :: Con -> Con -> Bool #

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

max :: Con -> Con -> Con #

min :: Con -> Con -> Con #

Ord Dec 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Dec -> Dec -> Ordering #

(<) :: Dec -> Dec -> Bool #

(<=) :: Dec -> Dec -> Bool #

(>) :: Dec -> Dec -> Bool #

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

max :: Dec -> Dec -> Dec #

min :: Dec -> Dec -> Dec #

Ord DecidedStrictness 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord DerivClause 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord DerivStrategy 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord DocLoc 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Exp 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Exp -> Exp -> Ordering #

(<) :: Exp -> Exp -> Bool #

(<=) :: Exp -> Exp -> Bool #

(>) :: Exp -> Exp -> Bool #

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

max :: Exp -> Exp -> Exp #

min :: Exp -> Exp -> Exp #

Ord FamilyResultSig 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Fixity 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord FixityDirection 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Foreign 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord FunDep 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Guard 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Guard -> Guard -> Ordering #

(<) :: Guard -> Guard -> Bool #

(<=) :: Guard -> Guard -> Bool #

(>) :: Guard -> Guard -> Bool #

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

max :: Guard -> Guard -> Guard #

min :: Guard -> Guard -> Guard #

Ord Info 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Info -> Info -> Ordering #

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

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

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

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

max :: Info -> Info -> Info #

min :: Info -> Info -> Info #

Ord InjectivityAnn 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Inline 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Lit 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Lit -> Lit -> Ordering #

(<) :: Lit -> Lit -> Bool #

(<=) :: Lit -> Lit -> Bool #

(>) :: Lit -> Lit -> Bool #

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

max :: Lit -> Lit -> Lit #

min :: Lit -> Lit -> Lit #

Ord Loc 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Loc -> Loc -> Ordering #

(<) :: Loc -> Loc -> Bool #

(<=) :: Loc -> Loc -> Bool #

(>) :: Loc -> Loc -> Bool #

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

max :: Loc -> Loc -> Loc #

min :: Loc -> Loc -> Loc #

Ord Match 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Match -> Match -> Ordering #

(<) :: Match -> Match -> Bool #

(<=) :: Match -> Match -> Bool #

(>) :: Match -> Match -> Bool #

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

max :: Match -> Match -> Match #

min :: Match -> Match -> Match #

Ord ModName 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Module 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord ModuleInfo 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Name 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Name -> Name -> Ordering #

(<) :: Name -> Name -> Bool #

(<=) :: Name -> Name -> Bool #

(>) :: Name -> Name -> Bool #

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

max :: Name -> Name -> Name #

min :: Name -> Name -> Name #

Ord NameFlavour 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord NameSpace 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord OccName 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Overlap 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Pat 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Pat -> Pat -> Ordering #

(<) :: Pat -> Pat -> Bool #

(<=) :: Pat -> Pat -> Bool #

(>) :: Pat -> Pat -> Bool #

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

max :: Pat -> Pat -> Pat #

min :: Pat -> Pat -> Pat #

Ord PatSynArgs 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord PatSynDir 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Phases 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord PkgName 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Pragma 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Range 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Range -> Range -> Ordering #

(<) :: Range -> Range -> Bool #

(<=) :: Range -> Range -> Bool #

(>) :: Range -> Range -> Bool #

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

max :: Range -> Range -> Range #

min :: Range -> Range -> Range #

Ord Role 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Role -> Role -> Ordering #

(<) :: Role -> Role -> Bool #

(<=) :: Role -> Role -> Bool #

(>) :: Role -> Role -> Bool #

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

max :: Role -> Role -> Role #

min :: Role -> Role -> Role #

Ord RuleBndr 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord RuleMatch 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Safety 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord SourceStrictness 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord SourceUnpackedness 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Specificity 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Stmt 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Stmt -> Stmt -> Ordering #

(<) :: Stmt -> Stmt -> Bool #

(<=) :: Stmt -> Stmt -> Bool #

(>) :: Stmt -> Stmt -> Bool #

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

max :: Stmt -> Stmt -> Stmt #

min :: Stmt -> Stmt -> Stmt #

Ord TyLit 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: TyLit -> TyLit -> Ordering #

(<) :: TyLit -> TyLit -> Bool #

(<=) :: TyLit -> TyLit -> Bool #

(>) :: TyLit -> TyLit -> Bool #

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

max :: TyLit -> TyLit -> TyLit #

min :: TyLit -> TyLit -> TyLit #

Ord TySynEqn 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Type 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Type -> Type -> Ordering #

(<) :: Type -> Type -> Bool #

(<=) :: Type -> Type -> Bool #

(>) :: Type -> Type -> Bool #

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

max :: Type -> Type -> Type #

min :: Type -> Type -> Type #

Ord TypeFamilyHead 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Builder 
Instance details

Defined in Data.Text.Internal.Builder

Ord B 
Instance details

Defined in Data.Text.Short.Internal

Methods

compare :: B -> B -> Ordering #

(<) :: B -> B -> Bool #

(<=) :: B -> B -> Bool #

(>) :: B -> B -> Bool #

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

max :: B -> B -> B #

min :: B -> B -> B #

Ord ShortText 
Instance details

Defined in Data.Text.Short.Internal

Ord ConstructorVariant 
Instance details

Defined in Language.Haskell.TH.Datatype

Ord DatatypeVariant 
Instance details

Defined in Language.Haskell.TH.Datatype

Ord FieldStrictness 
Instance details

Defined in Language.Haskell.TH.Datatype

Ord Strictness 
Instance details

Defined in Language.Haskell.TH.Datatype

Ord Unpackedness 
Instance details

Defined in Language.Haskell.TH.Datatype

Ord Day 
Instance details

Defined in Data.Time.Calendar.Days

Methods

compare :: Day -> Day -> Ordering #

(<) :: Day -> Day -> Bool #

(<=) :: Day -> Day -> Bool #

(>) :: Day -> Day -> Bool #

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

max :: Day -> Day -> Day #

min :: Day -> Day -> Day #

Ord DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Ord NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Ord UTCTime 
Instance details

Defined in Data.Time.Clock.Internal.UTCTime

Ord TimeLocale 
Instance details

Defined in Data.Time.Format.Locale

Ord LocalTime 
Instance details

Defined in Data.Time.LocalTime.Internal.LocalTime

Ord TimeOfDay 
Instance details

Defined in Data.Time.LocalTime.Internal.TimeOfDay

Ord ConcException 
Instance details

Defined in UnliftIO.Internals.Async

Ord UUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

compare :: UUID -> UUID -> Ordering #

(<) :: UUID -> UUID -> Bool #

(<=) :: UUID -> UUID -> Bool #

(>) :: UUID -> UUID -> Bool #

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

max :: UUID -> UUID -> UUID #

min :: UUID -> UUID -> UUID #

Ord UnpackedUUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

compare :: UnpackedUUID -> UnpackedUUID -> Ordering #

(<) :: UnpackedUUID -> UnpackedUUID -> Bool #

(<=) :: UnpackedUUID -> UnpackedUUID -> Bool #

(>) :: UnpackedUUID -> UnpackedUUID -> Bool #

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

max :: UnpackedUUID -> UnpackedUUID -> UnpackedUUID #

min :: UnpackedUUID -> UnpackedUUID -> UnpackedUUID #

Ord Piece 
Instance details

Defined in WaiAppStatic.Types

Methods

compare :: Piece -> Piece -> Ordering #

(<) :: Piece -> Piece -> Bool #

(<=) :: Piece -> Piece -> Bool #

(>) :: Piece -> Piece -> Bool #

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

max :: Piece -> Piece -> Piece #

min :: Piece -> Piece -> Piece #

Ord Content 
Instance details

Defined in Data.XML.Types

Ord Doctype 
Instance details

Defined in Data.XML.Types

Ord Document 
Instance details

Defined in Data.XML.Types

Ord Element 
Instance details

Defined in Data.XML.Types

Ord Event 
Instance details

Defined in Data.XML.Types

Methods

compare :: Event -> Event -> Ordering #

(<) :: Event -> Event -> Bool #

(<=) :: Event -> Event -> Bool #

(>) :: Event -> Event -> Bool #

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

max :: Event -> Event -> Event #

min :: Event -> Event -> Event #

Ord ExternalID 
Instance details

Defined in Data.XML.Types

Ord Instruction 
Instance details

Defined in Data.XML.Types

Ord Miscellaneous 
Instance details

Defined in Data.XML.Types

Ord Name 
Instance details

Defined in Data.XML.Types

Methods

compare :: Name -> Name -> Ordering #

(<) :: Name -> Name -> Bool #

(<=) :: Name -> Name -> Bool #

(>) :: Name -> Name -> Bool #

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

max :: Name -> Name -> Name #

min :: Name -> Name -> Name #

Ord Node 
Instance details

Defined in Data.XML.Types

Methods

compare :: Node -> Node -> Ordering #

(<) :: Node -> Node -> Bool #

(<=) :: Node -> Node -> Bool #

(>) :: Node -> Node -> Bool #

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

max :: Node -> Node -> Node #

min :: Node -> Node -> Node #

Ord Prologue 
Instance details

Defined in Data.XML.Types

Ord Textarea 
Instance details

Defined in Yesod.Form.Fields

Ord CompressionStrategy 
Instance details

Defined in Codec.Compression.Zlib.Stream

Ord DictionaryHash 
Instance details

Defined in Codec.Compression.Zlib.Stream

Methods

compare :: DictionaryHash -> DictionaryHash -> Ordering #

(<) :: DictionaryHash -> DictionaryHash -> Bool #

(<=) :: DictionaryHash -> DictionaryHash -> Bool #

(>) :: DictionaryHash -> DictionaryHash -> Bool #

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

max :: DictionaryHash -> DictionaryHash -> DictionaryHash #

min :: DictionaryHash -> DictionaryHash -> DictionaryHash #

Ord Format 
Instance details

Defined in Codec.Compression.Zlib.Stream

Ord Method 
Instance details

Defined in Codec.Compression.Zlib.Stream

Ord WindowBits 
Instance details

Defined in Codec.Compression.Zlib.Stream

Ord Integer 
Instance details

Defined in GHC.Num.Integer

Ord Natural 
Instance details

Defined in GHC.Num.Natural

Ord () 
Instance details

Defined in GHC.Classes

Methods

compare :: () -> () -> Ordering #

(<) :: () -> () -> Bool #

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

(>) :: () -> () -> Bool #

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

max :: () -> () -> () #

min :: () -> () -> () #

Ord Bool 
Instance details

Defined in GHC.Classes

Methods

compare :: Bool -> Bool -> Ordering #

(<) :: Bool -> Bool -> Bool #

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

(>) :: Bool -> Bool -> Bool #

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

max :: Bool -> Bool -> Bool #

min :: Bool -> Bool -> Bool #

Ord Char 
Instance details

Defined in GHC.Classes

Methods

compare :: Char -> Char -> Ordering #

(<) :: Char -> Char -> Bool #

(<=) :: Char -> Char -> Bool #

(>) :: Char -> Char -> Bool #

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

max :: Char -> Char -> Char #

min :: Char -> Char -> Char #

Ord Double

Note that due to the presence of NaN, Double's Ord instance does not satisfy reflexivity.

>>> 0/0 <= (0/0 :: Double)
False

Also note that, due to the same, Ord's operator interactions are not respected by Double's instance:

>>> (0/0 :: Double) > 1
False
>>> compare (0/0 :: Double) 1
GT
Instance details

Defined in GHC.Classes

Ord Float

Note that due to the presence of NaN, Float's Ord instance does not satisfy reflexivity.

>>> 0/0 <= (0/0 :: Float)
False

Also note that, due to the same, Ord's operator interactions are not respected by Float's instance:

>>> (0/0 :: Float) > 1
False
>>> compare (0/0 :: Float) 1
GT
Instance details

Defined in GHC.Classes

Methods

compare :: Float -> Float -> Ordering #

(<) :: Float -> Float -> Bool #

(<=) :: Float -> Float -> Bool #

(>) :: Float -> Float -> Bool #

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

max :: Float -> Float -> Float #

min :: Float -> Float -> Float #

Ord Int 
Instance details

Defined in GHC.Classes

Methods

compare :: Int -> Int -> Ordering #

(<) :: Int -> Int -> Bool #

(<=) :: Int -> Int -> Bool #

(>) :: Int -> Int -> Bool #

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

max :: Int -> Int -> Int #

min :: Int -> Int -> Int #

Ord Word 
Instance details

Defined in GHC.Classes

Methods

compare :: Word -> Word -> Ordering #

(<) :: Word -> Word -> Bool #

(<=) :: Word -> Word -> Bool #

(>) :: Word -> Word -> Bool #

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

max :: Word -> Word -> Word #

min :: Word -> Word -> Word #

Ord (Encoding' a) 
Instance details

Defined in Data.Aeson.Encoding.Internal

Ord v => Ord (KeyMap v) 
Instance details

Defined in Data.Aeson.KeyMap

Methods

compare :: KeyMap v -> KeyMap v -> Ordering #

(<) :: KeyMap v -> KeyMap v -> Bool #

(<=) :: KeyMap v -> KeyMap v -> Bool #

(>) :: KeyMap v -> KeyMap v -> Bool #

(>=) :: KeyMap v -> KeyMap v -> Bool #

max :: KeyMap v -> KeyMap v -> KeyMap v #

min :: KeyMap v -> KeyMap v -> KeyMap v #

Ord (Async a) 
Instance details

Defined in Control.Concurrent.Async.Internal

Methods

compare :: Async a -> Async a -> Ordering #

(<) :: Async a -> Async a -> Bool #

(<=) :: Async a -> Async a -> Bool #

(>) :: Async a -> Async a -> Bool #

(>=) :: Async a -> Async a -> Bool #

max :: Async a -> Async a -> Async a #

min :: Async a -> Async a -> Async a #

Ord a => Ord (ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Methods

compare :: ZipList a -> ZipList a -> Ordering #

(<) :: ZipList a -> ZipList a -> Bool #

(<=) :: ZipList a -> ZipList a -> Bool #

(>) :: ZipList a -> ZipList a -> Bool #

(>=) :: ZipList a -> ZipList a -> Bool #

max :: ZipList a -> ZipList a -> ZipList a #

min :: ZipList a -> ZipList a -> ZipList a #

Ord a => Ord (Identity a)

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

compare :: Identity a -> Identity a -> Ordering #

(<) :: Identity a -> Identity a -> Bool #

(<=) :: Identity a -> Identity a -> Bool #

(>) :: Identity a -> Identity a -> Bool #

(>=) :: Identity a -> Identity a -> Bool #

max :: Identity a -> Identity a -> Identity a #

min :: Identity a -> Identity a -> Identity a #

Ord a => Ord (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

compare :: First a -> First a -> Ordering #

(<) :: First a -> First a -> Bool #

(<=) :: First a -> First a -> Bool #

(>) :: First a -> First a -> Bool #

(>=) :: First a -> First a -> Bool #

max :: First a -> First a -> First a #

min :: First a -> First a -> First a #

Ord a => Ord (Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

compare :: Last a -> Last a -> Ordering #

(<) :: Last a -> Last a -> Bool #

(<=) :: Last a -> Last a -> Bool #

(>) :: Last a -> Last a -> Bool #

(>=) :: Last a -> Last a -> Bool #

max :: Last a -> Last a -> Last a #

min :: Last a -> Last a -> Last a #

Ord a => Ord (Down a)

Since: base-4.6.0.0

Instance details

Defined in Data.Ord

Methods

compare :: Down a -> Down a -> Ordering #

(<) :: Down a -> Down a -> Bool #

(<=) :: Down a -> Down a -> Bool #

(>) :: Down a -> Down a -> Bool #

(>=) :: Down a -> Down a -> Bool #

max :: Down a -> Down a -> Down a #

min :: Down a -> Down a -> Down a #

Ord a => Ord (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

compare :: First a -> First a -> Ordering #

(<) :: First a -> First a -> Bool #

(<=) :: First a -> First a -> Bool #

(>) :: First a -> First a -> Bool #

(>=) :: First a -> First a -> Bool #

max :: First a -> First a -> First a #

min :: First a -> First a -> First a #

Ord a => Ord (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

compare :: Last a -> Last a -> Ordering #

(<) :: Last a -> Last a -> Bool #

(<=) :: Last a -> Last a -> Bool #

(>) :: Last a -> Last a -> Bool #

(>=) :: Last a -> Last a -> Bool #

max :: Last a -> Last a -> Last a #

min :: Last a -> Last a -> Last a #

Ord a => Ord (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

compare :: Max a -> Max a -> Ordering #

(<) :: Max a -> Max a -> Bool #

(<=) :: Max a -> Max a -> Bool #

(>) :: Max a -> Max a -> Bool #

(>=) :: Max a -> Max a -> Bool #

max :: Max a -> Max a -> Max a #

min :: Max a -> Max a -> Max a #

Ord a => Ord (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

compare :: Min a -> Min a -> Ordering #

(<) :: Min a -> Min a -> Bool #

(<=) :: Min a -> Min a -> Bool #

(>) :: Min a -> Min a -> Bool #

(>=) :: Min a -> Min a -> Bool #

max :: Min a -> Min a -> Min a #

min :: Min a -> Min a -> Min a #

Ord m => Ord (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Ord a => Ord (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: Dual a -> Dual a -> Ordering #

(<) :: Dual a -> Dual a -> Bool #

(<=) :: Dual a -> Dual a -> Bool #

(>) :: Dual a -> Dual a -> Bool #

(>=) :: Dual a -> Dual a -> Bool #

max :: Dual a -> Dual a -> Dual a #

min :: Dual a -> Dual a -> Dual a #

Ord a => Ord (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: Product a -> Product a -> Ordering #

(<) :: Product a -> Product a -> Bool #

(<=) :: Product a -> Product a -> Bool #

(>) :: Product a -> Product a -> Bool #

(>=) :: Product a -> Product a -> Bool #

max :: Product a -> Product a -> Product a #

min :: Product a -> Product a -> Product a #

Ord a => Ord (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: Sum a -> Sum a -> Ordering #

(<) :: Sum a -> Sum a -> Bool #

(<=) :: Sum a -> Sum a -> Bool #

(>) :: Sum a -> Sum a -> Bool #

(>=) :: Sum a -> Sum a -> Bool #

max :: Sum a -> Sum a -> Sum a #

min :: Sum a -> Sum a -> Sum a #

Ord a => Ord (NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

compare :: NonEmpty a -> NonEmpty a -> Ordering #

(<) :: NonEmpty a -> NonEmpty a -> Bool #

(<=) :: NonEmpty a -> NonEmpty a -> Bool #

(>) :: NonEmpty a -> NonEmpty a -> Bool #

(>=) :: NonEmpty a -> NonEmpty a -> Bool #

max :: NonEmpty a -> NonEmpty a -> NonEmpty a #

min :: NonEmpty a -> NonEmpty a -> NonEmpty a #

Ord p => Ord (Par1 p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: Par1 p -> Par1 p -> Ordering #

(<) :: Par1 p -> Par1 p -> Bool #

(<=) :: Par1 p -> Par1 p -> Bool #

(>) :: Par1 p -> Par1 p -> Bool #

(>=) :: Par1 p -> Par1 p -> Bool #

max :: Par1 p -> Par1 p -> Par1 p #

min :: Par1 p -> Par1 p -> Par1 p #

Integral a => Ord (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

compare :: Ratio a -> Ratio a -> Ordering #

(<) :: Ratio a -> Ratio a -> Bool #

(<=) :: Ratio a -> Ratio a -> Bool #

(>) :: Ratio a -> Ratio a -> Bool #

(>=) :: Ratio a -> Ratio a -> Bool #

max :: Ratio a -> Ratio a -> Ratio a #

min :: Ratio a -> Ratio a -> Ratio a #

Ord (Bits n) 
Instance details

Defined in Basement.Bits

Methods

compare :: Bits n -> Bits n -> Ordering #

(<) :: Bits n -> Bits n -> Bool #

(<=) :: Bits n -> Bits n -> Bool #

(>) :: Bits n -> Bits n -> Bool #

(>=) :: Bits n -> Bits n -> Bool #

max :: Bits n -> Bits n -> Bits n #

min :: Bits n -> Bits n -> Bits n #

(PrimType ty, Ord ty) => Ord (Block ty) 
Instance details

Defined in Basement.Block.Base

Methods

compare :: Block ty -> Block ty -> Ordering #

(<) :: Block ty -> Block ty -> Bool #

(<=) :: Block ty -> Block ty -> Bool #

(>) :: Block ty -> Block ty -> Bool #

(>=) :: Block ty -> Block ty -> Bool #

max :: Block ty -> Block ty -> Block ty #

min :: Block ty -> Block ty -> Block ty #

Ord (Zn n) 
Instance details

Defined in Basement.Bounded

Methods

compare :: Zn n -> Zn n -> Ordering #

(<) :: Zn n -> Zn n -> Bool #

(<=) :: Zn n -> Zn n -> Bool #

(>) :: Zn n -> Zn n -> Bool #

(>=) :: Zn n -> Zn n -> Bool #

max :: Zn n -> Zn n -> Zn n #

min :: Zn n -> Zn n -> Zn n #

Ord (Zn64 n) 
Instance details

Defined in Basement.Bounded

Methods

compare :: Zn64 n -> Zn64 n -> Ordering #

(<) :: Zn64 n -> Zn64 n -> Bool #

(<=) :: Zn64 n -> Zn64 n -> Bool #

(>) :: Zn64 n -> Zn64 n -> Bool #

(>=) :: Zn64 n -> Zn64 n -> Bool #

max :: Zn64 n -> Zn64 n -> Zn64 n #

min :: Zn64 n -> Zn64 n -> Zn64 n #

Ord (CountOf ty) 
Instance details

Defined in Basement.Types.OffsetSize

Methods

compare :: CountOf ty -> CountOf ty -> Ordering #

(<) :: CountOf ty -> CountOf ty -> Bool #

(<=) :: CountOf ty -> CountOf ty -> Bool #

(>) :: CountOf ty -> CountOf ty -> Bool #

(>=) :: CountOf ty -> CountOf ty -> Bool #

max :: CountOf ty -> CountOf ty -> CountOf ty #

min :: CountOf ty -> CountOf ty -> CountOf ty #

Ord (Offset ty) 
Instance details

Defined in Basement.Types.OffsetSize

Methods

compare :: Offset ty -> Offset ty -> Ordering #

(<) :: Offset ty -> Offset ty -> Bool #

(<=) :: Offset ty -> Offset ty -> Bool #

(>) :: Offset ty -> Offset ty -> Bool #

(>=) :: Offset ty -> Offset ty -> Bool #

max :: Offset ty -> Offset ty -> Offset ty #

min :: Offset ty -> Offset ty -> Offset ty #

(PrimType ty, Ord ty) => Ord (UArray ty) 
Instance details

Defined in Basement.UArray.Base

Methods

compare :: UArray ty -> UArray ty -> Ordering #

(<) :: UArray ty -> UArray ty -> Bool #

(<=) :: UArray ty -> UArray ty -> Bool #

(>) :: UArray ty -> UArray ty -> Bool #

(>=) :: UArray ty -> UArray ty -> Bool #

max :: UArray ty -> UArray ty -> UArray ty #

min :: UArray ty -> UArray ty -> UArray ty #

Ord s => Ord (CI s) 
Instance details

Defined in Data.CaseInsensitive.Internal

Methods

compare :: CI s -> CI s -> Ordering #

(<) :: CI s -> CI s -> Bool #

(<=) :: CI s -> CI s -> Bool #

(>) :: CI s -> CI s -> Bool #

(>=) :: CI s -> CI s -> Bool #

max :: CI s -> CI s -> CI s #

min :: CI s -> CI s -> CI s #

Ord a => Ord (Flush a) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

compare :: Flush a -> Flush a -> Ordering #

(<) :: Flush a -> Flush a -> Bool #

(<=) :: Flush a -> Flush a -> Bool #

(>) :: Flush a -> Flush a -> Bool #

(>=) :: Flush a -> Flush a -> Bool #

max :: Flush a -> Flush a -> Flush a #

min :: Flush a -> Flush a -> Flush a #

Ord a => Ord (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

compare :: IntMap a -> IntMap a -> Ordering #

(<) :: IntMap a -> IntMap a -> Bool #

(<=) :: IntMap a -> IntMap a -> Bool #

(>) :: IntMap a -> IntMap a -> Bool #

(>=) :: IntMap a -> IntMap a -> Bool #

max :: IntMap a -> IntMap a -> IntMap a #

min :: IntMap a -> IntMap a -> IntMap a #

Ord a => Ord (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

compare :: Seq a -> Seq a -> Ordering #

(<) :: Seq a -> Seq a -> Bool #

(<=) :: Seq a -> Seq a -> Bool #

(>) :: Seq a -> Seq a -> Bool #

(>=) :: Seq a -> Seq a -> Bool #

max :: Seq a -> Seq a -> Seq a #

min :: Seq a -> Seq a -> Seq a #

Ord a => Ord (ViewL a) 
Instance details

Defined in Data.Sequence.Internal

Methods

compare :: ViewL a -> ViewL a -> Ordering #

(<) :: ViewL a -> ViewL a -> Bool #

(<=) :: ViewL a -> ViewL a -> Bool #

(>) :: ViewL a -> ViewL a -> Bool #

(>=) :: ViewL a -> ViewL a -> Bool #

max :: ViewL a -> ViewL a -> ViewL a #

min :: ViewL a -> ViewL a -> ViewL a #

Ord a => Ord (ViewR a) 
Instance details

Defined in Data.Sequence.Internal

Methods

compare :: ViewR a -> ViewR a -> Ordering #

(<) :: ViewR a -> ViewR a -> Bool #

(<=) :: ViewR a -> ViewR a -> Bool #

(>) :: ViewR a -> ViewR a -> Bool #

(>=) :: ViewR a -> ViewR a -> Bool #

max :: ViewR a -> ViewR a -> ViewR a #

min :: ViewR a -> ViewR a -> ViewR a #

Ord a => Ord (Intersection a) 
Instance details

Defined in Data.Set.Internal

Ord a => Ord (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

compare :: Set a -> Set a -> Ordering #

(<) :: Set a -> Set a -> Bool #

(<=) :: Set a -> Set a -> Bool #

(>) :: Set a -> Set a -> Bool #

(>=) :: Set a -> Set a -> Bool #

max :: Set a -> Set a -> Set a #

min :: Set a -> Set a -> Set a #

Ord a => Ord (Tree a)

Since: containers-0.6.5

Instance details

Defined in Data.Tree

Methods

compare :: Tree a -> Tree a -> Ordering #

(<) :: Tree a -> Tree a -> Bool #

(<=) :: Tree a -> Tree a -> Bool #

(>) :: Tree a -> Tree a -> Bool #

(>=) :: Tree a -> Tree a -> Bool #

max :: Tree a -> Tree a -> Tree a #

min :: Tree a -> Tree a -> Tree a #

Ord (Digest a) 
Instance details

Defined in Crypto.Hash.Types

Methods

compare :: Digest a -> Digest a -> Ordering #

(<) :: Digest a -> Digest a -> Bool #

(<=) :: Digest a -> Digest a -> Bool #

(>) :: Digest a -> Digest a -> Bool #

(>=) :: Digest a -> Digest a -> Bool #

max :: Digest a -> Digest a -> Digest a #

min :: Digest a -> Digest a -> Digest a #

Ord (Digest a) 
Instance details

Defined in Crypto.Hash.Types

Methods

compare :: Digest a -> Digest a -> Ordering #

(<) :: Digest a -> Digest a -> Bool #

(<=) :: Digest a -> Digest a -> Bool #

(>) :: Digest a -> Digest a -> Bool #

(>=) :: Digest a -> Digest a -> Bool #

max :: Digest a -> Digest a -> Digest a #

min :: Digest a -> Digest a -> Digest a #

Ord1 f => Ord (Fix f) 
Instance details

Defined in Data.Fix

Methods

compare :: Fix f -> Fix f -> Ordering #

(<) :: Fix f -> Fix f -> Bool #

(<=) :: Fix f -> Fix f -> Bool #

(>) :: Fix f -> Fix f -> Bool #

(>=) :: Fix f -> Fix f -> Bool #

max :: Fix f -> Fix f -> Fix f #

min :: Fix f -> Fix f -> Fix f #

(Functor f, Ord1 f) => Ord (Mu f) 
Instance details

Defined in Data.Fix

Methods

compare :: Mu f -> Mu f -> Ordering #

(<) :: Mu f -> Mu f -> Bool #

(<=) :: Mu f -> Mu f -> Bool #

(>) :: Mu f -> Mu f -> Bool #

(>=) :: Mu f -> Mu f -> Bool #

max :: Mu f -> Mu f -> Mu f #

min :: Mu f -> Mu f -> Mu f #

(Functor f, Ord1 f) => Ord (Nu f) 
Instance details

Defined in Data.Fix

Methods

compare :: Nu f -> Nu f -> Ordering #

(<) :: Nu f -> Nu f -> Bool #

(<=) :: Nu f -> Nu f -> Bool #

(>) :: Nu f -> Nu f -> Bool #

(>=) :: Nu f -> Nu f -> Bool #

max :: Nu f -> Nu f -> Nu f #

min :: Nu f -> Nu f -> Nu f #

Ord a => Ord (DNonEmpty a) 
Instance details

Defined in Data.DList.DNonEmpty.Internal

Ord a => Ord (DList a) 
Instance details

Defined in Data.DList.Internal

Methods

compare :: DList a -> DList a -> Ordering #

(<) :: DList a -> DList a -> Bool #

(<=) :: DList a -> DList a -> Bool #

(>) :: DList a -> DList a -> Bool #

(>=) :: DList a -> DList a -> Bool #

max :: DList a -> DList a -> DList a #

min :: DList a -> DList a -> DList a #

Ord a => Ord (Value a) 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Methods

compare :: Value a -> Value a -> Ordering #

(<) :: Value a -> Value a -> Bool #

(<=) :: Value a -> Value a -> Bool #

(>) :: Value a -> Value a -> Bool #

(>=) :: Value a -> Value a -> Bool #

max :: Value a -> Value a -> Value a #

min :: Value a -> Value a -> Value a #

Ord a => Ord (ValueList a) 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Ord a => Ord (Hashed a) 
Instance details

Defined in Data.Hashable.Class

Methods

compare :: Hashed a -> Hashed a -> Ordering #

(<) :: Hashed a -> Hashed a -> Bool #

(<=) :: Hashed a -> Hashed a -> Bool #

(>) :: Hashed a -> Hashed a -> Bool #

(>=) :: Hashed a -> Hashed a -> Bool #

max :: Hashed a -> Hashed a -> Hashed a #

min :: Hashed a -> Hashed a -> Hashed a #

Ord a => Ord (LenientData a) 
Instance details

Defined in Web.Internal.HttpApiData

Ord a => Ord (AddrRange a) 
Instance details

Defined in Data.IP.Range

Ord mono => Ord (NonNull mono) 
Instance details

Defined in Data.NonNull

Methods

compare :: NonNull mono -> NonNull mono -> Ordering #

(<) :: NonNull mono -> NonNull mono -> Bool #

(<=) :: NonNull mono -> NonNull mono -> Bool #

(>) :: NonNull mono -> NonNull mono -> Bool #

(>=) :: NonNull mono -> NonNull mono -> Bool #

max :: NonNull mono -> NonNull mono -> NonNull mono #

min :: NonNull mono -> NonNull mono -> NonNull mono #

(Ord (Key record), Ord record) => Ord (Entity record) 
Instance details

Defined in Database.Persist.Class.PersistEntity

Methods

compare :: Entity record -> Entity record -> Ordering #

(<) :: Entity record -> Entity record -> Bool #

(<=) :: Entity record -> Entity record -> Bool #

(>) :: Entity record -> Entity record -> Bool #

(>=) :: Entity record -> Entity record -> Bool #

max :: Entity record -> Entity record -> Entity record #

min :: Entity record -> Entity record -> Entity record #

Ord (Key Bookmark) Source # 
Instance details

Defined in Model

Ord (Key BookmarkTag) Source # 
Instance details

Defined in Model

Ord (Key Note) Source # 
Instance details

Defined in Model

Methods

compare :: Key Note -> Key Note -> Ordering #

(<) :: Key Note -> Key Note -> Bool #

(<=) :: Key Note -> Key Note -> Bool #

(>) :: Key Note -> Key Note -> Bool #

(>=) :: Key Note -> Key Note -> Bool #

max :: Key Note -> Key Note -> Key Note #

min :: Key Note -> Key Note -> Key Note #

Ord (Key User) Source # 
Instance details

Defined in Model

Methods

compare :: Key User -> Key User -> Ordering #

(<) :: Key User -> Key User -> Bool #

(<=) :: Key User -> Key User -> Bool #

(>) :: Key User -> Key User -> Bool #

(>=) :: Key User -> Key User -> Bool #

max :: Key User -> Key User -> Key User #

min :: Key User -> Key User -> Key User #

(BackendCompatible b s, Ord (BackendKey b)) => Ord (BackendKey (Compatible b s)) 
Instance details

Defined in Database.Persist.Compatible.Types

(PersistCore b, PersistCore (RawSqlite b), Ord (BackendKey b)) => Ord (BackendKey (RawSqlite b)) 
Instance details

Defined in Database.Persist.Sqlite

Ord a => Ord (Single a) 
Instance details

Defined in Database.Persist.Sql.Types

Methods

compare :: Single a -> Single a -> Ordering #

(<) :: Single a -> Single a -> Bool #

(<=) :: Single a -> Single a -> Bool #

(>) :: Single a -> Single a -> Bool #

(>=) :: Single a -> Single a -> Bool #

max :: Single a -> Single a -> Single a #

min :: Single a -> Single a -> Single a #

Ord a => Ord (Array a)

Lexicographic ordering. Subject to change between major versions.

Instance details

Defined in Data.Primitive.Array

Methods

compare :: Array a -> Array a -> Ordering #

(<) :: Array a -> Array a -> Bool #

(<=) :: Array a -> Array a -> Bool #

(>) :: Array a -> Array a -> Bool #

(>=) :: Array a -> Array a -> Bool #

max :: Array a -> Array a -> Array a #

min :: Array a -> Array a -> Array a #

(Ord a, Prim a) => Ord (PrimArray a)

Lexicographic ordering. Subject to change between major versions.

Since: primitive-0.6.4.0

Instance details

Defined in Data.Primitive.PrimArray

Ord a => Ord (SmallArray a)

Lexicographic ordering. Subject to change between major versions.

Instance details

Defined in Data.Primitive.SmallArray

Ord g => Ord (StateGen g) 
Instance details

Defined in System.Random.Internal

Methods

compare :: StateGen g -> StateGen g -> Ordering #

(<) :: StateGen g -> StateGen g -> Bool #

(<=) :: StateGen g -> StateGen g -> Bool #

(>) :: StateGen g -> StateGen g -> Bool #

(>=) :: StateGen g -> StateGen g -> Bool #

max :: StateGen g -> StateGen g -> StateGen g #

min :: StateGen g -> StateGen g -> StateGen g #

Ord g => Ord (AtomicGen g) 
Instance details

Defined in System.Random.Stateful

Ord g => Ord (IOGen g) 
Instance details

Defined in System.Random.Stateful

Methods

compare :: IOGen g -> IOGen g -> Ordering #

(<) :: IOGen g -> IOGen g -> Bool #

(<=) :: IOGen g -> IOGen g -> Bool #

(>) :: IOGen g -> IOGen g -> Bool #

(>=) :: IOGen g -> IOGen g -> Bool #

max :: IOGen g -> IOGen g -> IOGen g #

min :: IOGen g -> IOGen g -> IOGen g #

Ord g => Ord (STGen g) 
Instance details

Defined in System.Random.Stateful

Methods

compare :: STGen g -> STGen g -> Ordering #

(<) :: STGen g -> STGen g -> Bool #

(<=) :: STGen g -> STGen g -> Bool #

(>) :: STGen g -> STGen g -> Bool #

(>=) :: STGen g -> STGen g -> Bool #

max :: STGen g -> STGen g -> STGen g #

min :: STGen g -> STGen g -> STGen g #

Ord g => Ord (TGen g) 
Instance details

Defined in System.Random.Stateful

Methods

compare :: TGen g -> TGen g -> Ordering #

(<) :: TGen g -> TGen g -> Bool #

(<=) :: TGen g -> TGen g -> Bool #

(>) :: TGen g -> TGen g -> Bool #

(>=) :: TGen g -> TGen g -> Bool #

max :: TGen g -> TGen g -> TGen g #

min :: TGen g -> TGen g -> TGen g #

Ord a => Ord (Maybe a) 
Instance details

Defined in Data.Strict.Maybe

Methods

compare :: Maybe a -> Maybe a -> Ordering #

(<) :: Maybe a -> Maybe a -> Bool #

(<=) :: Maybe a -> Maybe a -> Bool #

(>) :: Maybe a -> Maybe a -> Bool #

(>=) :: Maybe a -> Maybe a -> Bool #

max :: Maybe a -> Maybe a -> Maybe a #

min :: Maybe a -> Maybe a -> Maybe a #

Ord flag => Ord (TyVarBndr flag) 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: TyVarBndr flag -> TyVarBndr flag -> Ordering #

(<) :: TyVarBndr flag -> TyVarBndr flag -> Bool #

(<=) :: TyVarBndr flag -> TyVarBndr flag -> Bool #

(>) :: TyVarBndr flag -> TyVarBndr flag -> Bool #

(>=) :: TyVarBndr flag -> TyVarBndr flag -> Bool #

max :: TyVarBndr flag -> TyVarBndr flag -> TyVarBndr flag #

min :: TyVarBndr flag -> TyVarBndr flag -> TyVarBndr flag #

Ord a => Ord (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

compare :: HashSet a -> HashSet a -> Ordering #

(<) :: HashSet a -> HashSet a -> Bool #

(<=) :: HashSet a -> HashSet a -> Bool #

(>) :: HashSet a -> HashSet a -> Bool #

(>=) :: HashSet a -> HashSet a -> Bool #

max :: HashSet a -> HashSet a -> HashSet a #

min :: HashSet a -> HashSet a -> HashSet a #

Ord a => Ord (Vector a) 
Instance details

Defined in Data.Vector

Methods

compare :: Vector a -> Vector a -> Ordering #

(<) :: Vector a -> Vector a -> Bool #

(<=) :: Vector a -> Vector a -> Bool #

(>) :: Vector a -> Vector a -> Bool #

(>=) :: Vector a -> Vector a -> Bool #

max :: Vector a -> Vector a -> Vector a #

min :: Vector a -> Vector a -> Vector a #

(Prim a, Ord a) => Ord (Vector a) 
Instance details

Defined in Data.Vector.Primitive

Methods

compare :: Vector a -> Vector a -> Ordering #

(<) :: Vector a -> Vector a -> Bool #

(<=) :: Vector a -> Vector a -> Bool #

(>) :: Vector a -> Vector a -> Bool #

(>=) :: Vector a -> Vector a -> Bool #

max :: Vector a -> Vector a -> Vector a #

min :: Vector a -> Vector a -> Vector a #

(Storable a, Ord a) => Ord (Vector a) 
Instance details

Defined in Data.Vector.Storable

Methods

compare :: Vector a -> Vector a -> Ordering #

(<) :: Vector a -> Vector a -> Bool #

(<=) :: Vector a -> Vector a -> Bool #

(>) :: Vector a -> Vector a -> Bool #

(>=) :: Vector a -> Vector a -> Bool #

max :: Vector a -> Vector a -> Vector a #

min :: Vector a -> Vector a -> Vector a #

Ord (Route LiteApp) 
Instance details

Defined in Yesod.Core.Internal.LiteApp

Ord (Route WaiSubsite) 
Instance details

Defined in Yesod.Core.Types

Ord (Route WaiSubsiteWithAuth) 
Instance details

Defined in Yesod.Core.Types

Ord a => Ord (Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Maybe

Methods

compare :: Maybe a -> Maybe a -> Ordering #

(<) :: Maybe a -> Maybe a -> Bool #

(<=) :: Maybe a -> Maybe a -> Bool #

(>) :: Maybe a -> Maybe a -> Bool #

(>=) :: Maybe a -> Maybe a -> Bool #

max :: Maybe a -> Maybe a -> Maybe a #

min :: Maybe a -> Maybe a -> Maybe a #

Ord a => Ord (a) 
Instance details

Defined in GHC.Classes

Methods

compare :: (a) -> (a) -> Ordering #

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

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

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

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

max :: (a) -> (a) -> (a) #

min :: (a) -> (a) -> (a) #

Ord a => Ord [a] 
Instance details

Defined in GHC.Classes

Methods

compare :: [a] -> [a] -> Ordering #

(<) :: [a] -> [a] -> Bool #

(<=) :: [a] -> [a] -> Bool #

(>) :: [a] -> [a] -> Bool #

(>=) :: [a] -> [a] -> Bool #

max :: [a] -> [a] -> [a] #

min :: [a] -> [a] -> [a] #

(Ord a, Ord b) => Ord (Either a b)

Since: base-2.1

Instance details

Defined in Data.Either

Methods

compare :: Either a b -> Either a b -> Ordering #

(<) :: Either a b -> Either a b -> Bool #

(<=) :: Either a b -> Either a b -> Bool #

(>) :: Either a b -> Either a b -> Bool #

(>=) :: Either a b -> Either a b -> Bool #

max :: Either a b -> Either a b -> Either a b #

min :: Either a b -> Either a b -> Either a b #

Ord (Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Methods

compare :: Fixed a -> Fixed a -> Ordering #

(<) :: Fixed a -> Fixed a -> Bool #

(<=) :: Fixed a -> Fixed a -> Bool #

(>) :: Fixed a -> Fixed a -> Bool #

(>=) :: Fixed a -> Fixed a -> Bool #

max :: Fixed a -> Fixed a -> Fixed a #

min :: Fixed a -> Fixed a -> Fixed a #

Ord (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

compare :: Proxy s -> Proxy s -> Ordering #

(<) :: Proxy s -> Proxy s -> Bool #

(<=) :: Proxy s -> Proxy s -> Bool #

(>) :: Proxy s -> Proxy s -> Bool #

(>=) :: Proxy s -> Proxy s -> Bool #

max :: Proxy s -> Proxy s -> Proxy s #

min :: Proxy s -> Proxy s -> Proxy s #

Ord a => Ord (Arg a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

compare :: Arg a b -> Arg a b -> Ordering #

(<) :: Arg a b -> Arg a b -> Bool #

(<=) :: Arg a b -> Arg a b -> Bool #

(>) :: Arg a b -> Arg a b -> Bool #

(>=) :: Arg a b -> Arg a b -> Bool #

max :: Arg a b -> Arg a b -> Arg a b #

min :: Arg a b -> Arg a b -> Arg a b #

Ord (TypeRep a)

Since: base-4.4.0.0

Instance details

Defined in Data.Typeable.Internal

Methods

compare :: TypeRep a -> TypeRep a -> Ordering #

(<) :: TypeRep a -> TypeRep a -> Bool #

(<=) :: TypeRep a -> TypeRep a -> Bool #

(>) :: TypeRep a -> TypeRep a -> Bool #

(>=) :: TypeRep a -> TypeRep a -> Bool #

max :: TypeRep a -> TypeRep a -> TypeRep a #

min :: TypeRep a -> TypeRep a -> TypeRep a #

Ord (U1 p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: U1 p -> U1 p -> Ordering #

(<) :: U1 p -> U1 p -> Bool #

(<=) :: U1 p -> U1 p -> Bool #

(>) :: U1 p -> U1 p -> Bool #

(>=) :: U1 p -> U1 p -> Bool #

max :: U1 p -> U1 p -> U1 p #

min :: U1 p -> U1 p -> U1 p #

Ord (V1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: V1 p -> V1 p -> Ordering #

(<) :: V1 p -> V1 p -> Bool #

(<=) :: V1 p -> V1 p -> Bool #

(>) :: V1 p -> V1 p -> Bool #

(>=) :: V1 p -> V1 p -> Bool #

max :: V1 p -> V1 p -> V1 p #

min :: V1 p -> V1 p -> V1 p #

(Ord k, Ord v) => Ord (Map k v) 
Instance details

Defined in Data.Map.Internal

Methods

compare :: Map k v -> Map k v -> Ordering #

(<) :: Map k v -> Map k v -> Bool #

(<=) :: Map k v -> Map k v -> Bool #

(>) :: Map k v -> Map k v -> Bool #

(>=) :: Map k v -> Map k v -> Bool #

max :: Map k v -> Map k v -> Map k v #

min :: Map k v -> Map k v -> Map k v #

(Ord1 f, Ord a) => Ord (Cofree f a) 
Instance details

Defined in Control.Comonad.Cofree

Methods

compare :: Cofree f a -> Cofree f a -> Ordering #

(<) :: Cofree f a -> Cofree f a -> Bool #

(<=) :: Cofree f a -> Cofree f a -> Bool #

(>) :: Cofree f a -> Cofree f a -> Bool #

(>=) :: Cofree f a -> Cofree f a -> Bool #

max :: Cofree f a -> Cofree f a -> Cofree f a #

min :: Cofree f a -> Cofree f a -> Cofree f a #

(Ord1 f, Ord a) => Ord (Free f a) 
Instance details

Defined in Control.Monad.Free

Methods

compare :: Free f a -> Free f a -> Ordering #

(<) :: Free f a -> Free f a -> Bool #

(<=) :: Free f a -> Free f a -> Bool #

(>) :: Free f a -> Free f a -> Bool #

(>=) :: Free f a -> Free f a -> Bool #

max :: Free f a -> Free f a -> Free f a #

min :: Free f a -> Free f a -> Free f a #

(Ord a, Ord b) => Ord (Either a b) 
Instance details

Defined in Data.Strict.Either

Methods

compare :: Either a b -> Either a b -> Ordering #

(<) :: Either a b -> Either a b -> Bool #

(<=) :: Either a b -> Either a b -> Bool #

(>) :: Either a b -> Either a b -> Bool #

(>=) :: Either a b -> Either a b -> Bool #

max :: Either a b -> Either a b -> Either a b #

min :: Either a b -> Either a b -> Either a b #

(Ord a, Ord b) => Ord (These a b) 
Instance details

Defined in Data.Strict.These

Methods

compare :: These a b -> These a b -> Ordering #

(<) :: These a b -> These a b -> Bool #

(<=) :: These a b -> These a b -> Bool #

(>) :: These a b -> These a b -> Bool #

(>=) :: These a b -> These a b -> Bool #

max :: These a b -> These a b -> These a b #

min :: These a b -> These a b -> These a b #

(Ord a, Ord b) => Ord (Pair a b) 
Instance details

Defined in Data.Strict.Tuple

Methods

compare :: Pair a b -> Pair a b -> Ordering #

(<) :: Pair a b -> Pair a b -> Bool #

(<=) :: Pair a b -> Pair a b -> Bool #

(>) :: Pair a b -> Pair a b -> Bool #

(>=) :: Pair a b -> Pair a b -> Bool #

max :: Pair a b -> Pair a b -> Pair a b #

min :: Pair a b -> Pair a b -> Pair a b #

(Ord a, Ord b) => Ord (These a b) 
Instance details

Defined in Data.These

Methods

compare :: These a b -> These a b -> Ordering #

(<) :: These a b -> These a b -> Bool #

(<=) :: These a b -> These a b -> Bool #

(>) :: These a b -> These a b -> Bool #

(>=) :: These a b -> These a b -> Bool #

max :: These a b -> These a b -> These a b #

min :: These a b -> These a b -> These a b #

(Ord1 f, Ord a) => Ord (Lift f a) 
Instance details

Defined in Control.Applicative.Lift

Methods

compare :: Lift f a -> Lift f a -> Ordering #

(<) :: Lift f a -> Lift f a -> Bool #

(<=) :: Lift f a -> Lift f a -> Bool #

(>) :: Lift f a -> Lift f a -> Bool #

(>=) :: Lift f a -> Lift f a -> Bool #

max :: Lift f a -> Lift f a -> Lift f a #

min :: Lift f a -> Lift f a -> Lift f a #

(Ord1 m, Ord a) => Ord (MaybeT m a) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

compare :: MaybeT m a -> MaybeT m a -> Ordering #

(<) :: MaybeT m a -> MaybeT m a -> Bool #

(<=) :: MaybeT m a -> MaybeT m a -> Bool #

(>) :: MaybeT m a -> MaybeT m a -> Bool #

(>=) :: MaybeT m a -> MaybeT m a -> Bool #

max :: MaybeT m a -> MaybeT m a -> MaybeT m a #

min :: MaybeT m a -> MaybeT m a -> MaybeT m a #

(Ord k, Ord v) => Ord (HashMap k v)

The ordering is total and consistent with the Eq instance. However, nothing else about the ordering is specified, and it may change from version to version of either this package or of hashable.

Instance details

Defined in Data.HashMap.Internal

Methods

compare :: HashMap k v -> HashMap k v -> Ordering #

(<) :: HashMap k v -> HashMap k v -> Bool #

(<=) :: HashMap k v -> HashMap k v -> Bool #

(>) :: HashMap k v -> HashMap k v -> Bool #

(>=) :: HashMap k v -> HashMap k v -> Bool #

max :: HashMap k v -> HashMap k v -> HashMap k v #

min :: HashMap k v -> HashMap k v -> HashMap k v #

(Ord a, Ord b) => Ord (a, b) 
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b) -> (a, b) -> Ordering #

(<) :: (a, b) -> (a, b) -> Bool #

(<=) :: (a, b) -> (a, b) -> Bool #

(>) :: (a, b) -> (a, b) -> Bool #

(>=) :: (a, b) -> (a, b) -> Bool #

max :: (a, b) -> (a, b) -> (a, b) #

min :: (a, b) -> (a, b) -> (a, b) #

Ord a => Ord (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

compare :: Const a b -> Const a b -> Ordering #

(<) :: Const a b -> Const a b -> Bool #

(<=) :: Const a b -> Const a b -> Bool #

(>) :: Const a b -> Const a b -> Bool #

(>=) :: Const a b -> Const a b -> Bool #

max :: Const a b -> Const a b -> Const a b #

min :: Const a b -> Const a b -> Const a b #

Ord (f a) => Ord (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

compare :: Ap f a -> Ap f a -> Ordering #

(<) :: Ap f a -> Ap f a -> Bool #

(<=) :: Ap f a -> Ap f a -> Bool #

(>) :: Ap f a -> Ap f a -> Bool #

(>=) :: Ap f a -> Ap f a -> Bool #

max :: Ap f a -> Ap f a -> Ap f a #

min :: Ap f a -> Ap f a -> Ap f a #

Ord (f a) => Ord (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: Alt f a -> Alt f a -> Ordering #

(<) :: Alt f a -> Alt f a -> Bool #

(<=) :: Alt f a -> Alt f a -> Bool #

(>) :: Alt f a -> Alt f a -> Bool #

(>=) :: Alt f a -> Alt f a -> Bool #

max :: Alt f a -> Alt f a -> Alt f a #

min :: Alt f a -> Alt f a -> Alt f a #

(Generic1 f, Ord (Rep1 f a)) => Ord (Generically1 f a)

Since: base-4.18.0.0

Instance details

Defined in GHC.Generics

Ord (f p) => Ord (Rec1 f p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: Rec1 f p -> Rec1 f p -> Ordering #

(<) :: Rec1 f p -> Rec1 f p -> Bool #

(<=) :: Rec1 f p -> Rec1 f p -> Bool #

(>) :: Rec1 f p -> Rec1 f p -> Bool #

(>=) :: Rec1 f p -> Rec1 f p -> Bool #

max :: Rec1 f p -> Rec1 f p -> Rec1 f p #

min :: Rec1 f p -> Rec1 f p -> Rec1 f p #

Ord (URec (Ptr ()) p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: URec (Ptr ()) p -> URec (Ptr ()) p -> Ordering #

(<) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool #

(<=) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool #

(>) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool #

(>=) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool #

max :: URec (Ptr ()) p -> URec (Ptr ()) p -> URec (Ptr ()) p #

min :: URec (Ptr ()) p -> URec (Ptr ()) p -> URec (Ptr ()) p #

Ord (URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: URec Char p -> URec Char p -> Ordering #

(<) :: URec Char p -> URec Char p -> Bool #

(<=) :: URec Char p -> URec Char p -> Bool #

(>) :: URec Char p -> URec Char p -> Bool #

(>=) :: URec Char p -> URec Char p -> Bool #

max :: URec Char p -> URec Char p -> URec Char p #

min :: URec Char p -> URec Char p -> URec Char p #

Ord (URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: URec Double p -> URec Double p -> Ordering #

(<) :: URec Double p -> URec Double p -> Bool #

(<=) :: URec Double p -> URec Double p -> Bool #

(>) :: URec Double p -> URec Double p -> Bool #

(>=) :: URec Double p -> URec Double p -> Bool #

max :: URec Double p -> URec Double p -> URec Double p #

min :: URec Double p -> URec Double p -> URec Double p #

Ord (URec Float p) 
Instance details

Defined in GHC.Generics

Methods

compare :: URec Float p -> URec Float p -> Ordering #

(<) :: URec Float p -> URec Float p -> Bool #

(<=) :: URec Float p -> URec Float p -> Bool #

(>) :: URec Float p -> URec Float p -> Bool #

(>=) :: URec Float p -> URec Float p -> Bool #

max :: URec Float p -> URec Float p -> URec Float p #

min :: URec Float p -> URec Float p -> URec Float p #

Ord (URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: URec Int p -> URec Int p -> Ordering #

(<) :: URec Int p -> URec Int p -> Bool #

(<=) :: URec Int p -> URec Int p -> Bool #

(>) :: URec Int p -> URec Int p -> Bool #

(>=) :: URec Int p -> URec Int p -> Bool #

max :: URec Int p -> URec Int p -> URec Int p #

min :: URec Int p -> URec Int p -> URec Int p #

Ord (URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: URec Word p -> URec Word p -> Ordering #

(<) :: URec Word p -> URec Word p -> Bool #

(<=) :: URec Word p -> URec Word p -> Bool #

(>) :: URec Word p -> URec Word p -> Bool #

(>=) :: URec Word p -> URec Word p -> Bool #

max :: URec Word p -> URec Word p -> URec Word p #

min :: URec Word p -> URec Word p -> URec Word p #

Ord (p a a) => Ord (Join p a) 
Instance details

Defined in Data.Bifunctor.Join

Methods

compare :: Join p a -> Join p a -> Ordering #

(<) :: Join p a -> Join p a -> Bool #

(<=) :: Join p a -> Join p a -> Bool #

(>) :: Join p a -> Join p a -> Bool #

(>=) :: Join p a -> Join p a -> Bool #

max :: Join p a -> Join p a -> Join p a #

min :: Join p a -> Join p a -> Join p a #

(Ord a, Ord (f b)) => Ord (FreeF f a b) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

compare :: FreeF f a b -> FreeF f a b -> Ordering #

(<) :: FreeF f a b -> FreeF f a b -> Bool #

(<=) :: FreeF f a b -> FreeF f a b -> Bool #

(>) :: FreeF f a b -> FreeF f a b -> Bool #

(>=) :: FreeF f a b -> FreeF f a b -> Bool #

max :: FreeF f a b -> FreeF f a b -> FreeF f a b #

min :: FreeF f a b -> FreeF f a b -> FreeF f a b #

(Ord1 f, Ord1 m, Ord a) => Ord (FreeT f m a) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

compare :: FreeT f m a -> FreeT f m a -> Ordering #

(<) :: FreeT f m a -> FreeT f m a -> Bool #

(<=) :: FreeT f m a -> FreeT f m a -> Bool #

(>) :: FreeT f m a -> FreeT f m a -> Bool #

(>=) :: FreeT f m a -> FreeT f m a -> Bool #

max :: FreeT f m a -> FreeT f m a -> FreeT f m a #

min :: FreeT f m a -> FreeT f m a -> FreeT f m a #

Ord b => Ord (Tagged s b) 
Instance details

Defined in Data.Tagged

Methods

compare :: Tagged s b -> Tagged s b -> Ordering #

(<) :: Tagged s b -> Tagged s b -> Bool #

(<=) :: Tagged s b -> Tagged s b -> Bool #

(>) :: Tagged s b -> Tagged s b -> Bool #

(>=) :: Tagged s b -> Tagged s b -> Bool #

max :: Tagged s b -> Tagged s b -> Tagged s b #

min :: Tagged s b -> Tagged s b -> Tagged s b #

(Ord (f a), Ord (g a), Ord a) => Ord (These1 f g a) 
Instance details

Defined in Data.Functor.These

Methods

compare :: These1 f g a -> These1 f g a -> Ordering #

(<) :: These1 f g a -> These1 f g a -> Bool #

(<=) :: These1 f g a -> These1 f g a -> Bool #

(>) :: These1 f g a -> These1 f g a -> Bool #

(>=) :: These1 f g a -> These1 f g a -> Bool #

max :: These1 f g a -> These1 f g a -> These1 f g a #

min :: These1 f g a -> These1 f g a -> These1 f g a #

(Ord1 f, Ord a) => Ord (Backwards f a) 
Instance details

Defined in Control.Applicative.Backwards

Methods

compare :: Backwards f a -> Backwards f a -> Ordering #

(<) :: Backwards f a -> Backwards f a -> Bool #

(<=) :: Backwards f a -> Backwards f a -> Bool #

(>) :: Backwards f a -> Backwards f a -> Bool #

(>=) :: Backwards f a -> Backwards f a -> Bool #

max :: Backwards f a -> Backwards f a -> Backwards f a #

min :: Backwards f a -> Backwards f a -> Backwards f a #

(Ord e, Ord1 m, Ord a) => Ord (ExceptT e m a) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

compare :: ExceptT e m a -> ExceptT e m a -> Ordering #

(<) :: ExceptT e m a -> ExceptT e m a -> Bool #

(<=) :: ExceptT e m a -> ExceptT e m a -> Bool #

(>) :: ExceptT e m a -> ExceptT e m a -> Bool #

(>=) :: ExceptT e m a -> ExceptT e m a -> Bool #

max :: ExceptT e m a -> ExceptT e m a -> ExceptT e m a #

min :: ExceptT e m a -> ExceptT e m a -> ExceptT e m a #

(Ord1 f, Ord a) => Ord (IdentityT f a) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

compare :: IdentityT f a -> IdentityT f a -> Ordering #

(<) :: IdentityT f a -> IdentityT f a -> Bool #

(<=) :: IdentityT f a -> IdentityT f a -> Bool #

(>) :: IdentityT f a -> IdentityT f a -> Bool #

(>=) :: IdentityT f a -> IdentityT f a -> Bool #

max :: IdentityT f a -> IdentityT f a -> IdentityT f a #

min :: IdentityT f a -> IdentityT f a -> IdentityT f a #

(Ord w, Ord1 m, Ord a) => Ord (WriterT w m a) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

compare :: WriterT w m a -> WriterT w m a -> Ordering #

(<) :: WriterT w m a -> WriterT w m a -> Bool #

(<=) :: WriterT w m a -> WriterT w m a -> Bool #

(>) :: WriterT w m a -> WriterT w m a -> Bool #

(>=) :: WriterT w m a -> WriterT w m a -> Bool #

max :: WriterT w m a -> WriterT w m a -> WriterT w m a #

min :: WriterT w m a -> WriterT w m a -> WriterT w m a #

(Ord w, Ord1 m, Ord a) => Ord (WriterT w m a) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

compare :: WriterT w m a -> WriterT w m a -> Ordering #

(<) :: WriterT w m a -> WriterT w m a -> Bool #

(<=) :: WriterT w m a -> WriterT w m a -> Bool #

(>) :: WriterT w m a -> WriterT w m a -> Bool #

(>=) :: WriterT w m a -> WriterT w m a -> Bool #

max :: WriterT w m a -> WriterT w m a -> WriterT w m a #

min :: WriterT w m a -> WriterT w m a -> WriterT w m a #

Ord a => Ord (Constant a b) 
Instance details

Defined in Data.Functor.Constant

Methods

compare :: Constant a b -> Constant a b -> Ordering #

(<) :: Constant a b -> Constant a b -> Bool #

(<=) :: Constant a b -> Constant a b -> Bool #

(>) :: Constant a b -> Constant a b -> Bool #

(>=) :: Constant a b -> Constant a b -> Bool #

max :: Constant a b -> Constant a b -> Constant a b #

min :: Constant a b -> Constant a b -> Constant a b #

(Ord1 f, Ord a) => Ord (Reverse f a) 
Instance details

Defined in Data.Functor.Reverse

Methods

compare :: Reverse f a -> Reverse f a -> Ordering #

(<) :: Reverse f a -> Reverse f a -> Bool #

(<=) :: Reverse f a -> Reverse f a -> Bool #

(>) :: Reverse f a -> Reverse f a -> Bool #

(>=) :: Reverse f a -> Reverse f a -> Bool #

max :: Reverse f a -> Reverse f a -> Reverse f a #

min :: Reverse f a -> Reverse f a -> Reverse f a #

(Ord a, Ord b, Ord c) => Ord (a, b, c) 
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c) -> (a, b, c) -> Ordering #

(<) :: (a, b, c) -> (a, b, c) -> Bool #

(<=) :: (a, b, c) -> (a, b, c) -> Bool #

(>) :: (a, b, c) -> (a, b, c) -> Bool #

(>=) :: (a, b, c) -> (a, b, c) -> Bool #

max :: (a, b, c) -> (a, b, c) -> (a, b, c) #

min :: (a, b, c) -> (a, b, c) -> (a, b, c) #

(Ord (f a), Ord (g a)) => Ord (Product f g a)

Since: base-4.18.0.0

Instance details

Defined in Data.Functor.Product

Methods

compare :: Product f g a -> Product f g a -> Ordering #

(<) :: Product f g a -> Product f g a -> Bool #

(<=) :: Product f g a -> Product f g a -> Bool #

(>) :: Product f g a -> Product f g a -> Bool #

(>=) :: Product f g a -> Product f g a -> Bool #

max :: Product f g a -> Product f g a -> Product f g a #

min :: Product f g a -> Product f g a -> Product f g a #

(Ord (f a), Ord (g a)) => Ord (Sum f g a)

Since: base-4.18.0.0

Instance details

Defined in Data.Functor.Sum

Methods

compare :: Sum f g a -> Sum f g a -> Ordering #

(<) :: Sum f g a -> Sum f g a -> Bool #

(<=) :: Sum f g a -> Sum f g a -> Bool #

(>) :: Sum f g a -> Sum f g a -> Bool #

(>=) :: Sum f g a -> Sum f g a -> Bool #

max :: Sum f g a -> Sum f g a -> Sum f g a #

min :: Sum f g a -> Sum f g a -> Sum f g a #

(Ord (f p), Ord (g p)) => Ord ((f :*: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: (f :*: g) p -> (f :*: g) p -> Ordering #

(<) :: (f :*: g) p -> (f :*: g) p -> Bool #

(<=) :: (f :*: g) p -> (f :*: g) p -> Bool #

(>) :: (f :*: g) p -> (f :*: g) p -> Bool #

(>=) :: (f :*: g) p -> (f :*: g) p -> Bool #

max :: (f :*: g) p -> (f :*: g) p -> (f :*: g) p #

min :: (f :*: g) p -> (f :*: g) p -> (f :*: g) p #

(Ord (f p), Ord (g p)) => Ord ((f :+: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: (f :+: g) p -> (f :+: g) p -> Ordering #

(<) :: (f :+: g) p -> (f :+: g) p -> Bool #

(<=) :: (f :+: g) p -> (f :+: g) p -> Bool #

(>) :: (f :+: g) p -> (f :+: g) p -> Bool #

(>=) :: (f :+: g) p -> (f :+: g) p -> Bool #

max :: (f :+: g) p -> (f :+: g) p -> (f :+: g) p #

min :: (f :+: g) p -> (f :+: g) p -> (f :+: g) p #

Ord c => Ord (K1 i c p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: K1 i c p -> K1 i c p -> Ordering #

(<) :: K1 i c p -> K1 i c p -> Bool #

(<=) :: K1 i c p -> K1 i c p -> Bool #

(>) :: K1 i c p -> K1 i c p -> Bool #

(>=) :: K1 i c p -> K1 i c p -> Bool #

max :: K1 i c p -> K1 i c p -> K1 i c p #

min :: K1 i c p -> K1 i c p -> K1 i c p #

(Ord a, Ord b, Ord c, Ord d) => Ord (a, b, c, d) 
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c, d) -> (a, b, c, d) -> Ordering #

(<) :: (a, b, c, d) -> (a, b, c, d) -> Bool #

(<=) :: (a, b, c, d) -> (a, b, c, d) -> Bool #

(>) :: (a, b, c, d) -> (a, b, c, d) -> Bool #

(>=) :: (a, b, c, d) -> (a, b, c, d) -> Bool #

max :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) #

min :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) #

Ord (f (g a)) => Ord (Compose f g a)

Since: base-4.18.0.0

Instance details

Defined in Data.Functor.Compose

Methods

compare :: Compose f g a -> Compose f g a -> Ordering #

(<) :: Compose f g a -> Compose f g a -> Bool #

(<=) :: Compose f g a -> Compose f g a -> Bool #

(>) :: Compose f g a -> Compose f g a -> Bool #

(>=) :: Compose f g a -> Compose f g a -> Bool #

max :: Compose f g a -> Compose f g a -> Compose f g a #

min :: Compose f g a -> Compose f g a -> Compose f g a #

Ord (f (g p)) => Ord ((f :.: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: (f :.: g) p -> (f :.: g) p -> Ordering #

(<) :: (f :.: g) p -> (f :.: g) p -> Bool #

(<=) :: (f :.: g) p -> (f :.: g) p -> Bool #

(>) :: (f :.: g) p -> (f :.: g) p -> Bool #

(>=) :: (f :.: g) p -> (f :.: g) p -> Bool #

max :: (f :.: g) p -> (f :.: g) p -> (f :.: g) p #

min :: (f :.: g) p -> (f :.: g) p -> (f :.: g) p #

Ord (f p) => Ord (M1 i c f p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: M1 i c f p -> M1 i c f p -> Ordering #

(<) :: M1 i c f p -> M1 i c f p -> Bool #

(<=) :: M1 i c f p -> M1 i c f p -> Bool #

(>) :: M1 i c f p -> M1 i c f p -> Bool #

(>=) :: M1 i c f p -> M1 i c f p -> Bool #

max :: M1 i c f p -> M1 i c f p -> M1 i c f p #

min :: M1 i c f p -> M1 i c f p -> M1 i c f p #

Ord (f a) => Ord (Clown f a b) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

compare :: Clown f a b -> Clown f a b -> Ordering #

(<) :: Clown f a b -> Clown f a b -> Bool #

(<=) :: Clown f a b -> Clown f a b -> Bool #

(>) :: Clown f a b -> Clown f a b -> Bool #

(>=) :: Clown f a b -> Clown f a b -> Bool #

max :: Clown f a b -> Clown f a b -> Clown f a b #

min :: Clown f a b -> Clown f a b -> Clown f a b #

Ord (p b a) => Ord (Flip p a b) 
Instance details

Defined in Data.Bifunctor.Flip

Methods

compare :: Flip p a b -> Flip p a b -> Ordering #

(<) :: Flip p a b -> Flip p a b -> Bool #

(<=) :: Flip p a b -> Flip p a b -> Bool #

(>) :: Flip p a b -> Flip p a b -> Bool #

(>=) :: Flip p a b -> Flip p a b -> Bool #

max :: Flip p a b -> Flip p a b -> Flip p a b #

min :: Flip p a b -> Flip p a b -> Flip p a b #

Ord (g b) => Ord (Joker g a b) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

compare :: Joker g a b -> Joker g a b -> Ordering #

(<) :: Joker g a b -> Joker g a b -> Bool #

(<=) :: Joker g a b -> Joker g a b -> Bool #

(>) :: Joker g a b -> Joker g a b -> Bool #

(>=) :: Joker g a b -> Joker g a b -> Bool #

max :: Joker g a b -> Joker g a b -> Joker g a b #

min :: Joker g a b -> Joker g a b -> Joker g a b #

Ord (p a b) => Ord (WrappedBifunctor p a b) 
Instance details

Defined in Data.Bifunctor.Wrapped

(Ord a, Ord b, Ord c, Ord d, Ord e) => Ord (a, b, c, d, e) 
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c, d, e) -> (a, b, c, d, e) -> Ordering #

(<) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool #

(<=) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool #

(>) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool #

(>=) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool #

max :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) #

min :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) #

(Ord (f a b), Ord (g a b)) => Ord (Product f g a b) 
Instance details

Defined in Data.Bifunctor.Product

Methods

compare :: Product f g a b -> Product f g a b -> Ordering #

(<) :: Product f g a b -> Product f g a b -> Bool #

(<=) :: Product f g a b -> Product f g a b -> Bool #

(>) :: Product f g a b -> Product f g a b -> Bool #

(>=) :: Product f g a b -> Product f g a b -> Bool #

max :: Product f g a b -> Product f g a b -> Product f g a b #

min :: Product f g a b -> Product f g a b -> Product f g a b #

(Ord (p a b), Ord (q a b)) => Ord (Sum p q a b) 
Instance details

Defined in Data.Bifunctor.Sum

Methods

compare :: Sum p q a b -> Sum p q a b -> Ordering #

(<) :: Sum p q a b -> Sum p q a b -> Bool #

(<=) :: Sum p q a b -> Sum p q a b -> Bool #

(>) :: Sum p q a b -> Sum p q a b -> Bool #

(>=) :: Sum p q a b -> Sum p q a b -> Bool #

max :: Sum p q a b -> Sum p q a b -> Sum p q a b #

min :: Sum p q a b -> Sum p q a b -> Sum p q a b #

(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f) => Ord (a, b, c, d, e, f) 
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Ordering #

(<) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool #

(<=) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool #

(>) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool #

(>=) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool #

max :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> (a, b, c, d, e, f) #

min :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> (a, b, c, d, e, f) #

Ord (f (p a b)) => Ord (Tannen f p a b) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

compare :: Tannen f p a b -> Tannen f p a b -> Ordering #

(<) :: Tannen f p a b -> Tannen f p a b -> Bool #

(<=) :: Tannen f p a b -> Tannen f p a b -> Bool #

(>) :: Tannen f p a b -> Tannen f p a b -> Bool #

(>=) :: Tannen f p a b -> Tannen f p a b -> Bool #

max :: Tannen f p a b -> Tannen f p a b -> Tannen f p a b #

min :: Tannen f p a b -> Tannen f p a b -> Tannen f p a b #

(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g) => Ord (a, b, c, d, e, f, g) 
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Ordering #

(<) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool #

(<=) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool #

(>) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool #

(>=) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool #

max :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) #

min :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) #

(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h) => Ord (a, b, c, d, e, f, g, h) 
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Ordering #

(<) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool #

(<=) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool #

(>) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool #

(>=) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool #

max :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) #

min :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) #

Ord (p (f a) (g b)) => Ord (Biff p f g a b) 
Instance details

Defined in Data.Bifunctor.Biff

Methods

compare :: Biff p f g a b -> Biff p f g a b -> Ordering #

(<) :: Biff p f g a b -> Biff p f g a b -> Bool #

(<=) :: Biff p f g a b -> Biff p f g a b -> Bool #

(>) :: Biff p f g a b -> Biff p f g a b -> Bool #

(>=) :: Biff p f g a b -> Biff p f g a b -> Bool #

max :: Biff p f g a b -> Biff p f g a b -> Biff p f g a b #

min :: Biff p f g a b -> Biff p f g a b -> Biff p f g a b #

(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i) => Ord (a, b, c, d, e, f, g, h, i) 
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Ordering #

(<) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool #

(<=) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool #

(>) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool #

(>=) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool #

max :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) #

min :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) #

(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j) => Ord (a, b, c, d, e, f, g, h, i, j) 
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Ordering #

(<) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool #

(<=) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool #

(>) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool #

(>=) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool #

max :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) #

min :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) #

(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k) => Ord (a, b, c, d, e, f, g, h, i, j, k) 
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Ordering #

(<) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool #

(<=) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool #

(>) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool #

(>=) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool #

max :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) #

min :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) #

(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l) => Ord (a, b, c, d, e, f, g, h, i, j, k, l) 
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Ordering #

(<) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool #

(<=) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool #

(>) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool #

(>=) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool #

max :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) #

min :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) #

(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l, Ord m) => Ord (a, b, c, d, e, f, g, h, i, j, k, l, m) 
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Ordering #

(<) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool #

(<=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool #

(>) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool #

(>=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool #

max :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) #

min :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) #

(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l, Ord m, Ord n) => Ord (a, b, c, d, e, f, g, h, i, j, k, l, m, n) 
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Ordering #

(<) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool #

(<=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool #

(>) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool #

(>=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool #

max :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) #

min :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) #

(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l, Ord m, Ord n, Ord o) => Ord (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) 
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Ordering #

(<) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool #

(<=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool #

(>) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool #

(>=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool #

max :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) #

min :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) #

type Rational = Ratio Integer #

Arbitrary-precision rational numbers, represented as a ratio of two Integer values. A rational number may be constructed using the % operator.

class Num a => Fractional a where #

Fractional numbers, supporting real division.

The Haskell Report defines no laws for Fractional. However, (+) and (*) are customarily expected to define a division ring and have the following properties:

recip gives the multiplicative inverse
x * recip x = recip x * x = fromInteger 1
Totality of toRational
toRational is total
Coherence with toRational
if the type also implements Real, then fromRational is a left inverse for toRational, i.e. fromRational (toRational i) = i

Note that it isn't customarily expected that a type instance of Fractional implement a field. However, all instances in base do.

Minimal complete definition

fromRational, (recip | (/))

Methods

(/) :: a -> a -> a infixl 7 #

Fractional division.

recip :: a -> a #

Reciprocal fraction.

fromRational :: Rational -> a #

Conversion from a Rational (that is Ratio Integer). A floating literal stands for an application of fromRational to a value of type Rational, so such literals have type (Fractional a) => a.

Instances

Instances details
Fractional CDouble 
Instance details

Defined in Foreign.C.Types

Fractional CFloat 
Instance details

Defined in Foreign.C.Types

Fractional Scientific

WARNING: recip and / will throw an error when their outputs are repeating decimals.

These methods also compute Integer magnitudes (10^e). If these methods are applied to arguments which have huge exponents this could fill up all space and crash your program! So don't apply these methods to scientific numbers coming from untrusted sources.

fromRational will throw an error when the input Rational is a repeating decimal. Consider using fromRationalRepetend for these rationals which will detect the repetition and indicate where it starts.

Instance details

Defined in Data.Scientific

Fractional AbsoluteSize 
Instance details

Defined in Text.Internal.CssCommon

Fractional EmSize 
Instance details

Defined in Text.Internal.CssCommon

Fractional ExSize 
Instance details

Defined in Text.Internal.CssCommon

Fractional PercentageSize 
Instance details

Defined in Text.Internal.CssCommon

Fractional PixelSize 
Instance details

Defined in Text.Internal.CssCommon

Fractional DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Fractional NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

RealFloat a => Fractional (Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Methods

(/) :: Complex a -> Complex a -> Complex a #

recip :: Complex a -> Complex a #

fromRational :: Rational -> Complex a #

Fractional a => Fractional (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Fractional a => Fractional (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

(/) :: Down a -> Down a -> Down a #

recip :: Down a -> Down a #

fromRational :: Rational -> Down a #

Integral a => Fractional (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

(/) :: Ratio a -> Ratio a -> Ratio a #

recip :: Ratio a -> Ratio a #

fromRational :: Rational -> Ratio a #

HasResolution a => Fractional (Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Methods

(/) :: Fixed a -> Fixed a -> Fixed a #

recip :: Fixed a -> Fixed a #

fromRational :: Rational -> Fixed a #

Fractional a => Fractional (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

(/) :: Const a b -> Const a b -> Const a b #

recip :: Const a b -> Const a b #

fromRational :: Rational -> Const a b #

Fractional a => Fractional (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

(/) :: Tagged s a -> Tagged s a -> Tagged s a #

recip :: Tagged s a -> Tagged s a #

fromRational :: Rational -> Tagged s a #

class (Num a, Ord a) => Real a where #

Real numbers.

The Haskell report defines no laws for Real, however Real instances are customarily expected to adhere to the following law:

Coherence with fromRational
if the type also implements Fractional, then fromRational is a left inverse for toRational, i.e. fromRational (toRational i) = i

Methods

toRational :: a -> Rational #

the rational equivalent of its real argument with full precision

Instances

Instances details
Real CBool 
Instance details

Defined in Foreign.C.Types

Methods

toRational :: CBool -> Rational #

Real CChar 
Instance details

Defined in Foreign.C.Types

Methods

toRational :: CChar -> Rational #

Real CClock 
Instance details

Defined in Foreign.C.Types

Real CDouble 
Instance details

Defined in Foreign.C.Types

Real CFloat 
Instance details

Defined in Foreign.C.Types

Real CInt 
Instance details

Defined in Foreign.C.Types

Methods

toRational :: CInt -> Rational #

Real CIntMax 
Instance details

Defined in Foreign.C.Types

Real CIntPtr 
Instance details

Defined in Foreign.C.Types

Real CLLong 
Instance details

Defined in Foreign.C.Types

Real CLong 
Instance details

Defined in Foreign.C.Types

Methods

toRational :: CLong -> Rational #

Real CPtrdiff 
Instance details

Defined in Foreign.C.Types

Real CSChar 
Instance details

Defined in Foreign.C.Types

Real CSUSeconds 
Instance details

Defined in Foreign.C.Types

Real CShort 
Instance details

Defined in Foreign.C.Types

Real CSigAtomic 
Instance details

Defined in Foreign.C.Types

Real CSize 
Instance details

Defined in Foreign.C.Types

Methods

toRational :: CSize -> Rational #

Real CTime 
Instance details

Defined in Foreign.C.Types

Methods

toRational :: CTime -> Rational #

Real CUChar 
Instance details

Defined in Foreign.C.Types

Real CUInt 
Instance details

Defined in Foreign.C.Types

Methods

toRational :: CUInt -> Rational #

Real CUIntMax 
Instance details

Defined in Foreign.C.Types

Real CUIntPtr 
Instance details

Defined in Foreign.C.Types

Real CULLong 
Instance details

Defined in Foreign.C.Types

Real CULong 
Instance details

Defined in Foreign.C.Types

Real CUSeconds 
Instance details

Defined in Foreign.C.Types

Real CUShort 
Instance details

Defined in Foreign.C.Types

Real CWchar 
Instance details

Defined in Foreign.C.Types

Real Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

toRational :: Int16 -> Rational #

Real Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

toRational :: Int32 -> Rational #

Real Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

toRational :: Int64 -> Rational #

Real Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

toRational :: Int8 -> Rational #

Real Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Real Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Real Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Real Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

toRational :: Word8 -> Rational #

Real PortNumber 
Instance details

Defined in Network.Socket.Types

Real Scientific

WARNING: toRational needs to compute the Integer magnitude: 10^e. If applied to a huge exponent this could fill up all space and crash your program!

Avoid applying toRational (or realToFrac) to scientific numbers coming from an untrusted source and use toRealFloat instead. The latter guards against excessive space usage.

Instance details

Defined in Data.Scientific

Real DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Real NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Real Integer

Since: base-2.0.1

Instance details

Defined in GHC.Real

Real Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Real

Real Int

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

toRational :: Int -> Rational #

Real Word

Since: base-2.1

Instance details

Defined in GHC.Real

Methods

toRational :: Word -> Rational #

Real a => Real (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Methods

toRational :: Identity a -> Rational #

Real a => Real (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

toRational :: Down a -> Rational #

Integral a => Real (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

toRational :: Ratio a -> Rational #

(BackendCompatible b s, Real (BackendKey b)) => Real (BackendKey (Compatible b s)) 
Instance details

Defined in Database.Persist.Compatible.Types

(PersistCore b, PersistCore (RawSqlite b), Real (BackendKey b)) => Real (BackendKey (RawSqlite b)) 
Instance details

Defined in Database.Persist.Sqlite

HasResolution a => Real (Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Methods

toRational :: Fixed a -> Rational #

Real a => Real (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

toRational :: Const a b -> Rational #

Real a => Real (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

toRational :: Tagged s a -> Rational #

class Eq a where #

The Eq class defines equality (==) and inequality (/=). All the basic datatypes exported by the Prelude are instances of Eq, and Eq may be derived for any datatype whose constituents are also instances of Eq.

The Haskell Report defines no laws for Eq. However, instances are encouraged to follow these properties:

Reflexivity
x == x = True
Symmetry
x == y = y == x
Transitivity
if x == y && y == z = True, then x == z = True
Extensionality
if x == y = True and f is a function whose return type is an instance of Eq, then f x == f y = True
Negation
x /= y = not (x == y)

Minimal complete definition: either == or /=.

Minimal complete definition

(==) | (/=)

Methods

(==) :: a -> a -> Bool infix 4 #

(/=) :: a -> a -> Bool infix 4 #

Instances

Instances details
Eq Key 
Instance details

Defined in Data.Aeson.Key

Methods

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

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

Eq DotNetTime 
Instance details

Defined in Data.Aeson.Types.Internal

Eq JSONPathElement 
Instance details

Defined in Data.Aeson.Types.Internal

Eq SumEncoding 
Instance details

Defined in Data.Aeson.Types.Internal

Eq Value 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

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

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

Eq AsyncCancelled 
Instance details

Defined in Control.Concurrent.Async.Internal

Eq More 
Instance details

Defined in Data.Attoparsec.Internal.Types

Methods

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

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

Eq Pos 
Instance details

Defined in Data.Attoparsec.Internal.Types

Methods

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

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

Eq ByteArray

Since: base-4.17.0.0

Instance details

Defined in Data.Array.Byte

Eq All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

Eq Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

Eq SomeTypeRep 
Instance details

Defined in Data.Typeable.Internal

Eq Version

Since: base-2.1

Instance details

Defined in Data.Version

Methods

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

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

Eq CBool 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CChar 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CClock 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CDouble 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CFloat 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CInt 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CIntMax 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CIntPtr 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CLLong 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CLong 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CPtrdiff 
Instance details

Defined in Foreign.C.Types

Eq CSChar 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CSUSeconds 
Instance details

Defined in Foreign.C.Types

Eq CShort 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CSigAtomic 
Instance details

Defined in Foreign.C.Types

Eq CSize 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CTime 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CUChar 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CUInt 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CUIntMax 
Instance details

Defined in Foreign.C.Types

Eq CUIntPtr 
Instance details

Defined in Foreign.C.Types

Eq CULLong 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CULong 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CUSeconds 
Instance details

Defined in Foreign.C.Types

Eq CUShort 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CWchar 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq Void

Since: base-4.8.0.0

Instance details

Defined in GHC.Base

Methods

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

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

Eq ByteOrder

Since: base-4.11.0.0

Instance details

Defined in GHC.ByteOrder

Eq BlockReason

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Eq ThreadId

Since: base-4.2.0.0

Instance details

Defined in GHC.Conc.Sync

Eq ThreadStatus

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Eq ErrorCall

Since: base-4.7.0.0

Instance details

Defined in GHC.Exception

Eq ArithException

Since: base-3.0

Instance details

Defined in GHC.Exception.Type

Eq Associativity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Eq DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq Fixity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

Eq SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq MaskingState

Since: base-4.3.0.0

Instance details

Defined in GHC.IO

Eq IODeviceType

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Device

Eq SeekMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Device

Eq ArrayException

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Exception

Eq AsyncException

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Exception

Eq ExitCode 
Instance details

Defined in GHC.IO.Exception

Eq IOErrorType

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Eq IOException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Eq BufferMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Handle.Types

Eq Handle

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Handle.Types

Methods

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

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

Eq Newline

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Handle.Types

Methods

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

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

Eq NewlineMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Handle.Types

Eq IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

Methods

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

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

Eq Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

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

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

Eq Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

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

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

Eq Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

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

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

Eq Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

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

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

Eq IoSubSystem 
Instance details

Defined in GHC.RTS.Flags

Eq SrcLoc

Since: base-4.9.0.0

Instance details

Defined in GHC.Stack.Types

Methods

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

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

Eq SomeChar 
Instance details

Defined in GHC.TypeLits

Eq SomeSymbol

Since: base-4.7.0.0

Instance details

Defined in GHC.TypeLits

Eq SomeNat

Since: base-4.7.0.0

Instance details

Defined in GHC.TypeNats

Methods

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

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

Eq GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Unicode

Eq Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

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

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

Eq Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

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

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

Eq Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

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

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

Eq Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

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

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

Eq Lexeme

Since: base-2.1

Instance details

Defined in Text.Read.Lex

Methods

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

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

Eq Number

Since: base-4.6.0.0

Instance details

Defined in Text.Read.Lex

Methods

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

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

Eq Encoding 
Instance details

Defined in Basement.String

Eq ASCII7_Invalid 
Instance details

Defined in Basement.String.Encoding.ASCII7

Methods

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

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

Eq ISO_8859_1_Invalid 
Instance details

Defined in Basement.String.Encoding.ISO_8859_1

Methods

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

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

Eq UTF16_Invalid 
Instance details

Defined in Basement.String.Encoding.UTF16

Methods

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

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

Eq UTF32_Invalid 
Instance details

Defined in Basement.String.Encoding.UTF32

Methods

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

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

Eq FileSize 
Instance details

Defined in Basement.Types.OffsetSize

Eq String 
Instance details

Defined in Basement.UTF8.Base

Methods

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

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

Eq HashingPolicy 
Instance details

Defined in Crypto.BCrypt

Eq ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

Eq ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Eq ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Eq IV 
Instance details

Defined in Web.ClientSession

Methods

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

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

Eq Key 
Instance details

Defined in Web.ClientSession

Methods

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

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

Eq IntSet 
Instance details

Defined in Data.IntSet.Internal

Methods

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

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

Eq SameSiteOption 
Instance details

Defined in Web.Cookie

Eq SetCookie 
Instance details

Defined in Web.Cookie

Eq SharedSecret 
Instance details

Defined in Crypto.ECC

Eq CryptoError 
Instance details

Defined in Crypto.Error.Types

Eq CryptoError 
Instance details

Defined in Crypto.Error.Types

Eq EmailAddress 
Instance details

Defined in Text.Email.Parser

Eq NoteForm Source # 
Instance details

Defined in Handler.Notes

Eq AccountSettingsForm Source # 
Instance details

Defined in Model

Eq Bookmark Source # 
Instance details

Defined in Model

Eq BookmarkForm Source # 
Instance details

Defined in Model

Eq BookmarkTag Source # 
Instance details

Defined in Model

Eq FFBookmarkNode Source # 
Instance details

Defined in Model

Eq FileBookmark Source # 
Instance details

Defined in Model

Eq FileNote Source # 
Instance details

Defined in Model

Eq FilterP Source # 
Instance details

Defined in Model

Methods

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

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

Eq Note Source # 
Instance details

Defined in Model

Methods

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

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

Eq SharedP Source # 
Instance details

Defined in Model

Methods

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

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

Eq TagCloudMode Source # 
Instance details

Defined in Model

Eq TagsP Source # 
Instance details

Defined in Model

Methods

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

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

Eq UTCTimeStr Source # 
Instance details

Defined in Model

Eq UnreadOnly Source # 
Instance details

Defined in Model

Eq User Source # 
Instance details

Defined in Model

Methods

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

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

Eq UserNameP Source # 
Instance details

Defined in Model

Eq BCrypt Source # 
Instance details

Defined in ModelCustom

Methods

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

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

Eq BmSlug Source # 
Instance details

Defined in ModelCustom

Methods

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

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

Eq HashedApiKey Source # 
Instance details

Defined in ModelCustom

Eq NtSlug Source # 
Instance details

Defined in ModelCustom

Methods

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

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

Eq CommonTableExpressionKind 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Eq Ident 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Methods

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

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

Eq JoinKind 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Eq LimitClause 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Eq NeedParens 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Eq OnClauseWithoutMatchingJoinException 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Eq OnLockedBehavior 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Eq PostgresRowLevelLockStrength 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Eq LogStr 
Instance details

Defined in System.Log.FastLogger.LogStr

Methods

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

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

Eq OsChar

Byte equality of the internal representation.

Instance details

Defined in System.OsString.Internal.Types

Methods

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

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

Eq OsString

Byte equality of the internal representation.

Instance details

Defined in System.OsString.Internal.Types

Eq PosixChar 
Instance details

Defined in System.OsString.Internal.Types

Eq PosixString 
Instance details

Defined in System.OsString.Internal.Types

Eq WindowsChar 
Instance details

Defined in System.OsString.Internal.Types

Eq WindowsString 
Instance details

Defined in System.OsString.Internal.Types

Eq BigNat 
Instance details

Defined in GHC.Num.BigNat

Methods

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

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

Eq ForeignSrcLang 
Instance details

Defined in GHC.ForeignSrcLang.Type

Eq Extension 
Instance details

Defined in GHC.LanguageExtensions.Type

Eq Module 
Instance details

Defined in GHC.Classes

Methods

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

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

Eq Ordering 
Instance details

Defined in GHC.Classes

Eq TrName 
Instance details

Defined in GHC.Classes

Methods

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

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

Eq TyCon 
Instance details

Defined in GHC.Classes

Methods

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

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

Eq Colour 
Instance details

Defined in Language.Haskell.HsColour.ColourHighlight

Methods

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

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

Eq Highlight 
Instance details

Defined in Language.Haskell.HsColour.ColourHighlight

Eq ColourPrefs 
Instance details

Defined in Language.Haskell.HsColour.Colourise

Eq Output 
Instance details

Defined in Language.Haskell.HsColour.Output

Methods

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

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

Eq TerminalType 
Instance details

Defined in Language.Haskell.HsColour.Output

Eq Form 
Instance details

Defined in Web.Internal.FormUrlEncoded

Methods

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

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

Eq ConnHost 
Instance details

Defined in Network.HTTP.Client.Types

Eq ConnKey 
Instance details

Defined in Network.HTTP.Client.Types

Methods

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

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

Eq MaxHeaderLength 
Instance details

Defined in Network.HTTP.Client.Types

Eq Proxy 
Instance details

Defined in Network.HTTP.Client.Types

Methods

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

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

Eq ProxySecureMode 
Instance details

Defined in Network.HTTP.Client.Types

Eq ResponseTimeout 
Instance details

Defined in Network.HTTP.Client.Types

Eq StatusHeaders 
Instance details

Defined in Network.HTTP.Client.Types

Eq StreamFileStatus 
Instance details

Defined in Network.HTTP.Client.Types

Eq DigestAuthExceptionDetails 
Instance details

Defined in Network.HTTP.Client.TLS

Eq ByteRange

Since: http-types-0.8.4

Instance details

Defined in Network.HTTP.Types.Header

Eq StdMethod 
Instance details

Defined in Network.HTTP.Types.Method

Eq Status

A Status is equal to another Status if the status codes are equal.

Instance details

Defined in Network.HTTP.Types.Status

Methods

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

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

Eq EscapeItem 
Instance details

Defined in Network.HTTP.Types.URI

Eq HttpVersion 
Instance details

Defined in Network.HTTP.Types.Version

Eq IP

Equality over IP addresses. Correctly compare IPv4 and IPv4-embedded-in-IPv6 addresses.

>>> (read "2001:db8:00:00:00:00:00:01" :: IP) == (read "2001:db8:00:00:00:00:00:01" :: IP)
True
>>> (read "2001:db8:00:00:00:00:00:01" :: IP) == (read "2001:db8:00:00:00:00:00:05" :: IP)
False
>>> (read "127.0.0.1" :: IP) == (read "127.0.0.1" :: IP)
True
>>> (read "127.0.0.1" :: IP) == (read "10.0.0.1" :: IP)
False
>>> (read "::ffff:127.0.0.1" :: IP) == (read "127.0.0.1" :: IP)
True
>>> (read "::ffff:127.0.0.1" :: IP) == (read "127.0.0.9" :: IP)
False
>>> (read "::ffff:127.0.0.1" :: IP) >= (read "127.0.0.1" :: IP)
True
>>> (read "::ffff:127.0.0.1" :: IP) <= (read "127.0.0.1" :: IP)
True
Instance details

Defined in Data.IP.Addr

Methods

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

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

Eq IPv4 
Instance details

Defined in Data.IP.Addr

Methods

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

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

Eq IPv6 
Instance details

Defined in Data.IP.Addr

Methods

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

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

Eq IPRange 
Instance details

Defined in Data.IP.Range

Methods

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

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

Eq LogLevel 
Instance details

Defined in Control.Monad.Logger

Eq AddrInfo 
Instance details

Defined in Network.Socket.Info

Eq AddrInfoFlag 
Instance details

Defined in Network.Socket.Info

Eq NameInfoFlag 
Instance details

Defined in Network.Socket.Info

Eq Family 
Instance details

Defined in Network.Socket.Types

Methods

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

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

Eq PortNumber 
Instance details

Defined in Network.Socket.Types

Eq SockAddr 
Instance details

Defined in Network.Socket.Types

Eq Socket 
Instance details

Defined in Network.Socket.Types

Methods

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

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

Eq SocketType 
Instance details

Defined in Network.Socket.Types

Eq URI 
Instance details

Defined in Network.URI

Methods

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

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

Eq URIAuth 
Instance details

Defined in Network.URI

Methods

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

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

Eq OverflowNatural 
Instance details

Defined in Database.Persist.Class.PersistField

Eq ConstraintNameDB 
Instance details

Defined in Database.Persist.Names

Eq ConstraintNameHS 
Instance details

Defined in Database.Persist.Names

Eq EntityNameDB 
Instance details

Defined in Database.Persist.Names

Eq EntityNameHS 
Instance details

Defined in Database.Persist.Names

Eq FieldNameDB 
Instance details

Defined in Database.Persist.Names

Eq FieldNameHS 
Instance details

Defined in Database.Persist.Names

Eq LiteralType 
Instance details

Defined in Database.Persist.PersistValue

Eq PersistValue 
Instance details

Defined in Database.Persist.PersistValue

Eq ForeignFieldReference 
Instance details

Defined in Database.Persist.Quasi.Internal

Eq Line 
Instance details

Defined in Database.Persist.Quasi.Internal

Methods

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

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

Eq LinesWithComments 
Instance details

Defined in Database.Persist.Quasi.Internal

Eq PrimarySpec 
Instance details

Defined in Database.Persist.Quasi.Internal

Eq Token 
Instance details

Defined in Database.Persist.Quasi.Internal

Methods

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

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

Eq UnboundCompositeDef 
Instance details

Defined in Database.Persist.Quasi.Internal

Eq UnboundEntityDef 
Instance details

Defined in Database.Persist.Quasi.Internal

Eq UnboundFieldDef 
Instance details

Defined in Database.Persist.Quasi.Internal

Eq UnboundForeignDef 
Instance details

Defined in Database.Persist.Quasi.Internal

Eq UnboundForeignFieldList 
Instance details

Defined in Database.Persist.Quasi.Internal

Eq UnboundIdDef 
Instance details

Defined in Database.Persist.Quasi.Internal

Eq Column 
Instance details

Defined in Database.Persist.Sql.Types

Methods

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

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

Eq ColumnReference 
Instance details

Defined in Database.Persist.Sql.Types

Eq IsolationLevel 
Instance details

Defined in Database.Persist.SqlBackend.Internal.IsolationLevel

Eq CascadeAction 
Instance details

Defined in Database.Persist.Types.Base

Eq Checkmark 
Instance details

Defined in Database.Persist.Types.Base

Eq CompositeDef 
Instance details

Defined in Database.Persist.Types.Base

Eq EmbedEntityDef 
Instance details

Defined in Database.Persist.Types.Base

Eq EmbedFieldDef 
Instance details

Defined in Database.Persist.Types.Base

Eq EntityDef 
Instance details

Defined in Database.Persist.Types.Base

Eq EntityIdDef 
Instance details

Defined in Database.Persist.Types.Base

Eq FieldAttr 
Instance details

Defined in Database.Persist.Types.Base

Eq FieldCascade 
Instance details

Defined in Database.Persist.Types.Base

Eq FieldDef 
Instance details

Defined in Database.Persist.Types.Base

Eq FieldType 
Instance details

Defined in Database.Persist.Types.Base

Eq FieldTypeLit 
Instance details

Defined in Database.Persist.Types.Base

Eq ForeignDef 
Instance details

Defined in Database.Persist.Types.Base

Eq IsNullable 
Instance details

Defined in Database.Persist.Types.Base

Eq ReferenceDef 
Instance details

Defined in Database.Persist.Types.Base

Eq SelfEmbed 
Instance details

Defined in Database.Persist.Types.Base

Methods

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

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

Eq SqlType 
Instance details

Defined in Database.Persist.Types.Base

Methods

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

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

Eq UniqueDef 
Instance details

Defined in Database.Persist.Types.Base

Eq WhyNullable 
Instance details

Defined in Database.Persist.Types.Base

Eq ForeignKeyViolation 
Instance details

Defined in Database.Persist.Sqlite

Eq Mode 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

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

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

Eq Style 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

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

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

Eq TextDetails 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Eq Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Methods

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

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

Eq StdGen 
Instance details

Defined in System.Random.Internal

Methods

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

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

Eq Scientific

Scientific numbers can be safely compared for equality. No magnitude 10^e is calculated so there's no risk of a blowup in space or time when comparing scientific numbers coming from untrusted sources.

Instance details

Defined in Data.Scientific

Eq Binding 
Instance details

Defined in Text.Hamlet.Parse

Methods

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

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

Eq Content 
Instance details

Defined in Text.Hamlet.Parse

Methods

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

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

Eq DataConstr 
Instance details

Defined in Text.Hamlet.Parse

Methods

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

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

Eq Doc 
Instance details

Defined in Text.Hamlet.Parse

Methods

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

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

Eq Line 
Instance details

Defined in Text.Hamlet.Parse

Methods

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

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

Eq Module 
Instance details

Defined in Text.Hamlet.Parse

Methods

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

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

Eq Content 
Instance details

Defined in Text.Internal.Css

Methods

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

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

Eq AbsoluteSize 
Instance details

Defined in Text.Internal.CssCommon

Eq AbsoluteUnit 
Instance details

Defined in Text.Internal.CssCommon

Eq EmSize 
Instance details

Defined in Text.Internal.CssCommon

Methods

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

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

Eq ExSize 
Instance details

Defined in Text.Internal.CssCommon

Methods

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

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

Eq PercentageSize 
Instance details

Defined in Text.Internal.CssCommon

Eq PixelSize 
Instance details

Defined in Text.Internal.CssCommon

Eq Content 
Instance details

Defined in Text.Shakespeare

Methods

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

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

Eq VarType 
Instance details

Defined in Text.Shakespeare

Methods

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

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

Eq Deref 
Instance details

Defined in Text.Shakespeare.Base

Methods

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

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

Eq Ident 
Instance details

Defined in Text.Shakespeare.Base

Methods

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

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

Eq HostPreference 
Instance details

Defined in Data.Streaming.Network.Internal

Eq AnnLookup 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq AnnTarget 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Bang 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Body 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Bytes 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Callconv 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Clause 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Con 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Dec 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq DecidedStrictness 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq DerivClause 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq DerivStrategy 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq DocLoc 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Exp 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq FamilyResultSig 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Fixity 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq FixityDirection 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Foreign 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq FunDep 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Guard 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Info 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq InjectivityAnn 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Inline 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Lit 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Loc 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Match 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq ModName 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Module 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq ModuleInfo 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Name 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq NameFlavour 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq NameSpace 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq OccName 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Overlap 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Pat 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq PatSynArgs 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq PatSynDir 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Phases 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq PkgName 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Pragma 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Range 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Role 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq RuleBndr 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq RuleMatch 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Safety 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq SourceStrictness 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq SourceUnpackedness 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Specificity 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Stmt 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq TyLit 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq TySynEqn 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Type 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq TypeFamilyHead 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Builder 
Instance details

Defined in Data.Text.Internal.Builder

Methods

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

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

Eq B 
Instance details

Defined in Data.Text.Short.Internal

Methods

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

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

Eq ShortText 
Instance details

Defined in Data.Text.Short.Internal

Eq ConstructorInfo 
Instance details

Defined in Language.Haskell.TH.Datatype

Eq ConstructorVariant 
Instance details

Defined in Language.Haskell.TH.Datatype

Eq DatatypeInfo 
Instance details

Defined in Language.Haskell.TH.Datatype

Eq DatatypeVariant 
Instance details

Defined in Language.Haskell.TH.Datatype

Eq FieldStrictness 
Instance details

Defined in Language.Haskell.TH.Datatype

Eq Strictness 
Instance details

Defined in Language.Haskell.TH.Datatype

Eq Unpackedness 
Instance details

Defined in Language.Haskell.TH.Datatype

Eq Day 
Instance details

Defined in Data.Time.Calendar.Days

Methods

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

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

Eq DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Eq NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Eq UTCTime 
Instance details

Defined in Data.Time.Clock.Internal.UTCTime

Methods

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

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

Eq TimeLocale 
Instance details

Defined in Data.Time.Format.Locale

Eq LocalTime 
Instance details

Defined in Data.Time.LocalTime.Internal.LocalTime

Eq TimeOfDay 
Instance details

Defined in Data.Time.LocalTime.Internal.TimeOfDay

Eq StringException

Since: unliftio-0.2.19

Instance details

Defined in UnliftIO.Exception

Eq ConcException 
Instance details

Defined in UnliftIO.Internals.Async

Eq UUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

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

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

Eq UnpackedUUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

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

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

Eq Piece 
Instance details

Defined in WaiAppStatic.Types

Methods

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

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

Eq GzipFiles 
Instance details

Defined in Network.Wai.Middleware.Gzip

Eq Bound 
Instance details

Defined in Network.Wai.Parse

Methods

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

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

Eq RequestParseException 
Instance details

Defined in Network.Wai.Parse

Eq InvalidRequest 
Instance details

Defined in Network.Wai.Handler.Warp.Types

Eq Content 
Instance details

Defined in Data.XML.Types

Methods

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

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

Eq Doctype 
Instance details

Defined in Data.XML.Types

Methods

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

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

Eq Document 
Instance details

Defined in Data.XML.Types

Eq Element 
Instance details

Defined in Data.XML.Types

Methods

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

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

Eq Event 
Instance details

Defined in Data.XML.Types

Methods

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

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

Eq ExternalID 
Instance details

Defined in Data.XML.Types

Eq Instruction 
Instance details

Defined in Data.XML.Types

Eq Miscellaneous 
Instance details

Defined in Data.XML.Types

Eq Name 
Instance details

Defined in Data.XML.Types

Methods

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

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

Eq Node 
Instance details

Defined in Data.XML.Types

Methods

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

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

Eq Prologue 
Instance details

Defined in Data.XML.Types

Eq Warning 
Instance details

Defined in Data.Yaml.Internal

Methods

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

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

Eq Etag 
Instance details

Defined in Yesod.Core.Handler

Methods

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

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

Eq AuthResult 
Instance details

Defined in Yesod.Core.Types

Eq ClientSessionDateCache 
Instance details

Defined in Yesod.Core.Types

Eq ErrorResponse 
Instance details

Defined in Yesod.Core.Types

Eq Header 
Instance details

Defined in Yesod.Core.Types

Methods

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

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

Eq TypeTree 
Instance details

Defined in Yesod.Routes.Parse

Methods

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

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

Eq Textarea 
Instance details

Defined in Yesod.Form.Fields

Eq Enctype 
Instance details

Defined in Yesod.Form.Types

Methods

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

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

Eq FormMessage 
Instance details

Defined in Yesod.Form.Types

Eq CompressionLevel 
Instance details

Defined in Codec.Compression.Zlib.Stream

Eq CompressionStrategy 
Instance details

Defined in Codec.Compression.Zlib.Stream

Eq DictionaryHash 
Instance details

Defined in Codec.Compression.Zlib.Stream

Methods

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

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

Eq Format 
Instance details

Defined in Codec.Compression.Zlib.Stream

Methods

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

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

Eq MemoryLevel 
Instance details

Defined in Codec.Compression.Zlib.Stream

Eq Method 
Instance details

Defined in Codec.Compression.Zlib.Stream

Methods

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

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

Eq WindowBits 
Instance details

Defined in Codec.Compression.Zlib.Stream

Eq Integer 
Instance details

Defined in GHC.Num.Integer

Methods

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

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

Eq Natural 
Instance details

Defined in GHC.Num.Natural

Methods

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

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

Eq () 
Instance details

Defined in GHC.Classes

Methods

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

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

Eq Bool 
Instance details

Defined in GHC.Classes

Methods

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

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

Eq Char 
Instance details

Defined in GHC.Classes

Methods

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

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

Eq Double

Note that due to the presence of NaN, Double's Eq instance does not satisfy reflexivity.

>>> 0/0 == (0/0 :: Double)
False

Also note that Double's Eq instance does not satisfy substitutivity:

>>> 0 == (-0 :: Double)
True
>>> recip 0 == recip (-0 :: Double)
False
Instance details

Defined in GHC.Classes

Methods

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

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

Eq Float

Note that due to the presence of NaN, Float's Eq instance does not satisfy reflexivity.

>>> 0/0 == (0/0 :: Float)
False

Also note that Float's Eq instance does not satisfy extensionality:

>>> 0 == (-0 :: Float)
True
>>> recip 0 == recip (-0 :: Float)
False
Instance details

Defined in GHC.Classes

Methods

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

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

Eq Int 
Instance details

Defined in GHC.Classes

Methods

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

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

Eq Word 
Instance details

Defined in GHC.Classes

Methods

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

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

Eq (Encoding' a) 
Instance details

Defined in Data.Aeson.Encoding.Internal

Methods

(==) :: Encoding' a -> Encoding' a -> Bool #

(/=) :: Encoding' a -> Encoding' a -> Bool #

Eq v => Eq (KeyMap v) 
Instance details

Defined in Data.Aeson.KeyMap

Methods

(==) :: KeyMap v -> KeyMap v -> Bool #

(/=) :: KeyMap v -> KeyMap v -> Bool #

Eq a => Eq (IResult a) 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

(==) :: IResult a -> IResult a -> Bool #

(/=) :: IResult a -> IResult a -> Bool #

Eq a => Eq (Result a) 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

(==) :: Result a -> Result a -> Bool #

(/=) :: Result a -> Result a -> Bool #

Eq (Async a) 
Instance details

Defined in Control.Concurrent.Async.Internal

Methods

(==) :: Async a -> Async a -> Bool #

(/=) :: Async a -> Async a -> Bool #

Eq a => Eq (ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Methods

(==) :: ZipList a -> ZipList a -> Bool #

(/=) :: ZipList a -> ZipList a -> Bool #

Eq (Chan a)

Since: base-4.4.0.0

Instance details

Defined in Control.Concurrent.Chan

Methods

(==) :: Chan a -> Chan a -> Bool #

(/=) :: Chan a -> Chan a -> Bool #

Eq (MutableByteArray s)

Since: base-4.17.0.0

Instance details

Defined in Data.Array.Byte

Eq a => Eq (Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Methods

(==) :: Complex a -> Complex a -> Bool #

(/=) :: Complex a -> Complex a -> Bool #

Eq a => Eq (Identity a)

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

(==) :: Identity a -> Identity a -> Bool #

(/=) :: Identity a -> Identity a -> Bool #

Eq a => Eq (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

(==) :: First a -> First a -> Bool #

(/=) :: First a -> First a -> Bool #

Eq a => Eq (Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

(==) :: Last a -> Last a -> Bool #

(/=) :: Last a -> Last a -> Bool #

Eq a => Eq (Down a)

Since: base-4.6.0.0

Instance details

Defined in Data.Ord

Methods

(==) :: Down a -> Down a -> Bool #

(/=) :: Down a -> Down a -> Bool #

Eq a => Eq (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(==) :: First a -> First a -> Bool #

(/=) :: First a -> First a -> Bool #

Eq a => Eq (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(==) :: Last a -> Last a -> Bool #

(/=) :: Last a -> Last a -> Bool #

Eq a => Eq (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(==) :: Max a -> Max a -> Bool #

(/=) :: Max a -> Max a -> Bool #

Eq a => Eq (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(==) :: Min a -> Min a -> Bool #

(/=) :: Min a -> Min a -> Bool #

Eq m => Eq (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Eq a => Eq (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

(==) :: Dual a -> Dual a -> Bool #

(/=) :: Dual a -> Dual a -> Bool #

Eq a => Eq (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

(==) :: Product a -> Product a -> Bool #

(/=) :: Product a -> Product a -> Bool #

Eq a => Eq (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

(==) :: Sum a -> Sum a -> Bool #

(/=) :: Sum a -> Sum a -> Bool #

Eq a => Eq (NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(==) :: NonEmpty a -> NonEmpty a -> Bool #

(/=) :: NonEmpty a -> NonEmpty a -> Bool #

Eq (TVar a)

Since: base-4.8.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

(==) :: TVar a -> TVar a -> Bool #

(/=) :: TVar a -> TVar a -> Bool #

Eq p => Eq (Par1 p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: Par1 p -> Par1 p -> Bool #

(/=) :: Par1 p -> Par1 p -> Bool #

Eq (IORef a)

Pointer equality.

Since: base-4.0.0.0

Instance details

Defined in GHC.IORef

Methods

(==) :: IORef a -> IORef a -> Bool #

(/=) :: IORef a -> IORef a -> Bool #

Eq (MVar a)

Since: base-4.1.0.0

Instance details

Defined in GHC.MVar

Methods

(==) :: MVar a -> MVar a -> Bool #

(/=) :: MVar a -> MVar a -> Bool #

Eq a => Eq (Ratio a)

Since: base-2.1

Instance details

Defined in GHC.Real

Methods

(==) :: Ratio a -> Ratio a -> Bool #

(/=) :: Ratio a -> Ratio a -> Bool #

Eq (Bits n) 
Instance details

Defined in Basement.Bits

Methods

(==) :: Bits n -> Bits n -> Bool #

(/=) :: Bits n -> Bits n -> Bool #

(PrimType ty, Eq ty) => Eq (Block ty) 
Instance details

Defined in Basement.Block.Base

Methods

(==) :: Block ty -> Block ty -> Bool #

(/=) :: Block ty -> Block ty -> Bool #

Eq (Zn n) 
Instance details

Defined in Basement.Bounded

Methods

(==) :: Zn n -> Zn n -> Bool #

(/=) :: Zn n -> Zn n -> Bool #

Eq (Zn64 n) 
Instance details

Defined in Basement.Bounded

Methods

(==) :: Zn64 n -> Zn64 n -> Bool #

(/=) :: Zn64 n -> Zn64 n -> Bool #

Eq a => Eq (NonEmpty a) 
Instance details

Defined in Basement.NonEmpty

Methods

(==) :: NonEmpty a -> NonEmpty a -> Bool #

(/=) :: NonEmpty a -> NonEmpty a -> Bool #

Eq (CountOf ty) 
Instance details

Defined in Basement.Types.OffsetSize

Methods

(==) :: CountOf ty -> CountOf ty -> Bool #

(/=) :: CountOf ty -> CountOf ty -> Bool #

Eq (Offset ty) 
Instance details

Defined in Basement.Types.OffsetSize

Methods

(==) :: Offset ty -> Offset ty -> Bool #

(/=) :: Offset ty -> Offset ty -> Bool #

(PrimType ty, Eq ty) => Eq (UArray ty) 
Instance details

Defined in Basement.UArray.Base

Methods

(==) :: UArray ty -> UArray ty -> Bool #

(/=) :: UArray ty -> UArray ty -> Bool #

Eq s => Eq (CI s) 
Instance details

Defined in Data.CaseInsensitive.Internal

Methods

(==) :: CI s -> CI s -> Bool #

(/=) :: CI s -> CI s -> Bool #

Eq a => Eq (Flush a) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

(==) :: Flush a -> Flush a -> Bool #

(/=) :: Flush a -> Flush a -> Bool #

Eq a => Eq (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

(==) :: IntMap a -> IntMap a -> Bool #

(/=) :: IntMap a -> IntMap a -> Bool #

Eq a => Eq (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

(==) :: Seq a -> Seq a -> Bool #

(/=) :: Seq a -> Seq a -> Bool #

Eq a => Eq (ViewL a) 
Instance details

Defined in Data.Sequence.Internal

Methods

(==) :: ViewL a -> ViewL a -> Bool #

(/=) :: ViewL a -> ViewL a -> Bool #

Eq a => Eq (ViewR a) 
Instance details

Defined in Data.Sequence.Internal

Methods

(==) :: ViewR a -> ViewR a -> Bool #

(/=) :: ViewR a -> ViewR a -> Bool #

Eq a => Eq (Intersection a) 
Instance details

Defined in Data.Set.Internal

Eq a => Eq (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

(==) :: Set a -> Set a -> Bool #

(/=) :: Set a -> Set a -> Bool #

Eq a => Eq (Tree a) 
Instance details

Defined in Data.Tree

Methods

(==) :: Tree a -> Tree a -> Bool #

(/=) :: Tree a -> Tree a -> Bool #

Eq a => Eq (CryptoFailable a) 
Instance details

Defined in Crypto.Error.Types

Eq (Digest a) 
Instance details

Defined in Crypto.Hash.Types

Methods

(==) :: Digest a -> Digest a -> Bool #

(/=) :: Digest a -> Digest a -> Bool #

Eq a => Eq (CryptoFailable a) 
Instance details

Defined in Crypto.Error.Types

Eq (Digest a) 
Instance details

Defined in Crypto.Hash.Types

Methods

(==) :: Digest a -> Digest a -> Bool #

(/=) :: Digest a -> Digest a -> Bool #

Eq1 f => Eq (Fix f) 
Instance details

Defined in Data.Fix

Methods

(==) :: Fix f -> Fix f -> Bool #

(/=) :: Fix f -> Fix f -> Bool #

(Functor f, Eq1 f) => Eq (Mu f) 
Instance details

Defined in Data.Fix

Methods

(==) :: Mu f -> Mu f -> Bool #

(/=) :: Mu f -> Mu f -> Bool #

(Functor f, Eq1 f) => Eq (Nu f) 
Instance details

Defined in Data.Fix

Methods

(==) :: Nu f -> Nu f -> Bool #

(/=) :: Nu f -> Nu f -> Bool #

Eq a => Eq (DNonEmpty a) 
Instance details

Defined in Data.DList.DNonEmpty.Internal

Methods

(==) :: DNonEmpty a -> DNonEmpty a -> Bool #

(/=) :: DNonEmpty a -> DNonEmpty a -> Bool #

Eq a => Eq (DList a) 
Instance details

Defined in Data.DList.Internal

Methods

(==) :: DList a -> DList a -> Bool #

(/=) :: DList a -> DList a -> Bool #

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

Defined in Model

Eq a => Eq (Value a) 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Methods

(==) :: Value a -> Value a -> Bool #

(/=) :: Value a -> Value a -> Bool #

Eq a => Eq (ValueList a) 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Methods

(==) :: ValueList a -> ValueList a -> Bool #

(/=) :: ValueList a -> ValueList a -> Bool #

Eq a => Eq (Hashed a)

Uses precomputed hash to detect inequality faster

Instance details

Defined in Data.Hashable.Class

Methods

(==) :: Hashed a -> Hashed a -> Bool #

(/=) :: Hashed a -> Hashed a -> Bool #

Eq a => Eq (LenientData a) 
Instance details

Defined in Web.Internal.HttpApiData

Eq a => Eq (AddrRange a) 
Instance details

Defined in Data.IP.Range

Methods

(==) :: AddrRange a -> AddrRange a -> Bool #

(/=) :: AddrRange a -> AddrRange a -> Bool #

Eq mono => Eq (NonNull mono) 
Instance details

Defined in Data.NonNull

Methods

(==) :: NonNull mono -> NonNull mono -> Bool #

(/=) :: NonNull mono -> NonNull mono -> Bool #

(Eq (Key record), Eq record) => Eq (Entity record) 
Instance details

Defined in Database.Persist.Class.PersistEntity

Methods

(==) :: Entity record -> Entity record -> Bool #

(/=) :: Entity record -> Entity record -> Bool #

Eq (Key Bookmark) Source # 
Instance details

Defined in Model

Eq (Key BookmarkTag) Source # 
Instance details

Defined in Model

Eq (Key Note) Source # 
Instance details

Defined in Model

Methods

(==) :: Key Note -> Key Note -> Bool #

(/=) :: Key Note -> Key Note -> Bool #

Eq (Key User) Source # 
Instance details

Defined in Model

Methods

(==) :: Key User -> Key User -> Bool #

(/=) :: Key User -> Key User -> Bool #

(BackendCompatible b s, Eq (BackendKey b)) => Eq (BackendKey (Compatible b s)) 
Instance details

Defined in Database.Persist.Compatible.Types

(PersistCore b, PersistCore (RawSqlite b), Eq (BackendKey b)) => Eq (BackendKey (RawSqlite b)) 
Instance details

Defined in Database.Persist.Sqlite

Eq a => Eq (Single a) 
Instance details

Defined in Database.Persist.Sql.Types

Methods

(==) :: Single a -> Single a -> Bool #

(/=) :: Single a -> Single a -> Bool #

Eq a => Eq (AnnotDetails a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Eq (Doc a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

(==) :: Doc a -> Doc a -> Bool #

(/=) :: Doc a -> Doc a -> Bool #

Eq a => Eq (Span a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

(==) :: Span a -> Span a -> Bool #

(/=) :: Span a -> Span a -> Bool #

Eq a => Eq (Array a) 
Instance details

Defined in Data.Primitive.Array

Methods

(==) :: Array a -> Array a -> Bool #

(/=) :: Array a -> Array a -> Bool #

(Eq a, Prim a) => Eq (PrimArray a)

Since: primitive-0.6.4.0

Instance details

Defined in Data.Primitive.PrimArray

Methods

(==) :: PrimArray a -> PrimArray a -> Bool #

(/=) :: PrimArray a -> PrimArray a -> Bool #

Eq a => Eq (SmallArray a) 
Instance details

Defined in Data.Primitive.SmallArray

Methods

(==) :: SmallArray a -> SmallArray a -> Bool #

(/=) :: SmallArray a -> SmallArray a -> Bool #

Eq g => Eq (StateGen g) 
Instance details

Defined in System.Random.Internal

Methods

(==) :: StateGen g -> StateGen g -> Bool #

(/=) :: StateGen g -> StateGen g -> Bool #

Eq g => Eq (AtomicGen g) 
Instance details

Defined in System.Random.Stateful

Methods

(==) :: AtomicGen g -> AtomicGen g -> Bool #

(/=) :: AtomicGen g -> AtomicGen g -> Bool #

Eq g => Eq (IOGen g) 
Instance details

Defined in System.Random.Stateful

Methods

(==) :: IOGen g -> IOGen g -> Bool #

(/=) :: IOGen g -> IOGen g -> Bool #

Eq g => Eq (STGen g) 
Instance details

Defined in System.Random.Stateful

Methods

(==) :: STGen g -> STGen g -> Bool #

(/=) :: STGen g -> STGen g -> Bool #

Eq g => Eq (TGen g) 
Instance details

Defined in System.Random.Stateful

Methods

(==) :: TGen g -> TGen g -> Bool #

(/=) :: TGen g -> TGen g -> Bool #

Eq v => Eq (Result v) 
Instance details

Defined in Text.Hamlet.Parse

Methods

(==) :: Result v -> Result v -> Bool #

(/=) :: Result v -> Result v -> Bool #

Eq (TBQueue a) 
Instance details

Defined in Control.Concurrent.STM.TBQueue

Methods

(==) :: TBQueue a -> TBQueue a -> Bool #

(/=) :: TBQueue a -> TBQueue a -> Bool #

Eq (TChan a) 
Instance details

Defined in Control.Concurrent.STM.TChan

Methods

(==) :: TChan a -> TChan a -> Bool #

(/=) :: TChan a -> TChan a -> Bool #

Eq (TMVar a) 
Instance details

Defined in Control.Concurrent.STM.TMVar

Methods

(==) :: TMVar a -> TMVar a -> Bool #

(/=) :: TMVar a -> TMVar a -> Bool #

Eq (TQueue a) 
Instance details

Defined in Control.Concurrent.STM.TQueue

Methods

(==) :: TQueue a -> TQueue a -> Bool #

(/=) :: TQueue a -> TQueue a -> Bool #

Eq a => Eq (Maybe a) 
Instance details

Defined in Data.Strict.Maybe

Methods

(==) :: Maybe a -> Maybe a -> Bool #

(/=) :: Maybe a -> Maybe a -> Bool #

Eq flag => Eq (TyVarBndr flag) 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

(==) :: TyVarBndr flag -> TyVarBndr flag -> Bool #

(/=) :: TyVarBndr flag -> TyVarBndr flag -> Bool #

Eq a => Eq (HashSet a)

Note that, in the presence of hash collisions, equal HashSets may behave differently, i.e. extensionality may be violated:

>>> data D = A | B deriving (Eq, Show)
>>> instance Hashable D where hashWithSalt salt _d = salt
>>> x = fromList [A, B]
>>> y = fromList [B, A]
>>> x == y
True
>>> toList x
[A,B]
>>> toList y
[B,A]

In general, the lack of extensionality can be observed with any function that depends on the key ordering, such as folds and traversals.

Instance details

Defined in Data.HashSet.Internal

Methods

(==) :: HashSet a -> HashSet a -> Bool #

(/=) :: HashSet a -> HashSet a -> Bool #

Eq a => Eq (Vector a) 
Instance details

Defined in Data.Vector

Methods

(==) :: Vector a -> Vector a -> Bool #

(/=) :: Vector a -> Vector a -> Bool #

(Prim a, Eq a) => Eq (Vector a) 
Instance details

Defined in Data.Vector.Primitive

Methods

(==) :: Vector a -> Vector a -> Bool #

(/=) :: Vector a -> Vector a -> Bool #

(Storable a, Eq a) => Eq (Vector a) 
Instance details

Defined in Data.Vector.Storable

Methods

(==) :: Vector a -> Vector a -> Bool #

(/=) :: Vector a -> Vector a -> Bool #

Eq c => Eq (FileInfo c) 
Instance details

Defined in Network.Wai.Parse

Methods

(==) :: FileInfo c -> FileInfo c -> Bool #

(/=) :: FileInfo c -> FileInfo c -> Bool #

Eq url => Eq (Location url) 
Instance details

Defined in Yesod.Core.Types

Methods

(==) :: Location url -> Location url -> Bool #

(/=) :: Location url -> Location url -> Bool #

Eq url => Eq (Script url) 
Instance details

Defined in Yesod.Core.Types

Methods

(==) :: Script url -> Script url -> Bool #

(/=) :: Script url -> Script url -> Bool #

Eq url => Eq (Stylesheet url) 
Instance details

Defined in Yesod.Core.Types

Methods

(==) :: Stylesheet url -> Stylesheet url -> Bool #

(/=) :: Stylesheet url -> Stylesheet url -> Bool #

Eq (Route App) Source # 
Instance details

Defined in Foundation

Methods

(==) :: Route App -> Route App -> Bool #

(/=) :: Route App -> Route App -> Bool #

Eq (Route Auth) 
Instance details

Defined in Yesod.Auth.Routes

Methods

(==) :: Route Auth -> Route Auth -> Bool #

(/=) :: Route Auth -> Route Auth -> Bool #

Eq (Route LiteApp) 
Instance details

Defined in Yesod.Core.Internal.LiteApp

Eq (Route WaiSubsite) 
Instance details

Defined in Yesod.Core.Types

Eq (Route WaiSubsiteWithAuth) 
Instance details

Defined in Yesod.Core.Types

Eq (Route Static) 
Instance details

Defined in Yesod.Static

Eq a => Eq (FormResult a) 
Instance details

Defined in Yesod.Form.Types

Methods

(==) :: FormResult a -> FormResult a -> Bool #

(/=) :: FormResult a -> FormResult a -> Bool #

Eq a => Eq (Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Maybe

Methods

(==) :: Maybe a -> Maybe a -> Bool #

(/=) :: Maybe a -> Maybe a -> Bool #

Eq a => Eq (a) 
Instance details

Defined in GHC.Classes

Methods

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

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

Eq a => Eq [a] 
Instance details

Defined in GHC.Classes

Methods

(==) :: [a] -> [a] -> Bool #

(/=) :: [a] -> [a] -> Bool #

(Eq a, Eq b) => Eq (Either a b)

Since: base-2.1

Instance details

Defined in Data.Either

Methods

(==) :: Either a b -> Either a b -> Bool #

(/=) :: Either a b -> Either a b -> Bool #

Eq (Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Methods

(==) :: Fixed a -> Fixed a -> Bool #

(/=) :: Fixed a -> Fixed a -> Bool #

Eq (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

(==) :: Proxy s -> Proxy s -> Bool #

(/=) :: Proxy s -> Proxy s -> Bool #

Eq a => Eq (Arg a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(==) :: Arg a b -> Arg a b -> Bool #

(/=) :: Arg a b -> Arg a b -> Bool #

Eq (TypeRep a)

Since: base-2.1

Instance details

Defined in Data.Typeable.Internal

Methods

(==) :: TypeRep a -> TypeRep a -> Bool #

(/=) :: TypeRep a -> TypeRep a -> Bool #

Eq (U1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: U1 p -> U1 p -> Bool #

(/=) :: U1 p -> U1 p -> Bool #

Eq (V1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: V1 p -> V1 p -> Bool #

(/=) :: V1 p -> V1 p -> Bool #

Eq (STRef s a)

Pointer equality.

Since: base-2.1

Instance details

Defined in GHC.STRef

Methods

(==) :: STRef s a -> STRef s a -> Bool #

(/=) :: STRef s a -> STRef s a -> Bool #

(Eq k, Eq a) => Eq (Map k a) 
Instance details

Defined in Data.Map.Internal

Methods

(==) :: Map k a -> Map k a -> Bool #

(/=) :: Map k a -> Map k a -> Bool #

(Eq a, Eq b) => Eq (a :& b) 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Methods

(==) :: (a :& b) -> (a :& b) -> Bool #

(/=) :: (a :& b) -> (a :& b) -> Bool #

(Eq1 f, Eq a) => Eq (Cofree f a) 
Instance details

Defined in Control.Comonad.Cofree

Methods

(==) :: Cofree f a -> Cofree f a -> Bool #

(/=) :: Cofree f a -> Cofree f a -> Bool #

(Eq1 f, Eq a) => Eq (Free f a) 
Instance details

Defined in Control.Monad.Free

Methods

(==) :: Free f a -> Free f a -> Bool #

(/=) :: Free f a -> Free f a -> Bool #

Eq (MutableArray s a) 
Instance details

Defined in Data.Primitive.Array

Methods

(==) :: MutableArray s a -> MutableArray s a -> Bool #

(/=) :: MutableArray s a -> MutableArray s a -> Bool #

Eq (MutVar s a) 
Instance details

Defined in Data.Primitive.MutVar

Methods

(==) :: MutVar s a -> MutVar s a -> Bool #

(/=) :: MutVar s a -> MutVar s a -> Bool #

Eq (MutablePrimArray s a) 
Instance details

Defined in Data.Primitive.PrimArray

Eq (SmallMutableArray s a) 
Instance details

Defined in Data.Primitive.SmallArray

(Eq a, Eq b) => Eq (Either a b) 
Instance details

Defined in Data.Strict.Either

Methods

(==) :: Either a b -> Either a b -> Bool #

(/=) :: Either a b -> Either a b -> Bool #

(Eq a, Eq b) => Eq (These a b) 
Instance details

Defined in Data.Strict.These

Methods

(==) :: These a b -> These a b -> Bool #

(/=) :: These a b -> These a b -> Bool #

(Eq a, Eq b) => Eq (Pair a b) 
Instance details

Defined in Data.Strict.Tuple

Methods

(==) :: Pair a b -> Pair a b -> Bool #

(/=) :: Pair a b -> Pair a b -> Bool #

(Eq a, Eq b) => Eq (These a b) 
Instance details

Defined in Data.These

Methods

(==) :: These a b -> These a b -> Bool #

(/=) :: These a b -> These a b -> Bool #

(Eq1 f, Eq a) => Eq (Lift f a) 
Instance details

Defined in Control.Applicative.Lift

Methods

(==) :: Lift f a -> Lift f a -> Bool #

(/=) :: Lift f a -> Lift f a -> Bool #

(Eq1 m, Eq a) => Eq (MaybeT m a) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

(==) :: MaybeT m a -> MaybeT m a -> Bool #

(/=) :: MaybeT m a -> MaybeT m a -> Bool #

(Eq k, Eq v) => Eq (HashMap k v)

Note that, in the presence of hash collisions, equal HashMaps may behave differently, i.e. extensionality may be violated:

>>> data D = A | B deriving (Eq, Show)
>>> instance Hashable D where hashWithSalt salt _d = salt
>>> x = fromList [(A,1), (B,2)]
>>> y = fromList [(B,2), (A,1)]
>>> x == y
True
>>> toList x
[(A,1),(B,2)]
>>> toList y
[(B,2),(A,1)]

In general, the lack of extensionality can be observed with any function that depends on the key ordering, such as folds and traversals.

Instance details

Defined in Data.HashMap.Internal

Methods

(==) :: HashMap k v -> HashMap k v -> Bool #

(/=) :: HashMap k v -> HashMap k v -> Bool #

(Eq k, Eq v) => Eq (Leaf k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

(==) :: Leaf k v -> Leaf k v -> Bool #

(/=) :: Leaf k v -> Leaf k v -> Bool #

(Eq a, Eq b) => Eq (a, b) 
Instance details

Defined in GHC.Classes

Methods

(==) :: (a, b) -> (a, b) -> Bool #

(/=) :: (a, b) -> (a, b) -> Bool #

Eq a => Eq (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

(==) :: Const a b -> Const a b -> Bool #

(/=) :: Const a b -> Const a b -> Bool #

Eq (f a) => Eq (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

(==) :: Ap f a -> Ap f a -> Bool #

(/=) :: Ap f a -> Ap f a -> Bool #

Eq (f a) => Eq (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(==) :: Alt f a -> Alt f a -> Bool #

(/=) :: Alt f a -> Alt f a -> Bool #

Eq (OrderingI a b) 
Instance details

Defined in Data.Type.Ord

Methods

(==) :: OrderingI a b -> OrderingI a b -> Bool #

(/=) :: OrderingI a b -> OrderingI a b -> Bool #

(Generic1 f, Eq (Rep1 f a)) => Eq (Generically1 f a)

Since: base-4.18.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: Generically1 f a -> Generically1 f a -> Bool #

(/=) :: Generically1 f a -> Generically1 f a -> Bool #

Eq (f p) => Eq (Rec1 f p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: Rec1 f p -> Rec1 f p -> Bool #

(/=) :: Rec1 f p -> Rec1 f p -> Bool #

Eq (URec (Ptr ()) p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool #

(/=) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool #

Eq (URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: URec Char p -> URec Char p -> Bool #

(/=) :: URec Char p -> URec Char p -> Bool #

Eq (URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: URec Double p -> URec Double p -> Bool #

(/=) :: URec Double p -> URec Double p -> Bool #

Eq (URec Float p) 
Instance details

Defined in GHC.Generics

Methods

(==) :: URec Float p -> URec Float p -> Bool #

(/=) :: URec Float p -> URec Float p -> Bool #

Eq (URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: URec Int p -> URec Int p -> Bool #

(/=) :: URec Int p -> URec Int p -> Bool #

Eq (URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: URec Word p -> URec Word p -> Bool #

(/=) :: URec Word p -> URec Word p -> Bool #

Eq (p a a) => Eq (Join p a) 
Instance details

Defined in Data.Bifunctor.Join

Methods

(==) :: Join p a -> Join p a -> Bool #

(/=) :: Join p a -> Join p a -> Bool #

(Eq a, Eq (f b)) => Eq (FreeF f a b) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

(==) :: FreeF f a b -> FreeF f a b -> Bool #

(/=) :: FreeF f a b -> FreeF f a b -> Bool #

(Eq1 f, Eq1 m, Eq a) => Eq (FreeT f m a) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

(==) :: FreeT f m a -> FreeT f m a -> Bool #

(/=) :: FreeT f m a -> FreeT f m a -> Bool #

Eq b => Eq (Tagged s b) 
Instance details

Defined in Data.Tagged

Methods

(==) :: Tagged s b -> Tagged s b -> Bool #

(/=) :: Tagged s b -> Tagged s b -> Bool #

(Eq (f a), Eq (g a), Eq a) => Eq (These1 f g a) 
Instance details

Defined in Data.Functor.These

Methods

(==) :: These1 f g a -> These1 f g a -> Bool #

(/=) :: These1 f g a -> These1 f g a -> Bool #

(Eq1 f, Eq a) => Eq (Backwards f a) 
Instance details

Defined in Control.Applicative.Backwards

Methods

(==) :: Backwards f a -> Backwards f a -> Bool #

(/=) :: Backwards f a -> Backwards f a -> Bool #

(Eq e, Eq1 m, Eq a) => Eq (ExceptT e m a) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

(==) :: ExceptT e m a -> ExceptT e m a -> Bool #

(/=) :: ExceptT e m a -> ExceptT e m a -> Bool #

(Eq1 f, Eq a) => Eq (IdentityT f a) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

(==) :: IdentityT f a -> IdentityT f a -> Bool #

(/=) :: IdentityT f a -> IdentityT f a -> Bool #

(Eq w, Eq1 m, Eq a) => Eq (WriterT w m a) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

(==) :: WriterT w m a -> WriterT w m a -> Bool #

(/=) :: WriterT w m a -> WriterT w m a -> Bool #

(Eq w, Eq1 m, Eq a) => Eq (WriterT w m a) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

(==) :: WriterT w m a -> WriterT w m a -> Bool #

(/=) :: WriterT w m a -> WriterT w m a -> Bool #

Eq a => Eq (Constant a b) 
Instance details

Defined in Data.Functor.Constant

Methods

(==) :: Constant a b -> Constant a b -> Bool #

(/=) :: Constant a b -> Constant a b -> Bool #

(Eq1 f, Eq a) => Eq (Reverse f a) 
Instance details

Defined in Data.Functor.Reverse

Methods

(==) :: Reverse f a -> Reverse f a -> Bool #

(/=) :: Reverse f a -> Reverse f a -> Bool #

(Eq a, Eq b, Eq c) => Eq (a, b, c) 
Instance details

Defined in GHC.Classes

Methods

(==) :: (a, b, c) -> (a, b, c) -> Bool #

(/=) :: (a, b, c) -> (a, b, c) -> Bool #

(Eq (f a), Eq (g a)) => Eq (Product f g a)

Since: base-4.18.0.0

Instance details

Defined in Data.Functor.Product

Methods

(==) :: Product f g a -> Product f g a -> Bool #

(/=) :: Product f g a -> Product f g a -> Bool #

(Eq (f a), Eq (g a)) => Eq (Sum f g a)

Since: base-4.18.0.0

Instance details

Defined in Data.Functor.Sum

Methods

(==) :: Sum f g a -> Sum f g a -> Bool #

(/=) :: Sum f g a -> Sum f g a -> Bool #

(Eq (f p), Eq (g p)) => Eq ((f :*: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: (f :*: g) p -> (f :*: g) p -> Bool #

(/=) :: (f :*: g) p -> (f :*: g) p -> Bool #

(Eq (f p), Eq (g p)) => Eq ((f :+: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: (f :+: g) p -> (f :+: g) p -> Bool #

(/=) :: (f :+: g) p -> (f :+: g) p -> Bool #

Eq c => Eq (K1 i c p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: K1 i c p -> K1 i c p -> Bool #

(/=) :: K1 i c p -> K1 i c p -> Bool #

(Eq a, Eq b, Eq c, Eq d) => Eq (a, b, c, d) 
Instance details

Defined in GHC.Classes

Methods

(==) :: (a, b, c, d) -> (a, b, c, d) -> Bool #

(/=) :: (a, b, c, d) -> (a, b, c, d) -> Bool #

Eq (f (g a)) => Eq (Compose f g a)

Since: base-4.18.0.0

Instance details

Defined in Data.Functor.Compose

Methods

(==) :: Compose f g a -> Compose f g a -> Bool #

(/=) :: Compose f g a -> Compose f g a -> Bool #

Eq (f (g p)) => Eq ((f :.: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: (f :.: g) p -> (f :.: g) p -> Bool #

(/=) :: (f :.: g) p -> (f :.: g) p -> Bool #

Eq (f p) => Eq (M1 i c f p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: M1 i c f p -> M1 i c f p -> Bool #

(/=) :: M1 i c f p -> M1 i c f p -> Bool #

Eq (f a) => Eq (Clown f a b) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

(==) :: Clown f a b -> Clown f a b -> Bool #

(/=) :: Clown f a b -> Clown f a b -> Bool #

Eq (p b a) => Eq (Flip p a b) 
Instance details

Defined in Data.Bifunctor.Flip

Methods

(==) :: Flip p a b -> Flip p a b -> Bool #

(/=) :: Flip p a b -> Flip p a b -> Bool #

Eq (g b) => Eq (Joker g a b) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

(==) :: Joker g a b -> Joker g a b -> Bool #

(/=) :: Joker g a b -> Joker g a b -> Bool #

Eq (p a b) => Eq (WrappedBifunctor p a b) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

(==) :: WrappedBifunctor p a b -> WrappedBifunctor p a b -> Bool #

(/=) :: WrappedBifunctor p a b -> WrappedBifunctor p a b -> Bool #

(Eq a, Eq b, Eq c, Eq d, Eq e) => Eq (a, b, c, d, e) 
Instance details

Defined in GHC.Classes

Methods

(==) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool #

(/=) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool #

(Eq (f a b), Eq (g a b)) => Eq (Product f g a b) 
Instance details

Defined in Data.Bifunctor.Product

Methods

(==) :: Product f g a b -> Product f g a b -> Bool #

(/=) :: Product f g a b -> Product f g a b -> Bool #

(Eq (p a b), Eq (q a b)) => Eq (Sum p q a b) 
Instance details

Defined in Data.Bifunctor.Sum

Methods

(==) :: Sum p q a b -> Sum p q a b -> Bool #

(/=) :: Sum p q a b -> Sum p q a b -> Bool #

(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f) => Eq (a, b, c, d, e, f) 
Instance details

Defined in GHC.Classes

Methods

(==) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool #

(/=) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool #

Eq (f (p a b)) => Eq (Tannen f p a b) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

(==) :: Tannen f p a b -> Tannen f p a b -> Bool #

(/=) :: Tannen f p a b -> Tannen f p a b -> Bool #

(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g) => Eq (a, b, c, d, e, f, g) 
Instance details

Defined in GHC.Classes

Methods

(==) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool #

(/=) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool #

(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h) => Eq (a, b, c, d, e, f, g, h) 
Instance details

Defined in GHC.Classes

Methods

(==) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool #

(/=) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool #

Eq (p (f a) (g b)) => Eq (Biff p f g a b) 
Instance details

Defined in Data.Bifunctor.Biff

Methods

(==) :: Biff p f g a b -> Biff p f g a b -> Bool #

(/=) :: Biff p f g a b -> Biff p f g a b -> Bool #

(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i) => Eq (a, b, c, d, e, f, g, h, i) 
Instance details

Defined in GHC.Classes

Methods

(==) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool #

(/=) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool #

(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j) => Eq (a, b, c, d, e, f, g, h, i, j) 
Instance details

Defined in GHC.Classes

Methods

(==) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool #

(/=) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool #

(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k) => Eq (a, b, c, d, e, f, g, h, i, j, k) 
Instance details

Defined in GHC.Classes

Methods

(==) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool #

(/=) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool #

(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l) => Eq (a, b, c, d, e, f, g, h, i, j, k, l) 
Instance details

Defined in GHC.Classes

Methods

(==) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool #

(/=) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool #

(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m) => Eq (a, b, c, d, e, f, g, h, i, j, k, l, m) 
Instance details

Defined in GHC.Classes

Methods

(==) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool #

(/=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool #

(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m, Eq n) => Eq (a, b, c, d, e, f, g, h, i, j, k, l, m, n) 
Instance details

Defined in GHC.Classes

Methods

(==) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool #

(/=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool #

(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m, Eq n, Eq o) => Eq (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) 
Instance details

Defined in GHC.Classes

Methods

(==) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool #

(/=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool #

class Monad m => MonadReader r (m :: Type -> Type) | m -> r where #

See examples in Control.Monad.Reader. Note, the partially applied function type (->) r is a simple reader monad. See the instance declaration below.

Minimal complete definition

(ask | reader), local

Methods

ask :: m r #

Retrieves the monad environment.

Instances

Instances details
(Representable f, Rep f ~ a) => MonadReader a (Co f) 
Instance details

Defined in Data.Functor.Rep

Methods

ask :: Co f a #

local :: (a -> a) -> Co f a0 -> Co f a0 #

reader :: (a -> a0) -> Co f a0 #

MonadReader e m => MonadReader e (CatchT m) 
Instance details

Defined in Control.Monad.Catch.Pure

Methods

ask :: CatchT m e #

local :: (e -> e) -> CatchT m a -> CatchT m a #

reader :: (e -> a) -> CatchT m a #

MonadReader e m => MonadReader e (Free m) 
Instance details

Defined in Control.Monad.Free

Methods

ask :: Free m e #

local :: (e -> e) -> Free m a -> Free m a #

reader :: (e -> a) -> Free m a #

MonadReader r m => MonadReader r (LoggingT m) 
Instance details

Defined in Control.Monad.Logger

Methods

ask :: LoggingT m r #

local :: (r -> r) -> LoggingT m a -> LoggingT m a #

reader :: (r -> a) -> LoggingT m a #

MonadReader r m => MonadReader r (NoLoggingT m)

Since: monad-logger-0.3.24

Instance details

Defined in Control.Monad.Logger

Methods

ask :: NoLoggingT m r #

local :: (r -> r) -> NoLoggingT m a -> NoLoggingT m a #

reader :: (r -> a) -> NoLoggingT m a #

MonadReader r m => MonadReader r (ResourceT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

ask :: ResourceT m r #

local :: (r -> r) -> ResourceT m a -> ResourceT m a #

reader :: (r -> a) -> ResourceT m a #

MonadReader r m => MonadReader r (MaybeT m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: MaybeT m r #

local :: (r -> r) -> MaybeT m a -> MaybeT m a #

reader :: (r -> a) -> MaybeT m a #

(Functor f, MonadReader r m) => MonadReader r (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

ask :: FreeT f m r #

local :: (r -> r) -> FreeT f m a -> FreeT f m a #

reader :: (r -> a) -> FreeT f m a #

(Monoid w, MonadReader r m) => MonadReader r (AccumT w m)

Since: mtl-2.3

Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: AccumT w m r #

local :: (r -> r) -> AccumT w m a -> AccumT w m a #

reader :: (r -> a) -> AccumT w m a #

MonadReader r m => MonadReader r (ExceptT e m)

Since: mtl-2.2

Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: ExceptT e m r #

local :: (r -> r) -> ExceptT e m a -> ExceptT e m a #

reader :: (r -> a) -> ExceptT e m a #

MonadReader r m => MonadReader r (IdentityT m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: IdentityT m r #

local :: (r -> r) -> IdentityT m a -> IdentityT m a #

reader :: (r -> a) -> IdentityT m a #

Monad m => MonadReader r (ReaderT r m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: ReaderT r m r #

local :: (r -> r) -> ReaderT r m a -> ReaderT r m a #

reader :: (r -> a) -> ReaderT r m a #

MonadReader r m => MonadReader r (StateT s m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: StateT s m r #

local :: (r -> r) -> StateT s m a -> StateT s m a #

reader :: (r -> a) -> StateT s m a #

MonadReader r m => MonadReader r (StateT s m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: StateT s m r #

local :: (r -> r) -> StateT s m a -> StateT s m a #

reader :: (r -> a) -> StateT s m a #

(Monoid w, MonadReader r m) => MonadReader r (WriterT w m)

Since: mtl-2.3

Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: WriterT w m r #

local :: (r -> r) -> WriterT w m a -> WriterT w m a #

reader :: (r -> a) -> WriterT w m a #

(Monoid w, MonadReader r m) => MonadReader r (WriterT w m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: WriterT w m r #

local :: (r -> r) -> WriterT w m a -> WriterT w m a #

reader :: (r -> a) -> WriterT w m a #

(Monoid w, MonadReader r m) => MonadReader r (WriterT w m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: WriterT w m r #

local :: (r -> r) -> WriterT w m a -> WriterT w m a #

reader :: (r -> a) -> WriterT w m a #

MonadReader r' m => MonadReader r' (SelectT r m)

Since: mtl-2.3

Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: SelectT r m r' #

local :: (r' -> r') -> SelectT r m a -> SelectT r m a #

reader :: (r' -> a) -> SelectT r m a #

MonadReader r m => MonadReader r (ConduitT i o m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

ask :: ConduitT i o m r #

local :: (r -> r) -> ConduitT i o m a -> ConduitT i o m a #

reader :: (r -> a) -> ConduitT i o m a #

MonadReader r ((->) r) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: r -> r #

local :: (r -> r) -> (r -> a) -> r -> a #

reader :: (r -> a) -> r -> a #

MonadReader r' m => MonadReader r' (ContT r m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: ContT r m r' #

local :: (r' -> r') -> ContT r m a -> ContT r m a #

reader :: (r' -> a) -> ContT r m a #

(Monad m, Monoid w) => MonadReader r (RWST r w s m)

Since: mtl-2.3

Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: RWST r w s m r #

local :: (r -> r) -> RWST r w s m a -> RWST r w s m a #

reader :: (r -> a) -> RWST r w s m a #

(Monad m, Monoid w) => MonadReader r (RWST r w s m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: RWST r w s m r #

local :: (r -> r) -> RWST r w s m a -> RWST r w s m a #

reader :: (r -> a) -> RWST r w s m a #

(Monad m, Monoid w) => MonadReader r (RWST r w s m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: RWST r w s m r #

local :: (r -> r) -> RWST r w s m a -> RWST r w s m a #

reader :: (r -> a) -> RWST r w s m a #

MonadReader r m => MonadReader r (Pipe l i o u m) 
Instance details

Defined in Data.Conduit.Internal.Pipe

Methods

ask :: Pipe l i o u m r #

local :: (r -> r) -> Pipe l i o u m a -> Pipe l i o u m a #

reader :: (r -> a) -> Pipe l i o u m a #

MonadReader (WidgetData site) (WidgetFor site) 
Instance details

Defined in Yesod.Core.Types

Methods

ask :: WidgetFor site (WidgetData site) #

local :: (WidgetData site -> WidgetData site) -> WidgetFor site a -> WidgetFor site a #

reader :: (WidgetData site -> a) -> WidgetFor site a #

MonadReader (HandlerData site site) (HandlerFor site) 
Instance details

Defined in Yesod.Core.Types

Methods

ask :: HandlerFor site (HandlerData site site) #

local :: (HandlerData site site -> HandlerData site site) -> HandlerFor site a -> HandlerFor site a #

reader :: (HandlerData site site -> a) -> HandlerFor site a #

MonadReader (HandlerData child master) (SubHandlerFor child master) 
Instance details

Defined in Yesod.Core.Types

Methods

ask :: SubHandlerFor child master (HandlerData child master) #

local :: (HandlerData child master -> HandlerData child master) -> SubHandlerFor child master a -> SubHandlerFor child master a #

reader :: (HandlerData child master -> a) -> SubHandlerFor child master a #

newtype ReaderT r (m :: Type -> Type) a #

The reader monad transformer, which adds a read-only environment to the given monad.

The return function ignores the environment, while >>= passes the inherited environment to both subcomputations.

Constructors

ReaderT 

Fields

Instances

Instances details
Generic1 (ReaderT r m :: Type -> Type) 
Instance details

Defined in Control.Monad.Trans.Reader

Associated Types

type Rep1 (ReaderT r m) :: k -> Type #

Methods

from1 :: forall (a :: k). ReaderT r m a -> Rep1 (ReaderT r m) a #

to1 :: forall (a :: k). Rep1 (ReaderT r m) a -> ReaderT r m a #

MonadBaseControl b m => MonadBaseControl b (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Control

Associated Types

type StM (ReaderT r m) a #

Methods

liftBaseWith :: (RunInBase (ReaderT r m) b -> b a) -> ReaderT r m a #

restoreM :: StM (ReaderT r m) a -> ReaderT r m a #

Monad m => MonadReader r (ReaderT r m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: ReaderT r m r #

local :: (r -> r) -> ReaderT r m a -> ReaderT r m a #

reader :: (r -> a) -> ReaderT r m a #

MonadWriter w m => MonadWriter w (ReaderT r m) 
Instance details

Defined in Control.Monad.Writer.Class

Methods

writer :: (a, w) -> ReaderT r m a #

tell :: w -> ReaderT r m () #

listen :: ReaderT r m a -> ReaderT r m (a, w) #

pass :: ReaderT r m (a, w -> w) -> ReaderT r m a #

MonadTransControl (ReaderT r) 
Instance details

Defined in Control.Monad.Trans.Control

Associated Types

type StT (ReaderT r) a #

Methods

liftWith :: Monad m => (Run (ReaderT r) -> m a) -> ReaderT r m a #

restoreT :: Monad m => m (StT (ReaderT r) a) -> ReaderT r m a #

MonadTrans (ReaderT r) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

lift :: Monad m => m a -> ReaderT r m a #

Representable m => Representable (ReaderT e m) 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep (ReaderT e m) #

Methods

tabulate :: (Rep (ReaderT e m) -> a) -> ReaderT e m a #

index :: ReaderT e m a -> Rep (ReaderT e m) -> a #

MonadFail m => MonadFail (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

fail :: String -> ReaderT r m a #

MonadFix m => MonadFix (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

mfix :: (a -> ReaderT r m a) -> ReaderT r m a #

MonadIO m => MonadIO (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

liftIO :: IO a -> ReaderT r m a #

MonadZip m => MonadZip (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

mzip :: ReaderT r m a -> ReaderT r m b -> ReaderT r m (a, b) #

mzipWith :: (a -> b -> c) -> ReaderT r m a -> ReaderT r m b -> ReaderT r m c #

munzip :: ReaderT r m (a, b) -> (ReaderT r m a, ReaderT r m b) #

Contravariant m => Contravariant (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

contramap :: (a' -> a) -> ReaderT r m a -> ReaderT r m a' #

(>$) :: b -> ReaderT r m b -> ReaderT r m a #

Alternative m => Alternative (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

empty :: ReaderT r m a #

(<|>) :: ReaderT r m a -> ReaderT r m a -> ReaderT r m a #

some :: ReaderT r m a -> ReaderT r m [a] #

many :: ReaderT r m a -> ReaderT r m [a] #

Applicative m => Applicative (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

pure :: a -> ReaderT r m a #

(<*>) :: ReaderT r m (a -> b) -> ReaderT r m a -> ReaderT r m b #

liftA2 :: (a -> b -> c) -> ReaderT r m a -> ReaderT r m b -> ReaderT r m c #

(*>) :: ReaderT r m a -> ReaderT r m b -> ReaderT r m b #

(<*) :: ReaderT r m a -> ReaderT r m b -> ReaderT r m a #

Functor m => Functor (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

fmap :: (a -> b) -> ReaderT r m a -> ReaderT r m b #

(<$) :: a -> ReaderT r m b -> ReaderT r m a #

Monad m => Monad (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

(>>=) :: ReaderT r m a -> (a -> ReaderT r m b) -> ReaderT r m b #

(>>) :: ReaderT r m a -> ReaderT r m b -> ReaderT r m b #

return :: a -> ReaderT r m a #

MonadPlus m => MonadPlus (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

mzero :: ReaderT r m a #

mplus :: ReaderT r m a -> ReaderT r m a -> ReaderT r m a #

Zip m => Zip (ReaderT e m) 
Instance details

Defined in Data.ChunkedZip

Methods

zipWith :: (a -> b -> c) -> ReaderT e m a -> ReaderT e m b -> ReaderT e m c #

zip :: ReaderT e m a -> ReaderT e m b -> ReaderT e m (a, b) #

zap :: ReaderT e m (a -> b) -> ReaderT e m a -> ReaderT e m b #

unzip :: ReaderT e m (a, b) -> (ReaderT e m a, ReaderT e m b) #

MonadCatch m => MonadCatch (ReaderT r m) 
Instance details

Defined in Control.Monad.Catch

Methods

catch :: (HasCallStack, Exception e) => ReaderT r m a -> (e -> ReaderT r m a) -> ReaderT r m a #

MonadMask m => MonadMask (ReaderT r m) 
Instance details

Defined in Control.Monad.Catch

Methods

mask :: HasCallStack => ((forall a. ReaderT r m a -> ReaderT r m a) -> ReaderT r m b) -> ReaderT r m b #

uninterruptibleMask :: HasCallStack => ((forall a. ReaderT r m a -> ReaderT r m a) -> ReaderT r m b) -> ReaderT r m b #

generalBracket :: HasCallStack => ReaderT r m a -> (a -> ExitCase b -> ReaderT r m c) -> (a -> ReaderT r m b) -> ReaderT r m (b, c) #

MonadThrow m => MonadThrow (ReaderT r m) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e) => e -> ReaderT r m a #

Indexable m => Indexable (ReaderT e m) 
Instance details

Defined in Data.Key

Methods

index :: ReaderT e m a -> Key (ReaderT e m) -> a #

Keyed m => Keyed (ReaderT e m) 
Instance details

Defined in Data.Key

Methods

mapWithKey :: (Key (ReaderT e m) -> a -> b) -> ReaderT e m a -> ReaderT e m b #

Lookup m => Lookup (ReaderT e m) 
Instance details

Defined in Data.Key

Methods

lookup :: Key (ReaderT e m) -> ReaderT e m a -> Maybe a #

Zip m => Zip (ReaderT e m) 
Instance details

Defined in Data.Key

Methods

zipWith :: (a -> b -> c) -> ReaderT e m a -> ReaderT e m b -> ReaderT e m c #

zip :: ReaderT e m a -> ReaderT e m b -> ReaderT e m (a, b) #

zap :: ReaderT e m (a -> b) -> ReaderT e m a -> ReaderT e m b #

ZipWithKey m => ZipWithKey (ReaderT e m) 
Instance details

Defined in Data.Key

Methods

zipWithKey :: (Key (ReaderT e m) -> a -> b -> c) -> ReaderT e m a -> ReaderT e m b -> ReaderT e m c #

zapWithKey :: ReaderT e m (Key (ReaderT e m) -> a -> b) -> ReaderT e m a -> ReaderT e m b #

MonadLogger m => MonadLogger (ReaderT r m) 
Instance details

Defined in Control.Monad.Logger

Methods

monadLoggerLog :: ToLogStr msg => Loc -> LogSource -> LogLevel -> msg -> ReaderT r m () #

MonadLoggerIO m => MonadLoggerIO (ReaderT r m) 
Instance details

Defined in Control.Monad.Logger

Methods

askLoggerIO :: ReaderT r m (Loc -> LogSource -> LogLevel -> LogStr -> IO ()) #

PrimMonad m => PrimMonad (ReaderT r m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (ReaderT r m) #

Methods

primitive :: (State# (PrimState (ReaderT r m)) -> (# State# (PrimState (ReaderT r m)), a #)) -> ReaderT r m a #

MonadResource m => MonadResource (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

liftResourceT :: ResourceT IO a -> ReaderT r m a #

MonadUnliftIO m => MonadUnliftIO (ReaderT r m) 
Instance details

Defined in Control.Monad.IO.Unlift

Methods

withRunInIO :: ((forall a. ReaderT r m a -> IO a) -> IO b) -> ReaderT r m b #

MonadHandler m => MonadHandler (ReaderT r m) 
Instance details

Defined in Yesod.Core.Class.Handler

Associated Types

type HandlerSite (ReaderT r m) #

type SubHandlerSite (ReaderT r m) #

MonadWidget m => MonadWidget (ReaderT r m) 
Instance details

Defined in Yesod.Core.Class.Handler

Methods

liftWidget :: WidgetFor (HandlerSite (ReaderT r m)) a -> ReaderT r m a #

Generic (ReaderT r m a) 
Instance details

Defined in Control.Monad.Trans.Reader

Associated Types

type Rep (ReaderT r m a) :: Type -> Type #

Methods

from :: ReaderT r m a -> Rep (ReaderT r m a) x #

to :: Rep (ReaderT r m a) x -> ReaderT r m a #

Functor m => MonoFunctor (ReaderT r m a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (ReaderT r m a) -> Element (ReaderT r m a)) -> ReaderT r m a -> ReaderT r m a #

Applicative m => MonoPointed (ReaderT r m a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (ReaderT r m a) -> ReaderT r m a #

type Rep1 (ReaderT r m :: Type -> Type) 
Instance details

Defined in Control.Monad.Trans.Reader

type Rep1 (ReaderT r m :: Type -> Type) = D1 ('MetaData "ReaderT" "Control.Monad.Trans.Reader" "transformers-0.6.1.0" 'True) (C1 ('MetaCons "ReaderT" 'PrefixI 'True) (S1 ('MetaSel ('Just "runReaderT") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) ((FUN 'Many r :: Type -> Type) :.: Rec1 m)))
type StT (ReaderT r) a 
Instance details

Defined in Control.Monad.Trans.Control

type StT (ReaderT r) a = a
type Rep (ReaderT e m) 
Instance details

Defined in Data.Functor.Rep

type Rep (ReaderT e m) = (e, Rep m)
type Key (ReaderT e m) 
Instance details

Defined in Data.Key

type Key (ReaderT e m) = (e, Key m)
type PrimState (ReaderT r m) 
Instance details

Defined in Control.Monad.Primitive

type PrimState (ReaderT r m) = PrimState m
type HandlerSite (ReaderT r m) 
Instance details

Defined in Yesod.Core.Class.Handler

type SubHandlerSite (ReaderT r m) 
Instance details

Defined in Yesod.Core.Class.Handler

type StM (ReaderT r m) a 
Instance details

Defined in Control.Monad.Trans.Control

type StM (ReaderT r m) a = ComposeSt (ReaderT r) m a
type Rep (ReaderT r m a) 
Instance details

Defined in Control.Monad.Trans.Reader

type Rep (ReaderT r m a) = D1 ('MetaData "ReaderT" "Control.Monad.Trans.Reader" "transformers-0.6.1.0" 'True) (C1 ('MetaCons "ReaderT" 'PrefixI 'True) (S1 ('MetaSel ('Just "runReaderT") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (r -> m a))))
type Element (ReaderT r m a) 
Instance details

Defined in Data.MonoTraversable

type Element (ReaderT r m a) = a

type Reader r = ReaderT r Identity #

The parameterizable reader monad.

Computations are functions of a shared environment.

The return function ignores the environment, while >>= passes the inherited environment to both subcomputations.

data Either a b #

The Either type represents values with two possibilities: a value of type Either a b is either Left a or Right b.

The Either type is sometimes used to represent a value which is either correct or an error; by convention, the Left constructor is used to hold an error value and the Right constructor is used to hold a correct value (mnemonic: "right" also means "correct").

Examples

Expand

The type Either String Int is the type of values which can be either a String or an Int. The Left constructor can be used only on Strings, and the Right constructor can be used only on Ints:

>>> let s = Left "foo" :: Either String Int
>>> s
Left "foo"
>>> let n = Right 3 :: Either String Int
>>> n
Right 3
>>> :type s
s :: Either String Int
>>> :type n
n :: Either String Int

The fmap from our Functor instance will ignore Left values, but will apply the supplied function to values contained in a Right:

>>> let s = Left "foo" :: Either String Int
>>> let n = Right 3 :: Either String Int
>>> fmap (*2) s
Left "foo"
>>> fmap (*2) n
Right 6

The Monad instance for Either allows us to chain together multiple actions which may fail, and fail overall if any of the individual steps failed. First we'll write a function that can either parse an Int from a Char, or fail.

>>> import Data.Char ( digitToInt, isDigit )
>>> :{
    let parseEither :: Char -> Either String Int
        parseEither c
          | isDigit c = Right (digitToInt c)
          | otherwise = Left "parse error"
>>> :}

The following should work, since both '1' and '2' can be parsed as Ints.

>>> :{
    let parseMultiple :: Either String Int
        parseMultiple = do
          x <- parseEither '1'
          y <- parseEither '2'
          return (x + y)
>>> :}
>>> parseMultiple
Right 3

But the following should fail overall, since the first operation where we attempt to parse 'm' as an Int will fail:

>>> :{
    let parseMultiple :: Either String Int
        parseMultiple = do
          x <- parseEither 'm'
          y <- parseEither '2'
          return (x + y)
>>> :}
>>> parseMultiple
Left "parse error"

Constructors

Left a 
Right b 

Instances

Instances details
FromJSON2 Either 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON2 :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Maybe b -> (Value -> Parser b) -> (Value -> Parser [b]) -> Value -> Parser (Either a b) #

liftParseJSONList2 :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Maybe b -> (Value -> Parser b) -> (Value -> Parser [b]) -> Value -> Parser [Either a b] #

liftOmittedField2 :: Maybe a -> Maybe b -> Maybe (Either a b) #

ToJSON2 Either 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON2 :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> (b -> Bool) -> (b -> Value) -> ([b] -> Value) -> Either a b -> Value #

liftToJSONList2 :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> (b -> Bool) -> (b -> Value) -> ([b] -> Value) -> [Either a b] -> Value #

liftToEncoding2 :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> (b -> Bool) -> (b -> Encoding) -> ([b] -> Encoding) -> Either a b -> Encoding #

liftToEncodingList2 :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> (b -> Bool) -> (b -> Encoding) -> ([b] -> Encoding) -> [Either a b] -> Encoding #

liftOmitField2 :: (a -> Bool) -> (b -> Bool) -> Either a b -> Bool #

Bifunctor Either

Since: base-4.8.0.0

Instance details

Defined in Data.Bifunctor

Methods

bimap :: (a -> b) -> (c -> d) -> Either a c -> Either b d #

first :: (a -> b) -> Either a c -> Either b c #

second :: (b -> c) -> Either a b -> Either a c #

NFData2 Either

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> Either a b -> () #

Hashable2 Either 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt2 :: (Int -> a -> Int) -> (Int -> b -> Int) -> Int -> Either a b -> Int #

Generic1 (Either a :: Type -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (Either a) :: k -> Type #

Methods

from1 :: forall (a0 :: k). Either a a0 -> Rep1 (Either a) a0 #

to1 :: forall (a0 :: k). Rep1 (Either a) a0 -> Either a a0 #

(Lift a, Lift b) => Lift (Either a b :: Type) 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Either a b -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Either a b -> Code m (Either a b) #

FromJSON a => FromJSON1 (Either a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: Maybe a0 -> (Value -> Parser a0) -> (Value -> Parser [a0]) -> Value -> Parser (Either a a0) #

liftParseJSONList :: Maybe a0 -> (Value -> Parser a0) -> (Value -> Parser [a0]) -> Value -> Parser [Either a a0] #

liftOmittedField :: Maybe a0 -> Maybe (Either a a0) #

ToJSON a => ToJSON1 (Either a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a0 -> Bool) -> (a0 -> Value) -> ([a0] -> Value) -> Either a a0 -> Value #

liftToJSONList :: (a0 -> Bool) -> (a0 -> Value) -> ([a0] -> Value) -> [Either a a0] -> Value #

liftToEncoding :: (a0 -> Bool) -> (a0 -> Encoding) -> ([a0] -> Encoding) -> Either a a0 -> Encoding #

liftToEncodingList :: (a0 -> Bool) -> (a0 -> Encoding) -> ([a0] -> Encoding) -> [Either a a0] -> Encoding #

liftOmitField :: (a0 -> Bool) -> Either a a0 -> Bool #

Foldable (Either a)

Since: base-4.7.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Either a m -> m #

foldMap :: Monoid m => (a0 -> m) -> Either a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> Either a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> Either a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> Either a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> Either a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> Either a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> Either a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> Either a a0 -> a0 #

toList :: Either a a0 -> [a0] #

null :: Either a a0 -> Bool #

length :: Either a a0 -> Int #

elem :: Eq a0 => a0 -> Either a a0 -> Bool #

maximum :: Ord a0 => Either a a0 -> a0 #

minimum :: Ord a0 => Either a a0 -> a0 #

sum :: Num a0 => Either a a0 -> a0 #

product :: Num a0 => Either a a0 -> a0 #

Traversable (Either a)

Since: base-4.7.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a0 -> f b) -> Either a a0 -> f (Either a b) #

sequenceA :: Applicative f => Either a (f a0) -> f (Either a a0) #

mapM :: Monad m => (a0 -> m b) -> Either a a0 -> m (Either a b) #

sequence :: Monad m => Either a (m a0) -> m (Either a a0) #

Applicative (Either e)

Since: base-3.0

Instance details

Defined in Data.Either

Methods

pure :: a -> Either e a #

(<*>) :: Either e (a -> b) -> Either e a -> Either e b #

liftA2 :: (a -> b -> c) -> Either e a -> Either e b -> Either e c #

(*>) :: Either e a -> Either e b -> Either e b #

(<*) :: Either e a -> Either e b -> Either e a #

Functor (Either a)

Since: base-3.0

Instance details

Defined in Data.Either

Methods

fmap :: (a0 -> b) -> Either a a0 -> Either a b #

(<$) :: a0 -> Either a b -> Either a a0 #

Monad (Either e)

Since: base-4.4.0.0

Instance details

Defined in Data.Either

Methods

(>>=) :: Either e a -> (a -> Either e b) -> Either e b #

(>>) :: Either e a -> Either e b -> Either e b #

return :: a -> Either e a #

MonadFailure (Either a) 
Instance details

Defined in Basement.Monad

Associated Types

type Failure (Either a) #

Methods

mFail :: Failure (Either a) -> Either a () #

NFData a => NFData1 (Either a)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a0 -> ()) -> Either a a0 -> () #

e ~ SomeException => MonadCatch (Either e)

Since: exceptions-0.8.3

Instance details

Defined in Control.Monad.Catch

Methods

catch :: (HasCallStack, Exception e0) => Either e a -> (e0 -> Either e a) -> Either e a #

e ~ SomeException => MonadMask (Either e)

Since: exceptions-0.8.3

Instance details

Defined in Control.Monad.Catch

Methods

mask :: HasCallStack => ((forall a. Either e a -> Either e a) -> Either e b) -> Either e b #

uninterruptibleMask :: HasCallStack => ((forall a. Either e a -> Either e a) -> Either e b) -> Either e b #

generalBracket :: HasCallStack => Either e a -> (a -> ExitCase b -> Either e c) -> (a -> Either e b) -> Either e (b, c) #

e ~ SomeException => MonadThrow (Either e) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e0) => e0 -> Either e a #

Hashable a => Hashable1 (Either a) 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a0 -> Int) -> Int -> Either a a0 -> Int #

MonadBaseControl (Either e) (Either e) 
Instance details

Defined in Control.Monad.Trans.Control

Associated Types

type StM (Either e) a #

Methods

liftBaseWith :: (RunInBase (Either e) (Either e) -> Either e a) -> Either e a #

restoreM :: StM (Either e) a -> Either e a #

(FromJSON a, FromJSON b) => FromJSON (Either a b) 
Instance details

Defined in Data.Aeson.Types.FromJSON

(ToJSON a, ToJSON b) => ToJSON (Either a b) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Either a b -> Value #

toEncoding :: Either a b -> Encoding #

toJSONList :: [Either a b] -> Value #

toEncodingList :: [Either a b] -> Encoding #

omitField :: Either a b -> Bool #

Semigroup (Either a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Either

Methods

(<>) :: Either a b -> Either a b -> Either a b #

sconcat :: NonEmpty (Either a b) -> Either a b #

stimes :: Integral b0 => b0 -> Either a b -> Either a b #

Generic (Either a b) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Either a b) :: Type -> Type #

Methods

from :: Either a b -> Rep (Either a b) x #

to :: Rep (Either a b) x -> Either a b #

(Read a, Read b) => Read (Either a b)

Since: base-3.0

Instance details

Defined in Data.Either

(Show a, Show b) => Show (Either a b)

Since: base-3.0

Instance details

Defined in Data.Either

Methods

showsPrec :: Int -> Either a b -> ShowS #

show :: Either a b -> String #

showList :: [Either a b] -> ShowS #

(NFData a, NFData b) => NFData (Either a b) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Either a b -> () #

(Eq a, Eq b) => Eq (Either a b)

Since: base-2.1

Instance details

Defined in Data.Either

Methods

(==) :: Either a b -> Either a b -> Bool #

(/=) :: Either a b -> Either a b -> Bool #

(Ord a, Ord b) => Ord (Either a b)

Since: base-2.1

Instance details

Defined in Data.Either

Methods

compare :: Either a b -> Either a b -> Ordering #

(<) :: Either a b -> Either a b -> Bool #

(<=) :: Either a b -> Either a b -> Bool #

(>) :: Either a b -> Either a b -> Bool #

(>=) :: Either a b -> Either a b -> Bool #

max :: Either a b -> Either a b -> Either a b #

min :: Either a b -> Either a b -> Either a b #

(Hashable a, Hashable b) => Hashable (Either a b) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Either a b -> Int #

hash :: Either a b -> Int #

(FromHttpApiData a, FromHttpApiData b) => FromHttpApiData (Either a b)
>>> parseUrlPiece "Right 123" :: Either Text (Either String Int)
Right (Right 123)
Instance details

Defined in Web.Internal.HttpApiData

(ToHttpApiData a, ToHttpApiData b) => ToHttpApiData (Either a b)
>>> toUrlPiece (Left "err" :: Either String Int)
"left err"
>>> toUrlPiece (Right 3 :: Either String Int)
"right 3"
Instance details

Defined in Web.Internal.HttpApiData

MonoFoldable (Either a b) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (Either a b) -> m) -> Either a b -> m #

ofoldr :: (Element (Either a b) -> b0 -> b0) -> b0 -> Either a b -> b0 #

ofoldl' :: (a0 -> Element (Either a b) -> a0) -> a0 -> Either a b -> a0 #

otoList :: Either a b -> [Element (Either a b)] #

oall :: (Element (Either a b) -> Bool) -> Either a b -> Bool #

oany :: (Element (Either a b) -> Bool) -> Either a b -> Bool #

onull :: Either a b -> Bool #

olength :: Either a b -> Int #

olength64 :: Either a b -> Int64 #

ocompareLength :: Integral i => Either a b -> i -> Ordering #

otraverse_ :: Applicative f => (Element (Either a b) -> f b0) -> Either a b -> f () #

ofor_ :: Applicative f => Either a b -> (Element (Either a b) -> f b0) -> f () #

omapM_ :: Applicative m => (Element (Either a b) -> m ()) -> Either a b -> m () #

oforM_ :: Applicative m => Either a b -> (Element (Either a b) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (Either a b) -> m a0) -> a0 -> Either a b -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (Either a b) -> m) -> Either a b -> m #

ofoldr1Ex :: (Element (Either a b) -> Element (Either a b) -> Element (Either a b)) -> Either a b -> Element (Either a b) #

ofoldl1Ex' :: (Element (Either a b) -> Element (Either a b) -> Element (Either a b)) -> Either a b -> Element (Either a b) #

headEx :: Either a b -> Element (Either a b) #

lastEx :: Either a b -> Element (Either a b) #

unsafeHead :: Either a b -> Element (Either a b) #

unsafeLast :: Either a b -> Element (Either a b) #

maximumByEx :: (Element (Either a b) -> Element (Either a b) -> Ordering) -> Either a b -> Element (Either a b) #

minimumByEx :: (Element (Either a b) -> Element (Either a b) -> Ordering) -> Either a b -> Element (Either a b) #

oelem :: Element (Either a b) -> Either a b -> Bool #

onotElem :: Element (Either a b) -> Either a b -> Bool #

MonoFunctor (Either a b) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (Either a b) -> Element (Either a b)) -> Either a b -> Either a b #

MonoPointed (Either a b) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (Either a b) -> Either a b #

MonoTraversable (Either a b) 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element (Either a b) -> f (Element (Either a b))) -> Either a b -> f (Either a b) #

omapM :: Applicative m => (Element (Either a b) -> m (Element (Either a b))) -> Either a b -> m (Either a b) #

(PersistConfig c1, PersistConfig c2, PersistConfigPool c1 ~ PersistConfigPool c2, PersistConfigBackend c1 ~ PersistConfigBackend c2) => PersistConfig (Either c1 c2) 
Instance details

Defined in Database.Persist.Class.PersistConfig

Associated Types

type PersistConfigBackend (Either c1 c2) :: (Type -> Type) -> Type -> Type #

type PersistConfigPool (Either c1 c2) #

Methods

loadConfig :: Value -> Parser (Either c1 c2) #

applyEnv :: Either c1 c2 -> IO (Either c1 c2) #

createPoolConfig :: Either c1 c2 -> IO (PersistConfigPool (Either c1 c2)) #

runPool :: MonadUnliftIO m => Either c1 c2 -> PersistConfigBackend (Either c1 c2) m a -> PersistConfigPool (Either c1 c2) -> m a #

(a ~ a', b ~ b') => Each (Either a a') (Either b b') a b

Since: microlens-0.4.11

Instance details

Defined in Lens.Micro.Internal

Methods

each :: Traversal (Either a a') (Either b b') a b #

type Rep1 (Either a :: Type -> Type)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

type Failure (Either a) 
Instance details

Defined in Basement.Monad

type Failure (Either a) = a
type StM (Either e) a 
Instance details

Defined in Control.Monad.Trans.Control

type StM (Either e) a = a
type Rep (Either a b)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

type Element (Either a b) 
Instance details

Defined in Data.MonoTraversable

type Element (Either a b) = b
type PersistConfigBackend (Either c1 c2) 
Instance details

Defined in Database.Persist.Class.PersistConfig

type PersistConfigPool (Either c1 c2) 
Instance details

Defined in Database.Persist.Class.PersistConfig

class FromJSON a where #

A type that can be converted from JSON, with the possibility of failure.

In many cases, you can get the compiler to generate parsing code for you (see below). To begin, let's cover writing an instance by hand.

There are various reasons a conversion could fail. For example, an Object could be missing a required key, an Array could be of the wrong size, or a value could be of an incompatible type.

The basic ways to signal a failed conversion are as follows:

  • fail yields a custom error message: it is the recommended way of reporting a failure;
  • empty (or mzero) is uninformative: use it when the error is meant to be caught by some (<|>);
  • typeMismatch can be used to report a failure when the encountered value is not of the expected JSON type; unexpected is an appropriate alternative when more than one type may be expected, or to keep the expected type implicit.

prependFailure (or modifyFailure) add more information to a parser's error messages.

An example type and instance using typeMismatch and prependFailure:

-- Allow ourselves to write Text literals.
{-# LANGUAGE OverloadedStrings #-}

data Coord = Coord { x :: Double, y :: Double }

instance FromJSON Coord where
    parseJSON (Object v) = Coord
        <$> v .: "x"
        <*> v .: "y"

    -- We do not expect a non-Object value here.
    -- We could use empty to fail, but typeMismatch
    -- gives a much more informative error message.
    parseJSON invalid    =
        prependFailure "parsing Coord failed, "
            (typeMismatch "Object" invalid)

For this common case of only being concerned with a single type of JSON value, the functions withObject, withScientific, etc. are provided. Their use is to be preferred when possible, since they are more terse. Using withObject, we can rewrite the above instance (assuming the same language extension and data type) as:

instance FromJSON Coord where
    parseJSON = withObject "Coord" $ \v -> Coord
        <$> v .: "x"
        <*> v .: "y"

Instead of manually writing your FromJSON instance, there are two options to do it automatically:

  • Data.Aeson.TH provides Template Haskell functions which will derive an instance at compile time. The generated instance is optimized for your type so it will probably be more efficient than the following option.
  • The compiler can provide a default generic implementation for parseJSON.

To use the second, simply add a deriving Generic clause to your datatype and declare a FromJSON instance for your datatype without giving a definition for parseJSON.

For example, the previous example can be simplified to just:

{-# LANGUAGE DeriveGeneric #-}

import GHC.Generics

data Coord = Coord { x :: Double, y :: Double } deriving Generic

instance FromJSON Coord

or using the DerivingVia extension

deriving via Generically Coord instance FromJSON Coord

The default implementation will be equivalent to parseJSON = genericParseJSON defaultOptions; if you need different options, you can customize the generic decoding by defining:

customOptions = defaultOptions
                { fieldLabelModifier = map toUpper
                }

instance FromJSON Coord where
    parseJSON = genericParseJSON customOptions

Minimal complete definition

Nothing

Methods

parseJSON :: Value -> Parser a #

parseJSONList :: Value -> Parser [a] #

omittedField :: Maybe a #

Default value for optional fields. Used by (.:?=) operator, and Generics and TH deriving with allowOmittedFields = True (default).

Since: aeson-2.2.0.0

Instances

Instances details
FromJSON Key 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON DotNetTime 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Value 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Version 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON CTime 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Void 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Int16 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Int32 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Int64 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Int8 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Word16 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Word32 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Word64 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Word8 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON IntSet 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON NoteForm Source # 
Instance details

Defined in Handler.Notes

FromJSON AccountSettingsForm Source # 
Instance details

Defined in Model

FromJSON Bookmark Source # 
Instance details

Defined in Model

FromJSON BookmarkForm Source # 
Instance details

Defined in Model

FromJSON BookmarkTag Source # 
Instance details

Defined in Model

FromJSON FFBookmarkNode Source # 
Instance details

Defined in Model

FromJSON FileBookmark Source # 
Instance details

Defined in Model

FromJSON FileNote Source # 
Instance details

Defined in Model

FromJSON Note Source # 
Instance details

Defined in Model

FromJSON TagCloudMode Source # 
Instance details

Defined in Model

FromJSON UTCTimeStr Source # 
Instance details

Defined in Model

FromJSON User Source # 
Instance details

Defined in Model

FromJSON BCrypt Source # 
Instance details

Defined in ModelCustom

FromJSON BmSlug Source # 
Instance details

Defined in ModelCustom

FromJSON HashedApiKey Source # 
Instance details

Defined in ModelCustom

FromJSON NtSlug Source # 
Instance details

Defined in ModelCustom

FromJSON AppSettings Source # 
Instance details

Defined in Settings

FromJSON Ordering 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON URI

Since: aeson-2.2.0.0

Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON PersistValue 
Instance details

Defined in Database.Persist.PersistValue

FromJSON SqliteConf 
Instance details

Defined in Database.Persist.Sqlite

FromJSON SqliteConnectionInfo 
Instance details

Defined in Database.Persist.Sqlite

FromJSON Scientific 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Text 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Text 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON ShortText

Since: aeson-2.0.2.0

Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON CalendarDiffDays 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Day 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Month 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Quarter 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON QuarterOfYear 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON DayOfWeek 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON DiffTime

This instance includes a bounds check to prevent maliciously large inputs to fill up the memory of the target system. You can newtype Scientific and provide your own instance using withScientific if you want to allow larger inputs.

Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON NominalDiffTime

This instance includes a bounds check to prevent maliciously large inputs to fill up the memory of the target system. You can newtype Scientific and provide your own instance using withScientific if you want to allow larger inputs.

Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON SystemTime 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON UTCTime 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON CalendarDiffTime 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON LocalTime 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON TimeOfDay 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON ZonedTime

Supported string formats:

YYYY-MM-DD HH:MMZ YYYY-MM-DD HH:MM:SSZ YYYY-MM-DD HH:MM:SS.SSSZ

The first space may instead be a T, and the second space is optional. The Z represents UTC. The Z may be replaced with a time zone offset of the form +0000 or -08:00, where the first two digits are hours, the : is optional and the second two digits (also optional) are minutes.

Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON UUID 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Textarea 
Instance details

Defined in Yesod.Form.Fields

FromJSON Integer

This instance includes a bounds check to prevent maliciously large inputs to fill up the memory of the target system. You can newtype Scientific and provide your own instance using withScientific if you want to allow larger inputs.

Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Natural 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON () 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Bool 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Char 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Double 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Float 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Int 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Word 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON v => FromJSON (KeyMap v)

Since: aeson-2.0.1.0

Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON (Identity a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON (First a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON (Last a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON (Down a)

Since: aeson-2.2.0.0

Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON (First a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON (Last a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON (Max a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON (Min a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON (WrappedMonoid a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON (Dual a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON (NonEmpty a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

(Generic a, GFromJSON Zero (Rep a)) => FromJSON (Generically a)

Since: aeson-2.1.0.0

Instance details

Defined in Data.Aeson.Types.FromJSON

(FromJSON a, Integral a) => FromJSON (Ratio a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON (IntMap a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON (Seq a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

(Ord a, FromJSON a) => FromJSON (Set a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON v => FromJSON (Tree v) 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON1 f => FromJSON (Fix f)

Since: aeson-1.5.3.0

Instance details

Defined in Data.Aeson.Types.FromJSON

(FromJSON1 f, Functor f) => FromJSON (Mu f)

Since: aeson-1.5.3.0

Instance details

Defined in Data.Aeson.Types.FromJSON

(FromJSON1 f, Functor f) => FromJSON (Nu f)

Since: aeson-1.5.3.0

Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON (DNonEmpty a)

Since: aeson-1.5.3.0

Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON (DList a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON (Entity Bookmark) Source # 
Instance details

Defined in Model

FromJSON (Entity BookmarkTag) Source # 
Instance details

Defined in Model

FromJSON (Entity Note) Source # 
Instance details

Defined in Model

FromJSON (Entity User) Source # 
Instance details

Defined in Model

FromJSON (Key Bookmark) Source # 
Instance details

Defined in Model

FromJSON (Key BookmarkTag) Source # 
Instance details

Defined in Model

FromJSON (Key Note) Source # 
Instance details

Defined in Model

FromJSON (Key User) Source # 
Instance details

Defined in Model

(BackendCompatible b s, FromJSON (BackendKey b)) => FromJSON (BackendKey (Compatible b s)) 
Instance details

Defined in Database.Persist.Compatible.Types

(PersistCore b, PersistCore (RawSqlite b), FromJSON (BackendKey b)) => FromJSON (BackendKey (RawSqlite b)) 
Instance details

Defined in Database.Persist.Sqlite

FromJSON a => FromJSON (Array a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

(Prim a, FromJSON a) => FromJSON (PrimArray a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON (SmallArray a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON (Maybe a)

Since: aeson-1.5.3.0

Instance details

Defined in Data.Aeson.Types.FromJSON

(Eq a, Hashable a, FromJSON a) => FromJSON (HashSet a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON (Vector a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

(Prim a, FromJSON a) => FromJSON (Vector a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

(Storable a, FromJSON a) => FromJSON (Vector a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

(Vector Vector a, FromJSON a) => FromJSON (Vector a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON (Maybe a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON (a)

Since: aeson-2.0.2.0

Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a) #

parseJSONList :: Value -> Parser [(a)] #

omittedField :: Maybe (a) #

FromJSON a => FromJSON [a] 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser [a] #

parseJSONList :: Value -> Parser [[a]] #

omittedField :: Maybe [a] #

(FromJSON a, FromJSON b) => FromJSON (Either a b) 
Instance details

Defined in Data.Aeson.Types.FromJSON

HasResolution a => FromJSON (Fixed a)

This instance includes a bounds check to prevent maliciously large inputs to fill up the memory of the target system. You can newtype Scientific and provide your own instance using withScientific if you want to allow larger inputs.

Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON (Proxy a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

(FromJSONKey k, Ord k, FromJSON v) => FromJSON (Map k v) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Map k v) #

parseJSONList :: Value -> Parser [Map k v] #

omittedField :: Maybe (Map k v) #

(FromJSON a, FromJSON b) => FromJSON (Either a b)

Since: aeson-1.5.3.0

Instance details

Defined in Data.Aeson.Types.FromJSON

(FromJSON a, FromJSON b) => FromJSON (These a b)

Since: aeson-1.5.3.0

Instance details

Defined in Data.Aeson.Types.FromJSON

(FromJSON a, FromJSON b) => FromJSON (Pair a b)

Since: aeson-1.5.3.0

Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Pair a b) #

parseJSONList :: Value -> Parser [Pair a b] #

omittedField :: Maybe (Pair a b) #

(FromJSON a, FromJSON b) => FromJSON (These a b)

Since: aeson-1.5.1.0

Instance details

Defined in Data.Aeson.Types.FromJSON

(FromJSON v, FromJSONKey k, Eq k, Hashable k) => FromJSON (HashMap k v) 
Instance details

Defined in Data.Aeson.Types.FromJSON

(FromJSON a, FromJSON b) => FromJSON (a, b) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a, b) #

parseJSONList :: Value -> Parser [(a, b)] #

omittedField :: Maybe (a, b) #

FromJSON a => FromJSON (Const a b) 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON b => FromJSON (Tagged a b) 
Instance details

Defined in Data.Aeson.Types.FromJSON

(FromJSON1 f, FromJSON1 g, FromJSON a) => FromJSON (These1 f g a)

Since: aeson-1.5.1.0

Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (These1 f g a) #

parseJSONList :: Value -> Parser [These1 f g a] #

omittedField :: Maybe (These1 f g a) #

(FromJSON a, FromJSON b, FromJSON c) => FromJSON (a, b, c) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a, b, c) #

parseJSONList :: Value -> Parser [(a, b, c)] #

omittedField :: Maybe (a, b, c) #

(FromJSON1 f, FromJSON1 g, FromJSON a) => FromJSON (Product f g a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Product f g a) #

parseJSONList :: Value -> Parser [Product f g a] #

omittedField :: Maybe (Product f g a) #

(FromJSON1 f, FromJSON1 g, FromJSON a) => FromJSON (Sum f g a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Sum f g a) #

parseJSONList :: Value -> Parser [Sum f g a] #

omittedField :: Maybe (Sum f g a) #

(FromJSON a, FromJSON b, FromJSON c, FromJSON d) => FromJSON (a, b, c, d) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a, b, c, d) #

parseJSONList :: Value -> Parser [(a, b, c, d)] #

omittedField :: Maybe (a, b, c, d) #

(FromJSON1 f, FromJSON1 g, FromJSON a) => FromJSON (Compose f g a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Compose f g a) #

parseJSONList :: Value -> Parser [Compose f g a] #

omittedField :: Maybe (Compose f g a) #

(FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e) => FromJSON (a, b, c, d, e) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a, b, c, d, e) #

parseJSONList :: Value -> Parser [(a, b, c, d, e)] #

omittedField :: Maybe (a, b, c, d, e) #

(FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f) => FromJSON (a, b, c, d, e, f) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a, b, c, d, e, f) #

parseJSONList :: Value -> Parser [(a, b, c, d, e, f)] #

omittedField :: Maybe (a, b, c, d, e, f) #

(FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g) => FromJSON (a, b, c, d, e, f, g) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a, b, c, d, e, f, g) #

parseJSONList :: Value -> Parser [(a, b, c, d, e, f, g)] #

omittedField :: Maybe (a, b, c, d, e, f, g) #

(FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h) => FromJSON (a, b, c, d, e, f, g, h) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a, b, c, d, e, f, g, h) #

parseJSONList :: Value -> Parser [(a, b, c, d, e, f, g, h)] #

omittedField :: Maybe (a, b, c, d, e, f, g, h) #

(FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i) => FromJSON (a, b, c, d, e, f, g, h, i) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a, b, c, d, e, f, g, h, i) #

parseJSONList :: Value -> Parser [(a, b, c, d, e, f, g, h, i)] #

omittedField :: Maybe (a, b, c, d, e, f, g, h, i) #

(FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i, FromJSON j) => FromJSON (a, b, c, d, e, f, g, h, i, j) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a, b, c, d, e, f, g, h, i, j) #

parseJSONList :: Value -> Parser [(a, b, c, d, e, f, g, h, i, j)] #

omittedField :: Maybe (a, b, c, d, e, f, g, h, i, j) #

(FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i, FromJSON j, FromJSON k) => FromJSON (a, b, c, d, e, f, g, h, i, j, k) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a, b, c, d, e, f, g, h, i, j, k) #

parseJSONList :: Value -> Parser [(a, b, c, d, e, f, g, h, i, j, k)] #

omittedField :: Maybe (a, b, c, d, e, f, g, h, i, j, k) #

(FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i, FromJSON j, FromJSON k, FromJSON l) => FromJSON (a, b, c, d, e, f, g, h, i, j, k, l) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a, b, c, d, e, f, g, h, i, j, k, l) #

parseJSONList :: Value -> Parser [(a, b, c, d, e, f, g, h, i, j, k, l)] #

omittedField :: Maybe (a, b, c, d, e, f, g, h, i, j, k, l) #

(FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i, FromJSON j, FromJSON k, FromJSON l, FromJSON m) => FromJSON (a, b, c, d, e, f, g, h, i, j, k, l, m) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a, b, c, d, e, f, g, h, i, j, k, l, m) #

parseJSONList :: Value -> Parser [(a, b, c, d, e, f, g, h, i, j, k, l, m)] #

omittedField :: Maybe (a, b, c, d, e, f, g, h, i, j, k, l, m) #

(FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i, FromJSON j, FromJSON k, FromJSON l, FromJSON m, FromJSON n) => FromJSON (a, b, c, d, e, f, g, h, i, j, k, l, m, n) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a, b, c, d, e, f, g, h, i, j, k, l, m, n) #

parseJSONList :: Value -> Parser [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] #

omittedField :: Maybe (a, b, c, d, e, f, g, h, i, j, k, l, m, n) #

(FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i, FromJSON j, FromJSON k, FromJSON l, FromJSON m, FromJSON n, FromJSON o) => FromJSON (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) #

parseJSONList :: Value -> Parser [(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)] #

omittedField :: Maybe (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) #

data ByteString #

A space-efficient representation of a Word8 vector, supporting many efficient operations.

A ByteString contains 8-bit bytes, or by using the operations from Data.ByteString.Char8 it can be interpreted as containing 8-bit characters.

Instances

Instances details
Chunk ByteString 
Instance details

Defined in Data.Attoparsec.Internal.Types

Associated Types

type ChunkElem ByteString #

Data ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ByteString -> c ByteString #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ByteString #

toConstr :: ByteString -> Constr #

dataTypeOf :: ByteString -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ByteString) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ByteString) #

gmapT :: (forall b. Data b => b -> b) -> ByteString -> ByteString #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ByteString -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ByteString -> r #

gmapQ :: (forall d. Data d => d -> u) -> ByteString -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ByteString -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ByteString -> m ByteString #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteString -> m ByteString #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteString -> m ByteString #

IsString ByteString

Beware: fromString truncates multi-byte characters to octets. e.g. "枯朶に烏のとまりけり秋の暮" becomes �6k�nh~�Q��n�

Instance details

Defined in Data.ByteString.Internal.Type

Monoid ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

Semigroup ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

IsList ByteString

Since: bytestring-0.10.12.0

Instance details

Defined in Data.ByteString.Internal.Type

Associated Types

type Item ByteString #

Read ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

Show ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

FoldCase ByteString

Note that foldCase on ByteStrings is only guaranteed to be correct for ISO-8859-1 encoded strings!

Instance details

Defined in Data.CaseInsensitive.Internal

NFData ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

Methods

rnf :: ByteString -> () #

SqlString ByteString

Since: esqueleto-2.3.0

Instance details

Defined in Database.Esqueleto.Internal.Internal

ToLogStr ByteString 
Instance details

Defined in System.Log.FastLogger.LogStr

Eq ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

Ord ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

Hashable ByteString 
Instance details

Defined in Data.Hashable.Class

QueryKeyLike ByteString 
Instance details

Defined in Network.HTTP.Types.QueryLike

QueryValueLike ByteString 
Instance details

Defined in Network.HTTP.Types.QueryLike

MonoZip ByteString 
Instance details

Defined in Data.Containers

GrowingAppend ByteString 
Instance details

Defined in Data.MonoTraversable

MonoFoldable ByteString 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element ByteString -> m) -> ByteString -> m #

ofoldr :: (Element ByteString -> b -> b) -> b -> ByteString -> b #

ofoldl' :: (a -> Element ByteString -> a) -> a -> ByteString -> a #

otoList :: ByteString -> [Element ByteString] #

oall :: (Element ByteString -> Bool) -> ByteString -> Bool #

oany :: (Element ByteString -> Bool) -> ByteString -> Bool #

onull :: ByteString -> Bool #

olength :: ByteString -> Int #

olength64 :: ByteString -> Int64 #

ocompareLength :: Integral i => ByteString -> i -> Ordering #

otraverse_ :: Applicative f => (Element ByteString -> f b) -> ByteString -> f () #

ofor_ :: Applicative f => ByteString -> (Element ByteString -> f b) -> f () #

omapM_ :: Applicative m => (Element ByteString -> m ()) -> ByteString -> m () #

oforM_ :: Applicative m => ByteString -> (Element ByteString -> m ()) -> m () #

ofoldlM :: Monad m => (a -> Element ByteString -> m a) -> a -> ByteString -> m a #

ofoldMap1Ex :: Semigroup m => (Element ByteString -> m) -> ByteString -> m #

ofoldr1Ex :: (Element ByteString -> Element ByteString -> Element ByteString) -> ByteString -> Element ByteString #

ofoldl1Ex' :: (Element ByteString -> Element ByteString -> Element ByteString) -> ByteString -> Element ByteString #

headEx :: ByteString -> Element ByteString #

lastEx :: ByteString -> Element ByteString #

unsafeHead :: ByteString -> Element ByteString #

unsafeLast :: ByteString -> Element ByteString #

maximumByEx :: (Element ByteString -> Element ByteString -> Ordering) -> ByteString -> Element ByteString #

minimumByEx :: (Element ByteString -> Element ByteString -> Ordering) -> ByteString -> Element ByteString #

oelem :: Element ByteString -> ByteString -> Bool #

onotElem :: Element ByteString -> ByteString -> Bool #

MonoFunctor ByteString 
Instance details

Defined in Data.MonoTraversable

MonoPointed ByteString 
Instance details

Defined in Data.MonoTraversable

MonoTraversable ByteString 
Instance details

Defined in Data.MonoTraversable

IsSequence ByteString 
Instance details

Defined in Data.Sequences

Methods

fromList :: [Element ByteString] -> ByteString #

lengthIndex :: ByteString -> Index ByteString #

break :: (Element ByteString -> Bool) -> ByteString -> (ByteString, ByteString) #

span :: (Element ByteString -> Bool) -> ByteString -> (ByteString, ByteString) #

dropWhile :: (Element ByteString -> Bool) -> ByteString -> ByteString #

takeWhile :: (Element ByteString -> Bool) -> ByteString -> ByteString #

splitAt :: Index ByteString -> ByteString -> (ByteString, ByteString) #

unsafeSplitAt :: Index ByteString -> ByteString -> (ByteString, ByteString) #

take :: Index ByteString -> ByteString -> ByteString #

unsafeTake :: Index ByteString -> ByteString -> ByteString #

drop :: Index ByteString -> ByteString -> ByteString #

unsafeDrop :: Index ByteString -> ByteString -> ByteString #

dropEnd :: Index ByteString -> ByteString -> ByteString #

partition :: (Element ByteString -> Bool) -> ByteString -> (ByteString, ByteString) #

uncons :: ByteString -> Maybe (Element ByteString, ByteString) #

unsnoc :: ByteString -> Maybe (ByteString, Element ByteString) #

filter :: (Element ByteString -> Bool) -> ByteString -> ByteString #

filterM :: Monad m => (Element ByteString -> m Bool) -> ByteString -> m ByteString #

replicate :: Index ByteString -> Element ByteString -> ByteString #

replicateM :: Monad m => Index ByteString -> m (Element ByteString) -> m ByteString #

groupBy :: (Element ByteString -> Element ByteString -> Bool) -> ByteString -> [ByteString] #

groupAllOn :: Eq b => (Element ByteString -> b) -> ByteString -> [ByteString] #

subsequences :: ByteString -> [ByteString] #

permutations :: ByteString -> [ByteString] #

tailEx :: ByteString -> ByteString #

tailMay :: ByteString -> Maybe ByteString #

initEx :: ByteString -> ByteString #

initMay :: ByteString -> Maybe ByteString #

unsafeTail :: ByteString -> ByteString #

unsafeInit :: ByteString -> ByteString #

index :: ByteString -> Index ByteString -> Maybe (Element ByteString) #

indexEx :: ByteString -> Index ByteString -> Element ByteString #

unsafeIndex :: ByteString -> Index ByteString -> Element ByteString #

splitWhen :: (Element ByteString -> Bool) -> ByteString -> [ByteString] #

SemiSequence ByteString 
Instance details

Defined in Data.Sequences

Associated Types

type Index ByteString #

PersistField ByteString 
Instance details

Defined in Database.Persist.Class.PersistField

PersistFieldSql ByteString 
Instance details

Defined in Database.Persist.Sql.Class

ToContent ByteString 
Instance details

Defined in Yesod.Core.Content

ToFlushBuilder ByteString 
Instance details

Defined in Yesod.Core.Content

ToBuilder ByteString Builder 
Instance details

Defined in Data.Builder

LazySequence ByteString ByteString 
Instance details

Defined in Data.Sequences

Utf8 Text ByteString 
Instance details

Defined in Data.Sequences

Lift ByteString

Since: bytestring-0.11.2.0

Instance details

Defined in Data.ByteString.Internal.Type

Methods

lift :: Quote m => ByteString -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => ByteString -> Code m ByteString #

ToFlushBuilder (Flush ByteString) 
Instance details

Defined in Yesod.Core.Content

ToContent (ContentType, Content) 
Instance details

Defined in Yesod.Core.Content

ToTypedContent (ContentType, Content) 
Instance details

Defined in Yesod.Core.Content

type ChunkElem ByteString 
Instance details

Defined in Data.Attoparsec.Internal.Types

type State ByteString 
Instance details

Defined in Data.Attoparsec.Internal.Types

type State ByteString = Buffer
type Item ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

type Element ByteString 
Instance details

Defined in Data.MonoTraversable

type Index ByteString 
Instance details

Defined in Data.Sequences

class (PersistField (Key record), ToJSON (Key record), FromJSON (Key record), Show (Key record), Read (Key record), Eq (Key record), Ord (Key record)) => PersistEntity record where #

Persistent serialized Haskell records to the database. A Database Entity (A row in SQL, a document in MongoDB, etc) corresponds to a Key plus a Haskell record.

For every Haskell record type stored in the database there is a corresponding PersistEntity instance. An instance of PersistEntity contains meta-data for the record. PersistEntity also helps abstract over different record types. That way the same query interface can return a PersistEntity, with each query returning different types of Haskell records.

Some advanced type system capabilities are used to make this process type-safe. Persistent users usually don't need to understand the class associated data and functions.

Associated Types

type PersistEntityBackend record #

Persistent allows multiple different backends (databases).

data Key record #

By default, a backend will automatically generate the key Instead you can specify a Primary key made up of unique values.

data EntityField record :: Type -> Type #

An EntityField is parameterised by the Haskell record it belongs to and the additional type of that field.

As of persistent-2.11.0.0, it's possible to use the OverloadedLabels language extension to refer to EntityField values polymorphically. See the documentation on SymbolToField for more information.

data Unique record #

Unique keys besides the Key.

Methods

keyToValues :: Key record -> [PersistValue] #

A lower-level key operation.

keyFromValues :: [PersistValue] -> Either Text (Key record) #

A lower-level key operation.

persistIdField :: EntityField record (Key record) #

A meta-operation to retrieve the Key EntityField.

entityDef :: proxy record -> EntityDef #

Retrieve the EntityDef meta-data for the record.

persistFieldDef :: EntityField record typ -> FieldDef #

Return meta-data for a given EntityField.

toPersistFields :: record -> [PersistValue] #

A meta-operation to get the database fields of a record.

fromPersistValues :: [PersistValue] -> Either Text record #

A lower-level operation to convert from database values to a Haskell record.

tabulateEntityA #

Arguments

:: Applicative f 
=> (forall a. EntityField record a -> f a)

A function that builds a fragment of a record in an Applicative context.

-> f (Entity record) 

This function allows you to build an Entity a by specifying an action that returns a value for the field in the callback function. Let's look at an example.

parseFromEnvironmentVariables :: IO (Entity User)
parseFromEnvironmentVariables =
    tabulateEntityA $ \userField ->
        case userField of
            UserName ->
                getEnv USER_NAME
            UserAge -> do
                ageVar <- getEnv USER_AGE
                case readMaybe ageVar of
                    Just age ->
                        pure age
                    Nothing ->
                        error $ "Failed to parse Age from: " <> ageVar
            UserAddressId -> do
                addressVar <- getEnv USER_ADDRESS_ID
                pure $ AddressKey addressVar

Since: persistent-2.14.0.0

persistUniqueKeys :: record -> [Unique record] #

A meta operation to retrieve all the Unique keys.

persistUniqueToFieldNames :: Unique record -> NonEmpty (FieldNameHS, FieldNameDB) #

A lower level operation.

persistUniqueToValues :: Unique record -> [PersistValue] #

A lower level operation.

fieldLens :: EntityField record field -> forall (f :: Type -> Type). Functor f => (field -> f field) -> Entity record -> f (Entity record) #

Use a PersistField as a lens.

keyFromRecordM :: Maybe (record -> Key record) #

Extract a Key record from a record value. Currently, this is only defined for entities using the Primary syntax for natural/composite keys. In a future version of persistent which incorporates the ID directly into the entity, this will always be Just.

Since: persistent-2.11.0.0

Instances

Instances details
PersistEntity Bookmark Source # 
Instance details

Defined in Model

PersistEntity BookmarkTag Source # 
Instance details

Defined in Model

PersistEntity Note Source # 
Instance details

Defined in Model

Associated Types

type PersistEntityBackend Note #

data Key Note #

data EntityField Note :: Type -> Type #

data Unique Note #

PersistEntity User Source # 
Instance details

Defined in Model

Associated Types

type PersistEntityBackend User #

data Key User #

data EntityField User :: Type -> Type #

data Unique User #

data family Key record #

By default, a backend will automatically generate the key Instead you can specify a Primary key made up of unique values.

Instances

Instances details
SymbolToField "bookmarkId" BookmarkTag BookmarkId Source # 
Instance details

Defined in Model

SymbolToField "userId" Bookmark UserId Source # 
Instance details

Defined in Model

SymbolToField "userId" BookmarkTag UserId Source # 
Instance details

Defined in Model

SymbolToField "userId" Note UserId Source # 
Instance details

Defined in Model

SymbolToField "id" Bookmark (Key Bookmark) Source # 
Instance details

Defined in Model

SymbolToField "id" BookmarkTag (Key BookmarkTag) Source # 
Instance details

Defined in Model

SymbolToField "id" Note (Key Note) Source # 
Instance details

Defined in Model

SymbolToField "id" User (Key User) Source # 
Instance details

Defined in Model

FromJSON (Key Bookmark) Source # 
Instance details

Defined in Model

FromJSON (Key BookmarkTag) Source # 
Instance details

Defined in Model

FromJSON (Key Note) Source # 
Instance details

Defined in Model

FromJSON (Key User) Source # 
Instance details

Defined in Model

ToJSON (Key Bookmark) Source # 
Instance details

Defined in Model

ToJSON (Key BookmarkTag) Source # 
Instance details

Defined in Model

ToJSON (Key Note) Source # 
Instance details

Defined in Model

ToJSON (Key User) Source # 
Instance details

Defined in Model

Read (Key Bookmark) Source # 
Instance details

Defined in Model

Read (Key BookmarkTag) Source # 
Instance details

Defined in Model

Read (Key Note) Source # 
Instance details

Defined in Model

Read (Key User) Source # 
Instance details

Defined in Model

Show (Key Bookmark) Source # 
Instance details

Defined in Model

Show (Key BookmarkTag) Source # 
Instance details

Defined in Model

Show (Key Note) Source # 
Instance details

Defined in Model

Methods

showsPrec :: Int -> Key Note -> ShowS #

show :: Key Note -> String #

showList :: [Key Note] -> ShowS #

Show (Key User) Source # 
Instance details

Defined in Model

Methods

showsPrec :: Int -> Key User -> ShowS #

show :: Key User -> String #

showList :: [Key User] -> ShowS #

Eq (Key Bookmark) Source # 
Instance details

Defined in Model

Eq (Key BookmarkTag) Source # 
Instance details

Defined in Model

Eq (Key Note) Source # 
Instance details

Defined in Model

Methods

(==) :: Key Note -> Key Note -> Bool #

(/=) :: Key Note -> Key Note -> Bool #

Eq (Key User) Source # 
Instance details

Defined in Model

Methods

(==) :: Key User -> Key User -> Bool #

(/=) :: Key User -> Key User -> Bool #

Ord (Key Bookmark) Source # 
Instance details

Defined in Model

Ord (Key BookmarkTag) Source # 
Instance details

Defined in Model

Ord (Key Note) Source # 
Instance details

Defined in Model

Methods

compare :: Key Note -> Key Note -> Ordering #

(<) :: Key Note -> Key Note -> Bool #

(<=) :: Key Note -> Key Note -> Bool #

(>) :: Key Note -> Key Note -> Bool #

(>=) :: Key Note -> Key Note -> Bool #

max :: Key Note -> Key Note -> Key Note #

min :: Key Note -> Key Note -> Key Note #

Ord (Key User) Source # 
Instance details

Defined in Model

Methods

compare :: Key User -> Key User -> Ordering #

(<) :: Key User -> Key User -> Bool #

(<=) :: Key User -> Key User -> Bool #

(>) :: Key User -> Key User -> Bool #

(>=) :: Key User -> Key User -> Bool #

max :: Key User -> Key User -> Key User #

min :: Key User -> Key User -> Key User #

FromHttpApiData (Key Bookmark) Source # 
Instance details

Defined in Model

FromHttpApiData (Key BookmarkTag) Source # 
Instance details

Defined in Model

FromHttpApiData (Key Note) Source # 
Instance details

Defined in Model

FromHttpApiData (Key User) Source # 
Instance details

Defined in Model

ToHttpApiData (Key Bookmark) Source # 
Instance details

Defined in Model

ToHttpApiData (Key BookmarkTag) Source # 
Instance details

Defined in Model

ToHttpApiData (Key Note) Source # 
Instance details

Defined in Model

ToHttpApiData (Key User) Source # 
Instance details

Defined in Model

PathPiece (Key Bookmark) Source # 
Instance details

Defined in Model

PathPiece (Key BookmarkTag) Source # 
Instance details

Defined in Model

PathPiece (Key Note) Source # 
Instance details

Defined in Model

PathPiece (Key User) Source # 
Instance details

Defined in Model

PersistField (Key Bookmark) Source # 
Instance details

Defined in Model

PersistField (Key BookmarkTag) Source # 
Instance details

Defined in Model

PersistField (Key Note) Source # 
Instance details

Defined in Model

PersistField (Key User) Source # 
Instance details

Defined in Model

PersistFieldSql (Key Bookmark) Source # 
Instance details

Defined in Model

PersistFieldSql (Key BookmarkTag) Source # 
Instance details

Defined in Model

PersistFieldSql (Key Note) Source # 
Instance details

Defined in Model

Methods

sqlType :: Proxy (Key Note) -> SqlType #

PersistFieldSql (Key User) Source # 
Instance details

Defined in Model

Methods

sqlType :: Proxy (Key User) -> SqlType #

(PersistEntity a, PersistEntityBackend a ~ backend, IsPersistBackend backend) => RawSql (Key a) 
Instance details

Defined in Database.Persist.Sql.Class

newtype Key Bookmark Source # 
Instance details

Defined in Model

newtype Key BookmarkTag Source # 
Instance details

Defined in Model

newtype Key Note Source # 
Instance details

Defined in Model

newtype Key User Source # 
Instance details

Defined in Model

type KeyEntity (Key x) 
Instance details

Defined in Yesod.Auth

type KeyEntity (Key x) = x

data Value #

A JSON value represented as a Haskell value.

Instances

Instances details
Arbitrary Value

Since: aeson-2.0.3.0

Instance details

Defined in Data.Aeson.Types.Internal

Methods

arbitrary :: Gen Value #

shrink :: Value -> [Value] #

CoArbitrary Value

Since: aeson-2.0.3.0

Instance details

Defined in Data.Aeson.Types.Internal

Methods

coarbitrary :: Value -> Gen b -> Gen b #

Function Value

Since: aeson-2.0.3.0

Instance details

Defined in Data.Aeson.Types.Internal

Methods

function :: (Value -> b) -> Value :-> b #

FromJSON Value 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON Value 
Instance details

Defined in Data.Aeson.Types.ToJSON

Data Value 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Value -> c Value #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Value #

toConstr :: Value -> Constr #

dataTypeOf :: Value -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Value) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Value) #

gmapT :: (forall b. Data b => b -> b) -> Value -> Value #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Value -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Value -> r #

gmapQ :: (forall d. Data d => d -> u) -> Value -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Value -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Value -> m Value #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Value -> m Value #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Value -> m Value #

IsString Value 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

fromString :: String -> Value #

Generic Value 
Instance details

Defined in Data.Aeson.Types.Internal

Associated Types

type Rep Value :: Type -> Type #

Methods

from :: Value -> Rep Value x #

to :: Rep Value x -> Value #

Read Value 
Instance details

Defined in Data.Aeson.Types.Internal

Show Value

Since version 1.5.6.0 version object values are printed in lexicographic key order

>>> toJSON $ H.fromList [("a", True), ("z", False)]
Object (fromList [("a",Bool True),("z",Bool False)])
>>> toJSON $ H.fromList [("z", False), ("a", True)]
Object (fromList [("a",Bool True),("z",Bool False)])
Instance details

Defined in Data.Aeson.Types.Internal

Methods

showsPrec :: Int -> Value -> ShowS #

show :: Value -> String #

showList :: [Value] -> ShowS #

NFData Value 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

rnf :: Value -> () #

Eq Value 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

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

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

Ord Value

The ordering is total, consistent with Eq instance. However, nothing else about the ordering is specified, and it may change from environment to environment and version to version of either this package or its dependencies (hashable and 'unordered-containers').

Since: aeson-1.5.2.0

Instance details

Defined in Data.Aeson.Types.Internal

Methods

compare :: Value -> Value -> Ordering #

(<) :: Value -> Value -> Bool #

(<=) :: Value -> Value -> Bool #

(>) :: Value -> Value -> Bool #

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

max :: Value -> Value -> Value #

min :: Value -> Value -> Value #

Hashable Value 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

hashWithSalt :: Int -> Value -> Int #

hash :: Value -> Int #

ToJavascript Value 
Instance details

Defined in Text.Julius

HasContentType Encoding 
Instance details

Defined in Yesod.Core.Content

HasContentType Value 
Instance details

Defined in Yesod.Core.Content

Methods

getContentType :: Monad m => m Value -> ContentType #

ToContent Encoding 
Instance details

Defined in Yesod.Core.Content

ToContent Value 
Instance details

Defined in Yesod.Core.Content

Methods

toContent :: Value -> Content #

ToTypedContent Encoding 
Instance details

Defined in Yesod.Core.Content

ToTypedContent Value 
Instance details

Defined in Yesod.Core.Content

KeyValue Encoding Series 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

(.=) :: ToJSON v => Key -> v -> Series #

explicitToField :: (v -> Encoding) -> Key -> v -> Series #

KeyValueOmit Encoding Series 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

(.?=) :: ToJSON v => Key -> v -> Series #

explicitToFieldOmit :: (v -> Bool) -> (v -> Encoding) -> Key -> v -> Series #

Lift Value

Since: aeson-0.11.0.0

Instance details

Defined in Data.Aeson.Types.Internal

Methods

lift :: Quote m => Value -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Value -> Code m Value #

(GToJSON' Encoding arity a, ConsToJSON Encoding arity a, Constructor c) => SumToJSON' TwoElemArray Encoding arity (C1 c a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

sumToJSON' :: Options -> ToArgs Encoding arity a0 -> C1 c a a0 -> Tagged TwoElemArray Encoding

(GToJSON' Value arity a, ConsToJSON Value arity a, Constructor c) => SumToJSON' TwoElemArray Value arity (C1 c a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

sumToJSON' :: Options -> ToArgs Value arity a0 -> C1 c a a0 -> Tagged TwoElemArray Value

GToJSON' Encoding arity (U1 :: Type -> Type) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

gToJSON :: Options -> ToArgs Encoding arity a -> U1 a -> Encoding

GToJSON' Encoding arity (V1 :: Type -> Type) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

gToJSON :: Options -> ToArgs Encoding arity a -> V1 a -> Encoding

GToJSON' Value arity (U1 :: Type -> Type) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

gToJSON :: Options -> ToArgs Value arity a -> U1 a -> Value

GToJSON' Value arity (V1 :: Type -> Type) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

gToJSON :: Options -> ToArgs Value arity a -> V1 a -> Value

ToJSON1 f => GToJSON' Encoding One (Rec1 f) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

gToJSON :: Options -> ToArgs Encoding One a -> Rec1 f a -> Encoding

ToJSON1 f => GToJSON' Value One (Rec1 f) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

gToJSON :: Options -> ToArgs Value One a -> Rec1 f a -> Value

(EncodeProduct arity a, EncodeProduct arity b) => GToJSON' Encoding arity (a :*: b) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

gToJSON :: Options -> ToArgs Encoding arity a0 -> (a :*: b) a0 -> Encoding

ToJSON a => GToJSON' Encoding arity (K1 i a :: Type -> Type) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

gToJSON :: Options -> ToArgs Encoding arity a0 -> K1 i a a0 -> Encoding

(WriteProduct arity a, WriteProduct arity b, ProductSize a, ProductSize b) => GToJSON' Value arity (a :*: b) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

gToJSON :: Options -> ToArgs Value arity a0 -> (a :*: b) a0 -> Value

ToJSON a => GToJSON' Value arity (K1 i a :: Type -> Type) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

gToJSON :: Options -> ToArgs Value arity a0 -> K1 i a a0 -> Value

(ToJSON1 f, GToJSON' Encoding One g) => GToJSON' Encoding One (f :.: g) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

gToJSON :: Options -> ToArgs Encoding One a -> (f :.: g) a -> Encoding

(ToJSON1 f, GToJSON' Value One g) => GToJSON' Value One (f :.: g) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

gToJSON :: Options -> ToArgs Value One a -> (f :.: g) a -> Value

FromPairs Value (DList Pair) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

fromPairs :: DList Pair -> Value

value ~ Value => KeyValue Value (KeyMap value)

Constructs a singleton KeyMap. For calling functions that demand an Object for constructing objects. To be used in conjunction with mconcat. Prefer to use object where possible.

Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

(.=) :: ToJSON v => Key -> v -> KeyMap value #

explicitToField :: (v -> Value) -> Key -> v -> KeyMap value #

value ~ Value => KeyValueOmit Value (KeyMap value) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

(.?=) :: ToJSON v => Key -> v -> KeyMap value #

explicitToFieldOmit :: (v -> Bool) -> (v -> Value) -> Key -> v -> KeyMap value #

v ~ Value => KeyValuePair v (DList Pair) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

pair :: Key -> v -> DList Pair

(key ~ Key, value ~ Value) => KeyValue Value (key, value) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

(.=) :: ToJSON v => Key -> v -> (key, value) #

explicitToField :: (v -> Value) -> Key -> v -> (key, value) #

type Rep Value 
Instance details

Defined in Data.Aeson.Types.Internal

class (Integral (Index seq), GrowingAppend seq) => SemiSequence seq where #

SemiSequence was created to share code between IsSequence and NonNull.

Semi means SemiGroup A SemiSequence can accomodate a SemiGroup such as NonEmpty or NonNull A Monoid should be able to fill out IsSequence.

SemiSequence operations maintain the same type because they all maintain the same number of elements or increase them. However, a decreasing function such as filter may change they type. For example, from NonEmpty to '[]' This type-changing function exists on NonNull as nfilter

filter and other such functions are placed in IsSequence

NOTE: Like GrowingAppend, ideally we'd have a Semigroup superclass constraint here, but that would pull in more dependencies to this package than desired.

Associated Types

type Index seq #

The type of the index of a sequence.

Methods

intersperse :: Element seq -> seq -> seq #

intersperse takes an element and intersperses that element between the elements of the sequence.

> intersperse ',' "abcde"
"a,b,c,d,e"

reverse :: seq -> seq #

Reverse a sequence

> reverse "hello world"
"dlrow olleh"

find :: (Element seq -> Bool) -> seq -> Maybe (Element seq) #

find takes a predicate and a sequence and returns the first element in the sequence matching the predicate, or Nothing if there isn't an element that matches the predicate.

> find (== 5) [1 .. 10]
Just 5

> find (== 15) [1 .. 10]
Nothing

sortBy :: (Element seq -> Element seq -> Ordering) -> seq -> seq #

Sort a sequence using an supplied element ordering function.

> let compare' x y = case compare x y of LT -> GT; EQ -> EQ; GT -> LT
> sortBy compare' [5,3,6,1,2,4]
[6,5,4,3,2,1]

cons :: Element seq -> seq -> seq #

Prepend an element onto a sequence.

> 4 `cons` [1,2,3]
[4,1,2,3]

snoc :: seq -> Element seq -> seq #

Append an element onto a sequence.

> [1,2,3] `snoc` 4
[1,2,3,4]

Instances

Instances details
SemiSequence ByteString 
Instance details

Defined in Data.Sequences

Associated Types

type Index ByteString #

SemiSequence ByteString 
Instance details

Defined in Data.Sequences

Associated Types

type Index ByteString #

SemiSequence Text 
Instance details

Defined in Data.Sequences

Associated Types

type Index Text #

SemiSequence Text 
Instance details

Defined in Data.Sequences

Associated Types

type Index Text #

SemiSequence (NonEmpty a) 
Instance details

Defined in Data.Sequences

Associated Types

type Index (NonEmpty a) #

SemiSequence (Seq a) 
Instance details

Defined in Data.Sequences

Associated Types

type Index (Seq a) #

Methods

intersperse :: Element (Seq a) -> Seq a -> Seq a #

reverse :: Seq a -> Seq a #

find :: (Element (Seq a) -> Bool) -> Seq a -> Maybe (Element (Seq a)) #

sortBy :: (Element (Seq a) -> Element (Seq a) -> Ordering) -> Seq a -> Seq a #

cons :: Element (Seq a) -> Seq a -> Seq a #

snoc :: Seq a -> Element (Seq a) -> Seq a #

SemiSequence seq => SemiSequence (NonNull seq) 
Instance details

Defined in Data.NonNull

Associated Types

type Index (NonNull seq) #

Methods

intersperse :: Element (NonNull seq) -> NonNull seq -> NonNull seq #

reverse :: NonNull seq -> NonNull seq #

find :: (Element (NonNull seq) -> Bool) -> NonNull seq -> Maybe (Element (NonNull seq)) #

sortBy :: (Element (NonNull seq) -> Element (NonNull seq) -> Ordering) -> NonNull seq -> NonNull seq #

cons :: Element (NonNull seq) -> NonNull seq -> NonNull seq #

snoc :: NonNull seq -> Element (NonNull seq) -> NonNull seq #

SemiSequence (Vector a) 
Instance details

Defined in Data.Sequences

Associated Types

type Index (Vector a) #

Methods

intersperse :: Element (Vector a) -> Vector a -> Vector a #

reverse :: Vector a -> Vector a #

find :: (Element (Vector a) -> Bool) -> Vector a -> Maybe (Element (Vector a)) #

sortBy :: (Element (Vector a) -> Element (Vector a) -> Ordering) -> Vector a -> Vector a #

cons :: Element (Vector a) -> Vector a -> Vector a #

snoc :: Vector a -> Element (Vector a) -> Vector a #

Storable a => SemiSequence (Vector a) 
Instance details

Defined in Data.Sequences

Associated Types

type Index (Vector a) #

Methods

intersperse :: Element (Vector a) -> Vector a -> Vector a #

reverse :: Vector a -> Vector a #

find :: (Element (Vector a) -> Bool) -> Vector a -> Maybe (Element (Vector a)) #

sortBy :: (Element (Vector a) -> Element (Vector a) -> Ordering) -> Vector a -> Vector a #

cons :: Element (Vector a) -> Vector a -> Vector a #

snoc :: Vector a -> Element (Vector a) -> Vector a #

Unbox a => SemiSequence (Vector a) 
Instance details

Defined in Data.Sequences

Associated Types

type Index (Vector a) #

Methods

intersperse :: Element (Vector a) -> Vector a -> Vector a #

reverse :: Vector a -> Vector a #

find :: (Element (Vector a) -> Bool) -> Vector a -> Maybe (Element (Vector a)) #

sortBy :: (Element (Vector a) -> Element (Vector a) -> Ordering) -> Vector a -> Vector a #

cons :: Element (Vector a) -> Vector a -> Vector a #

snoc :: Vector a -> Element (Vector a) -> Vector a #

SemiSequence [a] 
Instance details

Defined in Data.Sequences

Associated Types

type Index [a] #

Methods

intersperse :: Element [a] -> [a] -> [a] #

reverse :: [a] -> [a] #

find :: (Element [a] -> Bool) -> [a] -> Maybe (Element [a]) #

sortBy :: (Element [a] -> Element [a] -> Ordering) -> [a] -> [a] #

cons :: Element [a] -> [a] -> [a] #

snoc :: [a] -> Element [a] -> [a] #

type family Index seq #

The type of the index of a sequence.

Instances

Instances details
type Index ByteString 
Instance details

Defined in Data.Sequences

type Index ByteString 
Instance details

Defined in Data.Sequences

type Index Text 
Instance details

Defined in Data.Sequences

type Index Text = Int
type Index Text 
Instance details

Defined in Data.Sequences

type Index (NonEmpty a) 
Instance details

Defined in Data.Sequences

type Index (NonEmpty a) = Int
type Index (Seq a) 
Instance details

Defined in Data.Sequences

type Index (Seq a) = Int
type Index (DList a) 
Instance details

Defined in Data.MonoTraversable.Instances

type Index (DList a) = Int
type Index (NonNull seq) 
Instance details

Defined in Data.NonNull

type Index (NonNull seq) = Index seq
type Index (Vector a) 
Instance details

Defined in Data.Sequences

type Index (Vector a) = Int
type Index (Vector a) 
Instance details

Defined in Data.Sequences

type Index (Vector a) = Int
type Index (Vector a) 
Instance details

Defined in Data.Sequences

type Index (Vector a) = Int
type Index [a] 
Instance details

Defined in Data.Sequences

type Index [a] = Int

class ToJSON a where #

A type that can be converted to JSON.

Instances in general must specify toJSON and should (but don't need to) specify toEncoding.

An example type and instance:

-- Allow ourselves to write Text literals.
{-# LANGUAGE OverloadedStrings #-}

data Coord = Coord { x :: Double, y :: Double }

instance ToJSON Coord where
  toJSON (Coord x y) = object ["x" .= x, "y" .= y]

  toEncoding (Coord x y) = pairs ("x" .= x <> "y" .= y)

Instead of manually writing your ToJSON instance, there are two options to do it automatically:

  • Data.Aeson.TH provides Template Haskell functions which will derive an instance at compile time. The generated instance is optimized for your type so it will probably be more efficient than the following option.
  • The compiler can provide a default generic implementation for toJSON.

To use the second, simply add a deriving Generic clause to your datatype and declare a ToJSON instance. If you require nothing other than defaultOptions, it is sufficient to write (and this is the only alternative where the default toJSON implementation is sufficient):

{-# LANGUAGE DeriveGeneric #-}

import GHC.Generics

data Coord = Coord { x :: Double, y :: Double } deriving Generic

instance ToJSON Coord where
    toEncoding = genericToEncoding defaultOptions

or more conveniently using the DerivingVia extension

deriving via Generically Coord instance ToJSON Coord

If on the other hand you wish to customize the generic decoding, you have to implement both methods:

customOptions = defaultOptions
                { fieldLabelModifier = map toUpper
                }

instance ToJSON Coord where
    toJSON     = genericToJSON customOptions
    toEncoding = genericToEncoding customOptions

Previous versions of this library only had the toJSON method. Adding toEncoding had two reasons:

  1. toEncoding is more efficient for the common case that the output of toJSON is directly serialized to a ByteString. Further, expressing either method in terms of the other would be non-optimal.
  2. The choice of defaults allows a smooth transition for existing users: Existing instances that do not define toEncoding still compile and have the correct semantics. This is ensured by making the default implementation of toEncoding use toJSON. This produces correct results, but since it performs an intermediate conversion to a Value, it will be less efficient than directly emitting an Encoding. (this also means that specifying nothing more than instance ToJSON Coord would be sufficient as a generically decoding instance, but there probably exists no good reason to not specify toEncoding in new instances.)

Minimal complete definition

Nothing

Methods

toJSON :: a -> Value #

Convert a Haskell value to a JSON-friendly intermediate type.

toEncoding :: a -> Encoding #

Encode a Haskell value as JSON.

The default implementation of this method creates an intermediate Value using toJSON. This provides source-level compatibility for people upgrading from older versions of this library, but obviously offers no performance advantage.

To benefit from direct encoding, you must provide an implementation for this method. The easiest way to do so is by having your types implement Generic using the DeriveGeneric extension, and then have GHC generate a method body as follows.

instance ToJSON Coord where
    toEncoding = genericToEncoding defaultOptions

toJSONList :: [a] -> Value #

toEncodingList :: [a] -> Encoding #

omitField :: a -> Bool #

Defines when it is acceptable to omit a field of this type from a record. Used by (.?=) operator, and Generics and TH deriving with omitNothingFields = True.

Since: aeson-2.2.0.0

Instances

Instances details
ToJSON Key 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON DotNetTime 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Value 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Version 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON CTime 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Void 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Int16 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Int32 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Int64 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Int8 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Word16 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Word32 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Word64 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Word8 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON IntSet 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON NoteForm Source # 
Instance details

Defined in Handler.Notes

ToJSON AccountSettingsForm Source # 
Instance details

Defined in Model

ToJSON Bookmark Source # 
Instance details

Defined in Model

ToJSON BookmarkForm Source # 
Instance details

Defined in Model

ToJSON BookmarkTag Source # 
Instance details

Defined in Model

ToJSON FileBookmark Source # 
Instance details

Defined in Model

ToJSON FileNote Source # 
Instance details

Defined in Model

ToJSON Note Source # 
Instance details

Defined in Model

ToJSON TagCloudMode Source # 
Instance details

Defined in Model

ToJSON UTCTimeStr Source # 
Instance details

Defined in Model

ToJSON User Source # 
Instance details

Defined in Model

ToJSON BCrypt Source # 
Instance details

Defined in ModelCustom

ToJSON BmSlug Source # 
Instance details

Defined in ModelCustom

ToJSON HashedApiKey Source # 
Instance details

Defined in ModelCustom

ToJSON NtSlug Source # 
Instance details

Defined in ModelCustom

ToJSON Ordering 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON URI

Since: aeson-2.2.0.0

Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON PersistValue 
Instance details

Defined in Database.Persist.PersistValue

ToJSON Scientific 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Text 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Text 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON ShortText

Since: aeson-2.0.2.0

Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON CalendarDiffDays 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Day 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Month 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Quarter 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON QuarterOfYear 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON DayOfWeek 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON DiffTime 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON NominalDiffTime 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON SystemTime

Encoded as number

Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON UTCTime 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON CalendarDiffTime 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON LocalTime 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON TimeOfDay 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON ZonedTime 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON UUID 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Textarea 
Instance details

Defined in Yesod.Form.Fields

ToJSON Integer 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Natural 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON () 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: () -> Value #

toEncoding :: () -> Encoding #

toJSONList :: [()] -> Value #

toEncodingList :: [()] -> Encoding #

omitField :: () -> Bool #

ToJSON Bool 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Char 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Double 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Float 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Int 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Word 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON v => ToJSON (KeyMap v) 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON (Identity a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON (First a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON (Last a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON (Down a)

Since: aeson-2.2.0.0

Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON (First a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON (Last a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON (Max a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Max a -> Value #

toEncoding :: Max a -> Encoding #

toJSONList :: [Max a] -> Value #

toEncodingList :: [Max a] -> Encoding #

omitField :: Max a -> Bool #

ToJSON a => ToJSON (Min a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Min a -> Value #

toEncoding :: Min a -> Encoding #

toJSONList :: [Min a] -> Value #

toEncodingList :: [Min a] -> Encoding #

omitField :: Min a -> Bool #

ToJSON a => ToJSON (WrappedMonoid a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON (Dual a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON (NonEmpty a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

(Generic a, GToJSON' Value Zero (Rep a), GToJSON' Encoding Zero (Rep a)) => ToJSON (Generically a)

Since: aeson-2.1.0.0

Instance details

Defined in Data.Aeson.Types.ToJSON

(ToJSON a, Integral a) => ToJSON (Ratio a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON (IntMap a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON (Seq a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Seq a -> Value #

toEncoding :: Seq a -> Encoding #

toJSONList :: [Seq a] -> Value #

toEncodingList :: [Seq a] -> Encoding #

omitField :: Seq a -> Bool #

ToJSON a => ToJSON (Set a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Set a -> Value #

toEncoding :: Set a -> Encoding #

toJSONList :: [Set a] -> Value #

toEncodingList :: [Set a] -> Encoding #

omitField :: Set a -> Bool #

ToJSON v => ToJSON (Tree v) 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON1 f => ToJSON (Fix f)

Since: aeson-1.5.3.0

Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Fix f -> Value #

toEncoding :: Fix f -> Encoding #

toJSONList :: [Fix f] -> Value #

toEncodingList :: [Fix f] -> Encoding #

omitField :: Fix f -> Bool #

(ToJSON1 f, Functor f) => ToJSON (Mu f)

Since: aeson-1.5.3.0

Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Mu f -> Value #

toEncoding :: Mu f -> Encoding #

toJSONList :: [Mu f] -> Value #

toEncodingList :: [Mu f] -> Encoding #

omitField :: Mu f -> Bool #

(ToJSON1 f, Functor f) => ToJSON (Nu f)

Since: aeson-1.5.3.0

Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Nu f -> Value #

toEncoding :: Nu f -> Encoding #

toJSONList :: [Nu f] -> Value #

toEncodingList :: [Nu f] -> Encoding #

omitField :: Nu f -> Bool #

ToJSON a => ToJSON (DNonEmpty a)

Since: aeson-1.5.3.0

Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON (DList a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON (Entity Bookmark) Source # 
Instance details

Defined in Model

ToJSON (Entity BookmarkTag) Source # 
Instance details

Defined in Model

ToJSON (Entity Note) Source # 
Instance details

Defined in Model

ToJSON (Entity User) Source # 
Instance details

Defined in Model

ToJSON (Key Bookmark) Source # 
Instance details

Defined in Model

ToJSON (Key BookmarkTag) Source # 
Instance details

Defined in Model

ToJSON (Key Note) Source # 
Instance details

Defined in Model

ToJSON (Key User) Source # 
Instance details

Defined in Model

(BackendCompatible b s, ToJSON (BackendKey b)) => ToJSON (BackendKey (Compatible b s)) 
Instance details

Defined in Database.Persist.Compatible.Types

(PersistCore b, PersistCore (RawSqlite b), ToJSON (BackendKey b)) => ToJSON (BackendKey (RawSqlite b)) 
Instance details

Defined in Database.Persist.Sqlite

ToJSON a => ToJSON (Array a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

(Prim a, ToJSON a) => ToJSON (PrimArray a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON (SmallArray a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON (Maybe a)

Since: aeson-1.5.3.0

Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON (HashSet a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON (Vector a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

(Prim a, ToJSON a) => ToJSON (Vector a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

(Storable a, ToJSON a) => ToJSON (Vector a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

(Vector Vector a, ToJSON a) => ToJSON (Vector a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON (Maybe a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON (a)

Since: aeson-2.0.2.0

Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a) -> Value #

toEncoding :: (a) -> Encoding #

toJSONList :: [(a)] -> Value #

toEncodingList :: [(a)] -> Encoding #

omitField :: (a) -> Bool #

ToJSON a => ToJSON [a] 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: [a] -> Value #

toEncoding :: [a] -> Encoding #

toJSONList :: [[a]] -> Value #

toEncodingList :: [[a]] -> Encoding #

omitField :: [a] -> Bool #

(ToJSON a, ToJSON b) => ToJSON (Either a b) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Either a b -> Value #

toEncoding :: Either a b -> Encoding #

toJSONList :: [Either a b] -> Value #

toEncodingList :: [Either a b] -> Encoding #

omitField :: Either a b -> Bool #

HasResolution a => ToJSON (Fixed a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON (Proxy a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

(ToJSON v, ToJSONKey k) => ToJSON (Map k v) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Map k v -> Value #

toEncoding :: Map k v -> Encoding #

toJSONList :: [Map k v] -> Value #

toEncodingList :: [Map k v] -> Encoding #

omitField :: Map k v -> Bool #

(ToJSON a, ToJSON b) => ToJSON (Either a b)

Since: aeson-1.5.3.0

Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Either a b -> Value #

toEncoding :: Either a b -> Encoding #

toJSONList :: [Either a b] -> Value #

toEncodingList :: [Either a b] -> Encoding #

omitField :: Either a b -> Bool #

(ToJSON a, ToJSON b) => ToJSON (These a b)

Since: aeson-1.5.3.0

Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: These a b -> Value #

toEncoding :: These a b -> Encoding #

toJSONList :: [These a b] -> Value #

toEncodingList :: [These a b] -> Encoding #

omitField :: These a b -> Bool #

(ToJSON a, ToJSON b) => ToJSON (Pair a b)

Since: aeson-1.5.3.0

Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Pair a b -> Value #

toEncoding :: Pair a b -> Encoding #

toJSONList :: [Pair a b] -> Value #

toEncodingList :: [Pair a b] -> Encoding #

omitField :: Pair a b -> Bool #

(ToJSON a, ToJSON b) => ToJSON (These a b)

Since: aeson-1.5.1.0

Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: These a b -> Value #

toEncoding :: These a b -> Encoding #

toJSONList :: [These a b] -> Value #

toEncodingList :: [These a b] -> Encoding #

omitField :: These a b -> Bool #

(ToJSON v, ToJSONKey k) => ToJSON (HashMap k v) 
Instance details

Defined in Data.Aeson.Types.ToJSON

(ToJSON a, ToJSON b) => ToJSON (a, b) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b) -> Value #

toEncoding :: (a, b) -> Encoding #

toJSONList :: [(a, b)] -> Value #

toEncodingList :: [(a, b)] -> Encoding #

omitField :: (a, b) -> Bool #

ToJSON a => ToJSON (Const a b) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Const a b -> Value #

toEncoding :: Const a b -> Encoding #

toJSONList :: [Const a b] -> Value #

toEncodingList :: [Const a b] -> Encoding #

omitField :: Const a b -> Bool #

ToJSON b => ToJSON (Tagged a b) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Tagged a b -> Value #

toEncoding :: Tagged a b -> Encoding #

toJSONList :: [Tagged a b] -> Value #

toEncodingList :: [Tagged a b] -> Encoding #

omitField :: Tagged a b -> Bool #

(ToJSON1 f, ToJSON1 g, ToJSON a) => ToJSON (These1 f g a)

Since: aeson-1.5.1.0

Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: These1 f g a -> Value #

toEncoding :: These1 f g a -> Encoding #

toJSONList :: [These1 f g a] -> Value #

toEncodingList :: [These1 f g a] -> Encoding #

omitField :: These1 f g a -> Bool #

(ToJSON a, ToJSON b, ToJSON c) => ToJSON (a, b, c) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b, c) -> Value #

toEncoding :: (a, b, c) -> Encoding #

toJSONList :: [(a, b, c)] -> Value #

toEncodingList :: [(a, b, c)] -> Encoding #

omitField :: (a, b, c) -> Bool #

(ToJSON1 f, ToJSON1 g, ToJSON a) => ToJSON (Product f g a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Product f g a -> Value #

toEncoding :: Product f g a -> Encoding #

toJSONList :: [Product f g a] -> Value #

toEncodingList :: [Product f g a] -> Encoding #

omitField :: Product f g a -> Bool #

(ToJSON1 f, ToJSON1 g, ToJSON a) => ToJSON (Sum f g a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Sum f g a -> Value #

toEncoding :: Sum f g a -> Encoding #

toJSONList :: [Sum f g a] -> Value #

toEncodingList :: [Sum f g a] -> Encoding #

omitField :: Sum f g a -> Bool #

(ToJSON a, ToJSON b, ToJSON c, ToJSON d) => ToJSON (a, b, c, d) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b, c, d) -> Value #

toEncoding :: (a, b, c, d) -> Encoding #

toJSONList :: [(a, b, c, d)] -> Value #

toEncodingList :: [(a, b, c, d)] -> Encoding #

omitField :: (a, b, c, d) -> Bool #

(ToJSON1 f, ToJSON1 g, ToJSON a) => ToJSON (Compose f g a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Compose f g a -> Value #

toEncoding :: Compose f g a -> Encoding #

toJSONList :: [Compose f g a] -> Value #

toEncodingList :: [Compose f g a] -> Encoding #

omitField :: Compose f g a -> Bool #

(ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e) => ToJSON (a, b, c, d, e) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b, c, d, e) -> Value #

toEncoding :: (a, b, c, d, e) -> Encoding #

toJSONList :: [(a, b, c, d, e)] -> Value #

toEncodingList :: [(a, b, c, d, e)] -> Encoding #

omitField :: (a, b, c, d, e) -> Bool #

(ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f) => ToJSON (a, b, c, d, e, f) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b, c, d, e, f) -> Value #

toEncoding :: (a, b, c, d, e, f) -> Encoding #

toJSONList :: [(a, b, c, d, e, f)] -> Value #

toEncodingList :: [(a, b, c, d, e, f)] -> Encoding #

omitField :: (a, b, c, d, e, f) -> Bool #

(ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g) => ToJSON (a, b, c, d, e, f, g) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b, c, d, e, f, g) -> Value #

toEncoding :: (a, b, c, d, e, f, g) -> Encoding #

toJSONList :: [(a, b, c, d, e, f, g)] -> Value #

toEncodingList :: [(a, b, c, d, e, f, g)] -> Encoding #

omitField :: (a, b, c, d, e, f, g) -> Bool #

(ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h) => ToJSON (a, b, c, d, e, f, g, h) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b, c, d, e, f, g, h) -> Value #

toEncoding :: (a, b, c, d, e, f, g, h) -> Encoding #

toJSONList :: [(a, b, c, d, e, f, g, h)] -> Value #

toEncodingList :: [(a, b, c, d, e, f, g, h)] -> Encoding #

omitField :: (a, b, c, d, e, f, g, h) -> Bool #

(ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i) => ToJSON (a, b, c, d, e, f, g, h, i) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b, c, d, e, f, g, h, i) -> Value #

toEncoding :: (a, b, c, d, e, f, g, h, i) -> Encoding #

toJSONList :: [(a, b, c, d, e, f, g, h, i)] -> Value #

toEncodingList :: [(a, b, c, d, e, f, g, h, i)] -> Encoding #

omitField :: (a, b, c, d, e, f, g, h, i) -> Bool #

(ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j) => ToJSON (a, b, c, d, e, f, g, h, i, j) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b, c, d, e, f, g, h, i, j) -> Value #

toEncoding :: (a, b, c, d, e, f, g, h, i, j) -> Encoding #

toJSONList :: [(a, b, c, d, e, f, g, h, i, j)] -> Value #

toEncodingList :: [(a, b, c, d, e, f, g, h, i, j)] -> Encoding #

omitField :: (a, b, c, d, e, f, g, h, i, j) -> Bool #

(ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k) => ToJSON (a, b, c, d, e, f, g, h, i, j, k) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b, c, d, e, f, g, h, i, j, k) -> Value #

toEncoding :: (a, b, c, d, e, f, g, h, i, j, k) -> Encoding #

toJSONList :: [(a, b, c, d, e, f, g, h, i, j, k)] -> Value #

toEncodingList :: [(a, b, c, d, e, f, g, h, i, j, k)] -> Encoding #

omitField :: (a, b, c, d, e, f, g, h, i, j, k) -> Bool #

(ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l) => ToJSON (a, b, c, d, e, f, g, h, i, j, k, l) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b, c, d, e, f, g, h, i, j, k, l) -> Value #

toEncoding :: (a, b, c, d, e, f, g, h, i, j, k, l) -> Encoding #

toJSONList :: [(a, b, c, d, e, f, g, h, i, j, k, l)] -> Value #

toEncodingList :: [(a, b, c, d, e, f, g, h, i, j, k, l)] -> Encoding #

omitField :: (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool #

(ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l, ToJSON m) => ToJSON (a, b, c, d, e, f, g, h, i, j, k, l, m) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Value #

toEncoding :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Encoding #

toJSONList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m)] -> Value #

toEncodingList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m)] -> Encoding #

omitField :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool #

(ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l, ToJSON m, ToJSON n) => ToJSON (a, b, c, d, e, f, g, h, i, j, k, l, m, n) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Value #

toEncoding :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Encoding #

toJSONList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] -> Value #

toEncodingList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] -> Encoding #

omitField :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool #

(ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l, ToJSON m, ToJSON n, ToJSON o) => ToJSON (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Value #

toEncoding :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Encoding #

toJSONList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)] -> Value #

toEncodingList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)] -> Encoding #

omitField :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool #

data HashMap k v #

A map from keys to values. A map cannot contain duplicate keys; each key can map to at most one value.

Instances

Instances details
Bifoldable HashMap

Since: unordered-containers-0.2.11

Instance details

Defined in Data.HashMap.Internal

Methods

bifold :: Monoid m => HashMap m m -> m #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> HashMap a b -> m #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> HashMap a b -> c #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> HashMap a b -> c #

Eq2 HashMap 
Instance details

Defined in Data.HashMap.Internal

Methods

liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> HashMap a c -> HashMap b d -> Bool #

Ord2 HashMap 
Instance details

Defined in Data.HashMap.Internal

Methods

liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> HashMap a c -> HashMap b d -> Ordering #

Show2 HashMap 
Instance details

Defined in Data.HashMap.Internal

Methods

liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> HashMap a b -> ShowS #

liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [HashMap a b] -> ShowS #

NFData2 HashMap

Since: unordered-containers-0.2.14.0

Instance details

Defined in Data.HashMap.Internal

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> HashMap a b -> () #

Hashable2 HashMap 
Instance details

Defined in Data.HashMap.Internal

Methods

liftHashWithSalt2 :: (Int -> a -> Int) -> (Int -> b -> Int) -> Int -> HashMap a b -> Int #

BiPolyMap HashMap 
Instance details

Defined in Data.Containers

Associated Types

type BPMKeyConstraint HashMap key #

Methods

mapKeysWith :: (BPMKeyConstraint HashMap k1, BPMKeyConstraint HashMap k2) => (v -> v -> v) -> (k1 -> k2) -> HashMap k1 v -> HashMap k2 v #

(Lift k, Lift v) => Lift (HashMap k v :: Type)

Since: unordered-containers-0.2.17.0

Instance details

Defined in Data.HashMap.Internal

Methods

lift :: Quote m => HashMap k v -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => HashMap k v -> Code m (HashMap k v) #

(FromJSONKey k, Eq k, Hashable k) => FromJSON1 (HashMap k) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (HashMap k a) #

liftParseJSONList :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [HashMap k a] #

liftOmittedField :: Maybe a -> Maybe (HashMap k a) #

ToJSONKey k => ToJSON1 (HashMap k) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> HashMap k a -> Value #

liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [HashMap k a] -> Value #

liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> HashMap k a -> Encoding #

liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [HashMap k a] -> Encoding #

liftOmitField :: (a -> Bool) -> HashMap k a -> Bool #

Foldable (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

fold :: Monoid m => HashMap k m -> m #

foldMap :: Monoid m => (a -> m) -> HashMap k a -> m #

foldMap' :: Monoid m => (a -> m) -> HashMap k a -> m #

foldr :: (a -> b -> b) -> b -> HashMap k a -> b #

foldr' :: (a -> b -> b) -> b -> HashMap k a -> b #

foldl :: (b -> a -> b) -> b -> HashMap k a -> b #

foldl' :: (b -> a -> b) -> b -> HashMap k a -> b #

foldr1 :: (a -> a -> a) -> HashMap k a -> a #

foldl1 :: (a -> a -> a) -> HashMap k a -> a #

toList :: HashMap k a -> [a] #

null :: HashMap k a -> Bool #

length :: HashMap k a -> Int #

elem :: Eq a => a -> HashMap k a -> Bool #

maximum :: Ord a => HashMap k a -> a #

minimum :: Ord a => HashMap k a -> a #

sum :: Num a => HashMap k a -> a #

product :: Num a => HashMap k a -> a #

Eq k => Eq1 (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

liftEq :: (a -> b -> Bool) -> HashMap k a -> HashMap k b -> Bool #

Ord k => Ord1 (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

liftCompare :: (a -> b -> Ordering) -> HashMap k a -> HashMap k b -> Ordering #

(Eq k, Hashable k, Read k) => Read1 (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (HashMap k a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [HashMap k a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (HashMap k a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [HashMap k a] #

Show k => Show1 (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> HashMap k a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [HashMap k a] -> ShowS #

Traversable (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

traverse :: Applicative f => (a -> f b) -> HashMap k a -> f (HashMap k b) #

sequenceA :: Applicative f => HashMap k (f a) -> f (HashMap k a) #

mapM :: Monad m => (a -> m b) -> HashMap k a -> m (HashMap k b) #

sequence :: Monad m => HashMap k (m a) -> m (HashMap k a) #

Functor (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

fmap :: (a -> b) -> HashMap k a -> HashMap k b #

(<$) :: a -> HashMap k b -> HashMap k a #

NFData k => NFData1 (HashMap k)

Since: unordered-containers-0.2.14.0

Instance details

Defined in Data.HashMap.Internal

Methods

liftRnf :: (a -> ()) -> HashMap k a -> () #

Hashable k => Hashable1 (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> HashMap k a -> Int #

FoldableWithKey (HashMap k) 
Instance details

Defined in Data.Key

Methods

toKeyedList :: HashMap k a -> [(Key (HashMap k), a)] #

foldMapWithKey :: Monoid m => (Key (HashMap k) -> a -> m) -> HashMap k a -> m #

foldrWithKey :: (Key (HashMap k) -> a -> b -> b) -> b -> HashMap k a -> b #

foldlWithKey :: (b -> Key (HashMap k) -> a -> b) -> b -> HashMap k a -> b #

(Eq k, Hashable k) => Indexable (HashMap k) 
Instance details

Defined in Data.Key

Methods

index :: HashMap k a -> Key (HashMap k) -> a #

Keyed (HashMap k) 
Instance details

Defined in Data.Key

Methods

mapWithKey :: (Key (HashMap k) -> a -> b) -> HashMap k a -> HashMap k b #

(Eq k, Hashable k) => Lookup (HashMap k) 
Instance details

Defined in Data.Key

Methods

lookup :: Key (HashMap k) -> HashMap k a -> Maybe a #

TraversableWithKey (HashMap k) 
Instance details

Defined in Data.Key

Methods

traverseWithKey :: Applicative f => (Key (HashMap k) -> a -> f b) -> HashMap k a -> f (HashMap k b) #

mapWithKeyM :: Monad m => (Key (HashMap k) -> a -> m b) -> HashMap k a -> m (HashMap k b) #

(Eq k, Hashable k) => Zip (HashMap k) 
Instance details

Defined in Data.Key

Methods

zipWith :: (a -> b -> c) -> HashMap k a -> HashMap k b -> HashMap k c #

zip :: HashMap k a -> HashMap k b -> HashMap k (a, b) #

zap :: HashMap k (a -> b) -> HashMap k a -> HashMap k b #

(Eq k, Hashable k) => ZipWithKey (HashMap k) 
Instance details

Defined in Data.Key

Methods

zipWithKey :: (Key (HashMap k) -> a -> b -> c) -> HashMap k a -> HashMap k b -> HashMap k c #

zapWithKey :: HashMap k (Key (HashMap k) -> a -> b) -> HashMap k a -> HashMap k b #

(Eq key, Hashable key) => PolyMap (HashMap key)

This instance uses the functions from Data.HashMap.Strict.

Instance details

Defined in Data.Containers

Methods

differenceMap :: HashMap key value1 -> HashMap key value2 -> HashMap key value1 #

intersectionMap :: HashMap key value1 -> HashMap key value2 -> HashMap key value1 #

intersectionWithMap :: (value1 -> value2 -> value3) -> HashMap key value1 -> HashMap key value2 -> HashMap key value3 #

(FromJSON v, FromJSONKey k, Eq k, Hashable k) => FromJSON (HashMap k v) 
Instance details

Defined in Data.Aeson.Types.FromJSON

(ToJSON v, ToJSONKey k) => ToJSON (HashMap k v) 
Instance details

Defined in Data.Aeson.Types.ToJSON

(Data k, Data v, Eq k, Hashable k) => Data (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HashMap k v -> c (HashMap k v) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HashMap k v) #

toConstr :: HashMap k v -> Constr #

dataTypeOf :: HashMap k v -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HashMap k v)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HashMap k v)) #

gmapT :: (forall b. Data b => b -> b) -> HashMap k v -> HashMap k v #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HashMap k v -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HashMap k v -> r #

gmapQ :: (forall d. Data d => d -> u) -> HashMap k v -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HashMap k v -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HashMap k v -> m (HashMap k v) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HashMap k v -> m (HashMap k v) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HashMap k v -> m (HashMap k v) #

(Eq k, Hashable k) => Monoid (HashMap k v)

mempty = empty

mappend = union

If a key occurs in both maps, the mapping from the first will be the mapping in the result.

Examples

Expand
>>> mappend (fromList [(1,'a'),(2,'b')]) (fromList [(2,'c'),(3,'d')])
fromList [(1,'a'),(2,'b'),(3,'d')]
Instance details

Defined in Data.HashMap.Internal

Methods

mempty :: HashMap k v #

mappend :: HashMap k v -> HashMap k v -> HashMap k v #

mconcat :: [HashMap k v] -> HashMap k v #

(Eq k, Hashable k) => Semigroup (HashMap k v)

<> = union

If a key occurs in both maps, the mapping from the first will be the mapping in the result.

Examples

Expand
>>> fromList [(1,'a'),(2,'b')] <> fromList [(2,'c'),(3,'d')]
fromList [(1,'a'),(2,'b'),(3,'d')]
Instance details

Defined in Data.HashMap.Internal

Methods

(<>) :: HashMap k v -> HashMap k v -> HashMap k v #

sconcat :: NonEmpty (HashMap k v) -> HashMap k v #

stimes :: Integral b => b -> HashMap k v -> HashMap k v #

(Eq k, Hashable k) => IsList (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Associated Types

type Item (HashMap k v) #

Methods

fromList :: [Item (HashMap k v)] -> HashMap k v #

fromListN :: Int -> [Item (HashMap k v)] -> HashMap k v #

toList :: HashMap k v -> [Item (HashMap k v)] #

(Eq k, Hashable k, Read k, Read e) => Read (HashMap k e) 
Instance details

Defined in Data.HashMap.Internal

(Show k, Show v) => Show (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

showsPrec :: Int -> HashMap k v -> ShowS #

show :: HashMap k v -> String #

showList :: [HashMap k v] -> ShowS #

(NFData k, NFData v) => NFData (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

rnf :: HashMap k v -> () #

(Eq k, Eq v) => Eq (HashMap k v)

Note that, in the presence of hash collisions, equal HashMaps may behave differently, i.e. extensionality may be violated:

>>> data D = A | B deriving (Eq, Show)
>>> instance Hashable D where hashWithSalt salt _d = salt
>>> x = fromList [(A,1), (B,2)]
>>> y = fromList [(B,2), (A,1)]
>>> x == y
True
>>> toList x
[(A,1),(B,2)]
>>> toList y
[(B,2),(A,1)]

In general, the lack of extensionality can be observed with any function that depends on the key ordering, such as folds and traversals.

Instance details

Defined in Data.HashMap.Internal

Methods

(==) :: HashMap k v -> HashMap k v -> Bool #

(/=) :: HashMap k v -> HashMap k v -> Bool #

(Ord k, Ord v) => Ord (HashMap k v)

The ordering is total and consistent with the Eq instance. However, nothing else about the ordering is specified, and it may change from version to version of either this package or of hashable.

Instance details

Defined in Data.HashMap.Internal

Methods

compare :: HashMap k v -> HashMap k v -> Ordering #

(<) :: HashMap k v -> HashMap k v -> Bool #

(<=) :: HashMap k v -> HashMap k v -> Bool #

(>) :: HashMap k v -> HashMap k v -> Bool #

(>=) :: HashMap k v -> HashMap k v -> Bool #

max :: HashMap k v -> HashMap k v -> HashMap k v #

min :: HashMap k v -> HashMap k v -> HashMap k v #

(Hashable k, Hashable v) => Hashable (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

hashWithSalt :: Int -> HashMap k v -> Int #

hash :: HashMap k v -> Int #

(Eq k, Hashable k, FromFormKey k, FromHttpApiData v) => FromForm (HashMap k [v]) 
Instance details

Defined in Web.Internal.FormUrlEncoded

Methods

fromForm :: Form -> Either Text (HashMap k [v]) #

(ToFormKey k, ToHttpApiData v) => ToForm (HashMap k [v]) 
Instance details

Defined in Web.Internal.FormUrlEncoded

Methods

toForm :: HashMap k [v] -> Form #

(Hashable k, Eq k) => HasKeysSet (HashMap k v) 
Instance details

Defined in Data.Containers

Associated Types

type KeySet (HashMap k v) #

Methods

keysSet :: HashMap k v -> KeySet (HashMap k v) #

(Eq key, Hashable key) => IsMap (HashMap key value)

This instance uses the functions from Data.HashMap.Strict.

Instance details

Defined in Data.Containers

Associated Types

type MapValue (HashMap key value) #

Methods

lookup :: ContainerKey (HashMap key value) -> HashMap key value -> Maybe (MapValue (HashMap key value)) #

insertMap :: ContainerKey (HashMap key value) -> MapValue (HashMap key value) -> HashMap key value -> HashMap key value #

deleteMap :: ContainerKey (HashMap key value) -> HashMap key value -> HashMap key value #

singletonMap :: ContainerKey (HashMap key value) -> MapValue (HashMap key value) -> HashMap key value #

mapFromList :: [(ContainerKey (HashMap key value), MapValue (HashMap key value))] -> HashMap key value #

mapToList :: HashMap key value -> [(ContainerKey (HashMap key value), MapValue (HashMap key value))] #

findWithDefault :: MapValue (HashMap key value) -> ContainerKey (HashMap key value) -> HashMap key value -> MapValue (HashMap key value) #

insertWith :: (MapValue (HashMap key value) -> MapValue (HashMap key value) -> MapValue (HashMap key value)) -> ContainerKey (HashMap key value) -> MapValue (HashMap key value) -> HashMap key value -> HashMap key value #

insertWithKey :: (ContainerKey (HashMap key value) -> MapValue (HashMap key value) -> MapValue (HashMap key value) -> MapValue (HashMap key value)) -> ContainerKey (HashMap key value) -> MapValue (HashMap key value) -> HashMap key value -> HashMap key value #

insertLookupWithKey :: (ContainerKey (HashMap key value) -> MapValue (HashMap key value) -> MapValue (HashMap key value) -> MapValue (HashMap key value)) -> ContainerKey (HashMap key value) -> MapValue (HashMap key value) -> HashMap key value -> (Maybe (MapValue (HashMap key value)), HashMap key value) #

adjustMap :: (MapValue (HashMap key value) -> MapValue (HashMap key value)) -> ContainerKey (HashMap key value) -> HashMap key value -> HashMap key value #

adjustWithKey :: (ContainerKey (HashMap key value) -> MapValue (HashMap key value) -> MapValue (HashMap key value)) -> ContainerKey (HashMap key value) -> HashMap key value -> HashMap key value #

updateMap :: (MapValue (HashMap key value) -> Maybe (MapValue (HashMap key value))) -> ContainerKey (HashMap key value) -> HashMap key value -> HashMap key value #

updateWithKey :: (ContainerKey (HashMap key value) -> MapValue (HashMap key value) -> Maybe (MapValue (HashMap key value))) -> ContainerKey (HashMap key value) -> HashMap key value -> HashMap key value #

updateLookupWithKey :: (ContainerKey (HashMap key value) -> MapValue (HashMap key value) -> Maybe (MapValue (HashMap key value))) -> ContainerKey (HashMap key value) -> HashMap key value -> (Maybe (MapValue (HashMap key value)), HashMap key value) #

alterMap :: (Maybe (MapValue (HashMap key value)) -> Maybe (MapValue (HashMap key value))) -> ContainerKey (HashMap key value) -> HashMap key value -> HashMap key value #

unionWith :: (MapValue (HashMap key value) -> MapValue (HashMap key value) -> MapValue (HashMap key value)) -> HashMap key value -> HashMap key value -> HashMap key value #

unionWithKey :: (ContainerKey (HashMap key value) -> MapValue (HashMap key value) -> MapValue (HashMap key value) -> MapValue (HashMap key value)) -> HashMap key value -> HashMap key value -> HashMap key value #

unionsWith :: (MapValue (HashMap key value) -> MapValue (HashMap key value) -> MapValue (HashMap key value)) -> [HashMap key value] -> HashMap key value #

mapWithKey :: (ContainerKey (HashMap key value) -> MapValue (HashMap key value) -> MapValue (HashMap key value)) -> HashMap key value -> HashMap key value #

omapKeysWith :: (MapValue (HashMap key value) -> MapValue (HashMap key value) -> MapValue (HashMap key value)) -> (ContainerKey (HashMap key value) -> ContainerKey (HashMap key value)) -> HashMap key value -> HashMap key value #

filterMap :: (MapValue (HashMap key value) -> Bool) -> HashMap key value -> HashMap key value #

(Eq key, Hashable key) => SetContainer (HashMap key value)

This instance uses the functions from Data.HashMap.Strict.

Instance details

Defined in Data.Containers

Associated Types

type ContainerKey (HashMap key value) #

Methods

member :: ContainerKey (HashMap key value) -> HashMap key value -> Bool #

notMember :: ContainerKey (HashMap key value) -> HashMap key value -> Bool #

union :: HashMap key value -> HashMap key value -> HashMap key value #

unions :: (MonoFoldable mono, Element mono ~ HashMap key value) => mono -> HashMap key value #

difference :: HashMap key value -> HashMap key value -> HashMap key value #

intersection :: HashMap key value -> HashMap key value -> HashMap key value #

keys :: HashMap key value -> [ContainerKey (HashMap key value)] #

(Eq k, Hashable k) => GrowingAppend (HashMap k v) 
Instance details

Defined in Data.MonoTraversable

MonoFoldable (HashMap k v) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (HashMap k v) -> m) -> HashMap k v -> m #

ofoldr :: (Element (HashMap k v) -> b -> b) -> b -> HashMap k v -> b #

ofoldl' :: (a -> Element (HashMap k v) -> a) -> a -> HashMap k v -> a #

otoList :: HashMap k v -> [Element (HashMap k v)] #

oall :: (Element (HashMap k v) -> Bool) -> HashMap k v -> Bool #

oany :: (Element (HashMap k v) -> Bool) -> HashMap k v -> Bool #

onull :: HashMap k v -> Bool #

olength :: HashMap k v -> Int #

olength64 :: HashMap k v -> Int64 #

ocompareLength :: Integral i => HashMap k v -> i -> Ordering #

otraverse_ :: Applicative f => (Element (HashMap k v) -> f b) -> HashMap k v -> f () #

ofor_ :: Applicative f => HashMap k v -> (Element (HashMap k v) -> f b) -> f () #

omapM_ :: Applicative m => (Element (HashMap k v) -> m ()) -> HashMap k v -> m () #

oforM_ :: Applicative m => HashMap k v -> (Element (HashMap k v) -> m ()) -> m () #

ofoldlM :: Monad m => (a -> Element (HashMap k v) -> m a) -> a -> HashMap k v -> m a #

ofoldMap1Ex :: Semigroup m => (Element (HashMap k v) -> m) -> HashMap k v -> m #

ofoldr1Ex :: (Element (HashMap k v) -> Element (HashMap k v) -> Element (HashMap k v)) -> HashMap k v -> Element (HashMap k v) #

ofoldl1Ex' :: (Element (HashMap k v) -> Element (HashMap k v) -> Element (HashMap k v)) -> HashMap k v -> Element (HashMap k v) #

headEx :: HashMap k v -> Element (HashMap k v) #

lastEx :: HashMap k v -> Element (HashMap k v) #

unsafeHead :: HashMap k v -> Element (HashMap k v) #

unsafeLast :: HashMap k v -> Element (HashMap k v) #

maximumByEx :: (Element (HashMap k v) -> Element (HashMap k v) -> Ordering) -> HashMap k v -> Element (HashMap k v) #

minimumByEx :: (Element (HashMap k v) -> Element (HashMap k v) -> Ordering) -> HashMap k v -> Element (HashMap k v) #

oelem :: Element (HashMap k v) -> HashMap k v -> Bool #

onotElem :: Element (HashMap k v) -> HashMap k v -> Bool #

MonoFunctor (HashMap k v) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (HashMap k v) -> Element (HashMap k v)) -> HashMap k v -> HashMap k v #

MonoTraversable (HashMap k v) 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element (HashMap k v) -> f (Element (HashMap k v))) -> HashMap k v -> f (HashMap k v) #

omapM :: Applicative m => (Element (HashMap k v) -> m (Element (HashMap k v))) -> HashMap k v -> m (HashMap k v) #

type BPMKeyConstraint HashMap key 
Instance details

Defined in Data.Containers

type BPMKeyConstraint HashMap key = (Hashable key, Eq key)
type Key (HashMap k) 
Instance details

Defined in Data.Key

type Key (HashMap k) = k
type Item (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

type Item (HashMap k v) = (k, v)
type ContainerKey (HashMap key value) 
Instance details

Defined in Data.Containers

type ContainerKey (HashMap key value) = key
type KeySet (HashMap k v) 
Instance details

Defined in Data.Containers

type KeySet (HashMap k v) = HashSet k
type MapValue (HashMap key value) 
Instance details

Defined in Data.Containers

type MapValue (HashMap key value) = value
type Element (HashMap k v) 
Instance details

Defined in Data.MonoTraversable

type Element (HashMap k v) = v

data Map k a #

A Map from keys k to values a.

The Semigroup operation for Map is union, which prefers values from the left operand. If m1 maps a key k to a value a1, and m2 maps the same key to a different value a2, then their union m1 <> m2 maps k to a1.

Instances

Instances details
Bifoldable Map

Since: containers-0.6.3.1

Instance details

Defined in Data.Map.Internal

Methods

bifold :: Monoid m => Map m m -> m #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Map a b -> m #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Map a b -> c #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Map a b -> c #

Eq2 Map

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> Map a c -> Map b d -> Bool #

Ord2 Map

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> Map a c -> Map b d -> Ordering #

Show2 Map

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> Map a b -> ShowS #

liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Map a b] -> ShowS #

Hashable2 Map

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt2 :: (Int -> a -> Int) -> (Int -> b -> Int) -> Int -> Map a b -> Int #

BiPolyMap Map 
Instance details

Defined in Data.Containers

Associated Types

type BPMKeyConstraint Map key #

Methods

mapKeysWith :: (BPMKeyConstraint Map k1, BPMKeyConstraint Map k2) => (v -> v -> v) -> (k1 -> k2) -> Map k1 v -> Map k2 v #

(Lift k, Lift a) => Lift (Map k a :: Type)

Since: containers-0.6.6

Instance details

Defined in Data.Map.Internal

Methods

lift :: Quote m => Map k a -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Map k a -> Code m (Map k a) #

(key ~ Text, val ~ Text) => RedirectUrl master (Route master, Map key val) 
Instance details

Defined in Yesod.Core.Handler

Methods

toTextUrl :: (MonadHandler m, HandlerSite m ~ master) => (Route master, Map key val) -> m Text #

(FromJSONKey k, Ord k) => FromJSON1 (Map k) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (Map k a) #

liftParseJSONList :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [Map k a] #

liftOmittedField :: Maybe a -> Maybe (Map k a) #

ToJSONKey k => ToJSON1 (Map k) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> Map k a -> Value #

liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [Map k a] -> Value #

liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> Map k a -> Encoding #

liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [Map k a] -> Encoding #

liftOmitField :: (a -> Bool) -> Map k a -> Bool #

Foldable (Map k)

Folds in order of increasing key.

Instance details

Defined in Data.Map.Internal

Methods

fold :: Monoid m => Map k m -> m #

foldMap :: Monoid m => (a -> m) -> Map k a -> m #

foldMap' :: Monoid m => (a -> m) -> Map k a -> m #

foldr :: (a -> b -> b) -> b -> Map k a -> b #

foldr' :: (a -> b -> b) -> b -> Map k a -> b #

foldl :: (b -> a -> b) -> b -> Map k a -> b #

foldl' :: (b -> a -> b) -> b -> Map k a -> b #

foldr1 :: (a -> a -> a) -> Map k a -> a #

foldl1 :: (a -> a -> a) -> Map k a -> a #

toList :: Map k a -> [a] #

null :: Map k a -> Bool #

length :: Map k a -> Int #

elem :: Eq a => a -> Map k a -> Bool #

maximum :: Ord a => Map k a -> a #

minimum :: Ord a => Map k a -> a #

sum :: Num a => Map k a -> a #

product :: Num a => Map k a -> a #

Eq k => Eq1 (Map k)

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

liftEq :: (a -> b -> Bool) -> Map k a -> Map k b -> Bool #

Ord k => Ord1 (Map k)

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

liftCompare :: (a -> b -> Ordering) -> Map k a -> Map k b -> Ordering #

(Ord k, Read k) => Read1 (Map k)

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Map k a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Map k a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Map k a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Map k a] #

Show k => Show1 (Map k)

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Map k a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Map k a] -> ShowS #

Traversable (Map k)

Traverses in order of increasing key.

Instance details

Defined in Data.Map.Internal

Methods

traverse :: Applicative f => (a -> f b) -> Map k a -> f (Map k b) #

sequenceA :: Applicative f => Map k (f a) -> f (Map k a) #

mapM :: Monad m => (a -> m b) -> Map k a -> m (Map k b) #

sequence :: Monad m => Map k (m a) -> m (Map k a) #

Functor (Map k) 
Instance details

Defined in Data.Map.Internal

Methods

fmap :: (a -> b) -> Map k a -> Map k b #

(<$) :: a -> Map k b -> Map k a #

Hashable k => Hashable1 (Map k)

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> Map k a -> Int #

Ord k => Adjustable (Map k) 
Instance details

Defined in Data.Key

Methods

adjust :: (a -> a) -> Key (Map k) -> Map k a -> Map k a #

replace :: Key (Map k) -> a -> Map k a -> Map k a #

FoldableWithKey (Map k) 
Instance details

Defined in Data.Key

Methods

toKeyedList :: Map k a -> [(Key (Map k), a)] #

foldMapWithKey :: Monoid m => (Key (Map k) -> a -> m) -> Map k a -> m #

foldrWithKey :: (Key (Map k) -> a -> b -> b) -> b -> Map k a -> b #

foldlWithKey :: (b -> Key (Map k) -> a -> b) -> b -> Map k a -> b #

Ord k => Indexable (Map k) 
Instance details

Defined in Data.Key

Methods

index :: Map k a -> Key (Map k) -> a #

Keyed (Map k) 
Instance details

Defined in Data.Key

Methods

mapWithKey :: (Key (Map k) -> a -> b) -> Map k a -> Map k b #

Ord k => Lookup (Map k) 
Instance details

Defined in Data.Key

Methods

lookup :: Key (Map k) -> Map k a -> Maybe a #

TraversableWithKey (Map k) 
Instance details

Defined in Data.Key

Methods

traverseWithKey :: Applicative f => (Key (Map k) -> a -> f b) -> Map k a -> f (Map k b) #

mapWithKeyM :: Monad m => (Key (Map k) -> a -> m b) -> Map k a -> m (Map k b) #

Ord k => Zip (Map k) 
Instance details

Defined in Data.Key

Methods

zipWith :: (a -> b -> c) -> Map k a -> Map k b -> Map k c #

zip :: Map k a -> Map k b -> Map k (a, b) #

zap :: Map k (a -> b) -> Map k a -> Map k b #

Ord k => ZipWithKey (Map k) 
Instance details

Defined in Data.Key

Methods

zipWithKey :: (Key (Map k) -> a -> b -> c) -> Map k a -> Map k b -> Map k c #

zapWithKey :: Map k (Key (Map k) -> a -> b) -> Map k a -> Map k b #

Ord key => PolyMap (Map key)

This instance uses the functions from Data.Map.Strict.

Instance details

Defined in Data.Containers

Methods

differenceMap :: Map key value1 -> Map key value2 -> Map key value1 #

intersectionMap :: Map key value1 -> Map key value2 -> Map key value1 #

intersectionWithMap :: (value1 -> value2 -> value3) -> Map key value1 -> Map key value2 -> Map key value3 #

(FromJSONKey k, Ord k, FromJSON v) => FromJSON (Map k v) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Map k v) #

parseJSONList :: Value -> Parser [Map k v] #

omittedField :: Maybe (Map k v) #

(ToJSON v, ToJSONKey k) => ToJSON (Map k v) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Map k v -> Value #

toEncoding :: Map k v -> Encoding #

toJSONList :: [Map k v] -> Value #

toEncodingList :: [Map k v] -> Encoding #

omitField :: Map k v -> Bool #

(Data k, Data a, Ord k) => Data (Map k a) 
Instance details

Defined in Data.Map.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Map k a -> c (Map k a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Map k a) #

toConstr :: Map k a -> Constr #

dataTypeOf :: Map k a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Map k a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Map k a)) #

gmapT :: (forall b. Data b => b -> b) -> Map k a -> Map k a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Map k a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Map k a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Map k a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Map k a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Map k a -> m (Map k a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Map k a -> m (Map k a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Map k a -> m (Map k a) #

Ord k => Monoid (Map k v) 
Instance details

Defined in Data.Map.Internal

Methods

mempty :: Map k v #

mappend :: Map k v -> Map k v -> Map k v #

mconcat :: [Map k v] -> Map k v #

Ord k => Semigroup (Map k v) 
Instance details

Defined in Data.Map.Internal

Methods

(<>) :: Map k v -> Map k v -> Map k v #

sconcat :: NonEmpty (Map k v) -> Map k v #

stimes :: Integral b => b -> Map k v -> Map k v #

Ord k => IsList (Map k v)

Since: containers-0.5.6.2

Instance details

Defined in Data.Map.Internal

Associated Types

type Item (Map k v) #

Methods

fromList :: [Item (Map k v)] -> Map k v #

fromListN :: Int -> [Item (Map k v)] -> Map k v #

toList :: Map k v -> [Item (Map k v)] #

(Ord k, Read k, Read e) => Read (Map k e) 
Instance details

Defined in Data.Map.Internal

Methods

readsPrec :: Int -> ReadS (Map k e) #

readList :: ReadS [Map k e] #

readPrec :: ReadPrec (Map k e) #

readListPrec :: ReadPrec [Map k e] #

(Show k, Show a) => Show (Map k a) 
Instance details

Defined in Data.Map.Internal

Methods

showsPrec :: Int -> Map k a -> ShowS #

show :: Map k a -> String #

showList :: [Map k a] -> ShowS #

(NFData k, NFData a) => NFData (Map k a) 
Instance details

Defined in Data.Map.Internal

Methods

rnf :: Map k a -> () #

(Eq k, Eq a) => Eq (Map k a) 
Instance details

Defined in Data.Map.Internal

Methods

(==) :: Map k a -> Map k a -> Bool #

(/=) :: Map k a -> Map k a -> Bool #

(Ord k, Ord v) => Ord (Map k v) 
Instance details

Defined in Data.Map.Internal

Methods

compare :: Map k v -> Map k v -> Ordering #

(<) :: Map k v -> Map k v -> Bool #

(<=) :: Map k v -> Map k v -> Bool #

(>) :: Map k v -> Map k v -> Bool #

(>=) :: Map k v -> Map k v -> Bool #

max :: Map k v -> Map k v -> Map k v #

min :: Map k v -> Map k v -> Map k v #

(Hashable k, Hashable v) => Hashable (Map k v)

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Map k v -> Int #

hash :: Map k v -> Int #

(Ord k, FromFormKey k, FromHttpApiData v) => FromForm (Map k [v]) 
Instance details

Defined in Web.Internal.FormUrlEncoded

Methods

fromForm :: Form -> Either Text (Map k [v]) #

(ToFormKey k, ToHttpApiData v) => ToForm (Map k [v]) 
Instance details

Defined in Web.Internal.FormUrlEncoded

Methods

toForm :: Map k [v] -> Form #

Ord k => HasKeysSet (Map k v) 
Instance details

Defined in Data.Containers

Associated Types

type KeySet (Map k v) #

Methods

keysSet :: Map k v -> KeySet (Map k v) #

Ord key => IsMap (Map key value)

This instance uses the functions from Data.Map.Strict.

Instance details

Defined in Data.Containers

Associated Types

type MapValue (Map key value) #

Methods

lookup :: ContainerKey (Map key value) -> Map key value -> Maybe (MapValue (Map key value)) #

insertMap :: ContainerKey (Map key value) -> MapValue (Map key value) -> Map key value -> Map key value #

deleteMap :: ContainerKey (Map key value) -> Map key value -> Map key value #

singletonMap :: ContainerKey (Map key value) -> MapValue (Map key value) -> Map key value #

mapFromList :: [(ContainerKey (Map key value), MapValue (Map key value))] -> Map key value #

mapToList :: Map key value -> [(ContainerKey (Map key value), MapValue (Map key value))] #

findWithDefault :: MapValue (Map key value) -> ContainerKey (Map key value) -> Map key value -> MapValue (Map key value) #

insertWith :: (MapValue (Map key value) -> MapValue (Map key value) -> MapValue (Map key value)) -> ContainerKey (Map key value) -> MapValue (Map key value) -> Map key value -> Map key value #

insertWithKey :: (ContainerKey (Map key value) -> MapValue (Map key value) -> MapValue (Map key value) -> MapValue (Map key value)) -> ContainerKey (Map key value) -> MapValue (Map key value) -> Map key value -> Map key value #

insertLookupWithKey :: (ContainerKey (Map key value) -> MapValue (Map key value) -> MapValue (Map key value) -> MapValue (Map key value)) -> ContainerKey (Map key value) -> MapValue (Map key value) -> Map key value -> (Maybe (MapValue (Map key value)), Map key value) #

adjustMap :: (MapValue (Map key value) -> MapValue (Map key value)) -> ContainerKey (Map key value) -> Map key value -> Map key value #

adjustWithKey :: (ContainerKey (Map key value) -> MapValue (Map key value) -> MapValue (Map key value)) -> ContainerKey (Map key value) -> Map key value -> Map key value #

updateMap :: (MapValue (Map key value) -> Maybe (MapValue (Map key value))) -> ContainerKey (Map key value) -> Map key value -> Map key value #

updateWithKey :: (ContainerKey (Map key value) -> MapValue (Map key value) -> Maybe (MapValue (Map key value))) -> ContainerKey (Map key value) -> Map key value -> Map key value #

updateLookupWithKey :: (ContainerKey (Map key value) -> MapValue (Map key value) -> Maybe (MapValue (Map key value))) -> ContainerKey (Map key value) -> Map key value -> (Maybe (MapValue (Map key value)), Map key value) #

alterMap :: (Maybe (MapValue (Map key value)) -> Maybe (MapValue (Map key value))) -> ContainerKey (Map key value) -> Map key value -> Map key value #

unionWith :: (MapValue (Map key value) -> MapValue (Map key value) -> MapValue (Map key value)) -> Map key value -> Map key value -> Map key value #

unionWithKey :: (ContainerKey (Map key value) -> MapValue (Map key value) -> MapValue (Map key value) -> MapValue (Map key value)) -> Map key value -> Map key value -> Map key value #

unionsWith :: (MapValue (Map key value) -> MapValue (Map key value) -> MapValue (Map key value)) -> [Map key value] -> Map key value #

mapWithKey :: (ContainerKey (Map key value) -> MapValue (Map key value) -> MapValue (Map key value)) -> Map key value -> Map key value #

omapKeysWith :: (MapValue (Map key value) -> MapValue (Map key value) -> MapValue (Map key value)) -> (ContainerKey (Map key value) -> ContainerKey (Map key value)) -> Map key value -> Map key value #

filterMap :: (MapValue (Map key value) -> Bool) -> Map key value -> Map key value #

Ord k => SetContainer (Map k v)

This instance uses the functions from Data.Map.Strict.

Instance details

Defined in Data.Containers

Associated Types

type ContainerKey (Map k v) #

Methods

member :: ContainerKey (Map k v) -> Map k v -> Bool #

notMember :: ContainerKey (Map k v) -> Map k v -> Bool #

union :: Map k v -> Map k v -> Map k v #

unions :: (MonoFoldable mono, Element mono ~ Map k v) => mono -> Map k v #

difference :: Map k v -> Map k v -> Map k v #

intersection :: Map k v -> Map k v -> Map k v #

keys :: Map k v -> [ContainerKey (Map k v)] #

Ord k => GrowingAppend (Map k v) 
Instance details

Defined in Data.MonoTraversable

MonoFoldable (Map k v) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (Map k v) -> m) -> Map k v -> m #

ofoldr :: (Element (Map k v) -> b -> b) -> b -> Map k v -> b #

ofoldl' :: (a -> Element (Map k v) -> a) -> a -> Map k v -> a #

otoList :: Map k v -> [Element (Map k v)] #

oall :: (Element (Map k v) -> Bool) -> Map k v -> Bool #

oany :: (Element (Map k v) -> Bool) -> Map k v -> Bool #

onull :: Map k v -> Bool #

olength :: Map k v -> Int #

olength64 :: Map k v -> Int64 #

ocompareLength :: Integral i => Map k v -> i -> Ordering #

otraverse_ :: Applicative f => (Element (Map k v) -> f b) -> Map k v -> f () #

ofor_ :: Applicative f => Map k v -> (Element (Map k v) -> f b) -> f () #

omapM_ :: Applicative m => (Element (Map k v) -> m ()) -> Map k v -> m () #

oforM_ :: Applicative m => Map k v -> (Element (Map k v) -> m ()) -> m () #

ofoldlM :: Monad m => (a -> Element (Map k v) -> m a) -> a -> Map k v -> m a #

ofoldMap1Ex :: Semigroup m => (Element (Map k v) -> m) -> Map k v -> m #

ofoldr1Ex :: (Element (Map k v) -> Element (Map k v) -> Element (Map k v)) -> Map k v -> Element (Map k v) #

ofoldl1Ex' :: (Element (Map k v) -> Element (Map k v) -> Element (Map k v)) -> Map k v -> Element (Map k v) #

headEx :: Map k v -> Element (Map k v) #

lastEx :: Map k v -> Element (Map k v) #

unsafeHead :: Map k v -> Element (Map k v) #

unsafeLast :: Map k v -> Element (Map k v) #

maximumByEx :: (Element (Map k v) -> Element (Map k v) -> Ordering) -> Map k v -> Element (Map k v) #

minimumByEx :: (Element (Map k v) -> Element (Map k v) -> Ordering) -> Map k v -> Element (Map k v) #

oelem :: Element (Map k v) -> Map k v -> Bool #

onotElem :: Element (Map k v) -> Map k v -> Bool #

MonoFunctor (Map k v) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (Map k v) -> Element (Map k v)) -> Map k v -> Map k v #

MonoTraversable (Map k v) 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element (Map k v) -> f (Element (Map k v))) -> Map k v -> f (Map k v) #

omapM :: Applicative m => (Element (Map k v) -> m (Element (Map k v))) -> Map k v -> m (Map k v) #

PersistField v => PersistField (Map Text v) 
Instance details

Defined in Database.Persist.Class.PersistField

PersistFieldSql v => PersistFieldSql (Map Text v) 
Instance details

Defined in Database.Persist.Sql.Class

Methods

sqlType :: Proxy (Map Text v) -> SqlType #

type BPMKeyConstraint Map key 
Instance details

Defined in Data.Containers

type BPMKeyConstraint Map key = Ord key
type Key (Map k) 
Instance details

Defined in Data.Key

type Key (Map k) = k
type Item (Map k v) 
Instance details

Defined in Data.Map.Internal

type Item (Map k v) = (k, v)
type ContainerKey (Map k v) 
Instance details

Defined in Data.Containers

type ContainerKey (Map k v) = k
type KeySet (Map k v) 
Instance details

Defined in Data.Containers

type KeySet (Map k v) = Set k
type MapValue (Map key value) 
Instance details

Defined in Data.Containers

type MapValue (Map key value) = value
type Element (Map k v) 
Instance details

Defined in Data.MonoTraversable

type Element (Map k v) = v

data Word8 #

8-bit unsigned integer type

Instances

Instances details
FromJSON Word8 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSONKey Word8 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON Word8 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSONKey Word8 
Instance details

Defined in Data.Aeson.Types.ToJSON

Storable Word8

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Word8 -> Int #

alignment :: Word8 -> Int #

peekElemOff :: Ptr Word8 -> Int -> IO Word8 #

pokeElemOff :: Ptr Word8 -> Int -> Word8 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Word8 #

pokeByteOff :: Ptr b -> Int -> Word8 -> IO () #

peek :: Ptr Word8 -> IO Word8 #

poke :: Ptr Word8 -> Word8 -> IO () #

Bits Word8

Since: base-2.1

Instance details

Defined in GHC.Word

FiniteBits Word8

Since: base-4.6.0.0

Instance details

Defined in GHC.Word

Bounded Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Ix Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Num Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Read Word8

Since: base-2.1

Instance details

Defined in GHC.Read

Integral Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Real Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

toRational :: Word8 -> Rational #

Show Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

showsPrec :: Int -> Word8 -> ShowS #

show :: Word8 -> String #

showList :: [Word8] -> ShowS #

BitOps Word8 
Instance details

Defined in Basement.Bits

FiniteBitsOps Word8 
Instance details

Defined in Basement.Bits

Subtractive Word8 
Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference Word8 #

Methods

(-) :: Word8 -> Word8 -> Difference Word8 #

PrimMemoryComparable Word8 
Instance details

Defined in Basement.PrimType

PrimType Word8 
Instance details

Defined in Basement.PrimType

Associated Types

type PrimSize Word8 :: Nat #

Default Word8 
Instance details

Defined in Data.Default.Class

Methods

def :: Word8 #

NFData Word8 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Word8 -> () #

ToLogStr Word8

Since: fast-logger-2.4.14

Instance details

Defined in System.Log.FastLogger.LogStr

Methods

toLogStr :: Word8 -> LogStr #

Eq Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

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

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

Ord Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

compare :: Word8 -> Word8 -> Ordering #

(<) :: Word8 -> Word8 -> Bool #

(<=) :: Word8 -> Word8 -> Bool #

(>) :: Word8 -> Word8 -> Bool #

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

max :: Word8 -> Word8 -> Word8 #

min :: Word8 -> Word8 -> Word8 #

Hashable Word8 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word8 -> Int #

hash :: Word8 -> Int #

FromFormKey Word8 
Instance details

Defined in Web.Internal.FormUrlEncoded

ToFormKey Word8 
Instance details

Defined in Web.Internal.FormUrlEncoded

Methods

toFormKey :: Word8 -> Text #

FromHttpApiData Word8 
Instance details

Defined in Web.Internal.HttpApiData

ToHttpApiData Word8 
Instance details

Defined in Web.Internal.HttpApiData

PathPiece Word8 
Instance details

Defined in Web.PathPieces

PersistField Word8 
Instance details

Defined in Database.Persist.Class.PersistField

PersistFieldSql Word8 
Instance details

Defined in Database.Persist.Sql.Class

Methods

sqlType :: Proxy Word8 -> SqlType #

Prim Word8 
Instance details

Defined in Data.Primitive.Types

Uniform Word8 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Word8 #

UniformRange Word8 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Word8, Word8) -> g -> m Word8 #

ByteSource Word8 
Instance details

Defined in Data.UUID.Types.Internal.Builder

Methods

(/-/) :: ByteSink Word8 g -> Word8 -> g

Unbox Word8 
Instance details

Defined in Data.Vector.Unboxed.Base

Lift Word8 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Word8 -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Word8 -> Code m Word8 #

Vector Vector Word8 
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Word8 
Instance details

Defined in Data.Vector.Unboxed.Base

type NatNumMaxBound Word8 
Instance details

Defined in Basement.Nat

type Difference Word8 
Instance details

Defined in Basement.Numerical.Subtractive

type PrimSize Word8 
Instance details

Defined in Basement.PrimType

type PrimSize Word8 = 1
newtype Vector Word8 
Instance details

Defined in Data.Vector.Unboxed.Base

type ByteSink Word8 g 
Instance details

Defined in Data.UUID.Types.Internal.Builder

type ByteSink Word8 g = Takes1Byte g
newtype MVector s Word8 
Instance details

Defined in Data.Vector.Unboxed.Base

data Word64 #

64-bit unsigned integer type

Instances

Instances details
FromJSON Word64 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSONKey Word64 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON Word64 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSONKey Word64 
Instance details

Defined in Data.Aeson.Types.ToJSON

Storable Word64

Since: base-2.1

Instance details

Defined in Foreign.Storable

Bits Word64

Since: base-2.1

Instance details

Defined in GHC.Word

FiniteBits Word64

Since: base-4.6.0.0

Instance details

Defined in GHC.Word

Bounded Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Ix Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Num Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Read Word64

Since: base-2.1

Instance details

Defined in GHC.Read

Integral Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Real Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Show Word64

Since: base-2.1

Instance details

Defined in GHC.Word

BitOps Word64 
Instance details

Defined in Basement.Bits

FiniteBitsOps Word64 
Instance details

Defined in Basement.Bits

Subtractive Word64 
Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference Word64 #

PrimMemoryComparable Word64 
Instance details

Defined in Basement.PrimType

PrimType Word64 
Instance details

Defined in Basement.PrimType

Associated Types

type PrimSize Word64 :: Nat #

ToMarkup Word64 
Instance details

Defined in Text.Blaze

ToValue Word64 
Instance details

Defined in Text.Blaze

Default Word64 
Instance details

Defined in Data.Default.Class

Methods

def :: Word64 #

NFData Word64 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Word64 -> () #

ToLogStr Word64

Since: fast-logger-2.4.14

Instance details

Defined in System.Log.FastLogger.LogStr

Methods

toLogStr :: Word64 -> LogStr #

Eq Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

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

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

Ord Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Hashable Word64 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word64 -> Int #

hash :: Word64 -> Int #

FromFormKey Word64 
Instance details

Defined in Web.Internal.FormUrlEncoded

ToFormKey Word64 
Instance details

Defined in Web.Internal.FormUrlEncoded

Methods

toFormKey :: Word64 -> Text #

FromHttpApiData Word64 
Instance details

Defined in Web.Internal.HttpApiData

ToHttpApiData Word64 
Instance details

Defined in Web.Internal.HttpApiData

PathPiece Word64 
Instance details

Defined in Web.PathPieces

PersistField Word64 
Instance details

Defined in Database.Persist.Class.PersistField

PersistFieldSql Word64 
Instance details

Defined in Database.Persist.Sql.Class

Prim Word64 
Instance details

Defined in Data.Primitive.Types

Uniform Word64 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Word64 #

UniformRange Word64 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Word64, Word64) -> g -> m Word64 #

ByteSource Word64 
Instance details

Defined in Data.UUID.Types.Internal.Builder

Methods

(/-/) :: ByteSink Word64 g -> Word64 -> g

Unbox Word64 
Instance details

Defined in Data.Vector.Unboxed.Base

Lift Word64 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Word64 -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Word64 -> Code m Word64 #

Vector Vector Word64 
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Word64 
Instance details

Defined in Data.Vector.Unboxed.Base

type NatNumMaxBound Word64 
Instance details

Defined in Basement.Nat

type NatNumMaxBound Word64 = 18446744073709551615
type Difference Word64 
Instance details

Defined in Basement.Numerical.Subtractive

type PrimSize Word64 
Instance details

Defined in Basement.PrimType

type PrimSize Word64 = 8
newtype Vector Word64 
Instance details

Defined in Data.Vector.Unboxed.Base

type ByteSink Word64 g 
Instance details

Defined in Data.UUID.Types.Internal.Builder

type ByteSink Word64 g = Takes8Bytes g
newtype MVector s Word64 
Instance details

Defined in Data.Vector.Unboxed.Base

data Word32 #

32-bit unsigned integer type

Instances

Instances details
FromJSON Word32 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSONKey Word32 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON Word32 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSONKey Word32 
Instance details

Defined in Data.Aeson.Types.ToJSON

Storable Word32

Since: base-2.1

Instance details

Defined in Foreign.Storable

Bits Word32

Since: base-2.1

Instance details

Defined in GHC.Word

FiniteBits Word32

Since: base-4.6.0.0

Instance details

Defined in GHC.Word

Bounded Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Ix Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Num Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Read Word32

Since: base-2.1

Instance details

Defined in GHC.Read

Integral Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Real Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Show Word32

Since: base-2.1

Instance details

Defined in GHC.Word

BitOps Word32 
Instance details

Defined in Basement.Bits

FiniteBitsOps Word32 
Instance details

Defined in Basement.Bits

Subtractive Word32 
Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference Word32 #

PrimMemoryComparable Word32 
Instance details

Defined in Basement.PrimType

PrimType Word32 
Instance details

Defined in Basement.PrimType

Associated Types

type PrimSize Word32 :: Nat #

ToMarkup Word32 
Instance details

Defined in Text.Blaze

ToValue Word32 
Instance details

Defined in Text.Blaze

Default Word32 
Instance details

Defined in Data.Default.Class

Methods

def :: Word32 #

NFData Word32 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Word32 -> () #

ToLogStr Word32

Since: fast-logger-2.4.14

Instance details

Defined in System.Log.FastLogger.LogStr

Methods

toLogStr :: Word32 -> LogStr #

Eq Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

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

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

Ord Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Hashable Word32 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word32 -> Int #

hash :: Word32 -> Int #

FromFormKey Word32 
Instance details

Defined in Web.Internal.FormUrlEncoded

ToFormKey Word32 
Instance details

Defined in Web.Internal.FormUrlEncoded

Methods

toFormKey :: Word32 -> Text #

FromHttpApiData Word32 
Instance details

Defined in Web.Internal.HttpApiData

ToHttpApiData Word32 
Instance details

Defined in Web.Internal.HttpApiData

PathPiece Word32 
Instance details

Defined in Web.PathPieces

PersistField Word32 
Instance details

Defined in Database.Persist.Class.PersistField

PersistFieldSql Word32 
Instance details

Defined in Database.Persist.Sql.Class

Prim Word32 
Instance details

Defined in Data.Primitive.Types

Uniform Word32 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Word32 #

UniformRange Word32 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Word32, Word32) -> g -> m Word32 #

ByteSource Word32 
Instance details

Defined in Data.UUID.Types.Internal.Builder

Methods

(/-/) :: ByteSink Word32 g -> Word32 -> g

Unbox Word32 
Instance details

Defined in Data.Vector.Unboxed.Base

Lift Word32 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Word32 -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Word32 -> Code m Word32 #

Vector Vector Word32 
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Word32 
Instance details

Defined in Data.Vector.Unboxed.Base

type NatNumMaxBound Word32 
Instance details

Defined in Basement.Nat

type NatNumMaxBound Word32 = 4294967295
type Difference Word32 
Instance details

Defined in Basement.Numerical.Subtractive

type PrimSize Word32 
Instance details

Defined in Basement.PrimType

type PrimSize Word32 = 4
newtype Vector Word32 
Instance details

Defined in Data.Vector.Unboxed.Base

type ByteSink Word32 g 
Instance details

Defined in Data.UUID.Types.Internal.Builder

type ByteSink Word32 g = Takes4Bytes g
newtype MVector s Word32 
Instance details

Defined in Data.Vector.Unboxed.Base

data Int32 #

32-bit signed integer type

Instances

Instances details
FromJSON Int32 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSONKey Int32 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON Int32 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSONKey Int32 
Instance details

Defined in Data.Aeson.Types.ToJSON

Storable Int32

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Int32 -> Int #

alignment :: Int32 -> Int #

peekElemOff :: Ptr Int32 -> Int -> IO Int32 #

pokeElemOff :: Ptr Int32 -> Int -> Int32 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Int32 #

pokeByteOff :: Ptr b -> Int -> Int32 -> IO () #

peek :: Ptr Int32 -> IO Int32 #

poke :: Ptr Int32 -> Int32 -> IO () #

Bits Int32

Since: base-2.1

Instance details

Defined in GHC.Int

FiniteBits Int32

Since: base-4.6.0.0

Instance details

Defined in GHC.Int

Bounded Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Ix Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Num Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Read Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Integral Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Real Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

toRational :: Int32 -> Rational #

Show Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

showsPrec :: Int -> Int32 -> ShowS #

show :: Int32 -> String #

showList :: [Int32] -> ShowS #

BitOps Int32 
Instance details

Defined in Basement.Bits

FiniteBitsOps Int32 
Instance details

Defined in Basement.Bits

Subtractive Int32 
Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference Int32 #

Methods

(-) :: Int32 -> Int32 -> Difference Int32 #

PrimMemoryComparable Int32 
Instance details

Defined in Basement.PrimType

PrimType Int32 
Instance details

Defined in Basement.PrimType

Associated Types

type PrimSize Int32 :: Nat #

ToMarkup Int32 
Instance details

Defined in Text.Blaze

ToValue Int32 
Instance details

Defined in Text.Blaze

Default Int32 
Instance details

Defined in Data.Default.Class

Methods

def :: Int32 #

NFData Int32 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Int32 -> () #

ToLogStr Int32

Since: fast-logger-2.4.14

Instance details

Defined in System.Log.FastLogger.LogStr

Methods

toLogStr :: Int32 -> LogStr #

Eq Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

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

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

Ord Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

compare :: Int32 -> Int32 -> Ordering #

(<) :: Int32 -> Int32 -> Bool #

(<=) :: Int32 -> Int32 -> Bool #

(>) :: Int32 -> Int32 -> Bool #

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

max :: Int32 -> Int32 -> Int32 #

min :: Int32 -> Int32 -> Int32 #

Hashable Int32 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int32 -> Int #

hash :: Int32 -> Int #

FromFormKey Int32 
Instance details

Defined in Web.Internal.FormUrlEncoded

ToFormKey Int32 
Instance details

Defined in Web.Internal.FormUrlEncoded

Methods

toFormKey :: Int32 -> Text #

FromHttpApiData Int32 
Instance details

Defined in Web.Internal.HttpApiData

ToHttpApiData Int32 
Instance details

Defined in Web.Internal.HttpApiData

PathPiece Int32 
Instance details

Defined in Web.PathPieces

PersistField Int32 
Instance details

Defined in Database.Persist.Class.PersistField

PersistFieldSql Int32 
Instance details

Defined in Database.Persist.Sql.Class

Methods

sqlType :: Proxy Int32 -> SqlType #

Prim Int32 
Instance details

Defined in Data.Primitive.Types

Uniform Int32 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Int32 #

UniformRange Int32 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Int32, Int32) -> g -> m Int32 #

Unbox Int32 
Instance details

Defined in Data.Vector.Unboxed.Base

Lift Int32 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Int32 -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Int32 -> Code m Int32 #

Vector Vector Int32 
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Int32 
Instance details

Defined in Data.Vector.Unboxed.Base

type NatNumMaxBound Int32 
Instance details

Defined in Basement.Nat

type NatNumMaxBound Int32 = 2147483647
type Difference Int32 
Instance details

Defined in Basement.Numerical.Subtractive

type PrimSize Int32 
Instance details

Defined in Basement.PrimType

type PrimSize Int32 = 4
newtype Vector Int32 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Int32 
Instance details

Defined in Data.Vector.Unboxed.Base

data Int64 #

64-bit signed integer type

Instances

Instances details
FromJSON Int64 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSONKey Int64 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON Int64 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSONKey Int64 
Instance details

Defined in Data.Aeson.Types.ToJSON

Storable Int64

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Int64 -> Int #

alignment :: Int64 -> Int #

peekElemOff :: Ptr Int64 -> Int -> IO Int64 #

pokeElemOff :: Ptr Int64 -> Int -> Int64 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Int64 #

pokeByteOff :: Ptr b -> Int -> Int64 -> IO () #

peek :: Ptr Int64 -> IO Int64 #

poke :: Ptr Int64 -> Int64 -> IO () #

Bits Int64

Since: base-2.1

Instance details

Defined in GHC.Int

FiniteBits Int64

Since: base-4.6.0.0

Instance details

Defined in GHC.Int

Bounded Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Ix Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Num Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Read Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Integral Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Real Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

toRational :: Int64 -> Rational #

Show Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

showsPrec :: Int -> Int64 -> ShowS #

show :: Int64 -> String #

showList :: [Int64] -> ShowS #

BitOps Int64 
Instance details

Defined in Basement.Bits

FiniteBitsOps Int64 
Instance details

Defined in Basement.Bits

Subtractive Int64 
Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference Int64 #

Methods

(-) :: Int64 -> Int64 -> Difference Int64 #

PrimMemoryComparable Int64 
Instance details

Defined in Basement.PrimType

PrimType Int64 
Instance details

Defined in Basement.PrimType

Associated Types

type PrimSize Int64 :: Nat #

ToMarkup Int64 
Instance details

Defined in Text.Blaze

ToValue Int64 
Instance details

Defined in Text.Blaze

Default Int64 
Instance details

Defined in Data.Default.Class

Methods

def :: Int64 #

NFData Int64 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Int64 -> () #

ToLogStr Int64

Since: fast-logger-2.4.14

Instance details

Defined in System.Log.FastLogger.LogStr

Methods

toLogStr :: Int64 -> LogStr #

Eq Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

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

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

Ord Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

compare :: Int64 -> Int64 -> Ordering #

(<) :: Int64 -> Int64 -> Bool #

(<=) :: Int64 -> Int64 -> Bool #

(>) :: Int64 -> Int64 -> Bool #

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

max :: Int64 -> Int64 -> Int64 #

min :: Int64 -> Int64 -> Int64 #

Hashable Int64 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int64 -> Int #

hash :: Int64 -> Int #

FromFormKey Int64 
Instance details

Defined in Web.Internal.FormUrlEncoded

ToFormKey Int64 
Instance details

Defined in Web.Internal.FormUrlEncoded

Methods

toFormKey :: Int64 -> Text #

FromHttpApiData Int64 
Instance details

Defined in Web.Internal.HttpApiData

ToHttpApiData Int64 
Instance details

Defined in Web.Internal.HttpApiData

PathPiece Int64 
Instance details

Defined in Web.PathPieces

PersistField Int64 
Instance details

Defined in Database.Persist.Class.PersistField

PersistFieldSql Int64 
Instance details

Defined in Database.Persist.Sql.Class

Methods

sqlType :: Proxy Int64 -> SqlType #

Prim Int64 
Instance details

Defined in Data.Primitive.Types

Uniform Int64 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Int64 #

UniformRange Int64 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Int64, Int64) -> g -> m Int64 #

Unbox Int64 
Instance details

Defined in Data.Vector.Unboxed.Base

Lift Int64 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Int64 -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Int64 -> Code m Int64 #

Vector Vector Int64 
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Int64 
Instance details

Defined in Data.Vector.Unboxed.Base

type NatNumMaxBound Int64 
Instance details

Defined in Basement.Nat

type NatNumMaxBound Int64 = 9223372036854775807
type Difference Int64 
Instance details

Defined in Basement.Numerical.Subtractive

type PrimSize Int64 
Instance details

Defined in Basement.PrimType

type PrimSize Int64 = 8
newtype Vector Int64 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Int64 
Instance details

Defined in Data.Vector.Unboxed.Base

class Typeable (a :: k) #

The class Typeable allows a concrete representation of a type to be calculated.

Minimal complete definition

typeRep#

class IsString a where #

Class for string-like datastructures; used by the overloaded string extension (-XOverloadedStrings in GHC).

Methods

fromString :: String -> a #

Instances

Instances details
IsString Key 
Instance details

Defined in Data.Aeson.Key

Methods

fromString :: String -> Key #

IsString Value 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

fromString :: String -> Value #

IsString String 
Instance details

Defined in Basement.UTF8.Base

Methods

fromString :: String0 -> String #

IsString AttributeValue 
Instance details

Defined in Text.Blaze.Internal

IsString ChoiceString 
Instance details

Defined in Text.Blaze.Internal

IsString StaticString 
Instance details

Defined in Text.Blaze.Internal

IsString Tag 
Instance details

Defined in Text.Blaze.Internal

Methods

fromString :: String -> Tag #

IsString ByteString

Beware: fromString truncates multi-byte characters to octets. e.g. "枯朶に烏のとまりけり秋の暮" becomes �6k�nh~�Q��n�

Instance details

Defined in Data.ByteString.Internal.Type

IsString ByteString

Beware: fromString truncates multi-byte characters to octets. e.g. "枯朶に烏のとまりけり秋の暮" becomes �6k�nh~�Q��n�

Instance details

Defined in Data.ByteString.Lazy.Internal

IsString ShortByteString

Beware: fromString truncates multi-byte characters to octets. e.g. "枯朶に烏のとまりけり秋の暮" becomes �6k�nh~�Q��n�

Instance details

Defined in Data.ByteString.Short.Internal

IsString LogStr 
Instance details

Defined in System.Log.FastLogger.LogStr

Methods

fromString :: String -> LogStr #

IsString RequestBody

Since 0.4.12

Instance details

Defined in Network.HTTP.Client.Types

IsString IP 
Instance details

Defined in Data.IP.Addr

Methods

fromString :: String -> IP #

IsString IPv4 
Instance details

Defined in Data.IP.Addr

Methods

fromString :: String -> IPv4 #

IsString IPv6 
Instance details

Defined in Data.IP.Addr

Methods

fromString :: String -> IPv6 #

IsString IPRange 
Instance details

Defined in Data.IP.Range

Methods

fromString :: String -> IPRange #

IsString Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Methods

fromString :: String -> Doc #

IsString HostPreference 
Instance details

Defined in Data.Streaming.Network.Internal

IsString Builder

Performs replacement on invalid scalar values:

>>> :set -XOverloadedStrings
>>> "\55555" :: Builder
"\65533"
Instance details

Defined in Data.Text.Internal.Builder

Methods

fromString :: String -> Builder #

IsString ShortText

Note: Surrogate pairs ([U+D800 .. U+DFFF]) in string literals are replaced by U+FFFD.

This matches the behaviour of IsString instance for Text.

Instance details

Defined in Data.Text.Short.Internal

IsString Content 
Instance details

Defined in Data.XML.Types

Methods

fromString :: String -> Content #

IsString Name 
Instance details

Defined in Data.XML.Types

Methods

fromString :: String -> Name #

IsString Node 
Instance details

Defined in Data.XML.Types

Methods

fromString :: String -> Node #

IsString Content 
Instance details

Defined in Yesod.Core.Types

Methods

fromString :: String -> Content #

IsString Textarea 
Instance details

Defined in Yesod.Form.Fields

IsString (Encoding' a)

Since: aeson-2.2.0.0

Instance details

Defined in Data.Aeson.Encoding.Internal

Methods

fromString :: String -> Encoding' a #

IsString a => IsString (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.String

Methods

fromString :: String -> Identity a #

a ~ () => IsString (MarkupM a) 
Instance details

Defined in Text.Blaze.Internal

Methods

fromString :: String -> MarkupM a #

(IsString s, FoldCase s) => IsString (CI s) 
Instance details

Defined in Data.CaseInsensitive.Internal

Methods

fromString :: String -> CI s #

a ~ Char => IsString (Seq a)

Since: containers-0.5.7

Instance details

Defined in Data.Sequence.Internal

Methods

fromString :: String -> Seq a #

a ~ Char => IsString (DNonEmpty a) 
Instance details

Defined in Data.DList.DNonEmpty.Internal

Methods

fromString :: String -> DNonEmpty a #

a ~ Char => IsString (DList a) 
Instance details

Defined in Data.DList.Internal

Methods

fromString :: String -> DList a #

(IsString a, Hashable a) => IsString (Hashed a) 
Instance details

Defined in Data.Hashable.Class

Methods

fromString :: String -> Hashed a #

IsString (AddrRange IPv4) 
Instance details

Defined in Data.IP.Range

IsString (AddrRange IPv6) 
Instance details

Defined in Data.IP.Range

IsString (Doc a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

fromString :: String -> Doc a #

IsString (SomeMessage master) 
Instance details

Defined in Text.Shakespeare.I18N

Methods

fromString :: String -> SomeMessage master #

IsString (FieldSettings a) 
Instance details

Defined in Yesod.Form.Types

a ~ Char => IsString [a]

(a ~ Char) context was introduced in 4.9.0.0

Since: base-2.1

Instance details

Defined in Data.String

Methods

fromString :: String -> [a] #

a ~ () => IsString (WidgetFor site a)

A String can be trivially promoted to a widget.

For example, in a yesod-scaffold site you could use:

getHomeR = do defaultLayout "Widget text"
Instance details

Defined in Yesod.Core.Types

Methods

fromString :: String -> WidgetFor site a #

IsString a => IsString (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.String

Methods

fromString :: String -> Const a b #

IsString a => IsString (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

fromString :: String -> Tagged s a #

data Text #

A space efficient, packed, unboxed Unicode text type.

Instances

Instances details
FromJSON Text 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSONKey Text 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON Text 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSONKey Text 
Instance details

Defined in Data.Aeson.Types.ToJSON

Chunk Text 
Instance details

Defined in Data.Attoparsec.Internal.Types

Associated Types

type ChunkElem Text #

ToMarkup Text 
Instance details

Defined in Text.Blaze

ToValue Text 
Instance details

Defined in Text.Blaze

FoldCase Text 
Instance details

Defined in Data.CaseInsensitive.Internal

Methods

foldCase :: Text -> Text #

foldCaseList :: [Text] -> [Text]

SqlString Text

Since: esqueleto-2.3.0

Instance details

Defined in Database.Esqueleto.Internal.Internal

ToLogStr Text 
Instance details

Defined in System.Log.FastLogger.LogStr

Methods

toLogStr :: Text -> LogStr #

Hashable Text 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Text -> Int #

hash :: Text -> Int #

FromFormKey Text 
Instance details

Defined in Web.Internal.FormUrlEncoded

ToFormKey Text 
Instance details

Defined in Web.Internal.FormUrlEncoded

Methods

toFormKey :: Text -> Text #

FromHttpApiData Text 
Instance details

Defined in Web.Internal.HttpApiData

ToHttpApiData Text 
Instance details

Defined in Web.Internal.HttpApiData

QueryKeyLike Text 
Instance details

Defined in Network.HTTP.Types.QueryLike

QueryValueLike Text 
Instance details

Defined in Network.HTTP.Types.QueryLike

MonoZip Text 
Instance details

Defined in Data.Containers

GrowingAppend Text 
Instance details

Defined in Data.MonoTraversable

MonoFoldable Text 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element Text -> m) -> Text -> m #

ofoldr :: (Element Text -> b -> b) -> b -> Text -> b #

ofoldl' :: (a -> Element Text -> a) -> a -> Text -> a #

otoList :: Text -> [Element Text] #

oall :: (Element Text -> Bool) -> Text -> Bool #

oany :: (Element Text -> Bool) -> Text -> Bool #

onull :: Text -> Bool #

olength :: Text -> Int #

olength64 :: Text -> Int64 #

ocompareLength :: Integral i => Text -> i -> Ordering #

otraverse_ :: Applicative f => (Element Text -> f b) -> Text -> f () #

ofor_ :: Applicative f => Text -> (Element Text -> f b) -> f () #

omapM_ :: Applicative m => (Element Text -> m ()) -> Text -> m () #

oforM_ :: Applicative m => Text -> (Element Text -> m ()) -> m () #

ofoldlM :: Monad m => (a -> Element Text -> m a) -> a -> Text -> m a #

ofoldMap1Ex :: Semigroup m => (Element Text -> m) -> Text -> m #

ofoldr1Ex :: (Element Text -> Element Text -> Element Text) -> Text -> Element Text #

ofoldl1Ex' :: (Element Text -> Element Text -> Element Text) -> Text -> Element Text #

headEx :: Text -> Element Text #

lastEx :: Text -> Element Text #

unsafeHead :: Text -> Element Text #

unsafeLast :: Text -> Element Text #

maximumByEx :: (Element Text -> Element Text -> Ordering) -> Text -> Element Text #

minimumByEx :: (Element Text -> Element Text -> Ordering) -> Text -> Element Text #

oelem :: Element Text -> Text -> Bool #

onotElem :: Element Text -> Text -> Bool #

MonoFunctor Text 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element Text -> Element Text) -> Text -> Text #

MonoPointed Text 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element Text -> Text #

MonoTraversable Text 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element Text -> f (Element Text)) -> Text -> f Text #

omapM :: Applicative m => (Element Text -> m (Element Text)) -> Text -> m Text #

IsSequence Text 
Instance details

Defined in Data.Sequences

Methods

fromList :: [Element Text] -> Text #

lengthIndex :: Text -> Index Text #

break :: (Element Text -> Bool) -> Text -> (Text, Text) #

span :: (Element Text -> Bool) -> Text -> (Text, Text) #

dropWhile :: (Element Text -> Bool) -> Text -> Text #

takeWhile :: (Element Text -> Bool) -> Text -> Text #

splitAt :: Index Text -> Text -> (Text, Text) #

unsafeSplitAt :: Index Text -> Text -> (Text, Text) #

take :: Index Text -> Text -> Text #

unsafeTake :: Index Text -> Text -> Text #

drop :: Index Text -> Text -> Text #

unsafeDrop :: Index Text -> Text -> Text #

dropEnd :: Index Text -> Text -> Text #

partition :: (Element Text -> Bool) -> Text -> (Text, Text) #

uncons :: Text -> Maybe (Element Text, Text) #

unsnoc :: Text -> Maybe (Text, Element Text) #

filter :: (Element Text -> Bool) -> Text -> Text #

filterM :: Monad m => (Element Text -> m Bool) -> Text -> m Text #

replicate :: Index Text -> Element Text -> Text #

replicateM :: Monad m => Index Text -> m (Element Text) -> m Text #

groupBy :: (Element Text -> Element Text -> Bool) -> Text -> [Text] #

groupAllOn :: Eq b => (Element Text -> b) -> Text -> [Text] #

subsequences :: Text -> [Text] #

permutations :: Text -> [Text] #

tailEx :: Text -> Text #

tailMay :: Text -> Maybe Text #

initEx :: Text -> Text #

initMay :: Text -> Maybe Text #

unsafeTail :: Text -> Text #

unsafeInit :: Text -> Text #

index :: Text -> Index Text -> Maybe (Element Text) #

indexEx :: Text -> Index Text -> Element Text #

unsafeIndex :: Text -> Index Text -> Element Text #

splitWhen :: (Element Text -> Bool) -> Text -> [Text] #

SemiSequence Text 
Instance details

Defined in Data.Sequences

Associated Types

type Index Text #

Textual Text 
Instance details

Defined in Data.Sequences

Methods

words :: Text -> [Text] #

unwords :: (Element seq ~ Text, MonoFoldable seq) => seq -> Text #

lines :: Text -> [Text] #

unlines :: (Element seq ~ Text, MonoFoldable seq) => seq -> Text #

toLower :: Text -> Text #

toUpper :: Text -> Text #

toCaseFold :: Text -> Text #

breakWord :: Text -> (Text, Text) #

breakLine :: Text -> (Text, Text) #

PathPiece Text 
Instance details

Defined in Web.PathPieces

PersistField Text 
Instance details

Defined in Database.Persist.Class.PersistField

PersistFieldSql Text 
Instance details

Defined in Database.Persist.Sql.Class

Methods

sqlType :: Proxy Text -> SqlType #

ToCss Text 
Instance details

Defined in Text.Internal.Css

Methods

toCss :: Text -> Builder #

RawJS Text 
Instance details

Defined in Text.Julius

Methods

rawJS :: Text -> RawJavascript #

ToJavascript Text 
Instance details

Defined in Text.Julius

ToMessage Text 
Instance details

Defined in Text.Shakespeare.I18N

Methods

toMessage :: Text -> Text #

HasContentType Text 
Instance details

Defined in Yesod.Core.Content

Methods

getContentType :: Monad m => m Text -> ContentType #

ToContent Text 
Instance details

Defined in Yesod.Core.Content

Methods

toContent :: Text -> Content #

ToFlushBuilder Text 
Instance details

Defined in Yesod.Core.Content

ToTypedContent Text 
Instance details

Defined in Yesod.Core.Content

ToBuilder Text Builder 
Instance details

Defined in Data.Builder

Methods

toBuilder :: Text -> Builder #

ToBuilder Text Builder 
Instance details

Defined in Data.Builder

Methods

toBuilder :: Text -> Builder #

LazySequence Text Text 
Instance details

Defined in Data.Sequences

Utf8 Text ByteString 
Instance details

Defined in Data.Sequences

RenderMessage master Text 
Instance details

Defined in Text.Shakespeare.I18N

Methods

renderMessage :: master -> [Lang] -> Text -> Text #

RedirectUrl master Text 
Instance details

Defined in Yesod.Core.Handler

Methods

toTextUrl :: (MonadHandler m, HandlerSite m ~ master) => Text -> m Text #

ToWidget site Text

Since: yesod-core-1.4.28

Instance details

Defined in Yesod.Core.Widget

Methods

toWidget :: (MonadWidget m, HandlerSite m ~ site) => Text -> m () #

SymbolToField "description" Bookmark Text Source # 
Instance details

Defined in Model

SymbolToField "extended" Bookmark Text Source # 
Instance details

Defined in Model

SymbolToField "href" Bookmark Text Source # 
Instance details

Defined in Model

SymbolToField "name" User Text Source # 
Instance details

Defined in Model

SymbolToField "tag" BookmarkTag Text Source # 
Instance details

Defined in Model

SymbolToField "text" Note Text Source # 
Instance details

Defined in Model

SymbolToField "title" Note Text Source # 
Instance details

Defined in Model

SymbolToField "archiveHref" Bookmark (Maybe Text) Source # 
Instance details

Defined in Model

ToAttributes [(Text, Text)] 
Instance details

Defined in Text.Hamlet

Methods

toAttributes :: [(Text, Text)] -> [(Text, Text)] #

ToFlushBuilder (Flush Text) 
Instance details

Defined in Yesod.Core.Content

PersistField v => PersistField (Map Text v) 
Instance details

Defined in Database.Persist.Class.PersistField

PersistFieldSql v => PersistFieldSql (Map Text v) 
Instance details

Defined in Database.Persist.Sql.Class

Methods

sqlType :: Proxy (Map Text v) -> SqlType #

ToAttributes (Text, Text) 
Instance details

Defined in Text.Hamlet

Methods

toAttributes :: (Text, Text) -> [(Text, Text)] #

type ChunkElem Text 
Instance details

Defined in Data.Attoparsec.Internal.Types

type State Text 
Instance details

Defined in Data.Attoparsec.Internal.Types

type State Text = Buffer
type Item Text 
Instance details

Defined in Data.Text

type Item Text = Char
type Element Text 
Instance details

Defined in Data.MonoTraversable

type Index Text 
Instance details

Defined in Data.Sequences

type Index Text = Int

class Applicative f => Alternative (f :: Type -> Type) where #

A monoid on applicative functors.

If defined, some and many should be the least solutions of the equations:

Minimal complete definition

empty, (<|>)

Methods

empty :: f a #

The identity of <|>

(<|>) :: f a -> f a -> f a infixl 3 #

An associative binary operation

some :: f a -> f [a] #

One or more.

many :: f a -> f [a] #

Zero or more.

Instances

Instances details
Alternative IResult 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

empty :: IResult a #

(<|>) :: IResult a -> IResult a -> IResult a #

some :: IResult a -> IResult [a] #

many :: IResult a -> IResult [a] #

Alternative Parser 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

empty :: Parser a #

(<|>) :: Parser a -> Parser a -> Parser a #

some :: Parser a -> Parser [a] #

many :: Parser a -> Parser [a] #

Alternative Result 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

empty :: Result a #

(<|>) :: Result a -> Result a -> Result a #

some :: Result a -> Result [a] #

many :: Result a -> Result [a] #

Alternative Concurrently

empty waits forever. <|> returns the first to finish and cancels the other.

Instance details

Defined in Control.Concurrent.Async.Internal

Alternative ZipList

Since: base-4.11.0.0

Instance details

Defined in Control.Applicative

Methods

empty :: ZipList a #

(<|>) :: ZipList a -> ZipList a -> ZipList a #

some :: ZipList a -> ZipList [a] #

many :: ZipList a -> ZipList [a] #

Alternative STM

Takes the first non-retrying STM action.

Since: base-4.8.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

empty :: STM a #

(<|>) :: STM a -> STM a -> STM a #

some :: STM a -> STM [a] #

many :: STM a -> STM [a] #

Alternative P

Since: base-4.5.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

empty :: P a #

(<|>) :: P a -> P a -> P a #

some :: P a -> P [a] #

many :: P a -> P [a] #

Alternative ReadP

Since: base-4.6.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

empty :: ReadP a #

(<|>) :: ReadP a -> ReadP a -> ReadP a #

some :: ReadP a -> ReadP [a] #

many :: ReadP a -> ReadP [a] #

Alternative ReadPrec

Since: base-4.6.0.0

Instance details

Defined in Text.ParserCombinators.ReadPrec

Methods

empty :: ReadPrec a #

(<|>) :: ReadPrec a -> ReadPrec a -> ReadPrec a #

some :: ReadPrec a -> ReadPrec [a] #

many :: ReadPrec a -> ReadPrec [a] #

Alternative Seq

Since: containers-0.5.4

Instance details

Defined in Data.Sequence.Internal

Methods

empty :: Seq a #

(<|>) :: Seq a -> Seq a -> Seq a #

some :: Seq a -> Seq [a] #

many :: Seq a -> Seq [a] #

Alternative DList 
Instance details

Defined in Data.DList.Internal

Methods

empty :: DList a #

(<|>) :: DList a -> DList a -> DList a #

some :: DList a -> DList [a] #

many :: DList a -> DList [a] #

Alternative IO

Takes the first non-throwing IO action's result. empty throws an exception.

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

empty :: IO a #

(<|>) :: IO a -> IO a -> IO a #

some :: IO a -> IO [a] #

many :: IO a -> IO [a] #

Alternative Array 
Instance details

Defined in Data.Primitive.Array

Methods

empty :: Array a #

(<|>) :: Array a -> Array a -> Array a #

some :: Array a -> Array [a] #

many :: Array a -> Array [a] #

Alternative SmallArray 
Instance details

Defined in Data.Primitive.SmallArray

Alternative Vector 
Instance details

Defined in Data.Vector

Methods

empty :: Vector a #

(<|>) :: Vector a -> Vector a -> Vector a #

some :: Vector a -> Vector [a] #

many :: Vector a -> Vector [a] #

Alternative FormResult

Since: yesod-form-1.4.15

Instance details

Defined in Yesod.Form.Types

Alternative Maybe

Picks the leftmost Just value, or, alternatively, Nothing.

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

empty :: Maybe a #

(<|>) :: Maybe a -> Maybe a -> Maybe a #

some :: Maybe a -> Maybe [a] #

many :: Maybe a -> Maybe [a] #

Alternative List

Combines lists by concatenation, starting from the empty list.

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

empty :: [a] #

(<|>) :: [a] -> [a] -> [a] #

some :: [a] -> [[a]] #

many :: [a] -> [[a]] #

Alternative (Parser i) 
Instance details

Defined in Data.Attoparsec.Internal.Types

Methods

empty :: Parser i a #

(<|>) :: Parser i a -> Parser i a -> Parser i a #

some :: Parser i a -> Parser i [a] #

many :: Parser i a -> Parser i [a] #

MonadPlus m => Alternative (WrappedMonad m)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

empty :: WrappedMonad m a #

(<|>) :: WrappedMonad m a -> WrappedMonad m a -> WrappedMonad m a #

some :: WrappedMonad m a -> WrappedMonad m [a] #

many :: WrappedMonad m a -> WrappedMonad m [a] #

ArrowPlus a => Alternative (ArrowMonad a)

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

Methods

empty :: ArrowMonad a a0 #

(<|>) :: ArrowMonad a a0 -> ArrowMonad a a0 -> ArrowMonad a a0 #

some :: ArrowMonad a a0 -> ArrowMonad a [a0] #

many :: ArrowMonad a a0 -> ArrowMonad a [a0] #

Alternative (Proxy :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Methods

empty :: Proxy a #

(<|>) :: Proxy a -> Proxy a -> Proxy a #

some :: Proxy a -> Proxy [a] #

many :: Proxy a -> Proxy [a] #

Alternative (U1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: U1 a #

(<|>) :: U1 a -> U1 a -> U1 a #

some :: U1 a -> U1 [a] #

many :: U1 a -> U1 [a] #

Monad m => Alternative (CatchT m) 
Instance details

Defined in Control.Monad.Catch.Pure

Methods

empty :: CatchT m a #

(<|>) :: CatchT m a -> CatchT m a -> CatchT m a #

some :: CatchT m a -> CatchT m [a] #

many :: CatchT m a -> CatchT m [a] #

Alternative v => Alternative (Free v)

This violates the Alternative laws, handle with care.

Instance details

Defined in Control.Monad.Free

Methods

empty :: Free v a #

(<|>) :: Free v a -> Free v a -> Free v a #

some :: Free v a -> Free v [a] #

many :: Free v a -> Free v [a] #

Alternative m => Alternative (LoggingT m)

Since: monad-logger-0.3.40

Instance details

Defined in Control.Monad.Logger

Methods

empty :: LoggingT m a #

(<|>) :: LoggingT m a -> LoggingT m a -> LoggingT m a #

some :: LoggingT m a -> LoggingT m [a] #

many :: LoggingT m a -> LoggingT m [a] #

Alternative m => Alternative (NoLoggingT m)

Since: monad-logger-0.3.40

Instance details

Defined in Control.Monad.Logger

Methods

empty :: NoLoggingT m a #

(<|>) :: NoLoggingT m a -> NoLoggingT m a -> NoLoggingT m a #

some :: NoLoggingT m a -> NoLoggingT m [a] #

many :: NoLoggingT m a -> NoLoggingT m [a] #

Alternative m => Alternative (ResourceT m)

Since 1.1.5

Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

empty :: ResourceT m a #

(<|>) :: ResourceT m a -> ResourceT m a -> ResourceT m a #

some :: ResourceT m a -> ResourceT m [a] #

many :: ResourceT m a -> ResourceT m [a] #

Alternative f => Alternative (Lift f)

A combination is Pure only either part is.

Instance details

Defined in Control.Applicative.Lift

Methods

empty :: Lift f a #

(<|>) :: Lift f a -> Lift f a -> Lift f a #

some :: Lift f a -> Lift f [a] #

many :: Lift f a -> Lift f [a] #

(Functor m, Monad m) => Alternative (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

empty :: MaybeT m a #

(<|>) :: MaybeT m a -> MaybeT m a -> MaybeT m a #

some :: MaybeT m a -> MaybeT m [a] #

many :: MaybeT m a -> MaybeT m [a] #

MonadUnliftIO m => Alternative (Conc m)

Since: unliftio-0.2.9.0

Instance details

Defined in UnliftIO.Internals.Async

Methods

empty :: Conc m a #

(<|>) :: Conc m a -> Conc m a -> Conc m a #

some :: Conc m a -> Conc m [a] #

many :: Conc m a -> Conc m [a] #

MonadUnliftIO m => Alternative (Concurrently m)

Composing two unlifted Concurrently values using Alternative is the equivalent to using a race combinator, the asynchrounous sub-routine that returns a value first is the one that gets it's value returned, the slowest sub-routine gets cancelled and it's thread is killed.

Since: unliftio-0.1.0.0

Instance details

Defined in UnliftIO.Internals.Async

Methods

empty :: Concurrently m a #

(<|>) :: Concurrently m a -> Concurrently m a -> Concurrently m a #

some :: Concurrently m a -> Concurrently m [a] #

many :: Concurrently m a -> Concurrently m [a] #

(ArrowZero a, ArrowPlus a) => Alternative (WrappedArrow a b)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

empty :: WrappedArrow a b a0 #

(<|>) :: WrappedArrow a b a0 -> WrappedArrow a b a0 -> WrappedArrow a b a0 #

some :: WrappedArrow a b a0 -> WrappedArrow a b [a0] #

many :: WrappedArrow a b a0 -> WrappedArrow a b [a0] #

Alternative m => Alternative (Kleisli m a)

Since: base-4.14.0.0

Instance details

Defined in Control.Arrow

Methods

empty :: Kleisli m a a0 #

(<|>) :: Kleisli m a a0 -> Kleisli m a a0 -> Kleisli m a a0 #

some :: Kleisli m a a0 -> Kleisli m a [a0] #

many :: Kleisli m a a0 -> Kleisli m a [a0] #

Alternative f => Alternative (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

empty :: Ap f a #

(<|>) :: Ap f a -> Ap f a -> Ap f a #

some :: Ap f a -> Ap f [a] #

many :: Ap f a -> Ap f [a] #

Alternative f => Alternative (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

empty :: Alt f a #

(<|>) :: Alt f a -> Alt f a -> Alt f a #

some :: Alt f a -> Alt f [a] #

many :: Alt f a -> Alt f [a] #

(Generic1 f, Alternative (Rep1 f)) => Alternative (Generically1 f)

Since: base-4.17.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: Generically1 f a #

(<|>) :: Generically1 f a -> Generically1 f a -> Generically1 f a #

some :: Generically1 f a -> Generically1 f [a] #

many :: Generically1 f a -> Generically1 f [a] #

Alternative f => Alternative (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: Rec1 f a #

(<|>) :: Rec1 f a -> Rec1 f a -> Rec1 f a #

some :: Rec1 f a -> Rec1 f [a] #

many :: Rec1 f a -> Rec1 f [a] #

(Functor f, MonadPlus m) => Alternative (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

empty :: FreeT f m a #

(<|>) :: FreeT f m a -> FreeT f m a -> FreeT f m a #

some :: FreeT f m a -> FreeT f m [a] #

many :: FreeT f m a -> FreeT f m [a] #

Alternative f => Alternative (Backwards f)

Try alternatives in the same order as f.

Instance details

Defined in Control.Applicative.Backwards

Methods

empty :: Backwards f a #

(<|>) :: Backwards f a -> Backwards f a -> Backwards f a #

some :: Backwards f a -> Backwards f [a] #

many :: Backwards f a -> Backwards f [a] #

(Monoid w, Functor m, MonadPlus m) => Alternative (AccumT w m) 
Instance details

Defined in Control.Monad.Trans.Accum

Methods

empty :: AccumT w m a #

(<|>) :: AccumT w m a -> AccumT w m a -> AccumT w m a #

some :: AccumT w m a -> AccumT w m [a] #

many :: AccumT w m a -> AccumT w m [a] #

(Functor m, Monad m, Monoid e) => Alternative (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

empty :: ExceptT e m a #

(<|>) :: ExceptT e m a -> ExceptT e m a -> ExceptT e m a #

some :: ExceptT e m a -> ExceptT e m [a] #

many :: ExceptT e m a -> ExceptT e m [a] #

Alternative m => Alternative (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

empty :: IdentityT m a #

(<|>) :: IdentityT m a -> IdentityT m a -> IdentityT m a #

some :: IdentityT m a -> IdentityT m [a] #

many :: IdentityT m a -> IdentityT m [a] #

Alternative m => Alternative (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

empty :: ReaderT r m a #

(<|>) :: ReaderT r m a -> ReaderT r m a -> ReaderT r m a #

some :: ReaderT r m a -> ReaderT r m [a] #

many :: ReaderT r m a -> ReaderT r m [a] #

(Functor m, MonadPlus m) => Alternative (SelectT r m) 
Instance details

Defined in Control.Monad.Trans.Select

Methods

empty :: SelectT r m a #

(<|>) :: SelectT r m a -> SelectT r m a -> SelectT r m a #

some :: SelectT r m a -> SelectT r m [a] #

many :: SelectT r m a -> SelectT r m [a] #

(Functor m, MonadPlus m) => Alternative (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Lazy

Methods

empty :: StateT s m a #

(<|>) :: StateT s m a -> StateT s m a -> StateT s m a #

some :: StateT s m a -> StateT s m [a] #

many :: StateT s m a -> StateT s m [a] #

(Functor m, MonadPlus m) => Alternative (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

empty :: StateT s m a #

(<|>) :: StateT s m a -> StateT s m a -> StateT s m a #

some :: StateT s m a -> StateT s m [a] #

many :: StateT s m a -> StateT s m [a] #

(Functor m, MonadPlus m) => Alternative (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.CPS

Methods

empty :: WriterT w m a #

(<|>) :: WriterT w m a -> WriterT w m a -> WriterT w m a #

some :: WriterT w m a -> WriterT w m [a] #

many :: WriterT w m a -> WriterT w m [a] #

(Monoid w, Alternative m) => Alternative (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

empty :: WriterT w m a #

(<|>) :: WriterT w m a -> WriterT w m a -> WriterT w m a #

some :: WriterT w m a -> WriterT w m [a] #

many :: WriterT w m a -> WriterT w m [a] #

(Monoid w, Alternative m) => Alternative (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

empty :: WriterT w m a #

(<|>) :: WriterT w m a -> WriterT w m a -> WriterT w m a #

some :: WriterT w m a -> WriterT w m [a] #

many :: WriterT w m a -> WriterT w m [a] #

Alternative f => Alternative (Reverse f)

Derived instance.

Instance details

Defined in Data.Functor.Reverse

Methods

empty :: Reverse f a #

(<|>) :: Reverse f a -> Reverse f a -> Reverse f a #

some :: Reverse f a -> Reverse f [a] #

many :: Reverse f a -> Reverse f [a] #

(Alternative f, Alternative g) => Alternative (Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

empty :: Product f g a #

(<|>) :: Product f g a -> Product f g a -> Product f g a #

some :: Product f g a -> Product f g [a] #

many :: Product f g a -> Product f g [a] #

(Alternative f, Alternative g) => Alternative (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: (f :*: g) a #

(<|>) :: (f :*: g) a -> (f :*: g) a -> (f :*: g) a #

some :: (f :*: g) a -> (f :*: g) [a] #

many :: (f :*: g) a -> (f :*: g) [a] #

(Alternative f, Applicative g) => Alternative (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

empty :: Compose f g a #

(<|>) :: Compose f g a -> Compose f g a -> Compose f g a #

some :: Compose f g a -> Compose f g [a] #

many :: Compose f g a -> Compose f g [a] #

(Alternative f, Applicative g) => Alternative (f :.: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: (f :.: g) a #

(<|>) :: (f :.: g) a -> (f :.: g) a -> (f :.: g) a #

some :: (f :.: g) a -> (f :.: g) [a] #

many :: (f :.: g) a -> (f :.: g) [a] #

Alternative f => Alternative (M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: M1 i c f a #

(<|>) :: M1 i c f a -> M1 i c f a -> M1 i c f a #

some :: M1 i c f a -> M1 i c f [a] #

many :: M1 i c f a -> M1 i c f [a] #

(Functor m, MonadPlus m) => Alternative (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.CPS

Methods

empty :: RWST r w s m a #

(<|>) :: RWST r w s m a -> RWST r w s m a -> RWST r w s m a #

some :: RWST r w s m a -> RWST r w s m [a] #

many :: RWST r w s m a -> RWST r w s m [a] #

(Monoid w, Functor m, MonadPlus m) => Alternative (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Lazy

Methods

empty :: RWST r w s m a #

(<|>) :: RWST r w s m a -> RWST r w s m a -> RWST r w s m a #

some :: RWST r w s m a -> RWST r w s m [a] #

many :: RWST r w s m a -> RWST r w s m [a] #

(Monoid w, Functor m, MonadPlus m) => Alternative (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Strict

Methods

empty :: RWST r w s m a #

(<|>) :: RWST r w s m a -> RWST r w s m a -> RWST r w s m a #

some :: RWST r w s m a -> RWST r w s m [a] #

many :: RWST r w s m a -> RWST r w s m [a] #

data Proxy #

Define a HTTP proxy, consisting of a hostname and port number.

Constructors

Proxy 

Fields

Instances

Instances details
Read Proxy 
Instance details

Defined in Network.HTTP.Client.Types

Show Proxy 
Instance details

Defined in Network.HTTP.Client.Types

Methods

showsPrec :: Int -> Proxy -> ShowS #

show :: Proxy -> String #

showList :: [Proxy] -> ShowS #

Eq Proxy 
Instance details

Defined in Network.HTTP.Client.Types

Methods

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

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

Ord Proxy 
Instance details

Defined in Network.HTTP.Client.Types

Methods

compare :: Proxy -> Proxy -> Ordering #

(<) :: Proxy -> Proxy -> Bool #

(<=) :: Proxy -> Proxy -> Bool #

(>) :: Proxy -> Proxy -> Bool #

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

max :: Proxy -> Proxy -> Proxy #

min :: Proxy -> Proxy -> Proxy #

data UTCTime #

This is the simplest representation of UTC. It consists of the day number, and a time offset from midnight. Note that if a day has a leap second added to it, it will have 86401 seconds.

Constructors

UTCTime 

Fields

Instances

Instances details
FromJSON UTCTime 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSONKey UTCTime 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON UTCTime 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSONKey UTCTime 
Instance details

Defined in Data.Aeson.Types.ToJSON

Data UTCTime 
Instance details

Defined in Data.Time.Clock.Internal.UTCTime

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UTCTime -> c UTCTime #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UTCTime #

toConstr :: UTCTime -> Constr #

dataTypeOf :: UTCTime -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c UTCTime) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UTCTime) #

gmapT :: (forall b. Data b => b -> b) -> UTCTime -> UTCTime #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UTCTime -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UTCTime -> r #

gmapQ :: (forall d. Data d => d -> u) -> UTCTime -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> UTCTime -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> UTCTime -> m UTCTime #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UTCTime -> m UTCTime #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UTCTime -> m UTCTime #

NFData UTCTime 
Instance details

Defined in Data.Time.Clock.Internal.UTCTime

Methods

rnf :: UTCTime -> () #

Eq UTCTime 
Instance details

Defined in Data.Time.Clock.Internal.UTCTime

Methods

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

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

Ord UTCTime 
Instance details

Defined in Data.Time.Clock.Internal.UTCTime

FromFormKey UTCTime 
Instance details

Defined in Web.Internal.FormUrlEncoded

ToFormKey UTCTime 
Instance details

Defined in Web.Internal.FormUrlEncoded

Methods

toFormKey :: UTCTime -> Text #

FromHttpApiData UTCTime
>>> parseUrlPiece "2015-10-03T00:14:24Z" :: Either Text UTCTime
Right 2015-10-03 00:14:24 UTC
Instance details

Defined in Web.Internal.HttpApiData

ToHttpApiData UTCTime
>>> toUrlPiece $ UTCTime (fromGregorian 2015 10 03) 864.5
"2015-10-03T00:14:24.500Z"
Instance details

Defined in Web.Internal.HttpApiData

PersistField UTCTime 
Instance details

Defined in Database.Persist.Class.PersistField

PersistFieldSql UTCTime 
Instance details

Defined in Database.Persist.Sql.Class

SymbolToField "created" Note UTCTime Source # 
Instance details

Defined in Model

SymbolToField "time" Bookmark UTCTime Source # 
Instance details

Defined in Model

SymbolToField "updated" Note UTCTime Source # 
Instance details

Defined in Model

data Vector a #

Boxed vectors, supporting efficient slicing.

Instances

Instances details
FromJSON1 Vector 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (Vector a) #

liftParseJSONList :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [Vector a] #

liftOmittedField :: Maybe a -> Maybe (Vector a) #

ToJSON1 Vector 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> Vector a -> Value #

liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [Vector a] -> Value #

liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> Vector a -> Encoding #

liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [Vector a] -> Encoding #

liftOmitField :: (a -> Bool) -> Vector a -> Bool #

MonadFail Vector

Since: vector-0.12.1.0

Instance details

Defined in Data.Vector

Methods

fail :: String -> Vector a #

MonadFix Vector

This instance has the same semantics as the one for lists.

Since: vector-0.12.2.0

Instance details

Defined in Data.Vector

Methods

mfix :: (a -> Vector a) -> Vector a #

MonadZip Vector 
Instance details

Defined in Data.Vector

Methods

mzip :: Vector a -> Vector b -> Vector (a, b) #

mzipWith :: (a -> b -> c) -> Vector a -> Vector b -> Vector c #

munzip :: Vector (a, b) -> (Vector a, Vector b) #

Foldable Vector 
Instance details

Defined in Data.Vector

Methods

fold :: Monoid m => Vector m -> m #

foldMap :: Monoid m => (a -> m) -> Vector a -> m #

foldMap' :: Monoid m => (a -> m) -> Vector a -> m #

foldr :: (a -> b -> b) -> b -> Vector a -> b #

foldr' :: (a -> b -> b) -> b -> Vector a -> b #

foldl :: (b -> a -> b) -> b -> Vector a -> b #

foldl' :: (b -> a -> b) -> b -> Vector a -> b #

foldr1 :: (a -> a -> a) -> Vector a -> a #

foldl1 :: (a -> a -> a) -> Vector a -> a #

toList :: Vector a -> [a] #

null :: Vector a -> Bool #

length :: Vector a -> Int #

elem :: Eq a => a -> Vector a -> Bool #

maximum :: Ord a => Vector a -> a #

minimum :: Ord a => Vector a -> a #

sum :: Num a => Vector a -> a #

product :: Num a => Vector a -> a #

Eq1 Vector 
Instance details

Defined in Data.Vector

Methods

liftEq :: (a -> b -> Bool) -> Vector a -> Vector b -> Bool #

Ord1 Vector 
Instance details

Defined in Data.Vector

Methods

liftCompare :: (a -> b -> Ordering) -> Vector a -> Vector b -> Ordering #

Read1 Vector 
Instance details

Defined in Data.Vector

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Vector a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Vector a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Vector a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Vector a] #

Show1 Vector 
Instance details

Defined in Data.Vector

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Vector a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Vector a] -> ShowS #

Traversable Vector 
Instance details

Defined in Data.Vector

Methods

traverse :: Applicative f => (a -> f b) -> Vector a -> f (Vector b) #

sequenceA :: Applicative f => Vector (f a) -> f (Vector a) #

mapM :: Monad m => (a -> m b) -> Vector a -> m (Vector b) #

sequence :: Monad m => Vector (m a) -> m (Vector a) #

Alternative Vector 
Instance details

Defined in Data.Vector

Methods

empty :: Vector a #

(<|>) :: Vector a -> Vector a -> Vector a #

some :: Vector a -> Vector [a] #

many :: Vector a -> Vector [a] #

Applicative Vector 
Instance details

Defined in Data.Vector

Methods

pure :: a -> Vector a #

(<*>) :: Vector (a -> b) -> Vector a -> Vector b #

liftA2 :: (a -> b -> c) -> Vector a -> Vector b -> Vector c #

(*>) :: Vector a -> Vector b -> Vector b #

(<*) :: Vector a -> Vector b -> Vector a #

Functor Vector 
Instance details

Defined in Data.Vector

Methods

fmap :: (a -> b) -> Vector a -> Vector b #

(<$) :: a -> Vector b -> Vector a #

Monad Vector 
Instance details

Defined in Data.Vector

Methods

(>>=) :: Vector a -> (a -> Vector b) -> Vector b #

(>>) :: Vector a -> Vector b -> Vector b #

return :: a -> Vector a #

MonadPlus Vector 
Instance details

Defined in Data.Vector

Methods

mzero :: Vector a #

mplus :: Vector a -> Vector a -> Vector a #

Zip Vector 
Instance details

Defined in Data.ChunkedZip

Methods

zipWith :: (a -> b -> c) -> Vector a -> Vector b -> Vector c #

zip :: Vector a -> Vector b -> Vector (a, b) #

zap :: Vector (a -> b) -> Vector a -> Vector b #

unzip :: Vector (a, b) -> (Vector a, Vector b) #

Zip3 Vector 
Instance details

Defined in Data.ChunkedZip

Methods

zipWith3 :: (a -> b -> c -> d) -> Vector a -> Vector b -> Vector c -> Vector d #

zip3 :: Vector a -> Vector b -> Vector c -> Vector (a, b, c) #

zap3 :: Vector (a -> b -> c) -> Vector a -> Vector b -> Vector c #

unzip3 :: Vector (a, b, c) -> (Vector a, Vector b, Vector c) #

Zip4 Vector 
Instance details

Defined in Data.ChunkedZip

Methods

zipWith4 :: (a -> b -> c -> d -> e) -> Vector a -> Vector b -> Vector c -> Vector d -> Vector e #

zip4 :: Vector a -> Vector b -> Vector c -> Vector d -> Vector (a, b, c, d) #

zap4 :: Vector (a -> b -> c -> d) -> Vector a -> Vector b -> Vector c -> Vector d #

unzip4 :: Vector (a, b, c, d) -> (Vector a, Vector b, Vector c, Vector d) #

Zip5 Vector 
Instance details

Defined in Data.ChunkedZip

Methods

zipWith5 :: (a -> b -> c -> d -> e -> g) -> Vector a -> Vector b -> Vector c -> Vector d -> Vector e -> Vector g #

zip5 :: Vector a -> Vector b -> Vector c -> Vector d -> Vector e -> Vector (a, b, c, d, e) #

zap5 :: Vector (a -> b -> c -> d -> e) -> Vector a -> Vector b -> Vector c -> Vector d -> Vector e #

unzip5 :: Vector (a, b, c, d, e) -> (Vector a, Vector b, Vector c, Vector d, Vector e) #

Zip6 Vector 
Instance details

Defined in Data.ChunkedZip

Methods

zipWith6 :: (a -> b -> c -> d -> e -> g -> h) -> Vector a -> Vector b -> Vector c -> Vector d -> Vector e -> Vector g -> Vector h #

zip6 :: Vector a -> Vector b -> Vector c -> Vector d -> Vector e -> Vector g -> Vector (a, b, c, d, e, g) #

zap6 :: Vector (a -> b -> c -> d -> e -> g) -> Vector a -> Vector b -> Vector c -> Vector d -> Vector e -> Vector g #

unzip6 :: Vector (a, b, c, d, e, g) -> (Vector a, Vector b, Vector c, Vector d, Vector e, Vector g) #

NFData1 Vector

Since: vector-0.12.1.0

Instance details

Defined in Data.Vector

Methods

liftRnf :: (a -> ()) -> Vector a -> () #

Vector Vector a 
Instance details

Defined in Data.Vector

Methods

basicUnsafeFreeze :: Mutable Vector s a -> ST s (Vector a) #

basicUnsafeThaw :: Vector a -> ST s (Mutable Vector s a) #

basicLength :: Vector a -> Int #

basicUnsafeSlice :: Int -> Int -> Vector a -> Vector a #

basicUnsafeIndexM :: Vector a -> Int -> Box a #

basicUnsafeCopy :: Mutable Vector s a -> Vector a -> ST s () #

elemseq :: Vector a -> a -> b -> b #

FromJSON a => FromJSON (Vector a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON a => ToJSON (Vector a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Data a => Data (Vector a) 
Instance details

Defined in Data.Vector

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Vector a -> c (Vector a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Vector a) #

toConstr :: Vector a -> Constr #

dataTypeOf :: Vector a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Vector a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Vector a)) #

gmapT :: (forall b. Data b => b -> b) -> Vector a -> Vector a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Vector a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Vector a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Vector a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Vector a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Vector a -> m (Vector a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Vector a -> m (Vector a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Vector a -> m (Vector a) #

Monoid (Vector a) 
Instance details

Defined in Data.Vector

Methods

mempty :: Vector a #

mappend :: Vector a -> Vector a -> Vector a #

mconcat :: [Vector a] -> Vector a #

Semigroup (Vector a) 
Instance details

Defined in Data.Vector

Methods

(<>) :: Vector a -> Vector a -> Vector a #

sconcat :: NonEmpty (Vector a) -> Vector a #

stimes :: Integral b => b -> Vector a -> Vector a #

IsList (Vector a) 
Instance details

Defined in Data.Vector

Associated Types

type Item (Vector a) #

Methods

fromList :: [Item (Vector a)] -> Vector a #

fromListN :: Int -> [Item (Vector a)] -> Vector a #

toList :: Vector a -> [Item (Vector a)] #

Read a => Read (Vector a) 
Instance details

Defined in Data.Vector

Show a => Show (Vector a) 
Instance details

Defined in Data.Vector

Methods

showsPrec :: Int -> Vector a -> ShowS #

show :: Vector a -> String #

showList :: [Vector a] -> ShowS #

NFData a => NFData (Vector a) 
Instance details

Defined in Data.Vector

Methods

rnf :: Vector a -> () #

Eq a => Eq (Vector a) 
Instance details

Defined in Data.Vector

Methods

(==) :: Vector a -> Vector a -> Bool #

(/=) :: Vector a -> Vector a -> Bool #

Ord a => Ord (Vector a) 
Instance details

Defined in Data.Vector

Methods

compare :: Vector a -> Vector a -> Ordering #

(<) :: Vector a -> Vector a -> Bool #

(<=) :: Vector a -> Vector a -> Bool #

(>) :: Vector a -> Vector a -> Bool #

(>=) :: Vector a -> Vector a -> Bool #

max :: Vector a -> Vector a -> Vector a #

min :: Vector a -> Vector a -> Vector a #

GrowingAppend (Vector a) 
Instance details

Defined in Data.MonoTraversable

MonoFoldable (Vector a) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (Vector a) -> m) -> Vector a -> m #

ofoldr :: (Element (Vector a) -> b -> b) -> b -> Vector a -> b #

ofoldl' :: (a0 -> Element (Vector a) -> a0) -> a0 -> Vector a -> a0 #

otoList :: Vector a -> [Element (Vector a)] #

oall :: (Element (Vector a) -> Bool) -> Vector a -> Bool #

oany :: (Element (Vector a) -> Bool) -> Vector a -> Bool #

onull :: Vector a -> Bool #

olength :: Vector a -> Int #

olength64 :: Vector a -> Int64 #

ocompareLength :: Integral i => Vector a -> i -> Ordering #

otraverse_ :: Applicative f => (Element (Vector a) -> f b) -> Vector a -> f () #

ofor_ :: Applicative f => Vector a -> (Element (Vector a) -> f b) -> f () #

omapM_ :: Applicative m => (Element (Vector a) -> m ()) -> Vector a -> m () #

oforM_ :: Applicative m => Vector a -> (Element (Vector a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (Vector a) -> m a0) -> a0 -> Vector a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (Vector a) -> m) -> Vector a -> m #

ofoldr1Ex :: (Element (Vector a) -> Element (Vector a) -> Element (Vector a)) -> Vector a -> Element (Vector a) #

ofoldl1Ex' :: (Element (Vector a) -> Element (Vector a) -> Element (Vector a)) -> Vector a -> Element (Vector a) #

headEx :: Vector a -> Element (Vector a) #

lastEx :: Vector a -> Element (Vector a) #

unsafeHead :: Vector a -> Element (Vector a) #

unsafeLast :: Vector a -> Element (Vector a) #

maximumByEx :: (Element (Vector a) -> Element (Vector a) -> Ordering) -> Vector a -> Element (Vector a) #

minimumByEx :: (Element (Vector a) -> Element (Vector a) -> Ordering) -> Vector a -> Element (Vector a) #

oelem :: Element (Vector a) -> Vector a -> Bool #

onotElem :: Element (Vector a) -> Vector a -> Bool #

MonoFunctor (Vector a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (Vector a) -> Element (Vector a)) -> Vector a -> Vector a #

MonoPointed (Vector a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (Vector a) -> Vector a #

MonoTraversable (Vector a) 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element (Vector a) -> f (Element (Vector a))) -> Vector a -> f (Vector a) #

omapM :: Applicative m => (Element (Vector a) -> m (Element (Vector a))) -> Vector a -> m (Vector a) #

IsSequence (Vector a) 
Instance details

Defined in Data.Sequences

Methods

fromList :: [Element (Vector a)] -> Vector a #

lengthIndex :: Vector a -> Index (Vector a) #

break :: (Element (Vector a) -> Bool) -> Vector a -> (Vector a, Vector a) #

span :: (Element (Vector a) -> Bool) -> Vector a -> (Vector a, Vector a) #

dropWhile :: (Element (Vector a) -> Bool) -> Vector a -> Vector a #

takeWhile :: (Element (Vector a) -> Bool) -> Vector a -> Vector a #

splitAt :: Index (Vector a) -> Vector a -> (Vector a, Vector a) #

unsafeSplitAt :: Index (Vector a) -> Vector a -> (Vector a, Vector a) #

take :: Index (Vector a) -> Vector a -> Vector a #

unsafeTake :: Index (Vector a) -> Vector a -> Vector a #

drop :: Index (Vector a) -> Vector a -> Vector a #

unsafeDrop :: Index (Vector a) -> Vector a -> Vector a #

dropEnd :: Index (Vector a) -> Vector a -> Vector a #

partition :: (Element (Vector a) -> Bool) -> Vector a -> (Vector a, Vector a) #

uncons :: Vector a -> Maybe (Element (Vector a), Vector a) #

unsnoc :: Vector a -> Maybe (Vector a, Element (Vector a)) #

filter :: (Element (Vector a) -> Bool) -> Vector a -> Vector a #

filterM :: Monad m => (Element (Vector a) -> m Bool) -> Vector a -> m (Vector a) #

replicate :: Index (Vector a) -> Element (Vector a) -> Vector a #

replicateM :: Monad m => Index (Vector a) -> m (Element (Vector a)) -> m (Vector a) #

groupBy :: (Element (Vector a) -> Element (Vector a) -> Bool) -> Vector a -> [Vector a] #

groupAllOn :: Eq b => (Element (Vector a) -> b) -> Vector a -> [Vector a] #

subsequences :: Vector a -> [Vector a] #

permutations :: Vector a -> [Vector a] #

tailEx :: Vector a -> Vector a #

tailMay :: Vector a -> Maybe (Vector a) #

initEx :: Vector a -> Vector a #

initMay :: Vector a -> Maybe (Vector a) #

unsafeTail :: Vector a -> Vector a #

unsafeInit :: Vector a -> Vector a #

index :: Vector a -> Index (Vector a) -> Maybe (Element (Vector a)) #

indexEx :: Vector a -> Index (Vector a) -> Element (Vector a) #

unsafeIndex :: Vector a -> Index (Vector a) -> Element (Vector a) #

splitWhen :: (Element (Vector a) -> Bool) -> Vector a -> [Vector a] #

SemiSequence (Vector a) 
Instance details

Defined in Data.Sequences

Associated Types

type Index (Vector a) #

Methods

intersperse :: Element (Vector a) -> Vector a -> Vector a #

reverse :: Vector a -> Vector a #

find :: (Element (Vector a) -> Bool) -> Vector a -> Maybe (Element (Vector a)) #

sortBy :: (Element (Vector a) -> Element (Vector a) -> Ordering) -> Vector a -> Vector a #

cons :: Element (Vector a) -> Vector a -> Vector a #

snoc :: Vector a -> Element (Vector a) -> Vector a #

PersistField a => PersistField (Vector a) 
Instance details

Defined in Database.Persist.Class.PersistField

PersistFieldSql a => PersistFieldSql (Vector a) 
Instance details

Defined in Database.Persist.Sql.Class

Methods

sqlType :: Proxy (Vector a) -> SqlType #

type Key Vector 
Instance details

Defined in Data.Vector.Instances

type Key Vector = Int
type Mutable Vector 
Instance details

Defined in Data.Vector

type Item (Vector a) 
Instance details

Defined in Data.Vector

type Item (Vector a) = a
type Element (Vector a) 
Instance details

Defined in Data.MonoTraversable

type Element (Vector a) = a
type Index (Vector a) 
Instance details

Defined in Data.Sequences

type Index (Vector a) = Int

class Monoid builder => Builder builder lazy | builder -> lazy, lazy -> builder where #

Since 0.1.0.0

Methods

builderToLazy :: builder -> lazy #

Since 0.1.0.0

flushBuilder :: builder #

Since 0.1.0.0

Instances

Instances details
Builder Builder ByteString 
Instance details

Defined in Data.Builder

Builder Builder Text 
Instance details

Defined in Data.Builder

class Eq a => Hashable a where #

The class of types that can be converted to a hash value.

Minimal implementation: hashWithSalt.

Note: the hash is not guaranteed to be stable across library versions, operating systems or architectures. For stable hashing use named hashes: SHA256, CRC32 etc.

If you are looking for Hashable instance in time package, check time-compat

Minimal complete definition

Nothing

Methods

hashWithSalt :: Int -> a -> Int infixl 0 #

Return a hash value for the argument, using the given salt.

The general contract of hashWithSalt is:

  • If two values are equal according to the == method, then applying the hashWithSalt method on each of the two values must produce the same integer result if the same salt is used in each case.
  • It is not required that if two values are unequal according to the == method, then applying the hashWithSalt method on each of the two values must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal values may improve the performance of hashing-based data structures.
  • This method can be used to compute different hash values for the same input by providing a different salt in each application of the method. This implies that any instance that defines hashWithSalt must make use of the salt in its implementation.
  • hashWithSalt may return negative Int values.

hash :: a -> Int #

Like hashWithSalt, but no salt is used. The default implementation uses hashWithSalt with some default salt. Instances might want to implement this method to provide a more efficient implementation than the default implementation.

Instances

Instances details
Hashable Key 
Instance details

Defined in Data.Aeson.Key

Methods

hashWithSalt :: Int -> Key -> Int #

hash :: Key -> Int #

Hashable Value 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

hashWithSalt :: Int -> Value -> Int #

hash :: Value -> Int #

Hashable ByteArray

This instance was available since 1.4.1.0 only for GHC-9.4+

Since: hashable-1.4.2.0

Instance details

Defined in Data.Hashable.Class

Hashable SomeTypeRep 
Instance details

Defined in Data.Hashable.Class

Hashable Unique 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Unique -> Int #

hash :: Unique -> Int #

Hashable Version 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Version -> Int #

hash :: Version -> Int #

Hashable IntPtr 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> IntPtr -> Int #

hash :: IntPtr -> Int #

Hashable WordPtr 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> WordPtr -> Int #

hash :: WordPtr -> Int #

Hashable Void 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Void -> Int #

hash :: Void -> Int #

Hashable ThreadId 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> ThreadId -> Int #

hash :: ThreadId -> Int #

Hashable Fingerprint

Since: hashable-1.3.0.0

Instance details

Defined in Data.Hashable.Class

Hashable Int16 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int16 -> Int #

hash :: Int16 -> Int #

Hashable Int32 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int32 -> Int #

hash :: Int32 -> Int #

Hashable Int64 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int64 -> Int #

hash :: Int64 -> Int #

Hashable Int8 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int8 -> Int #

hash :: Int8 -> Int #

Hashable Word16 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word16 -> Int #

hash :: Word16 -> Int #

Hashable Word32 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word32 -> Int #

hash :: Word32 -> Int #

Hashable Word64 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word64 -> Int #

hash :: Word64 -> Int #

Hashable Word8 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word8 -> Int #

hash :: Word8 -> Int #

Hashable ByteString 
Instance details

Defined in Data.Hashable.Class

Hashable ByteString 
Instance details

Defined in Data.Hashable.Class

Hashable ShortByteString 
Instance details

Defined in Data.Hashable.Class

Hashable IntSet

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> IntSet -> Int #

hash :: IntSet -> Int #

Hashable OsString

Since: hashable-1.4.2.0

Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> OsString -> Int #

hash :: OsString -> Int #

Hashable PosixString

Since: hashable-1.4.2.0

Instance details

Defined in Data.Hashable.Class

Hashable WindowsString

Since: hashable-1.4.2.0

Instance details

Defined in Data.Hashable.Class

Hashable BigNat 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> BigNat -> Int #

hash :: BigNat -> Int #

Hashable Ordering 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Ordering -> Int #

hash :: Ordering -> Int #

Hashable Scientific

A hash can be safely calculated from a Scientific. No magnitude 10^e is calculated so there's no risk of a blowup in space or time when hashing scientific numbers coming from untrusted sources.

>>> import Data.Hashable (hash)
>>> let x = scientific 1 2
>>> let y = scientific 100 0
>>> (x == y, hash x == hash y)
(True,True)
Instance details

Defined in Data.Scientific

Hashable Text 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Text -> Int #

hash :: Text -> Int #

Hashable Text 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Text -> Int #

hash :: Text -> Int #

Hashable ShortText 
Instance details

Defined in Data.Text.Short.Internal

Hashable UUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

hashWithSalt :: Int -> UUID -> Int #

hash :: UUID -> Int #

Hashable Integer 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Integer -> Int #

hash :: Integer -> Int #

Hashable Natural 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Natural -> Int #

hash :: Natural -> Int #

Hashable () 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> () -> Int #

hash :: () -> Int #

Hashable Bool 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Bool -> Int #

hash :: Bool -> Int #

Hashable Char 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Char -> Int #

hash :: Char -> Int #

Hashable Double

Note: prior to hashable-1.3.0.0, hash 0.0 /= hash (-0.0)

The hash of NaN is not well defined.

Since: hashable-1.3.0.0

Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Double -> Int #

hash :: Double -> Int #

Hashable Float

Note: prior to hashable-1.3.0.0, hash 0.0 /= hash (-0.0)

The hash of NaN is not well defined.

Since: hashable-1.3.0.0

Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Float -> Int #

hash :: Float -> Int #

Hashable Int 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int -> Int #

hash :: Int -> Int #

Hashable Word 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word -> Int #

hash :: Word -> Int #

Hashable v => Hashable (KeyMap v) 
Instance details

Defined in Data.Aeson.KeyMap

Methods

hashWithSalt :: Int -> KeyMap v -> Int #

hash :: KeyMap v -> Int #

Hashable (Async a) 
Instance details

Defined in Control.Concurrent.Async.Internal

Methods

hashWithSalt :: Int -> Async a -> Int #

hash :: Async a -> Int #

Hashable a => Hashable (Complex a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Complex a -> Int #

hash :: Complex a -> Int #

Hashable a => Hashable (Identity a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Identity a -> Int #

hash :: Identity a -> Int #

Hashable a => Hashable (First a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> First a -> Int #

hash :: First a -> Int #

Hashable a => Hashable (Last a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Last a -> Int #

hash :: Last a -> Int #

Hashable a => Hashable (Max a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Max a -> Int #

hash :: Max a -> Int #

Hashable a => Hashable (Min a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Min a -> Int #

hash :: Min a -> Int #

Hashable a => Hashable (WrappedMonoid a) 
Instance details

Defined in Data.Hashable.Class

Hashable a => Hashable (NonEmpty a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> NonEmpty a -> Int #

hash :: NonEmpty a -> Int #

Hashable (FunPtr a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> FunPtr a -> Int #

hash :: FunPtr a -> Int #

Hashable (Ptr a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Ptr a -> Int #

hash :: Ptr a -> Int #

Hashable a => Hashable (Ratio a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Ratio a -> Int #

hash :: Ratio a -> Int #

Hashable (StableName a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> StableName a -> Int #

hash :: StableName a -> Int #

Hashable s => Hashable (CI s) 
Instance details

Defined in Data.CaseInsensitive.Internal

Methods

hashWithSalt :: Int -> CI s -> Int #

hash :: CI s -> Int #

Hashable v => Hashable (IntMap v)

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> IntMap v -> Int #

hash :: IntMap v -> Int #

Hashable v => Hashable (Seq v)

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Seq v -> Int #

hash :: Seq v -> Int #

Hashable v => Hashable (Set v)

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Set v -> Int #

hash :: Set v -> Int #

Hashable v => Hashable (Tree v)

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Tree v -> Int #

hash :: Tree v -> Int #

Hashable1 f => Hashable (Fix f) 
Instance details

Defined in Data.Fix

Methods

hashWithSalt :: Int -> Fix f -> Int #

hash :: Fix f -> Int #

Eq a => Hashable (Hashed a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Hashed a -> Int #

hash :: Hashed a -> Int #

Hashable a => Hashable (Maybe a) 
Instance details

Defined in Data.Strict.Maybe

Methods

hashWithSalt :: Int -> Maybe a -> Int #

hash :: Maybe a -> Int #

Hashable a => Hashable (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

hashWithSalt :: Int -> HashSet a -> Int #

hash :: HashSet a -> Int #

Hashable a => Hashable (Maybe a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Maybe a -> Int #

hash :: Maybe a -> Int #

Hashable a => Hashable (a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> (a) -> Int #

hash :: (a) -> Int #

Hashable a => Hashable [a] 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> [a] -> Int #

hash :: [a] -> Int #

(Hashable a, Hashable b) => Hashable (Either a b) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Either a b -> Int #

hash :: Either a b -> Int #

Hashable (Fixed a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Fixed a -> Int #

hash :: Fixed a -> Int #

Hashable (Proxy a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Proxy a -> Int #

hash :: Proxy a -> Int #

Hashable a => Hashable (Arg a b)

Note: Prior to hashable-1.3.0.0 the hash computation included the second argument of Arg which wasn't consistent with its Eq instance.

Since: hashable-1.3.0.0

Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Arg a b -> Int #

hash :: Arg a b -> Int #

Hashable (TypeRep a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> TypeRep a -> Int #

hash :: TypeRep a -> Int #

(Hashable k, Hashable v) => Hashable (Map k v)

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Map k v -> Int #

hash :: Map k v -> Int #

(Hashable a, Hashable b) => Hashable (Either a b) 
Instance details

Defined in Data.Strict.Either

Methods

hashWithSalt :: Int -> Either a b -> Int #

hash :: Either a b -> Int #

(Hashable a, Hashable b) => Hashable (These a b) 
Instance details

Defined in Data.Strict.These

Methods

hashWithSalt :: Int -> These a b -> Int #

hash :: These a b -> Int #

(Hashable a, Hashable b) => Hashable (Pair a b) 
Instance details

Defined in Data.Strict.Tuple

Methods

hashWithSalt :: Int -> Pair a b -> Int #

hash :: Pair a b -> Int #

(Hashable a, Hashable b) => Hashable (These a b) 
Instance details

Defined in Data.These

Methods

hashWithSalt :: Int -> These a b -> Int #

hash :: These a b -> Int #

(Hashable k, Hashable v) => Hashable (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

hashWithSalt :: Int -> HashMap k v -> Int #

hash :: HashMap k v -> Int #

(Hashable a1, Hashable a2) => Hashable (a1, a2) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> (a1, a2) -> Int #

hash :: (a1, a2) -> Int #

Hashable a => Hashable (Const a b) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Const a b -> Int #

hash :: Const a b -> Int #

(Hashable a1, Hashable a2, Hashable a3) => Hashable (a1, a2, a3) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> (a1, a2, a3) -> Int #

hash :: (a1, a2, a3) -> Int #

(Hashable1 f, Hashable1 g, Hashable a) => Hashable (Product f g a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Product f g a -> Int #

hash :: Product f g a -> Int #

(Hashable1 f, Hashable1 g, Hashable a) => Hashable (Sum f g a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Sum f g a -> Int #

hash :: Sum f g a -> Int #

(Hashable a1, Hashable a2, Hashable a3, Hashable a4) => Hashable (a1, a2, a3, a4) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> (a1, a2, a3, a4) -> Int #

hash :: (a1, a2, a3, a4) -> Int #

(Hashable1 f, Hashable1 g, Hashable a) => Hashable (Compose f g a)

In general, hash (Compose x) ≠ hash x. However, hashWithSalt satisfies its variant of this equivalence.

Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Compose f g a -> Int #

hash :: Compose f g a -> Int #

(Hashable a1, Hashable a2, Hashable a3, Hashable a4, Hashable a5) => Hashable (a1, a2, a3, a4, a5) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> (a1, a2, a3, a4, a5) -> Int #

hash :: (a1, a2, a3, a4, a5) -> Int #

(Hashable a1, Hashable a2, Hashable a3, Hashable a4, Hashable a5, Hashable a6) => Hashable (a1, a2, a3, a4, a5, a6) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> (a1, a2, a3, a4, a5, a6) -> Int #

hash :: (a1, a2, a3, a4, a5, a6) -> Int #

(Hashable a1, Hashable a2, Hashable a3, Hashable a4, Hashable a5, Hashable a6, Hashable a7) => Hashable (a1, a2, a3, a4, a5, a6, a7) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> (a1, a2, a3, a4, a5, a6, a7) -> Int #

hash :: (a1, a2, a3, a4, a5, a6, a7) -> Int #

class Foldable (t :: Type -> Type) #

The Foldable class represents data structures that can be reduced to a summary value one element at a time. Strict left-associative folds are a good fit for space-efficient reduction, while lazy right-associative folds are a good fit for corecursive iteration, or for folds that short-circuit after processing an initial subsequence of the structure's elements.

Instances can be derived automatically by enabling the DeriveFoldable extension. For example, a derived instance for a binary tree might be:

{-# LANGUAGE DeriveFoldable #-}
data Tree a = Empty
            | Leaf a
            | Node (Tree a) a (Tree a)
    deriving Foldable

A more detailed description can be found in the Overview section of Data.Foldable.

For the class laws see the Laws section of Data.Foldable.

Minimal complete definition

foldMap | foldr

Instances

Instances details
Foldable KeyMap 
Instance details

Defined in Data.Aeson.KeyMap

Methods

fold :: Monoid m => KeyMap m -> m #

foldMap :: Monoid m => (a -> m) -> KeyMap a -> m #

foldMap' :: Monoid m => (a -> m) -> KeyMap a -> m #

foldr :: (a -> b -> b) -> b -> KeyMap a -> b #

foldr' :: (a -> b -> b) -> b -> KeyMap a -> b #

foldl :: (b -> a -> b) -> b -> KeyMap a -> b #

foldl' :: (b -> a -> b) -> b -> KeyMap a -> b #

foldr1 :: (a -> a -> a) -> KeyMap a -> a #

foldl1 :: (a -> a -> a) -> KeyMap a -> a #

toList :: KeyMap a -> [a] #

null :: KeyMap a -> Bool #

length :: KeyMap a -> Int #

elem :: Eq a => a -> KeyMap a -> Bool #

maximum :: Ord a => KeyMap a -> a #

minimum :: Ord a => KeyMap a -> a #

sum :: Num a => KeyMap a -> a #

product :: Num a => KeyMap a -> a #

Foldable IResult 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

fold :: Monoid m => IResult m -> m #

foldMap :: Monoid m => (a -> m) -> IResult a -> m #

foldMap' :: Monoid m => (a -> m) -> IResult a -> m #

foldr :: (a -> b -> b) -> b -> IResult a -> b #

foldr' :: (a -> b -> b) -> b -> IResult a -> b #

foldl :: (b -> a -> b) -> b -> IResult a -> b #

foldl' :: (b -> a -> b) -> b -> IResult a -> b #

foldr1 :: (a -> a -> a) -> IResult a -> a #

foldl1 :: (a -> a -> a) -> IResult a -> a #

toList :: IResult a -> [a] #

null :: IResult a -> Bool #

length :: IResult a -> Int #

elem :: Eq a => a -> IResult a -> Bool #

maximum :: Ord a => IResult a -> a #

minimum :: Ord a => IResult a -> a #

sum :: Num a => IResult a -> a #

product :: Num a => IResult a -> a #

Foldable Result 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

fold :: Monoid m => Result m -> m #

foldMap :: Monoid m => (a -> m) -> Result a -> m #

foldMap' :: Monoid m => (a -> m) -> Result a -> m #

foldr :: (a -> b -> b) -> b -> Result a -> b #

foldr' :: (a -> b -> b) -> b -> Result a -> b #

foldl :: (b -> a -> b) -> b -> Result a -> b #

foldl' :: (b -> a -> b) -> b -> Result a -> b #

foldr1 :: (a -> a -> a) -> Result a -> a #

foldl1 :: (a -> a -> a) -> Result a -> a #

toList :: Result a -> [a] #

null :: Result a -> Bool #

length :: Result a -> Int #

elem :: Eq a => a -> Result a -> Bool #

maximum :: Ord a => Result a -> a #

minimum :: Ord a => Result a -> a #

sum :: Num a => Result a -> a #

product :: Num a => Result a -> a #

Foldable ZipList

Since: base-4.9.0.0

Instance details

Defined in Control.Applicative

Methods

fold :: Monoid m => ZipList m -> m #

foldMap :: Monoid m => (a -> m) -> ZipList a -> m #

foldMap' :: Monoid m => (a -> m) -> ZipList a -> m #

foldr :: (a -> b -> b) -> b -> ZipList a -> b #

foldr' :: (a -> b -> b) -> b -> ZipList a -> b #

foldl :: (b -> a -> b) -> b -> ZipList a -> b #

foldl' :: (b -> a -> b) -> b -> ZipList a -> b #

foldr1 :: (a -> a -> a) -> ZipList a -> a #

foldl1 :: (a -> a -> a) -> ZipList a -> a #

toList :: ZipList a -> [a] #

null :: ZipList a -> Bool #

length :: ZipList a -> Int #

elem :: Eq a => a -> ZipList a -> Bool #

maximum :: Ord a => ZipList a -> a #

minimum :: Ord a => ZipList a -> a #

sum :: Num a => ZipList a -> a #

product :: Num a => ZipList a -> a #

Foldable Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Methods

fold :: Monoid m => Complex m -> m #

foldMap :: Monoid m => (a -> m) -> Complex a -> m #

foldMap' :: Monoid m => (a -> m) -> Complex a -> m #

foldr :: (a -> b -> b) -> b -> Complex a -> b #

foldr' :: (a -> b -> b) -> b -> Complex a -> b #

foldl :: (b -> a -> b) -> b -> Complex a -> b #

foldl' :: (b -> a -> b) -> b -> Complex a -> b #

foldr1 :: (a -> a -> a) -> Complex a -> a #

foldl1 :: (a -> a -> a) -> Complex a -> a #

toList :: Complex a -> [a] #

null :: Complex a -> Bool #

length :: Complex a -> Int #

elem :: Eq a => a -> Complex a -> Bool #

maximum :: Ord a => Complex a -> a #

minimum :: Ord a => Complex a -> a #

sum :: Num a => Complex a -> a #

product :: Num a => Complex a -> a #

Foldable Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

fold :: Monoid m => Identity m -> m #

foldMap :: Monoid m => (a -> m) -> Identity a -> m #

foldMap' :: Monoid m => (a -> m) -> Identity a -> m #

foldr :: (a -> b -> b) -> b -> Identity a -> b #

foldr' :: (a -> b -> b) -> b -> Identity a -> b #

foldl :: (b -> a -> b) -> b -> Identity a -> b #

foldl' :: (b -> a -> b) -> b -> Identity a -> b #

foldr1 :: (a -> a -> a) -> Identity a -> a #

foldl1 :: (a -> a -> a) -> Identity a -> a #

toList :: Identity a -> [a] #

null :: Identity a -> Bool #

length :: Identity a -> Int #

elem :: Eq a => a -> Identity a -> Bool #

maximum :: Ord a => Identity a -> a #

minimum :: Ord a => Identity a -> a #

sum :: Num a => Identity a -> a #

product :: Num a => Identity a -> a #

Foldable First

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => First m -> m #

foldMap :: Monoid m => (a -> m) -> First a -> m #

foldMap' :: Monoid m => (a -> m) -> First a -> m #

foldr :: (a -> b -> b) -> b -> First a -> b #

foldr' :: (a -> b -> b) -> b -> First a -> b #

foldl :: (b -> a -> b) -> b -> First a -> b #

foldl' :: (b -> a -> b) -> b -> First a -> b #

foldr1 :: (a -> a -> a) -> First a -> a #

foldl1 :: (a -> a -> a) -> First a -> a #

toList :: First a -> [a] #

null :: First a -> Bool #

length :: First a -> Int #

elem :: Eq a => a -> First a -> Bool #

maximum :: Ord a => First a -> a #

minimum :: Ord a => First a -> a #

sum :: Num a => First a -> a #

product :: Num a => First a -> a #

Foldable Last

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Last m -> m #

foldMap :: Monoid m => (a -> m) -> Last a -> m #

foldMap' :: Monoid m => (a -> m) -> Last a -> m #

foldr :: (a -> b -> b) -> b -> Last a -> b #

foldr' :: (a -> b -> b) -> b -> Last a -> b #

foldl :: (b -> a -> b) -> b -> Last a -> b #

foldl' :: (b -> a -> b) -> b -> Last a -> b #

foldr1 :: (a -> a -> a) -> Last a -> a #

foldl1 :: (a -> a -> a) -> Last a -> a #

toList :: Last a -> [a] #

null :: Last a -> Bool #

length :: Last a -> Int #

elem :: Eq a => a -> Last a -> Bool #

maximum :: Ord a => Last a -> a #

minimum :: Ord a => Last a -> a #

sum :: Num a => Last a -> a #

product :: Num a => Last a -> a #

Foldable Down

Since: base-4.12.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Down m -> m #

foldMap :: Monoid m => (a -> m) -> Down a -> m #

foldMap' :: Monoid m => (a -> m) -> Down a -> m #

foldr :: (a -> b -> b) -> b -> Down a -> b #

foldr' :: (a -> b -> b) -> b -> Down a -> b #

foldl :: (b -> a -> b) -> b -> Down a -> b #

foldl' :: (b -> a -> b) -> b -> Down a -> b #

foldr1 :: (a -> a -> a) -> Down a -> a #

foldl1 :: (a -> a -> a) -> Down a -> a #

toList :: Down a -> [a] #

null :: Down a -> Bool #

length :: Down a -> Int #

elem :: Eq a => a -> Down a -> Bool #

maximum :: Ord a => Down a -> a #

minimum :: Ord a => Down a -> a #

sum :: Num a => Down a -> a #

product :: Num a => Down a -> a #

Foldable First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fold :: Monoid m => First m -> m #

foldMap :: Monoid m => (a -> m) -> First a -> m #

foldMap' :: Monoid m => (a -> m) -> First a -> m #

foldr :: (a -> b -> b) -> b -> First a -> b #

foldr' :: (a -> b -> b) -> b -> First a -> b #

foldl :: (b -> a -> b) -> b -> First a -> b #

foldl' :: (b -> a -> b) -> b -> First a -> b #

foldr1 :: (a -> a -> a) -> First a -> a #

foldl1 :: (a -> a -> a) -> First a -> a #

toList :: First a -> [a] #

null :: First a -> Bool #

length :: First a -> Int #

elem :: Eq a => a -> First a -> Bool #

maximum :: Ord a => First a -> a #

minimum :: Ord a => First a -> a #

sum :: Num a => First a -> a #

product :: Num a => First a -> a #

Foldable Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fold :: Monoid m => Last m -> m #

foldMap :: Monoid m => (a -> m) -> Last a -> m #

foldMap' :: Monoid m => (a -> m) -> Last a -> m #

foldr :: (a -> b -> b) -> b -> Last a -> b #

foldr' :: (a -> b -> b) -> b -> Last a -> b #

foldl :: (b -> a -> b) -> b -> Last a -> b #

foldl' :: (b -> a -> b) -> b -> Last a -> b #

foldr1 :: (a -> a -> a) -> Last a -> a #

foldl1 :: (a -> a -> a) -> Last a -> a #

toList :: Last a -> [a] #

null :: Last a -> Bool #

length :: Last a -> Int #

elem :: Eq a => a -> Last a -> Bool #

maximum :: Ord a => Last a -> a #

minimum :: Ord a => Last a -> a #

sum :: Num a => Last a -> a #

product :: Num a => Last a -> a #

Foldable Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fold :: Monoid m => Max m -> m #

foldMap :: Monoid m => (a -> m) -> Max a -> m #

foldMap' :: Monoid m => (a -> m) -> Max a -> m #

foldr :: (a -> b -> b) -> b -> Max a -> b #

foldr' :: (a -> b -> b) -> b -> Max a -> b #

foldl :: (b -> a -> b) -> b -> Max a -> b #

foldl' :: (b -> a -> b) -> b -> Max a -> b #

foldr1 :: (a -> a -> a) -> Max a -> a #

foldl1 :: (a -> a -> a) -> Max a -> a #

toList :: Max a -> [a] #

null :: Max a -> Bool #

length :: Max a -> Int #

elem :: Eq a => a -> Max a -> Bool #

maximum :: Ord a => Max a -> a #

minimum :: Ord a => Max a -> a #

sum :: Num a => Max a -> a #

product :: Num a => Max a -> a #

Foldable Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fold :: Monoid m => Min m -> m #

foldMap :: Monoid m => (a -> m) -> Min a -> m #

foldMap' :: Monoid m => (a -> m) -> Min a -> m #

foldr :: (a -> b -> b) -> b -> Min a -> b #

foldr' :: (a -> b -> b) -> b -> Min a -> b #

foldl :: (b -> a -> b) -> b -> Min a -> b #

foldl' :: (b -> a -> b) -> b -> Min a -> b #

foldr1 :: (a -> a -> a) -> Min a -> a #

foldl1 :: (a -> a -> a) -> Min a -> a #

toList :: Min a -> [a] #

null :: Min a -> Bool #

length :: Min a -> Int #

elem :: Eq a => a -> Min a -> Bool #

maximum :: Ord a => Min a -> a #

minimum :: Ord a => Min a -> a #

sum :: Num a => Min a -> a #

product :: Num a => Min a -> a #

Foldable Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Dual m -> m #

foldMap :: Monoid m => (a -> m) -> Dual a -> m #

foldMap' :: Monoid m => (a -> m) -> Dual a -> m #

foldr :: (a -> b -> b) -> b -> Dual a -> b #

foldr' :: (a -> b -> b) -> b -> Dual a -> b #

foldl :: (b -> a -> b) -> b -> Dual a -> b #

foldl' :: (b -> a -> b) -> b -> Dual a -> b #

foldr1 :: (a -> a -> a) -> Dual a -> a #

foldl1 :: (a -> a -> a) -> Dual a -> a #

toList :: Dual a -> [a] #

null :: Dual a -> Bool #

length :: Dual a -> Int #

elem :: Eq a => a -> Dual a -> Bool #

maximum :: Ord a => Dual a -> a #

minimum :: Ord a => Dual a -> a #

sum :: Num a => Dual a -> a #

product :: Num a => Dual a -> a #

Foldable Product

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Product m -> m #

foldMap :: Monoid m => (a -> m) -> Product a -> m #

foldMap' :: Monoid m => (a -> m) -> Product a -> m #

foldr :: (a -> b -> b) -> b -> Product a -> b #

foldr' :: (a -> b -> b) -> b -> Product a -> b #

foldl :: (b -> a -> b) -> b -> Product a -> b #

foldl' :: (b -> a -> b) -> b -> Product a -> b #

foldr1 :: (a -> a -> a) -> Product a -> a #

foldl1 :: (a -> a -> a) -> Product a -> a #

toList :: Product a -> [a] #

null :: Product a -> Bool #

length :: Product a -> Int #

elem :: Eq a => a -> Product a -> Bool #

maximum :: Ord a => Product a -> a #

minimum :: Ord a => Product a -> a #

sum :: Num a => Product a -> a #

product :: Num a => Product a -> a #

Foldable Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Sum m -> m #

foldMap :: Monoid m => (a -> m) -> Sum a -> m #

foldMap' :: Monoid m => (a -> m) -> Sum a -> m #

foldr :: (a -> b -> b) -> b -> Sum a -> b #

foldr' :: (a -> b -> b) -> b -> Sum a -> b #

foldl :: (b -> a -> b) -> b -> Sum a -> b #

foldl' :: (b -> a -> b) -> b -> Sum a -> b #

foldr1 :: (a -> a -> a) -> Sum a -> a #

foldl1 :: (a -> a -> a) -> Sum a -> a #

toList :: Sum a -> [a] #

null :: Sum a -> Bool #

length :: Sum a -> Int #

elem :: Eq a => a -> Sum a -> Bool #

maximum :: Ord a => Sum a -> a #

minimum :: Ord a => Sum a -> a #

sum :: Num a => Sum a -> a #

product :: Num a => Sum a -> a #

Foldable NonEmpty

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => NonEmpty m -> m #

foldMap :: Monoid m => (a -> m) -> NonEmpty a -> m #

foldMap' :: Monoid m => (a -> m) -> NonEmpty a -> m #

foldr :: (a -> b -> b) -> b -> NonEmpty a -> b #

foldr' :: (a -> b -> b) -> b -> NonEmpty a -> b #

foldl :: (b -> a -> b) -> b -> NonEmpty a -> b #

foldl' :: (b -> a -> b) -> b -> NonEmpty a -> b #

foldr1 :: (a -> a -> a) -> NonEmpty a -> a #

foldl1 :: (a -> a -> a) -> NonEmpty a -> a #

toList :: NonEmpty a -> [a] #

null :: NonEmpty a -> Bool #

length :: NonEmpty a -> Int #

elem :: Eq a => a -> NonEmpty a -> Bool #

maximum :: Ord a => NonEmpty a -> a #

minimum :: Ord a => NonEmpty a -> a #

sum :: Num a => NonEmpty a -> a #

product :: Num a => NonEmpty a -> a #

Foldable Par1

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Par1 m -> m #

foldMap :: Monoid m => (a -> m) -> Par1 a -> m #

foldMap' :: Monoid m => (a -> m) -> Par1 a -> m #

foldr :: (a -> b -> b) -> b -> Par1 a -> b #

foldr' :: (a -> b -> b) -> b -> Par1 a -> b #

foldl :: (b -> a -> b) -> b -> Par1 a -> b #

foldl' :: (b -> a -> b) -> b -> Par1 a -> b #

foldr1 :: (a -> a -> a) -> Par1 a -> a #

foldl1 :: (a -> a -> a) -> Par1 a -> a #

toList :: Par1 a -> [a] #

null :: Par1 a -> Bool #

length :: Par1 a -> Int #

elem :: Eq a => a -> Par1 a -> Bool #

maximum :: Ord a => Par1 a -> a #

minimum :: Ord a => Par1 a -> a #

sum :: Num a => Par1 a -> a #

product :: Num a => Par1 a -> a #

Foldable IntMap

Folds in order of increasing key.

Instance details

Defined in Data.IntMap.Internal

Methods

fold :: Monoid m => IntMap m -> m #

foldMap :: Monoid m => (a -> m) -> IntMap a -> m #

foldMap' :: Monoid m => (a -> m) -> IntMap a -> m #

foldr :: (a -> b -> b) -> b -> IntMap a -> b #

foldr' :: (a -> b -> b) -> b -> IntMap a -> b #

foldl :: (b -> a -> b) -> b -> IntMap a -> b #

foldl' :: (b -> a -> b) -> b -> IntMap a -> b #

foldr1 :: (a -> a -> a) -> IntMap a -> a #

foldl1 :: (a -> a -> a) -> IntMap a -> a #

toList :: IntMap a -> [a] #

null :: IntMap a -> Bool #

length :: IntMap a -> Int #

elem :: Eq a => a -> IntMap a -> Bool #

maximum :: Ord a => IntMap a -> a #

minimum :: Ord a => IntMap a -> a #

sum :: Num a => IntMap a -> a #

product :: Num a => IntMap a -> a #

Foldable Digit 
Instance details

Defined in Data.Sequence.Internal

Methods

fold :: Monoid m => Digit m -> m #

foldMap :: Monoid m => (a -> m) -> Digit a -> m #

foldMap' :: Monoid m => (a -> m) -> Digit a -> m #

foldr :: (a -> b -> b) -> b -> Digit a -> b #

foldr' :: (a -> b -> b) -> b -> Digit a -> b #

foldl :: (b -> a -> b) -> b -> Digit a -> b #

foldl' :: (b -> a -> b) -> b -> Digit a -> b #

foldr1 :: (a -> a -> a) -> Digit a -> a #

foldl1 :: (a -> a -> a) -> Digit a -> a #

toList :: Digit a -> [a] #

null :: Digit a -> Bool #

length :: Digit a -> Int #

elem :: Eq a => a -> Digit a -> Bool #

maximum :: Ord a => Digit a -> a #

minimum :: Ord a => Digit a -> a #

sum :: Num a => Digit a -> a #

product :: Num a => Digit a -> a #

Foldable Elem 
Instance details

Defined in Data.Sequence.Internal

Methods

fold :: Monoid m => Elem m -> m #

foldMap :: Monoid m => (a -> m) -> Elem a -> m #

foldMap' :: Monoid m => (a -> m) -> Elem a -> m #

foldr :: (a -> b -> b) -> b -> Elem a -> b #

foldr' :: (a -> b -> b) -> b -> Elem a -> b #

foldl :: (b -> a -> b) -> b -> Elem a -> b #

foldl' :: (b -> a -> b) -> b -> Elem a -> b #

foldr1 :: (a -> a -> a) -> Elem a -> a #

foldl1 :: (a -> a -> a) -> Elem a -> a #

toList :: Elem a -> [a] #

null :: Elem a -> Bool #

length :: Elem a -> Int #

elem :: Eq a => a -> Elem a -> Bool #

maximum :: Ord a => Elem a -> a #

minimum :: Ord a => Elem a -> a #

sum :: Num a => Elem a -> a #

product :: Num a => Elem a -> a #

Foldable FingerTree 
Instance details

Defined in Data.Sequence.Internal

Methods

fold :: Monoid m => FingerTree m -> m #

foldMap :: Monoid m => (a -> m) -> FingerTree a -> m #

foldMap' :: Monoid m => (a -> m) -> FingerTree a -> m #

foldr :: (a -> b -> b) -> b -> FingerTree a -> b #

foldr' :: (a -> b -> b) -> b -> FingerTree a -> b #

foldl :: (b -> a -> b) -> b -> FingerTree a -> b #

foldl' :: (b -> a -> b) -> b -> FingerTree a -> b #

foldr1 :: (a -> a -> a) -> FingerTree a -> a #

foldl1 :: (a -> a -> a) -> FingerTree a -> a #

toList :: FingerTree a -> [a] #

null :: FingerTree a -> Bool #

length :: FingerTree a -> Int #

elem :: Eq a => a -> FingerTree a -> Bool #

maximum :: Ord a => FingerTree a -> a #

minimum :: Ord a => FingerTree a -> a #

sum :: Num a => FingerTree a -> a #

product :: Num a => FingerTree a -> a #

Foldable Node 
Instance details

Defined in Data.Sequence.Internal

Methods

fold :: Monoid m => Node m -> m #

foldMap :: Monoid m => (a -> m) -> Node a -> m #

foldMap' :: Monoid m => (a -> m) -> Node a -> m #

foldr :: (a -> b -> b) -> b -> Node a -> b #

foldr' :: (a -> b -> b) -> b -> Node a -> b #

foldl :: (b -> a -> b) -> b -> Node a -> b #

foldl' :: (b -> a -> b) -> b -> Node a -> b #

foldr1 :: (a -> a -> a) -> Node a -> a #

foldl1 :: (a -> a -> a) -> Node a -> a #

toList :: Node a -> [a] #

null :: Node a -> Bool #

length :: Node a -> Int #

elem :: Eq a => a -> Node a -> Bool #

maximum :: Ord a => Node a -> a #

minimum :: Ord a => Node a -> a #

sum :: Num a => Node a -> a #

product :: Num a => Node a -> a #

Foldable Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

fold :: Monoid m => Seq m -> m #

foldMap :: Monoid m => (a -> m) -> Seq a -> m #

foldMap' :: Monoid m => (a -> m) -> Seq a -> m #

foldr :: (a -> b -> b) -> b -> Seq a -> b #

foldr' :: (a -> b -> b) -> b -> Seq a -> b #

foldl :: (b -> a -> b) -> b -> Seq a -> b #

foldl' :: (b -> a -> b) -> b -> Seq a -> b #

foldr1 :: (a -> a -> a) -> Seq a -> a #

foldl1 :: (a -> a -> a) -> Seq a -> a #

toList :: Seq a -> [a] #

null :: Seq a -> Bool #

length :: Seq a -> Int #

elem :: Eq a => a -> Seq a -> Bool #

maximum :: Ord a => Seq a -> a #

minimum :: Ord a => Seq a -> a #

sum :: Num a => Seq a -> a #

product :: Num a => Seq a -> a #

Foldable ViewL 
Instance details

Defined in Data.Sequence.Internal

Methods

fold :: Monoid m => ViewL m -> m #

foldMap :: Monoid m => (a -> m) -> ViewL a -> m #

foldMap' :: Monoid m => (a -> m) -> ViewL a -> m #

foldr :: (a -> b -> b) -> b -> ViewL a -> b #

foldr' :: (a -> b -> b) -> b -> ViewL a -> b #

foldl :: (b -> a -> b) -> b -> ViewL a -> b #

foldl' :: (b -> a -> b) -> b -> ViewL a -> b #

foldr1 :: (a -> a -> a) -> ViewL a -> a #

foldl1 :: (a -> a -> a) -> ViewL a -> a #

toList :: ViewL a -> [a] #

null :: ViewL a -> Bool #

length :: ViewL a -> Int #

elem :: Eq a => a -> ViewL a -> Bool #

maximum :: Ord a => ViewL a -> a #

minimum :: Ord a => ViewL a -> a #

sum :: Num a => ViewL a -> a #

product :: Num a => ViewL a -> a #

Foldable ViewR 
Instance details

Defined in Data.Sequence.Internal

Methods

fold :: Monoid m => ViewR m -> m #

foldMap :: Monoid m => (a -> m) -> ViewR a -> m #

foldMap' :: Monoid m => (a -> m) -> ViewR a -> m #

foldr :: (a -> b -> b) -> b -> ViewR a -> b #

foldr' :: (a -> b -> b) -> b -> ViewR a -> b #

foldl :: (b -> a -> b) -> b -> ViewR a -> b #

foldl' :: (b -> a -> b) -> b -> ViewR a -> b #

foldr1 :: (a -> a -> a) -> ViewR a -> a #

foldl1 :: (a -> a -> a) -> ViewR a -> a #

toList :: ViewR a -> [a] #

null :: ViewR a -> Bool #

length :: ViewR a -> Int #

elem :: Eq a => a -> ViewR a -> Bool #

maximum :: Ord a => ViewR a -> a #

minimum :: Ord a => ViewR a -> a #

sum :: Num a => ViewR a -> a #

product :: Num a => ViewR a -> a #

Foldable Set

Folds in order of increasing key.

Instance details

Defined in Data.Set.Internal

Methods

fold :: Monoid m => Set m -> m #

foldMap :: Monoid m => (a -> m) -> Set a -> m #

foldMap' :: Monoid m => (a -> m) -> Set a -> m #

foldr :: (a -> b -> b) -> b -> Set a -> b #

foldr' :: (a -> b -> b) -> b -> Set a -> b #

foldl :: (b -> a -> b) -> b -> Set a -> b #

foldl' :: (b -> a -> b) -> b -> Set a -> b #

foldr1 :: (a -> a -> a) -> Set a -> a #

foldl1 :: (a -> a -> a) -> Set a -> a #

toList :: Set a -> [a] #

null :: Set a -> Bool #

length :: Set a -> Int #

elem :: Eq a => a -> Set a -> Bool #

maximum :: Ord a => Set a -> a #

minimum :: Ord a => Set a -> a #

sum :: Num a => Set a -> a #

product :: Num a => Set a -> a #

Foldable Tree

Folds in preorder

Instance details

Defined in Data.Tree

Methods

fold :: Monoid m => Tree m -> m #

foldMap :: Monoid m => (a -> m) -> Tree a -> m #

foldMap' :: Monoid m => (a -> m) -> Tree a -> m #

foldr :: (a -> b -> b) -> b -> Tree a -> b #

foldr' :: (a -> b -> b) -> b -> Tree a -> b #

foldl :: (b -> a -> b) -> b -> Tree a -> b #

foldl' :: (b -> a -> b) -> b -> Tree a -> b #

foldr1 :: (a -> a -> a) -> Tree a -> a #

foldl1 :: (a -> a -> a) -> Tree a -> a #

toList :: Tree a -> [a] #

null :: Tree a -> Bool #

length :: Tree a -> Int #

elem :: Eq a => a -> Tree a -> Bool #

maximum :: Ord a => Tree a -> a #

minimum :: Ord a => Tree a -> a #

sum :: Num a => Tree a -> a #

product :: Num a => Tree a -> a #

Foldable DNonEmpty 
Instance details

Defined in Data.DList.DNonEmpty.Internal

Methods

fold :: Monoid m => DNonEmpty m -> m #

foldMap :: Monoid m => (a -> m) -> DNonEmpty a -> m #

foldMap' :: Monoid m => (a -> m) -> DNonEmpty a -> m #

foldr :: (a -> b -> b) -> b -> DNonEmpty a -> b #

foldr' :: (a -> b -> b) -> b -> DNonEmpty a -> b #

foldl :: (b -> a -> b) -> b -> DNonEmpty a -> b #

foldl' :: (b -> a -> b) -> b -> DNonEmpty a -> b #

foldr1 :: (a -> a -> a) -> DNonEmpty a -> a #

foldl1 :: (a -> a -> a) -> DNonEmpty a -> a #

toList :: DNonEmpty a -> [a] #

null :: DNonEmpty a -> Bool #

length :: DNonEmpty a -> Int #

elem :: Eq a => a -> DNonEmpty a -> Bool #

maximum :: Ord a => DNonEmpty a -> a #

minimum :: Ord a => DNonEmpty a -> a #

sum :: Num a => DNonEmpty a -> a #

product :: Num a => DNonEmpty a -> a #

Foldable DList 
Instance details

Defined in Data.DList.Internal

Methods

fold :: Monoid m => DList m -> m #

foldMap :: Monoid m => (a -> m) -> DList a -> m #

foldMap' :: Monoid m => (a -> m) -> DList a -> m #

foldr :: (a -> b -> b) -> b -> DList a -> b #

foldr' :: (a -> b -> b) -> b -> DList a -> b #

foldl :: (b -> a -> b) -> b -> DList a -> b #

foldl' :: (b -> a -> b) -> b -> DList a -> b #

foldr1 :: (a -> a -> a) -> DList a -> a #

foldl1 :: (a -> a -> a) -> DList a -> a #

toList :: DList a -> [a] #

null :: DList a -> Bool #

length :: DList a -> Int #

elem :: Eq a => a -> DList a -> Bool #

maximum :: Ord a => DList a -> a #

minimum :: Ord a => DList a -> a #

sum :: Num a => DList a -> a #

product :: Num a => DList a -> a #

Foldable Hashed 
Instance details

Defined in Data.Hashable.Class

Methods

fold :: Monoid m => Hashed m -> m #

foldMap :: Monoid m => (a -> m) -> Hashed a -> m #

foldMap' :: Monoid m => (a -> m) -> Hashed a -> m #

foldr :: (a -> b -> b) -> b -> Hashed a -> b #

foldr' :: (a -> b -> b) -> b -> Hashed a -> b #

foldl :: (b -> a -> b) -> b -> Hashed a -> b #

foldl' :: (b -> a -> b) -> b -> Hashed a -> b #

foldr1 :: (a -> a -> a) -> Hashed a -> a #

foldl1 :: (a -> a -> a) -> Hashed a -> a #

toList :: Hashed a -> [a] #

null :: Hashed a -> Bool #

length :: Hashed a -> Int #

elem :: Eq a => a -> Hashed a -> Bool #

maximum :: Ord a => Hashed a -> a #

minimum :: Ord a => Hashed a -> a #

sum :: Num a => Hashed a -> a #

product :: Num a => Hashed a -> a #

Foldable LenientData 
Instance details

Defined in Web.Internal.HttpApiData

Methods

fold :: Monoid m => LenientData m -> m #

foldMap :: Monoid m => (a -> m) -> LenientData a -> m #

foldMap' :: Monoid m => (a -> m) -> LenientData a -> m #

foldr :: (a -> b -> b) -> b -> LenientData a -> b #

foldr' :: (a -> b -> b) -> b -> LenientData a -> b #

foldl :: (b -> a -> b) -> b -> LenientData a -> b #

foldl' :: (b -> a -> b) -> b -> LenientData a -> b #

foldr1 :: (a -> a -> a) -> LenientData a -> a #

foldl1 :: (a -> a -> a) -> LenientData a -> a #

toList :: LenientData a -> [a] #

null :: LenientData a -> Bool #

length :: LenientData a -> Int #

elem :: Eq a => a -> LenientData a -> Bool #

maximum :: Ord a => LenientData a -> a #

minimum :: Ord a => LenientData a -> a #

sum :: Num a => LenientData a -> a #

product :: Num a => LenientData a -> a #

Foldable PoolList 
Instance details

Defined in Data.KeyedPool

Methods

fold :: Monoid m => PoolList m -> m #

foldMap :: Monoid m => (a -> m) -> PoolList a -> m #

foldMap' :: Monoid m => (a -> m) -> PoolList a -> m #

foldr :: (a -> b -> b) -> b -> PoolList a -> b #

foldr' :: (a -> b -> b) -> b -> PoolList a -> b #

foldl :: (b -> a -> b) -> b -> PoolList a -> b #

foldl' :: (b -> a -> b) -> b -> PoolList a -> b #

foldr1 :: (a -> a -> a) -> PoolList a -> a #

foldl1 :: (a -> a -> a) -> PoolList a -> a #

toList :: PoolList a -> [a] #

null :: PoolList a -> Bool #

length :: PoolList a -> Int #

elem :: Eq a => a -> PoolList a -> Bool #

maximum :: Ord a => PoolList a -> a #

minimum :: Ord a => PoolList a -> a #

sum :: Num a => PoolList a -> a #

product :: Num a => PoolList a -> a #

Foldable HistoriedResponse 
Instance details

Defined in Network.HTTP.Client

Methods

fold :: Monoid m => HistoriedResponse m -> m #

foldMap :: Monoid m => (a -> m) -> HistoriedResponse a -> m #

foldMap' :: Monoid m => (a -> m) -> HistoriedResponse a -> m #

foldr :: (a -> b -> b) -> b -> HistoriedResponse a -> b #

foldr' :: (a -> b -> b) -> b -> HistoriedResponse a -> b #

foldl :: (b -> a -> b) -> b -> HistoriedResponse a -> b #

foldl' :: (b -> a -> b) -> b -> HistoriedResponse a -> b #

foldr1 :: (a -> a -> a) -> HistoriedResponse a -> a #

foldl1 :: (a -> a -> a) -> HistoriedResponse a -> a #

toList :: HistoriedResponse a -> [a] #

null :: HistoriedResponse a -> Bool #

length :: HistoriedResponse a -> Int #

elem :: Eq a => a -> HistoriedResponse a -> Bool #

maximum :: Ord a => HistoriedResponse a -> a #

minimum :: Ord a => HistoriedResponse a -> a #

sum :: Num a => HistoriedResponse a -> a #

product :: Num a => HistoriedResponse a -> a #

Foldable Response 
Instance details

Defined in Network.HTTP.Client.Types

Methods

fold :: Monoid m => Response m -> m #

foldMap :: Monoid m => (a -> m) -> Response a -> m #

foldMap' :: Monoid m => (a -> m) -> Response a -> m #

foldr :: (a -> b -> b) -> b -> Response a -> b #

foldr' :: (a -> b -> b) -> b -> Response a -> b #

foldl :: (b -> a -> b) -> b -> Response a -> b #

foldl' :: (b -> a -> b) -> b -> Response a -> b #

foldr1 :: (a -> a -> a) -> Response a -> a #

foldl1 :: (a -> a -> a) -> Response a -> a #

toList :: Response a -> [a] #

null :: Response a -> Bool #

length :: Response a -> Int #

elem :: Eq a => a -> Response a -> Bool #

maximum :: Ord a => Response a -> a #

minimum :: Ord a => Response a -> a #

sum :: Num a => Response a -> a #

product :: Num a => Response a -> a #

Foldable Array 
Instance details

Defined in Data.Primitive.Array

Methods

fold :: Monoid m => Array m -> m #

foldMap :: Monoid m => (a -> m) -> Array a -> m #

foldMap' :: Monoid m => (a -> m) -> Array a -> m #

foldr :: (a -> b -> b) -> b -> Array a -> b #

foldr' :: (a -> b -> b) -> b -> Array a -> b #

foldl :: (b -> a -> b) -> b -> Array a -> b #

foldl' :: (b -> a -> b) -> b -> Array a -> b #

foldr1 :: (a -> a -> a) -> Array a -> a #

foldl1 :: (a -> a -> a) -> Array a -> a #

toList :: Array a -> [a] #

null :: Array a -> Bool #

length :: Array a -> Int #

elem :: Eq a => a -> Array a -> Bool #

maximum :: Ord a => Array a -> a #

minimum :: Ord a => Array a -> a #

sum :: Num a => Array a -> a #

product :: Num a => Array a -> a #

Foldable SmallArray 
Instance details

Defined in Data.Primitive.SmallArray

Methods

fold :: Monoid m => SmallArray m -> m #

foldMap :: Monoid m => (a -> m) -> SmallArray a -> m #

foldMap' :: Monoid m => (a -> m) -> SmallArray a -> m #

foldr :: (a -> b -> b) -> b -> SmallArray a -> b #

foldr' :: (a -> b -> b) -> b -> SmallArray a -> b #

foldl :: (b -> a -> b) -> b -> SmallArray a -> b #

foldl' :: (b -> a -> b) -> b -> SmallArray a -> b #

foldr1 :: (a -> a -> a) -> SmallArray a -> a #

foldl1 :: (a -> a -> a) -> SmallArray a -> a #

toList :: SmallArray a -> [a] #

null :: SmallArray a -> Bool #

length :: SmallArray a -> Int #

elem :: Eq a => a -> SmallArray a -> Bool #

maximum :: Ord a => SmallArray a -> a #

minimum :: Ord a => SmallArray a -> a #

sum :: Num a => SmallArray a -> a #

product :: Num a => SmallArray a -> a #

Foldable Maybe 
Instance details

Defined in Data.Strict.Maybe

Methods

fold :: Monoid m => Maybe m -> m #

foldMap :: Monoid m => (a -> m) -> Maybe a -> m #

foldMap' :: Monoid m => (a -> m) -> Maybe a -> m #

foldr :: (a -> b -> b) -> b -> Maybe a -> b #

foldr' :: (a -> b -> b) -> b -> Maybe a -> b #

foldl :: (b -> a -> b) -> b -> Maybe a -> b #

foldl' :: (b -> a -> b) -> b -> Maybe a -> b #

foldr1 :: (a -> a -> a) -> Maybe a -> a #

foldl1 :: (a -> a -> a) -> Maybe a -> a #

toList :: Maybe a -> [a] #

null :: Maybe a -> Bool #

length :: Maybe a -> Int #

elem :: Eq a => a -> Maybe a -> Bool #

maximum :: Ord a => Maybe a -> a #

minimum :: Ord a => Maybe a -> a #

sum :: Num a => Maybe a -> a #

product :: Num a => Maybe a -> a #

Foldable HashSet 
Instance details

Defined in Data.HashSet.Internal

Methods

fold :: Monoid m => HashSet m -> m #

foldMap :: Monoid m => (a -> m) -> HashSet a -> m #

foldMap' :: Monoid m => (a -> m) -> HashSet a -> m #

foldr :: (a -> b -> b) -> b -> HashSet a -> b #

foldr' :: (a -> b -> b) -> b -> HashSet a -> b #

foldl :: (b -> a -> b) -> b -> HashSet a -> b #

foldl' :: (b -> a -> b) -> b -> HashSet a -> b #

foldr1 :: (a -> a -> a) -> HashSet a -> a #

foldl1 :: (a -> a -> a) -> HashSet a -> a #

toList :: HashSet a -> [a] #

null :: HashSet a -> Bool #

length :: HashSet a -> Int #

elem :: Eq a => a -> HashSet a -> Bool #

maximum :: Ord a => HashSet a -> a #

minimum :: Ord a => HashSet a -> a #

sum :: Num a => HashSet a -> a #

product :: Num a => HashSet a -> a #

Foldable Vector 
Instance details

Defined in Data.Vector

Methods

fold :: Monoid m => Vector m -> m #

foldMap :: Monoid m => (a -> m) -> Vector a -> m #

foldMap' :: Monoid m => (a -> m) -> Vector a -> m #

foldr :: (a -> b -> b) -> b -> Vector a -> b #

foldr' :: (a -> b -> b) -> b -> Vector a -> b #

foldl :: (b -> a -> b) -> b -> Vector a -> b #

foldl' :: (b -> a -> b) -> b -> Vector a -> b #

foldr1 :: (a -> a -> a) -> Vector a -> a #

foldl1 :: (a -> a -> a) -> Vector a -> a #

toList :: Vector a -> [a] #

null :: Vector a -> Bool #

length :: Vector a -> Int #

elem :: Eq a => a -> Vector a -> Bool #

maximum :: Ord a => Vector a -> a #

minimum :: Ord a => Vector a -> a #

sum :: Num a => Vector a -> a #

product :: Num a => Vector a -> a #

Foldable FormResult

Since: yesod-form-1.4.5

Instance details

Defined in Yesod.Form.Types

Methods

fold :: Monoid m => FormResult m -> m #

foldMap :: Monoid m => (a -> m) -> FormResult a -> m #

foldMap' :: Monoid m => (a -> m) -> FormResult a -> m #

foldr :: (a -> b -> b) -> b -> FormResult a -> b #

foldr' :: (a -> b -> b) -> b -> FormResult a -> b #

foldl :: (b -> a -> b) -> b -> FormResult a -> b #

foldl' :: (b -> a -> b) -> b -> FormResult a -> b #

foldr1 :: (a -> a -> a) -> FormResult a -> a #

foldl1 :: (a -> a -> a) -> FormResult a -> a #

toList :: FormResult a -> [a] #

null :: FormResult a -> Bool #

length :: FormResult a -> Int #

elem :: Eq a => a -> FormResult a -> Bool #

maximum :: Ord a => FormResult a -> a #

minimum :: Ord a => FormResult a -> a #

sum :: Num a => FormResult a -> a #

product :: Num a => FormResult a -> a #

Foldable Maybe

Since: base-2.1

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Maybe m -> m #

foldMap :: Monoid m => (a -> m) -> Maybe a -> m #

foldMap' :: Monoid m => (a -> m) -> Maybe a -> m #

foldr :: (a -> b -> b) -> b -> Maybe a -> b #

foldr' :: (a -> b -> b) -> b -> Maybe a -> b #

foldl :: (b -> a -> b) -> b -> Maybe a -> b #

foldl' :: (b -> a -> b) -> b -> Maybe a -> b #

foldr1 :: (a -> a -> a) -> Maybe a -> a #

foldl1 :: (a -> a -> a) -> Maybe a -> a #

toList :: Maybe a -> [a] #

null :: Maybe a -> Bool #

length :: Maybe a -> Int #

elem :: Eq a => a -> Maybe a -> Bool #

maximum :: Ord a => Maybe a -> a #

minimum :: Ord a => Maybe a -> a #

sum :: Num a => Maybe a -> a #

product :: Num a => Maybe a -> a #

Foldable Solo

Since: base-4.15

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Solo m -> m #

foldMap :: Monoid m => (a -> m) -> Solo a -> m #

foldMap' :: Monoid m => (a -> m) -> Solo a -> m #

foldr :: (a -> b -> b) -> b -> Solo a -> b #

foldr' :: (a -> b -> b) -> b -> Solo a -> b #

foldl :: (b -> a -> b) -> b -> Solo a -> b #

foldl' :: (b -> a -> b) -> b -> Solo a -> b #

foldr1 :: (a -> a -> a) -> Solo a -> a #

foldl1 :: (a -> a -> a) -> Solo a -> a #

toList :: Solo a -> [a] #

null :: Solo a -> Bool #

length :: Solo a -> Int #

elem :: Eq a => a -> Solo a -> Bool #

maximum :: Ord a => Solo a -> a #

minimum :: Ord a => Solo a -> a #

sum :: Num a => Solo a -> a #

product :: Num a => Solo a -> a #

Foldable List

Since: base-2.1

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => [m] -> m #

foldMap :: Monoid m => (a -> m) -> [a] -> m #

foldMap' :: Monoid m => (a -> m) -> [a] -> m #

foldr :: (a -> b -> b) -> b -> [a] -> b #

foldr' :: (a -> b -> b) -> b -> [a] -> b #

foldl :: (b -> a -> b) -> b -> [a] -> b #

foldl' :: (b -> a -> b) -> b -> [a] -> b #

foldr1 :: (a -> a -> a) -> [a] -> a #

foldl1 :: (a -> a -> a) -> [a] -> a #

toList :: [a] -> [a] #

null :: [a] -> Bool #

length :: [a] -> Int #

elem :: Eq a => a -> [a] -> Bool #

maximum :: Ord a => [a] -> a #

minimum :: Ord a => [a] -> a #

sum :: Num a => [a] -> a #

product :: Num a => [a] -> a #

Foldable (Either a)

Since: base-4.7.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Either a m -> m #

foldMap :: Monoid m => (a0 -> m) -> Either a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> Either a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> Either a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> Either a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> Either a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> Either a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> Either a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> Either a a0 -> a0 #

toList :: Either a a0 -> [a0] #

null :: Either a a0 -> Bool #

length :: Either a a0 -> Int #

elem :: Eq a0 => a0 -> Either a a0 -> Bool #

maximum :: Ord a0 => Either a a0 -> a0 #

minimum :: Ord a0 => Either a a0 -> a0 #

sum :: Num a0 => Either a a0 -> a0 #

product :: Num a0 => Either a a0 -> a0 #

Foldable (Proxy :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Proxy m -> m #

foldMap :: Monoid m => (a -> m) -> Proxy a -> m #

foldMap' :: Monoid m => (a -> m) -> Proxy a -> m #

foldr :: (a -> b -> b) -> b -> Proxy a -> b #

foldr' :: (a -> b -> b) -> b -> Proxy a -> b #

foldl :: (b -> a -> b) -> b -> Proxy a -> b #

foldl' :: (b -> a -> b) -> b -> Proxy a -> b #

foldr1 :: (a -> a -> a) -> Proxy a -> a #

foldl1 :: (a -> a -> a) -> Proxy a -> a #

toList :: Proxy a -> [a] #

null :: Proxy a -> Bool #

length :: Proxy a -> Int #

elem :: Eq a => a -> Proxy a -> Bool #

maximum :: Ord a => Proxy a -> a #

minimum :: Ord a => Proxy a -> a #

sum :: Num a => Proxy a -> a #

product :: Num a => Proxy a -> a #

Foldable (Arg a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fold :: Monoid m => Arg a m -> m #

foldMap :: Monoid m => (a0 -> m) -> Arg a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> Arg a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> Arg a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> Arg a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> Arg a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> Arg a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> Arg a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> Arg a a0 -> a0 #

toList :: Arg a a0 -> [a0] #

null :: Arg a a0 -> Bool #

length :: Arg a a0 -> Int #

elem :: Eq a0 => a0 -> Arg a a0 -> Bool #

maximum :: Ord a0 => Arg a a0 -> a0 #

minimum :: Ord a0 => Arg a a0 -> a0 #

sum :: Num a0 => Arg a a0 -> a0 #

product :: Num a0 => Arg a a0 -> a0 #

Foldable (Array i)

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Array i m -> m #

foldMap :: Monoid m => (a -> m) -> Array i a -> m #

foldMap' :: Monoid m => (a -> m) -> Array i a -> m #

foldr :: (a -> b -> b) -> b -> Array i a -> b #

foldr' :: (a -> b -> b) -> b -> Array i a -> b #

foldl :: (b -> a -> b) -> b -> Array i a -> b #

foldl' :: (b -> a -> b) -> b -> Array i a -> b #

foldr1 :: (a -> a -> a) -> Array i a -> a #

foldl1 :: (a -> a -> a) -> Array i a -> a #

toList :: Array i a -> [a] #

null :: Array i a -> Bool #

length :: Array i a -> Int #

elem :: Eq a => a -> Array i a -> Bool #

maximum :: Ord a => Array i a -> a #

minimum :: Ord a => Array i a -> a #

sum :: Num a => Array i a -> a #

product :: Num a => Array i a -> a #

Foldable (U1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => U1 m -> m #

foldMap :: Monoid m => (a -> m) -> U1 a -> m #

foldMap' :: Monoid m => (a -> m) -> U1 a -> m #

foldr :: (a -> b -> b) -> b -> U1 a -> b #

foldr' :: (a -> b -> b) -> b -> U1 a -> b #

foldl :: (b -> a -> b) -> b -> U1 a -> b #

foldl' :: (b -> a -> b) -> b -> U1 a -> b #

foldr1 :: (a -> a -> a) -> U1 a -> a #

foldl1 :: (a -> a -> a) -> U1 a -> a #

toList :: U1 a -> [a] #

null :: U1 a -> Bool #

length :: U1 a -> Int #

elem :: Eq a => a -> U1 a -> Bool #

maximum :: Ord a => U1 a -> a #

minimum :: Ord a => U1 a -> a #

sum :: Num a => U1 a -> a #

product :: Num a => U1 a -> a #

Foldable (UAddr :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UAddr m -> m #

foldMap :: Monoid m => (a -> m) -> UAddr a -> m #

foldMap' :: Monoid m => (a -> m) -> UAddr a -> m #

foldr :: (a -> b -> b) -> b -> UAddr a -> b #

foldr' :: (a -> b -> b) -> b -> UAddr a -> b #

foldl :: (b -> a -> b) -> b -> UAddr a -> b #

foldl' :: (b -> a -> b) -> b -> UAddr a -> b #

foldr1 :: (a -> a -> a) -> UAddr a -> a #

foldl1 :: (a -> a -> a) -> UAddr a -> a #

toList :: UAddr a -> [a] #

null :: UAddr a -> Bool #

length :: UAddr a -> Int #

elem :: Eq a => a -> UAddr a -> Bool #

maximum :: Ord a => UAddr a -> a #

minimum :: Ord a => UAddr a -> a #

sum :: Num a => UAddr a -> a #

product :: Num a => UAddr a -> a #

Foldable (UChar :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UChar m -> m #

foldMap :: Monoid m => (a -> m) -> UChar a -> m #

foldMap' :: Monoid m => (a -> m) -> UChar a -> m #

foldr :: (a -> b -> b) -> b -> UChar a -> b #

foldr' :: (a -> b -> b) -> b -> UChar a -> b #

foldl :: (b -> a -> b) -> b -> UChar a -> b #

foldl' :: (b -> a -> b) -> b -> UChar a -> b #

foldr1 :: (a -> a -> a) -> UChar a -> a #

foldl1 :: (a -> a -> a) -> UChar a -> a #

toList :: UChar a -> [a] #

null :: UChar a -> Bool #

length :: UChar a -> Int #

elem :: Eq a => a -> UChar a -> Bool #

maximum :: Ord a => UChar a -> a #

minimum :: Ord a => UChar a -> a #

sum :: Num a => UChar a -> a #

product :: Num a => UChar a -> a #

Foldable (UDouble :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UDouble m -> m #

foldMap :: Monoid m => (a -> m) -> UDouble a -> m #

foldMap' :: Monoid m => (a -> m) -> UDouble a -> m #

foldr :: (a -> b -> b) -> b -> UDouble a -> b #

foldr' :: (a -> b -> b) -> b -> UDouble a -> b #

foldl :: (b -> a -> b) -> b -> UDouble a -> b #

foldl' :: (b -> a -> b) -> b -> UDouble a -> b #

foldr1 :: (a -> a -> a) -> UDouble a -> a #

foldl1 :: (a -> a -> a) -> UDouble a -> a #

toList :: UDouble a -> [a] #

null :: UDouble a -> Bool #

length :: UDouble a -> Int #

elem :: Eq a => a -> UDouble a -> Bool #

maximum :: Ord a => UDouble a -> a #

minimum :: Ord a => UDouble a -> a #

sum :: Num a => UDouble a -> a #

product :: Num a => UDouble a -> a #

Foldable (UFloat :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UFloat m -> m #

foldMap :: Monoid m => (a -> m) -> UFloat a -> m #

foldMap' :: Monoid m => (a -> m) -> UFloat a -> m #

foldr :: (a -> b -> b) -> b -> UFloat a -> b #

foldr' :: (a -> b -> b) -> b -> UFloat a -> b #

foldl :: (b -> a -> b) -> b -> UFloat a -> b #

foldl' :: (b -> a -> b) -> b -> UFloat a -> b #

foldr1 :: (a -> a -> a) -> UFloat a -> a #

foldl1 :: (a -> a -> a) -> UFloat a -> a #

toList :: UFloat a -> [a] #

null :: UFloat a -> Bool #

length :: UFloat a -> Int #

elem :: Eq a => a -> UFloat a -> Bool #

maximum :: Ord a => UFloat a -> a #

minimum :: Ord a => UFloat a -> a #

sum :: Num a => UFloat a -> a #

product :: Num a => UFloat a -> a #

Foldable (UInt :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UInt m -> m #

foldMap :: Monoid m => (a -> m) -> UInt a -> m #

foldMap' :: Monoid m => (a -> m) -> UInt a -> m #

foldr :: (a -> b -> b) -> b -> UInt a -> b #

foldr' :: (a -> b -> b) -> b -> UInt a -> b #

foldl :: (b -> a -> b) -> b -> UInt a -> b #

foldl' :: (b -> a -> b) -> b -> UInt a -> b #

foldr1 :: (a -> a -> a) -> UInt a -> a #

foldl1 :: (a -> a -> a) -> UInt a -> a #

toList :: UInt a -> [a] #

null :: UInt a -> Bool #

length :: UInt a -> Int #

elem :: Eq a => a -> UInt a -> Bool #

maximum :: Ord a => UInt a -> a #

minimum :: Ord a => UInt a -> a #

sum :: Num a => UInt a -> a #

product :: Num a => UInt a -> a #

Foldable (UWord :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UWord m -> m #

foldMap :: Monoid m => (a -> m) -> UWord a -> m #

foldMap' :: Monoid m => (a -> m) -> UWord a -> m #

foldr :: (a -> b -> b) -> b -> UWord a -> b #

foldr' :: (a -> b -> b) -> b -> UWord a -> b #

foldl :: (b -> a -> b) -> b -> UWord a -> b #

foldl' :: (b -> a -> b) -> b -> UWord a -> b #

foldr1 :: (a -> a -> a) -> UWord a -> a #

foldl1 :: (a -> a -> a) -> UWord a -> a #

toList :: UWord a -> [a] #

null :: UWord a -> Bool #

length :: UWord a -> Int #

elem :: Eq a => a -> UWord a -> Bool #

maximum :: Ord a => UWord a -> a #

minimum :: Ord a => UWord a -> a #

sum :: Num a => UWord a -> a #

product :: Num a => UWord a -> a #

Foldable (V1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => V1 m -> m #

foldMap :: Monoid m => (a -> m) -> V1 a -> m #

foldMap' :: Monoid m => (a -> m) -> V1 a -> m #

foldr :: (a -> b -> b) -> b -> V1 a -> b #

foldr' :: (a -> b -> b) -> b -> V1 a -> b #

foldl :: (b -> a -> b) -> b -> V1 a -> b #

foldl' :: (b -> a -> b) -> b -> V1 a -> b #

foldr1 :: (a -> a -> a) -> V1 a -> a #

foldl1 :: (a -> a -> a) -> V1 a -> a #

toList :: V1 a -> [a] #

null :: V1 a -> Bool #

length :: V1 a -> Int #

elem :: Eq a => a -> V1 a -> Bool #

maximum :: Ord a => V1 a -> a #

minimum :: Ord a => V1 a -> a #

sum :: Num a => V1 a -> a #

product :: Num a => V1 a -> a #

Foldable (Map k)

Folds in order of increasing key.

Instance details

Defined in Data.Map.Internal

Methods

fold :: Monoid m => Map k m -> m #

foldMap :: Monoid m => (a -> m) -> Map k a -> m #

foldMap' :: Monoid m => (a -> m) -> Map k a -> m #

foldr :: (a -> b -> b) -> b -> Map k a -> b #

foldr' :: (a -> b -> b) -> b -> Map k a -> b #

foldl :: (b -> a -> b) -> b -> Map k a -> b #

foldl' :: (b -> a -> b) -> b -> Map k a -> b #

foldr1 :: (a -> a -> a) -> Map k a -> a #

foldl1 :: (a -> a -> a) -> Map k a -> a #

toList :: Map k a -> [a] #

null :: Map k a -> Bool #

length :: Map k a -> Int #

elem :: Eq a => a -> Map k a -> Bool #

maximum :: Ord a => Map k a -> a #

minimum :: Ord a => Map k a -> a #

sum :: Num a => Map k a -> a #

product :: Num a => Map k a -> a #

Foldable m => Foldable (CatchT m) 
Instance details

Defined in Control.Monad.Catch.Pure

Methods

fold :: Monoid m0 => CatchT m m0 -> m0 #

foldMap :: Monoid m0 => (a -> m0) -> CatchT m a -> m0 #

foldMap' :: Monoid m0 => (a -> m0) -> CatchT m a -> m0 #

foldr :: (a -> b -> b) -> b -> CatchT m a -> b #

foldr' :: (a -> b -> b) -> b -> CatchT m a -> b #

foldl :: (b -> a -> b) -> b -> CatchT m a -> b #

foldl' :: (b -> a -> b) -> b -> CatchT m a -> b #

foldr1 :: (a -> a -> a) -> CatchT m a -> a #

foldl1 :: (a -> a -> a) -> CatchT m a -> a #

toList :: CatchT m a -> [a] #

null :: CatchT m a -> Bool #

length :: CatchT m a -> Int #

elem :: Eq a => a -> CatchT m a -> Bool #

maximum :: Ord a => CatchT m a -> a #

minimum :: Ord a => CatchT m a -> a #

sum :: Num a => CatchT m a -> a #

product :: Num a => CatchT m a -> a #

Foldable f => Foldable (Cofree f) 
Instance details

Defined in Control.Comonad.Cofree

Methods

fold :: Monoid m => Cofree f m -> m #

foldMap :: Monoid m => (a -> m) -> Cofree f a -> m #

foldMap' :: Monoid m => (a -> m) -> Cofree f a -> m #

foldr :: (a -> b -> b) -> b -> Cofree f a -> b #

foldr' :: (a -> b -> b) -> b -> Cofree f a -> b #

foldl :: (b -> a -> b) -> b -> Cofree f a -> b #

foldl' :: (b -> a -> b) -> b -> Cofree f a -> b #

foldr1 :: (a -> a -> a) -> Cofree f a -> a #

foldl1 :: (a -> a -> a) -> Cofree f a -> a #

toList :: Cofree f a -> [a] #

null :: Cofree f a -> Bool #

length :: Cofree f a -> Int #

elem :: Eq a => a -> Cofree f a -> Bool #

maximum :: Ord a => Cofree f a -> a #

minimum :: Ord a => Cofree f a -> a #

sum :: Num a => Cofree f a -> a #

product :: Num a => Cofree f a -> a #

Foldable f => Foldable (Free f) 
Instance details

Defined in Control.Monad.Free

Methods

fold :: Monoid m => Free f m -> m #

foldMap :: Monoid m => (a -> m) -> Free f a -> m #

foldMap' :: Monoid m => (a -> m) -> Free f a -> m #

foldr :: (a -> b -> b) -> b -> Free f a -> b #

foldr' :: (a -> b -> b) -> b -> Free f a -> b #

foldl :: (b -> a -> b) -> b -> Free f a -> b #

foldl' :: (b -> a -> b) -> b -> Free f a -> b #

foldr1 :: (a -> a -> a) -> Free f a -> a #

foldl1 :: (a -> a -> a) -> Free f a -> a #

toList :: Free f a -> [a] #

null :: Free f a -> Bool #

length :: Free f a -> Int #

elem :: Eq a => a -> Free f a -> Bool #

maximum :: Ord a => Free f a -> a #

minimum :: Ord a => Free f a -> a #

sum :: Num a => Free f a -> a #

product :: Num a => Free f a -> a #

Foldable (PoolMap key) 
Instance details

Defined in Data.KeyedPool

Methods

fold :: Monoid m => PoolMap key m -> m #

foldMap :: Monoid m => (a -> m) -> PoolMap key a -> m #

foldMap' :: Monoid m => (a -> m) -> PoolMap key a -> m #

foldr :: (a -> b -> b) -> b -> PoolMap key a -> b #

foldr' :: (a -> b -> b) -> b -> PoolMap key a -> b #

foldl :: (b -> a -> b) -> b -> PoolMap key a -> b #

foldl' :: (b -> a -> b) -> b -> PoolMap key a -> b #

foldr1 :: (a -> a -> a) -> PoolMap key a -> a #

foldl1 :: (a -> a -> a) -> PoolMap key a -> a #

toList :: PoolMap key a -> [a] #

null :: PoolMap key a -> Bool #

length :: PoolMap key a -> Int #

elem :: Eq a => a -> PoolMap key a -> Bool #

maximum :: Ord a => PoolMap key a -> a #

minimum :: Ord a => PoolMap key a -> a #

sum :: Num a => PoolMap key a -> a #

product :: Num a => PoolMap key a -> a #

MonoFoldable mono => Foldable (WrappedMono mono) 
Instance details

Defined in Data.MonoTraversable

Methods

fold :: Monoid m => WrappedMono mono m -> m #

foldMap :: Monoid m => (a -> m) -> WrappedMono mono a -> m #

foldMap' :: Monoid m => (a -> m) -> WrappedMono mono a -> m #

foldr :: (a -> b -> b) -> b -> WrappedMono mono a -> b #

foldr' :: (a -> b -> b) -> b -> WrappedMono mono a -> b #

foldl :: (b -> a -> b) -> b -> WrappedMono mono a -> b #

foldl' :: (b -> a -> b) -> b -> WrappedMono mono a -> b #

foldr1 :: (a -> a -> a) -> WrappedMono mono a -> a #

foldl1 :: (a -> a -> a) -> WrappedMono mono a -> a #

toList :: WrappedMono mono a -> [a] #

null :: WrappedMono mono a -> Bool #

length :: WrappedMono mono a -> Int #

elem :: Eq a => a -> WrappedMono mono a -> Bool #

maximum :: Ord a => WrappedMono mono a -> a #

minimum :: Ord a => WrappedMono mono a -> a #

sum :: Num a => WrappedMono mono a -> a #

product :: Num a => WrappedMono mono a -> a #

Foldable f => Foldable (WrappedPoly f) 
Instance details

Defined in Data.MonoTraversable

Methods

fold :: Monoid m => WrappedPoly f m -> m #

foldMap :: Monoid m => (a -> m) -> WrappedPoly f a -> m #

foldMap' :: Monoid m => (a -> m) -> WrappedPoly f a -> m #

foldr :: (a -> b -> b) -> b -> WrappedPoly f a -> b #

foldr' :: (a -> b -> b) -> b -> WrappedPoly f a -> b #

foldl :: (b -> a -> b) -> b -> WrappedPoly f a -> b #

foldl' :: (b -> a -> b) -> b -> WrappedPoly f a -> b #

foldr1 :: (a -> a -> a) -> WrappedPoly f a -> a #

foldl1 :: (a -> a -> a) -> WrappedPoly f a -> a #

toList :: WrappedPoly f a -> [a] #

null :: WrappedPoly f a -> Bool #

length :: WrappedPoly f a -> Int #

elem :: Eq a => a -> WrappedPoly f a -> Bool #

maximum :: Ord a => WrappedPoly f a -> a #

minimum :: Ord a => WrappedPoly f a -> a #

sum :: Num a => WrappedPoly f a -> a #

product :: Num a => WrappedPoly f a -> a #

Foldable (Either e) 
Instance details

Defined in Data.Strict.Either

Methods

fold :: Monoid m => Either e m -> m #

foldMap :: Monoid m => (a -> m) -> Either e a -> m #

foldMap' :: Monoid m => (a -> m) -> Either e a -> m #

foldr :: (a -> b -> b) -> b -> Either e a -> b #

foldr' :: (a -> b -> b) -> b -> Either e a -> b #

foldl :: (b -> a -> b) -> b -> Either e a -> b #

foldl' :: (b -> a -> b) -> b -> Either e a -> b #

foldr1 :: (a -> a -> a) -> Either e a -> a #

foldl1 :: (a -> a -> a) -> Either e a -> a #

toList :: Either e a -> [a] #

null :: Either e a -> Bool #

length :: Either e a -> Int #

elem :: Eq a => a -> Either e a -> Bool #

maximum :: Ord a => Either e a -> a #

minimum :: Ord a => Either e a -> a #

sum :: Num a => Either e a -> a #

product :: Num a => Either e a -> a #

Foldable (These a) 
Instance details

Defined in Data.Strict.These

Methods

fold :: Monoid m => These a m -> m #

foldMap :: Monoid m => (a0 -> m) -> These a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> These a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> These a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> These a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> These a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> These a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> These a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> These a a0 -> a0 #

toList :: These a a0 -> [a0] #

null :: These a a0 -> Bool #

length :: These a a0 -> Int #

elem :: Eq a0 => a0 -> These a a0 -> Bool #

maximum :: Ord a0 => These a a0 -> a0 #

minimum :: Ord a0 => These a a0 -> a0 #

sum :: Num a0 => These a a0 -> a0 #

product :: Num a0 => These a a0 -> a0 #

Foldable (Pair e) 
Instance details

Defined in Data.Strict.Tuple

Methods

fold :: Monoid m => Pair e m -> m #

foldMap :: Monoid m => (a -> m) -> Pair e a -> m #

foldMap' :: Monoid m => (a -> m) -> Pair e a -> m #

foldr :: (a -> b -> b) -> b -> Pair e a -> b #

foldr' :: (a -> b -> b) -> b -> Pair e a -> b #

foldl :: (b -> a -> b) -> b -> Pair e a -> b #

foldl' :: (b -> a -> b) -> b -> Pair e a -> b #

foldr1 :: (a -> a -> a) -> Pair e a -> a #

foldl1 :: (a -> a -> a) -> Pair e a -> a #

toList :: Pair e a -> [a] #

null :: Pair e a -> Bool #

length :: Pair e a -> Int #

elem :: Eq a => a -> Pair e a -> Bool #

maximum :: Ord a => Pair e a -> a #

minimum :: Ord a => Pair e a -> a #

sum :: Num a => Pair e a -> a #

product :: Num a => Pair e a -> a #

Foldable (These a) 
Instance details

Defined in Data.These

Methods

fold :: Monoid m => These a m -> m #

foldMap :: Monoid m => (a0 -> m) -> These a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> These a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> These a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> These a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> These a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> These a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> These a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> These a a0 -> a0 #

toList :: These a a0 -> [a0] #

null :: These a a0 -> Bool #

length :: These a a0 -> Int #

elem :: Eq a0 => a0 -> These a a0 -> Bool #

maximum :: Ord a0 => These a a0 -> a0 #

minimum :: Ord a0 => These a a0 -> a0 #

sum :: Num a0 => These a a0 -> a0 #

product :: Num a0 => These a a0 -> a0 #

Foldable f => Foldable (Lift f) 
Instance details

Defined in Control.Applicative.Lift

Methods

fold :: Monoid m => Lift f m -> m #

foldMap :: Monoid m => (a -> m) -> Lift f a -> m #

foldMap' :: Monoid m => (a -> m) -> Lift f a -> m #

foldr :: (a -> b -> b) -> b -> Lift f a -> b #

foldr' :: (a -> b -> b) -> b -> Lift f a -> b #

foldl :: (b -> a -> b) -> b -> Lift f a -> b #

foldl' :: (b -> a -> b) -> b -> Lift f a -> b #

foldr1 :: (a -> a -> a) -> Lift f a -> a #

foldl1 :: (a -> a -> a) -> Lift f a -> a #

toList :: Lift f a -> [a] #

null :: Lift f a -> Bool #

length :: Lift f a -> Int #

elem :: Eq a => a -> Lift f a -> Bool #

maximum :: Ord a => Lift f a -> a #

minimum :: Ord a => Lift f a -> a #

sum :: Num a => Lift f a -> a #

product :: Num a => Lift f a -> a #

Foldable f => Foldable (MaybeT f) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

fold :: Monoid m => MaybeT f m -> m #

foldMap :: Monoid m => (a -> m) -> MaybeT f a -> m #

foldMap' :: Monoid m => (a -> m) -> MaybeT f a -> m #

foldr :: (a -> b -> b) -> b -> MaybeT f a -> b #

foldr' :: (a -> b -> b) -> b -> MaybeT f a -> b #

foldl :: (b -> a -> b) -> b -> MaybeT f a -> b #

foldl' :: (b -> a -> b) -> b -> MaybeT f a -> b #

foldr1 :: (a -> a -> a) -> MaybeT f a -> a #

foldl1 :: (a -> a -> a) -> MaybeT f a -> a #

toList :: MaybeT f a -> [a] #

null :: MaybeT f a -> Bool #

length :: MaybeT f a -> Int #

elem :: Eq a => a -> MaybeT f a -> Bool #

maximum :: Ord a => MaybeT f a -> a #

minimum :: Ord a => MaybeT f a -> a #

sum :: Num a => MaybeT f a -> a #

product :: Num a => MaybeT f a -> a #

Foldable (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

fold :: Monoid m => HashMap k m -> m #

foldMap :: Monoid m => (a -> m) -> HashMap k a -> m #

foldMap' :: Monoid m => (a -> m) -> HashMap k a -> m #

foldr :: (a -> b -> b) -> b -> HashMap k a -> b #

foldr' :: (a -> b -> b) -> b -> HashMap k a -> b #

foldl :: (b -> a -> b) -> b -> HashMap k a -> b #

foldl' :: (b -> a -> b) -> b -> HashMap k a -> b #

foldr1 :: (a -> a -> a) -> HashMap k a -> a #

foldl1 :: (a -> a -> a) -> HashMap k a -> a #

toList :: HashMap k a -> [a] #

null :: HashMap k a -> Bool #

length :: HashMap k a -> Int #

elem :: Eq a => a -> HashMap k a -> Bool #

maximum :: Ord a => HashMap k a -> a #

minimum :: Ord a => HashMap k a -> a #

sum :: Num a => HashMap k a -> a #

product :: Num a => HashMap k a -> a #

Foldable ((,) a)

Since: base-4.7.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => (a, m) -> m #

foldMap :: Monoid m => (a0 -> m) -> (a, a0) -> m #

foldMap' :: Monoid m => (a0 -> m) -> (a, a0) -> m #

foldr :: (a0 -> b -> b) -> b -> (a, a0) -> b #

foldr' :: (a0 -> b -> b) -> b -> (a, a0) -> b #

foldl :: (b -> a0 -> b) -> b -> (a, a0) -> b #

foldl' :: (b -> a0 -> b) -> b -> (a, a0) -> b #

foldr1 :: (a0 -> a0 -> a0) -> (a, a0) -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> (a, a0) -> a0 #

toList :: (a, a0) -> [a0] #

null :: (a, a0) -> Bool #

length :: (a, a0) -> Int #

elem :: Eq a0 => a0 -> (a, a0) -> Bool #

maximum :: Ord a0 => (a, a0) -> a0 #

minimum :: Ord a0 => (a, a0) -> a0 #

sum :: Num a0 => (a, a0) -> a0 #

product :: Num a0 => (a, a0) -> a0 #

Foldable (Const m :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Functor.Const

Methods

fold :: Monoid m0 => Const m m0 -> m0 #

foldMap :: Monoid m0 => (a -> m0) -> Const m a -> m0 #

foldMap' :: Monoid m0 => (a -> m0) -> Const m a -> m0 #

foldr :: (a -> b -> b) -> b -> Const m a -> b #

foldr' :: (a -> b -> b) -> b -> Const m a -> b #

foldl :: (b -> a -> b) -> b -> Const m a -> b #

foldl' :: (b -> a -> b) -> b -> Const m a -> b #

foldr1 :: (a -> a -> a) -> Const m a -> a #

foldl1 :: (a -> a -> a) -> Const m a -> a #

toList :: Const m a -> [a] #

null :: Const m a -> Bool #

length :: Const m a -> Int #

elem :: Eq a => a -> Const m a -> Bool #

maximum :: Ord a => Const m a -> a #

minimum :: Ord a => Const m a -> a #

sum :: Num a => Const m a -> a #

product :: Num a => Const m a -> a #

Foldable f => Foldable (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Ap f m -> m #

foldMap :: Monoid m => (a -> m) -> Ap f a -> m #

foldMap' :: Monoid m => (a -> m) -> Ap f a -> m #

foldr :: (a -> b -> b) -> b -> Ap f a -> b #

foldr' :: (a -> b -> b) -> b -> Ap f a -> b #

foldl :: (b -> a -> b) -> b -> Ap f a -> b #

foldl' :: (b -> a -> b) -> b -> Ap f a -> b #

foldr1 :: (a -> a -> a) -> Ap f a -> a #

foldl1 :: (a -> a -> a) -> Ap f a -> a #

toList :: Ap f a -> [a] #

null :: Ap f a -> Bool #

length :: Ap f a -> Int #

elem :: Eq a => a -> Ap f a -> Bool #

maximum :: Ord a => Ap f a -> a #

minimum :: Ord a => Ap f a -> a #

sum :: Num a => Ap f a -> a #

product :: Num a => Ap f a -> a #

Foldable f => Foldable (Alt f)

Since: base-4.12.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Alt f m -> m #

foldMap :: Monoid m => (a -> m) -> Alt f a -> m #

foldMap' :: Monoid m => (a -> m) -> Alt f a -> m #

foldr :: (a -> b -> b) -> b -> Alt f a -> b #

foldr' :: (a -> b -> b) -> b -> Alt f a -> b #

foldl :: (b -> a -> b) -> b -> Alt f a -> b #

foldl' :: (b -> a -> b) -> b -> Alt f a -> b #

foldr1 :: (a -> a -> a) -> Alt f a -> a #

foldl1 :: (a -> a -> a) -> Alt f a -> a #

toList :: Alt f a -> [a] #

null :: Alt f a -> Bool #

length :: Alt f a -> Int #

elem :: Eq a => a -> Alt f a -> Bool #

maximum :: Ord a => Alt f a -> a #

minimum :: Ord a => Alt f a -> a #

sum :: Num a => Alt f a -> a #

product :: Num a => Alt f a -> a #

Foldable f => Foldable (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Rec1 f m -> m #

foldMap :: Monoid m => (a -> m) -> Rec1 f a -> m #

foldMap' :: Monoid m => (a -> m) -> Rec1 f a -> m #

foldr :: (a -> b -> b) -> b -> Rec1 f a -> b #

foldr' :: (a -> b -> b) -> b -> Rec1 f a -> b #

foldl :: (b -> a -> b) -> b -> Rec1 f a -> b #

foldl' :: (b -> a -> b) -> b -> Rec1 f a -> b #

foldr1 :: (a -> a -> a) -> Rec1 f a -> a #

foldl1 :: (a -> a -> a) -> Rec1 f a -> a #

toList :: Rec1 f a -> [a] #

null :: Rec1 f a -> Bool #

length :: Rec1 f a -> Int #

elem :: Eq a => a -> Rec1 f a -> Bool #

maximum :: Ord a => Rec1 f a -> a #

minimum :: Ord a => Rec1 f a -> a #

sum :: Num a => Rec1 f a -> a #

product :: Num a => Rec1 f a -> a #

Bifoldable p => Foldable (Join p) 
Instance details

Defined in Data.Bifunctor.Join

Methods

fold :: Monoid m => Join p m -> m #

foldMap :: Monoid m => (a -> m) -> Join p a -> m #

foldMap' :: Monoid m => (a -> m) -> Join p a -> m #

foldr :: (a -> b -> b) -> b -> Join p a -> b #

foldr' :: (a -> b -> b) -> b -> Join p a -> b #

foldl :: (b -> a -> b) -> b -> Join p a -> b #

foldl' :: (b -> a -> b) -> b -> Join p a -> b #

foldr1 :: (a -> a -> a) -> Join p a -> a #

foldl1 :: (a -> a -> a) -> Join p a -> a #

toList :: Join p a -> [a] #

null :: Join p a -> Bool #

length :: Join p a -> Int #

elem :: Eq a => a -> Join p a -> Bool #

maximum :: Ord a => Join p a -> a #

minimum :: Ord a => Join p a -> a #

sum :: Num a => Join p a -> a #

product :: Num a => Join p a -> a #

Foldable f => Foldable (FreeF f a) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

fold :: Monoid m => FreeF f a m -> m #

foldMap :: Monoid m => (a0 -> m) -> FreeF f a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> FreeF f a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> FreeF f a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> FreeF f a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> FreeF f a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> FreeF f a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> FreeF f a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> FreeF f a a0 -> a0 #

toList :: FreeF f a a0 -> [a0] #

null :: FreeF f a a0 -> Bool #

length :: FreeF f a a0 -> Int #

elem :: Eq a0 => a0 -> FreeF f a a0 -> Bool #

maximum :: Ord a0 => FreeF f a a0 -> a0 #

minimum :: Ord a0 => FreeF f a a0 -> a0 #

sum :: Num a0 => FreeF f a a0 -> a0 #

product :: Num a0 => FreeF f a a0 -> a0 #

(Foldable m, Foldable f) => Foldable (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

fold :: Monoid m0 => FreeT f m m0 -> m0 #

foldMap :: Monoid m0 => (a -> m0) -> FreeT f m a -> m0 #

foldMap' :: Monoid m0 => (a -> m0) -> FreeT f m a -> m0 #

foldr :: (a -> b -> b) -> b -> FreeT f m a -> b #

foldr' :: (a -> b -> b) -> b -> FreeT f m a -> b #

foldl :: (b -> a -> b) -> b -> FreeT f m a -> b #

foldl' :: (b -> a -> b) -> b -> FreeT f m a -> b #

foldr1 :: (a -> a -> a) -> FreeT f m a -> a #

foldl1 :: (a -> a -> a) -> FreeT f m a -> a #

toList :: FreeT f m a -> [a] #

null :: FreeT f m a -> Bool #

length :: FreeT f m a -> Int #

elem :: Eq a => a -> FreeT f m a -> Bool #

maximum :: Ord a => FreeT f m a -> a #

minimum :: Ord a => FreeT f m a -> a #

sum :: Num a => FreeT f m a -> a #

product :: Num a => FreeT f m a -> a #

Foldable (Tagged s) 
Instance details

Defined in Data.Tagged

Methods

fold :: Monoid m => Tagged s m -> m #

foldMap :: Monoid m => (a -> m) -> Tagged s a -> m #

foldMap' :: Monoid m => (a -> m) -> Tagged s a -> m #

foldr :: (a -> b -> b) -> b -> Tagged s a -> b #

foldr' :: (a -> b -> b) -> b -> Tagged s a -> b #

foldl :: (b -> a -> b) -> b -> Tagged s a -> b #

foldl' :: (b -> a -> b) -> b -> Tagged s a -> b #

foldr1 :: (a -> a -> a) -> Tagged s a -> a #

foldl1 :: (a -> a -> a) -> Tagged s a -> a #

toList :: Tagged s a -> [a] #

null :: Tagged s a -> Bool #

length :: Tagged s a -> Int #

elem :: Eq a => a -> Tagged s a -> Bool #

maximum :: Ord a => Tagged s a -> a #

minimum :: Ord a => Tagged s a -> a #

sum :: Num a => Tagged s a -> a #

product :: Num a => Tagged s a -> a #

(Foldable f, Foldable g) => Foldable (These1 f g) 
Instance details

Defined in Data.Functor.These

Methods

fold :: Monoid m => These1 f g m -> m #

foldMap :: Monoid m => (a -> m) -> These1 f g a -> m #

foldMap' :: Monoid m => (a -> m) -> These1 f g a -> m #

foldr :: (a -> b -> b) -> b -> These1 f g a -> b #

foldr' :: (a -> b -> b) -> b -> These1 f g a -> b #

foldl :: (b -> a -> b) -> b -> These1 f g a -> b #

foldl' :: (b -> a -> b) -> b -> These1 f g a -> b #

foldr1 :: (a -> a -> a) -> These1 f g a -> a #

foldl1 :: (a -> a -> a) -> These1 f g a -> a #

toList :: These1 f g a -> [a] #

null :: These1 f g a -> Bool #

length :: These1 f g a -> Int #

elem :: Eq a => a -> These1 f g a -> Bool #

maximum :: Ord a => These1 f g a -> a #

minimum :: Ord a => These1 f g a -> a #

sum :: Num a => These1 f g a -> a #

product :: Num a => These1 f g a -> a #

Foldable f => Foldable (Backwards f)

Derived instance.

Instance details

Defined in Control.Applicative.Backwards

Methods

fold :: Monoid m => Backwards f m -> m #

foldMap :: Monoid m => (a -> m) -> Backwards f a -> m #

foldMap' :: Monoid m => (a -> m) -> Backwards f a -> m #

foldr :: (a -> b -> b) -> b -> Backwards f a -> b #

foldr' :: (a -> b -> b) -> b -> Backwards f a -> b #

foldl :: (b -> a -> b) -> b -> Backwards f a -> b #

foldl' :: (b -> a -> b) -> b -> Backwards f a -> b #

foldr1 :: (a -> a -> a) -> Backwards f a -> a #

foldl1 :: (a -> a -> a) -> Backwards f a -> a #

toList :: Backwards f a -> [a] #

null :: Backwards f a -> Bool #

length :: Backwards f a -> Int #

elem :: Eq a => a -> Backwards f a -> Bool #

maximum :: Ord a => Backwards f a -> a #

minimum :: Ord a => Backwards f a -> a #

sum :: Num a => Backwards f a -> a #

product :: Num a => Backwards f a -> a #

Foldable f => Foldable (ExceptT e f) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

fold :: Monoid m => ExceptT e f m -> m #

foldMap :: Monoid m => (a -> m) -> ExceptT e f a -> m #

foldMap' :: Monoid m => (a -> m) -> ExceptT e f a -> m #

foldr :: (a -> b -> b) -> b -> ExceptT e f a -> b #

foldr' :: (a -> b -> b) -> b -> ExceptT e f a -> b #

foldl :: (b -> a -> b) -> b -> ExceptT e f a -> b #

foldl' :: (b -> a -> b) -> b -> ExceptT e f a -> b #

foldr1 :: (a -> a -> a) -> ExceptT e f a -> a #

foldl1 :: (a -> a -> a) -> ExceptT e f a -> a #

toList :: ExceptT e f a -> [a] #

null :: ExceptT e f a -> Bool #

length :: ExceptT e f a -> Int #

elem :: Eq a => a -> ExceptT e f a -> Bool #

maximum :: Ord a => ExceptT e f a -> a #

minimum :: Ord a => ExceptT e f a -> a #

sum :: Num a => ExceptT e f a -> a #

product :: Num a => ExceptT e f a -> a #

Foldable f => Foldable (IdentityT f) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

fold :: Monoid m => IdentityT f m -> m #

foldMap :: Monoid m => (a -> m) -> IdentityT f a -> m #

foldMap' :: Monoid m => (a -> m) -> IdentityT f a -> m #

foldr :: (a -> b -> b) -> b -> IdentityT f a -> b #

foldr' :: (a -> b -> b) -> b -> IdentityT f a -> b #

foldl :: (b -> a -> b) -> b -> IdentityT f a -> b #

foldl' :: (b -> a -> b) -> b -> IdentityT f a -> b #

foldr1 :: (a -> a -> a) -> IdentityT f a -> a #

foldl1 :: (a -> a -> a) -> IdentityT f a -> a #

toList :: IdentityT f a -> [a] #

null :: IdentityT f a -> Bool #

length :: IdentityT f a -> Int #

elem :: Eq a => a -> IdentityT f a -> Bool #

maximum :: Ord a => IdentityT f a -> a #

minimum :: Ord a => IdentityT f a -> a #

sum :: Num a => IdentityT f a -> a #

product :: Num a => IdentityT f a -> a #

Foldable f => Foldable (WriterT w f) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

fold :: Monoid m => WriterT w f m -> m #

foldMap :: Monoid m => (a -> m) -> WriterT w f a -> m #

foldMap' :: Monoid m => (a -> m) -> WriterT w f a -> m #

foldr :: (a -> b -> b) -> b -> WriterT w f a -> b #

foldr' :: (a -> b -> b) -> b -> WriterT w f a -> b #

foldl :: (b -> a -> b) -> b -> WriterT w f a -> b #

foldl' :: (b -> a -> b) -> b -> WriterT w f a -> b #

foldr1 :: (a -> a -> a) -> WriterT w f a -> a #

foldl1 :: (a -> a -> a) -> WriterT w f a -> a #

toList :: WriterT w f a -> [a] #

null :: WriterT w f a -> Bool #

length :: WriterT w f a -> Int #

elem :: Eq a => a -> WriterT w f a -> Bool #

maximum :: Ord a => WriterT w f a -> a #

minimum :: Ord a => WriterT w f a -> a #

sum :: Num a => WriterT w f a -> a #

product :: Num a => WriterT w f a -> a #

Foldable f => Foldable (WriterT w f) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

fold :: Monoid m => WriterT w f m -> m #

foldMap :: Monoid m => (a -> m) -> WriterT w f a -> m #

foldMap' :: Monoid m => (a -> m) -> WriterT w f a -> m #

foldr :: (a -> b -> b) -> b -> WriterT w f a -> b #

foldr' :: (a -> b -> b) -> b -> WriterT w f a -> b #

foldl :: (b -> a -> b) -> b -> WriterT w f a -> b #

foldl' :: (b -> a -> b) -> b -> WriterT w f a -> b #

foldr1 :: (a -> a -> a) -> WriterT w f a -> a #

foldl1 :: (a -> a -> a) -> WriterT w f a -> a #

toList :: WriterT w f a -> [a] #

null :: WriterT w f a -> Bool #

length :: WriterT w f a -> Int #

elem :: Eq a => a -> WriterT w f a -> Bool #

maximum :: Ord a => WriterT w f a -> a #

minimum :: Ord a => WriterT w f a -> a #

sum :: Num a => WriterT w f a -> a #

product :: Num a => WriterT w f a -> a #

Foldable (Constant a :: Type -> Type) 
Instance details

Defined in Data.Functor.Constant

Methods

fold :: Monoid m => Constant a m -> m #

foldMap :: Monoid m => (a0 -> m) -> Constant a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> Constant a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> Constant a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> Constant a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> Constant a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> Constant a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> Constant a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> Constant a a0 -> a0 #

toList :: Constant a a0 -> [a0] #

null :: Constant a a0 -> Bool #

length :: Constant a a0 -> Int #

elem :: Eq a0 => a0 -> Constant a a0 -> Bool #

maximum :: Ord a0 => Constant a a0 -> a0 #

minimum :: Ord a0 => Constant a a0 -> a0 #

sum :: Num a0 => Constant a a0 -> a0 #

product :: Num a0 => Constant a a0 -> a0 #

Foldable f => Foldable (Reverse f)

Fold from right to left.

Instance details

Defined in Data.Functor.Reverse

Methods

fold :: Monoid m => Reverse f m -> m #

foldMap :: Monoid m => (a -> m) -> Reverse f a -> m #

foldMap' :: Monoid m => (a -> m) -> Reverse f a -> m #

foldr :: (a -> b -> b) -> b -> Reverse f a -> b #

foldr' :: (a -> b -> b) -> b -> Reverse f a -> b #

foldl :: (b -> a -> b) -> b -> Reverse f a -> b #

foldl' :: (b -> a -> b) -> b -> Reverse f a -> b #

foldr1 :: (a -> a -> a) -> Reverse f a -> a #

foldl1 :: (a -> a -> a) -> Reverse f a -> a #

toList :: Reverse f a -> [a] #

null :: Reverse f a -> Bool #

length :: Reverse f a -> Int #

elem :: Eq a => a -> Reverse f a -> Bool #

maximum :: Ord a => Reverse f a -> a #

minimum :: Ord a => Reverse f a -> a #

sum :: Num a => Reverse f a -> a #

product :: Num a => Reverse f a -> a #

(Foldable f, Foldable g) => Foldable (Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

fold :: Monoid m => Product f g m -> m #

foldMap :: Monoid m => (a -> m) -> Product f g a -> m #

foldMap' :: Monoid m => (a -> m) -> Product f g a -> m #

foldr :: (a -> b -> b) -> b -> Product f g a -> b #

foldr' :: (a -> b -> b) -> b -> Product f g a -> b #

foldl :: (b -> a -> b) -> b -> Product f g a -> b #

foldl' :: (b -> a -> b) -> b -> Product f g a -> b #

foldr1 :: (a -> a -> a) -> Product f g a -> a #

foldl1 :: (a -> a -> a) -> Product f g a -> a #

toList :: Product f g a -> [a] #

null :: Product f g a -> Bool #

length :: Product f g a -> Int #

elem :: Eq a => a -> Product f g a -> Bool #

maximum :: Ord a => Product f g a -> a #

minimum :: Ord a => Product f g a -> a #

sum :: Num a => Product f g a -> a #

product :: Num a => Product f g a -> a #

(Foldable f, Foldable g) => Foldable (Sum f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

Methods

fold :: Monoid m => Sum f g m -> m #

foldMap :: Monoid m => (a -> m) -> Sum f g a -> m #

foldMap' :: Monoid m => (a -> m) -> Sum f g a -> m #

foldr :: (a -> b -> b) -> b -> Sum f g a -> b #

foldr' :: (a -> b -> b) -> b -> Sum f g a -> b #

foldl :: (b -> a -> b) -> b -> Sum f g a -> b #

foldl' :: (b -> a -> b) -> b -> Sum f g a -> b #

foldr1 :: (a -> a -> a) -> Sum f g a -> a #

foldl1 :: (a -> a -> a) -> Sum f g a -> a #

toList :: Sum f g a -> [a] #

null :: Sum f g a -> Bool #

length :: Sum f g a -> Int #

elem :: Eq a => a -> Sum f g a -> Bool #

maximum :: Ord a => Sum f g a -> a #

minimum :: Ord a => Sum f g a -> a #

sum :: Num a => Sum f g a -> a #

product :: Num a => Sum f g a -> a #

(Foldable f, Foldable g) => Foldable (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => (f :*: g) m -> m #

foldMap :: Monoid m => (a -> m) -> (f :*: g) a -> m #

foldMap' :: Monoid m => (a -> m) -> (f :*: g) a -> m #

foldr :: (a -> b -> b) -> b -> (f :*: g) a -> b #

foldr' :: (a -> b -> b) -> b -> (f :*: g) a -> b #

foldl :: (b -> a -> b) -> b -> (f :*: g) a -> b #

foldl' :: (b -> a -> b) -> b -> (f :*: g) a -> b #

foldr1 :: (a -> a -> a) -> (f :*: g) a -> a #

foldl1 :: (a -> a -> a) -> (f :*: g) a -> a #

toList :: (f :*: g) a -> [a] #

null :: (f :*: g) a -> Bool #

length :: (f :*: g) a -> Int #

elem :: Eq a => a -> (f :*: g) a -> Bool #

maximum :: Ord a => (f :*: g) a -> a #

minimum :: Ord a => (f :*: g) a -> a #

sum :: Num a => (f :*: g) a -> a #

product :: Num a => (f :*: g) a -> a #

(Foldable f, Foldable g) => Foldable (f :+: g)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => (f :+: g) m -> m #

foldMap :: Monoid m => (a -> m) -> (f :+: g) a -> m #

foldMap' :: Monoid m => (a -> m) -> (f :+: g) a -> m #

foldr :: (a -> b -> b) -> b -> (f :+: g) a -> b #

foldr' :: (a -> b -> b) -> b -> (f :+: g) a -> b #

foldl :: (b -> a -> b) -> b -> (f :+: g) a -> b #

foldl' :: (b -> a -> b) -> b -> (f :+: g) a -> b #

foldr1 :: (a -> a -> a) -> (f :+: g) a -> a #

foldl1 :: (a -> a -> a) -> (f :+: g) a -> a #

toList :: (f :+: g) a -> [a] #

null :: (f :+: g) a -> Bool #

length :: (f :+: g) a -> Int #

elem :: Eq a => a -> (f :+: g) a -> Bool #

maximum :: Ord a => (f :+: g) a -> a #

minimum :: Ord a => (f :+: g) a -> a #

sum :: Num a => (f :+: g) a -> a #

product :: Num a => (f :+: g) a -> a #

Foldable (K1 i c :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => K1 i c m -> m #

foldMap :: Monoid m => (a -> m) -> K1 i c a -> m #

foldMap' :: Monoid m => (a -> m) -> K1 i c a -> m #

foldr :: (a -> b -> b) -> b -> K1 i c a -> b #

foldr' :: (a -> b -> b) -> b -> K1 i c a -> b #

foldl :: (b -> a -> b) -> b -> K1 i c a -> b #

foldl' :: (b -> a -> b) -> b -> K1 i c a -> b #

foldr1 :: (a -> a -> a) -> K1 i c a -> a #

foldl1 :: (a -> a -> a) -> K1 i c a -> a #

toList :: K1 i c a -> [a] #

null :: K1 i c a -> Bool #

length :: K1 i c a -> Int #

elem :: Eq a => a -> K1 i c a -> Bool #

maximum :: Ord a => K1 i c a -> a #

minimum :: Ord a => K1 i c a -> a #

sum :: Num a => K1 i c a -> a #

product :: Num a => K1 i c a -> a #

(Foldable f, Foldable g) => Foldable (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

fold :: Monoid m => Compose f g m -> m #

foldMap :: Monoid m => (a -> m) -> Compose f g a -> m #

foldMap' :: Monoid m => (a -> m) -> Compose f g a -> m #

foldr :: (a -> b -> b) -> b -> Compose f g a -> b #

foldr' :: (a -> b -> b) -> b -> Compose f g a -> b #

foldl :: (b -> a -> b) -> b -> Compose f g a -> b #

foldl' :: (b -> a -> b) -> b -> Compose f g a -> b #

foldr1 :: (a -> a -> a) -> Compose f g a -> a #

foldl1 :: (a -> a -> a) -> Compose f g a -> a #

toList :: Compose f g a -> [a] #

null :: Compose f g a -> Bool #

length :: Compose f g a -> Int #

elem :: Eq a => a -> Compose f g a -> Bool #

maximum :: Ord a => Compose f g a -> a #

minimum :: Ord a => Compose f g a -> a #

sum :: Num a => Compose f g a -> a #

product :: Num a => Compose f g a -> a #

(Foldable f, Foldable g) => Foldable (f :.: g)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => (f :.: g) m -> m #

foldMap :: Monoid m => (a -> m) -> (f :.: g) a -> m #

foldMap' :: Monoid m => (a -> m) -> (f :.: g) a -> m #

foldr :: (a -> b -> b) -> b -> (f :.: g) a -> b #

foldr' :: (a -> b -> b) -> b -> (f :.: g) a -> b #

foldl :: (b -> a -> b) -> b -> (f :.: g) a -> b #

foldl' :: (b -> a -> b) -> b -> (f :.: g) a -> b #

foldr1 :: (a -> a -> a) -> (f :.: g) a -> a #

foldl1 :: (a -> a -> a) -> (f :.: g) a -> a #

toList :: (f :.: g) a -> [a] #

null :: (f :.: g) a -> Bool #

length :: (f :.: g) a -> Int #

elem :: Eq a => a -> (f :.: g) a -> Bool #

maximum :: Ord a => (f :.: g) a -> a #

minimum :: Ord a => (f :.: g) a -> a #

sum :: Num a => (f :.: g) a -> a #

product :: Num a => (f :.: g) a -> a #

Foldable f => Foldable (M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => M1 i c f m -> m #

foldMap :: Monoid m => (a -> m) -> M1 i c f a -> m #

foldMap' :: Monoid m => (a -> m) -> M1 i c f a -> m #

foldr :: (a -> b -> b) -> b -> M1 i c f a -> b #

foldr' :: (a -> b -> b) -> b -> M1 i c f a -> b #

foldl :: (b -> a -> b) -> b -> M1 i c f a -> b #

foldl' :: (b -> a -> b) -> b -> M1 i c f a -> b #

foldr1 :: (a -> a -> a) -> M1 i c f a -> a #

foldl1 :: (a -> a -> a) -> M1 i c f a -> a #

toList :: M1 i c f a -> [a] #

null :: M1 i c f a -> Bool #

length :: M1 i c f a -> Int #

elem :: Eq a => a -> M1 i c f a -> Bool #

maximum :: Ord a => M1 i c f a -> a #

minimum :: Ord a => M1 i c f a -> a #

sum :: Num a => M1 i c f a -> a #

product :: Num a => M1 i c f a -> a #

Foldable (Clown f a :: Type -> Type) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

fold :: Monoid m => Clown f a m -> m #

foldMap :: Monoid m => (a0 -> m) -> Clown f a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> Clown f a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> Clown f a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> Clown f a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> Clown f a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> Clown f a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> Clown f a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> Clown f a a0 -> a0 #

toList :: Clown f a a0 -> [a0] #

null :: Clown f a a0 -> Bool #

length :: Clown f a a0 -> Int #

elem :: Eq a0 => a0 -> Clown f a a0 -> Bool #

maximum :: Ord a0 => Clown f a a0 -> a0 #

minimum :: Ord a0 => Clown f a a0 -> a0 #

sum :: Num a0 => Clown f a a0 -> a0 #

product :: Num a0 => Clown f a a0 -> a0 #

Bifoldable p => Foldable (Flip p a) 
Instance details

Defined in Data.Bifunctor.Flip

Methods

fold :: Monoid m => Flip p a m -> m #

foldMap :: Monoid m => (a0 -> m) -> Flip p a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> Flip p a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> Flip p a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> Flip p a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> Flip p a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> Flip p a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> Flip p a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> Flip p a a0 -> a0 #

toList :: Flip p a a0 -> [a0] #

null :: Flip p a a0 -> Bool #

length :: Flip p a a0 -> Int #

elem :: Eq a0 => a0 -> Flip p a a0 -> Bool #

maximum :: Ord a0 => Flip p a a0 -> a0 #

minimum :: Ord a0 => Flip p a a0 -> a0 #

sum :: Num a0 => Flip p a a0 -> a0 #

product :: Num a0 => Flip p a a0 -> a0 #

Foldable g => Foldable (Joker g a) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

fold :: Monoid m => Joker g a m -> m #

foldMap :: Monoid m => (a0 -> m) -> Joker g a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> Joker g a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> Joker g a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> Joker g a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> Joker g a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> Joker g a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> Joker g a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> Joker g a a0 -> a0 #

toList :: Joker g a a0 -> [a0] #

null :: Joker g a a0 -> Bool #

length :: Joker g a a0 -> Int #

elem :: Eq a0 => a0 -> Joker g a a0 -> Bool #

maximum :: Ord a0 => Joker g a a0 -> a0 #

minimum :: Ord a0 => Joker g a a0 -> a0 #

sum :: Num a0 => Joker g a a0 -> a0 #

product :: Num a0 => Joker g a a0 -> a0 #

Bifoldable p => Foldable (WrappedBifunctor p a) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

fold :: Monoid m => WrappedBifunctor p a m -> m #

foldMap :: Monoid m => (a0 -> m) -> WrappedBifunctor p a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> WrappedBifunctor p a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> WrappedBifunctor p a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> WrappedBifunctor p a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> WrappedBifunctor p a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> WrappedBifunctor p a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> WrappedBifunctor p a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> WrappedBifunctor p a a0 -> a0 #

toList :: WrappedBifunctor p a a0 -> [a0] #

null :: WrappedBifunctor p a a0 -> Bool #

length :: WrappedBifunctor p a a0 -> Int #

elem :: Eq a0 => a0 -> WrappedBifunctor p a a0 -> Bool #

maximum :: Ord a0 => WrappedBifunctor p a a0 -> a0 #

minimum :: Ord a0 => WrappedBifunctor p a a0 -> a0 #

sum :: Num a0 => WrappedBifunctor p a a0 -> a0 #

product :: Num a0 => WrappedBifunctor p a a0 -> a0 #

(Foldable (f a), Foldable (g a)) => Foldable (Product f g a) 
Instance details

Defined in Data.Bifunctor.Product

Methods

fold :: Monoid m => Product f g a m -> m #

foldMap :: Monoid m => (a0 -> m) -> Product f g a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> Product f g a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> Product f g a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> Product f g a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> Product f g a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> Product f g a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> Product f g a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> Product f g a a0 -> a0 #

toList :: Product f g a a0 -> [a0] #

null :: Product f g a a0 -> Bool #

length :: Product f g a a0 -> Int #

elem :: Eq a0 => a0 -> Product f g a a0 -> Bool #

maximum :: Ord a0 => Product f g a a0 -> a0 #

minimum :: Ord a0 => Product f g a a0 -> a0 #

sum :: Num a0 => Product f g a a0 -> a0 #

product :: Num a0 => Product f g a a0 -> a0 #

(Foldable (f a), Foldable (g a)) => Foldable (Sum f g a) 
Instance details

Defined in Data.Bifunctor.Sum

Methods

fold :: Monoid m => Sum f g a m -> m #

foldMap :: Monoid m => (a0 -> m) -> Sum f g a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> Sum f g a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> Sum f g a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> Sum f g a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> Sum f g a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> Sum f g a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> Sum f g a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> Sum f g a a0 -> a0 #

toList :: Sum f g a a0 -> [a0] #

null :: Sum f g a a0 -> Bool #

length :: Sum f g a a0 -> Int #

elem :: Eq a0 => a0 -> Sum f g a a0 -> Bool #

maximum :: Ord a0 => Sum f g a a0 -> a0 #

minimum :: Ord a0 => Sum f g a a0 -> a0 #

sum :: Num a0 => Sum f g a a0 -> a0 #

product :: Num a0 => Sum f g a a0 -> a0 #

(Foldable f, Bifoldable p) => Foldable (Tannen f p a) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

fold :: Monoid m => Tannen f p a m -> m #

foldMap :: Monoid m => (a0 -> m) -> Tannen f p a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> Tannen f p a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> Tannen f p a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> Tannen f p a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> Tannen f p a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> Tannen f p a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> Tannen f p a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> Tannen f p a a0 -> a0 #

toList :: Tannen f p a a0 -> [a0] #

null :: Tannen f p a a0 -> Bool #

length :: Tannen f p a a0 -> Int #

elem :: Eq a0 => a0 -> Tannen f p a a0 -> Bool #

maximum :: Ord a0 => Tannen f p a a0 -> a0 #

minimum :: Ord a0 => Tannen f p a a0 -> a0 #

sum :: Num a0 => Tannen f p a a0 -> a0 #

product :: Num a0 => Tannen f p a a0 -> a0 #

(Bifoldable p, Foldable g) => Foldable (Biff p f g a) 
Instance details

Defined in Data.Bifunctor.Biff

Methods

fold :: Monoid m => Biff p f g a m -> m #

foldMap :: Monoid m => (a0 -> m) -> Biff p f g a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> Biff p f g a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> Biff p f g a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> Biff p f g a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> Biff p f g a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> Biff p f g a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> Biff p f g a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> Biff p f g a a0 -> a0 #

toList :: Biff p f g a a0 -> [a0] #

null :: Biff p f g a a0 -> Bool #

length :: Biff p f g a a0 -> Int #

elem :: Eq a0 => a0 -> Biff p f g a a0 -> Bool #

maximum :: Ord a0 => Biff p f g a a0 -> a0 #

minimum :: Ord a0 => Biff p f g a a0 -> a0 #

sum :: Num a0 => Biff p f g a a0 -> a0 #

product :: Num a0 => Biff p f g a a0 -> a0 #

class (Alternative m, Monad m) => MonadPlus (m :: Type -> Type) where #

Monads that also support choice and failure.

Minimal complete definition

Nothing

Methods

mzero :: m a #

The identity of mplus. It should also satisfy the equations

mzero >>= f  =  mzero
v >> mzero   =  mzero

The default definition is

mzero = empty

mplus :: m a -> m a -> m a #

An associative operation. The default definition is

mplus = (<|>)

Instances

Instances details
MonadPlus IResult 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

mzero :: IResult a #

mplus :: IResult a -> IResult a -> IResult a #

MonadPlus Parser 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

mzero :: Parser a #

mplus :: Parser a -> Parser a -> Parser a #

MonadPlus Result 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

mzero :: Result a #

mplus :: Result a -> Result a -> Result a #

MonadPlus STM

Takes the first non-retrying STM action.

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

mzero :: STM a #

mplus :: STM a -> STM a -> STM a #

MonadPlus P

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

mzero :: P a #

mplus :: P a -> P a -> P a #

MonadPlus ReadP

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

mzero :: ReadP a #

mplus :: ReadP a -> ReadP a -> ReadP a #

MonadPlus ReadPrec

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadPrec

Methods

mzero :: ReadPrec a #

mplus :: ReadPrec a -> ReadPrec a -> ReadPrec a #

MonadPlus Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

mzero :: Seq a #

mplus :: Seq a -> Seq a -> Seq a #

MonadPlus DList 
Instance details

Defined in Data.DList.Internal

Methods

mzero :: DList a #

mplus :: DList a -> DList a -> DList a #

MonadPlus IO

Takes the first non-throwing IO action's result. mzero throws an exception.

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

mzero :: IO a #

mplus :: IO a -> IO a -> IO a #

MonadPlus Array 
Instance details

Defined in Data.Primitive.Array

Methods

mzero :: Array a #

mplus :: Array a -> Array a -> Array a #

MonadPlus SmallArray 
Instance details

Defined in Data.Primitive.SmallArray

MonadPlus Vector 
Instance details

Defined in Data.Vector

Methods

mzero :: Vector a #

mplus :: Vector a -> Vector a -> Vector a #

MonadPlus Maybe

Picks the leftmost Just value, or, alternatively, Nothing.

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mzero :: Maybe a #

mplus :: Maybe a -> Maybe a -> Maybe a #

MonadPlus List

Combines lists by concatenation, starting from the empty list.

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mzero :: [a] #

mplus :: [a] -> [a] -> [a] #

MonadPlus (Parser i) 
Instance details

Defined in Data.Attoparsec.Internal.Types

Methods

mzero :: Parser i a #

mplus :: Parser i a -> Parser i a -> Parser i a #

(ArrowApply a, ArrowPlus a) => MonadPlus (ArrowMonad a)

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

Methods

mzero :: ArrowMonad a a0 #

mplus :: ArrowMonad a a0 -> ArrowMonad a a0 -> ArrowMonad a a0 #

MonadPlus (Proxy :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Methods

mzero :: Proxy a #

mplus :: Proxy a -> Proxy a -> Proxy a #

MonadPlus (U1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

mzero :: U1 a #

mplus :: U1 a -> U1 a -> U1 a #

Monad m => MonadPlus (CatchT m) 
Instance details

Defined in Control.Monad.Catch.Pure

Methods

mzero :: CatchT m a #

mplus :: CatchT m a -> CatchT m a -> CatchT m a #

MonadPlus v => MonadPlus (Free v)

This violates the MonadPlus laws, handle with care.

Instance details

Defined in Control.Monad.Free

Methods

mzero :: Free v a #

mplus :: Free v a -> Free v a -> Free v a #

MonadPlus m => MonadPlus (ResourceT m)

Since 1.1.5

Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

mzero :: ResourceT m a #

mplus :: ResourceT m a -> ResourceT m a -> ResourceT m a #

Monad m => MonadPlus (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

mzero :: MaybeT m a #

mplus :: MaybeT m a -> MaybeT m a -> MaybeT m a #

MonadPlus m => MonadPlus (Kleisli m a)

Since: base-4.14.0.0

Instance details

Defined in Control.Arrow

Methods

mzero :: Kleisli m a a0 #

mplus :: Kleisli m a a0 -> Kleisli m a a0 -> Kleisli m a a0 #

MonadPlus f => MonadPlus (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

mzero :: Ap f a #

mplus :: Ap f a -> Ap f a -> Ap f a #

MonadPlus f => MonadPlus (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

mzero :: Alt f a #

mplus :: Alt f a -> Alt f a -> Alt f a #

MonadPlus f => MonadPlus (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

mzero :: Rec1 f a #

mplus :: Rec1 f a -> Rec1 f a -> Rec1 f a #

(Functor f, MonadPlus m) => MonadPlus (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

mzero :: FreeT f m a #

mplus :: FreeT f m a -> FreeT f m a -> FreeT f m a #

(Monoid w, Functor m, MonadPlus m) => MonadPlus (AccumT w m) 
Instance details

Defined in Control.Monad.Trans.Accum

Methods

mzero :: AccumT w m a #

mplus :: AccumT w m a -> AccumT w m a -> AccumT w m a #

(Monad m, Monoid e) => MonadPlus (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

mzero :: ExceptT e m a #

mplus :: ExceptT e m a -> ExceptT e m a -> ExceptT e m a #

MonadPlus m => MonadPlus (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

mzero :: IdentityT m a #

mplus :: IdentityT m a -> IdentityT m a -> IdentityT m a #

MonadPlus m => MonadPlus (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

mzero :: ReaderT r m a #

mplus :: ReaderT r m a -> ReaderT r m a -> ReaderT r m a #

MonadPlus m => MonadPlus (SelectT r m) 
Instance details

Defined in Control.Monad.Trans.Select

Methods

mzero :: SelectT r m a #

mplus :: SelectT r m a -> SelectT r m a -> SelectT r m a #

MonadPlus m => MonadPlus (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Lazy

Methods

mzero :: StateT s m a #

mplus :: StateT s m a -> StateT s m a -> StateT s m a #

MonadPlus m => MonadPlus (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

mzero :: StateT s m a #

mplus :: StateT s m a -> StateT s m a -> StateT s m a #

(Functor m, MonadPlus m) => MonadPlus (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.CPS

Methods

mzero :: WriterT w m a #

mplus :: WriterT w m a -> WriterT w m a -> WriterT w m a #

(Monoid w, MonadPlus m) => MonadPlus (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

mzero :: WriterT w m a #

mplus :: WriterT w m a -> WriterT w m a -> WriterT w m a #

(Monoid w, MonadPlus m) => MonadPlus (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

mzero :: WriterT w m a #

mplus :: WriterT w m a -> WriterT w m a -> WriterT w m a #

MonadPlus m => MonadPlus (Reverse m)

Derived instance.

Instance details

Defined in Data.Functor.Reverse

Methods

mzero :: Reverse m a #

mplus :: Reverse m a -> Reverse m a -> Reverse m a #

(MonadPlus f, MonadPlus g) => MonadPlus (Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

mzero :: Product f g a #

mplus :: Product f g a -> Product f g a -> Product f g a #

(MonadPlus f, MonadPlus g) => MonadPlus (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

mzero :: (f :*: g) a #

mplus :: (f :*: g) a -> (f :*: g) a -> (f :*: g) a #

MonadPlus f => MonadPlus (M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

mzero :: M1 i c f a #

mplus :: M1 i c f a -> M1 i c f a -> M1 i c f a #

(Functor m, MonadPlus m) => MonadPlus (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.CPS

Methods

mzero :: RWST r w s m a #

mplus :: RWST r w s m a -> RWST r w s m a -> RWST r w s m a #

(Monoid w, MonadPlus m) => MonadPlus (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Lazy

Methods

mzero :: RWST r w s m a #

mplus :: RWST r w s m a -> RWST r w s m a -> RWST r w s m a #

(Monoid w, MonadPlus m) => MonadPlus (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Strict

Methods

mzero :: RWST r w s m a #

mplus :: RWST r w s m a -> RWST r w s m a -> RWST r w s m a #

data Handle #

Haskell defines operations to read and write characters from and to files, represented by values of type Handle. Each value of this type is a handle: a record used by the Haskell run-time system to manage I/O with file system objects. A handle has at least the following properties:

  • whether it manages input or output or both;
  • whether it is open, closed or semi-closed;
  • whether the object is seekable;
  • whether buffering is disabled, or enabled on a line or block basis;
  • a buffer (whose length may be zero).

Most handles will also have a current I/O position indicating where the next input or output operation will occur. A handle is readable if it manages only input or both input and output; likewise, it is writable if it manages only output or both input and output. A handle is open when first allocated. Once it is closed it can no longer be used for either input or output, though an implementation cannot re-use its storage while references remain to it. Handles are in the Show and Eq classes. The string produced by showing a handle is system dependent; it should include enough information to identify the handle for debugging. A handle is equal according to == only to itself; no attempt is made to compare the internal state of different handles for equality.

Instances

Instances details
Show Handle

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Handle.Types

Eq Handle

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Handle.Types

Methods

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

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

type Header = (HeaderName, ByteString) #

A full HTTP header field with the name and value separated.

E.g. "Content-Length: 28" parsed into a Header would turn into ("Content-Length", "28")

type Application = Request -> (Response -> IO ResponseReceived) -> IO ResponseReceived #

The WAI application.

Note that, since WAI 3.0, this type is structured in continuation passing style to allow for proper safe resource handling. This was handled in the past via other means (e.g., ResourceT). As a demonstration:

app :: Application
app req respond = bracket_
    (putStrLn "Allocating scarce resource")
    (putStrLn "Cleaning up")
    (respond $ responseLBS status200 [] "Hello World")

data Set a #

A set of values a.

Instances

Instances details
ToJSON1 Set 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> Set a -> Value #

liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [Set a] -> Value #

liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> Set a -> Encoding #

liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [Set a] -> Encoding #

liftOmitField :: (a -> Bool) -> Set a -> Bool #

Foldable Set

Folds in order of increasing key.

Instance details

Defined in Data.Set.Internal

Methods

fold :: Monoid m => Set m -> m #

foldMap :: Monoid m => (a -> m) -> Set a -> m #

foldMap' :: Monoid m => (a -> m) -> Set a -> m #

foldr :: (a -> b -> b) -> b -> Set a -> b #

foldr' :: (a -> b -> b) -> b -> Set a -> b #

foldl :: (b -> a -> b) -> b -> Set a -> b #

foldl' :: (b -> a -> b) -> b -> Set a -> b #

foldr1 :: (a -> a -> a) -> Set a -> a #

foldl1 :: (a -> a -> a) -> Set a -> a #

toList :: Set a -> [a] #

null :: Set a -> Bool #

length :: Set a -> Int #

elem :: Eq a => a -> Set a -> Bool #

maximum :: Ord a => Set a -> a #

minimum :: Ord a => Set a -> a #

sum :: Num a => Set a -> a #

product :: Num a => Set a -> a #

Eq1 Set

Since: containers-0.5.9

Instance details

Defined in Data.Set.Internal

Methods

liftEq :: (a -> b -> Bool) -> Set a -> Set b -> Bool #

Ord1 Set

Since: containers-0.5.9

Instance details

Defined in Data.Set.Internal

Methods

liftCompare :: (a -> b -> Ordering) -> Set a -> Set b -> Ordering #

Show1 Set

Since: containers-0.5.9

Instance details

Defined in Data.Set.Internal

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Set a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Set a] -> ShowS #

Hashable1 Set

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> Set a -> Int #

Lift a => Lift (Set a :: Type)

Since: containers-0.6.6

Instance details

Defined in Data.Set.Internal

Methods

lift :: Quote m => Set a -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Set a -> Code m (Set a) #

(Ord a, FromJSON a) => FromJSON (Set a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON a => ToJSON (Set a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Set a -> Value #

toEncoding :: Set a -> Encoding #

toJSONList :: [Set a] -> Value #

toEncodingList :: [Set a] -> Encoding #

omitField :: Set a -> Bool #

(Data a, Ord a) => Data (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Set a -> c (Set a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Set a) #

toConstr :: Set a -> Constr #

dataTypeOf :: Set a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Set a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Set a)) #

gmapT :: (forall b. Data b => b -> b) -> Set a -> Set a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Set a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Set a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Set a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Set a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Set a -> m (Set a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Set a -> m (Set a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Set a -> m (Set a) #

Ord a => Monoid (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

mempty :: Set a #

mappend :: Set a -> Set a -> Set a #

mconcat :: [Set a] -> Set a #

Ord a => Semigroup (Set a)

Since: containers-0.5.7

Instance details

Defined in Data.Set.Internal

Methods

(<>) :: Set a -> Set a -> Set a #

sconcat :: NonEmpty (Set a) -> Set a #

stimes :: Integral b => b -> Set a -> Set a #

Ord a => IsList (Set a)

Since: containers-0.5.6.2

Instance details

Defined in Data.Set.Internal

Associated Types

type Item (Set a) #

Methods

fromList :: [Item (Set a)] -> Set a #

fromListN :: Int -> [Item (Set a)] -> Set a #

toList :: Set a -> [Item (Set a)] #

(Read a, Ord a) => Read (Set a) 
Instance details

Defined in Data.Set.Internal

Show a => Show (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

showsPrec :: Int -> Set a -> ShowS #

show :: Set a -> String #

showList :: [Set a] -> ShowS #

NFData a => NFData (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

rnf :: Set a -> () #

Eq a => Eq (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

(==) :: Set a -> Set a -> Bool #

(/=) :: Set a -> Set a -> Bool #

Ord a => Ord (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

compare :: Set a -> Set a -> Ordering #

(<) :: Set a -> Set a -> Bool #

(<=) :: Set a -> Set a -> Bool #

(>) :: Set a -> Set a -> Bool #

(>=) :: Set a -> Set a -> Bool #

max :: Set a -> Set a -> Set a #

min :: Set a -> Set a -> Set a #

Hashable v => Hashable (Set v)

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Set v -> Int #

hash :: Set v -> Int #

Ord element => IsSet (Set element) 
Instance details

Defined in Data.Containers

Methods

insertSet :: Element (Set element) -> Set element -> Set element #

deleteSet :: Element (Set element) -> Set element -> Set element #

singletonSet :: Element (Set element) -> Set element #

setFromList :: [Element (Set element)] -> Set element #

setToList :: Set element -> [Element (Set element)] #

filterSet :: (Element (Set element) -> Bool) -> Set element -> Set element #

Ord element => SetContainer (Set element) 
Instance details

Defined in Data.Containers

Associated Types

type ContainerKey (Set element) #

Methods

member :: ContainerKey (Set element) -> Set element -> Bool #

notMember :: ContainerKey (Set element) -> Set element -> Bool #

union :: Set element -> Set element -> Set element #

unions :: (MonoFoldable mono, Element mono ~ Set element) => mono -> Set element #

difference :: Set element -> Set element -> Set element #

intersection :: Set element -> Set element -> Set element #

keys :: Set element -> [ContainerKey (Set element)] #

Ord v => GrowingAppend (Set v) 
Instance details

Defined in Data.MonoTraversable

Ord e => MonoFoldable (Set e) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (Set e) -> m) -> Set e -> m #

ofoldr :: (Element (Set e) -> b -> b) -> b -> Set e -> b #

ofoldl' :: (a -> Element (Set e) -> a) -> a -> Set e -> a #

otoList :: Set e -> [Element (Set e)] #

oall :: (Element (Set e) -> Bool) -> Set e -> Bool #

oany :: (Element (Set e) -> Bool) -> Set e -> Bool #

onull :: Set e -> Bool #

olength :: Set e -> Int #

olength64 :: Set e -> Int64 #

ocompareLength :: Integral i => Set e -> i -> Ordering #

otraverse_ :: Applicative f => (Element (Set e) -> f b) -> Set e -> f () #

ofor_ :: Applicative f => Set e -> (Element (Set e) -> f b) -> f () #

omapM_ :: Applicative m => (Element (Set e) -> m ()) -> Set e -> m () #

oforM_ :: Applicative m => Set e -> (Element (Set e) -> m ()) -> m () #

ofoldlM :: Monad m => (a -> Element (Set e) -> m a) -> a -> Set e -> m a #

ofoldMap1Ex :: Semigroup m => (Element (Set e) -> m) -> Set e -> m #

ofoldr1Ex :: (Element (Set e) -> Element (Set e) -> Element (Set e)) -> Set e -> Element (Set e) #

ofoldl1Ex' :: (Element (Set e) -> Element (Set e) -> Element (Set e)) -> Set e -> Element (Set e) #

headEx :: Set e -> Element (Set e) #

lastEx :: Set e -> Element (Set e) #

unsafeHead :: Set e -> Element (Set e) #

unsafeLast :: Set e -> Element (Set e) #

maximumByEx :: (Element (Set e) -> Element (Set e) -> Ordering) -> Set e -> Element (Set e) #

minimumByEx :: (Element (Set e) -> Element (Set e) -> Ordering) -> Set e -> Element (Set e) #

oelem :: Element (Set e) -> Set e -> Bool #

onotElem :: Element (Set e) -> Set e -> Bool #

MonoPointed (Set a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (Set a) -> Set a #

(Ord a, PersistField a) => PersistField (Set a) 
Instance details

Defined in Database.Persist.Class.PersistField

(Ord a, PersistFieldSql a) => PersistFieldSql (Set a) 
Instance details

Defined in Database.Persist.Sql.Class

Methods

sqlType :: Proxy (Set a) -> SqlType #

type Item (Set a) 
Instance details

Defined in Data.Set.Internal

type Item (Set a) = a
type ContainerKey (Set element) 
Instance details

Defined in Data.Containers

type ContainerKey (Set element) = element
type Element (Set e) 
Instance details

Defined in Data.MonoTraversable

type Element (Set e) = e

class (forall a. Functor (p a)) => Bifunctor (p :: Type -> Type -> Type) where #

A bifunctor is a type constructor that takes two type arguments and is a functor in both arguments. That is, unlike with Functor, a type constructor such as Either does not need to be partially applied for a Bifunctor instance, and the methods in this class permit mapping functions over the Left value or the Right value, or both at the same time.

Formally, the class Bifunctor represents a bifunctor from Hask -> Hask.

Intuitively it is a bifunctor where both the first and second arguments are covariant.

You can define a Bifunctor by either defining bimap or by defining both first and second. A partially applied Bifunctor must be a Functor and the second method must agree with fmap. From this it follows that:

second id = id

If you supply bimap, you should ensure that:

bimap id idid

If you supply first and second, ensure:

first idid
second idid

If you supply both, you should also ensure:

bimap f g ≡ first f . second g

These ensure by parametricity:

bimap  (f . g) (h . i) ≡ bimap f h . bimap g i
first  (f . g) ≡ first  f . first  g
second (f . g) ≡ second f . second g

Since 4.18.0.0 Functor is a superclass of 'Bifunctor.

Since: base-4.8.0.0

Minimal complete definition

bimap | first, second

Methods

bimap :: (a -> b) -> (c -> d) -> p a c -> p b d #

Map over both arguments at the same time.

bimap f g ≡ first f . second g

Examples

Expand
>>> bimap toUpper (+1) ('j', 3)
('J',4)
>>> bimap toUpper (+1) (Left 'j')
Left 'J'
>>> bimap toUpper (+1) (Right 3)
Right 4

first :: (a -> b) -> p a c -> p b c #

Map covariantly over the first argument.

first f ≡ bimap f id

Examples

Expand
>>> first toUpper ('j', 3)
('J',3)
>>> first toUpper (Left 'j')
Left 'J'

second :: (b -> c) -> p a b -> p a c #

Map covariantly over the second argument.

secondbimap id

Examples

Expand
>>> second (+1) ('j', 3)
('j',4)
>>> second (+1) (Right 3)
Right 4

Instances

Instances details
Bifunctor ConcurrentlyE 
Instance details

Defined in Control.Concurrent.Async.Internal

Methods

bimap :: (a -> b) -> (c -> d) -> ConcurrentlyE a c -> ConcurrentlyE b d #

first :: (a -> b) -> ConcurrentlyE a c -> ConcurrentlyE b c #

second :: (b -> c) -> ConcurrentlyE a b -> ConcurrentlyE a c #

Bifunctor Either

Since: base-4.8.0.0

Instance details

Defined in Data.Bifunctor

Methods

bimap :: (a -> b) -> (c -> d) -> Either a c -> Either b d #

first :: (a -> b) -> Either a c -> Either b c #

second :: (b -> c) -> Either a b -> Either a c #

Bifunctor Arg

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

bimap :: (a -> b) -> (c -> d) -> Arg a c -> Arg b d #

first :: (a -> b) -> Arg a c -> Arg b c #

second :: (b -> c) -> Arg a b -> Arg a c #

Bifunctor Either 
Instance details

Defined in Data.Strict.Either

Methods

bimap :: (a -> b) -> (c -> d) -> Either a c -> Either b d #

first :: (a -> b) -> Either a c -> Either b c #

second :: (b -> c) -> Either a b -> Either a c #

Bifunctor These 
Instance details

Defined in Data.Strict.These

Methods

bimap :: (a -> b) -> (c -> d) -> These a c -> These b d #

first :: (a -> b) -> These a c -> These b c #

second :: (b -> c) -> These a b -> These a c #

Bifunctor Pair 
Instance details

Defined in Data.Strict.Tuple

Methods

bimap :: (a -> b) -> (c -> d) -> Pair a c -> Pair b d #

first :: (a -> b) -> Pair a c -> Pair b c #

second :: (b -> c) -> Pair a b -> Pair a c #

Bifunctor These 
Instance details

Defined in Data.These

Methods

bimap :: (a -> b) -> (c -> d) -> These a c -> These b d #

first :: (a -> b) -> These a c -> These b c #

second :: (b -> c) -> These a b -> These a c #

Bifunctor (,)

Class laws for tuples hold only up to laziness. Both first id and second id are lazier than id (and fmap id):

>>> first id (undefined :: (Int, Word)) `seq` ()
()
>>> second id (undefined :: (Int, Word)) `seq` ()
()
>>> id (undefined :: (Int, Word)) `seq` ()
*** Exception: Prelude.undefined

Since: base-4.8.0.0

Instance details

Defined in Data.Bifunctor

Methods

bimap :: (a -> b) -> (c -> d) -> (a, c) -> (b, d) #

first :: (a -> b) -> (a, c) -> (b, c) #

second :: (b -> c) -> (a, b) -> (a, c) #

Bifunctor (Const :: Type -> Type -> Type)

Since: base-4.8.0.0

Instance details

Defined in Data.Bifunctor

Methods

bimap :: (a -> b) -> (c -> d) -> Const a c -> Const b d #

first :: (a -> b) -> Const a c -> Const b c #

second :: (b -> c) -> Const a b -> Const a c #

Functor f => Bifunctor (FreeF f) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

bimap :: (a -> b) -> (c -> d) -> FreeF f a c -> FreeF f b d #

first :: (a -> b) -> FreeF f a c -> FreeF f b c #

second :: (b -> c) -> FreeF f a b -> FreeF f a c #

Bifunctor (Tagged :: Type -> Type -> Type) 
Instance details

Defined in Data.Tagged

Methods

bimap :: (a -> b) -> (c -> d) -> Tagged a c -> Tagged b d #

first :: (a -> b) -> Tagged a c -> Tagged b c #

second :: (b -> c) -> Tagged a b -> Tagged a c #

Bifunctor (Constant :: Type -> Type -> Type) 
Instance details

Defined in Data.Functor.Constant

Methods

bimap :: (a -> b) -> (c -> d) -> Constant a c -> Constant b d #

first :: (a -> b) -> Constant a c -> Constant b c #

second :: (b -> c) -> Constant a b -> Constant a c #

Bifunctor ((,,) x1)

Since: base-4.8.0.0

Instance details

Defined in Data.Bifunctor

Methods

bimap :: (a -> b) -> (c -> d) -> (x1, a, c) -> (x1, b, d) #

first :: (a -> b) -> (x1, a, c) -> (x1, b, c) #

second :: (b -> c) -> (x1, a, b) -> (x1, a, c) #

Bifunctor (K1 i :: Type -> Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Bifunctor

Methods

bimap :: (a -> b) -> (c -> d) -> K1 i a c -> K1 i b d #

first :: (a -> b) -> K1 i a c -> K1 i b c #

second :: (b -> c) -> K1 i a b -> K1 i a c #

Bifunctor ((,,,) x1 x2)

Since: base-4.8.0.0

Instance details

Defined in Data.Bifunctor

Methods

bimap :: (a -> b) -> (c -> d) -> (x1, x2, a, c) -> (x1, x2, b, d) #

first :: (a -> b) -> (x1, x2, a, c) -> (x1, x2, b, c) #

second :: (b -> c) -> (x1, x2, a, b) -> (x1, x2, a, c) #

Functor f => Bifunctor (Clown f :: Type -> Type -> Type) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

bimap :: (a -> b) -> (c -> d) -> Clown f a c -> Clown f b d #

first :: (a -> b) -> Clown f a c -> Clown f b c #

second :: (b -> c) -> Clown f a b -> Clown f a c #

Bifunctor p => Bifunctor (Flip p) 
Instance details

Defined in Data.Bifunctor.Flip

Methods

bimap :: (a -> b) -> (c -> d) -> Flip p a c -> Flip p b d #

first :: (a -> b) -> Flip p a c -> Flip p b c #

second :: (b -> c) -> Flip p a b -> Flip p a c #

Functor g => Bifunctor (Joker g :: Type -> Type -> Type) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

bimap :: (a -> b) -> (c -> d) -> Joker g a c -> Joker g b d #

first :: (a -> b) -> Joker g a c -> Joker g b c #

second :: (b -> c) -> Joker g a b -> Joker g a c #

Bifunctor p => Bifunctor (WrappedBifunctor p) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

bimap :: (a -> b) -> (c -> d) -> WrappedBifunctor p a c -> WrappedBifunctor p b d #

first :: (a -> b) -> WrappedBifunctor p a c -> WrappedBifunctor p b c #

second :: (b -> c) -> WrappedBifunctor p a b -> WrappedBifunctor p a c #

Bifunctor ((,,,,) x1 x2 x3)

Since: base-4.8.0.0

Instance details

Defined in Data.Bifunctor

Methods

bimap :: (a -> b) -> (c -> d) -> (x1, x2, x3, a, c) -> (x1, x2, x3, b, d) #

first :: (a -> b) -> (x1, x2, x3, a, c) -> (x1, x2, x3, b, c) #

second :: (b -> c) -> (x1, x2, x3, a, b) -> (x1, x2, x3, a, c) #

(Bifunctor f, Bifunctor g) => Bifunctor (Product f g) 
Instance details

Defined in Data.Bifunctor.Product

Methods

bimap :: (a -> b) -> (c -> d) -> Product f g a c -> Product f g b d #

first :: (a -> b) -> Product f g a c -> Product f g b c #

second :: (b -> c) -> Product f g a b -> Product f g a c #

(Bifunctor p, Bifunctor q) => Bifunctor (Sum p q) 
Instance details

Defined in Data.Bifunctor.Sum

Methods

bimap :: (a -> b) -> (c -> d) -> Sum p q a c -> Sum p q b d #

first :: (a -> b) -> Sum p q a c -> Sum p q b c #

second :: (b -> c) -> Sum p q a b -> Sum p q a c #

Bifunctor ((,,,,,) x1 x2 x3 x4)

Since: base-4.8.0.0

Instance details

Defined in Data.Bifunctor

Methods

bimap :: (a -> b) -> (c -> d) -> (x1, x2, x3, x4, a, c) -> (x1, x2, x3, x4, b, d) #

first :: (a -> b) -> (x1, x2, x3, x4, a, c) -> (x1, x2, x3, x4, b, c) #

second :: (b -> c) -> (x1, x2, x3, x4, a, b) -> (x1, x2, x3, x4, a, c) #

(Functor f, Bifunctor p) => Bifunctor (Tannen f p) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

bimap :: (a -> b) -> (c -> d) -> Tannen f p a c -> Tannen f p b d #

first :: (a -> b) -> Tannen f p a c -> Tannen f p b c #

second :: (b -> c) -> Tannen f p a b -> Tannen f p a c #

Bifunctor ((,,,,,,) x1 x2 x3 x4 x5)

Since: base-4.8.0.0

Instance details

Defined in Data.Bifunctor

Methods

bimap :: (a -> b) -> (c -> d) -> (x1, x2, x3, x4, x5, a, c) -> (x1, x2, x3, x4, x5, b, d) #

first :: (a -> b) -> (x1, x2, x3, x4, x5, a, c) -> (x1, x2, x3, x4, x5, b, c) #

second :: (b -> c) -> (x1, x2, x3, x4, x5, a, b) -> (x1, x2, x3, x4, x5, a, c) #

(Bifunctor p, Functor f, Functor g) => Bifunctor (Biff p f g) 
Instance details

Defined in Data.Bifunctor.Biff

Methods

bimap :: (a -> b) -> (c -> d) -> Biff p f g a c -> Biff p f g b d #

first :: (a -> b) -> Biff p f g a c -> Biff p f g b c #

second :: (b -> c) -> Biff p f g a b -> Biff p f g a c #

newtype Concurrently (m :: Type -> Type) a #

Unlifted Concurrently.

Since: unliftio-0.1.0.0

Constructors

Concurrently 

Fields

Instances

Instances details
MonadUnliftIO m => Alternative (Concurrently m)

Composing two unlifted Concurrently values using Alternative is the equivalent to using a race combinator, the asynchrounous sub-routine that returns a value first is the one that gets it's value returned, the slowest sub-routine gets cancelled and it's thread is killed.

Since: unliftio-0.1.0.0

Instance details

Defined in UnliftIO.Internals.Async

Methods

empty :: Concurrently m a #

(<|>) :: Concurrently m a -> Concurrently m a -> Concurrently m a #

some :: Concurrently m a -> Concurrently m [a] #

many :: Concurrently m a -> Concurrently m [a] #

MonadUnliftIO m => Applicative (Concurrently m)

Since: unliftio-0.1.0.0

Instance details

Defined in UnliftIO.Internals.Async

Methods

pure :: a -> Concurrently m a #

(<*>) :: Concurrently m (a -> b) -> Concurrently m a -> Concurrently m b #

liftA2 :: (a -> b -> c) -> Concurrently m a -> Concurrently m b -> Concurrently m c #

(*>) :: Concurrently m a -> Concurrently m b -> Concurrently m b #

(<*) :: Concurrently m a -> Concurrently m b -> Concurrently m a #

Monad m => Functor (Concurrently m)

Since: unliftio-0.1.0.0

Instance details

Defined in UnliftIO.Internals.Async

Methods

fmap :: (a -> b) -> Concurrently m a -> Concurrently m b #

(<$) :: a -> Concurrently m b -> Concurrently m a #

(Semigroup a, Monoid a, MonadUnliftIO m) => Monoid (Concurrently m a)

Since: unliftio-0.1.0.0

Instance details

Defined in UnliftIO.Internals.Async

(MonadUnliftIO m, Semigroup a) => Semigroup (Concurrently m a)

Only defined by async for base >= 4.9.

Since: unliftio-0.1.0.0

Instance details

Defined in UnliftIO.Internals.Async

Methods

(<>) :: Concurrently m a -> Concurrently m a -> Concurrently m a #

sconcat :: NonEmpty (Concurrently m a) -> Concurrently m a #

stimes :: Integral b => b -> Concurrently m a -> Concurrently m a #

data Async a #

An asynchronous action spawned by async or withAsync. Asynchronous actions are executed in a separate thread, and operations are provided for waiting for asynchronous actions to complete and obtaining their results (see e.g. wait).

Instances

Instances details
Functor Async 
Instance details

Defined in Control.Concurrent.Async.Internal

Methods

fmap :: (a -> b) -> Async a -> Async b #

(<$) :: a -> Async b -> Async a #

Eq (Async a) 
Instance details

Defined in Control.Concurrent.Async.Internal

Methods

(==) :: Async a -> Async a -> Bool #

(/=) :: Async a -> Async a -> Bool #

Ord (Async a) 
Instance details

Defined in Control.Concurrent.Async.Internal

Methods

compare :: Async a -> Async a -> Ordering #

(<) :: Async a -> Async a -> Bool #

(<=) :: Async a -> Async a -> Bool #

(>) :: Async a -> Async a -> Bool #

(>=) :: Async a -> Async a -> Bool #

max :: Async a -> Async a -> Async a #

min :: Async a -> Async a -> Async a #

Hashable (Async a) 
Instance details

Defined in Control.Concurrent.Async.Internal

Methods

hashWithSalt :: Int -> Async a -> Int #

hash :: Async a -> Int #

class (Functor t, Foldable t) => Traversable (t :: Type -> Type) where #

Functors representing data structures that can be transformed to structures of the same shape by performing an Applicative (or, therefore, Monad) action on each element from left to right.

A more detailed description of what same shape means, the various methods, how traversals are constructed, and example advanced use-cases can be found in the Overview section of Data.Traversable.

For the class laws see the Laws section of Data.Traversable.

Minimal complete definition

traverse | sequenceA

Methods

traverse :: Applicative f => (a -> f b) -> t a -> f (t b) #

Map each element of a structure to an action, evaluate these actions from left to right, and collect the results. For a version that ignores the results see traverse_.

Examples

Expand

Basic usage:

In the first two examples we show each evaluated action mapping to the output structure.

>>> traverse Just [1,2,3,4]
Just [1,2,3,4]
>>> traverse id [Right 1, Right 2, Right 3, Right 4]
Right [1,2,3,4]

In the next examples, we show that Nothing and Left values short circuit the created structure.

>>> traverse (const Nothing) [1,2,3,4]
Nothing
>>> traverse (\x -> if odd x then Just x else Nothing)  [1,2,3,4]
Nothing
>>> traverse id [Right 1, Right 2, Right 3, Right 4, Left 0]
Left 0

sequenceA :: Applicative f => t (f a) -> f (t a) #

Evaluate each action in the structure from left to right, and collect the results. For a version that ignores the results see sequenceA_.

Examples

Expand

Basic usage:

For the first two examples we show sequenceA fully evaluating a a structure and collecting the results.

>>> sequenceA [Just 1, Just 2, Just 3]
Just [1,2,3]
>>> sequenceA [Right 1, Right 2, Right 3]
Right [1,2,3]

The next two example show Nothing and Just will short circuit the resulting structure if present in the input. For more context, check the Traversable instances for Either and Maybe.

>>> sequenceA [Just 1, Just 2, Just 3, Nothing]
Nothing
>>> sequenceA [Right 1, Right 2, Right 3, Left 4]
Left 4

mapM :: Monad m => (a -> m b) -> t a -> m (t b) #

Map each element of a structure to a monadic action, evaluate these actions from left to right, and collect the results. For a version that ignores the results see mapM_.

Examples

Expand

mapM is literally a traverse with a type signature restricted to Monad. Its implementation may be more efficient due to additional power of Monad.

sequence :: Monad m => t (m a) -> m (t a) #

Evaluate each monadic action in the structure from left to right, and collect the results. For a version that ignores the results see sequence_.

Examples

Expand

Basic usage:

The first two examples are instances where the input and and output of sequence are isomorphic.

>>> sequence $ Right [1,2,3,4]
[Right 1,Right 2,Right 3,Right 4]
>>> sequence $ [Right 1,Right 2,Right 3,Right 4]
Right [1,2,3,4]

The following examples demonstrate short circuit behavior for sequence.

>>> sequence $ Left [1,2,3,4]
Left [1,2,3,4]
>>> sequence $ [Left 0, Right 1,Right 2,Right 3,Right 4]
Left 0

Instances

Instances details
Traversable KeyMap 
Instance details

Defined in Data.Aeson.KeyMap

Methods

traverse :: Applicative f => (a -> f b) -> KeyMap a -> f (KeyMap b) #

sequenceA :: Applicative f => KeyMap (f a) -> f (KeyMap a) #

mapM :: Monad m => (a -> m b) -> KeyMap a -> m (KeyMap b) #

sequence :: Monad m => KeyMap (m a) -> m (KeyMap a) #

Traversable IResult 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

traverse :: Applicative f => (a -> f b) -> IResult a -> f (IResult b) #

sequenceA :: Applicative f => IResult (f a) -> f (IResult a) #

mapM :: Monad m => (a -> m b) -> IResult a -> m (IResult b) #

sequence :: Monad m => IResult (m a) -> m (IResult a) #

Traversable Result 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

traverse :: Applicative f => (a -> f b) -> Result a -> f (Result b) #

sequenceA :: Applicative f => Result (f a) -> f (Result a) #

mapM :: Monad m => (a -> m b) -> Result a -> m (Result b) #

sequence :: Monad m => Result (m a) -> m (Result a) #

Traversable ZipList

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> ZipList a -> f (ZipList b) #

sequenceA :: Applicative f => ZipList (f a) -> f (ZipList a) #

mapM :: Monad m => (a -> m b) -> ZipList a -> m (ZipList b) #

sequence :: Monad m => ZipList (m a) -> m (ZipList a) #

Traversable Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Methods

traverse :: Applicative f => (a -> f b) -> Complex a -> f (Complex b) #

sequenceA :: Applicative f => Complex (f a) -> f (Complex a) #

mapM :: Monad m => (a -> m b) -> Complex a -> m (Complex b) #

sequence :: Monad m => Complex (m a) -> m (Complex a) #

Traversable Identity

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Identity a -> f (Identity b) #

sequenceA :: Applicative f => Identity (f a) -> f (Identity a) #

mapM :: Monad m => (a -> m b) -> Identity a -> m (Identity b) #

sequence :: Monad m => Identity (m a) -> m (Identity a) #

Traversable First

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> First a -> f (First b) #

sequenceA :: Applicative f => First (f a) -> f (First a) #

mapM :: Monad m => (a -> m b) -> First a -> m (First b) #

sequence :: Monad m => First (m a) -> m (First a) #

Traversable Last

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Last a -> f (Last b) #

sequenceA :: Applicative f => Last (f a) -> f (Last a) #

mapM :: Monad m => (a -> m b) -> Last a -> m (Last b) #

sequence :: Monad m => Last (m a) -> m (Last a) #

Traversable Down

Since: base-4.12.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Down a -> f (Down b) #

sequenceA :: Applicative f => Down (f a) -> f (Down a) #

mapM :: Monad m => (a -> m b) -> Down a -> m (Down b) #

sequence :: Monad m => Down (m a) -> m (Down a) #

Traversable First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

traverse :: Applicative f => (a -> f b) -> First a -> f (First b) #

sequenceA :: Applicative f => First (f a) -> f (First a) #

mapM :: Monad m => (a -> m b) -> First a -> m (First b) #

sequence :: Monad m => First (m a) -> m (First a) #

Traversable Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

traverse :: Applicative f => (a -> f b) -> Last a -> f (Last b) #

sequenceA :: Applicative f => Last (f a) -> f (Last a) #

mapM :: Monad m => (a -> m b) -> Last a -> m (Last b) #

sequence :: Monad m => Last (m a) -> m (Last a) #

Traversable Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

traverse :: Applicative f => (a -> f b) -> Max a -> f (Max b) #

sequenceA :: Applicative f => Max (f a) -> f (Max a) #

mapM :: Monad m => (a -> m b) -> Max a -> m (Max b) #

sequence :: Monad m => Max (m a) -> m (Max a) #

Traversable Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

traverse :: Applicative f => (a -> f b) -> Min a -> f (Min b) #

sequenceA :: Applicative f => Min (f a) -> f (Min a) #

mapM :: Monad m => (a -> m b) -> Min a -> m (Min b) #

sequence :: Monad m => Min (m a) -> m (Min a) #

Traversable Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Dual a -> f (Dual b) #

sequenceA :: Applicative f => Dual (f a) -> f (Dual a) #

mapM :: Monad m => (a -> m b) -> Dual a -> m (Dual b) #

sequence :: Monad m => Dual (m a) -> m (Dual a) #

Traversable Product

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Product a -> f (Product b) #

sequenceA :: Applicative f => Product (f a) -> f (Product a) #

mapM :: Monad m => (a -> m b) -> Product a -> m (Product b) #

sequence :: Monad m => Product (m a) -> m (Product a) #

Traversable Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Sum a -> f (Sum b) #

sequenceA :: Applicative f => Sum (f a) -> f (Sum a) #

mapM :: Monad m => (a -> m b) -> Sum a -> m (Sum b) #

sequence :: Monad m => Sum (m a) -> m (Sum a) #

Traversable NonEmpty

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> NonEmpty a -> f (NonEmpty b) #

sequenceA :: Applicative f => NonEmpty (f a) -> f (NonEmpty a) #

mapM :: Monad m => (a -> m b) -> NonEmpty a -> m (NonEmpty b) #

sequence :: Monad m => NonEmpty (m a) -> m (NonEmpty a) #

Traversable Par1

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Par1 a -> f (Par1 b) #

sequenceA :: Applicative f => Par1 (f a) -> f (Par1 a) #

mapM :: Monad m => (a -> m b) -> Par1 a -> m (Par1 b) #

sequence :: Monad m => Par1 (m a) -> m (Par1 a) #

Traversable IntMap

Traverses in order of increasing key.

Instance details

Defined in Data.IntMap.Internal

Methods

traverse :: Applicative f => (a -> f b) -> IntMap a -> f (IntMap b) #

sequenceA :: Applicative f => IntMap (f a) -> f (IntMap a) #

mapM :: Monad m => (a -> m b) -> IntMap a -> m (IntMap b) #

sequence :: Monad m => IntMap (m a) -> m (IntMap a) #

Traversable Digit 
Instance details

Defined in Data.Sequence.Internal

Methods

traverse :: Applicative f => (a -> f b) -> Digit a -> f (Digit b) #

sequenceA :: Applicative f => Digit (f a) -> f (Digit a) #

mapM :: Monad m => (a -> m b) -> Digit a -> m (Digit b) #

sequence :: Monad m => Digit (m a) -> m (Digit a) #

Traversable Elem 
Instance details

Defined in Data.Sequence.Internal

Methods

traverse :: Applicative f => (a -> f b) -> Elem a -> f (Elem b) #

sequenceA :: Applicative f => Elem (f a) -> f (Elem a) #

mapM :: Monad m => (a -> m b) -> Elem a -> m (Elem b) #

sequence :: Monad m => Elem (m a) -> m (Elem a) #

Traversable FingerTree 
Instance details

Defined in Data.Sequence.Internal

Methods

traverse :: Applicative f => (a -> f b) -> FingerTree a -> f (FingerTree b) #

sequenceA :: Applicative f => FingerTree (f a) -> f (FingerTree a) #

mapM :: Monad m => (a -> m b) -> FingerTree a -> m (FingerTree b) #

sequence :: Monad m => FingerTree (m a) -> m (FingerTree a) #

Traversable Node 
Instance details

Defined in Data.Sequence.Internal

Methods

traverse :: Applicative f => (a -> f b) -> Node a -> f (Node b) #

sequenceA :: Applicative f => Node (f a) -> f (Node a) #

mapM :: Monad m => (a -> m b) -> Node a -> m (Node b) #

sequence :: Monad m => Node (m a) -> m (Node a) #

Traversable Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

traverse :: Applicative f => (a -> f b) -> Seq a -> f (Seq b) #

sequenceA :: Applicative f => Seq (f a) -> f (Seq a) #

mapM :: Monad m => (a -> m b) -> Seq a -> m (Seq b) #

sequence :: Monad m => Seq (m a) -> m (Seq a) #

Traversable ViewL 
Instance details

Defined in Data.Sequence.Internal

Methods

traverse :: Applicative f => (a -> f b) -> ViewL a -> f (ViewL b) #

sequenceA :: Applicative f => ViewL (f a) -> f (ViewL a) #

mapM :: Monad m => (a -> m b) -> ViewL a -> m (ViewL b) #

sequence :: Monad m => ViewL (m a) -> m (ViewL a) #

Traversable ViewR 
Instance details

Defined in Data.Sequence.Internal

Methods

traverse :: Applicative f => (a -> f b) -> ViewR a -> f (ViewR b) #

sequenceA :: Applicative f => ViewR (f a) -> f (ViewR a) #

mapM :: Monad m => (a -> m b) -> ViewR a -> m (ViewR b) #

sequence :: Monad m => ViewR (m a) -> m (ViewR a) #

Traversable Tree 
Instance details

Defined in Data.Tree

Methods

traverse :: Applicative f => (a -> f b) -> Tree a -> f (Tree b) #

sequenceA :: Applicative f => Tree (f a) -> f (Tree a) #

mapM :: Monad m => (a -> m b) -> Tree a -> m (Tree b) #

sequence :: Monad m => Tree (m a) -> m (Tree a) #

Traversable DList 
Instance details

Defined in Data.DList.Internal

Methods

traverse :: Applicative f => (a -> f b) -> DList a -> f (DList b) #

sequenceA :: Applicative f => DList (f a) -> f (DList a) #

mapM :: Monad m => (a -> m b) -> DList a -> m (DList b) #

sequence :: Monad m => DList (m a) -> m (DList a) #

Traversable LenientData 
Instance details

Defined in Web.Internal.HttpApiData

Methods

traverse :: Applicative f => (a -> f b) -> LenientData a -> f (LenientData b) #

sequenceA :: Applicative f => LenientData (f a) -> f (LenientData a) #

mapM :: Monad m => (a -> m b) -> LenientData a -> m (LenientData b) #

sequence :: Monad m => LenientData (m a) -> m (LenientData a) #

Traversable HistoriedResponse 
Instance details

Defined in Network.HTTP.Client

Methods

traverse :: Applicative f => (a -> f b) -> HistoriedResponse a -> f (HistoriedResponse b) #

sequenceA :: Applicative f => HistoriedResponse (f a) -> f (HistoriedResponse a) #

mapM :: Monad m => (a -> m b) -> HistoriedResponse a -> m (HistoriedResponse b) #

sequence :: Monad m => HistoriedResponse (m a) -> m (HistoriedResponse a) #

Traversable Response 
Instance details

Defined in Network.HTTP.Client.Types

Methods

traverse :: Applicative f => (a -> f b) -> Response a -> f (Response b) #

sequenceA :: Applicative f => Response (f a) -> f (Response a) #

mapM :: Monad m => (a -> m b) -> Response a -> m (Response b) #

sequence :: Monad m => Response (m a) -> m (Response a) #

Traversable Array 
Instance details

Defined in Data.Primitive.Array

Methods

traverse :: Applicative f => (a -> f b) -> Array a -> f (Array b) #

sequenceA :: Applicative f => Array (f a) -> f (Array a) #

mapM :: Monad m => (a -> m b) -> Array a -> m (Array b) #

sequence :: Monad m => Array (m a) -> m (Array a) #

Traversable SmallArray 
Instance details

Defined in Data.Primitive.SmallArray

Methods

traverse :: Applicative f => (a -> f b) -> SmallArray a -> f (SmallArray b) #

sequenceA :: Applicative f => SmallArray (f a) -> f (SmallArray a) #

mapM :: Monad m => (a -> m b) -> SmallArray a -> m (SmallArray b) #

sequence :: Monad m => SmallArray (m a) -> m (SmallArray a) #

Traversable Maybe 
Instance details

Defined in Data.Strict.Maybe

Methods

traverse :: Applicative f => (a -> f b) -> Maybe a -> f (Maybe b) #

sequenceA :: Applicative f => Maybe (f a) -> f (Maybe a) #

mapM :: Monad m => (a -> m b) -> Maybe a -> m (Maybe b) #

sequence :: Monad m => Maybe (m a) -> m (Maybe a) #

Traversable Vector 
Instance details

Defined in Data.Vector

Methods

traverse :: Applicative f => (a -> f b) -> Vector a -> f (Vector b) #

sequenceA :: Applicative f => Vector (f a) -> f (Vector a) #

mapM :: Monad m => (a -> m b) -> Vector a -> m (Vector b) #

sequence :: Monad m => Vector (m a) -> m (Vector a) #

Traversable FormResult

Since: yesod-form-1.4.5

Instance details

Defined in Yesod.Form.Types

Methods

traverse :: Applicative f => (a -> f b) -> FormResult a -> f (FormResult b) #

sequenceA :: Applicative f => FormResult (f a) -> f (FormResult a) #

mapM :: Monad m => (a -> m b) -> FormResult a -> m (FormResult b) #

sequence :: Monad m => FormResult (m a) -> m (FormResult a) #

Traversable Maybe

Since: base-2.1

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Maybe a -> f (Maybe b) #

sequenceA :: Applicative f => Maybe (f a) -> f (Maybe a) #

mapM :: Monad m => (a -> m b) -> Maybe a -> m (Maybe b) #

sequence :: Monad m => Maybe (m a) -> m (Maybe a) #

Traversable Solo

Since: base-4.15

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Solo a -> f (Solo b) #

sequenceA :: Applicative f => Solo (f a) -> f (Solo a) #

mapM :: Monad m => (a -> m b) -> Solo a -> m (Solo b) #

sequence :: Monad m => Solo (m a) -> m (Solo a) #

Traversable List

Since: base-2.1

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> [a] -> f [b] #

sequenceA :: Applicative f => [f a] -> f [a] #

mapM :: Monad m => (a -> m b) -> [a] -> m [b] #

sequence :: Monad m => [m a] -> m [a] #

Traversable (Either a)

Since: base-4.7.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a0 -> f b) -> Either a a0 -> f (Either a b) #

sequenceA :: Applicative f => Either a (f a0) -> f (Either a a0) #

mapM :: Monad m => (a0 -> m b) -> Either a a0 -> m (Either a b) #

sequence :: Monad m => Either a (m a0) -> m (Either a a0) #

Traversable (Proxy :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Proxy a -> f (Proxy b) #

sequenceA :: Applicative f => Proxy (f a) -> f (Proxy a) #

mapM :: Monad m => (a -> m b) -> Proxy a -> m (Proxy b) #

sequence :: Monad m => Proxy (m a) -> m (Proxy a) #

Traversable (Arg a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

traverse :: Applicative f => (a0 -> f b) -> Arg a a0 -> f (Arg a b) #

sequenceA :: Applicative f => Arg a (f a0) -> f (Arg a a0) #

mapM :: Monad m => (a0 -> m b) -> Arg a a0 -> m (Arg a b) #

sequence :: Monad m => Arg a (m a0) -> m (Arg a a0) #

Ix i => Traversable (Array i)

Since: base-2.1

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Array i a -> f (Array i b) #

sequenceA :: Applicative f => Array i (f a) -> f (Array i a) #

mapM :: Monad m => (a -> m b) -> Array i a -> m (Array i b) #

sequence :: Monad m => Array i (m a) -> m (Array i a) #

Traversable (U1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> U1 a -> f (U1 b) #

sequenceA :: Applicative f => U1 (f a) -> f (U1 a) #

mapM :: Monad m => (a -> m b) -> U1 a -> m (U1 b) #

sequence :: Monad m => U1 (m a) -> m (U1 a) #

Traversable (UAddr :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UAddr a -> f (UAddr b) #

sequenceA :: Applicative f => UAddr (f a) -> f (UAddr a) #

mapM :: Monad m => (a -> m b) -> UAddr a -> m (UAddr b) #

sequence :: Monad m => UAddr (m a) -> m (UAddr a) #

Traversable (UChar :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UChar a -> f (UChar b) #

sequenceA :: Applicative f => UChar (f a) -> f (UChar a) #

mapM :: Monad m => (a -> m b) -> UChar a -> m (UChar b) #

sequence :: Monad m => UChar (m a) -> m (UChar a) #

Traversable (UDouble :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UDouble a -> f (UDouble b) #

sequenceA :: Applicative f => UDouble (f a) -> f (UDouble a) #

mapM :: Monad m => (a -> m b) -> UDouble a -> m (UDouble b) #

sequence :: Monad m => UDouble (m a) -> m (UDouble a) #

Traversable (UFloat :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UFloat a -> f (UFloat b) #

sequenceA :: Applicative f => UFloat (f a) -> f (UFloat a) #

mapM :: Monad m => (a -> m b) -> UFloat a -> m (UFloat b) #

sequence :: Monad m => UFloat (m a) -> m (UFloat a) #

Traversable (UInt :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UInt a -> f (UInt b) #

sequenceA :: Applicative f => UInt (f a) -> f (UInt a) #

mapM :: Monad m => (a -> m b) -> UInt a -> m (UInt b) #

sequence :: Monad m => UInt (m a) -> m (UInt a) #

Traversable (UWord :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UWord a -> f (UWord b) #

sequenceA :: Applicative f => UWord (f a) -> f (UWord a) #

mapM :: Monad m => (a -> m b) -> UWord a -> m (UWord b) #

sequence :: Monad m => UWord (m a) -> m (UWord a) #

Traversable (V1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> V1 a -> f (V1 b) #

sequenceA :: Applicative f => V1 (f a) -> f (V1 a) #

mapM :: Monad m => (a -> m b) -> V1 a -> m (V1 b) #

sequence :: Monad m => V1 (m a) -> m (V1 a) #

Traversable (Map k)

Traverses in order of increasing key.

Instance details

Defined in Data.Map.Internal

Methods

traverse :: Applicative f => (a -> f b) -> Map k a -> f (Map k b) #

sequenceA :: Applicative f => Map k (f a) -> f (Map k a) #

mapM :: Monad m => (a -> m b) -> Map k a -> m (Map k b) #

sequence :: Monad m => Map k (m a) -> m (Map k a) #

(Monad m, Traversable m) => Traversable (CatchT m) 
Instance details

Defined in Control.Monad.Catch.Pure

Methods

traverse :: Applicative f => (a -> f b) -> CatchT m a -> f (CatchT m b) #

sequenceA :: Applicative f => CatchT m (f a) -> f (CatchT m a) #

mapM :: Monad m0 => (a -> m0 b) -> CatchT m a -> m0 (CatchT m b) #

sequence :: Monad m0 => CatchT m (m0 a) -> m0 (CatchT m a) #

Traversable f => Traversable (Cofree f) 
Instance details

Defined in Control.Comonad.Cofree

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Cofree f a -> f0 (Cofree f b) #

sequenceA :: Applicative f0 => Cofree f (f0 a) -> f0 (Cofree f a) #

mapM :: Monad m => (a -> m b) -> Cofree f a -> m (Cofree f b) #

sequence :: Monad m => Cofree f (m a) -> m (Cofree f a) #

Traversable f => Traversable (Free f) 
Instance details

Defined in Control.Monad.Free

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Free f a -> f0 (Free f b) #

sequenceA :: Applicative f0 => Free f (f0 a) -> f0 (Free f a) #

mapM :: Monad m => (a -> m b) -> Free f a -> m (Free f b) #

sequence :: Monad m => Free f (m a) -> m (Free f a) #

Traversable (Either e) 
Instance details

Defined in Data.Strict.Either

Methods

traverse :: Applicative f => (a -> f b) -> Either e a -> f (Either e b) #

sequenceA :: Applicative f => Either e (f a) -> f (Either e a) #

mapM :: Monad m => (a -> m b) -> Either e a -> m (Either e b) #

sequence :: Monad m => Either e (m a) -> m (Either e a) #

Traversable (These a) 
Instance details

Defined in Data.Strict.These

Methods

traverse :: Applicative f => (a0 -> f b) -> These a a0 -> f (These a b) #

sequenceA :: Applicative f => These a (f a0) -> f (These a a0) #

mapM :: Monad m => (a0 -> m b) -> These a a0 -> m (These a b) #

sequence :: Monad m => These a (m a0) -> m (These a a0) #

Traversable (Pair e) 
Instance details

Defined in Data.Strict.Tuple

Methods

traverse :: Applicative f => (a -> f b) -> Pair e a -> f (Pair e b) #

sequenceA :: Applicative f => Pair e (f a) -> f (Pair e a) #

mapM :: Monad m => (a -> m b) -> Pair e a -> m (Pair e b) #

sequence :: Monad m => Pair e (m a) -> m (Pair e a) #

Traversable (These a) 
Instance details

Defined in Data.These

Methods

traverse :: Applicative f => (a0 -> f b) -> These a a0 -> f (These a b) #

sequenceA :: Applicative f => These a (f a0) -> f (These a a0) #

mapM :: Monad m => (a0 -> m b) -> These a a0 -> m (These a b) #

sequence :: Monad m => These a (m a0) -> m (These a a0) #

Traversable f => Traversable (Lift f) 
Instance details

Defined in Control.Applicative.Lift

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Lift f a -> f0 (Lift f b) #

sequenceA :: Applicative f0 => Lift f (f0 a) -> f0 (Lift f a) #

mapM :: Monad m => (a -> m b) -> Lift f a -> m (Lift f b) #

sequence :: Monad m => Lift f (m a) -> m (Lift f a) #

Traversable f => Traversable (MaybeT f) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

traverse :: Applicative f0 => (a -> f0 b) -> MaybeT f a -> f0 (MaybeT f b) #

sequenceA :: Applicative f0 => MaybeT f (f0 a) -> f0 (MaybeT f a) #

mapM :: Monad m => (a -> m b) -> MaybeT f a -> m (MaybeT f b) #

sequence :: Monad m => MaybeT f (m a) -> m (MaybeT f a) #

Traversable (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

traverse :: Applicative f => (a -> f b) -> HashMap k a -> f (HashMap k b) #

sequenceA :: Applicative f => HashMap k (f a) -> f (HashMap k a) #

mapM :: Monad m => (a -> m b) -> HashMap k a -> m (HashMap k b) #

sequence :: Monad m => HashMap k (m a) -> m (HashMap k a) #

Traversable ((,) a)

Since: base-4.7.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a0 -> f b) -> (a, a0) -> f (a, b) #

sequenceA :: Applicative f => (a, f a0) -> f (a, a0) #

mapM :: Monad m => (a0 -> m b) -> (a, a0) -> m (a, b) #

sequence :: Monad m => (a, m a0) -> m (a, a0) #

Traversable (Const m :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Const m a -> f (Const m b) #

sequenceA :: Applicative f => Const m (f a) -> f (Const m a) #

mapM :: Monad m0 => (a -> m0 b) -> Const m a -> m0 (Const m b) #

sequence :: Monad m0 => Const m (m0 a) -> m0 (Const m a) #

Traversable f => Traversable (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Ap f a -> f0 (Ap f b) #

sequenceA :: Applicative f0 => Ap f (f0 a) -> f0 (Ap f a) #

mapM :: Monad m => (a -> m b) -> Ap f a -> m (Ap f b) #

sequence :: Monad m => Ap f (m a) -> m (Ap f a) #

Traversable f => Traversable (Alt f)

Since: base-4.12.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Alt f a -> f0 (Alt f b) #

sequenceA :: Applicative f0 => Alt f (f0 a) -> f0 (Alt f a) #

mapM :: Monad m => (a -> m b) -> Alt f a -> m (Alt f b) #

sequence :: Monad m => Alt f (m a) -> m (Alt f a) #

Traversable f => Traversable (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Rec1 f a -> f0 (Rec1 f b) #

sequenceA :: Applicative f0 => Rec1 f (f0 a) -> f0 (Rec1 f a) #

mapM :: Monad m => (a -> m b) -> Rec1 f a -> m (Rec1 f b) #

sequence :: Monad m => Rec1 f (m a) -> m (Rec1 f a) #

Bitraversable p => Traversable (Join p) 
Instance details

Defined in Data.Bifunctor.Join

Methods

traverse :: Applicative f => (a -> f b) -> Join p a -> f (Join p b) #

sequenceA :: Applicative f => Join p (f a) -> f (Join p a) #

mapM :: Monad m => (a -> m b) -> Join p a -> m (Join p b) #

sequence :: Monad m => Join p (m a) -> m (Join p a) #

Traversable f => Traversable (FreeF f a) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

traverse :: Applicative f0 => (a0 -> f0 b) -> FreeF f a a0 -> f0 (FreeF f a b) #

sequenceA :: Applicative f0 => FreeF f a (f0 a0) -> f0 (FreeF f a a0) #

mapM :: Monad m => (a0 -> m b) -> FreeF f a a0 -> m (FreeF f a b) #

sequence :: Monad m => FreeF f a (m a0) -> m (FreeF f a a0) #

(Monad m, Traversable m, Traversable f) => Traversable (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

traverse :: Applicative f0 => (a -> f0 b) -> FreeT f m a -> f0 (FreeT f m b) #

sequenceA :: Applicative f0 => FreeT f m (f0 a) -> f0 (FreeT f m a) #

mapM :: Monad m0 => (a -> m0 b) -> FreeT f m a -> m0 (FreeT f m b) #

sequence :: Monad m0 => FreeT f m (m0 a) -> m0 (FreeT f m a) #

Traversable (Tagged s) 
Instance details

Defined in Data.Tagged

Methods

traverse :: Applicative f => (a -> f b) -> Tagged s a -> f (Tagged s b) #

sequenceA :: Applicative f => Tagged s (f a) -> f (Tagged s a) #

mapM :: Monad m => (a -> m b) -> Tagged s a -> m (Tagged s b) #

sequence :: Monad m => Tagged s (m a) -> m (Tagged s a) #

(Traversable f, Traversable g) => Traversable (These1 f g) 
Instance details

Defined in Data.Functor.These

Methods

traverse :: Applicative f0 => (a -> f0 b) -> These1 f g a -> f0 (These1 f g b) #

sequenceA :: Applicative f0 => These1 f g (f0 a) -> f0 (These1 f g a) #

mapM :: Monad m => (a -> m b) -> These1 f g a -> m (These1 f g b) #

sequence :: Monad m => These1 f g (m a) -> m (These1 f g a) #

Traversable f => Traversable (Backwards f)

Derived instance.

Instance details

Defined in Control.Applicative.Backwards

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Backwards f a -> f0 (Backwards f b) #

sequenceA :: Applicative f0 => Backwards f (f0 a) -> f0 (Backwards f a) #

mapM :: Monad m => (a -> m b) -> Backwards f a -> m (Backwards f b) #

sequence :: Monad m => Backwards f (m a) -> m (Backwards f a) #

Traversable f => Traversable (ExceptT e f) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

traverse :: Applicative f0 => (a -> f0 b) -> ExceptT e f a -> f0 (ExceptT e f b) #

sequenceA :: Applicative f0 => ExceptT e f (f0 a) -> f0 (ExceptT e f a) #

mapM :: Monad m => (a -> m b) -> ExceptT e f a -> m (ExceptT e f b) #

sequence :: Monad m => ExceptT e f (m a) -> m (ExceptT e f a) #

Traversable f => Traversable (IdentityT f) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

traverse :: Applicative f0 => (a -> f0 b) -> IdentityT f a -> f0 (IdentityT f b) #

sequenceA :: Applicative f0 => IdentityT f (f0 a) -> f0 (IdentityT f a) #

mapM :: Monad m => (a -> m b) -> IdentityT f a -> m (IdentityT f b) #

sequence :: Monad m => IdentityT f (m a) -> m (IdentityT f a) #

Traversable f => Traversable (WriterT w f) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

traverse :: Applicative f0 => (a -> f0 b) -> WriterT w f a -> f0 (WriterT w f b) #

sequenceA :: Applicative f0 => WriterT w f (f0 a) -> f0 (WriterT w f a) #

mapM :: Monad m => (a -> m b) -> WriterT w f a -> m (WriterT w f b) #

sequence :: Monad m => WriterT w f (m a) -> m (WriterT w f a) #

Traversable f => Traversable (WriterT w f) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

traverse :: Applicative f0 => (a -> f0 b) -> WriterT w f a -> f0 (WriterT w f b) #

sequenceA :: Applicative f0 => WriterT w f (f0 a) -> f0 (WriterT w f a) #

mapM :: Monad m => (a -> m b) -> WriterT w f a -> m (WriterT w f b) #

sequence :: Monad m => WriterT w f (m a) -> m (WriterT w f a) #

Traversable (Constant a :: Type -> Type) 
Instance details

Defined in Data.Functor.Constant

Methods

traverse :: Applicative f => (a0 -> f b) -> Constant a a0 -> f (Constant a b) #

sequenceA :: Applicative f => Constant a (f a0) -> f (Constant a a0) #

mapM :: Monad m => (a0 -> m b) -> Constant a a0 -> m (Constant a b) #

sequence :: Monad m => Constant a (m a0) -> m (Constant a a0) #

Traversable f => Traversable (Reverse f)

Traverse from right to left.

Instance details

Defined in Data.Functor.Reverse

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Reverse f a -> f0 (Reverse f b) #

sequenceA :: Applicative f0 => Reverse f (f0 a) -> f0 (Reverse f a) #

mapM :: Monad m => (a -> m b) -> Reverse f a -> m (Reverse f b) #

sequence :: Monad m => Reverse f (m a) -> m (Reverse f a) #

(Traversable f, Traversable g) => Traversable (Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Product f g a -> f0 (Product f g b) #

sequenceA :: Applicative f0 => Product f g (f0 a) -> f0 (Product f g a) #

mapM :: Monad m => (a -> m b) -> Product f g a -> m (Product f g b) #

sequence :: Monad m => Product f g (m a) -> m (Product f g a) #

(Traversable f, Traversable g) => Traversable (Sum f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Sum f g a -> f0 (Sum f g b) #

sequenceA :: Applicative f0 => Sum f g (f0 a) -> f0 (Sum f g a) #

mapM :: Monad m => (a -> m b) -> Sum f g a -> m (Sum f g b) #

sequence :: Monad m => Sum f g (m a) -> m (Sum f g a) #

(Traversable f, Traversable g) => Traversable (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> (f :*: g) a -> f0 ((f :*: g) b) #

sequenceA :: Applicative f0 => (f :*: g) (f0 a) -> f0 ((f :*: g) a) #

mapM :: Monad m => (a -> m b) -> (f :*: g) a -> m ((f :*: g) b) #

sequence :: Monad m => (f :*: g) (m a) -> m ((f :*: g) a) #

(Traversable f, Traversable g) => Traversable (f :+: g)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> (f :+: g) a -> f0 ((f :+: g) b) #

sequenceA :: Applicative f0 => (f :+: g) (f0 a) -> f0 ((f :+: g) a) #

mapM :: Monad m => (a -> m b) -> (f :+: g) a -> m ((f :+: g) b) #

sequence :: Monad m => (f :+: g) (m a) -> m ((f :+: g) a) #

Traversable (K1 i c :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> K1 i c a -> f (K1 i c b) #

sequenceA :: Applicative f => K1 i c (f a) -> f (K1 i c a) #

mapM :: Monad m => (a -> m b) -> K1 i c a -> m (K1 i c b) #

sequence :: Monad m => K1 i c (m a) -> m (K1 i c a) #

(Traversable f, Traversable g) => Traversable (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Compose f g a -> f0 (Compose f g b) #

sequenceA :: Applicative f0 => Compose f g (f0 a) -> f0 (Compose f g a) #

mapM :: Monad m => (a -> m b) -> Compose f g a -> m (Compose f g b) #

sequence :: Monad m => Compose f g (m a) -> m (Compose f g a) #

(Traversable f, Traversable g) => Traversable (f :.: g)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> (f :.: g) a -> f0 ((f :.: g) b) #

sequenceA :: Applicative f0 => (f :.: g) (f0 a) -> f0 ((f :.: g) a) #

mapM :: Monad m => (a -> m b) -> (f :.: g) a -> m ((f :.: g) b) #

sequence :: Monad m => (f :.: g) (m a) -> m ((f :.: g) a) #

Traversable f => Traversable (M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> M1 i c f a -> f0 (M1 i c f b) #

sequenceA :: Applicative f0 => M1 i c f (f0 a) -> f0 (M1 i c f a) #

mapM :: Monad m => (a -> m b) -> M1 i c f a -> m (M1 i c f b) #

sequence :: Monad m => M1 i c f (m a) -> m (M1 i c f a) #

Traversable (Clown f a :: Type -> Type) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

traverse :: Applicative f0 => (a0 -> f0 b) -> Clown f a a0 -> f0 (Clown f a b) #

sequenceA :: Applicative f0 => Clown f a (f0 a0) -> f0 (Clown f a a0) #

mapM :: Monad m => (a0 -> m b) -> Clown f a a0 -> m (Clown f a b) #

sequence :: Monad m => Clown f a (m a0) -> m (Clown f a a0) #

Bitraversable p => Traversable (Flip p a) 
Instance details

Defined in Data.Bifunctor.Flip

Methods

traverse :: Applicative f => (a0 -> f b) -> Flip p a a0 -> f (Flip p a b) #

sequenceA :: Applicative f => Flip p a (f a0) -> f (Flip p a a0) #

mapM :: Monad m => (a0 -> m b) -> Flip p a a0 -> m (Flip p a b) #

sequence :: Monad m => Flip p a (m a0) -> m (Flip p a a0) #

Traversable g => Traversable (Joker g a) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

traverse :: Applicative f => (a0 -> f b) -> Joker g a a0 -> f (Joker g a b) #

sequenceA :: Applicative f => Joker g a (f a0) -> f (Joker g a a0) #

mapM :: Monad m => (a0 -> m b) -> Joker g a a0 -> m (Joker g a b) #

sequence :: Monad m => Joker g a (m a0) -> m (Joker g a a0) #

Bitraversable p => Traversable (WrappedBifunctor p a) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

traverse :: Applicative f => (a0 -> f b) -> WrappedBifunctor p a a0 -> f (WrappedBifunctor p a b) #

sequenceA :: Applicative f => WrappedBifunctor p a (f a0) -> f (WrappedBifunctor p a a0) #

mapM :: Monad m => (a0 -> m b) -> WrappedBifunctor p a a0 -> m (WrappedBifunctor p a b) #

sequence :: Monad m => WrappedBifunctor p a (m a0) -> m (WrappedBifunctor p a a0) #

(Traversable (f a), Traversable (g a)) => Traversable (Product f g a) 
Instance details

Defined in Data.Bifunctor.Product

Methods

traverse :: Applicative f0 => (a0 -> f0 b) -> Product f g a a0 -> f0 (Product f g a b) #

sequenceA :: Applicative f0 => Product f g a (f0 a0) -> f0 (Product f g a a0) #

mapM :: Monad m => (a0 -> m b) -> Product f g a a0 -> m (Product f g a b) #

sequence :: Monad m => Product f g a (m a0) -> m (Product f g a a0) #

(Traversable (f a), Traversable (g a)) => Traversable (Sum f g a) 
Instance details

Defined in Data.Bifunctor.Sum

Methods

traverse :: Applicative f0 => (a0 -> f0 b) -> Sum f g a a0 -> f0 (Sum f g a b) #

sequenceA :: Applicative f0 => Sum f g a (f0 a0) -> f0 (Sum f g a a0) #

mapM :: Monad m => (a0 -> m b) -> Sum f g a a0 -> m (Sum f g a b) #

sequence :: Monad m => Sum f g a (m a0) -> m (Sum f g a a0) #

(Traversable f, Bitraversable p) => Traversable (Tannen f p a) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

traverse :: Applicative f0 => (a0 -> f0 b) -> Tannen f p a a0 -> f0 (Tannen f p a b) #

sequenceA :: Applicative f0 => Tannen f p a (f0 a0) -> f0 (Tannen f p a a0) #

mapM :: Monad m => (a0 -> m b) -> Tannen f p a a0 -> m (Tannen f p a b) #

sequence :: Monad m => Tannen f p a (m a0) -> m (Tannen f p a a0) #

(Bitraversable p, Traversable g) => Traversable (Biff p f g a) 
Instance details

Defined in Data.Bifunctor.Biff

Methods

traverse :: Applicative f0 => (a0 -> f0 b) -> Biff p f g a a0 -> f0 (Biff p f g a b) #

sequenceA :: Applicative f0 => Biff p f g a (f0 a0) -> f0 (Biff p f g a a0) #

mapM :: Monad m => (a0 -> m b) -> Biff p f g a a0 -> m (Biff p f g a b) #

sequence :: Monad m => Biff p f g a (m a0) -> m (Biff p f g a a0) #

data STM a #

A monad supporting atomic memory transactions.

Instances

Instances details
Alternative STM

Takes the first non-retrying STM action.

Since: base-4.8.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

empty :: STM a #

(<|>) :: STM a -> STM a -> STM a #

some :: STM a -> STM [a] #

many :: STM a -> STM [a] #

Applicative STM

Since: base-4.8.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

pure :: a -> STM a #

(<*>) :: STM (a -> b) -> STM a -> STM b #

liftA2 :: (a -> b -> c) -> STM a -> STM b -> STM c #

(*>) :: STM a -> STM b -> STM b #

(<*) :: STM a -> STM b -> STM a #

Functor STM

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

fmap :: (a -> b) -> STM a -> STM b #

(<$) :: a -> STM b -> STM a #

Monad STM

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

(>>=) :: STM a -> (a -> STM b) -> STM b #

(>>) :: STM a -> STM b -> STM b #

return :: a -> STM a #

MonadPlus STM

Takes the first non-retrying STM action.

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

mzero :: STM a #

mplus :: STM a -> STM a -> STM a #

MonadCatch STM 
Instance details

Defined in Control.Monad.Catch

Methods

catch :: (HasCallStack, Exception e) => STM a -> (e -> STM a) -> STM a #

MonadThrow STM 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e) => e -> STM a #

MonadBaseControl STM STM 
Instance details

Defined in Control.Monad.Trans.Control

Associated Types

type StM STM a #

Methods

liftBaseWith :: (RunInBase STM STM -> STM a) -> STM a #

restoreM :: StM STM a -> STM a #

Monoid a => Monoid (STM a)

Since: base-4.17.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

mempty :: STM a #

mappend :: STM a -> STM a -> STM a #

mconcat :: [STM a] -> STM a #

Semigroup a => Semigroup (STM a)

Since: base-4.17.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

(<>) :: STM a -> STM a -> STM a #

sconcat :: NonEmpty (STM a) -> STM a #

stimes :: Integral b => b -> STM a -> STM a #

RandomGen g => FrozenGen (TGen g) STM

Since: random-1.2.1

Instance details

Defined in System.Random.Stateful

Associated Types

type MutableGen (TGen g) STM = (g :: Type) #

Methods

freezeGen :: MutableGen (TGen g) STM -> STM (TGen g) #

thawGen :: TGen g -> STM (MutableGen (TGen g) STM) #

RandomGen g => StatefulGen (TGenM g) STM

Since: random-1.2.1

Instance details

Defined in System.Random.Stateful

RandomGen r => RandomGenM (TGenM r) r STM 
Instance details

Defined in System.Random.Stateful

Methods

applyRandomGenM :: (r -> (a, r)) -> TGenM r -> STM a #

type StM STM a 
Instance details

Defined in Control.Monad.Trans.Control

type StM STM a = a
type MutableGen (TGen g) STM 
Instance details

Defined in System.Random.Stateful

type MutableGen (TGen g) STM = TGenM g

class Storable a #

The member functions of this class facilitate writing values of primitive types to raw memory (which may have been allocated with the above mentioned routines) and reading values from blocks of raw memory. The class, furthermore, includes support for computing the storage requirements and alignment restrictions of storable types.

Memory addresses are represented as values of type Ptr a, for some a which is an instance of class Storable. The type argument to Ptr helps provide some valuable type safety in FFI code (you can't mix pointers of different types without an explicit cast), while helping the Haskell type system figure out which marshalling method is needed for a given pointer.

All marshalling between Haskell and a foreign language ultimately boils down to translating Haskell data structures into the binary representation of a corresponding data structure of the foreign language and vice versa. To code this marshalling in Haskell, it is necessary to manipulate primitive data types stored in unstructured memory blocks. The class Storable facilitates this manipulation on all types for which it is instantiated, which are the standard basic types of Haskell, the fixed size Int types (Int8, Int16, Int32, Int64), the fixed size Word types (Word8, Word16, Word32, Word64), StablePtr, all types from Foreign.C.Types, as well as Ptr.

Minimal complete definition

sizeOf, alignment, (peek | peekElemOff | peekByteOff), (poke | pokeElemOff | pokeByteOff)

Instances

Instances details
Storable CBool 
Instance details

Defined in Foreign.C.Types

Methods

sizeOf :: CBool -> Int #

alignment :: CBool -> Int #

peekElemOff :: Ptr CBool -> Int -> IO CBool #

pokeElemOff :: Ptr CBool -> Int -> CBool -> IO () #

peekByteOff :: Ptr b -> Int -> IO CBool #

pokeByteOff :: Ptr b -> Int -> CBool -> IO () #

peek :: Ptr CBool -> IO CBool #

poke :: Ptr CBool -> CBool -> IO () #

Storable CChar 
Instance details

Defined in Foreign.C.Types

Methods

sizeOf :: CChar -> Int #

alignment :: CChar -> Int #

peekElemOff :: Ptr CChar -> Int -> IO CChar #

pokeElemOff :: Ptr CChar -> Int -> CChar -> IO () #

peekByteOff :: Ptr b -> Int -> IO CChar #

pokeByteOff :: Ptr b -> Int -> CChar -> IO () #

peek :: Ptr CChar -> IO CChar #

poke :: Ptr CChar -> CChar -> IO () #

Storable CClock 
Instance details

Defined in Foreign.C.Types

Storable CDouble 
Instance details

Defined in Foreign.C.Types

Storable CFloat 
Instance details

Defined in Foreign.C.Types

Storable CInt 
Instance details

Defined in Foreign.C.Types

Methods

sizeOf :: CInt -> Int #

alignment :: CInt -> Int #

peekElemOff :: Ptr CInt -> Int -> IO CInt #

pokeElemOff :: Ptr CInt -> Int -> CInt -> IO () #

peekByteOff :: Ptr b -> Int -> IO CInt #

pokeByteOff :: Ptr b -> Int -> CInt -> IO () #

peek :: Ptr CInt -> IO CInt #

poke :: Ptr CInt -> CInt -> IO () #

Storable CIntMax 
Instance details

Defined in Foreign.C.Types

Storable CIntPtr 
Instance details

Defined in Foreign.C.Types

Storable CLLong 
Instance details

Defined in Foreign.C.Types

Storable CLong 
Instance details

Defined in Foreign.C.Types

Methods

sizeOf :: CLong -> Int #

alignment :: CLong -> Int #

peekElemOff :: Ptr CLong -> Int -> IO CLong #

pokeElemOff :: Ptr CLong -> Int -> CLong -> IO () #

peekByteOff :: Ptr b -> Int -> IO CLong #

pokeByteOff :: Ptr b -> Int -> CLong -> IO () #

peek :: Ptr CLong -> IO CLong #

poke :: Ptr CLong -> CLong -> IO () #

Storable CPtrdiff 
Instance details

Defined in Foreign.C.Types

Storable CSChar 
Instance details

Defined in Foreign.C.Types

Storable CSUSeconds 
Instance details

Defined in Foreign.C.Types

Storable CShort 
Instance details

Defined in Foreign.C.Types

Storable CSigAtomic 
Instance details

Defined in Foreign.C.Types

Storable CSize 
Instance details

Defined in Foreign.C.Types

Methods

sizeOf :: CSize -> Int #

alignment :: CSize -> Int #

peekElemOff :: Ptr CSize -> Int -> IO CSize #

pokeElemOff :: Ptr CSize -> Int -> CSize -> IO () #

peekByteOff :: Ptr b -> Int -> IO CSize #

pokeByteOff :: Ptr b -> Int -> CSize -> IO () #

peek :: Ptr CSize -> IO CSize #

poke :: Ptr CSize -> CSize -> IO () #

Storable CTime 
Instance details

Defined in Foreign.C.Types

Methods

sizeOf :: CTime -> Int #

alignment :: CTime -> Int #

peekElemOff :: Ptr CTime -> Int -> IO CTime #

pokeElemOff :: Ptr CTime -> Int -> CTime -> IO () #

peekByteOff :: Ptr b -> Int -> IO CTime #

pokeByteOff :: Ptr b -> Int -> CTime -> IO () #

peek :: Ptr CTime -> IO CTime #

poke :: Ptr CTime -> CTime -> IO () #

Storable CUChar 
Instance details

Defined in Foreign.C.Types

Storable CUInt 
Instance details

Defined in Foreign.C.Types

Methods

sizeOf :: CUInt -> Int #

alignment :: CUInt -> Int #

peekElemOff :: Ptr CUInt -> Int -> IO CUInt #

pokeElemOff :: Ptr CUInt -> Int -> CUInt -> IO () #

peekByteOff :: Ptr b -> Int -> IO CUInt #

pokeByteOff :: Ptr b -> Int -> CUInt -> IO () #

peek :: Ptr CUInt -> IO CUInt #

poke :: Ptr CUInt -> CUInt -> IO () #

Storable CUIntMax 
Instance details

Defined in Foreign.C.Types

Storable CUIntPtr 
Instance details

Defined in Foreign.C.Types

Storable CULLong 
Instance details

Defined in Foreign.C.Types

Storable CULong 
Instance details

Defined in Foreign.C.Types

Storable CUSeconds 
Instance details

Defined in Foreign.C.Types

Storable CUShort 
Instance details

Defined in Foreign.C.Types

Storable CWchar 
Instance details

Defined in Foreign.C.Types

Storable Fingerprint

Since: base-4.4.0.0

Instance details

Defined in Foreign.Storable

Storable Int16

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Int16 -> Int #

alignment :: Int16 -> Int #

peekElemOff :: Ptr Int16 -> Int -> IO Int16 #

pokeElemOff :: Ptr Int16 -> Int -> Int16 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Int16 #

pokeByteOff :: Ptr b -> Int -> Int16 -> IO () #

peek :: Ptr Int16 -> IO Int16 #

poke :: Ptr Int16 -> Int16 -> IO () #

Storable Int32

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Int32 -> Int #

alignment :: Int32 -> Int #

peekElemOff :: Ptr Int32 -> Int -> IO Int32 #

pokeElemOff :: Ptr Int32 -> Int -> Int32 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Int32 #

pokeByteOff :: Ptr b -> Int -> Int32 -> IO () #

peek :: Ptr Int32 -> IO Int32 #

poke :: Ptr Int32 -> Int32 -> IO () #

Storable Int64

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Int64 -> Int #

alignment :: Int64 -> Int #

peekElemOff :: Ptr Int64 -> Int -> IO Int64 #

pokeElemOff :: Ptr Int64 -> Int -> Int64 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Int64 #

pokeByteOff :: Ptr b -> Int -> Int64 -> IO () #

peek :: Ptr Int64 -> IO Int64 #

poke :: Ptr Int64 -> Int64 -> IO () #

Storable Int8

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Int8 -> Int #

alignment :: Int8 -> Int #

peekElemOff :: Ptr Int8 -> Int -> IO Int8 #

pokeElemOff :: Ptr Int8 -> Int -> Int8 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Int8 #

pokeByteOff :: Ptr b -> Int -> Int8 -> IO () #

peek :: Ptr Int8 -> IO Int8 #

poke :: Ptr Int8 -> Int8 -> IO () #

Storable IoSubSystem

Since: base-4.9.0.0

Instance details

Defined in GHC.RTS.Flags

Storable Word16

Since: base-2.1

Instance details

Defined in Foreign.Storable

Storable Word32

Since: base-2.1

Instance details

Defined in Foreign.Storable

Storable Word64

Since: base-2.1

Instance details

Defined in Foreign.Storable

Storable Word8

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Word8 -> Int #

alignment :: Word8 -> Int #

peekElemOff :: Ptr Word8 -> Int -> IO Word8 #

pokeElemOff :: Ptr Word8 -> Int -> Word8 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Word8 #

pokeByteOff :: Ptr b -> Int -> Word8 -> IO () #

peek :: Ptr Word8 -> IO Word8 #

poke :: Ptr Word8 -> Word8 -> IO () #

Storable AddrInfo 
Instance details

Defined in Network.Socket.Info

Storable In6Addr 
Instance details

Defined in Network.Socket.Types

Methods

sizeOf :: In6Addr -> Int #

alignment :: In6Addr -> Int #

peekElemOff :: Ptr In6Addr -> Int -> IO In6Addr #

pokeElemOff :: Ptr In6Addr -> Int -> In6Addr -> IO () #

peekByteOff :: Ptr b -> Int -> IO In6Addr #

pokeByteOff :: Ptr b -> Int -> In6Addr -> IO () #

peek :: Ptr In6Addr -> IO In6Addr #

poke :: Ptr In6Addr -> In6Addr -> IO () #

Storable PortNumber 
Instance details

Defined in Network.Socket.Types

Storable UUID

This Storable instance uses the memory layout as described in RFC 4122, but in contrast to the Binary instance, the fields are stored in host byte order.

Instance details

Defined in Data.UUID.Types.Internal

Methods

sizeOf :: UUID -> Int #

alignment :: UUID -> Int #

peekElemOff :: Ptr UUID -> Int -> IO UUID #

pokeElemOff :: Ptr UUID -> Int -> UUID -> IO () #

peekByteOff :: Ptr b -> Int -> IO UUID #

pokeByteOff :: Ptr b -> Int -> UUID -> IO () #

peek :: Ptr UUID -> IO UUID #

poke :: Ptr UUID -> UUID -> IO () #

Storable ()

Since: base-4.9.0.0

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: () -> Int #

alignment :: () -> Int #

peekElemOff :: Ptr () -> Int -> IO () #

pokeElemOff :: Ptr () -> Int -> () -> IO () #

peekByteOff :: Ptr b -> Int -> IO () #

pokeByteOff :: Ptr b -> Int -> () -> IO () #

peek :: Ptr () -> IO () #

poke :: Ptr () -> () -> IO () #

Storable Bool

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Bool -> Int #

alignment :: Bool -> Int #

peekElemOff :: Ptr Bool -> Int -> IO Bool #

pokeElemOff :: Ptr Bool -> Int -> Bool -> IO () #

peekByteOff :: Ptr b -> Int -> IO Bool #

pokeByteOff :: Ptr b -> Int -> Bool -> IO () #

peek :: Ptr Bool -> IO Bool #

poke :: Ptr Bool -> Bool -> IO () #

Storable Char

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Char -> Int #

alignment :: Char -> Int #

peekElemOff :: Ptr Char -> Int -> IO Char #

pokeElemOff :: Ptr Char -> Int -> Char -> IO () #

peekByteOff :: Ptr b -> Int -> IO Char #

pokeByteOff :: Ptr b -> Int -> Char -> IO () #

peek :: Ptr Char -> IO Char #

poke :: Ptr Char -> Char -> IO () #

Storable Double

Since: base-2.1

Instance details

Defined in Foreign.Storable

Storable Float

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Float -> Int #

alignment :: Float -> Int #

peekElemOff :: Ptr Float -> Int -> IO Float #

pokeElemOff :: Ptr Float -> Int -> Float -> IO () #

peekByteOff :: Ptr b -> Int -> IO Float #

pokeByteOff :: Ptr b -> Int -> Float -> IO () #

peek :: Ptr Float -> IO Float #

poke :: Ptr Float -> Float -> IO () #

Storable Int

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Int -> Int #

alignment :: Int -> Int #

peekElemOff :: Ptr Int -> Int -> IO Int #

pokeElemOff :: Ptr Int -> Int -> Int -> IO () #

peekByteOff :: Ptr b -> Int -> IO Int #

pokeByteOff :: Ptr b -> Int -> Int -> IO () #

peek :: Ptr Int -> IO Int #

poke :: Ptr Int -> Int -> IO () #

Storable Word

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Word -> Int #

alignment :: Word -> Int #

peekElemOff :: Ptr Word -> Int -> IO Word #

pokeElemOff :: Ptr Word -> Int -> Word -> IO () #

peekByteOff :: Ptr b -> Int -> IO Word #

pokeByteOff :: Ptr b -> Int -> Word -> IO () #

peek :: Ptr Word -> IO Word #

poke :: Ptr Word -> Word -> IO () #

Storable a => Storable (Complex a)

Since: base-4.8.0.0

Instance details

Defined in Data.Complex

Methods

sizeOf :: Complex a -> Int #

alignment :: Complex a -> Int #

peekElemOff :: Ptr (Complex a) -> Int -> IO (Complex a) #

pokeElemOff :: Ptr (Complex a) -> Int -> Complex a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Complex a) #

pokeByteOff :: Ptr b -> Int -> Complex a -> IO () #

peek :: Ptr (Complex a) -> IO (Complex a) #

poke :: Ptr (Complex a) -> Complex a -> IO () #

Storable a => Storable (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Methods

sizeOf :: Identity a -> Int #

alignment :: Identity a -> Int #

peekElemOff :: Ptr (Identity a) -> Int -> IO (Identity a) #

pokeElemOff :: Ptr (Identity a) -> Int -> Identity a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Identity a) #

pokeByteOff :: Ptr b -> Int -> Identity a -> IO () #

peek :: Ptr (Identity a) -> IO (Identity a) #

poke :: Ptr (Identity a) -> Identity a -> IO () #

Storable a => Storable (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

sizeOf :: Down a -> Int #

alignment :: Down a -> Int #

peekElemOff :: Ptr (Down a) -> Int -> IO (Down a) #

pokeElemOff :: Ptr (Down a) -> Int -> Down a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Down a) #

pokeByteOff :: Ptr b -> Int -> Down a -> IO () #

peek :: Ptr (Down a) -> IO (Down a) #

poke :: Ptr (Down a) -> Down a -> IO () #

Storable (ConstPtr a) 
Instance details

Defined in Foreign.Storable

Methods

sizeOf :: ConstPtr a -> Int #

alignment :: ConstPtr a -> Int #

peekElemOff :: Ptr (ConstPtr a) -> Int -> IO (ConstPtr a) #

pokeElemOff :: Ptr (ConstPtr a) -> Int -> ConstPtr a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (ConstPtr a) #

pokeByteOff :: Ptr b -> Int -> ConstPtr a -> IO () #

peek :: Ptr (ConstPtr a) -> IO (ConstPtr a) #

poke :: Ptr (ConstPtr a) -> ConstPtr a -> IO () #

Storable (FunPtr a)

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: FunPtr a -> Int #

alignment :: FunPtr a -> Int #

peekElemOff :: Ptr (FunPtr a) -> Int -> IO (FunPtr a) #

pokeElemOff :: Ptr (FunPtr a) -> Int -> FunPtr a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (FunPtr a) #

pokeByteOff :: Ptr b -> Int -> FunPtr a -> IO () #

peek :: Ptr (FunPtr a) -> IO (FunPtr a) #

poke :: Ptr (FunPtr a) -> FunPtr a -> IO () #

Storable (Ptr a)

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Ptr a -> Int #

alignment :: Ptr a -> Int #

peekElemOff :: Ptr (Ptr a) -> Int -> IO (Ptr a) #

pokeElemOff :: Ptr (Ptr a) -> Int -> Ptr a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Ptr a) #

pokeByteOff :: Ptr b -> Int -> Ptr a -> IO () #

peek :: Ptr (Ptr a) -> IO (Ptr a) #

poke :: Ptr (Ptr a) -> Ptr a -> IO () #

(Storable a, Integral a) => Storable (Ratio a)

Since: base-4.8.0.0

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Ratio a -> Int #

alignment :: Ratio a -> Int #

peekElemOff :: Ptr (Ratio a) -> Int -> IO (Ratio a) #

pokeElemOff :: Ptr (Ratio a) -> Int -> Ratio a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Ratio a) #

pokeByteOff :: Ptr b -> Int -> Ratio a -> IO () #

peek :: Ptr (Ratio a) -> IO (Ratio a) #

poke :: Ptr (Ratio a) -> Ratio a -> IO () #

Storable (StablePtr a)

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: StablePtr a -> Int #

alignment :: StablePtr a -> Int #

peekElemOff :: Ptr (StablePtr a) -> Int -> IO (StablePtr a) #

pokeElemOff :: Ptr (StablePtr a) -> Int -> StablePtr a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (StablePtr a) #

pokeByteOff :: Ptr b -> Int -> StablePtr a -> IO () #

peek :: Ptr (StablePtr a) -> IO (StablePtr a) #

poke :: Ptr (StablePtr a) -> StablePtr a -> IO () #

Prim a => Storable (PrimStorable a) 
Instance details

Defined in Data.Primitive.Types

Storable g => Storable (StateGen g) 
Instance details

Defined in System.Random.Internal

Methods

sizeOf :: StateGen g -> Int #

alignment :: StateGen g -> Int #

peekElemOff :: Ptr (StateGen g) -> Int -> IO (StateGen g) #

pokeElemOff :: Ptr (StateGen g) -> Int -> StateGen g -> IO () #

peekByteOff :: Ptr b -> Int -> IO (StateGen g) #

pokeByteOff :: Ptr b -> Int -> StateGen g -> IO () #

peek :: Ptr (StateGen g) -> IO (StateGen g) #

poke :: Ptr (StateGen g) -> StateGen g -> IO () #

Storable g => Storable (AtomicGen g) 
Instance details

Defined in System.Random.Stateful

Methods

sizeOf :: AtomicGen g -> Int #

alignment :: AtomicGen g -> Int #

peekElemOff :: Ptr (AtomicGen g) -> Int -> IO (AtomicGen g) #

pokeElemOff :: Ptr (AtomicGen g) -> Int -> AtomicGen g -> IO () #

peekByteOff :: Ptr b -> Int -> IO (AtomicGen g) #

pokeByteOff :: Ptr b -> Int -> AtomicGen g -> IO () #

peek :: Ptr (AtomicGen g) -> IO (AtomicGen g) #

poke :: Ptr (AtomicGen g) -> AtomicGen g -> IO () #

Storable g => Storable (IOGen g) 
Instance details

Defined in System.Random.Stateful

Methods

sizeOf :: IOGen g -> Int #

alignment :: IOGen g -> Int #

peekElemOff :: Ptr (IOGen g) -> Int -> IO (IOGen g) #

pokeElemOff :: Ptr (IOGen g) -> Int -> IOGen g -> IO () #

peekByteOff :: Ptr b -> Int -> IO (IOGen g) #

pokeByteOff :: Ptr b -> Int -> IOGen g -> IO () #

peek :: Ptr (IOGen g) -> IO (IOGen g) #

poke :: Ptr (IOGen g) -> IOGen g -> IO () #

Storable g => Storable (STGen g) 
Instance details

Defined in System.Random.Stateful

Methods

sizeOf :: STGen g -> Int #

alignment :: STGen g -> Int #

peekElemOff :: Ptr (STGen g) -> Int -> IO (STGen g) #

pokeElemOff :: Ptr (STGen g) -> Int -> STGen g -> IO () #

peekByteOff :: Ptr b -> Int -> IO (STGen g) #

pokeByteOff :: Ptr b -> Int -> STGen g -> IO () #

peek :: Ptr (STGen g) -> IO (STGen g) #

poke :: Ptr (STGen g) -> STGen g -> IO () #

Storable g => Storable (TGen g) 
Instance details

Defined in System.Random.Stateful

Methods

sizeOf :: TGen g -> Int #

alignment :: TGen g -> Int #

peekElemOff :: Ptr (TGen g) -> Int -> IO (TGen g) #

pokeElemOff :: Ptr (TGen g) -> Int -> TGen g -> IO () #

peekByteOff :: Ptr b -> Int -> IO (TGen g) #

pokeByteOff :: Ptr b -> Int -> TGen g -> IO () #

peek :: Ptr (TGen g) -> IO (TGen g) #

poke :: Ptr (TGen g) -> TGen g -> IO () #

Storable a => Storable (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

sizeOf :: Const a b -> Int #

alignment :: Const a b -> Int #

peekElemOff :: Ptr (Const a b) -> Int -> IO (Const a b) #

pokeElemOff :: Ptr (Const a b) -> Int -> Const a b -> IO () #

peekByteOff :: Ptr b0 -> Int -> IO (Const a b) #

pokeByteOff :: Ptr b0 -> Int -> Const a b -> IO () #

peek :: Ptr (Const a b) -> IO (Const a b) #

poke :: Ptr (Const a b) -> Const a b -> IO () #

Storable a => Storable (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

sizeOf :: Tagged s a -> Int #

alignment :: Tagged s a -> Int #

peekElemOff :: Ptr (Tagged s a) -> Int -> IO (Tagged s a) #

pokeElemOff :: Ptr (Tagged s a) -> Int -> Tagged s a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Tagged s a) #

pokeByteOff :: Ptr b -> Int -> Tagged s a -> IO () #

peek :: Ptr (Tagged s a) -> IO (Tagged s a) #

poke :: Ptr (Tagged s a) -> Tagged s a -> IO () #

data MVar a #

An MVar (pronounced "em-var") is a synchronising variable, used for communication between concurrent threads. It can be thought of as a box, which may be empty or full.

Instances

Instances details
NFData1 MVar

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> MVar a -> () #

NFData (MVar a)

NOTE: Only strict in the reference and not the referenced value.

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: MVar a -> () #

Eq (MVar a)

Since: base-4.1.0.0

Instance details

Defined in GHC.MVar

Methods

(==) :: MVar a -> MVar a -> Bool #

(/=) :: MVar a -> MVar a -> Bool #

class (Typeable e, Show e) => Exception e where #

Any type that you wish to throw or catch as an exception must be an instance of the Exception class. The simplest case is a new exception type directly below the root:

data MyException = ThisException | ThatException
    deriving Show

instance Exception MyException

The default method definitions in the Exception class do what we need in this case. You can now throw and catch ThisException and ThatException as exceptions:

*Main> throw ThisException `catch` \e -> putStrLn ("Caught " ++ show (e :: MyException))
Caught ThisException

In more complicated examples, you may wish to define a whole hierarchy of exceptions:

---------------------------------------------------------------------
-- Make the root exception type for all the exceptions in a compiler

data SomeCompilerException = forall e . Exception e => SomeCompilerException e

instance Show SomeCompilerException where
    show (SomeCompilerException e) = show e

instance Exception SomeCompilerException

compilerExceptionToException :: Exception e => e -> SomeException
compilerExceptionToException = toException . SomeCompilerException

compilerExceptionFromException :: Exception e => SomeException -> Maybe e
compilerExceptionFromException x = do
    SomeCompilerException a <- fromException x
    cast a

---------------------------------------------------------------------
-- Make a subhierarchy for exceptions in the frontend of the compiler

data SomeFrontendException = forall e . Exception e => SomeFrontendException e

instance Show SomeFrontendException where
    show (SomeFrontendException e) = show e

instance Exception SomeFrontendException where
    toException = compilerExceptionToException
    fromException = compilerExceptionFromException

frontendExceptionToException :: Exception e => e -> SomeException
frontendExceptionToException = toException . SomeFrontendException

frontendExceptionFromException :: Exception e => SomeException -> Maybe e
frontendExceptionFromException x = do
    SomeFrontendException a <- fromException x
    cast a

---------------------------------------------------------------------
-- Make an exception type for a particular frontend compiler exception

data MismatchedParentheses = MismatchedParentheses
    deriving Show

instance Exception MismatchedParentheses where
    toException   = frontendExceptionToException
    fromException = frontendExceptionFromException

We can now catch a MismatchedParentheses exception as MismatchedParentheses, SomeFrontendException or SomeCompilerException, but not other types, e.g. IOException:

*Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: MismatchedParentheses))
Caught MismatchedParentheses
*Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: SomeFrontendException))
Caught MismatchedParentheses
*Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: SomeCompilerException))
Caught MismatchedParentheses
*Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: IOException))
*** Exception: MismatchedParentheses

Minimal complete definition

Nothing

Methods

toException :: e -> SomeException #

fromException :: SomeException -> Maybe e #

displayException :: e -> String #

Render this exception value in a human-friendly manner.

Default implementation: show.

Since: base-4.8.0.0

Instances

Instances details
Exception AesonException 
Instance details

Defined in Data.Aeson.Types.Internal

Exception AsyncCancelled 
Instance details

Defined in Control.Concurrent.Async.Internal

Exception ExceptionInLinkedThread 
Instance details

Defined in Control.Concurrent.Async.Internal

Exception NestedAtomically

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Exception NoMatchingContinuationPrompt

Since: base-4.18

Instance details

Defined in Control.Exception.Base

Exception NoMethodError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Exception NonTermination

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Exception PatternMatchFail

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Exception RecConError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Exception RecSelError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Exception RecUpdError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Exception TypeError

Since: base-4.9.0.0

Instance details

Defined in Control.Exception.Base

Exception Void

Since: base-4.8.0.0

Instance details

Defined in GHC.Exception.Type

Exception ErrorCall

Since: base-4.0.0.0

Instance details

Defined in GHC.Exception

Exception ArithException

Since: base-4.0.0.0

Instance details

Defined in GHC.Exception.Type

Exception SomeException

Since: base-3.0

Instance details

Defined in GHC.Exception.Type

Exception AllocationLimitExceeded

Since: base-4.8.0.0

Instance details

Defined in GHC.IO.Exception

Exception ArrayException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception AssertionFailed

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception AsyncException

Since: base-4.7.0.0

Instance details

Defined in GHC.IO.Exception

Exception BlockedIndefinitelyOnMVar

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception BlockedIndefinitelyOnSTM

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception CompactionFailed

Since: base-4.10.0.0

Instance details

Defined in GHC.IO.Exception

Exception Deadlock

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception ExitCode

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception FixIOException

Since: base-4.11.0.0

Instance details

Defined in GHC.IO.Exception

Exception IOException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception SomeAsyncException

Since: base-4.7.0.0

Instance details

Defined in GHC.IO.Exception

Exception ASCII7_Invalid 
Instance details

Defined in Basement.String.Encoding.ASCII7

Methods

toException :: ASCII7_Invalid -> SomeException #

fromException :: SomeException -> Maybe ASCII7_Invalid #

displayException :: ASCII7_Invalid -> String #

Exception ISO_8859_1_Invalid 
Instance details

Defined in Basement.String.Encoding.ISO_8859_1

Methods

toException :: ISO_8859_1_Invalid -> SomeException #

fromException :: SomeException -> Maybe ISO_8859_1_Invalid #

displayException :: ISO_8859_1_Invalid -> String #

Exception UTF16_Invalid 
Instance details

Defined in Basement.String.Encoding.UTF16

Methods

toException :: UTF16_Invalid -> SomeException #

fromException :: SomeException -> Maybe UTF16_Invalid #

displayException :: UTF16_Invalid -> String #

Exception UTF32_Invalid 
Instance details

Defined in Basement.String.Encoding.UTF32

Methods

toException :: UTF32_Invalid -> SomeException #

fromException :: SomeException -> Maybe UTF32_Invalid #

displayException :: UTF32_Invalid -> String #

Exception CryptoError 
Instance details

Defined in Crypto.Error.Types

Exception HostCannotConnect 
Instance details

Defined in Network.Connection

Exception HostNotResolved 
Instance details

Defined in Network.Connection

Exception LineTooLong 
Instance details

Defined in Network.Connection

Exception CryptoError 
Instance details

Defined in Crypto.Error.Types

Exception EsqueletoError 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Exception OnClauseWithoutMatchingJoinException 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Exception RenderExprException

Since: esqueleto-3.2.0

Instance details

Defined in Database.Esqueleto.Internal.Internal

Exception EncapsulatedPopperException 
Instance details

Defined in Network.HTTP.Client.Request

Methods

toException :: EncapsulatedPopperException -> SomeException #

fromException :: SomeException -> Maybe EncapsulatedPopperException #

displayException :: EncapsulatedPopperException -> String #

Exception HttpException 
Instance details

Defined in Network.HTTP.Client.Types

Exception HttpExceptionContentWrapper 
Instance details

Defined in Network.HTTP.Client.Types

Methods

toException :: HttpExceptionContentWrapper -> SomeException #

fromException :: SomeException -> Maybe HttpExceptionContentWrapper #

displayException :: HttpExceptionContentWrapper -> String #

Exception DigestAuthException 
Instance details

Defined in Network.HTTP.Client.TLS

Exception NullError 
Instance details

Defined in Data.NonNull

Methods

toException :: NullError -> SomeException #

fromException :: SomeException -> Maybe NullError #

displayException :: NullError -> String #

Exception PersistUnsafeMigrationException 
Instance details

Defined in Database.Persist.Sql.Migration

Exception PersistentSqlException 
Instance details

Defined in Database.Persist.Sql.Types

Exception OnlyUniqueException 
Instance details

Defined in Database.Persist.Types.Base

Methods

toException :: OnlyUniqueException -> SomeException #

fromException :: SomeException -> Maybe OnlyUniqueException #

displayException :: OnlyUniqueException -> String #

Exception PersistException 
Instance details

Defined in Database.Persist.Types.Base

Exception UpdateException 
Instance details

Defined in Database.Persist.Types.Base

Exception InvalidAccess 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Exception ResourceCleanupException 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Exception AsyncExceptionWrapper 
Instance details

Defined in Control.Exception.Safe

Exception StringException 
Instance details

Defined in Control.Exception.Safe

Exception SyncExceptionWrapper 
Instance details

Defined in Control.Exception.Safe

Exception StringException

Since: unliftio-0.1.0.0

Instance details

Defined in UnliftIO.Exception

Exception ConcException 
Instance details

Defined in UnliftIO.Internals.Async

Exception RequestParseException 
Instance details

Defined in Network.Wai.Parse

Exception ExceptionInsideResponseBody 
Instance details

Defined in Network.Wai.Handler.Warp.Types

Methods

toException :: ExceptionInsideResponseBody -> SomeException #

fromException :: SomeException -> Maybe ExceptionInsideResponseBody #

displayException :: ExceptionInsideResponseBody -> String #

Exception InvalidRequest 
Instance details

Defined in Network.Wai.Handler.Warp.Types

Exception ParseException 
Instance details

Defined in Data.Yaml.Internal

Exception AuthException 
Instance details

Defined in Yesod.Auth

Exception HandlerContents 
Instance details

Defined in Yesod.Core.Types

data STRef s a #

a value of type STRef s a is a mutable variable in state thread s, containing a value of type a

>>> :{
runST (do
    ref <- newSTRef "hello"
    x <- readSTRef ref
    writeSTRef ref (x ++ "world")
    readSTRef ref )
:}
"helloworld"

Instances

Instances details
NFData2 STRef

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> STRef a b -> () #

NFData1 (STRef s)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> STRef s a -> () #

NFData (STRef s a)

NOTE: Only strict in the reference and not the referenced value.

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: STRef s a -> () #

Eq (STRef s a)

Pointer equality.

Since: base-2.1

Instance details

Defined in GHC.STRef

Methods

(==) :: STRef s a -> STRef s a -> Bool #

(/=) :: STRef s a -> STRef s a -> Bool #

Monoid w => MutableCollection (STRef s w) 
Instance details

Defined in Data.Mutable.Class

Associated Types

type CollElement (STRef s w) #

Methods

newColl :: (PrimMonad m, PrimState m ~ MCState (STRef s w)) => m (STRef s w) #

MutableContainer (STRef s a) 
Instance details

Defined in Data.Mutable.Class

Associated Types

type MCState (STRef s a) #

IsSequence a => MutablePopBack (STRef s a) 
Instance details

Defined in Data.Mutable.Class

Methods

popBack :: (PrimMonad m, PrimState m ~ MCState (STRef s a)) => STRef s a -> m (Maybe (CollElement (STRef s a))) #

IsSequence a => MutablePopFront (STRef s a) 
Instance details

Defined in Data.Mutable.Class

Methods

popFront :: (PrimMonad m, PrimState m ~ MCState (STRef s a)) => STRef s a -> m (Maybe (CollElement (STRef s a))) #

IsSequence a => MutablePushBack (STRef s a) 
Instance details

Defined in Data.Mutable.Class

Methods

pushBack :: (PrimMonad m, PrimState m ~ MCState (STRef s a)) => STRef s a -> CollElement (STRef s a) -> m () #

IsSequence a => MutablePushFront (STRef s a) 
Instance details

Defined in Data.Mutable.Class

Methods

pushFront :: (PrimMonad m, PrimState m ~ MCState (STRef s a)) => STRef s a -> CollElement (STRef s a) -> m () #

MutableRef (STRef s a) 
Instance details

Defined in Data.Mutable.Class

Associated Types

type RefElement (STRef s a) #

Methods

newRef :: (PrimMonad m, PrimState m ~ MCState (STRef s a)) => RefElement (STRef s a) -> m (STRef s a) #

readRef :: (PrimMonad m, PrimState m ~ MCState (STRef s a)) => STRef s a -> m (RefElement (STRef s a)) #

writeRef :: (PrimMonad m, PrimState m ~ MCState (STRef s a)) => STRef s a -> RefElement (STRef s a) -> m () #

modifyRef :: (PrimMonad m, PrimState m ~ MCState (STRef s a)) => STRef s a -> (RefElement (STRef s a) -> RefElement (STRef s a)) -> m () #

modifyRef' :: (PrimMonad m, PrimState m ~ MCState (STRef s a)) => STRef s a -> (RefElement (STRef s a) -> RefElement (STRef s a)) -> m () #

type CollElement (STRef s w) 
Instance details

Defined in Data.Mutable.Class

type CollElement (STRef s w) = Element w
type MCState (STRef s a) 
Instance details

Defined in Data.Mutable.Class

type MCState (STRef s a) = s
type RefElement (STRef s a) 
Instance details

Defined in Data.Mutable.Class

type RefElement (STRef s a) = a

type IOError = IOException #

The Haskell 2010 type for exceptions in the IO monad. Any I/O operation may raise an IOException instead of returning a result. For a more general type of exception, including also those that arise in pure code, see Exception.

In Haskell 2010, this is an opaque type.

class Monad m => MonadIO (m :: Type -> Type) where #

Monads in which IO computations may be embedded. Any monad built by applying a sequence of monad transformers to the IO monad will be an instance of this class.

Instances should satisfy the following laws, which state that liftIO is a transformer of monads:

Methods

liftIO :: IO a -> m a #

Lift a computation from the IO monad. This allows us to run IO computations in any monadic stack, so long as it supports these kinds of operations (i.e. IO is the base monad for the stack).

Example

Expand
import Control.Monad.Trans.State -- from the "transformers" library

printState :: Show s => StateT s IO ()
printState = do
  state <- get
  liftIO $ print state

Had we omitted liftIO, we would have ended up with this error:

• Couldn't match type ‘IO’ with ‘StateT s IO’
 Expected type: StateT s IO ()
   Actual type: IO ()

The important part here is the mismatch between StateT s IO () and IO ().

Luckily, we know of a function that takes an IO a and returns an (m a): liftIO, enabling us to run the program and see the expected results:

> evalStateT printState "hello"
"hello"

> evalStateT printState 3
3

Instances

Instances details
MonadIO IO

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.IO.Class

Methods

liftIO :: IO a -> IO a #

MonadIO Acquire 
Instance details

Defined in Data.Acquire.Internal

Methods

liftIO :: IO a -> Acquire a #

MonadIO Q 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

liftIO :: IO a -> Q a #

MonadIO m => MonadIO (CatchT m) 
Instance details

Defined in Control.Monad.Catch.Pure

Methods

liftIO :: IO a -> CatchT m a #

MonadIO m => MonadIO (LoggingT m) 
Instance details

Defined in Control.Monad.Logger

Methods

liftIO :: IO a -> LoggingT m a #

MonadIO m => MonadIO (NoLoggingT m) 
Instance details

Defined in Control.Monad.Logger

Methods

liftIO :: IO a -> NoLoggingT m a #

MonadIO m => MonadIO (WriterLoggingT m) 
Instance details

Defined in Control.Monad.Logger

Methods

liftIO :: IO a -> WriterLoggingT m a #

MonadIO m => MonadIO (ResourceT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

liftIO :: IO a -> ResourceT m a #

MonadIO m => MonadIO (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

liftIO :: IO a -> MaybeT m a #

MonadIO (HandlerFor site) 
Instance details

Defined in Yesod.Core.Types

Methods

liftIO :: IO a -> HandlerFor site a #

MonadIO (WidgetFor site) 
Instance details

Defined in Yesod.Core.Types

Methods

liftIO :: IO a -> WidgetFor site a #

(Functor f, MonadIO m) => MonadIO (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

liftIO :: IO a -> FreeT f m a #

(Monoid w, Functor m, MonadIO m) => MonadIO (AccumT w m) 
Instance details

Defined in Control.Monad.Trans.Accum

Methods

liftIO :: IO a -> AccumT w m a #

MonadIO m => MonadIO (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

liftIO :: IO a -> ExceptT e m a #

MonadIO m => MonadIO (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

liftIO :: IO a -> IdentityT m a #

MonadIO m => MonadIO (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

liftIO :: IO a -> ReaderT r m a #

MonadIO m => MonadIO (SelectT r m) 
Instance details

Defined in Control.Monad.Trans.Select

Methods

liftIO :: IO a -> SelectT r m a #

MonadIO m => MonadIO (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Lazy

Methods

liftIO :: IO a -> StateT s m a #

MonadIO m => MonadIO (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

liftIO :: IO a -> StateT s m a #

MonadIO m => MonadIO (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.CPS

Methods

liftIO :: IO a -> WriterT w m a #

(Monoid w, MonadIO m) => MonadIO (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

liftIO :: IO a -> WriterT w m a #

(Monoid w, MonadIO m) => MonadIO (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

liftIO :: IO a -> WriterT w m a #

MonadIO (SubHandlerFor child master) 
Instance details

Defined in Yesod.Core.Types

Methods

liftIO :: IO a -> SubHandlerFor child master a #

MonadIO m => MonadIO (ConduitT i o m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

liftIO :: IO a -> ConduitT i o m a #

MonadIO m => MonadIO (ContT r m) 
Instance details

Defined in Control.Monad.Trans.Cont

Methods

liftIO :: IO a -> ContT r m a #

MonadIO m => MonadIO (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.CPS

Methods

liftIO :: IO a -> RWST r w s m a #

(Monoid w, MonadIO m) => MonadIO (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Lazy

Methods

liftIO :: IO a -> RWST r w s m a #

(Monoid w, MonadIO m) => MonadIO (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Strict

Methods

liftIO :: IO a -> RWST r w s m a #

MonadIO m => MonadIO (Pipe l i o u m) 
Instance details

Defined in Data.Conduit.Internal.Pipe

Methods

liftIO :: IO a -> Pipe l i o u m a #

data Chan a #

Chan is an abstract type representing an unbounded FIFO channel.

Instances

Instances details
Eq (Chan a)

Since: base-4.4.0.0

Instance details

Defined in Control.Concurrent.Chan

Methods

(==) :: Chan a -> Chan a -> Bool #

(/=) :: Chan a -> Chan a -> Bool #

data IOException #

Exceptions that occur in the IO monad. An IOException records a more specific error type, a descriptive string and maybe the handle that was used when the error was flagged.

Instances

Instances details
Exception IOException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show IOException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Eq IOException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

class Fractional a => Floating a where #

Trigonometric and hyperbolic functions and related functions.

The Haskell Report defines no laws for Floating. However, (+), (*) and exp are customarily expected to define an exponential field and have the following properties:

  • exp (a + b) = exp a * exp b
  • exp (fromInteger 0) = fromInteger 1

Minimal complete definition

pi, exp, log, sin, cos, asin, acos, atan, sinh, cosh, asinh, acosh, atanh

Methods

pi :: a #

exp :: a -> a #

log :: a -> a #

sqrt :: a -> a #

(**) :: a -> a -> a infixr 8 #

logBase :: a -> a -> a #

sin :: a -> a #

cos :: a -> a #

tan :: a -> a #

asin :: a -> a #

acos :: a -> a #

atan :: a -> a #

sinh :: a -> a #

cosh :: a -> a #

tanh :: a -> a #

asinh :: a -> a #

acosh :: a -> a #

atanh :: a -> a #

Instances

Instances details
Floating CDouble 
Instance details

Defined in Foreign.C.Types

Floating CFloat 
Instance details

Defined in Foreign.C.Types

Floating Double

Since: base-2.1

Instance details

Defined in GHC.Float

Floating Float

Since: base-2.1

Instance details

Defined in GHC.Float

RealFloat a => Floating (Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Methods

pi :: Complex a #

exp :: Complex a -> Complex a #

log :: Complex a -> Complex a #

sqrt :: Complex a -> Complex a #

(**) :: Complex a -> Complex a -> Complex a #

logBase :: Complex a -> Complex a -> Complex a #

sin :: Complex a -> Complex a #

cos :: Complex a -> Complex a #

tan :: Complex a -> Complex a #

asin :: Complex a -> Complex a #

acos :: Complex a -> Complex a #

atan :: Complex a -> Complex a #

sinh :: Complex a -> Complex a #

cosh :: Complex a -> Complex a #

tanh :: Complex a -> Complex a #

asinh :: Complex a -> Complex a #

acosh :: Complex a -> Complex a #

atanh :: Complex a -> Complex a #

log1p :: Complex a -> Complex a #

expm1 :: Complex a -> Complex a #

log1pexp :: Complex a -> Complex a #

log1mexp :: Complex a -> Complex a #

Floating a => Floating (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Floating a => Floating (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

pi :: Down a #

exp :: Down a -> Down a #

log :: Down a -> Down a #

sqrt :: Down a -> Down a #

(**) :: Down a -> Down a -> Down a #

logBase :: Down a -> Down a -> Down a #

sin :: Down a -> Down a #

cos :: Down a -> Down a #

tan :: Down a -> Down a #

asin :: Down a -> Down a #

acos :: Down a -> Down a #

atan :: Down a -> Down a #

sinh :: Down a -> Down a #

cosh :: Down a -> Down a #

tanh :: Down a -> Down a #

asinh :: Down a -> Down a #

acosh :: Down a -> Down a #

atanh :: Down a -> Down a #

log1p :: Down a -> Down a #

expm1 :: Down a -> Down a #

log1pexp :: Down a -> Down a #

log1mexp :: Down a -> Down a #

Floating a => Floating (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

pi :: Const a b #

exp :: Const a b -> Const a b #

log :: Const a b -> Const a b #

sqrt :: Const a b -> Const a b #

(**) :: Const a b -> Const a b -> Const a b #

logBase :: Const a b -> Const a b -> Const a b #

sin :: Const a b -> Const a b #

cos :: Const a b -> Const a b #

tan :: Const a b -> Const a b #

asin :: Const a b -> Const a b #

acos :: Const a b -> Const a b #

atan :: Const a b -> Const a b #

sinh :: Const a b -> Const a b #

cosh :: Const a b -> Const a b #

tanh :: Const a b -> Const a b #

asinh :: Const a b -> Const a b #

acosh :: Const a b -> Const a b #

atanh :: Const a b -> Const a b #

log1p :: Const a b -> Const a b #

expm1 :: Const a b -> Const a b #

log1pexp :: Const a b -> Const a b #

log1mexp :: Const a b -> Const a b #

Floating a => Floating (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

pi :: Tagged s a #

exp :: Tagged s a -> Tagged s a #

log :: Tagged s a -> Tagged s a #

sqrt :: Tagged s a -> Tagged s a #

(**) :: Tagged s a -> Tagged s a -> Tagged s a #

logBase :: Tagged s a -> Tagged s a -> Tagged s a #

sin :: Tagged s a -> Tagged s a #

cos :: Tagged s a -> Tagged s a #

tan :: Tagged s a -> Tagged s a #

asin :: Tagged s a -> Tagged s a #

acos :: Tagged s a -> Tagged s a #

atan :: Tagged s a -> Tagged s a #

sinh :: Tagged s a -> Tagged s a #

cosh :: Tagged s a -> Tagged s a #

tanh :: Tagged s a -> Tagged s a #

asinh :: Tagged s a -> Tagged s a #

acosh :: Tagged s a -> Tagged s a #

atanh :: Tagged s a -> Tagged s a #

log1p :: Tagged s a -> Tagged s a #

expm1 :: Tagged s a -> Tagged s a #

log1pexp :: Tagged s a -> Tagged s a #

log1mexp :: Tagged s a -> Tagged s a #

class Num a where #

Basic numeric class.

The Haskell Report defines no laws for Num. However, (+) and (*) are customarily expected to define a ring and have the following properties:

Associativity of (+)
(x + y) + z = x + (y + z)
Commutativity of (+)
x + y = y + x
fromInteger 0 is the additive identity
x + fromInteger 0 = x
negate gives the additive inverse
x + negate x = fromInteger 0
Associativity of (*)
(x * y) * z = x * (y * z)
fromInteger 1 is the multiplicative identity
x * fromInteger 1 = x and fromInteger 1 * x = x
Distributivity of (*) with respect to (+)
a * (b + c) = (a * b) + (a * c) and (b + c) * a = (b * a) + (c * a)
Coherence with toInteger
if the type also implements Integral, then fromInteger is a left inverse for toInteger, i.e. fromInteger (toInteger i) == i

Note that it isn't customarily expected that a type instance of both Num and Ord implement an ordered ring. Indeed, in base only Integer and Rational do.

Minimal complete definition

(+), (*), abs, signum, fromInteger, (negate | (-))

Methods

(+) :: a -> a -> a infixl 6 #

(-) :: a -> a -> a infixl 6 #

(*) :: a -> a -> a infixl 7 #

negate :: a -> a #

Unary negation.

abs :: a -> a #

Absolute value.

signum :: a -> a #

Sign of a number. The functions abs and signum should satisfy the law:

abs x * signum x == x

For real numbers, the signum is either -1 (negative), 0 (zero) or 1 (positive).

fromInteger :: Integer -> a #

Conversion from an Integer. An integer literal represents the application of the function fromInteger to the appropriate value of type Integer, so such literals have type (Num a) => a.

Instances

Instances details
Num Pos 
Instance details

Defined in Data.Attoparsec.Internal.Types

Methods

(+) :: Pos -> Pos -> Pos #

(-) :: Pos -> Pos -> Pos #

(*) :: Pos -> Pos -> Pos #

negate :: Pos -> Pos #

abs :: Pos -> Pos #

signum :: Pos -> Pos #

fromInteger :: Integer -> Pos #

Num CBool 
Instance details

Defined in Foreign.C.Types

Num CChar 
Instance details

Defined in Foreign.C.Types

Num CClock 
Instance details

Defined in Foreign.C.Types

Num CDouble 
Instance details

Defined in Foreign.C.Types

Num CFloat 
Instance details

Defined in Foreign.C.Types

Num CInt 
Instance details

Defined in Foreign.C.Types

Methods

(+) :: CInt -> CInt -> CInt #

(-) :: CInt -> CInt -> CInt #

(*) :: CInt -> CInt -> CInt #

negate :: CInt -> CInt #

abs :: CInt -> CInt #

signum :: CInt -> CInt #

fromInteger :: Integer -> CInt #

Num CIntMax 
Instance details

Defined in Foreign.C.Types

Num CIntPtr 
Instance details

Defined in Foreign.C.Types

Num CLLong 
Instance details

Defined in Foreign.C.Types

Num CLong 
Instance details

Defined in Foreign.C.Types

Num CPtrdiff 
Instance details

Defined in Foreign.C.Types

Num CSChar 
Instance details

Defined in Foreign.C.Types

Num CSUSeconds 
Instance details

Defined in Foreign.C.Types

Num CShort 
Instance details

Defined in Foreign.C.Types

Num CSigAtomic 
Instance details

Defined in Foreign.C.Types

Num CSize 
Instance details

Defined in Foreign.C.Types

Num CTime 
Instance details

Defined in Foreign.C.Types

Num CUChar 
Instance details

Defined in Foreign.C.Types

Num CUInt 
Instance details

Defined in Foreign.C.Types

Num CUIntMax 
Instance details

Defined in Foreign.C.Types

Num CUIntPtr 
Instance details

Defined in Foreign.C.Types

Num CULLong 
Instance details

Defined in Foreign.C.Types

Num CULong 
Instance details

Defined in Foreign.C.Types

Num CUSeconds 
Instance details

Defined in Foreign.C.Types

Num CUShort 
Instance details

Defined in Foreign.C.Types

Num CWchar 
Instance details

Defined in Foreign.C.Types

Num Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Num Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Num Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Num Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

(+) :: Int8 -> Int8 -> Int8 #

(-) :: Int8 -> Int8 -> Int8 #

(*) :: Int8 -> Int8 -> Int8 #

negate :: Int8 -> Int8 #

abs :: Int8 -> Int8 #

signum :: Int8 -> Int8 #

fromInteger :: Integer -> Int8 #

Num Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Num Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Num Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Num Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Num PortNumber 
Instance details

Defined in Network.Socket.Types

Num OverflowNatural 
Instance details

Defined in Database.Persist.Class.PersistField

Num Scientific

WARNING: + and - compute the Integer magnitude: 10^e where e is the difference between the base10Exponents of the arguments. If these methods are applied to arguments which have huge exponents this could fill up all space and crash your program! So don't apply these methods to scientific numbers coming from untrusted sources. The other methods can be used safely.

Instance details

Defined in Data.Scientific

Num AbsoluteSize 
Instance details

Defined in Text.Internal.CssCommon

Num EmSize 
Instance details

Defined in Text.Internal.CssCommon

Num ExSize 
Instance details

Defined in Text.Internal.CssCommon

Num PercentageSize 
Instance details

Defined in Text.Internal.CssCommon

Num PixelSize 
Instance details

Defined in Text.Internal.CssCommon

Num B 
Instance details

Defined in Data.Text.Short.Internal

Methods

(+) :: B -> B -> B #

(-) :: B -> B -> B #

(*) :: B -> B -> B #

negate :: B -> B #

abs :: B -> B #

signum :: B -> B #

fromInteger :: Integer -> B #

Num DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Num NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Num Integer

Since: base-2.1

Instance details

Defined in GHC.Num

Num Natural

Note that Natural's Num instance isn't a ring: no element but 0 has an additive inverse. It is a semiring though.

Since: base-4.8.0.0

Instance details

Defined in GHC.Num

Num Int

Since: base-2.1

Instance details

Defined in GHC.Num

Methods

(+) :: Int -> Int -> Int #

(-) :: Int -> Int -> Int #

(*) :: Int -> Int -> Int #

negate :: Int -> Int #

abs :: Int -> Int #

signum :: Int -> Int #

fromInteger :: Integer -> Int #

Num Word

Since: base-2.1

Instance details

Defined in GHC.Num

Methods

(+) :: Word -> Word -> Word #

(-) :: Word -> Word -> Word #

(*) :: Word -> Word -> Word #

negate :: Word -> Word #

abs :: Word -> Word #

signum :: Word -> Word #

fromInteger :: Integer -> Word #

RealFloat a => Num (Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Methods

(+) :: Complex a -> Complex a -> Complex a #

(-) :: Complex a -> Complex a -> Complex a #

(*) :: Complex a -> Complex a -> Complex a #

negate :: Complex a -> Complex a #

abs :: Complex a -> Complex a #

signum :: Complex a -> Complex a #

fromInteger :: Integer -> Complex a #

Num a => Num (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Num a => Num (Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

(+) :: Down a -> Down a -> Down a #

(-) :: Down a -> Down a -> Down a #

(*) :: Down a -> Down a -> Down a #

negate :: Down a -> Down a #

abs :: Down a -> Down a #

signum :: Down a -> Down a #

fromInteger :: Integer -> Down a #

Num a => Num (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(+) :: Max a -> Max a -> Max a #

(-) :: Max a -> Max a -> Max a #

(*) :: Max a -> Max a -> Max a #

negate :: Max a -> Max a #

abs :: Max a -> Max a #

signum :: Max a -> Max a #

fromInteger :: Integer -> Max a #

Num a => Num (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(+) :: Min a -> Min a -> Min a #

(-) :: Min a -> Min a -> Min a #

(*) :: Min a -> Min a -> Min a #

negate :: Min a -> Min a #

abs :: Min a -> Min a #

signum :: Min a -> Min a #

fromInteger :: Integer -> Min a #

Num a => Num (Product a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(+) :: Product a -> Product a -> Product a #

(-) :: Product a -> Product a -> Product a #

(*) :: Product a -> Product a -> Product a #

negate :: Product a -> Product a #

abs :: Product a -> Product a #

signum :: Product a -> Product a #

fromInteger :: Integer -> Product a #

Num a => Num (Sum a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(+) :: Sum a -> Sum a -> Sum a #

(-) :: Sum a -> Sum a -> Sum a #

(*) :: Sum a -> Sum a -> Sum a #

negate :: Sum a -> Sum a #

abs :: Sum a -> Sum a #

signum :: Sum a -> Sum a #

fromInteger :: Integer -> Sum a #

Integral a => Num (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

(+) :: Ratio a -> Ratio a -> Ratio a #

(-) :: Ratio a -> Ratio a -> Ratio a #

(*) :: Ratio a -> Ratio a -> Ratio a #

negate :: Ratio a -> Ratio a #

abs :: Ratio a -> Ratio a #

signum :: Ratio a -> Ratio a #

fromInteger :: Integer -> Ratio a #

KnownNat n => Num (Zn n) 
Instance details

Defined in Basement.Bounded

Methods

(+) :: Zn n -> Zn n -> Zn n #

(-) :: Zn n -> Zn n -> Zn n #

(*) :: Zn n -> Zn n -> Zn n #

negate :: Zn n -> Zn n #

abs :: Zn n -> Zn n #

signum :: Zn n -> Zn n #

fromInteger :: Integer -> Zn n #

(KnownNat n, NatWithinBound Word64 n) => Num (Zn64 n) 
Instance details

Defined in Basement.Bounded

Methods

(+) :: Zn64 n -> Zn64 n -> Zn64 n #

(-) :: Zn64 n -> Zn64 n -> Zn64 n #

(*) :: Zn64 n -> Zn64 n -> Zn64 n #

negate :: Zn64 n -> Zn64 n #

abs :: Zn64 n -> Zn64 n #

signum :: Zn64 n -> Zn64 n #

fromInteger :: Integer -> Zn64 n #

Num (CountOf ty) 
Instance details

Defined in Basement.Types.OffsetSize

Methods

(+) :: CountOf ty -> CountOf ty -> CountOf ty #

(-) :: CountOf ty -> CountOf ty -> CountOf ty #

(*) :: CountOf ty -> CountOf ty -> CountOf ty #

negate :: CountOf ty -> CountOf ty #

abs :: CountOf ty -> CountOf ty #

signum :: CountOf ty -> CountOf ty #

fromInteger :: Integer -> CountOf ty #

Num (Offset ty) 
Instance details

Defined in Basement.Types.OffsetSize

Methods

(+) :: Offset ty -> Offset ty -> Offset ty #

(-) :: Offset ty -> Offset ty -> Offset ty #

(*) :: Offset ty -> Offset ty -> Offset ty #

negate :: Offset ty -> Offset ty #

abs :: Offset ty -> Offset ty #

signum :: Offset ty -> Offset ty #

fromInteger :: Integer -> Offset ty #

(BackendCompatible b s, Num (BackendKey b)) => Num (BackendKey (Compatible b s)) 
Instance details

Defined in Database.Persist.Compatible.Types

(PersistCore b, PersistCore (RawSqlite b), Num (BackendKey b)) => Num (BackendKey (RawSqlite b)) 
Instance details

Defined in Database.Persist.Sqlite

HasResolution a => Num (Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Methods

(+) :: Fixed a -> Fixed a -> Fixed a #

(-) :: Fixed a -> Fixed a -> Fixed a #

(*) :: Fixed a -> Fixed a -> Fixed a #

negate :: Fixed a -> Fixed a #

abs :: Fixed a -> Fixed a #

signum :: Fixed a -> Fixed a #

fromInteger :: Integer -> Fixed a #

Num a => Num (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

(+) :: Const a b -> Const a b -> Const a b #

(-) :: Const a b -> Const a b -> Const a b #

(*) :: Const a b -> Const a b -> Const a b #

negate :: Const a b -> Const a b #

abs :: Const a b -> Const a b #

signum :: Const a b -> Const a b #

fromInteger :: Integer -> Const a b #

(Applicative f, Num a) => Num (Ap f a)

Note that even if the underlying Num and Applicative instances are lawful, for most Applicatives, this instance will not be lawful. If you use this instance with the list Applicative, the following customary laws will not hold:

Commutativity:

>>> Ap [10,20] + Ap [1,2]
Ap {getAp = [11,12,21,22]}
>>> Ap [1,2] + Ap [10,20]
Ap {getAp = [11,21,12,22]}

Additive inverse:

>>> Ap [] + negate (Ap [])
Ap {getAp = []}
>>> fromInteger 0 :: Ap [] Int
Ap {getAp = [0]}

Distributivity:

>>> Ap [1,2] * (3 + 4)
Ap {getAp = [7,14]}
>>> (Ap [1,2] * 3) + (Ap [1,2] * 4)
Ap {getAp = [7,11,10,14]}

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

(+) :: Ap f a -> Ap f a -> Ap f a #

(-) :: Ap f a -> Ap f a -> Ap f a #

(*) :: Ap f a -> Ap f a -> Ap f a #

negate :: Ap f a -> Ap f a #

abs :: Ap f a -> Ap f a #

signum :: Ap f a -> Ap f a #

fromInteger :: Integer -> Ap f a #

Num (f a) => Num (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(+) :: Alt f a -> Alt f a -> Alt f a #

(-) :: Alt f a -> Alt f a -> Alt f a #

(*) :: Alt f a -> Alt f a -> Alt f a #

negate :: Alt f a -> Alt f a #

abs :: Alt f a -> Alt f a #

signum :: Alt f a -> Alt f a #

fromInteger :: Integer -> Alt f a #

Num a => Num (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

(+) :: Tagged s a -> Tagged s a -> Tagged s a #

(-) :: Tagged s a -> Tagged s a -> Tagged s a #

(*) :: Tagged s a -> Tagged s a -> Tagged s a #

negate :: Tagged s a -> Tagged s a #

abs :: Tagged s a -> Tagged s a #

signum :: Tagged s a -> Tagged s a #

fromInteger :: Integer -> Tagged s a #

class (RealFrac a, Floating a) => RealFloat a where #

Efficient, machine-independent access to the components of a floating-point number.

Methods

floatRadix :: a -> Integer #

a constant function, returning the radix of the representation (often 2)

floatDigits :: a -> Int #

a constant function, returning the number of digits of floatRadix in the significand

floatRange :: a -> (Int, Int) #

a constant function, returning the lowest and highest values the exponent may assume

decodeFloat :: a -> (Integer, Int) #

The function decodeFloat applied to a real floating-point number returns the significand expressed as an Integer and an appropriately scaled exponent (an Int). If decodeFloat x yields (m,n), then x is equal in value to m*b^^n, where b is the floating-point radix, and furthermore, either m and n are both zero or else b^(d-1) <= abs m < b^d, where d is the value of floatDigits x. In particular, decodeFloat 0 = (0,0). If the type contains a negative zero, also decodeFloat (-0.0) = (0,0). The result of decodeFloat x is unspecified if either of isNaN x or isInfinite x is True.

encodeFloat :: Integer -> Int -> a #

encodeFloat performs the inverse of decodeFloat in the sense that for finite x with the exception of -0.0, uncurry encodeFloat (decodeFloat x) = x. encodeFloat m n is one of the two closest representable floating-point numbers to m*b^^n (or ±Infinity if overflow occurs); usually the closer, but if m contains too many bits, the result may be rounded in the wrong direction.

exponent :: a -> Int #

exponent corresponds to the second component of decodeFloat. exponent 0 = 0 and for finite nonzero x, exponent x = snd (decodeFloat x) + floatDigits x. If x is a finite floating-point number, it is equal in value to significand x * b ^^ exponent x, where b is the floating-point radix. The behaviour is unspecified on infinite or NaN values.

significand :: a -> a #

The first component of decodeFloat, scaled to lie in the open interval (-1,1), either 0.0 or of absolute value >= 1/b, where b is the floating-point radix. The behaviour is unspecified on infinite or NaN values.

scaleFloat :: Int -> a -> a #

multiplies a floating-point number by an integer power of the radix

isNaN :: a -> Bool #

True if the argument is an IEEE "not-a-number" (NaN) value

isInfinite :: a -> Bool #

True if the argument is an IEEE infinity or negative infinity

isDenormalized :: a -> Bool #

True if the argument is too small to be represented in normalized format

isNegativeZero :: a -> Bool #

True if the argument is an IEEE negative zero

isIEEE :: a -> Bool #

True if the argument is an IEEE floating point number

atan2 :: a -> a -> a #

a version of arctangent taking two real floating-point arguments. For real floating x and y, atan2 y x computes the angle (from the positive x-axis) of the vector from the origin to the point (x,y). atan2 y x returns a value in the range [-pi, pi]. It follows the Common Lisp semantics for the origin when signed zeroes are supported. atan2 y 1, with y in a type that is RealFloat, should return the same value as atan y. A default definition of atan2 is provided, but implementors can provide a more accurate implementation.

Instances

Instances details
RealFloat CDouble 
Instance details

Defined in Foreign.C.Types

RealFloat CFloat 
Instance details

Defined in Foreign.C.Types

RealFloat Double

Since: base-2.1

Instance details

Defined in GHC.Float

RealFloat Float

Since: base-2.1

Instance details

Defined in GHC.Float

RealFloat a => RealFloat (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

RealFloat a => RealFloat (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

RealFloat a => RealFloat (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

floatRadix :: Const a b -> Integer #

floatDigits :: Const a b -> Int #

floatRange :: Const a b -> (Int, Int) #

decodeFloat :: Const a b -> (Integer, Int) #

encodeFloat :: Integer -> Int -> Const a b #

exponent :: Const a b -> Int #

significand :: Const a b -> Const a b #

scaleFloat :: Int -> Const a b -> Const a b #

isNaN :: Const a b -> Bool #

isInfinite :: Const a b -> Bool #

isDenormalized :: Const a b -> Bool #

isNegativeZero :: Const a b -> Bool #

isIEEE :: Const a b -> Bool #

atan2 :: Const a b -> Const a b -> Const a b #

RealFloat a => RealFloat (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

floatRadix :: Tagged s a -> Integer #

floatDigits :: Tagged s a -> Int #

floatRange :: Tagged s a -> (Int, Int) #

decodeFloat :: Tagged s a -> (Integer, Int) #

encodeFloat :: Integer -> Int -> Tagged s a #

exponent :: Tagged s a -> Int #

significand :: Tagged s a -> Tagged s a #

scaleFloat :: Int -> Tagged s a -> Tagged s a #

isNaN :: Tagged s a -> Bool #

isInfinite :: Tagged s a -> Bool #

isDenormalized :: Tagged s a -> Bool #

isNegativeZero :: Tagged s a -> Bool #

isIEEE :: Tagged s a -> Bool #

atan2 :: Tagged s a -> Tagged s a -> Tagged s a #

data SomeException #

The SomeException type is the root of the exception type hierarchy. When an exception of type e is thrown, behind the scenes it is encapsulated in a SomeException.

Constructors

Exception e => SomeException e 

Instances

Instances details
Exception SomeException

Since: base-3.0

Instance details

Defined in GHC.Exception.Type

Show SomeException

Since: base-3.0

Instance details

Defined in GHC.Exception.Type

data TVar a #

Shared memory locations that support atomic memory transactions.

Instances

Instances details
Eq (TVar a)

Since: base-4.8.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

(==) :: TVar a -> TVar a -> Bool #

(/=) :: TVar a -> TVar a -> Bool #

newtype Down a #

The Down type allows you to reverse sort order conveniently. A value of type Down a contains a value of type a (represented as Down a).

If a has an Ord instance associated with it then comparing two values thus wrapped will give you the opposite of their normal sort order. This is particularly useful when sorting in generalised list comprehensions, as in: then sortWith by Down x.

>>> compare True False
GT
>>> compare (Down True) (Down False)
LT

If a has a Bounded instance then the wrapped instance also respects the reversed ordering by exchanging the values of minBound and maxBound.

>>> minBound :: Int
-9223372036854775808
>>> minBound :: Down Int
Down 9223372036854775807

All other instances of Down a behave as they do for a.

Since: base-4.6.0.0

Constructors

Down 

Fields

Instances

Instances details
FromJSON1 Down

Since: aeson-2.2.0.0

Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (Down a) #

liftParseJSONList :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [Down a] #

liftOmittedField :: Maybe a -> Maybe (Down a) #

ToJSON1 Down

Since: aeson-2.2.0.0

Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> Down a -> Value #

liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [Down a] -> Value #

liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> Down a -> Encoding #

liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [Down a] -> Encoding #

liftOmitField :: (a -> Bool) -> Down a -> Bool #

Foldable Down

Since: base-4.12.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Down m -> m #

foldMap :: Monoid m => (a -> m) -> Down a -> m #

foldMap' :: Monoid m => (a -> m) -> Down a -> m #

foldr :: (a -> b -> b) -> b -> Down a -> b #

foldr' :: (a -> b -> b) -> b -> Down a -> b #

foldl :: (b -> a -> b) -> b -> Down a -> b #

foldl' :: (b -> a -> b) -> b -> Down a -> b #

foldr1 :: (a -> a -> a) -> Down a -> a #

foldl1 :: (a -> a -> a) -> Down a -> a #

toList :: Down a -> [a] #

null :: Down a -> Bool #

length :: Down a -> Int #

elem :: Eq a => a -> Down a -> Bool #

maximum :: Ord a => Down a -> a #

minimum :: Ord a => Down a -> a #

sum :: Num a => Down a -> a #

product :: Num a => Down a -> a #

Traversable Down

Since: base-4.12.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Down a -> f (Down b) #

sequenceA :: Applicative f => Down (f a) -> f (Down a) #

mapM :: Monad m => (a -> m b) -> Down a -> m (Down b) #

sequence :: Monad m => Down (m a) -> m (Down a) #

Applicative Down

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

pure :: a -> Down a #

(<*>) :: Down (a -> b) -> Down a -> Down b #

liftA2 :: (a -> b -> c) -> Down a -> Down b -> Down c #

(*>) :: Down a -> Down b -> Down b #

(<*) :: Down a -> Down b -> Down a #

Functor Down

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

fmap :: (a -> b) -> Down a -> Down b #

(<$) :: a -> Down b -> Down a #

Monad Down

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

(>>=) :: Down a -> (a -> Down b) -> Down b #

(>>) :: Down a -> Down b -> Down b #

return :: a -> Down a #

NFData1 Down

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Down a -> () #

Generic1 Down 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 Down :: k -> Type #

Methods

from1 :: forall (a :: k). Down a -> Rep1 Down a #

to1 :: forall (a :: k). Rep1 Down a -> Down a #

Unbox a => Vector Vector (Down a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: Mutable Vector s (Down a) -> ST s (Vector (Down a)) #

basicUnsafeThaw :: Vector (Down a) -> ST s (Mutable Vector s (Down a)) #

basicLength :: Vector (Down a) -> Int #

basicUnsafeSlice :: Int -> Int -> Vector (Down a) -> Vector (Down a) #

basicUnsafeIndexM :: Vector (Down a) -> Int -> Box (Down a) #

basicUnsafeCopy :: Mutable Vector s (Down a) -> Vector (Down a) -> ST s () #

elemseq :: Vector (Down a) -> Down a -> b -> b #

Unbox a => MVector MVector (Down a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s (Down a) -> Int #

basicUnsafeSlice :: Int -> Int -> MVector s (Down a) -> MVector s (Down a) #

basicOverlaps :: MVector s (Down a) -> MVector s (Down a) -> Bool #

basicUnsafeNew :: Int -> ST s (MVector s (Down a)) #

basicInitialize :: MVector s (Down a) -> ST s () #

basicUnsafeReplicate :: Int -> Down a -> ST s (MVector s (Down a)) #

basicUnsafeRead :: MVector s (Down a) -> Int -> ST s (Down a) #

basicUnsafeWrite :: MVector s (Down a) -> Int -> Down a -> ST s () #

basicClear :: MVector s (Down a) -> ST s () #

basicSet :: MVector s (Down a) -> Down a -> ST s () #

basicUnsafeCopy :: MVector s (Down a) -> MVector s (Down a) -> ST s () #

basicUnsafeMove :: MVector s (Down a) -> MVector s (Down a) -> ST s () #

basicUnsafeGrow :: MVector s (Down a) -> Int -> ST s (MVector s (Down a)) #

FromJSON a => FromJSON (Down a)

Since: aeson-2.2.0.0

Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON a => ToJSON (Down a)

Since: aeson-2.2.0.0

Instance details

Defined in Data.Aeson.Types.ToJSON

Storable a => Storable (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

sizeOf :: Down a -> Int #

alignment :: Down a -> Int #

peekElemOff :: Ptr (Down a) -> Int -> IO (Down a) #

pokeElemOff :: Ptr (Down a) -> Int -> Down a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Down a) #

pokeByteOff :: Ptr b -> Int -> Down a -> IO () #

peek :: Ptr (Down a) -> IO (Down a) #

poke :: Ptr (Down a) -> Down a -> IO () #

Monoid a => Monoid (Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

mempty :: Down a #

mappend :: Down a -> Down a -> Down a #

mconcat :: [Down a] -> Down a #

Semigroup a => Semigroup (Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

(<>) :: Down a -> Down a -> Down a #

sconcat :: NonEmpty (Down a) -> Down a #

stimes :: Integral b => b -> Down a -> Down a #

Bits a => Bits (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

(.&.) :: Down a -> Down a -> Down a #

(.|.) :: Down a -> Down a -> Down a #

xor :: Down a -> Down a -> Down a #

complement :: Down a -> Down a #

shift :: Down a -> Int -> Down a #

rotate :: Down a -> Int -> Down a #

zeroBits :: Down a #

bit :: Int -> Down a #

setBit :: Down a -> Int -> Down a #

clearBit :: Down a -> Int -> Down a #

complementBit :: Down a -> Int -> Down a #

testBit :: Down a -> Int -> Bool #

bitSizeMaybe :: Down a -> Maybe Int #

bitSize :: Down a -> Int #

isSigned :: Down a -> Bool #

shiftL :: Down a -> Int -> Down a #

unsafeShiftL :: Down a -> Int -> Down a #

shiftR :: Down a -> Int -> Down a #

unsafeShiftR :: Down a -> Int -> Down a #

rotateL :: Down a -> Int -> Down a #

rotateR :: Down a -> Int -> Down a #

popCount :: Down a -> Int #

FiniteBits a => FiniteBits (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Bounded a => Bounded (Down a)

Swaps minBound and maxBound of the underlying type.

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

minBound :: Down a #

maxBound :: Down a #

(Enum a, Bounded a, Eq a) => Enum (Down a)

Swaps succ and pred of the underlying type.

Since: base-4.18.0.0

Instance details

Defined in Data.Ord

Methods

succ :: Down a -> Down a #

pred :: Down a -> Down a #

toEnum :: Int -> Down a #

fromEnum :: Down a -> Int #

enumFrom :: Down a -> [Down a] #

enumFromThen :: Down a -> Down a -> [Down a] #

enumFromTo :: Down a -> Down a -> [Down a] #

enumFromThenTo :: Down a -> Down a -> Down a -> [Down a] #

Floating a => Floating (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

pi :: Down a #

exp :: Down a -> Down a #

log :: Down a -> Down a #

sqrt :: Down a -> Down a #

(**) :: Down a -> Down a -> Down a #

logBase :: Down a -> Down a -> Down a #

sin :: Down a -> Down a #

cos :: Down a -> Down a #

tan :: Down a -> Down a #

asin :: Down a -> Down a #

acos :: Down a -> Down a #

atan :: Down a -> Down a #

sinh :: Down a -> Down a #

cosh :: Down a -> Down a #

tanh :: Down a -> Down a #

asinh :: Down a -> Down a #

acosh :: Down a -> Down a #

atanh :: Down a -> Down a #

log1p :: Down a -> Down a #

expm1 :: Down a -> Down a #

log1pexp :: Down a -> Down a #

log1mexp :: Down a -> Down a #

RealFloat a => RealFloat (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Generic (Down a) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Down a) :: Type -> Type #

Methods

from :: Down a -> Rep (Down a) x #

to :: Rep (Down a) x -> Down a #

Ix a => Ix (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

range :: (Down a, Down a) -> [Down a] #

index :: (Down a, Down a) -> Down a -> Int #

unsafeIndex :: (Down a, Down a) -> Down a -> Int #

inRange :: (Down a, Down a) -> Down a -> Bool #

rangeSize :: (Down a, Down a) -> Int #

unsafeRangeSize :: (Down a, Down a) -> Int #

Num a => Num (Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

(+) :: Down a -> Down a -> Down a #

(-) :: Down a -> Down a -> Down a #

(*) :: Down a -> Down a -> Down a #

negate :: Down a -> Down a #

abs :: Down a -> Down a #

signum :: Down a -> Down a #

fromInteger :: Integer -> Down a #

Read a => Read (Down a)

This instance would be equivalent to the derived instances of the Down newtype if the getDown field were removed

Since: base-4.7.0.0

Instance details

Defined in Data.Ord

Fractional a => Fractional (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

(/) :: Down a -> Down a -> Down a #

recip :: Down a -> Down a #

fromRational :: Rational -> Down a #

Real a => Real (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

toRational :: Down a -> Rational #

RealFrac a => RealFrac (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

properFraction :: Integral b => Down a -> (b, Down a) #

truncate :: Integral b => Down a -> b #

round :: Integral b => Down a -> b #

ceiling :: Integral b => Down a -> b #

floor :: Integral b => Down a -> b #

Show a => Show (Down a)

This instance would be equivalent to the derived instances of the Down newtype if the getDown field were removed

Since: base-4.7.0.0

Instance details

Defined in Data.Ord

Methods

showsPrec :: Int -> Down a -> ShowS #

show :: Down a -> String #

showList :: [Down a] -> ShowS #

NFData a => NFData (Down a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Down a -> () #

Eq a => Eq (Down a)

Since: base-4.6.0.0

Instance details

Defined in Data.Ord

Methods

(==) :: Down a -> Down a -> Bool #

(/=) :: Down a -> Down a -> Bool #

Ord a => Ord (Down a)

Since: base-4.6.0.0

Instance details

Defined in Data.Ord

Methods

compare :: Down a -> Down a -> Ordering #

(<) :: Down a -> Down a -> Bool #

(<=) :: Down a -> Down a -> Bool #

(>) :: Down a -> Down a -> Bool #

(>=) :: Down a -> Down a -> Bool #

max :: Down a -> Down a -> Down a #

min :: Down a -> Down a -> Down a #

Prim a => Prim (Down a)

Since: primitive-0.6.5.0

Instance details

Defined in Data.Primitive.Types

Unbox a => Unbox (Down a) 
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep1 Down

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

type Rep1 Down = D1 ('MetaData "Down" "Data.Ord" "base" 'True) (C1 ('MetaCons "Down" 'PrefixI 'True) (S1 ('MetaSel ('Just "getDown") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))
newtype MVector s (Down a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s (Down a) = MV_Down (MVector s a)
type Rep (Down a)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

type Rep (Down a) = D1 ('MetaData "Down" "Data.Ord" "base" 'True) (C1 ('MetaCons "Down" 'PrefixI 'True) (S1 ('MetaSel ('Just "getDown") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
newtype Vector (Down a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector (Down a) = V_Down (Vector a)

data IOMode #

Instances

Instances details
Enum IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

Ix IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

Read IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

Show IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

Eq IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

Methods

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

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

Ord IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

type FilePath = String #

File and directory names are values of type String, whose precise meaning is operating system dependent. Files can be opened, yielding a handle which can then be used to operate on the contents of that file.

data IORef a #

A mutable variable in the IO monad.

>>> import Data.IORef
>>> r <- newIORef 0
>>> readIORef r
0
>>> writeIORef r 1
>>> readIORef r
1
>>> atomicWriteIORef r 2
>>> readIORef r
2
>>> modifyIORef' r (+ 1)
>>> readIORef r
3
>>> atomicModifyIORef' r (\a -> (a + 1, ()))
>>> readIORef r
4

See also STRef and MVar.

Instances

Instances details
NFData1 IORef

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> IORef a -> () #

NFData (IORef a)

NOTE: Only strict in the reference and not the referenced value.

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: IORef a -> () #

Eq (IORef a)

Pointer equality.

Since: base-4.0.0.0

Instance details

Defined in GHC.IORef

Methods

(==) :: IORef a -> IORef a -> Bool #

(/=) :: IORef a -> IORef a -> Bool #

MutableAtomicRef (IORef a) 
Instance details

Defined in Data.Mutable.Class

Methods

atomicModifyRef :: (PrimMonad m, PrimState m ~ MCState (IORef a)) => IORef a -> (RefElement (IORef a) -> (RefElement (IORef a), a0)) -> m a0 #

atomicModifyRef' :: (PrimMonad m, PrimState m ~ MCState (IORef a)) => IORef a -> (RefElement (IORef a) -> (RefElement (IORef a), a0)) -> m a0 #

Monoid w => MutableCollection (IORef w) 
Instance details

Defined in Data.Mutable.Class

Associated Types

type CollElement (IORef w) #

Methods

newColl :: (PrimMonad m, PrimState m ~ MCState (IORef w)) => m (IORef w) #

MutableContainer (IORef a) 
Instance details

Defined in Data.Mutable.Class

Associated Types

type MCState (IORef a) #

IsSequence a => MutablePopBack (IORef a) 
Instance details

Defined in Data.Mutable.Class

Methods

popBack :: (PrimMonad m, PrimState m ~ MCState (IORef a)) => IORef a -> m (Maybe (CollElement (IORef a))) #

IsSequence a => MutablePopFront (IORef a) 
Instance details

Defined in Data.Mutable.Class

Methods

popFront :: (PrimMonad m, PrimState m ~ MCState (IORef a)) => IORef a -> m (Maybe (CollElement (IORef a))) #

IsSequence a => MutablePushBack (IORef a) 
Instance details

Defined in Data.Mutable.Class

Methods

pushBack :: (PrimMonad m, PrimState m ~ MCState (IORef a)) => IORef a -> CollElement (IORef a) -> m () #

IsSequence a => MutablePushFront (IORef a) 
Instance details

Defined in Data.Mutable.Class

Methods

pushFront :: (PrimMonad m, PrimState m ~ MCState (IORef a)) => IORef a -> CollElement (IORef a) -> m () #

MutableRef (IORef a) 
Instance details

Defined in Data.Mutable.Class

Associated Types

type RefElement (IORef a) #

Methods

newRef :: (PrimMonad m, PrimState m ~ MCState (IORef a)) => RefElement (IORef a) -> m (IORef a) #

readRef :: (PrimMonad m, PrimState m ~ MCState (IORef a)) => IORef a -> m (RefElement (IORef a)) #

writeRef :: (PrimMonad m, PrimState m ~ MCState (IORef a)) => IORef a -> RefElement (IORef a) -> m () #

modifyRef :: (PrimMonad m, PrimState m ~ MCState (IORef a)) => IORef a -> (RefElement (IORef a) -> RefElement (IORef a)) -> m () #

modifyRef' :: (PrimMonad m, PrimState m ~ MCState (IORef a)) => IORef a -> (RefElement (IORef a) -> RefElement (IORef a)) -> m () #

type CollElement (IORef w) 
Instance details

Defined in Data.Mutable.Class

type MCState (IORef a) 
Instance details

Defined in Data.Mutable.Class

type RefElement (IORef a) 
Instance details

Defined in Data.Mutable.Class

type RefElement (IORef a) = a

data SeekMode #

A mode that determines the effect of hSeek hdl mode i.

Constructors

AbsoluteSeek

the position of hdl is set to i.

RelativeSeek

the position of hdl is set to offset i from the current position.

SeekFromEnd

the position of hdl is set to offset i from the end of the file.

Instances

Instances details
Enum SeekMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Device

Ix SeekMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Device

Read SeekMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Device

Show SeekMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Device

Eq SeekMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Device

Ord SeekMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Device

data BufferMode #

Three kinds of buffering are supported: line-buffering, block-buffering or no-buffering. These modes have the following effects. For output, items are written out, or flushed, from the internal buffer according to the buffer mode:

  • line-buffering: the entire output buffer is flushed whenever a newline is output, the buffer overflows, a hFlush is issued, or the handle is closed.
  • block-buffering: the entire buffer is written out whenever it overflows, a hFlush is issued, or the handle is closed.
  • no-buffering: output is written immediately, and never stored in the buffer.

An implementation is free to flush the buffer more frequently, but not less frequently, than specified above. The output buffer is emptied as soon as it has been written out.

Similarly, input occurs according to the buffer mode for the handle:

  • line-buffering: when the buffer for the handle is not empty, the next item is obtained from the buffer; otherwise, when the buffer is empty, characters up to and including the next newline character are read into the buffer. No characters are available until the newline character is available or the buffer is full.
  • block-buffering: when the buffer for the handle becomes empty, the next block of data is read into the buffer.
  • no-buffering: the next input item is read and returned. The hLookAhead operation implies that even a no-buffered handle may require a one-character buffer.

The default buffering mode when a handle is opened is implementation-dependent and may depend on the file system object which is attached to that handle. For most implementations, physical files will normally be block-buffered and terminals will normally be line-buffered.

Constructors

NoBuffering

buffering is disabled if possible.

LineBuffering

line-buffering should be enabled if possible.

BlockBuffering (Maybe Int)

block-buffering should be enabled if possible. The size of the buffer is n items if the argument is Just n and is otherwise implementation-dependent.

Instances

Instances details
Read BufferMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Handle.Types

Show BufferMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Handle.Types

Eq BufferMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Handle.Types

Ord BufferMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Handle.Types

data IOErrorType #

An abstract type that contains a value for each variant of IOException.

Instances

Instances details
Show IOErrorType

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Eq IOErrorType

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

data SomeAsyncException #

Superclass for asynchronous exceptions.

Since: base-4.7.0.0

Constructors

Exception e => SomeAsyncException e 

newtype Identity a #

Identity functor and monad. (a non-strict monad)

Since: base-4.8.0.0

Constructors

Identity 

Fields

Instances

Instances details
Representable Identity 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep Identity #

Methods

tabulate :: (Rep Identity -> a) -> Identity a #

index :: Identity a -> Rep Identity -> a #

FromJSON1 Identity 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (Identity a) #

liftParseJSONList :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [Identity a] #

liftOmittedField :: Maybe a -> Maybe (Identity a) #

ToJSON1 Identity 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> Identity a -> Value #

liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [Identity a] -> Value #

liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> Identity a -> Encoding #

liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [Identity a] -> Encoding #

liftOmitField :: (a -> Bool) -> Identity a -> Bool #

MonadFix Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

mfix :: (a -> Identity a) -> Identity a #

Foldable Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

fold :: Monoid m => Identity m -> m #

foldMap :: Monoid m => (a -> m) -> Identity a -> m #

foldMap' :: Monoid m => (a -> m) -> Identity a -> m #

foldr :: (a -> b -> b) -> b -> Identity a -> b #

foldr' :: (a -> b -> b) -> b -> Identity a -> b #

foldl :: (b -> a -> b) -> b -> Identity a -> b #

foldl' :: (b -> a -> b) -> b -> Identity a -> b #

foldr1 :: (a -> a -> a) -> Identity a -> a #

foldl1 :: (a -> a -> a) -> Identity a -> a #

toList :: Identity a -> [a] #

null :: Identity a -> Bool #

length :: Identity a -> Int #

elem :: Eq a => a -> Identity a -> Bool #

maximum :: Ord a => Identity a -> a #

minimum :: Ord a => Identity a -> a #

sum :: Num a => Identity a -> a #

product :: Num a => Identity a -> a #

Traversable Identity

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Identity a -> f (Identity b) #

sequenceA :: Applicative f => Identity (f a) -> f (Identity a) #

mapM :: Monad m => (a -> m b) -> Identity a -> m (Identity b) #

sequence :: Monad m => Identity (m a) -> m (Identity a) #

Applicative Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

pure :: a -> Identity a #

(<*>) :: Identity (a -> b) -> Identity a -> Identity b #

liftA2 :: (a -> b -> c) -> Identity a -> Identity b -> Identity c #

(*>) :: Identity a -> Identity b -> Identity b #

(<*) :: Identity a -> Identity b -> Identity a #

Functor Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

fmap :: (a -> b) -> Identity a -> Identity b #

(<$) :: a -> Identity b -> Identity a #

Monad Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

(>>=) :: Identity a -> (a -> Identity b) -> Identity b #

(>>) :: Identity a -> Identity b -> Identity b #

return :: a -> Identity a #

NFData1 Identity

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Identity a -> () #

Hashable1 Identity 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> Identity a -> Int #

Adjustable Identity 
Instance details

Defined in Data.Key

Methods

adjust :: (a -> a) -> Key Identity -> Identity a -> Identity a #

replace :: Key Identity -> a -> Identity a -> Identity a #

FoldableWithKey Identity 
Instance details

Defined in Data.Key

Methods

toKeyedList :: Identity a -> [(Key Identity, a)] #

foldMapWithKey :: Monoid m => (Key Identity -> a -> m) -> Identity a -> m #

foldrWithKey :: (Key Identity -> a -> b -> b) -> b -> Identity a -> b #

foldlWithKey :: (b -> Key Identity -> a -> b) -> b -> Identity a -> b #

FoldableWithKey1 Identity 
Instance details

Defined in Data.Key

Methods

foldMapWithKey1 :: Semigroup m => (Key Identity -> a -> m) -> Identity a -> m #

Indexable Identity 
Instance details

Defined in Data.Key

Methods

index :: Identity a -> Key Identity -> a #

Keyed Identity 
Instance details

Defined in Data.Key

Methods

mapWithKey :: (Key Identity -> a -> b) -> Identity a -> Identity b #

Lookup Identity 
Instance details

Defined in Data.Key

Methods

lookup :: Key Identity -> Identity a -> Maybe a #

TraversableWithKey Identity 
Instance details

Defined in Data.Key

Methods

traverseWithKey :: Applicative f => (Key Identity -> a -> f b) -> Identity a -> f (Identity b) #

mapWithKeyM :: Monad m => (Key Identity -> a -> m b) -> Identity a -> m (Identity b) #

TraversableWithKey1 Identity 
Instance details

Defined in Data.Key

Methods

traverseWithKey1 :: Apply f => (Key Identity -> a -> f b) -> Identity a -> f (Identity b) #

Zip Identity 
Instance details

Defined in Data.Key

Methods

zipWith :: (a -> b -> c) -> Identity a -> Identity b -> Identity c #

zip :: Identity a -> Identity b -> Identity (a, b) #

zap :: Identity (a -> b) -> Identity a -> Identity b #

ZipWithKey Identity 
Instance details

Defined in Data.Key

Methods

zipWithKey :: (Key Identity -> a -> b -> c) -> Identity a -> Identity b -> Identity c #

zapWithKey :: Identity (Key Identity -> a -> b) -> Identity a -> Identity b #

Generic1 Identity 
Instance details

Defined in Data.Functor.Identity

Associated Types

type Rep1 Identity :: k -> Type #

Methods

from1 :: forall (a :: k). Identity a -> Rep1 Identity a #

to1 :: forall (a :: k). Rep1 Identity a -> Identity a #

MonadBaseControl Identity Identity 
Instance details

Defined in Control.Monad.Trans.Control

Associated Types

type StM Identity a #

Unbox a => Vector Vector (Identity a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox a => MVector MVector (Identity a) 
Instance details

Defined in Data.Vector.Unboxed.Base

FromJSON a => FromJSON (Identity a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSONKey a => FromJSONKey (Identity a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON a => ToJSON (Identity a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSONKey a => ToJSONKey (Identity a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

IsString a => IsString (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.String

Methods

fromString :: String -> Identity a #

Storable a => Storable (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Methods

sizeOf :: Identity a -> Int #

alignment :: Identity a -> Int #

peekElemOff :: Ptr (Identity a) -> Int -> IO (Identity a) #

pokeElemOff :: Ptr (Identity a) -> Int -> Identity a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Identity a) #

pokeByteOff :: Ptr b -> Int -> Identity a -> IO () #

peek :: Ptr (Identity a) -> IO (Identity a) #

poke :: Ptr (Identity a) -> Identity a -> IO () #

Monoid a => Monoid (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Methods

mempty :: Identity a #

mappend :: Identity a -> Identity a -> Identity a #

mconcat :: [Identity a] -> Identity a #

Semigroup a => Semigroup (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Methods

(<>) :: Identity a -> Identity a -> Identity a #

sconcat :: NonEmpty (Identity a) -> Identity a #

stimes :: Integral b => b -> Identity a -> Identity a #

Bits a => Bits (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

FiniteBits a => FiniteBits (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Bounded a => Bounded (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Enum a => Enum (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Floating a => Floating (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

RealFloat a => RealFloat (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Generic (Identity a) 
Instance details

Defined in Data.Functor.Identity

Associated Types

type Rep (Identity a) :: Type -> Type #

Methods

from :: Identity a -> Rep (Identity a) x #

to :: Rep (Identity a) x -> Identity a #

Ix a => Ix (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Num a => Num (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Read a => Read (Identity a)

This instance would be equivalent to the derived instances of the Identity newtype if the runIdentity field were removed

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Fractional a => Fractional (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Integral a => Integral (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Real a => Real (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Methods

toRational :: Identity a -> Rational #

RealFrac a => RealFrac (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Methods

properFraction :: Integral b => Identity a -> (b, Identity a) #

truncate :: Integral b => Identity a -> b #

round :: Integral b => Identity a -> b #

ceiling :: Integral b => Identity a -> b #

floor :: Integral b => Identity a -> b #

Show a => Show (Identity a)

This instance would be equivalent to the derived instances of the Identity newtype if the runIdentity field were removed

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

showsPrec :: Int -> Identity a -> ShowS #

show :: Identity a -> String #

showList :: [Identity a] -> ShowS #

NFData a => NFData (Identity a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Identity a -> () #

Eq a => Eq (Identity a)

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

(==) :: Identity a -> Identity a -> Bool #

(/=) :: Identity a -> Identity a -> Bool #

Ord a => Ord (Identity a)

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

compare :: Identity a -> Identity a -> Ordering #

(<) :: Identity a -> Identity a -> Bool #

(<=) :: Identity a -> Identity a -> Bool #

(>) :: Identity a -> Identity a -> Bool #

(>=) :: Identity a -> Identity a -> Bool #

max :: Identity a -> Identity a -> Identity a #

min :: Identity a -> Identity a -> Identity a #

Hashable a => Hashable (Identity a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Identity a -> Int #

hash :: Identity a -> Int #

FromFormKey a => FromFormKey (Identity a)

Since: http-api-data-0.4.2

Instance details

Defined in Web.Internal.FormUrlEncoded

ToFormKey a => ToFormKey (Identity a)

Since: http-api-data-0.4.2

Instance details

Defined in Web.Internal.FormUrlEncoded

Methods

toFormKey :: Identity a -> Text #

FromHttpApiData a => FromHttpApiData (Identity a)

Since: http-api-data-0.4.2

Instance details

Defined in Web.Internal.HttpApiData

ToHttpApiData a => ToHttpApiData (Identity a)

Since: http-api-data-0.4.2

Instance details

Defined in Web.Internal.HttpApiData

MonoFoldable (Identity a) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (Identity a) -> m) -> Identity a -> m #

ofoldr :: (Element (Identity a) -> b -> b) -> b -> Identity a -> b #

ofoldl' :: (a0 -> Element (Identity a) -> a0) -> a0 -> Identity a -> a0 #

otoList :: Identity a -> [Element (Identity a)] #

oall :: (Element (Identity a) -> Bool) -> Identity a -> Bool #

oany :: (Element (Identity a) -> Bool) -> Identity a -> Bool #

onull :: Identity a -> Bool #

olength :: Identity a -> Int #

olength64 :: Identity a -> Int64 #

ocompareLength :: Integral i => Identity a -> i -> Ordering #

otraverse_ :: Applicative f => (Element (Identity a) -> f b) -> Identity a -> f () #

ofor_ :: Applicative f => Identity a -> (Element (Identity a) -> f b) -> f () #

omapM_ :: Applicative m => (Element (Identity a) -> m ()) -> Identity a -> m () #

oforM_ :: Applicative m => Identity a -> (Element (Identity a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (Identity a) -> m a0) -> a0 -> Identity a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (Identity a) -> m) -> Identity a -> m #

ofoldr1Ex :: (Element (Identity a) -> Element (Identity a) -> Element (Identity a)) -> Identity a -> Element (Identity a) #

ofoldl1Ex' :: (Element (Identity a) -> Element (Identity a) -> Element (Identity a)) -> Identity a -> Element (Identity a) #

headEx :: Identity a -> Element (Identity a) #

lastEx :: Identity a -> Element (Identity a) #

unsafeHead :: Identity a -> Element (Identity a) #

unsafeLast :: Identity a -> Element (Identity a) #

maximumByEx :: (Element (Identity a) -> Element (Identity a) -> Ordering) -> Identity a -> Element (Identity a) #

minimumByEx :: (Element (Identity a) -> Element (Identity a) -> Ordering) -> Identity a -> Element (Identity a) #

oelem :: Element (Identity a) -> Identity a -> Bool #

onotElem :: Element (Identity a) -> Identity a -> Bool #

MonoFunctor (Identity a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (Identity a) -> Element (Identity a)) -> Identity a -> Identity a #

MonoPointed (Identity a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (Identity a) -> Identity a #

MonoTraversable (Identity a) 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element (Identity a) -> f (Element (Identity a))) -> Identity a -> f (Identity a) #

omapM :: Applicative m => (Element (Identity a) -> m (Element (Identity a))) -> Identity a -> m (Identity a) #

Prim a => Prim (Identity a)

Since: primitive-0.6.5.0

Instance details

Defined in Data.Primitive.Types

Unbox a => Unbox (Identity a) 
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep Identity 
Instance details

Defined in Data.Functor.Rep

type Rep Identity = ()
type Key Identity 
Instance details

Defined in Data.Key

type Key Identity = ()
type Rep1 Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

type Rep1 Identity = D1 ('MetaData "Identity" "Data.Functor.Identity" "base" 'True) (C1 ('MetaCons "Identity" 'PrefixI 'True) (S1 ('MetaSel ('Just "runIdentity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))
type StM Identity a 
Instance details

Defined in Control.Monad.Trans.Control

type StM Identity a = a
newtype MVector s (Identity a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s (Identity a) = MV_Identity (MVector s a)
type Rep (Identity a)

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

type Rep (Identity a) = D1 ('MetaData "Identity" "Data.Functor.Identity" "base" 'True) (C1 ('MetaCons "Identity" 'PrefixI 'True) (S1 ('MetaSel ('Just "runIdentity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
type Element (Identity a) 
Instance details

Defined in Data.MonoTraversable

type Element (Identity a) = a
newtype Vector (Identity a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector (Identity a) = V_Identity (Vector a)

data Option a #

Constructors

Option 

Fields

Instances

Instances details
Functor Option

Since: yesod-form-1.4.6

Instance details

Defined in Yesod.Form.Fields

Methods

fmap :: (a -> b) -> Option a -> Option b #

(<$) :: a -> Option b -> Option a #

data family Unique record #

Unique keys besides the Key.

Instances

Instances details
FinalResult (Unique val) 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Methods

finalR :: Unique val -> KnowResult (Unique val) #

data Unique Bookmark Source # 
Instance details

Defined in Model

data Unique BookmarkTag Source # 
Instance details

Defined in Model

data Unique Note Source # 
Instance details

Defined in Model

data Unique User Source # 
Instance details

Defined in Model

data QSemN #

QSemN is a quantity semaphore in which the resource is acquired and released in units of one. It provides guaranteed FIFO ordering for satisfying blocked waitQSemN calls.

The pattern

  bracket_ (waitQSemN n) (signalQSemN n) (...)

is safe; it never loses any of the resource.

data QSem #

QSem is a quantity semaphore in which the resource is acquired and released in units of one. It provides guaranteed FIFO ordering for satisfying blocked waitQSem calls.

The pattern

  bracket_ waitQSem signalQSem (...)

is safe; it never loses a unit of the resource.

data WrappedMonoid m #

Provide a Semigroup for an arbitrary Monoid.

NOTE: This is not needed anymore since Semigroup became a superclass of Monoid in base-4.11 and this newtype be deprecated at some point in the future.

Instances

Instances details
FromJSON1 WrappedMonoid 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON1 WrappedMonoid 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> WrappedMonoid a -> Value #

liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [WrappedMonoid a] -> Value #

liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> WrappedMonoid a -> Encoding #

liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [WrappedMonoid a] -> Encoding #

liftOmitField :: (a -> Bool) -> WrappedMonoid a -> Bool #

NFData1 WrappedMonoid

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> WrappedMonoid a -> () #

Generic1 WrappedMonoid 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep1 WrappedMonoid :: k -> Type #

Methods

from1 :: forall (a :: k). WrappedMonoid a -> Rep1 WrappedMonoid a #

to1 :: forall (a :: k). Rep1 WrappedMonoid a -> WrappedMonoid a #

Unbox a => Vector Vector (WrappedMonoid a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox a => MVector MVector (WrappedMonoid a) 
Instance details

Defined in Data.Vector.Unboxed.Base

FromJSON a => FromJSON (WrappedMonoid a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON a => ToJSON (WrappedMonoid a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Data m => Data (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> WrappedMonoid m -> c (WrappedMonoid m) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (WrappedMonoid m) #

toConstr :: WrappedMonoid m -> Constr #

dataTypeOf :: WrappedMonoid m -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (WrappedMonoid m)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (WrappedMonoid m)) #

gmapT :: (forall b. Data b => b -> b) -> WrappedMonoid m -> WrappedMonoid m #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WrappedMonoid m -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WrappedMonoid m -> r #

gmapQ :: (forall d. Data d => d -> u) -> WrappedMonoid m -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> WrappedMonoid m -> u #

gmapM :: Monad m0 => (forall d. Data d => d -> m0 d) -> WrappedMonoid m -> m0 (WrappedMonoid m) #

gmapMp :: MonadPlus m0 => (forall d. Data d => d -> m0 d) -> WrappedMonoid m -> m0 (WrappedMonoid m) #

gmapMo :: MonadPlus m0 => (forall d. Data d => d -> m0 d) -> WrappedMonoid m -> m0 (WrappedMonoid m) #

Monoid m => Monoid (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Monoid m => Semigroup (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Bounded m => Bounded (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Enum a => Enum (WrappedMonoid a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Generic (WrappedMonoid m) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (WrappedMonoid m) :: Type -> Type #

Read m => Read (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Show m => Show (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

NFData m => NFData (WrappedMonoid m)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: WrappedMonoid m -> () #

Eq m => Eq (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Ord m => Ord (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Hashable a => Hashable (WrappedMonoid a) 
Instance details

Defined in Data.Hashable.Class

Unbox a => Unbox (WrappedMonoid a) 
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep1 WrappedMonoid

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

type Rep1 WrappedMonoid = D1 ('MetaData "WrappedMonoid" "Data.Semigroup" "base" 'True) (C1 ('MetaCons "WrapMonoid" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapMonoid") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))
newtype MVector s (WrappedMonoid a) 
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

type Rep (WrappedMonoid m) = D1 ('MetaData "WrappedMonoid" "Data.Semigroup" "base" 'True) (C1 ('MetaCons "WrapMonoid" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapMonoid") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 m)))
newtype Vector (WrappedMonoid a) 
Instance details

Defined in Data.Vector.Unboxed.Base

class Monad m => PrimMonad (m :: Type -> Type) where #

Class of monads which can perform primitive state-transformer actions.

Associated Types

type PrimState (m :: Type -> Type) #

State token type.

Methods

primitive :: (State# (PrimState m) -> (# State# (PrimState m), a #)) -> m a #

Execute a primitive operation.

Instances

Instances details
PrimMonad IO 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState IO #

Methods

primitive :: (State# (PrimState IO) -> (# State# (PrimState IO), a #)) -> IO a #

PrimMonad (ST s) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (ST s) #

Methods

primitive :: (State# (PrimState (ST s)) -> (# State# (PrimState (ST s)), a #)) -> ST s a #

PrimMonad (ST s) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (ST s) #

Methods

primitive :: (State# (PrimState (ST s)) -> (# State# (PrimState (ST s)), a #)) -> ST s a #

PrimMonad m => PrimMonad (ResourceT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Associated Types

type PrimState (ResourceT m) #

Methods

primitive :: (State# (PrimState (ResourceT m)) -> (# State# (PrimState (ResourceT m)), a #)) -> ResourceT m a #

PrimMonad m => PrimMonad (MaybeT m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (MaybeT m) #

Methods

primitive :: (State# (PrimState (MaybeT m)) -> (# State# (PrimState (MaybeT m)), a #)) -> MaybeT m a #

PrimMonad (HandlerFor site)

Since: yesod-core-1.6.7

Instance details

Defined in Yesod.Core.Types

Associated Types

type PrimState (HandlerFor site) #

Methods

primitive :: (State# (PrimState (HandlerFor site)) -> (# State# (PrimState (HandlerFor site)), a #)) -> HandlerFor site a #

PrimMonad (WidgetFor site)

Since: yesod-core-1.6.7

Instance details

Defined in Yesod.Core.Types

Associated Types

type PrimState (WidgetFor site) #

Methods

primitive :: (State# (PrimState (WidgetFor site)) -> (# State# (PrimState (WidgetFor site)), a #)) -> WidgetFor site a #

(Monoid w, PrimMonad m) => PrimMonad (AccumT w m)

Since: primitive-0.6.3.0

Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (AccumT w m) #

Methods

primitive :: (State# (PrimState (AccumT w m)) -> (# State# (PrimState (AccumT w m)), a #)) -> AccumT w m a #

PrimMonad m => PrimMonad (ExceptT e m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (ExceptT e m) #

Methods

primitive :: (State# (PrimState (ExceptT e m)) -> (# State# (PrimState (ExceptT e m)), a #)) -> ExceptT e m a #

PrimMonad m => PrimMonad (IdentityT m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (IdentityT m) #

Methods

primitive :: (State# (PrimState (IdentityT m)) -> (# State# (PrimState (IdentityT m)), a #)) -> IdentityT m a #

PrimMonad m => PrimMonad (ReaderT r m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (ReaderT r m) #

Methods

primitive :: (State# (PrimState (ReaderT r m)) -> (# State# (PrimState (ReaderT r m)), a #)) -> ReaderT r m a #

PrimMonad m => PrimMonad (SelectT r m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (SelectT r m) #

Methods

primitive :: (State# (PrimState (SelectT r m)) -> (# State# (PrimState (SelectT r m)), a #)) -> SelectT r m a #

PrimMonad m => PrimMonad (StateT s m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (StateT s m) #

Methods

primitive :: (State# (PrimState (StateT s m)) -> (# State# (PrimState (StateT s m)), a #)) -> StateT s m a #

PrimMonad m => PrimMonad (StateT s m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (StateT s m) #

Methods

primitive :: (State# (PrimState (StateT s m)) -> (# State# (PrimState (StateT s m)), a #)) -> StateT s m a #

(Monoid w, PrimMonad m) => PrimMonad (WriterT w m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (WriterT w m) #

Methods

primitive :: (State# (PrimState (WriterT w m)) -> (# State# (PrimState (WriterT w m)), a #)) -> WriterT w m a #

(Monoid w, PrimMonad m) => PrimMonad (WriterT w m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (WriterT w m) #

Methods

primitive :: (State# (PrimState (WriterT w m)) -> (# State# (PrimState (WriterT w m)), a #)) -> WriterT w m a #

(Monoid w, PrimMonad m) => PrimMonad (WriterT w m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (WriterT w m) #

Methods

primitive :: (State# (PrimState (WriterT w m)) -> (# State# (PrimState (WriterT w m)), a #)) -> WriterT w m a #

PrimMonad m => PrimMonad (ConduitT i o m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Associated Types

type PrimState (ConduitT i o m) #

Methods

primitive :: (State# (PrimState (ConduitT i o m)) -> (# State# (PrimState (ConduitT i o m)), a #)) -> ConduitT i o m a #

PrimMonad m => PrimMonad (ContT r m)

Since: primitive-0.6.3.0

Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (ContT r m) #

Methods

primitive :: (State# (PrimState (ContT r m)) -> (# State# (PrimState (ContT r m)), a #)) -> ContT r m a #

(Monoid w, PrimMonad m) => PrimMonad (RWST r w s m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (RWST r w s m) #

Methods

primitive :: (State# (PrimState (RWST r w s m)) -> (# State# (PrimState (RWST r w s m)), a #)) -> RWST r w s m a #

(Monoid w, PrimMonad m) => PrimMonad (RWST r w s m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (RWST r w s m) #

Methods

primitive :: (State# (PrimState (RWST r w s m)) -> (# State# (PrimState (RWST r w s m)), a #)) -> RWST r w s m a #

(Monoid w, PrimMonad m) => PrimMonad (RWST r w s m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (RWST r w s m) #

Methods

primitive :: (State# (PrimState (RWST r w s m)) -> (# State# (PrimState (RWST r w s m)), a #)) -> RWST r w s m a #

PrimMonad m => PrimMonad (Pipe l i o u m) 
Instance details

Defined in Data.Conduit.Internal.Pipe

Associated Types

type PrimState (Pipe l i o u m) #

Methods

primitive :: (State# (PrimState (Pipe l i o u m)) -> (# State# (PrimState (Pipe l i o u m)), a #)) -> Pipe l i o u m a #

type family PrimState (m :: Type -> Type) #

State token type.

Instances

Instances details
type PrimState IO 
Instance details

Defined in Control.Monad.Primitive

type PrimState (ST s) 
Instance details

Defined in Control.Monad.Primitive

type PrimState (ST s) = s
type PrimState (ST s) 
Instance details

Defined in Control.Monad.Primitive

type PrimState (ST s) = s
type PrimState (ResourceT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

type PrimState (MaybeT m) 
Instance details

Defined in Control.Monad.Primitive

type PrimState (HandlerFor site) 
Instance details

Defined in Yesod.Core.Types

type PrimState (WidgetFor site) 
Instance details

Defined in Yesod.Core.Types

type PrimState (AccumT w m) 
Instance details

Defined in Control.Monad.Primitive

type PrimState (AccumT w m) = PrimState m
type PrimState (ExceptT e m) 
Instance details

Defined in Control.Monad.Primitive

type PrimState (ExceptT e m) = PrimState m
type PrimState (IdentityT m) 
Instance details

Defined in Control.Monad.Primitive

type PrimState (ReaderT r m) 
Instance details

Defined in Control.Monad.Primitive

type PrimState (ReaderT r m) = PrimState m
type PrimState (SelectT r m) 
Instance details

Defined in Control.Monad.Primitive

type PrimState (SelectT r m) = PrimState m
type PrimState (StateT s m) 
Instance details

Defined in Control.Monad.Primitive

type PrimState (StateT s m) = PrimState m
type PrimState (StateT s m) 
Instance details

Defined in Control.Monad.Primitive

type PrimState (StateT s m) = PrimState m
type PrimState (WriterT w m) 
Instance details

Defined in Control.Monad.Primitive

type PrimState (WriterT w m) = PrimState m
type PrimState (WriterT w m) 
Instance details

Defined in Control.Monad.Primitive

type PrimState (WriterT w m) = PrimState m
type PrimState (WriterT w m) 
Instance details

Defined in Control.Monad.Primitive

type PrimState (WriterT w m) = PrimState m
type PrimState (ConduitT i o m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

type PrimState (ConduitT i o m) = PrimState m
type PrimState (ContT r m) 
Instance details

Defined in Control.Monad.Primitive

type PrimState (ContT r m) = PrimState m
type PrimState (RWST r w s m) 
Instance details

Defined in Control.Monad.Primitive

type PrimState (RWST r w s m) = PrimState m
type PrimState (RWST r w s m) 
Instance details

Defined in Control.Monad.Primitive

type PrimState (RWST r w s m) = PrimState m
type PrimState (RWST r w s m) 
Instance details

Defined in Control.Monad.Primitive

type PrimState (RWST r w s m) = PrimState m
type PrimState (Pipe l i o u m) 
Instance details

Defined in Data.Conduit.Internal.Pipe

type PrimState (Pipe l i o u m) = PrimState m

data Seq a #

General-purpose finite sequences.

Instances

Instances details
FromJSON1 Seq 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (Seq a) #

liftParseJSONList :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [Seq a] #

liftOmittedField :: Maybe a -> Maybe (Seq a) #

ToJSON1 Seq 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> Seq a -> Value #

liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [Seq a] -> Value #

liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> Seq a -> Encoding #

liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [Seq a] -> Encoding #

liftOmitField :: (a -> Bool) -> Seq a -> Bool #

MonadFix Seq

Since: containers-0.5.11

Instance details

Defined in Data.Sequence.Internal

Methods

mfix :: (a -> Seq a) -> Seq a #

MonadZip Seq
 mzipWith = zipWith
 munzip = unzip
Instance details

Defined in Data.Sequence.Internal

Methods

mzip :: Seq a -> Seq b -> Seq (a, b) #

mzipWith :: (a -> b -> c) -> Seq a -> Seq b -> Seq c #

munzip :: Seq (a, b) -> (Seq a, Seq b) #

Foldable Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

fold :: Monoid m => Seq m -> m #

foldMap :: Monoid m => (a -> m) -> Seq a -> m #

foldMap' :: Monoid m => (a -> m) -> Seq a -> m #

foldr :: (a -> b -> b) -> b -> Seq a -> b #

foldr' :: (a -> b -> b) -> b -> Seq a -> b #

foldl :: (b -> a -> b) -> b -> Seq a -> b #

foldl' :: (b -> a -> b) -> b -> Seq a -> b #

foldr1 :: (a -> a -> a) -> Seq a -> a #

foldl1 :: (a -> a -> a) -> Seq a -> a #

toList :: Seq a -> [a] #

null :: Seq a -> Bool #

length :: Seq a -> Int #

elem :: Eq a => a -> Seq a -> Bool #

maximum :: Ord a => Seq a -> a #

minimum :: Ord a => Seq a -> a #

sum :: Num a => Seq a -> a #

product :: Num a => Seq a -> a #

Eq1 Seq

Since: containers-0.5.9

Instance details

Defined in Data.Sequence.Internal

Methods

liftEq :: (a -> b -> Bool) -> Seq a -> Seq b -> Bool #

Ord1 Seq

Since: containers-0.5.9

Instance details

Defined in Data.Sequence.Internal

Methods

liftCompare :: (a -> b -> Ordering) -> Seq a -> Seq b -> Ordering #

Read1 Seq

Since: containers-0.5.9

Instance details

Defined in Data.Sequence.Internal

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Seq a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Seq a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Seq a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Seq a] #

Show1 Seq

Since: containers-0.5.9

Instance details

Defined in Data.Sequence.Internal

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Seq a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Seq a] -> ShowS #

Traversable Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

traverse :: Applicative f => (a -> f b) -> Seq a -> f (Seq b) #

sequenceA :: Applicative f => Seq (f a) -> f (Seq a) #

mapM :: Monad m => (a -> m b) -> Seq a -> m (Seq b) #

sequence :: Monad m => Seq (m a) -> m (Seq a) #

Alternative Seq

Since: containers-0.5.4

Instance details

Defined in Data.Sequence.Internal

Methods

empty :: Seq a #

(<|>) :: Seq a -> Seq a -> Seq a #

some :: Seq a -> Seq [a] #

many :: Seq a -> Seq [a] #

Applicative Seq

Since: containers-0.5.4

Instance details

Defined in Data.Sequence.Internal

Methods

pure :: a -> Seq a #

(<*>) :: Seq (a -> b) -> Seq a -> Seq b #

liftA2 :: (a -> b -> c) -> Seq a -> Seq b -> Seq c #

(*>) :: Seq a -> Seq b -> Seq b #

(<*) :: Seq a -> Seq b -> Seq a #

Functor Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> Seq a -> Seq b #

(<$) :: a -> Seq b -> Seq a #

Monad Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

(>>=) :: Seq a -> (a -> Seq b) -> Seq b #

(>>) :: Seq a -> Seq b -> Seq b #

return :: a -> Seq a #

MonadPlus Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

mzero :: Seq a #

mplus :: Seq a -> Seq a -> Seq a #

Zip Seq 
Instance details

Defined in Data.ChunkedZip

Methods

zipWith :: (a -> b -> c) -> Seq a -> Seq b -> Seq c #

zip :: Seq a -> Seq b -> Seq (a, b) #

zap :: Seq (a -> b) -> Seq a -> Seq b #

unzip :: Seq (a, b) -> (Seq a, Seq b) #

Zip3 Seq 
Instance details

Defined in Data.ChunkedZip

Methods

zipWith3 :: (a -> b -> c -> d) -> Seq a -> Seq b -> Seq c -> Seq d #

zip3 :: Seq a -> Seq b -> Seq c -> Seq (a, b, c) #

zap3 :: Seq (a -> b -> c) -> Seq a -> Seq b -> Seq c #

unzip3 :: Seq (a, b, c) -> (Seq a, Seq b, Seq c) #

Zip4 Seq 
Instance details

Defined in Data.ChunkedZip

Methods

zipWith4 :: (a -> b -> c -> d -> e) -> Seq a -> Seq b -> Seq c -> Seq d -> Seq e #

zip4 :: Seq a -> Seq b -> Seq c -> Seq d -> Seq (a, b, c, d) #

zap4 :: Seq (a -> b -> c -> d) -> Seq a -> Seq b -> Seq c -> Seq d #

unzip4 :: Seq (a, b, c, d) -> (Seq a, Seq b, Seq c, Seq d) #

UnzipWith Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

unzipWith' :: (x -> (a, b)) -> Seq x -> (Seq a, Seq b)

Hashable1 Seq

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> Seq a -> Int #

Adjustable Seq 
Instance details

Defined in Data.Key

Methods

adjust :: (a -> a) -> Key Seq -> Seq a -> Seq a #

replace :: Key Seq -> a -> Seq a -> Seq a #

FoldableWithKey Seq 
Instance details

Defined in Data.Key

Methods

toKeyedList :: Seq a -> [(Key Seq, a)] #

foldMapWithKey :: Monoid m => (Key Seq -> a -> m) -> Seq a -> m #

foldrWithKey :: (Key Seq -> a -> b -> b) -> b -> Seq a -> b #

foldlWithKey :: (b -> Key Seq -> a -> b) -> b -> Seq a -> b #

Indexable Seq 
Instance details

Defined in Data.Key

Methods

index :: Seq a -> Key Seq -> a #

Keyed Seq 
Instance details

Defined in Data.Key

Methods

mapWithKey :: (Key Seq -> a -> b) -> Seq a -> Seq b #

Lookup Seq 
Instance details

Defined in Data.Key

Methods

lookup :: Key Seq -> Seq a -> Maybe a #

TraversableWithKey Seq 
Instance details

Defined in Data.Key

Methods

traverseWithKey :: Applicative f => (Key Seq -> a -> f b) -> Seq a -> f (Seq b) #

mapWithKeyM :: Monad m => (Key Seq -> a -> m b) -> Seq a -> m (Seq b) #

Zip Seq 
Instance details

Defined in Data.Key

Methods

zipWith :: (a -> b -> c) -> Seq a -> Seq b -> Seq c #

zip :: Seq a -> Seq b -> Seq (a, b) #

zap :: Seq (a -> b) -> Seq a -> Seq b #

ZipWithKey Seq 
Instance details

Defined in Data.Key

Methods

zipWithKey :: (Key Seq -> a -> b -> c) -> Seq a -> Seq b -> Seq c #

zapWithKey :: Seq (Key Seq -> a -> b) -> Seq a -> Seq b #

Lift a => Lift (Seq a :: Type)

Since: containers-0.6.6

Instance details

Defined in Data.Sequence.Internal

Methods

lift :: Quote m => Seq a -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Seq a -> Code m (Seq a) #

FromJSON a => FromJSON (Seq a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON a => ToJSON (Seq a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Seq a -> Value #

toEncoding :: Seq a -> Encoding #

toJSONList :: [Seq a] -> Value #

toEncodingList :: [Seq a] -> Encoding #

omitField :: Seq a -> Bool #

Data a => Data (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Seq a -> c (Seq a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Seq a) #

toConstr :: Seq a -> Constr #

dataTypeOf :: Seq a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Seq a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Seq a)) #

gmapT :: (forall b. Data b => b -> b) -> Seq a -> Seq a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Seq a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Seq a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Seq a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Seq a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Seq a -> m (Seq a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Seq a -> m (Seq a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Seq a -> m (Seq a) #

a ~ Char => IsString (Seq a)

Since: containers-0.5.7

Instance details

Defined in Data.Sequence.Internal

Methods

fromString :: String -> Seq a #

Monoid (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

mempty :: Seq a #

mappend :: Seq a -> Seq a -> Seq a #

mconcat :: [Seq a] -> Seq a #

Semigroup (Seq a)

Since: containers-0.5.7

Instance details

Defined in Data.Sequence.Internal

Methods

(<>) :: Seq a -> Seq a -> Seq a #

sconcat :: NonEmpty (Seq a) -> Seq a #

stimes :: Integral b => b -> Seq a -> Seq a #

IsList (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Item (Seq a) #

Methods

fromList :: [Item (Seq a)] -> Seq a #

fromListN :: Int -> [Item (Seq a)] -> Seq a #

toList :: Seq a -> [Item (Seq a)] #

Read a => Read (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Show a => Show (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

showsPrec :: Int -> Seq a -> ShowS #

show :: Seq a -> String #

showList :: [Seq a] -> ShowS #

NFData a => NFData (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

rnf :: Seq a -> () #

Eq a => Eq (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

(==) :: Seq a -> Seq a -> Bool #

(/=) :: Seq a -> Seq a -> Bool #

Ord a => Ord (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

compare :: Seq a -> Seq a -> Ordering #

(<) :: Seq a -> Seq a -> Bool #

(<=) :: Seq a -> Seq a -> Bool #

(>) :: Seq a -> Seq a -> Bool #

(>=) :: Seq a -> Seq a -> Bool #

max :: Seq a -> Seq a -> Seq a #

min :: Seq a -> Seq a -> Seq a #

Hashable v => Hashable (Seq v)

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Seq v -> Int #

hash :: Seq v -> Int #

GrowingAppend (Seq a) 
Instance details

Defined in Data.MonoTraversable

MonoFoldable (Seq a) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (Seq a) -> m) -> Seq a -> m #

ofoldr :: (Element (Seq a) -> b -> b) -> b -> Seq a -> b #

ofoldl' :: (a0 -> Element (Seq a) -> a0) -> a0 -> Seq a -> a0 #

otoList :: Seq a -> [Element (Seq a)] #

oall :: (Element (Seq a) -> Bool) -> Seq a -> Bool #

oany :: (Element (Seq a) -> Bool) -> Seq a -> Bool #

onull :: Seq a -> Bool #

olength :: Seq a -> Int #

olength64 :: Seq a -> Int64 #

ocompareLength :: Integral i => Seq a -> i -> Ordering #

otraverse_ :: Applicative f => (Element (Seq a) -> f b) -> Seq a -> f () #

ofor_ :: Applicative f => Seq a -> (Element (Seq a) -> f b) -> f () #

omapM_ :: Applicative m => (Element (Seq a) -> m ()) -> Seq a -> m () #

oforM_ :: Applicative m => Seq a -> (Element (Seq a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (Seq a) -> m a0) -> a0 -> Seq a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (Seq a) -> m) -> Seq a -> m #

ofoldr1Ex :: (Element (Seq a) -> Element (Seq a) -> Element (Seq a)) -> Seq a -> Element (Seq a) #

ofoldl1Ex' :: (Element (Seq a) -> Element (Seq a) -> Element (Seq a)) -> Seq a -> Element (Seq a) #

headEx :: Seq a -> Element (Seq a) #

lastEx :: Seq a -> Element (Seq a) #

unsafeHead :: Seq a -> Element (Seq a) #

unsafeLast :: Seq a -> Element (Seq a) #

maximumByEx :: (Element (Seq a) -> Element (Seq a) -> Ordering) -> Seq a -> Element (Seq a) #

minimumByEx :: (Element (Seq a) -> Element (Seq a) -> Ordering) -> Seq a -> Element (Seq a) #

oelem :: Element (Seq a) -> Seq a -> Bool #

onotElem :: Element (Seq a) -> Seq a -> Bool #

MonoFunctor (Seq a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (Seq a) -> Element (Seq a)) -> Seq a -> Seq a #

MonoPointed (Seq a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (Seq a) -> Seq a #

MonoTraversable (Seq a) 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element (Seq a) -> f (Element (Seq a))) -> Seq a -> f (Seq a) #

omapM :: Applicative m => (Element (Seq a) -> m (Element (Seq a))) -> Seq a -> m (Seq a) #

IsSequence (Seq a) 
Instance details

Defined in Data.Sequences

Methods

fromList :: [Element (Seq a)] -> Seq a #

lengthIndex :: Seq a -> Index (Seq a) #

break :: (Element (Seq a) -> Bool) -> Seq a -> (Seq a, Seq a) #

span :: (Element (Seq a) -> Bool) -> Seq a -> (Seq a, Seq a) #

dropWhile :: (Element (Seq a) -> Bool) -> Seq a -> Seq a #

takeWhile :: (Element (Seq a) -> Bool) -> Seq a -> Seq a #

splitAt :: Index (Seq a) -> Seq a -> (Seq a, Seq a) #

unsafeSplitAt :: Index (Seq a) -> Seq a -> (Seq a, Seq a) #

take :: Index (Seq a) -> Seq a -> Seq a #

unsafeTake :: Index (Seq a) -> Seq a -> Seq a #

drop :: Index (Seq a) -> Seq a -> Seq a #

unsafeDrop :: Index (Seq a) -> Seq a -> Seq a #

dropEnd :: Index (Seq a) -> Seq a -> Seq a #

partition :: (Element (Seq a) -> Bool) -> Seq a -> (Seq a, Seq a) #

uncons :: Seq a -> Maybe (Element (Seq a), Seq a) #

unsnoc :: Seq a -> Maybe (Seq a, Element (Seq a)) #

filter :: (Element (Seq a) -> Bool) -> Seq a -> Seq a #

filterM :: Monad m => (Element (Seq a) -> m Bool) -> Seq a -> m (Seq a) #

replicate :: Index (Seq a) -> Element (Seq a) -> Seq a #

replicateM :: Monad m => Index (Seq a) -> m (Element (Seq a)) -> m (Seq a) #

groupBy :: (Element (Seq a) -> Element (Seq a) -> Bool) -> Seq a -> [Seq a] #

groupAllOn :: Eq b => (Element (Seq a) -> b) -> Seq a -> [Seq a] #

subsequences :: Seq a -> [Seq a] #

permutations :: Seq a -> [Seq a] #

tailEx :: Seq a -> Seq a #

tailMay :: Seq a -> Maybe (Seq a) #

initEx :: Seq a -> Seq a #

initMay :: Seq a -> Maybe (Seq a) #

unsafeTail :: Seq a -> Seq a #

unsafeInit :: Seq a -> Seq a #

index :: Seq a -> Index (Seq a) -> Maybe (Element (Seq a)) #

indexEx :: Seq a -> Index (Seq a) -> Element (Seq a) #

unsafeIndex :: Seq a -> Index (Seq a) -> Element (Seq a) #

splitWhen :: (Element (Seq a) -> Bool) -> Seq a -> [Seq a] #

SemiSequence (Seq a) 
Instance details

Defined in Data.Sequences

Associated Types

type Index (Seq a) #

Methods

intersperse :: Element (Seq a) -> Seq a -> Seq a #

reverse :: Seq a -> Seq a #

find :: (Element (Seq a) -> Bool) -> Seq a -> Maybe (Element (Seq a)) #

sortBy :: (Element (Seq a) -> Element (Seq a) -> Ordering) -> Seq a -> Seq a #

cons :: Element (Seq a) -> Seq a -> Seq a #

snoc :: Seq a -> Element (Seq a) -> Seq a #

type Key Seq 
Instance details

Defined in Data.Key

type Key Seq = Int
type Item (Seq a) 
Instance details

Defined in Data.Sequence.Internal

type Item (Seq a) = a
type Element (Seq a) 
Instance details

Defined in Data.MonoTraversable

type Element (Seq a) = a
type Index (Seq a) 
Instance details

Defined in Data.Sequences

type Index (Seq a) = Int

data IntSet #

A set of integers.

Instances

Instances details
FromJSON IntSet 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON IntSet 
Instance details

Defined in Data.Aeson.Types.ToJSON

Data IntSet 
Instance details

Defined in Data.IntSet.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IntSet -> c IntSet #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c IntSet #

toConstr :: IntSet -> Constr #

dataTypeOf :: IntSet -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c IntSet) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c IntSet) #

gmapT :: (forall b. Data b => b -> b) -> IntSet -> IntSet #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IntSet -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IntSet -> r #

gmapQ :: (forall d. Data d => d -> u) -> IntSet -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> IntSet -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> IntSet -> m IntSet #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IntSet -> m IntSet #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IntSet -> m IntSet #

Monoid IntSet 
Instance details

Defined in Data.IntSet.Internal

Semigroup IntSet

Since: containers-0.5.7

Instance details

Defined in Data.IntSet.Internal

IsList IntSet

Since: containers-0.5.6.2

Instance details

Defined in Data.IntSet.Internal

Associated Types

type Item IntSet #

Read IntSet 
Instance details

Defined in Data.IntSet.Internal

Show IntSet 
Instance details

Defined in Data.IntSet.Internal

NFData IntSet 
Instance details

Defined in Data.IntSet.Internal

Methods

rnf :: IntSet -> () #

Eq IntSet 
Instance details

Defined in Data.IntSet.Internal

Methods

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

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

Ord IntSet 
Instance details

Defined in Data.IntSet.Internal

Hashable IntSet

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> IntSet -> Int #

hash :: IntSet -> Int #

IsSet IntSet 
Instance details

Defined in Data.Containers

SetContainer IntSet 
Instance details

Defined in Data.Containers

Associated Types

type ContainerKey IntSet #

GrowingAppend IntSet 
Instance details

Defined in Data.MonoTraversable

MonoFoldable IntSet 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element IntSet -> m) -> IntSet -> m #

ofoldr :: (Element IntSet -> b -> b) -> b -> IntSet -> b #

ofoldl' :: (a -> Element IntSet -> a) -> a -> IntSet -> a #

otoList :: IntSet -> [Element IntSet] #

oall :: (Element IntSet -> Bool) -> IntSet -> Bool #

oany :: (Element IntSet -> Bool) -> IntSet -> Bool #

onull :: IntSet -> Bool #

olength :: IntSet -> Int #

olength64 :: IntSet -> Int64 #

ocompareLength :: Integral i => IntSet -> i -> Ordering #

otraverse_ :: Applicative f => (Element IntSet -> f b) -> IntSet -> f () #

ofor_ :: Applicative f => IntSet -> (Element IntSet -> f b) -> f () #

omapM_ :: Applicative m => (Element IntSet -> m ()) -> IntSet -> m () #

oforM_ :: Applicative m => IntSet -> (Element IntSet -> m ()) -> m () #

ofoldlM :: Monad m => (a -> Element IntSet -> m a) -> a -> IntSet -> m a #

ofoldMap1Ex :: Semigroup m => (Element IntSet -> m) -> IntSet -> m #

ofoldr1Ex :: (Element IntSet -> Element IntSet -> Element IntSet) -> IntSet -> Element IntSet #

ofoldl1Ex' :: (Element IntSet -> Element IntSet -> Element IntSet) -> IntSet -> Element IntSet #

headEx :: IntSet -> Element IntSet #

lastEx :: IntSet -> Element IntSet #

unsafeHead :: IntSet -> Element IntSet #

unsafeLast :: IntSet -> Element IntSet #

maximumByEx :: (Element IntSet -> Element IntSet -> Ordering) -> IntSet -> Element IntSet #

minimumByEx :: (Element IntSet -> Element IntSet -> Ordering) -> IntSet -> Element IntSet #

oelem :: Element IntSet -> IntSet -> Bool #

onotElem :: Element IntSet -> IntSet -> Bool #

MonoPointed IntSet 
Instance details

Defined in Data.MonoTraversable

Lift IntSet

Since: containers-0.6.6

Instance details

Defined in Data.IntSet.Internal

Methods

lift :: Quote m => IntSet -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => IntSet -> Code m IntSet #

type Item IntSet 
Instance details

Defined in Data.IntSet.Internal

type Item IntSet = Key
type ContainerKey IntSet 
Instance details

Defined in Data.Containers

type Element IntSet 
Instance details

Defined in Data.MonoTraversable

data IntMap a #

A map of integers to values a.

Instances

Instances details
FromJSON1 IntMap 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (IntMap a) #

liftParseJSONList :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [IntMap a] #

liftOmittedField :: Maybe a -> Maybe (IntMap a) #

ToJSON1 IntMap 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> IntMap a -> Value #

liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [IntMap a] -> Value #

liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> IntMap a -> Encoding #

liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [IntMap a] -> Encoding #

liftOmitField :: (a -> Bool) -> IntMap a -> Bool #

Foldable IntMap

Folds in order of increasing key.

Instance details

Defined in Data.IntMap.Internal

Methods

fold :: Monoid m => IntMap m -> m #

foldMap :: Monoid m => (a -> m) -> IntMap a -> m #

foldMap' :: Monoid m => (a -> m) -> IntMap a -> m #

foldr :: (a -> b -> b) -> b -> IntMap a -> b #

foldr' :: (a -> b -> b) -> b -> IntMap a -> b #

foldl :: (b -> a -> b) -> b -> IntMap a -> b #

foldl' :: (b -> a -> b) -> b -> IntMap a -> b #

foldr1 :: (a -> a -> a) -> IntMap a -> a #

foldl1 :: (a -> a -> a) -> IntMap a -> a #

toList :: IntMap a -> [a] #

null :: IntMap a -> Bool #

length :: IntMap a -> Int #

elem :: Eq a => a -> IntMap a -> Bool #

maximum :: Ord a => IntMap a -> a #

minimum :: Ord a => IntMap a -> a #

sum :: Num a => IntMap a -> a #

product :: Num a => IntMap a -> a #

Eq1 IntMap

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

liftEq :: (a -> b -> Bool) -> IntMap a -> IntMap b -> Bool #

Ord1 IntMap

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

liftCompare :: (a -> b -> Ordering) -> IntMap a -> IntMap b -> Ordering #

Read1 IntMap

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (IntMap a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [IntMap a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (IntMap a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [IntMap a] #

Show1 IntMap

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> IntMap a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [IntMap a] -> ShowS #

Traversable IntMap

Traverses in order of increasing key.

Instance details

Defined in Data.IntMap.Internal

Methods

traverse :: Applicative f => (a -> f b) -> IntMap a -> f (IntMap b) #

sequenceA :: Applicative f => IntMap (f a) -> f (IntMap a) #

mapM :: Monad m => (a -> m b) -> IntMap a -> m (IntMap b) #

sequence :: Monad m => IntMap (m a) -> m (IntMap a) #

Functor IntMap 
Instance details

Defined in Data.IntMap.Internal

Methods

fmap :: (a -> b) -> IntMap a -> IntMap b #

(<$) :: a -> IntMap b -> IntMap a #

Zip IntMap 
Instance details

Defined in Data.ChunkedZip

Methods

zipWith :: (a -> b -> c) -> IntMap a -> IntMap b -> IntMap c #

zip :: IntMap a -> IntMap b -> IntMap (a, b) #

zap :: IntMap (a -> b) -> IntMap a -> IntMap b #

unzip :: IntMap (a, b) -> (IntMap a, IntMap b) #

Hashable1 IntMap

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> IntMap a -> Int #

Adjustable IntMap 
Instance details

Defined in Data.Key

Methods

adjust :: (a -> a) -> Key IntMap -> IntMap a -> IntMap a #

replace :: Key IntMap -> a -> IntMap a -> IntMap a #

FoldableWithKey IntMap 
Instance details

Defined in Data.Key

Methods

toKeyedList :: IntMap a -> [(Key IntMap, a)] #

foldMapWithKey :: Monoid m => (Key IntMap -> a -> m) -> IntMap a -> m #

foldrWithKey :: (Key IntMap -> a -> b -> b) -> b -> IntMap a -> b #

foldlWithKey :: (b -> Key IntMap -> a -> b) -> b -> IntMap a -> b #

Indexable IntMap 
Instance details

Defined in Data.Key

Methods

index :: IntMap a -> Key IntMap -> a #

Keyed IntMap 
Instance details

Defined in Data.Key

Methods

mapWithKey :: (Key IntMap -> a -> b) -> IntMap a -> IntMap b #

Lookup IntMap 
Instance details

Defined in Data.Key

Methods

lookup :: Key IntMap -> IntMap a -> Maybe a #

TraversableWithKey IntMap 
Instance details

Defined in Data.Key

Methods

traverseWithKey :: Applicative f => (Key IntMap -> a -> f b) -> IntMap a -> f (IntMap b) #

mapWithKeyM :: Monad m => (Key IntMap -> a -> m b) -> IntMap a -> m (IntMap b) #

Zip IntMap 
Instance details

Defined in Data.Key

Methods

zipWith :: (a -> b -> c) -> IntMap a -> IntMap b -> IntMap c #

zip :: IntMap a -> IntMap b -> IntMap (a, b) #

zap :: IntMap (a -> b) -> IntMap a -> IntMap b #

ZipWithKey IntMap 
Instance details

Defined in Data.Key

Methods

zipWithKey :: (Key IntMap -> a -> b -> c) -> IntMap a -> IntMap b -> IntMap c #

zapWithKey :: IntMap (Key IntMap -> a -> b) -> IntMap a -> IntMap b #

PolyMap IntMap

This instance uses the functions from Data.IntMap.Strict.

Instance details

Defined in Data.Containers

Methods

differenceMap :: IntMap value1 -> IntMap value2 -> IntMap value1 #

intersectionMap :: IntMap value1 -> IntMap value2 -> IntMap value1 #

intersectionWithMap :: (value1 -> value2 -> value3) -> IntMap value1 -> IntMap value2 -> IntMap value3 #

Lift a => Lift (IntMap a :: Type)

Since: containers-0.6.6

Instance details

Defined in Data.IntMap.Internal

Methods

lift :: Quote m => IntMap a -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => IntMap a -> Code m (IntMap a) #

FromJSON a => FromJSON (IntMap a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON a => ToJSON (IntMap a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Data a => Data (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IntMap a -> c (IntMap a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (IntMap a) #

toConstr :: IntMap a -> Constr #

dataTypeOf :: IntMap a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (IntMap a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (IntMap a)) #

gmapT :: (forall b. Data b => b -> b) -> IntMap a -> IntMap a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IntMap a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IntMap a -> r #

gmapQ :: (forall d. Data d => d -> u) -> IntMap a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> IntMap a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> IntMap a -> m (IntMap a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IntMap a -> m (IntMap a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IntMap a -> m (IntMap a) #

Monoid (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

mempty :: IntMap a #

mappend :: IntMap a -> IntMap a -> IntMap a #

mconcat :: [IntMap a] -> IntMap a #

Semigroup (IntMap a)

Since: containers-0.5.7

Instance details

Defined in Data.IntMap.Internal

Methods

(<>) :: IntMap a -> IntMap a -> IntMap a #

sconcat :: NonEmpty (IntMap a) -> IntMap a #

stimes :: Integral b => b -> IntMap a -> IntMap a #

IsList (IntMap a)

Since: containers-0.5.6.2

Instance details

Defined in Data.IntMap.Internal

Associated Types

type Item (IntMap a) #

Methods

fromList :: [Item (IntMap a)] -> IntMap a #

fromListN :: Int -> [Item (IntMap a)] -> IntMap a #

toList :: IntMap a -> [Item (IntMap a)] #

Read e => Read (IntMap e) 
Instance details

Defined in Data.IntMap.Internal

Show a => Show (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

showsPrec :: Int -> IntMap a -> ShowS #

show :: IntMap a -> String #

showList :: [IntMap a] -> ShowS #

NFData a => NFData (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

rnf :: IntMap a -> () #

Eq a => Eq (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

(==) :: IntMap a -> IntMap a -> Bool #

(/=) :: IntMap a -> IntMap a -> Bool #

Ord a => Ord (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

compare :: IntMap a -> IntMap a -> Ordering #

(<) :: IntMap a -> IntMap a -> Bool #

(<=) :: IntMap a -> IntMap a -> Bool #

(>) :: IntMap a -> IntMap a -> Bool #

(>=) :: IntMap a -> IntMap a -> Bool #

max :: IntMap a -> IntMap a -> IntMap a #

min :: IntMap a -> IntMap a -> IntMap a #

Hashable v => Hashable (IntMap v)

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> IntMap v -> Int #

hash :: IntMap v -> Int #

FromHttpApiData v => FromForm (IntMap [v]) 
Instance details

Defined in Web.Internal.FormUrlEncoded

Methods

fromForm :: Form -> Either Text (IntMap [v]) #

ToHttpApiData v => ToForm (IntMap [v]) 
Instance details

Defined in Web.Internal.FormUrlEncoded

Methods

toForm :: IntMap [v] -> Form #

HasKeysSet (IntMap v) 
Instance details

Defined in Data.Containers

Associated Types

type KeySet (IntMap v) #

Methods

keysSet :: IntMap v -> KeySet (IntMap v) #

IsMap (IntMap value)

This instance uses the functions from Data.IntMap.Strict.

Instance details

Defined in Data.Containers

Associated Types

type MapValue (IntMap value) #

Methods

lookup :: ContainerKey (IntMap value) -> IntMap value -> Maybe (MapValue (IntMap value)) #

insertMap :: ContainerKey (IntMap value) -> MapValue (IntMap value) -> IntMap value -> IntMap value #

deleteMap :: ContainerKey (IntMap value) -> IntMap value -> IntMap value #

singletonMap :: ContainerKey (IntMap value) -> MapValue (IntMap value) -> IntMap value #

mapFromList :: [(ContainerKey (IntMap value), MapValue (IntMap value))] -> IntMap value #

mapToList :: IntMap value -> [(ContainerKey (IntMap value), MapValue (IntMap value))] #

findWithDefault :: MapValue (IntMap value) -> ContainerKey (IntMap value) -> IntMap value -> MapValue (IntMap value) #

insertWith :: (MapValue (IntMap value) -> MapValue (IntMap value) -> MapValue (IntMap value)) -> ContainerKey (IntMap value) -> MapValue (IntMap value) -> IntMap value -> IntMap value #

insertWithKey :: (ContainerKey (IntMap value) -> MapValue (IntMap value) -> MapValue (IntMap value) -> MapValue (IntMap value)) -> ContainerKey (IntMap value) -> MapValue (IntMap value) -> IntMap value -> IntMap value #

insertLookupWithKey :: (ContainerKey (IntMap value) -> MapValue (IntMap value) -> MapValue (IntMap value) -> MapValue (IntMap value)) -> ContainerKey (IntMap value) -> MapValue (IntMap value) -> IntMap value -> (Maybe (MapValue (IntMap value)), IntMap value) #

adjustMap :: (MapValue (IntMap value) -> MapValue (IntMap value)) -> ContainerKey (IntMap value) -> IntMap value -> IntMap value #

adjustWithKey :: (ContainerKey (IntMap value) -> MapValue (IntMap value) -> MapValue (IntMap value)) -> ContainerKey (IntMap value) -> IntMap value -> IntMap value #

updateMap :: (MapValue (IntMap value) -> Maybe (MapValue (IntMap value))) -> ContainerKey (IntMap value) -> IntMap value -> IntMap value #

updateWithKey :: (ContainerKey (IntMap value) -> MapValue (IntMap value) -> Maybe (MapValue (IntMap value))) -> ContainerKey (IntMap value) -> IntMap value -> IntMap value #

updateLookupWithKey :: (ContainerKey (IntMap value) -> MapValue (IntMap value) -> Maybe (MapValue (IntMap value))) -> ContainerKey (IntMap value) -> IntMap value -> (Maybe (MapValue (IntMap value)), IntMap value) #

alterMap :: (Maybe (MapValue (IntMap value)) -> Maybe (MapValue (IntMap value))) -> ContainerKey (IntMap value) -> IntMap value -> IntMap value #

unionWith :: (MapValue (IntMap value) -> MapValue (IntMap value) -> MapValue (IntMap value)) -> IntMap value -> IntMap value -> IntMap value #

unionWithKey :: (ContainerKey (IntMap value) -> MapValue (IntMap value) -> MapValue (IntMap value) -> MapValue (IntMap value)) -> IntMap value -> IntMap value -> IntMap value #

unionsWith :: (MapValue (IntMap value) -> MapValue (IntMap value) -> MapValue (IntMap value)) -> [IntMap value] -> IntMap value #

mapWithKey :: (ContainerKey (IntMap value) -> MapValue (IntMap value) -> MapValue (IntMap value)) -> IntMap value -> IntMap value #

omapKeysWith :: (MapValue (IntMap value) -> MapValue (IntMap value) -> MapValue (IntMap value)) -> (ContainerKey (IntMap value) -> ContainerKey (IntMap value)) -> IntMap value -> IntMap value #

filterMap :: (MapValue (IntMap value) -> Bool) -> IntMap value -> IntMap value #

SetContainer (IntMap value)

This instance uses the functions from Data.IntMap.Strict.

Instance details

Defined in Data.Containers

Associated Types

type ContainerKey (IntMap value) #

Methods

member :: ContainerKey (IntMap value) -> IntMap value -> Bool #

notMember :: ContainerKey (IntMap value) -> IntMap value -> Bool #

union :: IntMap value -> IntMap value -> IntMap value #

unions :: (MonoFoldable mono, Element mono ~ IntMap value) => mono -> IntMap value #

difference :: IntMap value -> IntMap value -> IntMap value #

intersection :: IntMap value -> IntMap value -> IntMap value #

keys :: IntMap value -> [ContainerKey (IntMap value)] #

GrowingAppend (IntMap v) 
Instance details

Defined in Data.MonoTraversable

MonoFoldable (IntMap a) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (IntMap a) -> m) -> IntMap a -> m #

ofoldr :: (Element (IntMap a) -> b -> b) -> b -> IntMap a -> b #

ofoldl' :: (a0 -> Element (IntMap a) -> a0) -> a0 -> IntMap a -> a0 #

otoList :: IntMap a -> [Element (IntMap a)] #

oall :: (Element (IntMap a) -> Bool) -> IntMap a -> Bool #

oany :: (Element (IntMap a) -> Bool) -> IntMap a -> Bool #

onull :: IntMap a -> Bool #

olength :: IntMap a -> Int #

olength64 :: IntMap a -> Int64 #

ocompareLength :: Integral i => IntMap a -> i -> Ordering #

otraverse_ :: Applicative f => (Element (IntMap a) -> f b) -> IntMap a -> f () #

ofor_ :: Applicative f => IntMap a -> (Element (IntMap a) -> f b) -> f () #

omapM_ :: Applicative m => (Element (IntMap a) -> m ()) -> IntMap a -> m () #

oforM_ :: Applicative m => IntMap a -> (Element (IntMap a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (IntMap a) -> m a0) -> a0 -> IntMap a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (IntMap a) -> m) -> IntMap a -> m #

ofoldr1Ex :: (Element (IntMap a) -> Element (IntMap a) -> Element (IntMap a)) -> IntMap a -> Element (IntMap a) #

ofoldl1Ex' :: (Element (IntMap a) -> Element (IntMap a) -> Element (IntMap a)) -> IntMap a -> Element (IntMap a) #

headEx :: IntMap a -> Element (IntMap a) #

lastEx :: IntMap a -> Element (IntMap a) #

unsafeHead :: IntMap a -> Element (IntMap a) #

unsafeLast :: IntMap a -> Element (IntMap a) #

maximumByEx :: (Element (IntMap a) -> Element (IntMap a) -> Ordering) -> IntMap a -> Element (IntMap a) #

minimumByEx :: (Element (IntMap a) -> Element (IntMap a) -> Ordering) -> IntMap a -> Element (IntMap a) #

oelem :: Element (IntMap a) -> IntMap a -> Bool #

onotElem :: Element (IntMap a) -> IntMap a -> Bool #

MonoFunctor (IntMap a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (IntMap a) -> Element (IntMap a)) -> IntMap a -> IntMap a #

MonoTraversable (IntMap a) 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element (IntMap a) -> f (Element (IntMap a))) -> IntMap a -> f (IntMap a) #

omapM :: Applicative m => (Element (IntMap a) -> m (Element (IntMap a))) -> IntMap a -> m (IntMap a) #

PersistField v => PersistField (IntMap v) 
Instance details

Defined in Database.Persist.Class.PersistField

PersistFieldSql v => PersistFieldSql (IntMap v) 
Instance details

Defined in Database.Persist.Sql.Class

Methods

sqlType :: Proxy (IntMap v) -> SqlType #

type Key IntMap 
Instance details

Defined in Data.Key

type Key IntMap = Int
type Item (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

type Item (IntMap a) = (Key, a)
type ContainerKey (IntMap value) 
Instance details

Defined in Data.Containers

type ContainerKey (IntMap value) = Int
type KeySet (IntMap v) 
Instance details

Defined in Data.Containers

type KeySet (IntMap v) = IntSet
type MapValue (IntMap value) 
Instance details

Defined in Data.Containers

type MapValue (IntMap value) = value
type Element (IntMap a) 
Instance details

Defined in Data.MonoTraversable

type Element (IntMap a) = a

data HashSet a #

A set of values. A set cannot contain duplicate values.

Instances

Instances details
ToJSON1 HashSet 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> HashSet a -> Value #

liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [HashSet a] -> Value #

liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> HashSet a -> Encoding #

liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [HashSet a] -> Encoding #

liftOmitField :: (a -> Bool) -> HashSet a -> Bool #

Foldable HashSet 
Instance details

Defined in Data.HashSet.Internal

Methods

fold :: Monoid m => HashSet m -> m #

foldMap :: Monoid m => (a -> m) -> HashSet a -> m #

foldMap' :: Monoid m => (a -> m) -> HashSet a -> m #

foldr :: (a -> b -> b) -> b -> HashSet a -> b #

foldr' :: (a -> b -> b) -> b -> HashSet a -> b #

foldl :: (b -> a -> b) -> b -> HashSet a -> b #

foldl' :: (b -> a -> b) -> b -> HashSet a -> b #

foldr1 :: (a -> a -> a) -> HashSet a -> a #

foldl1 :: (a -> a -> a) -> HashSet a -> a #

toList :: HashSet a -> [a] #

null :: HashSet a -> Bool #

length :: HashSet a -> Int #

elem :: Eq a => a -> HashSet a -> Bool #

maximum :: Ord a => HashSet a -> a #

minimum :: Ord a => HashSet a -> a #

sum :: Num a => HashSet a -> a #

product :: Num a => HashSet a -> a #

Eq1 HashSet 
Instance details

Defined in Data.HashSet.Internal

Methods

liftEq :: (a -> b -> Bool) -> HashSet a -> HashSet b -> Bool #

Ord1 HashSet 
Instance details

Defined in Data.HashSet.Internal

Methods

liftCompare :: (a -> b -> Ordering) -> HashSet a -> HashSet b -> Ordering #

Show1 HashSet 
Instance details

Defined in Data.HashSet.Internal

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> HashSet a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [HashSet a] -> ShowS #

NFData1 HashSet

Since: unordered-containers-0.2.14.0

Instance details

Defined in Data.HashSet.Internal

Methods

liftRnf :: (a -> ()) -> HashSet a -> () #

Hashable1 HashSet 
Instance details

Defined in Data.HashSet.Internal

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> HashSet a -> Int #

Lift a => Lift (HashSet a :: Type)

Since: unordered-containers-0.2.17.0

Instance details

Defined in Data.HashSet.Internal

Methods

lift :: Quote m => HashSet a -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => HashSet a -> Code m (HashSet a) #

(Eq a, Hashable a, FromJSON a) => FromJSON (HashSet a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON a => ToJSON (HashSet a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

(Data a, Eq a, Hashable a) => Data (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HashSet a -> c (HashSet a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HashSet a) #

toConstr :: HashSet a -> Constr #

dataTypeOf :: HashSet a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HashSet a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HashSet a)) #

gmapT :: (forall b. Data b => b -> b) -> HashSet a -> HashSet a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HashSet a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HashSet a -> r #

gmapQ :: (forall d. Data d => d -> u) -> HashSet a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HashSet a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HashSet a -> m (HashSet a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HashSet a -> m (HashSet a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HashSet a -> m (HashSet a) #

(Hashable a, Eq a) => Monoid (HashSet a)

mempty = empty

mappend = union

\(O(n+m)\)

To obtain good performance, the smaller set must be presented as the first argument.

Examples

Expand
>>> mappend (fromList [1,2]) (fromList [2,3])
fromList [1,2,3]
Instance details

Defined in Data.HashSet.Internal

Methods

mempty :: HashSet a #

mappend :: HashSet a -> HashSet a -> HashSet a #

mconcat :: [HashSet a] -> HashSet a #

(Hashable a, Eq a) => Semigroup (HashSet a)

<> = union

\(O(n+m)\)

To obtain good performance, the smaller set must be presented as the first argument.

Examples

Expand
>>> fromList [1,2] <> fromList [2,3]
fromList [1,2,3]
Instance details

Defined in Data.HashSet.Internal

Methods

(<>) :: HashSet a -> HashSet a -> HashSet a #

sconcat :: NonEmpty (HashSet a) -> HashSet a #

stimes :: Integral b => b -> HashSet a -> HashSet a #

(Eq a, Hashable a) => IsList (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Associated Types

type Item (HashSet a) #

Methods

fromList :: [Item (HashSet a)] -> HashSet a #

fromListN :: Int -> [Item (HashSet a)] -> HashSet a #

toList :: HashSet a -> [Item (HashSet a)] #

(Eq a, Hashable a, Read a) => Read (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Show a => Show (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

showsPrec :: Int -> HashSet a -> ShowS #

show :: HashSet a -> String #

showList :: [HashSet a] -> ShowS #

NFData a => NFData (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

rnf :: HashSet a -> () #

Eq a => Eq (HashSet a)

Note that, in the presence of hash collisions, equal HashSets may behave differently, i.e. extensionality may be violated:

>>> data D = A | B deriving (Eq, Show)
>>> instance Hashable D where hashWithSalt salt _d = salt
>>> x = fromList [A, B]
>>> y = fromList [B, A]
>>> x == y
True
>>> toList x
[A,B]
>>> toList y
[B,A]

In general, the lack of extensionality can be observed with any function that depends on the key ordering, such as folds and traversals.

Instance details

Defined in Data.HashSet.Internal

Methods

(==) :: HashSet a -> HashSet a -> Bool #

(/=) :: HashSet a -> HashSet a -> Bool #

Ord a => Ord (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

compare :: HashSet a -> HashSet a -> Ordering #

(<) :: HashSet a -> HashSet a -> Bool #

(<=) :: HashSet a -> HashSet a -> Bool #

(>) :: HashSet a -> HashSet a -> Bool #

(>=) :: HashSet a -> HashSet a -> Bool #

max :: HashSet a -> HashSet a -> HashSet a #

min :: HashSet a -> HashSet a -> HashSet a #

Hashable a => Hashable (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

hashWithSalt :: Int -> HashSet a -> Int #

hash :: HashSet a -> Int #

(Eq element, Hashable element) => IsSet (HashSet element) 
Instance details

Defined in Data.Containers

Methods

insertSet :: Element (HashSet element) -> HashSet element -> HashSet element #

deleteSet :: Element (HashSet element) -> HashSet element -> HashSet element #

singletonSet :: Element (HashSet element) -> HashSet element #

setFromList :: [Element (HashSet element)] -> HashSet element #

setToList :: HashSet element -> [Element (HashSet element)] #

filterSet :: (Element (HashSet element) -> Bool) -> HashSet element -> HashSet element #

(Eq element, Hashable element) => SetContainer (HashSet element) 
Instance details

Defined in Data.Containers

Associated Types

type ContainerKey (HashSet element) #

Methods

member :: ContainerKey (HashSet element) -> HashSet element -> Bool #

notMember :: ContainerKey (HashSet element) -> HashSet element -> Bool #

union :: HashSet element -> HashSet element -> HashSet element #

unions :: (MonoFoldable mono, Element mono ~ HashSet element) => mono -> HashSet element #

difference :: HashSet element -> HashSet element -> HashSet element #

intersection :: HashSet element -> HashSet element -> HashSet element #

keys :: HashSet element -> [ContainerKey (HashSet element)] #

(Eq v, Hashable v) => GrowingAppend (HashSet v) 
Instance details

Defined in Data.MonoTraversable

MonoFoldable (HashSet e) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (HashSet e) -> m) -> HashSet e -> m #

ofoldr :: (Element (HashSet e) -> b -> b) -> b -> HashSet e -> b #

ofoldl' :: (a -> Element (HashSet e) -> a) -> a -> HashSet e -> a #

otoList :: HashSet e -> [Element (HashSet e)] #

oall :: (Element (HashSet e) -> Bool) -> HashSet e -> Bool #

oany :: (Element (HashSet e) -> Bool) -> HashSet e -> Bool #

onull :: HashSet e -> Bool #

olength :: HashSet e -> Int #

olength64 :: HashSet e -> Int64 #

ocompareLength :: Integral i => HashSet e -> i -> Ordering #

otraverse_ :: Applicative f => (Element (HashSet e) -> f b) -> HashSet e -> f () #

ofor_ :: Applicative f => HashSet e -> (Element (HashSet e) -> f b) -> f () #

omapM_ :: Applicative m => (Element (HashSet e) -> m ()) -> HashSet e -> m () #

oforM_ :: Applicative m => HashSet e -> (Element (HashSet e) -> m ()) -> m () #

ofoldlM :: Monad m => (a -> Element (HashSet e) -> m a) -> a -> HashSet e -> m a #

ofoldMap1Ex :: Semigroup m => (Element (HashSet e) -> m) -> HashSet e -> m #

ofoldr1Ex :: (Element (HashSet e) -> Element (HashSet e) -> Element (HashSet e)) -> HashSet e -> Element (HashSet e) #

ofoldl1Ex' :: (Element (HashSet e) -> Element (HashSet e) -> Element (HashSet e)) -> HashSet e -> Element (HashSet e) #

headEx :: HashSet e -> Element (HashSet e) #

lastEx :: HashSet e -> Element (HashSet e) #

unsafeHead :: HashSet e -> Element (HashSet e) #

unsafeLast :: HashSet e -> Element (HashSet e) #

maximumByEx :: (Element (HashSet e) -> Element (HashSet e) -> Ordering) -> HashSet e -> Element (HashSet e) #

minimumByEx :: (Element (HashSet e) -> Element (HashSet e) -> Ordering) -> HashSet e -> Element (HashSet e) #

oelem :: Element (HashSet e) -> HashSet e -> Bool #

onotElem :: Element (HashSet e) -> HashSet e -> Bool #

Hashable a => MonoPointed (HashSet a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (HashSet a) -> HashSet a #

type Item (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

type Item (HashSet a) = a
type ContainerKey (HashSet element) 
Instance details

Defined in Data.Containers

type ContainerKey (HashSet element) = element
type Element (HashSet e) 
Instance details

Defined in Data.MonoTraversable

type Element (HashSet e) = e

class (Vector Vector a, MVector MVector a) => Unbox a #

Instances

Instances details
Unbox All 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Any 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Int16 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Int32 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Int64 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Int8 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Word16 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Word32 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Word64 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Word8 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox () 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Bool 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Char 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Double 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Float 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Int 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Word 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox a => Unbox (Complex a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox a => Unbox (Identity a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox a => Unbox (Down a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox a => Unbox (First a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox a => Unbox (Last a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox a => Unbox (Max a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox a => Unbox (Min a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox a => Unbox (WrappedMonoid a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox a => Unbox (Dual a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox a => Unbox (Product a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox a => Unbox (Sum a) 
Instance details

Defined in Data.Vector.Unboxed.Base

(Unbox a, Unbox b) => Unbox (Arg a b) 
Instance details

Defined in Data.Vector.Unboxed.Base

(Unbox a, Unbox b) => Unbox (a, b) 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox a => Unbox (Const a b) 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox (f a) => Unbox (Alt f a) 
Instance details

Defined in Data.Vector.Unboxed.Base

(Unbox a, Unbox b, Unbox c) => Unbox (a, b, c) 
Instance details

Defined in Data.Vector.Unboxed.Base

(Unbox a, Unbox b, Unbox c, Unbox d) => Unbox (a, b, c, d) 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox (f (g a)) => Unbox (Compose f g a) 
Instance details

Defined in Data.Vector.Unboxed.Base

(Unbox a, Unbox b, Unbox c, Unbox d, Unbox e) => Unbox (a, b, c, d, e) 
Instance details

Defined in Data.Vector.Unboxed.Base

(Unbox a, Unbox b, Unbox c, Unbox d, Unbox e, Unbox f) => Unbox (a, b, c, d, e, f) 
Instance details

Defined in Data.Vector.Unboxed.Base

type LText = Text #

type Html = Markup #

type Tag = Text Source #

data Content #

Constructors

ContentBuilder !Builder !(Maybe Int)

The content and optional content length.

ContentSource !(ConduitT () (Flush Builder) (ResourceT IO) ()) 
ContentFile !FilePath !(Maybe FilePart) 
ContentDontEvaluate !Content 

Instances

Instances details
IsString Content 
Instance details

Defined in Yesod.Core.Types

Methods

fromString :: String -> Content #

ToContent Content 
Instance details

Defined in Yesod.Core.Content

Methods

toContent :: Content -> Content #

ToContent (ContentType, Content) 
Instance details

Defined in Yesod.Core.Content

ToTypedContent (ContentType, Content) 
Instance details

Defined in Yesod.Core.Content

newtype Static #

Type used for the subsite with static contents.

Constructors

Static StaticSettings 

Instances

Instances details
ParseRoute Static 
Instance details

Defined in Yesod.Static

Methods

parseRoute :: ([Text], [(Text, Text)]) -> Maybe (Route Static) #

RenderRoute Static 
Instance details

Defined in Yesod.Static

Associated Types

data Route Static #

Methods

renderRoute :: Route Static -> ([Text], [(Text, Text)]) #

YesodSubDispatch Static master 
Instance details

Defined in Yesod.Static

Read (Route Static) 
Instance details

Defined in Yesod.Static

Show (Route Static) 
Instance details

Defined in Yesod.Static

Eq (Route Static) 
Instance details

Defined in Yesod.Static

data Route Static 
Instance details

Defined in Yesod.Static

data Deque (v :: Type -> Type -> Type) s a #

A double-ended queue supporting any underlying vector type and any monad.

This implements a circular double-ended queue with exponential growth.

Since 0.2.0

Instances

Instances details
MVector v a => MutableCollection (Deque v s a) 
Instance details

Defined in Data.Mutable.Deque

Associated Types

type CollElement (Deque v s a) #

Methods

newColl :: (PrimMonad m, PrimState m ~ MCState (Deque v s a)) => m (Deque v s a) #

MutableContainer (Deque v s a) 
Instance details

Defined in Data.Mutable.Deque

Associated Types

type MCState (Deque v s a) #

MVector v a => MutablePopBack (Deque v s a) 
Instance details

Defined in Data.Mutable.Deque

Methods

popBack :: (PrimMonad m, PrimState m ~ MCState (Deque v s a)) => Deque v s a -> m (Maybe (CollElement (Deque v s a))) #

MVector v a => MutablePopFront (Deque v s a) 
Instance details

Defined in Data.Mutable.Deque

Methods

popFront :: (PrimMonad m, PrimState m ~ MCState (Deque v s a)) => Deque v s a -> m (Maybe (CollElement (Deque v s a))) #

MVector v a => MutablePushBack (Deque v s a) 
Instance details

Defined in Data.Mutable.Deque

Methods

pushBack :: (PrimMonad m, PrimState m ~ MCState (Deque v s a)) => Deque v s a -> CollElement (Deque v s a) -> m () #

MVector v a => MutablePushFront (Deque v s a) 
Instance details

Defined in Data.Mutable.Deque

Methods

pushFront :: (PrimMonad m, PrimState m ~ MCState (Deque v s a)) => Deque v s a -> CollElement (Deque v s a) -> m () #

type CollElement (Deque v s a) 
Instance details

Defined in Data.Mutable.Deque

type CollElement (Deque v s a) = a
type MCState (Deque v s a) 
Instance details

Defined in Data.Mutable.Deque

type MCState (Deque v s a) = s

class ToBuilder value builder where #

Since 0.1.0.0

Methods

toBuilder :: value -> builder #

Since 0.1.0.0

Instances

Instances details
ToBuilder Builder Builder 
Instance details

Defined in Data.Builder

Methods

toBuilder :: Builder -> Builder #

ToBuilder ByteString Builder 
Instance details

Defined in Data.Builder

ToBuilder ByteString Builder 
Instance details

Defined in Data.Builder

ToBuilder Text Builder 
Instance details

Defined in Data.Builder

Methods

toBuilder :: Text -> Builder #

ToBuilder Text Builder 
Instance details

Defined in Data.Builder

Methods

toBuilder :: Text -> Builder #

ToBuilder Builder Builder 
Instance details

Defined in Data.Builder

Methods

toBuilder :: Builder -> Builder #

ToBuilder Text Builder 
Instance details

Defined in Data.Builder

Methods

toBuilder :: Text -> Builder #

ToBuilder Text Builder 
Instance details

Defined in Data.Builder

Methods

toBuilder :: Text -> Builder #

ToBuilder Char Builder 
Instance details

Defined in Data.Builder

Methods

toBuilder :: Char -> Builder #

ToBuilder Char Builder 
Instance details

Defined in Data.Builder

Methods

toBuilder :: Char -> Builder #

a ~ Char => ToBuilder [a] Builder 
Instance details

Defined in Data.Builder

Methods

toBuilder :: [a] -> Builder #

a ~ Char => ToBuilder [a] Builder 
Instance details

Defined in Data.Builder

Methods

toBuilder :: [a] -> Builder #

type ByteStringBuilder = Builder #

Since 0.3.0.0

type BlazeBuilder = Builder #

Since 0.1.0.0

type TextBuilder = Builder #

Since 0.1.0.0

data Conc (m :: Type -> Type) a #

A more efficient alternative to Concurrently, which reduces the number of threads that need to be forked. For more information, see this blog post. This is provided as a separate type to Concurrently as it has a slightly different API.

Use the conc function to construct values of type Conc, and runConc to execute the composed actions. You can use the Applicative instance to run different actions and wait for all of them to complete, or the Alternative instance to wait for the first thread to complete.

In the event of a runtime exception thrown by any of the children threads, or an asynchronous exception received in the parent thread, all threads will be killed with an AsyncCancelled exception and the original exception rethrown. If multiple exceptions are generated by different threads, there are no guarantees on which exception will end up getting rethrown.

For many common use cases, you may prefer using helper functions in this module like mapConcurrently.

There are some intentional differences in behavior to Concurrently:

  • Children threads are always launched in an unmasked state, not the inherited state of the parent thread.

Note that it is a programmer error to use the Alternative instance in such a way that there are no alternatives to an empty, e.g. runConc (empty | empty). In such a case, a ConcException will be thrown. If there was an Alternative in the standard libraries without empty, this library would use it instead.

Since: unliftio-0.2.9.0

Instances

Instances details
MonadUnliftIO m => Alternative (Conc m)

Since: unliftio-0.2.9.0

Instance details

Defined in UnliftIO.Internals.Async

Methods

empty :: Conc m a #

(<|>) :: Conc m a -> Conc m a -> Conc m a #

some :: Conc m a -> Conc m [a] #

many :: Conc m a -> Conc m [a] #

MonadUnliftIO m => Applicative (Conc m)

Since: unliftio-0.2.9.0

Instance details

Defined in UnliftIO.Internals.Async

Methods

pure :: a -> Conc m a #

(<*>) :: Conc m (a -> b) -> Conc m a -> Conc m b #

liftA2 :: (a -> b -> c) -> Conc m a -> Conc m b -> Conc m c #

(*>) :: Conc m a -> Conc m b -> Conc m b #

(<*) :: Conc m a -> Conc m b -> Conc m a #

Functor m => Functor (Conc m) 
Instance details

Defined in UnliftIO.Internals.Async

Methods

fmap :: (a -> b) -> Conc m a -> Conc m b #

(<$) :: a -> Conc m b -> Conc m a #

(Monoid a, MonadUnliftIO m) => Monoid (Conc m a)

Since: unliftio-0.2.9.0

Instance details

Defined in UnliftIO.Internals.Async

Methods

mempty :: Conc m a #

mappend :: Conc m a -> Conc m a -> Conc m a #

mconcat :: [Conc m a] -> Conc m a #

(MonadUnliftIO m, Semigroup a) => Semigroup (Conc m a)

Since: unliftio-0.2.9.0

Instance details

Defined in UnliftIO.Internals.Async

Methods

(<>) :: Conc m a -> Conc m a -> Conc m a #

sconcat :: NonEmpty (Conc m a) -> Conc m a #

stimes :: Integral b => b -> Conc m a -> Conc m a #

class NFData a where #

A class of types that can be fully evaluated.

Since: deepseq-1.1.0.0

Minimal complete definition

Nothing

Methods

rnf :: a -> () #

rnf should reduce its argument to normal form (that is, fully evaluate all sub-components), and then return ().

Generic NFData deriving

Starting with GHC 7.2, you can automatically derive instances for types possessing a Generic instance.

Note: Generic1 can be auto-derived starting with GHC 7.4

{-# LANGUAGE DeriveGeneric #-}

import GHC.Generics (Generic, Generic1)
import Control.DeepSeq

data Foo a = Foo a String
             deriving (Eq, Generic, Generic1)

instance NFData a => NFData (Foo a)
instance NFData1 Foo

data Colour = Red | Green | Blue
              deriving Generic

instance NFData Colour

Starting with GHC 7.10, the example above can be written more concisely by enabling the new DeriveAnyClass extension:

{-# LANGUAGE DeriveGeneric, DeriveAnyClass #-}

import GHC.Generics (Generic)
import Control.DeepSeq

data Foo a = Foo a String
             deriving (Eq, Generic, Generic1, NFData, NFData1)

data Colour = Red | Green | Blue
              deriving (Generic, NFData)

Compatibility with previous deepseq versions

Prior to version 1.4.0.0, the default implementation of the rnf method was defined as

rnf a = seq a ()

However, starting with deepseq-1.4.0.0, the default implementation is based on DefaultSignatures allowing for more accurate auto-derived NFData instances. If you need the previously used exact default rnf method implementation semantics, use

instance NFData Colour where rnf x = seq x ()

or alternatively

instance NFData Colour where rnf = rwhnf

or

{-# LANGUAGE BangPatterns #-}
instance NFData Colour where rnf !_ = ()

Instances

Instances details
NFData Key 
Instance details

Defined in Data.Aeson.Key

Methods

rnf :: Key -> () #

NFData JSONPathElement 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

rnf :: JSONPathElement -> () #

NFData Value 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

rnf :: Value -> () #

NFData ByteArray

Since: deepseq-1.4.7.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: ByteArray -> () #

NFData All

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: All -> () #

NFData Any

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Any -> () #

NFData TypeRep

NOTE: Prior to deepseq-1.4.4.0 this instance was only defined for base-4.8.0.0 and later.

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: TypeRep -> () #

NFData Unique

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Unique -> () #

NFData Version

Since: deepseq-1.3.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Version -> () #

NFData CBool

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CBool -> () #

NFData CChar

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CChar -> () #

NFData CClock

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CClock -> () #

NFData CDouble

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CDouble -> () #

NFData CFile

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CFile -> () #

NFData CFloat

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CFloat -> () #

NFData CFpos

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CFpos -> () #

NFData CInt

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CInt -> () #

NFData CIntMax

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CIntMax -> () #

NFData CIntPtr

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CIntPtr -> () #

NFData CJmpBuf

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CJmpBuf -> () #

NFData CLLong

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CLLong -> () #

NFData CLong

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CLong -> () #

NFData CPtrdiff

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CPtrdiff -> () #

NFData CSChar

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CSChar -> () #

NFData CSUSeconds

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CSUSeconds -> () #

NFData CShort

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CShort -> () #

NFData CSigAtomic

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CSigAtomic -> () #

NFData CSize

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CSize -> () #

NFData CTime

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CTime -> () #

NFData CUChar

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CUChar -> () #

NFData CUInt

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CUInt -> () #

NFData CUIntMax

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CUIntMax -> () #

NFData CUIntPtr

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CUIntPtr -> () #

NFData CULLong

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CULLong -> () #

NFData CULong

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CULong -> () #

NFData CUSeconds

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CUSeconds -> () #

NFData CUShort

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CUShort -> () #

NFData CWchar

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CWchar -> () #

NFData Void

Defined as rnf = absurd.

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Void -> () #

NFData ThreadId

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: ThreadId -> () #

NFData Fingerprint

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Fingerprint -> () #

NFData MaskingState

Since: deepseq-1.4.4.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: MaskingState -> () #

NFData ExitCode

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: ExitCode -> () #

NFData Int16 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Int16 -> () #

NFData Int32 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Int32 -> () #

NFData Int64 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Int64 -> () #

NFData Int8 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Int8 -> () #

NFData CallStack

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CallStack -> () #

NFData SrcLoc

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: SrcLoc -> () #

NFData Word16 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Word16 -> () #

NFData Word32 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Word32 -> () #

NFData Word64 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Word64 -> () #

NFData Word8 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Word8 -> () #

NFData ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

Methods

rnf :: ByteString -> () #

NFData ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Methods

rnf :: ByteString -> () #

NFData ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Methods

rnf :: ShortByteString -> () #

NFData IntSet 
Instance details

Defined in Data.IntSet.Internal

Methods

rnf :: IntSet -> () #

NFData SameSiteOption 
Instance details

Defined in Web.Cookie

Methods

rnf :: SameSiteOption -> () #

NFData SetCookie 
Instance details

Defined in Web.Cookie

Methods

rnf :: SetCookie -> () #

NFData SharedSecret 
Instance details

Defined in Crypto.ECC

Methods

rnf :: SharedSecret -> () #

NFData OsChar 
Instance details

Defined in System.OsString.Internal.Types

Methods

rnf :: OsChar -> () #

NFData OsString 
Instance details

Defined in System.OsString.Internal.Types

Methods

rnf :: OsString -> () #

NFData PosixChar 
Instance details

Defined in System.OsString.Internal.Types

Methods

rnf :: PosixChar -> () #

NFData PosixString 
Instance details

Defined in System.OsString.Internal.Types

Methods

rnf :: PosixString -> () #

NFData WindowsChar 
Instance details

Defined in System.OsString.Internal.Types

Methods

rnf :: WindowsChar -> () #

NFData WindowsString 
Instance details

Defined in System.OsString.Internal.Types

Methods

rnf :: WindowsString -> () #

NFData Module

Since: deepseq-1.4.8.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Module -> () #

NFData Ordering 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Ordering -> () #

NFData TyCon

NOTE: Prior to deepseq-1.4.4.0 this instance was only defined for base-4.8.0.0 and later.

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: TyCon -> () #

NFData SockAddr 
Instance details

Defined in Network.Socket.Types

Methods

rnf :: SockAddr -> () #

NFData URI 
Instance details

Defined in Network.URI

Methods

rnf :: URI -> () #

NFData URIAuth 
Instance details

Defined in Network.URI

Methods

rnf :: URIAuth -> () #

NFData PersistValue

Since: persistent-2.14.4.0

Instance details

Defined in Database.Persist.PersistValue

Methods

rnf :: PersistValue -> () #

NFData TextDetails 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

rnf :: TextDetails -> () #

NFData Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Methods

rnf :: Doc -> () #

NFData StdGen 
Instance details

Defined in System.Random.Internal

Methods

rnf :: StdGen -> () #

NFData Scientific 
Instance details

Defined in Data.Scientific

Methods

rnf :: Scientific -> () #

NFData ShortText 
Instance details

Defined in Data.Text.Short.Internal

Methods

rnf :: ShortText -> () #

NFData Day 
Instance details

Defined in Data.Time.Calendar.Days

Methods

rnf :: Day -> () #

NFData DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Methods

rnf :: DiffTime -> () #

NFData NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Methods

rnf :: NominalDiffTime -> () #

NFData UTCTime 
Instance details

Defined in Data.Time.Clock.Internal.UTCTime

Methods

rnf :: UTCTime -> () #

NFData LocalTime 
Instance details

Defined in Data.Time.LocalTime.Internal.LocalTime

Methods

rnf :: LocalTime -> () #

NFData TimeOfDay 
Instance details

Defined in Data.Time.LocalTime.Internal.TimeOfDay

Methods

rnf :: TimeOfDay -> () #

NFData ZonedTime 
Instance details

Defined in Data.Time.LocalTime.Internal.ZonedTime

Methods

rnf :: ZonedTime -> () #

NFData UUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

rnf :: UUID -> () #

NFData Content 
Instance details

Defined in Data.XML.Types

Methods

rnf :: Content -> () #

NFData Doctype 
Instance details

Defined in Data.XML.Types

Methods

rnf :: Doctype -> () #

NFData Document 
Instance details

Defined in Data.XML.Types

Methods

rnf :: Document -> () #

NFData Element 
Instance details

Defined in Data.XML.Types

Methods

rnf :: Element -> () #

NFData Event 
Instance details

Defined in Data.XML.Types

Methods

rnf :: Event -> () #

NFData ExternalID 
Instance details

Defined in Data.XML.Types

Methods

rnf :: ExternalID -> () #

NFData Instruction 
Instance details

Defined in Data.XML.Types

Methods

rnf :: Instruction -> () #

NFData Miscellaneous 
Instance details

Defined in Data.XML.Types

Methods

rnf :: Miscellaneous -> () #

NFData Name 
Instance details

Defined in Data.XML.Types

Methods

rnf :: Name -> () #

NFData Node 
Instance details

Defined in Data.XML.Types

Methods

rnf :: Node -> () #

NFData Prologue 
Instance details

Defined in Data.XML.Types

Methods

rnf :: Prologue -> () #

NFData ErrorResponse 
Instance details

Defined in Yesod.Core.Types

Methods

rnf :: ErrorResponse -> () #

NFData Header 
Instance details

Defined in Yesod.Core.Types

Methods

rnf :: Header -> () #

NFData Integer 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Integer -> () #

NFData Natural

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Natural -> () #

NFData () 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: () -> () #

NFData Bool 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Bool -> () #

NFData Char 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Char -> () #

NFData Double 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Double -> () #

NFData Float 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Float -> () #

NFData Int 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Int -> () #

NFData Word 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Word -> () #

NFData v => NFData (KeyMap v) 
Instance details

Defined in Data.Aeson.KeyMap

Methods

rnf :: KeyMap v -> () #

NFData a => NFData (IResult a) 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

rnf :: IResult a -> () #

NFData a => NFData (Result a) 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

rnf :: Result a -> () #

NFData a => NFData (ZipList a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: ZipList a -> () #

NFData (MutableByteArray s)

Since: deepseq-1.4.8.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: MutableByteArray s -> () #

NFData a => NFData (Complex a) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Complex a -> () #

NFData a => NFData (Identity a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Identity a -> () #

NFData a => NFData (First a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: First a -> () #

NFData a => NFData (Last a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Last a -> () #

NFData a => NFData (Down a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Down a -> () #

NFData a => NFData (First a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: First a -> () #

NFData a => NFData (Last a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Last a -> () #

NFData a => NFData (Max a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Max a -> () #

NFData a => NFData (Min a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Min a -> () #

NFData m => NFData (WrappedMonoid m)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: WrappedMonoid m -> () #

NFData a => NFData (Dual a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Dual a -> () #

NFData a => NFData (Product a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Product a -> () #

NFData a => NFData (Sum a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Sum a -> () #

NFData a => NFData (NonEmpty a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: NonEmpty a -> () #

NFData (IORef a)

NOTE: Only strict in the reference and not the referenced value.

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: IORef a -> () #

NFData (MVar a)

NOTE: Only strict in the reference and not the referenced value.

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: MVar a -> () #

NFData (FunPtr a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: FunPtr a -> () #

NFData (Ptr a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Ptr a -> () #

NFData a => NFData (Ratio a) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Ratio a -> () #

NFData (StableName a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: StableName a -> () #

NFData s => NFData (CI s) 
Instance details

Defined in Data.CaseInsensitive.Internal

Methods

rnf :: CI s -> () #

NFData a => NFData (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

rnf :: IntMap a -> () #

NFData a => NFData (Digit a) 
Instance details

Defined in Data.Sequence.Internal

Methods

rnf :: Digit a -> () #

NFData a => NFData (Elem a) 
Instance details

Defined in Data.Sequence.Internal

Methods

rnf :: Elem a -> () #

NFData a => NFData (FingerTree a) 
Instance details

Defined in Data.Sequence.Internal

Methods

rnf :: FingerTree a -> () #

NFData a => NFData (Node a) 
Instance details

Defined in Data.Sequence.Internal

Methods

rnf :: Node a -> () #

NFData a => NFData (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

rnf :: Seq a -> () #

NFData a => NFData (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

rnf :: Set a -> () #

NFData a => NFData (Tree a) 
Instance details

Defined in Data.Tree

Methods

rnf :: Tree a -> () #

NFData (Context a) 
Instance details

Defined in Crypto.Hash.Types

Methods

rnf :: Context a -> () #

NFData (Digest a) 
Instance details

Defined in Crypto.Hash.Types

Methods

rnf :: Digest a -> () #

NFData (Context a) 
Instance details

Defined in Crypto.Hash.Types

Methods

rnf :: Context a -> () #

NFData (Digest a) 
Instance details

Defined in Crypto.Hash.Types

Methods

rnf :: Digest a -> () #

NFData1 f => NFData (Fix f) 
Instance details

Defined in Data.Fix

Methods

rnf :: Fix f -> () #

NFData a => NFData (DNonEmpty a) 
Instance details

Defined in Data.DList.DNonEmpty.Internal

Methods

rnf :: DNonEmpty a -> () #

NFData a => NFData (DList a) 
Instance details

Defined in Data.DList.Internal

Methods

rnf :: DList a -> () #

NFData a => NFData (Hashed a) 
Instance details

Defined in Data.Hashable.Class

Methods

rnf :: Hashed a -> () #

NFData a => NFData (AnnotDetails a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

rnf :: AnnotDetails a -> () #

NFData a => NFData (Doc a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

rnf :: Doc a -> () #

NFData a => NFData (Array a) 
Instance details

Defined in Data.Primitive.Array

Methods

rnf :: Array a -> () #

NFData (PrimArray a) 
Instance details

Defined in Data.Primitive.PrimArray

Methods

rnf :: PrimArray a -> () #

NFData a => NFData (SmallArray a) 
Instance details

Defined in Data.Primitive.SmallArray

Methods

rnf :: SmallArray a -> () #

NFData g => NFData (StateGen g) 
Instance details

Defined in System.Random.Internal

Methods

rnf :: StateGen g -> () #

NFData g => NFData (AtomicGen g) 
Instance details

Defined in System.Random.Stateful

Methods

rnf :: AtomicGen g -> () #

NFData g => NFData (IOGen g) 
Instance details

Defined in System.Random.Stateful

Methods

rnf :: IOGen g -> () #

NFData g => NFData (STGen g) 
Instance details

Defined in System.Random.Stateful

Methods

rnf :: STGen g -> () #

NFData g => NFData (TGen g) 
Instance details

Defined in System.Random.Stateful

Methods

rnf :: TGen g -> () #

NFData a => NFData (Maybe a) 
Instance details

Defined in Data.Strict.Maybe

Methods

rnf :: Maybe a -> () #

NFData a => NFData (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

rnf :: HashSet a -> () #

NFData a => NFData (Vector a) 
Instance details

Defined in Data.Vector

Methods

rnf :: Vector a -> () #

NFData (Vector a) 
Instance details

Defined in Data.Vector.Primitive

Methods

rnf :: Vector a -> () #

NFData (Vector a) 
Instance details

Defined in Data.Vector.Storable

Methods

rnf :: Vector a -> () #

NFData (Vector a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

rnf :: Vector a -> () #

NFData a => NFData (Maybe a) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Maybe a -> () #

NFData a => NFData (a)

Since: deepseq-1.4.6.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a) -> () #

NFData a => NFData [a] 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: [a] -> () #

(NFData i, NFData r) => NFData (IResult i r) 
Instance details

Defined in Data.Attoparsec.Internal.Types

Methods

rnf :: IResult i r -> () #

(NFData a, NFData b) => NFData (Either a b) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Either a b -> () #

NFData (Fixed a)

Since: deepseq-1.3.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Fixed a -> () #

NFData (Proxy a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Proxy a -> () #

(NFData a, NFData b) => NFData (Arg a b)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Arg a b -> () #

NFData (TypeRep a)

Since: deepseq-1.4.8.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: TypeRep a -> () #

(NFData a, NFData b) => NFData (Array a b) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Array a b -> () #

NFData (STRef s a)

NOTE: Only strict in the reference and not the referenced value.

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: STRef s a -> () #

(NFData k, NFData a) => NFData (Map k a) 
Instance details

Defined in Data.Map.Internal

Methods

rnf :: Map k a -> () #

NFData (MutablePrimArray s a) 
Instance details

Defined in Data.Primitive.PrimArray

Methods

rnf :: MutablePrimArray s a -> () #

(NFData a, NFData b) => NFData (Either a b) 
Instance details

Defined in Data.Strict.Either

Methods

rnf :: Either a b -> () #

(NFData a, NFData b) => NFData (These a b) 
Instance details

Defined in Data.Strict.These

Methods

rnf :: These a b -> () #

(NFData a, NFData b) => NFData (Pair a b) 
Instance details

Defined in Data.Strict.Tuple

Methods

rnf :: Pair a b -> () #

(NFData a, NFData b) => NFData (These a b)

Since: these-0.7.1

Instance details

Defined in Data.These

Methods

rnf :: These a b -> () #

(NFData k, NFData v) => NFData (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

rnf :: HashMap k v -> () #

(NFData k, NFData v) => NFData (Leaf k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

rnf :: Leaf k v -> () #

NFData (MVector s a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

rnf :: MVector s a -> () #

(NFData a, NFData b) => NFData (a, b) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a, b) -> () #

NFData (a -> b)

This instance is for convenience and consistency with seq. This assumes that WHNF is equivalent to NF for functions.

Since: deepseq-1.3.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a -> b) -> () #

NFData a => NFData (Const a b)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Const a b -> () #

NFData (a :~: b)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a :~: b) -> () #

NFData b => NFData (Tagged s b) 
Instance details

Defined in Data.Tagged

Methods

rnf :: Tagged s b -> () #

(NFData (f a), NFData (g a), NFData a) => NFData (These1 f g a)

Available always

Since: these-1.2

Instance details

Defined in Data.Functor.These

Methods

rnf :: These1 f g a -> () #

(NFData a1, NFData a2, NFData a3) => NFData (a1, a2, a3) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a1, a2, a3) -> () #

(NFData1 f, NFData1 g, NFData a) => NFData (Product f g a)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Product f g a -> () #

(NFData1 f, NFData1 g, NFData a) => NFData (Sum f g a)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Sum f g a -> () #

NFData (a :~~: b)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a :~~: b) -> () #

(NFData a1, NFData a2, NFData a3, NFData a4) => NFData (a1, a2, a3, a4) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a1, a2, a3, a4) -> () #

(NFData1 f, NFData1 g, NFData a) => NFData (Compose f g a)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Compose f g a -> () #

(NFData a1, NFData a2, NFData a3, NFData a4, NFData a5) => NFData (a1, a2, a3, a4, a5) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a1, a2, a3, a4, a5) -> () #

(NFData a1, NFData a2, NFData a3, NFData a4, NFData a5, NFData a6) => NFData (a1, a2, a3, a4, a5, a6) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a1, a2, a3, a4, a5, a6) -> () #

(NFData a1, NFData a2, NFData a3, NFData a4, NFData a5, NFData a6, NFData a7) => NFData (a1, a2, a3, a4, a5, a6, a7) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a1, a2, a3, a4, a5, a6, a7) -> () #

(NFData a1, NFData a2, NFData a3, NFData a4, NFData a5, NFData a6, NFData a7, NFData a8) => NFData (a1, a2, a3, a4, a5, a6, a7, a8) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a1, a2, a3, a4, a5, a6, a7, a8) -> () #

(NFData a1, NFData a2, NFData a3, NFData a4, NFData a5, NFData a6, NFData a7, NFData a8, NFData a9) => NFData (a1, a2, a3, a4, a5, a6, a7, a8, a9) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a1, a2, a3, a4, a5, a6, a7, a8, a9) -> () #

data DList a #

A difference list is an abstraction representing a list that supports \(\mathcal{O}\)(1) append and snoc operations, making it useful for replacing frequent applications of ++ such as logging and pretty printing (esp. if those uses of ++ are left-nested).

Instances

Instances details
FromJSON1 DList 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (DList a) #

liftParseJSONList :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [DList a] #

liftOmittedField :: Maybe a -> Maybe (DList a) #

ToJSON1 DList 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> DList a -> Value #

liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [DList a] -> Value #

liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> DList a -> Encoding #

liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [DList a] -> Encoding #

liftOmitField :: (a -> Bool) -> DList a -> Bool #

MonadFail DList 
Instance details

Defined in Data.DList.Internal

Methods

fail :: String -> DList a #

Foldable DList 
Instance details

Defined in Data.DList.Internal

Methods

fold :: Monoid m => DList m -> m #

foldMap :: Monoid m => (a -> m) -> DList a -> m #

foldMap' :: Monoid m => (a -> m) -> DList a -> m #

foldr :: (a -> b -> b) -> b -> DList a -> b #

foldr' :: (a -> b -> b) -> b -> DList a -> b #

foldl :: (b -> a -> b) -> b -> DList a -> b #

foldl' :: (b -> a -> b) -> b -> DList a -> b #

foldr1 :: (a -> a -> a) -> DList a -> a #

foldl1 :: (a -> a -> a) -> DList a -> a #

toList :: DList a -> [a] #

null :: DList a -> Bool #

length :: DList a -> Int #

elem :: Eq a => a -> DList a -> Bool #

maximum :: Ord a => DList a -> a #

minimum :: Ord a => DList a -> a #

sum :: Num a => DList a -> a #

product :: Num a => DList a -> a #

Traversable DList 
Instance details

Defined in Data.DList.Internal

Methods

traverse :: Applicative f => (a -> f b) -> DList a -> f (DList b) #

sequenceA :: Applicative f => DList (f a) -> f (DList a) #

mapM :: Monad m => (a -> m b) -> DList a -> m (DList b) #

sequence :: Monad m => DList (m a) -> m (DList a) #

Alternative DList 
Instance details

Defined in Data.DList.Internal

Methods

empty :: DList a #

(<|>) :: DList a -> DList a -> DList a #

some :: DList a -> DList [a] #

many :: DList a -> DList [a] #

Applicative DList 
Instance details

Defined in Data.DList.Internal

Methods

pure :: a -> DList a #

(<*>) :: DList (a -> b) -> DList a -> DList b #

liftA2 :: (a -> b -> c) -> DList a -> DList b -> DList c #

(*>) :: DList a -> DList b -> DList b #

(<*) :: DList a -> DList b -> DList a #

Functor DList 
Instance details

Defined in Data.DList.Internal

Methods

fmap :: (a -> b) -> DList a -> DList b #

(<$) :: a -> DList b -> DList a #

Monad DList 
Instance details

Defined in Data.DList.Internal

Methods

(>>=) :: DList a -> (a -> DList b) -> DList b #

(>>) :: DList a -> DList b -> DList b #

return :: a -> DList a #

MonadPlus DList 
Instance details

Defined in Data.DList.Internal

Methods

mzero :: DList a #

mplus :: DList a -> DList a -> DList a #

FromPairs Value (DList Pair) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

fromPairs :: DList Pair -> Value

v ~ Value => KeyValuePair v (DList Pair) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

pair :: Key -> v -> DList Pair

FromJSON a => FromJSON (DList a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON a => ToJSON (DList a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

a ~ Char => IsString (DList a) 
Instance details

Defined in Data.DList.Internal

Methods

fromString :: String -> DList a #

Monoid (DList a) 
Instance details

Defined in Data.DList.Internal

Methods

mempty :: DList a #

mappend :: DList a -> DList a -> DList a #

mconcat :: [DList a] -> DList a #

Semigroup (DList a) 
Instance details

Defined in Data.DList.Internal

Methods

(<>) :: DList a -> DList a -> DList a #

sconcat :: NonEmpty (DList a) -> DList a #

stimes :: Integral b => b -> DList a -> DList a #

IsList (DList a) 
Instance details

Defined in Data.DList.Internal

Associated Types

type Item (DList a) #

Methods

fromList :: [Item (DList a)] -> DList a #

fromListN :: Int -> [Item (DList a)] -> DList a #

toList :: DList a -> [Item (DList a)] #

Read a => Read (DList a) 
Instance details

Defined in Data.DList.Internal

Show a => Show (DList a) 
Instance details

Defined in Data.DList.Internal

Methods

showsPrec :: Int -> DList a -> ShowS #

show :: DList a -> String #

showList :: [DList a] -> ShowS #

NFData a => NFData (DList a) 
Instance details

Defined in Data.DList.Internal

Methods

rnf :: DList a -> () #

Eq a => Eq (DList a) 
Instance details

Defined in Data.DList.Internal

Methods

(==) :: DList a -> DList a -> Bool #

(/=) :: DList a -> DList a -> Bool #

Ord a => Ord (DList a) 
Instance details

Defined in Data.DList.Internal

Methods

compare :: DList a -> DList a -> Ordering #

(<) :: DList a -> DList a -> Bool #

(<=) :: DList a -> DList a -> Bool #

(>) :: DList a -> DList a -> Bool #

(>=) :: DList a -> DList a -> Bool #

max :: DList a -> DList a -> DList a #

min :: DList a -> DList a -> DList a #

type Item (DList a) 
Instance details

Defined in Data.DList.Internal

type Item (DList a) = a
type Element (DList a) 
Instance details

Defined in Data.MonoTraversable.Instances

type Element (DList a) = a
type Index (DList a) 
Instance details

Defined in Data.MonoTraversable.Instances

type Index (DList a) = Int

newtype Day #

The Modified Julian Day is a standard count of days, with zero being the day 1858-11-17.

Instances

Instances details
FromJSON Day 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSONKey Day 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON Day 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSONKey Day 
Instance details

Defined in Data.Aeson.Types.ToJSON

Data Day 
Instance details

Defined in Data.Time.Calendar.Days

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Day -> c Day #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Day #

toConstr :: Day -> Constr #

dataTypeOf :: Day -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Day) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Day) #

gmapT :: (forall b. Data b => b -> b) -> Day -> Day #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Day -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Day -> r #

gmapQ :: (forall d. Data d => d -> u) -> Day -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Day -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Day -> m Day #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Day -> m Day #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Day -> m Day #

Enum Day 
Instance details

Defined in Data.Time.Calendar.Days

Methods

succ :: Day -> Day #

pred :: Day -> Day #

toEnum :: Int -> Day #

fromEnum :: Day -> Int #

enumFrom :: Day -> [Day] #

enumFromThen :: Day -> Day -> [Day] #

enumFromTo :: Day -> Day -> [Day] #

enumFromThenTo :: Day -> Day -> Day -> [Day] #

Ix Day 
Instance details

Defined in Data.Time.Calendar.Days

Methods

range :: (Day, Day) -> [Day] #

index :: (Day, Day) -> Day -> Int #

unsafeIndex :: (Day, Day) -> Day -> Int #

inRange :: (Day, Day) -> Day -> Bool #

rangeSize :: (Day, Day) -> Int #

unsafeRangeSize :: (Day, Day) -> Int #

NFData Day 
Instance details

Defined in Data.Time.Calendar.Days

Methods

rnf :: Day -> () #

Eq Day 
Instance details

Defined in Data.Time.Calendar.Days

Methods

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

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

Ord Day 
Instance details

Defined in Data.Time.Calendar.Days

Methods

compare :: Day -> Day -> Ordering #

(<) :: Day -> Day -> Bool #

(<=) :: Day -> Day -> Bool #

(>) :: Day -> Day -> Bool #

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

max :: Day -> Day -> Day #

min :: Day -> Day -> Day #

FromFormKey Day 
Instance details

Defined in Web.Internal.FormUrlEncoded

ToFormKey Day 
Instance details

Defined in Web.Internal.FormUrlEncoded

Methods

toFormKey :: Day -> Text #

FromHttpApiData Day
>>> toGregorian <$> parseUrlPiece "2016-12-01"
Right (2016,12,1)
Instance details

Defined in Web.Internal.HttpApiData

ToHttpApiData Day
>>> toUrlPiece (fromGregorian 2015 10 03)
"2015-10-03"
Instance details

Defined in Web.Internal.HttpApiData

PathPiece Day 
Instance details

Defined in Web.PathPieces

PersistField Day 
Instance details

Defined in Database.Persist.Class.PersistField

PersistFieldSql Day 
Instance details

Defined in Database.Persist.Sql.Class

Methods

sqlType :: Proxy Day -> SqlType #

DayPeriod Day 
Instance details

Defined in Data.Time.Calendar.Days

data AsyncExceptionWrapper #

Wrap up a synchronous exception to be treated as an asynchronous exception

This is intended to be created via toAsyncException

Since: safe-exceptions-0.1.0.0

Constructors

Exception e => AsyncExceptionWrapper e 

data SyncExceptionWrapper #

Wrap up an asynchronous exception to be treated as a synchronous exception

This is intended to be created via toSyncException

Since: safe-exceptions-0.1.0.0

Constructors

Exception e => SyncExceptionWrapper e 

data StringException #

Exception type thrown by throwString.

Note that the second field of the data constructor depends on GHC/base version. For base 4.9 and GHC 8.0 and later, the second field is a call stack. Previous versions of GHC and base do not support call stacks, and the field is simply unit (provided to make pattern matching across GHC versions easier).

Since: unliftio-0.1.0.0

Instances

Instances details
Exception StringException

Since: unliftio-0.1.0.0

Instance details

Defined in UnliftIO.Exception

Show StringException

Since: unliftio-0.1.0.0

Instance details

Defined in UnliftIO.Exception

Eq StringException

Since: unliftio-0.2.19

Instance details

Defined in UnliftIO.Exception

data TBQueue a #

TBQueue is an abstract type representing a bounded FIFO channel.

Since: stm-2.4

Instances

Instances details
Eq (TBQueue a) 
Instance details

Defined in Control.Concurrent.STM.TBQueue

Methods

(==) :: TBQueue a -> TBQueue a -> Bool #

(/=) :: TBQueue a -> TBQueue a -> Bool #

data TChan a #

TChan is an abstract type representing an unbounded FIFO channel.

Instances

Instances details
Eq (TChan a) 
Instance details

Defined in Control.Concurrent.STM.TChan

Methods

(==) :: TChan a -> TChan a -> Bool #

(/=) :: TChan a -> TChan a -> Bool #

data TMVar a #

A TMVar is a synchronising variable, used for communication between concurrent threads. It can be thought of as a box, which may be empty or full.

Instances

Instances details
Eq (TMVar a) 
Instance details

Defined in Control.Concurrent.STM.TMVar

Methods

(==) :: TMVar a -> TMVar a -> Bool #

(/=) :: TMVar a -> TMVar a -> Bool #

data TQueue a #

TQueue is an abstract type representing an unbounded FIFO channel.

Since: stm-2.4

Instances

Instances details
Eq (TQueue a) 
Instance details

Defined in Control.Concurrent.STM.TQueue

Methods

(==) :: TQueue a -> TQueue a -> Bool #

(/=) :: TQueue a -> TQueue a -> Bool #

data ConcException #

Things that can go wrong in the structure of a Conc. These are programmer errors.

Since: unliftio-0.2.9.0

Instances

Instances details
Exception ConcException 
Instance details

Defined in UnliftIO.Internals.Async

Generic ConcException 
Instance details

Defined in UnliftIO.Internals.Async

Associated Types

type Rep ConcException :: Type -> Type #

Show ConcException 
Instance details

Defined in UnliftIO.Internals.Async

Eq ConcException 
Instance details

Defined in UnliftIO.Internals.Async

Ord ConcException 
Instance details

Defined in UnliftIO.Internals.Async

type Rep ConcException 
Instance details

Defined in UnliftIO.Internals.Async

type Rep ConcException = D1 ('MetaData "ConcException" "UnliftIO.Internals.Async" "unliftio-0.2.25.0-40dfGWPP97w9btUo1Ouu28" 'False) (C1 ('MetaCons "EmptyWithNoAlternative" 'PrefixI 'False) (U1 :: Type -> Type))

data Memoized a #

A "run once" value, with results saved. Extract the value with runMemoized. For single-threaded usage, you can use memoizeRef to create a value. If you need guarantees that only one thread will run the action at a time, use memoizeMVar.

Note that this type provides a Show instance for convenience, but not useful information can be provided.

Since: unliftio-0.2.8.0

Instances

Instances details
Applicative Memoized 
Instance details

Defined in UnliftIO.Memoize

Methods

pure :: a -> Memoized a #

(<*>) :: Memoized (a -> b) -> Memoized a -> Memoized b #

liftA2 :: (a -> b -> c) -> Memoized a -> Memoized b -> Memoized c #

(*>) :: Memoized a -> Memoized b -> Memoized b #

(<*) :: Memoized a -> Memoized b -> Memoized a #

Functor Memoized 
Instance details

Defined in UnliftIO.Memoize

Methods

fmap :: (a -> b) -> Memoized a -> Memoized b #

(<$) :: a -> Memoized b -> Memoized a #

Monad Memoized 
Instance details

Defined in UnliftIO.Memoize

Methods

(>>=) :: Memoized a -> (a -> Memoized b) -> Memoized b #

(>>) :: Memoized a -> Memoized b -> Memoized b #

return :: a -> Memoized a #

Show (Memoized a) 
Instance details

Defined in UnliftIO.Memoize

Methods

showsPrec :: Int -> Memoized a -> ShowS #

show :: Memoized a -> String #

showList :: [Memoized a] -> ShowS #

class MonadIO m => MonadUnliftIO (m :: Type -> Type) where #

Monads which allow their actions to be run in IO.

While MonadIO allows an IO action to be lifted into another monad, this class captures the opposite concept: allowing you to capture the monadic context. Note that, in order to meet the laws given below, the intuition is that a monad must have no monadic state, but may have monadic context. This essentially limits MonadUnliftIO to ReaderT and IdentityT transformers on top of IO.

Laws. For any function run provided by withRunInIO, it must meet the monad transformer laws as reformulated for MonadUnliftIO:

  • run . return = return
  • run (m >>= f) = run m >>= run . f

Instances of MonadUnliftIO must also satisfy the following laws:

Identity law
withRunInIO (\run -> run m) = m
Inverse law
withRunInIO (\_ -> m) = liftIO m

As an example of an invalid instance, a naive implementation of MonadUnliftIO (StateT s m) might be

withRunInIO inner =
  StateT $ \s ->
    withRunInIO $ \run ->
      inner (run . flip evalStateT s)

This breaks the identity law because the inner run m would throw away any state changes in m.

Since: unliftio-core-0.1.0.0

Methods

withRunInIO :: ((forall a. m a -> IO a) -> IO b) -> m b #

Convenience function for capturing the monadic context and running an IO action with a runner function. The runner function is used to run a monadic action m in IO.

Since: unliftio-core-0.1.0.0

Instances

Instances details
MonadUnliftIO IO 
Instance details

Defined in Control.Monad.IO.Unlift

Methods

withRunInIO :: ((forall a. IO a -> IO a) -> IO b) -> IO b #

MonadUnliftIO m => MonadUnliftIO (LoggingT m)

Since: monad-logger-0.3.26

Instance details

Defined in Control.Monad.Logger

Methods

withRunInIO :: ((forall a. LoggingT m a -> IO a) -> IO b) -> LoggingT m b #

MonadUnliftIO m => MonadUnliftIO (NoLoggingT m)

Since: monad-logger-0.3.26

Instance details

Defined in Control.Monad.Logger

Methods

withRunInIO :: ((forall a. NoLoggingT m a -> IO a) -> IO b) -> NoLoggingT m b #

MonadUnliftIO m => MonadUnliftIO (ResourceT m)

Since: resourcet-1.1.10

Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

withRunInIO :: ((forall a. ResourceT m a -> IO a) -> IO b) -> ResourceT m b #

MonadUnliftIO (HandlerFor site)

Since: yesod-core-1.4.38

Instance details

Defined in Yesod.Core.Types

Methods

withRunInIO :: ((forall a. HandlerFor site a -> IO a) -> IO b) -> HandlerFor site b #

MonadUnliftIO (WidgetFor site)

Since: yesod-core-1.4.38

Instance details

Defined in Yesod.Core.Types

Methods

withRunInIO :: ((forall a. WidgetFor site a -> IO a) -> IO b) -> WidgetFor site b #

MonadUnliftIO m => MonadUnliftIO (IdentityT m) 
Instance details

Defined in Control.Monad.IO.Unlift

Methods

withRunInIO :: ((forall a. IdentityT m a -> IO a) -> IO b) -> IdentityT m b #

MonadUnliftIO m => MonadUnliftIO (ReaderT r m) 
Instance details

Defined in Control.Monad.IO.Unlift

Methods

withRunInIO :: ((forall a. ReaderT r m a -> IO a) -> IO b) -> ReaderT r m b #

MonadUnliftIO (SubHandlerFor child master)

Since: yesod-core-1.4.38

Instance details

Defined in Yesod.Core.Types

Methods

withRunInIO :: ((forall a. SubHandlerFor child master a -> IO a) -> IO b) -> SubHandlerFor child master b #

data MutVar s a #

A MutVar behaves like a single-element mutable array associated with a primitive state token.

Constructors

MutVar (MutVar# s a) 

Instances

Instances details
Eq (MutVar s a) 
Instance details

Defined in Data.Primitive.MutVar

Methods

(==) :: MutVar s a -> MutVar s a -> Bool #

(/=) :: MutVar s a -> MutVar s a -> Bool #

MutableAtomicRef (MutVar s a) 
Instance details

Defined in Data.Mutable.Class

Methods

atomicModifyRef :: (PrimMonad m, PrimState m ~ MCState (MutVar s a)) => MutVar s a -> (RefElement (MutVar s a) -> (RefElement (MutVar s a), a0)) -> m a0 #

atomicModifyRef' :: (PrimMonad m, PrimState m ~ MCState (MutVar s a)) => MutVar s a -> (RefElement (MutVar s a) -> (RefElement (MutVar s a), a0)) -> m a0 #

Monoid w => MutableCollection (MutVar s w) 
Instance details

Defined in Data.Mutable.Class

Associated Types

type CollElement (MutVar s w) #

Methods

newColl :: (PrimMonad m, PrimState m ~ MCState (MutVar s w)) => m (MutVar s w) #

MutableContainer (MutVar s a) 
Instance details

Defined in Data.Mutable.Class

Associated Types

type MCState (MutVar s a) #

IsSequence a => MutablePopBack (MutVar s a) 
Instance details

Defined in Data.Mutable.Class

Methods

popBack :: (PrimMonad m, PrimState m ~ MCState (MutVar s a)) => MutVar s a -> m (Maybe (CollElement (MutVar s a))) #

IsSequence a => MutablePopFront (MutVar s a) 
Instance details

Defined in Data.Mutable.Class

Methods

popFront :: (PrimMonad m, PrimState m ~ MCState (MutVar s a)) => MutVar s a -> m (Maybe (CollElement (MutVar s a))) #

IsSequence a => MutablePushBack (MutVar s a) 
Instance details

Defined in Data.Mutable.Class

Methods

pushBack :: (PrimMonad m, PrimState m ~ MCState (MutVar s a)) => MutVar s a -> CollElement (MutVar s a) -> m () #

IsSequence a => MutablePushFront (MutVar s a) 
Instance details

Defined in Data.Mutable.Class

Methods

pushFront :: (PrimMonad m, PrimState m ~ MCState (MutVar s a)) => MutVar s a -> CollElement (MutVar s a) -> m () #

MutableRef (MutVar s a) 
Instance details

Defined in Data.Mutable.Class

Associated Types

type RefElement (MutVar s a) #

Methods

newRef :: (PrimMonad m, PrimState m ~ MCState (MutVar s a)) => RefElement (MutVar s a) -> m (MutVar s a) #

readRef :: (PrimMonad m, PrimState m ~ MCState (MutVar s a)) => MutVar s a -> m (RefElement (MutVar s a)) #

writeRef :: (PrimMonad m, PrimState m ~ MCState (MutVar s a)) => MutVar s a -> RefElement (MutVar s a) -> m () #

modifyRef :: (PrimMonad m, PrimState m ~ MCState (MutVar s a)) => MutVar s a -> (RefElement (MutVar s a) -> RefElement (MutVar s a)) -> m () #

modifyRef' :: (PrimMonad m, PrimState m ~ MCState (MutVar s a)) => MutVar s a -> (RefElement (MutVar s a) -> RefElement (MutVar s a)) -> m () #

type CollElement (MutVar s w) 
Instance details

Defined in Data.Mutable.Class

type CollElement (MutVar s w) = Element w
type MCState (MutVar s a) 
Instance details

Defined in Data.Mutable.Class

type MCState (MutVar s a) = s
type RefElement (MutVar s a) 
Instance details

Defined in Data.Mutable.Class

type RefElement (MutVar s a) = a

class Prim a #

Class of types supporting primitive array operations. This includes interfacing with GC-managed memory (functions suffixed with ByteArray#) and interfacing with unmanaged memory (functions suffixed with Addr#). Endianness is platform-dependent.

Instances

Instances details
Prim CBool 
Instance details

Defined in Data.Primitive.Types

Prim CChar 
Instance details

Defined in Data.Primitive.Types

Prim CClock 
Instance details

Defined in Data.Primitive.Types

Prim CDouble 
Instance details

Defined in Data.Primitive.Types

Prim CFloat 
Instance details

Defined in Data.Primitive.Types

Prim CInt 
Instance details

Defined in Data.Primitive.Types

Prim CIntMax 
Instance details

Defined in Data.Primitive.Types

Prim CIntPtr 
Instance details

Defined in Data.Primitive.Types

Prim CLLong 
Instance details

Defined in Data.Primitive.Types

Prim CLong 
Instance details

Defined in Data.Primitive.Types

Prim CPtrdiff 
Instance details

Defined in Data.Primitive.Types

Prim CSChar 
Instance details

Defined in Data.Primitive.Types

Prim CSUSeconds 
Instance details

Defined in Data.Primitive.Types

Prim CShort 
Instance details

Defined in Data.Primitive.Types

Prim CSigAtomic 
Instance details

Defined in Data.Primitive.Types

Prim CSize 
Instance details

Defined in Data.Primitive.Types

Prim CTime 
Instance details

Defined in Data.Primitive.Types

Prim CUChar 
Instance details

Defined in Data.Primitive.Types

Prim CUInt 
Instance details

Defined in Data.Primitive.Types

Prim CUIntMax 
Instance details

Defined in Data.Primitive.Types

Prim CUIntPtr 
Instance details

Defined in Data.Primitive.Types

Prim CULLong 
Instance details

Defined in Data.Primitive.Types

Prim CULong 
Instance details

Defined in Data.Primitive.Types

Prim CUSeconds 
Instance details

Defined in Data.Primitive.Types

Prim CUShort 
Instance details

Defined in Data.Primitive.Types

Prim CWchar 
Instance details

Defined in Data.Primitive.Types

Prim IntPtr

Since: primitive-0.7.1.0

Instance details

Defined in Data.Primitive.Types

Prim WordPtr

Since: primitive-0.7.1.0

Instance details

Defined in Data.Primitive.Types

Prim Int16 
Instance details

Defined in Data.Primitive.Types

Prim Int32 
Instance details

Defined in Data.Primitive.Types

Prim Int64 
Instance details

Defined in Data.Primitive.Types

Prim Int8 
Instance details

Defined in Data.Primitive.Types

Prim Word16 
Instance details

Defined in Data.Primitive.Types

Prim Word32 
Instance details

Defined in Data.Primitive.Types

Prim Word64 
Instance details

Defined in Data.Primitive.Types

Prim Word8 
Instance details

Defined in Data.Primitive.Types

Prim CBlkCnt 
Instance details

Defined in Data.Primitive.Types

Prim CBlkSize 
Instance details

Defined in Data.Primitive.Types

Prim CCc 
Instance details

Defined in Data.Primitive.Types

Prim CClockId 
Instance details

Defined in Data.Primitive.Types

Prim CDev 
Instance details

Defined in Data.Primitive.Types

Prim CFsBlkCnt 
Instance details

Defined in Data.Primitive.Types

Prim CFsFilCnt 
Instance details

Defined in Data.Primitive.Types

Prim CGid 
Instance details

Defined in Data.Primitive.Types

Prim CId 
Instance details

Defined in Data.Primitive.Types

Prim CIno 
Instance details

Defined in Data.Primitive.Types

Prim CKey 
Instance details

Defined in Data.Primitive.Types

Prim CMode 
Instance details

Defined in Data.Primitive.Types

Prim CNlink 
Instance details

Defined in Data.Primitive.Types

Prim COff 
Instance details

Defined in Data.Primitive.Types

Prim CPid 
Instance details

Defined in Data.Primitive.Types

Prim CRLim 
Instance details

Defined in Data.Primitive.Types

Prim CSpeed 
Instance details

Defined in Data.Primitive.Types

Prim CSsize 
Instance details

Defined in Data.Primitive.Types

Prim CTcflag 
Instance details

Defined in Data.Primitive.Types

Prim CTimer 
Instance details

Defined in Data.Primitive.Types

Prim CUid 
Instance details

Defined in Data.Primitive.Types

Prim Fd 
Instance details

Defined in Data.Primitive.Types

Prim Char 
Instance details

Defined in Data.Primitive.Types

Prim Double 
Instance details

Defined in Data.Primitive.Types

Prim Float 
Instance details

Defined in Data.Primitive.Types

Prim Int 
Instance details

Defined in Data.Primitive.Types

Prim Word 
Instance details

Defined in Data.Primitive.Types

Prim a => Prim (Complex a)

Since: primitive-0.9.0.0

Instance details

Defined in Data.Primitive.Types

Prim a => Prim (Identity a)

Since: primitive-0.6.5.0

Instance details

Defined in Data.Primitive.Types

Prim a => Prim (Down a)

Since: primitive-0.6.5.0

Instance details

Defined in Data.Primitive.Types

Prim a => Prim (First a)

Since: primitive-0.6.5.0

Instance details

Defined in Data.Primitive.Types

Prim a => Prim (Last a)

Since: primitive-0.6.5.0

Instance details

Defined in Data.Primitive.Types

Prim a => Prim (Max a)

Since: primitive-0.6.5.0

Instance details

Defined in Data.Primitive.Types

Prim a => Prim (Min a)

Since: primitive-0.6.5.0

Instance details

Defined in Data.Primitive.Types

Prim a => Prim (Dual a)

Since: primitive-0.6.5.0

Instance details

Defined in Data.Primitive.Types

Prim a => Prim (Product a)

Since: primitive-0.6.5.0

Instance details

Defined in Data.Primitive.Types

Prim a => Prim (Sum a)

Since: primitive-0.6.5.0

Instance details

Defined in Data.Primitive.Types

Prim (FunPtr a) 
Instance details

Defined in Data.Primitive.Types

Prim (Ptr a) 
Instance details

Defined in Data.Primitive.Types

Prim (StablePtr a) 
Instance details

Defined in Data.Primitive.Types

Prim a => Prim (Const a b)

Since: primitive-0.6.5.0

Instance details

Defined in Data.Primitive.Types

Methods

sizeOfType# :: Proxy (Const a b) -> Int# #

sizeOf# :: Const a b -> Int# #

alignmentOfType# :: Proxy (Const a b) -> Int# #

alignment# :: Const a b -> Int# #

indexByteArray# :: ByteArray# -> Int# -> Const a b #

readByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, Const a b #) #

writeByteArray# :: MutableByteArray# s -> Int# -> Const a b -> State# s -> State# s #

setByteArray# :: MutableByteArray# s -> Int# -> Int# -> Const a b -> State# s -> State# s #

indexOffAddr# :: Addr# -> Int# -> Const a b #

readOffAddr# :: Addr# -> Int# -> State# s -> (# State# s, Const a b #) #

writeOffAddr# :: Addr# -> Int# -> Const a b -> State# s -> State# s #

setOffAddr# :: Addr# -> Int# -> Int# -> Const a b -> State# s -> State# s #

type MutableDeque c = (MutableQueue c, MutablePushFront c, MutablePopBack c) #

Collections which allow pushing and popping at the front and back.

Since 0.2.0

type MutableStack c = (MutablePopFront c, MutablePushFront c) #

Collections which allow pushing at the back and popping at the front (aka FILOs).

Since 0.2.0

type MutableQueue c = (MutablePopFront c, MutablePushBack c) #

Collections which allow pushing and popping at the front (aka FIFOs).

Since 0.2.0

class MutableCollection c => MutablePushBack c where #

Place a value at the back of the collection.

Since 0.2.0

Methods

pushBack :: (PrimMonad m, PrimState m ~ MCState c) => c -> CollElement c -> m () #

Place a value at the back of the collection.

Since 0.2.0

Instances

Instances details
IsSequence a => MutablePushBack (IORef a) 
Instance details

Defined in Data.Mutable.Class

Methods

pushBack :: (PrimMonad m, PrimState m ~ MCState (IORef a)) => IORef a -> CollElement (IORef a) -> m () #

IsSequence a => MutablePushBack (STRef s a) 
Instance details

Defined in Data.Mutable.Class

Methods

pushBack :: (PrimMonad m, PrimState m ~ MCState (STRef s a)) => STRef s a -> CollElement (STRef s a) -> m () #

IsSequence seq => MutablePushBack (BRef s seq) 
Instance details

Defined in Data.Mutable.BRef

Methods

pushBack :: (PrimMonad m, PrimState m ~ MCState (BRef s seq)) => BRef s seq -> CollElement (BRef s seq) -> m () #

MutablePushBack (DLList s a) 
Instance details

Defined in Data.Mutable.DLList

Methods

pushBack :: (PrimMonad m, PrimState m ~ MCState (DLList s a)) => DLList s a -> CollElement (DLList s a) -> m () #

IsSequence a => MutablePushBack (MutVar s a) 
Instance details

Defined in Data.Mutable.Class

Methods

pushBack :: (PrimMonad m, PrimState m ~ MCState (MutVar s a)) => MutVar s a -> CollElement (MutVar s a) -> m () #

MVector v a => MutablePushBack (Deque v s a) 
Instance details

Defined in Data.Mutable.Deque

Methods

pushBack :: (PrimMonad m, PrimState m ~ MCState (Deque v s a)) => Deque v s a -> CollElement (Deque v s a) -> m () #

class MutableCollection c => MutablePopBack c where #

Take a value from the back of the collection, if available.

Since 0.2.0

Methods

popBack :: (PrimMonad m, PrimState m ~ MCState c) => c -> m (Maybe (CollElement c)) #

Take a value from the back of the collection, if available.

Since 0.2.0

Instances

Instances details
IsSequence a => MutablePopBack (IORef a) 
Instance details

Defined in Data.Mutable.Class

Methods

popBack :: (PrimMonad m, PrimState m ~ MCState (IORef a)) => IORef a -> m (Maybe (CollElement (IORef a))) #

IsSequence a => MutablePopBack (STRef s a) 
Instance details

Defined in Data.Mutable.Class

Methods

popBack :: (PrimMonad m, PrimState m ~ MCState (STRef s a)) => STRef s a -> m (Maybe (CollElement (STRef s a))) #

IsSequence seq => MutablePopBack (BRef s seq) 
Instance details

Defined in Data.Mutable.BRef

Methods

popBack :: (PrimMonad m, PrimState m ~ MCState (BRef s seq)) => BRef s seq -> m (Maybe (CollElement (BRef s seq))) #

MutablePopBack (DLList s a) 
Instance details

Defined in Data.Mutable.DLList

Methods

popBack :: (PrimMonad m, PrimState m ~ MCState (DLList s a)) => DLList s a -> m (Maybe (CollElement (DLList s a))) #

IsSequence a => MutablePopBack (MutVar s a) 
Instance details

Defined in Data.Mutable.Class

Methods

popBack :: (PrimMonad m, PrimState m ~ MCState (MutVar s a)) => MutVar s a -> m (Maybe (CollElement (MutVar s a))) #

MVector v a => MutablePopBack (Deque v s a) 
Instance details

Defined in Data.Mutable.Deque

Methods

popBack :: (PrimMonad m, PrimState m ~ MCState (Deque v s a)) => Deque v s a -> m (Maybe (CollElement (Deque v s a))) #

class MutableCollection c => MutablePushFront c where #

Place a value at the front of the collection.

Since 0.2.0

Methods

pushFront :: (PrimMonad m, PrimState m ~ MCState c) => c -> CollElement c -> m () #

Place a value at the front of the collection.

Since 0.2.0

Instances

Instances details
IsSequence a => MutablePushFront (IORef a) 
Instance details

Defined in Data.Mutable.Class

Methods

pushFront :: (PrimMonad m, PrimState m ~ MCState (IORef a)) => IORef a -> CollElement (IORef a) -> m () #

IsSequence a => MutablePushFront (STRef s a) 
Instance details

Defined in Data.Mutable.Class

Methods

pushFront :: (PrimMonad m, PrimState m ~ MCState (STRef s a)) => STRef s a -> CollElement (STRef s a) -> m () #

IsSequence seq => MutablePushFront (BRef s seq) 
Instance details

Defined in Data.Mutable.BRef

Methods

pushFront :: (PrimMonad m, PrimState m ~ MCState (BRef s seq)) => BRef s seq -> CollElement (BRef s seq) -> m () #

MutablePushFront (DLList s a) 
Instance details

Defined in Data.Mutable.DLList

Methods

pushFront :: (PrimMonad m, PrimState m ~ MCState (DLList s a)) => DLList s a -> CollElement (DLList s a) -> m () #

IsSequence a => MutablePushFront (MutVar s a) 
Instance details

Defined in Data.Mutable.Class

Methods

pushFront :: (PrimMonad m, PrimState m ~ MCState (MutVar s a)) => MutVar s a -> CollElement (MutVar s a) -> m () #

MVector v a => MutablePushFront (Deque v s a) 
Instance details

Defined in Data.Mutable.Deque

Methods

pushFront :: (PrimMonad m, PrimState m ~ MCState (Deque v s a)) => Deque v s a -> CollElement (Deque v s a) -> m () #

class MutableCollection c => MutablePopFront c where #

Take a value from the front of the collection, if available.

Since 0.2.0

Methods

popFront :: (PrimMonad m, PrimState m ~ MCState c) => c -> m (Maybe (CollElement c)) #

Take a value from the front of the collection, if available.

Since 0.2.0

Instances

Instances details
IsSequence a => MutablePopFront (IORef a) 
Instance details

Defined in Data.Mutable.Class

Methods

popFront :: (PrimMonad m, PrimState m ~ MCState (IORef a)) => IORef a -> m (Maybe (CollElement (IORef a))) #

IsSequence a => MutablePopFront (STRef s a) 
Instance details

Defined in Data.Mutable.Class

Methods

popFront :: (PrimMonad m, PrimState m ~ MCState (STRef s a)) => STRef s a -> m (Maybe (CollElement (STRef s a))) #

IsSequence seq => MutablePopFront (BRef s seq) 
Instance details

Defined in Data.Mutable.BRef

Methods

popFront :: (PrimMonad m, PrimState m ~ MCState (BRef s seq)) => BRef s seq -> m (Maybe (CollElement (BRef s seq))) #

MutablePopFront (DLList s a) 
Instance details

Defined in Data.Mutable.DLList

Methods

popFront :: (PrimMonad m, PrimState m ~ MCState (DLList s a)) => DLList s a -> m (Maybe (CollElement (DLList s a))) #

IsSequence a => MutablePopFront (MutVar s a) 
Instance details

Defined in Data.Mutable.Class

Methods

popFront :: (PrimMonad m, PrimState m ~ MCState (MutVar s a)) => MutVar s a -> m (Maybe (CollElement (MutVar s a))) #

MVector v a => MutablePopFront (Deque v s a) 
Instance details

Defined in Data.Mutable.Deque

Methods

popFront :: (PrimMonad m, PrimState m ~ MCState (Deque v s a)) => Deque v s a -> m (Maybe (CollElement (Deque v s a))) #

class MutableContainer c => MutableCollection c where #

Containers which contain 0 or more values.

Since 0.2.0

Associated Types

type CollElement c #

The type of each value in the collection.

Since 0.2.0

Methods

newColl :: (PrimMonad m, PrimState m ~ MCState c) => m c #

Create a new, empty collection.

Since 0.2.0

Instances

Instances details
Monoid w => MutableCollection (IORef w) 
Instance details

Defined in Data.Mutable.Class

Associated Types

type CollElement (IORef w) #

Methods

newColl :: (PrimMonad m, PrimState m ~ MCState (IORef w)) => m (IORef w) #

Monoid w => MutableCollection (STRef s w) 
Instance details

Defined in Data.Mutable.Class

Associated Types

type CollElement (STRef s w) #

Methods

newColl :: (PrimMonad m, PrimState m ~ MCState (STRef s w)) => m (STRef s w) #

Monoid w => MutableCollection (BRef s w) 
Instance details

Defined in Data.Mutable.BRef

Associated Types

type CollElement (BRef s w) #

Methods

newColl :: (PrimMonad m, PrimState m ~ MCState (BRef s w)) => m (BRef s w) #

MutableCollection (DLList s a) 
Instance details

Defined in Data.Mutable.DLList

Associated Types

type CollElement (DLList s a) #

Methods

newColl :: (PrimMonad m, PrimState m ~ MCState (DLList s a)) => m (DLList s a) #

Monoid w => MutableCollection (MutVar s w) 
Instance details

Defined in Data.Mutable.Class

Associated Types

type CollElement (MutVar s w) #

Methods

newColl :: (PrimMonad m, PrimState m ~ MCState (MutVar s w)) => m (MutVar s w) #

MVector v a => MutableCollection (Deque v s a) 
Instance details

Defined in Data.Mutable.Deque

Associated Types

type CollElement (Deque v s a) #

Methods

newColl :: (PrimMonad m, PrimState m ~ MCState (Deque v s a)) => m (Deque v s a) #

type family CollElement c #

The type of each value in the collection.

Since 0.2.0

Instances

Instances details
type CollElement (IORef w) 
Instance details

Defined in Data.Mutable.Class

type CollElement (STRef s w) 
Instance details

Defined in Data.Mutable.Class

type CollElement (STRef s w) = Element w
type CollElement (BRef s w) 
Instance details

Defined in Data.Mutable.BRef

type CollElement (BRef s w) = Element w
type CollElement (DLList s a) 
Instance details

Defined in Data.Mutable.DLList

type CollElement (DLList s a) = a
type CollElement (MutVar s w) 
Instance details

Defined in Data.Mutable.Class

type CollElement (MutVar s w) = Element w
type CollElement (Deque v s a) 
Instance details

Defined in Data.Mutable.Deque

type CollElement (Deque v s a) = a

class MutableRef c => MutableAtomicRef c where #

MutableRefs that provide for atomic modifications of their contents.

Since 0.2.0

Methods

atomicModifyRef :: (PrimMonad m, PrimState m ~ MCState c) => c -> (RefElement c -> (RefElement c, a)) -> m a #

Modify the value without necessarily forcing the result.

Since 0.2.0

atomicModifyRef' :: (PrimMonad m, PrimState m ~ MCState c) => c -> (RefElement c -> (RefElement c, a)) -> m a #

Modify the value, forcing the result.

Since 0.2.0

Instances

Instances details
MutableAtomicRef (IORef a) 
Instance details

Defined in Data.Mutable.Class

Methods

atomicModifyRef :: (PrimMonad m, PrimState m ~ MCState (IORef a)) => IORef a -> (RefElement (IORef a) -> (RefElement (IORef a), a0)) -> m a0 #

atomicModifyRef' :: (PrimMonad m, PrimState m ~ MCState (IORef a)) => IORef a -> (RefElement (IORef a) -> (RefElement (IORef a), a0)) -> m a0 #

MutableAtomicRef (MutVar s a) 
Instance details

Defined in Data.Mutable.Class

Methods

atomicModifyRef :: (PrimMonad m, PrimState m ~ MCState (MutVar s a)) => MutVar s a -> (RefElement (MutVar s a) -> (RefElement (MutVar s a), a0)) -> m a0 #

atomicModifyRef' :: (PrimMonad m, PrimState m ~ MCState (MutVar s a)) => MutVar s a -> (RefElement (MutVar s a) -> (RefElement (MutVar s a), a0)) -> m a0 #

class MutableContainer c => MutableRef c where #

Typeclass for single-cell mutable references.

Since 0.2.0

Associated Types

type RefElement c #

Associated type giving the type of the value inside the mutable reference.

Since 0.2.0

Methods

newRef :: (PrimMonad m, PrimState m ~ MCState c) => RefElement c -> m c #

Create a new mutable reference with the given value.

Since 0.2.0

readRef :: (PrimMonad m, PrimState m ~ MCState c) => c -> m (RefElement c) #

Read the current value in the mutable reference.

Since 0.2.0

writeRef :: (PrimMonad m, PrimState m ~ MCState c) => c -> RefElement c -> m () #

Write a new value to the mutable reference.

Since 0.2.0

modifyRef :: (PrimMonad m, PrimState m ~ MCState c) => c -> (RefElement c -> RefElement c) -> m () #

Modify the value in the mutable reference, without necessarily forcing the result.

Note: some implementations will force the result, in particular PRef, SRef, and URef.

Since 0.2.0

modifyRef' :: (PrimMonad m, PrimState m ~ MCState c) => c -> (RefElement c -> RefElement c) -> m () #

Modify the value in the mutable reference, forcing the result.

Since 0.2.0

Instances

Instances details
MutableRef (IORef a) 
Instance details

Defined in Data.Mutable.Class

Associated Types

type RefElement (IORef a) #

Methods

newRef :: (PrimMonad m, PrimState m ~ MCState (IORef a)) => RefElement (IORef a) -> m (IORef a) #

readRef :: (PrimMonad m, PrimState m ~ MCState (IORef a)) => IORef a -> m (RefElement (IORef a)) #

writeRef :: (PrimMonad m, PrimState m ~ MCState (IORef a)) => IORef a -> RefElement (IORef a) -> m () #

modifyRef :: (PrimMonad m, PrimState m ~ MCState (IORef a)) => IORef a -> (RefElement (IORef a) -> RefElement (IORef a)) -> m () #

modifyRef' :: (PrimMonad m, PrimState m ~ MCState (IORef a)) => IORef a -> (RefElement (IORef a) -> RefElement (IORef a)) -> m () #

MutableRef (STRef s a) 
Instance details

Defined in Data.Mutable.Class

Associated Types

type RefElement (STRef s a) #

Methods

newRef :: (PrimMonad m, PrimState m ~ MCState (STRef s a)) => RefElement (STRef s a) -> m (STRef s a) #

readRef :: (PrimMonad m, PrimState m ~ MCState (STRef s a)) => STRef s a -> m (RefElement (STRef s a)) #

writeRef :: (PrimMonad m, PrimState m ~ MCState (STRef s a)) => STRef s a -> RefElement (STRef s a) -> m () #

modifyRef :: (PrimMonad m, PrimState m ~ MCState (STRef s a)) => STRef s a -> (RefElement (STRef s a) -> RefElement (STRef s a)) -> m () #

modifyRef' :: (PrimMonad m, PrimState m ~ MCState (STRef s a)) => STRef s a -> (RefElement (STRef s a) -> RefElement (STRef s a)) -> m () #

MutableRef (BRef s a) 
Instance details

Defined in Data.Mutable.BRef

Associated Types

type RefElement (BRef s a) #

Methods

newRef :: (PrimMonad m, PrimState m ~ MCState (BRef s a)) => RefElement (BRef s a) -> m (BRef s a) #

readRef :: (PrimMonad m, PrimState m ~ MCState (BRef s a)) => BRef s a -> m (RefElement (BRef s a)) #

writeRef :: (PrimMonad m, PrimState m ~ MCState (BRef s a)) => BRef s a -> RefElement (BRef s a) -> m () #

modifyRef :: (PrimMonad m, PrimState m ~ MCState (BRef s a)) => BRef s a -> (RefElement (BRef s a) -> RefElement (BRef s a)) -> m () #

modifyRef' :: (PrimMonad m, PrimState m ~ MCState (BRef s a)) => BRef s a -> (RefElement (BRef s a) -> RefElement (BRef s a)) -> m () #

Prim a => MutableRef (PRef s a) 
Instance details

Defined in Data.Mutable.PRef

Associated Types

type RefElement (PRef s a) #

Methods

newRef :: (PrimMonad m, PrimState m ~ MCState (PRef s a)) => RefElement (PRef s a) -> m (PRef s a) #

readRef :: (PrimMonad m, PrimState m ~ MCState (PRef s a)) => PRef s a -> m (RefElement (PRef s a)) #

writeRef :: (PrimMonad m, PrimState m ~ MCState (PRef s a)) => PRef s a -> RefElement (PRef s a) -> m () #

modifyRef :: (PrimMonad m, PrimState m ~ MCState (PRef s a)) => PRef s a -> (RefElement (PRef s a) -> RefElement (PRef s a)) -> m () #

modifyRef' :: (PrimMonad m, PrimState m ~ MCState (PRef s a)) => PRef s a -> (RefElement (PRef s a) -> RefElement (PRef s a)) -> m () #

Storable a => MutableRef (SRef s a) 
Instance details

Defined in Data.Mutable.SRef

Associated Types

type RefElement (SRef s a) #

Methods

newRef :: (PrimMonad m, PrimState m ~ MCState (SRef s a)) => RefElement (SRef s a) -> m (SRef s a) #

readRef :: (PrimMonad m, PrimState m ~ MCState (SRef s a)) => SRef s a -> m (RefElement (SRef s a)) #

writeRef :: (PrimMonad m, PrimState m ~ MCState (SRef s a)) => SRef s a -> RefElement (SRef s a) -> m () #

modifyRef :: (PrimMonad m, PrimState m ~ MCState (SRef s a)) => SRef s a -> (RefElement (SRef s a) -> RefElement (SRef s a)) -> m () #

modifyRef' :: (PrimMonad m, PrimState m ~ MCState (SRef s a)) => SRef s a -> (RefElement (SRef s a) -> RefElement (SRef s a)) -> m () #

Unbox a => MutableRef (URef s a) 
Instance details

Defined in Data.Mutable.URef

Associated Types

type RefElement (URef s a) #

Methods

newRef :: (PrimMonad m, PrimState m ~ MCState (URef s a)) => RefElement (URef s a) -> m (URef s a) #

readRef :: (PrimMonad m, PrimState m ~ MCState (URef s a)) => URef s a -> m (RefElement (URef s a)) #

writeRef :: (PrimMonad m, PrimState m ~ MCState (URef s a)) => URef s a -> RefElement (URef s a) -> m () #

modifyRef :: (PrimMonad m, PrimState m ~ MCState (URef s a)) => URef s a -> (RefElement (URef s a) -> RefElement (URef s a)) -> m () #

modifyRef' :: (PrimMonad m, PrimState m ~ MCState (URef s a)) => URef s a -> (RefElement (URef s a) -> RefElement (URef s a)) -> m () #

MutableRef (MutVar s a) 
Instance details

Defined in Data.Mutable.Class

Associated Types

type RefElement (MutVar s a) #

Methods

newRef :: (PrimMonad m, PrimState m ~ MCState (MutVar s a)) => RefElement (MutVar s a) -> m (MutVar s a) #

readRef :: (PrimMonad m, PrimState m ~ MCState (MutVar s a)) => MutVar s a -> m (RefElement (MutVar s a)) #

writeRef :: (PrimMonad m, PrimState m ~ MCState (MutVar s a)) => MutVar s a -> RefElement (MutVar s a) -> m () #

modifyRef :: (PrimMonad m, PrimState m ~ MCState (MutVar s a)) => MutVar s a -> (RefElement (MutVar s a) -> RefElement (MutVar s a)) -> m () #

modifyRef' :: (PrimMonad m, PrimState m ~ MCState (MutVar s a)) => MutVar s a -> (RefElement (MutVar s a) -> RefElement (MutVar s a)) -> m () #

type family RefElement c #

Associated type giving the type of the value inside the mutable reference.

Since 0.2.0

Instances

Instances details
type RefElement (IORef a) 
Instance details

Defined in Data.Mutable.Class

type RefElement (IORef a) = a
type RefElement (STRef s a) 
Instance details

Defined in Data.Mutable.Class

type RefElement (STRef s a) = a
type RefElement (BRef s a) 
Instance details

Defined in Data.Mutable.BRef

type RefElement (BRef s a) = a
type RefElement (PRef s a) 
Instance details

Defined in Data.Mutable.PRef

type RefElement (PRef s a) = a
type RefElement (SRef s a) 
Instance details

Defined in Data.Mutable.SRef

type RefElement (SRef s a) = a
type RefElement (URef s a) 
Instance details

Defined in Data.Mutable.URef

type RefElement (URef s a) = a
type RefElement (MutVar s a) 
Instance details

Defined in Data.Mutable.Class

type RefElement (MutVar s a) = a

class MutableContainer c #

The parent typeclass for all mutable containers.

Since 0.2.0

Associated Types

type MCState c #

Associated type giving the primitive state token for the given container, much like PrimState from primitive.

Since 0.2.0

Instances

Instances details
MutableContainer (IORef a) 
Instance details

Defined in Data.Mutable.Class

Associated Types

type MCState (IORef a) #

MutableContainer (STRef s a) 
Instance details

Defined in Data.Mutable.Class

Associated Types

type MCState (STRef s a) #

MutableContainer (BRef s a) 
Instance details

Defined in Data.Mutable.BRef

Associated Types

type MCState (BRef s a) #

MutableContainer (DLList s a) 
Instance details

Defined in Data.Mutable.DLList

Associated Types

type MCState (DLList s a) #

MutableContainer (PRef s a) 
Instance details

Defined in Data.Mutable.PRef

Associated Types

type MCState (PRef s a) #

MutableContainer (SRef s a) 
Instance details

Defined in Data.Mutable.SRef

Associated Types

type MCState (SRef s a) #

MutableContainer (URef s a) 
Instance details

Defined in Data.Mutable.URef

Associated Types

type MCState (URef s a) #

MutableContainer (MutVar s a) 
Instance details

Defined in Data.Mutable.Class

Associated Types

type MCState (MutVar s a) #

MutableContainer (Deque v s a) 
Instance details

Defined in Data.Mutable.Deque

Associated Types

type MCState (Deque v s a) #

type family MCState c #

Associated type giving the primitive state token for the given container, much like PrimState from primitive.

Since 0.2.0

Instances

Instances details
type MCState (IORef a) 
Instance details

Defined in Data.Mutable.Class

type MCState (STRef s a) 
Instance details

Defined in Data.Mutable.Class

type MCState (STRef s a) = s
type MCState (BRef s a) 
Instance details

Defined in Data.Mutable.BRef

type MCState (BRef s a) = s
type MCState (DLList s a) 
Instance details

Defined in Data.Mutable.DLList

type MCState (DLList s a) = s
type MCState (PRef s a) 
Instance details

Defined in Data.Mutable.PRef

type MCState (PRef s a) = s
type MCState (SRef s a) 
Instance details

Defined in Data.Mutable.SRef

type MCState (SRef s a) = s
type MCState (URef s a) 
Instance details

Defined in Data.Mutable.URef

type MCState (URef s a) = s
type MCState (MutVar s a) 
Instance details

Defined in Data.Mutable.Class

type MCState (MutVar s a) = s
type MCState (Deque v s a) 
Instance details

Defined in Data.Mutable.Deque

type MCState (Deque v s a) = s

type IOBRef = BRef (PrimState IO) #

A boxed IO vector reference.

data BRef s a #

A boxed vector reference, supporting any monad.

Since 0.2.0

Instances

Instances details
Monoid w => MutableCollection (BRef s w) 
Instance details

Defined in Data.Mutable.BRef

Associated Types

type CollElement (BRef s w) #

Methods

newColl :: (PrimMonad m, PrimState m ~ MCState (BRef s w)) => m (BRef s w) #

MutableContainer (BRef s a) 
Instance details

Defined in Data.Mutable.BRef

Associated Types

type MCState (BRef s a) #

IsSequence seq => MutablePopBack (BRef s seq) 
Instance details

Defined in Data.Mutable.BRef

Methods

popBack :: (PrimMonad m, PrimState m ~ MCState (BRef s seq)) => BRef s seq -> m (Maybe (CollElement (BRef s seq))) #

IsSequence seq => MutablePopFront (BRef s seq) 
Instance details

Defined in Data.Mutable.BRef

Methods

popFront :: (PrimMonad m, PrimState m ~ MCState (BRef s seq)) => BRef s seq -> m (Maybe (CollElement (BRef s seq))) #

IsSequence seq => MutablePushBack (BRef s seq) 
Instance details

Defined in Data.Mutable.BRef

Methods

pushBack :: (PrimMonad m, PrimState m ~ MCState (BRef s seq)) => BRef s seq -> CollElement (BRef s seq) -> m () #

IsSequence seq => MutablePushFront (BRef s seq) 
Instance details

Defined in Data.Mutable.BRef

Methods

pushFront :: (PrimMonad m, PrimState m ~ MCState (BRef s seq)) => BRef s seq -> CollElement (BRef s seq) -> m () #

MutableRef (BRef s a) 
Instance details

Defined in Data.Mutable.BRef

Associated Types

type RefElement (BRef s a) #

Methods

newRef :: (PrimMonad m, PrimState m ~ MCState (BRef s a)) => RefElement (BRef s a) -> m (BRef s a) #

readRef :: (PrimMonad m, PrimState m ~ MCState (BRef s a)) => BRef s a -> m (RefElement (BRef s a)) #

writeRef :: (PrimMonad m, PrimState m ~ MCState (BRef s a)) => BRef s a -> RefElement (BRef s a) -> m () #

modifyRef :: (PrimMonad m, PrimState m ~ MCState (BRef s a)) => BRef s a -> (RefElement (BRef s a) -> RefElement (BRef s a)) -> m () #

modifyRef' :: (PrimMonad m, PrimState m ~ MCState (BRef s a)) => BRef s a -> (RefElement (BRef s a) -> RefElement (BRef s a)) -> m () #

type CollElement (BRef s w) 
Instance details

Defined in Data.Mutable.BRef

type CollElement (BRef s w) = Element w
type MCState (BRef s a) 
Instance details

Defined in Data.Mutable.BRef

type MCState (BRef s a) = s
type RefElement (BRef s a) 
Instance details

Defined in Data.Mutable.BRef

type RefElement (BRef s a) = a

data DLList s a #

A doubly-linked list.

Since 0.3.0

Instances

Instances details
MutableCollection (DLList s a) 
Instance details

Defined in Data.Mutable.DLList

Associated Types

type CollElement (DLList s a) #

Methods

newColl :: (PrimMonad m, PrimState m ~ MCState (DLList s a)) => m (DLList s a) #

MutableContainer (DLList s a) 
Instance details

Defined in Data.Mutable.DLList

Associated Types

type MCState (DLList s a) #

MutablePopBack (DLList s a) 
Instance details

Defined in Data.Mutable.DLList

Methods

popBack :: (PrimMonad m, PrimState m ~ MCState (DLList s a)) => DLList s a -> m (Maybe (CollElement (DLList s a))) #

MutablePopFront (DLList s a) 
Instance details

Defined in Data.Mutable.DLList

Methods

popFront :: (PrimMonad m, PrimState m ~ MCState (DLList s a)) => DLList s a -> m (Maybe (CollElement (DLList s a))) #

MutablePushBack (DLList s a) 
Instance details

Defined in Data.Mutable.DLList

Methods

pushBack :: (PrimMonad m, PrimState m ~ MCState (DLList s a)) => DLList s a -> CollElement (DLList s a) -> m () #

MutablePushFront (DLList s a) 
Instance details

Defined in Data.Mutable.DLList

Methods

pushFront :: (PrimMonad m, PrimState m ~ MCState (DLList s a)) => DLList s a -> CollElement (DLList s a) -> m () #

type CollElement (DLList s a) 
Instance details

Defined in Data.Mutable.DLList

type CollElement (DLList s a) = a
type MCState (DLList s a) 
Instance details

Defined in Data.Mutable.DLList

type MCState (DLList s a) = s

type BDeque = Deque MVector #

A Deque specialized to boxed vectors.

Since 0.2.0

type SDeque = Deque MVector #

A Deque specialized to storable vectors.

Since 0.2.0

type UDeque = Deque MVector #

A Deque specialized to unboxed vectors.

Since 0.2.0

type IOPRef = PRef (PrimState IO) #

A primitive ByteArray IO reference.

data PRef s a #

A primitive ByteArray reference, supporting any monad.

Since 0.2.0

Instances

Instances details
MutableContainer (PRef s a) 
Instance details

Defined in Data.Mutable.PRef

Associated Types

type MCState (PRef s a) #

Prim a => MutableRef (PRef s a) 
Instance details

Defined in Data.Mutable.PRef

Associated Types

type RefElement (PRef s a) #

Methods

newRef :: (PrimMonad m, PrimState m ~ MCState (PRef s a)) => RefElement (PRef s a) -> m (PRef s a) #

readRef :: (PrimMonad m, PrimState m ~ MCState (PRef s a)) => PRef s a -> m (RefElement (PRef s a)) #

writeRef :: (PrimMonad m, PrimState m ~ MCState (PRef s a)) => PRef s a -> RefElement (PRef s a) -> m () #

modifyRef :: (PrimMonad m, PrimState m ~ MCState (PRef s a)) => PRef s a -> (RefElement (PRef s a) -> RefElement (PRef s a)) -> m () #

modifyRef' :: (PrimMonad m, PrimState m ~ MCState (PRef s a)) => PRef s a -> (RefElement (PRef s a) -> RefElement (PRef s a)) -> m () #

type MCState (PRef s a) 
Instance details

Defined in Data.Mutable.PRef

type MCState (PRef s a) = s
type RefElement (PRef s a) 
Instance details

Defined in Data.Mutable.PRef

type RefElement (PRef s a) = a

type IOSRef = SRef (PrimState IO) #

A storable IO vector reference.

data SRef s a #

A storable vector reference, supporting any monad.

Since 0.2.0

Instances

Instances details
MutableContainer (SRef s a) 
Instance details

Defined in Data.Mutable.SRef

Associated Types

type MCState (SRef s a) #

Storable a => MutableRef (SRef s a) 
Instance details

Defined in Data.Mutable.SRef

Associated Types

type RefElement (SRef s a) #

Methods

newRef :: (PrimMonad m, PrimState m ~ MCState (SRef s a)) => RefElement (SRef s a) -> m (SRef s a) #

readRef :: (PrimMonad m, PrimState m ~ MCState (SRef s a)) => SRef s a -> m (RefElement (SRef s a)) #

writeRef :: (PrimMonad m, PrimState m ~ MCState (SRef s a)) => SRef s a -> RefElement (SRef s a) -> m () #

modifyRef :: (PrimMonad m, PrimState m ~ MCState (SRef s a)) => SRef s a -> (RefElement (SRef s a) -> RefElement (SRef s a)) -> m () #

modifyRef' :: (PrimMonad m, PrimState m ~ MCState (SRef s a)) => SRef s a -> (RefElement (SRef s a) -> RefElement (SRef s a)) -> m () #

type MCState (SRef s a) 
Instance details

Defined in Data.Mutable.SRef

type MCState (SRef s a) = s
type RefElement (SRef s a) 
Instance details

Defined in Data.Mutable.SRef

type RefElement (SRef s a) = a

type IOURef = URef (PrimState IO) #

An unboxed IO vector reference.

data URef s a #

An unboxed vector reference, supporting any monad.

Since 0.2.0

Instances

Instances details
MutableContainer (URef s a) 
Instance details

Defined in Data.Mutable.URef

Associated Types

type MCState (URef s a) #

Unbox a => MutableRef (URef s a) 
Instance details

Defined in Data.Mutable.URef

Associated Types

type RefElement (URef s a) #

Methods

newRef :: (PrimMonad m, PrimState m ~ MCState (URef s a)) => RefElement (URef s a) -> m (URef s a) #

readRef :: (PrimMonad m, PrimState m ~ MCState (URef s a)) => URef s a -> m (RefElement (URef s a)) #

writeRef :: (PrimMonad m, PrimState m ~ MCState (URef s a)) => URef s a -> RefElement (URef s a) -> m () #

modifyRef :: (PrimMonad m, PrimState m ~ MCState (URef s a)) => URef s a -> (RefElement (URef s a) -> RefElement (URef s a)) -> m () #

modifyRef' :: (PrimMonad m, PrimState m ~ MCState (URef s a)) => URef s a -> (RefElement (URef s a) -> RefElement (URef s a)) -> m () #

type MCState (URef s a) 
Instance details

Defined in Data.Mutable.URef

type MCState (URef s a) = s
type RefElement (URef s a) 
Instance details

Defined in Data.Mutable.URef

type RefElement (URef s a) = a

data TBChan a #

TBChan is an abstract type representing a bounded FIFO channel.

data TBMChan a #

TBMChan is an abstract type representing a bounded closeable FIFO channel.

data TBMQueue a #

TBMQueue is an abstract type representing a bounded closeable FIFO queue.

data TMChan a #

TMChan is an abstract type representing a closeable FIFO channel.

data TMQueue a #

TMQueue is an abstract type representing a closeable FIFO queue.

data WrappedMono mono a where #

Provides a Foldable for an arbitrary MonoFoldable.

Since: mono-traversable-1.0.14.0

Constructors

WrappedMono :: forall mono a. Element mono ~ a => mono -> WrappedMono mono a 

Instances

Instances details
MonoFoldable mono => Foldable (WrappedMono mono) 
Instance details

Defined in Data.MonoTraversable

Methods

fold :: Monoid m => WrappedMono mono m -> m #

foldMap :: Monoid m => (a -> m) -> WrappedMono mono a -> m #

foldMap' :: Monoid m => (a -> m) -> WrappedMono mono a -> m #

foldr :: (a -> b -> b) -> b -> WrappedMono mono a -> b #

foldr' :: (a -> b -> b) -> b -> WrappedMono mono a -> b #

foldl :: (b -> a -> b) -> b -> WrappedMono mono a -> b #

foldl' :: (b -> a -> b) -> b -> WrappedMono mono a -> b #

foldr1 :: (a -> a -> a) -> WrappedMono mono a -> a #

foldl1 :: (a -> a -> a) -> WrappedMono mono a -> a #

toList :: WrappedMono mono a -> [a] #

null :: WrappedMono mono a -> Bool #

length :: WrappedMono mono a -> Int #

elem :: Eq a => a -> WrappedMono mono a -> Bool #

maximum :: Ord a => WrappedMono mono a -> a #

minimum :: Ord a => WrappedMono mono a -> a #

sum :: Num a => WrappedMono mono a -> a #

product :: Num a => WrappedMono mono a -> a #

MonoFoldable mono => MonoFoldable (WrappedMono mono a) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (WrappedMono mono a) -> m) -> WrappedMono mono a -> m #

ofoldr :: (Element (WrappedMono mono a) -> b -> b) -> b -> WrappedMono mono a -> b #

ofoldl' :: (a0 -> Element (WrappedMono mono a) -> a0) -> a0 -> WrappedMono mono a -> a0 #

otoList :: WrappedMono mono a -> [Element (WrappedMono mono a)] #

oall :: (Element (WrappedMono mono a) -> Bool) -> WrappedMono mono a -> Bool #

oany :: (Element (WrappedMono mono a) -> Bool) -> WrappedMono mono a -> Bool #

onull :: WrappedMono mono a -> Bool #

olength :: WrappedMono mono a -> Int #

olength64 :: WrappedMono mono a -> Int64 #

ocompareLength :: Integral i => WrappedMono mono a -> i -> Ordering #

otraverse_ :: Applicative f => (Element (WrappedMono mono a) -> f b) -> WrappedMono mono a -> f () #

ofor_ :: Applicative f => WrappedMono mono a -> (Element (WrappedMono mono a) -> f b) -> f () #

omapM_ :: Applicative m => (Element (WrappedMono mono a) -> m ()) -> WrappedMono mono a -> m () #

oforM_ :: Applicative m => WrappedMono mono a -> (Element (WrappedMono mono a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (WrappedMono mono a) -> m a0) -> a0 -> WrappedMono mono a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (WrappedMono mono a) -> m) -> WrappedMono mono a -> m #

ofoldr1Ex :: (Element (WrappedMono mono a) -> Element (WrappedMono mono a) -> Element (WrappedMono mono a)) -> WrappedMono mono a -> Element (WrappedMono mono a) #

ofoldl1Ex' :: (Element (WrappedMono mono a) -> Element (WrappedMono mono a) -> Element (WrappedMono mono a)) -> WrappedMono mono a -> Element (WrappedMono mono a) #

headEx :: WrappedMono mono a -> Element (WrappedMono mono a) #

lastEx :: WrappedMono mono a -> Element (WrappedMono mono a) #

unsafeHead :: WrappedMono mono a -> Element (WrappedMono mono a) #

unsafeLast :: WrappedMono mono a -> Element (WrappedMono mono a) #

maximumByEx :: (Element (WrappedMono mono a) -> Element (WrappedMono mono a) -> Ordering) -> WrappedMono mono a -> Element (WrappedMono mono a) #

minimumByEx :: (Element (WrappedMono mono a) -> Element (WrappedMono mono a) -> Ordering) -> WrappedMono mono a -> Element (WrappedMono mono a) #

oelem :: Element (WrappedMono mono a) -> WrappedMono mono a -> Bool #

onotElem :: Element (WrappedMono mono a) -> WrappedMono mono a -> Bool #

MonoFunctor mono => MonoFunctor (WrappedMono mono a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (WrappedMono mono a) -> Element (WrappedMono mono a)) -> WrappedMono mono a -> WrappedMono mono a #

(MonoPointed mono, Element mono ~ a) => MonoPointed (WrappedMono mono a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (WrappedMono mono a) -> WrappedMono mono a #

type Element (WrappedMono mono a) 
Instance details

Defined in Data.MonoTraversable

type Element (WrappedMono mono a) = Element mono

newtype WrappedPoly (f :: Type -> Type) a #

Provides a MonoFoldable, MonoFunctor or MonoPointed for an arbitrary Foldable, Functor or Applicative.

Useful for, e.g., passing a Foldable type you don't own into a function that expects a MonoFoldable.

// package A
data MyList a = MyList [a] deriving Foldable

// package B
process :: MonoFoldable mono => mono -> IO ()

// package C
process (WrappedPoly (MyList []))

Since: mono-traversable-1.0.13.0

Constructors

WrappedPoly 

Fields

Instances

Instances details
Foldable f => Foldable (WrappedPoly f) 
Instance details

Defined in Data.MonoTraversable

Methods

fold :: Monoid m => WrappedPoly f m -> m #

foldMap :: Monoid m => (a -> m) -> WrappedPoly f a -> m #

foldMap' :: Monoid m => (a -> m) -> WrappedPoly f a -> m #

foldr :: (a -> b -> b) -> b -> WrappedPoly f a -> b #

foldr' :: (a -> b -> b) -> b -> WrappedPoly f a -> b #

foldl :: (b -> a -> b) -> b -> WrappedPoly f a -> b #

foldl' :: (b -> a -> b) -> b -> WrappedPoly f a -> b #

foldr1 :: (a -> a -> a) -> WrappedPoly f a -> a #

foldl1 :: (a -> a -> a) -> WrappedPoly f a -> a #

toList :: WrappedPoly f a -> [a] #

null :: WrappedPoly f a -> Bool #

length :: WrappedPoly f a -> Int #

elem :: Eq a => a -> WrappedPoly f a -> Bool #

maximum :: Ord a => WrappedPoly f a -> a #

minimum :: Ord a => WrappedPoly f a -> a #

sum :: Num a => WrappedPoly f a -> a #

product :: Num a => WrappedPoly f a -> a #

Applicative f => Applicative (WrappedPoly f) 
Instance details

Defined in Data.MonoTraversable

Methods

pure :: a -> WrappedPoly f a #

(<*>) :: WrappedPoly f (a -> b) -> WrappedPoly f a -> WrappedPoly f b #

liftA2 :: (a -> b -> c) -> WrappedPoly f a -> WrappedPoly f b -> WrappedPoly f c #

(*>) :: WrappedPoly f a -> WrappedPoly f b -> WrappedPoly f b #

(<*) :: WrappedPoly f a -> WrappedPoly f b -> WrappedPoly f a #

Functor f => Functor (WrappedPoly f) 
Instance details

Defined in Data.MonoTraversable

Methods

fmap :: (a -> b) -> WrappedPoly f a -> WrappedPoly f b #

(<$) :: a -> WrappedPoly f b -> WrappedPoly f a #

Monad f => Monad (WrappedPoly f) 
Instance details

Defined in Data.MonoTraversable

Methods

(>>=) :: WrappedPoly f a -> (a -> WrappedPoly f b) -> WrappedPoly f b #

(>>) :: WrappedPoly f a -> WrappedPoly f b -> WrappedPoly f b #

return :: a -> WrappedPoly f a #

Foldable f => MonoFoldable (WrappedPoly f a) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (WrappedPoly f a) -> m) -> WrappedPoly f a -> m #

ofoldr :: (Element (WrappedPoly f a) -> b -> b) -> b -> WrappedPoly f a -> b #

ofoldl' :: (a0 -> Element (WrappedPoly f a) -> a0) -> a0 -> WrappedPoly f a -> a0 #

otoList :: WrappedPoly f a -> [Element (WrappedPoly f a)] #

oall :: (Element (WrappedPoly f a) -> Bool) -> WrappedPoly f a -> Bool #

oany :: (Element (WrappedPoly f a) -> Bool) -> WrappedPoly f a -> Bool #

onull :: WrappedPoly f a -> Bool #

olength :: WrappedPoly f a -> Int #

olength64 :: WrappedPoly f a -> Int64 #

ocompareLength :: Integral i => WrappedPoly f a -> i -> Ordering #

otraverse_ :: Applicative f0 => (Element (WrappedPoly f a) -> f0 b) -> WrappedPoly f a -> f0 () #

ofor_ :: Applicative f0 => WrappedPoly f a -> (Element (WrappedPoly f a) -> f0 b) -> f0 () #

omapM_ :: Applicative m => (Element (WrappedPoly f a) -> m ()) -> WrappedPoly f a -> m () #

oforM_ :: Applicative m => WrappedPoly f a -> (Element (WrappedPoly f a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (WrappedPoly f a) -> m a0) -> a0 -> WrappedPoly f a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (WrappedPoly f a) -> m) -> WrappedPoly f a -> m #

ofoldr1Ex :: (Element (WrappedPoly f a) -> Element (WrappedPoly f a) -> Element (WrappedPoly f a)) -> WrappedPoly f a -> Element (WrappedPoly f a) #

ofoldl1Ex' :: (Element (WrappedPoly f a) -> Element (WrappedPoly f a) -> Element (WrappedPoly f a)) -> WrappedPoly f a -> Element (WrappedPoly f a) #

headEx :: WrappedPoly f a -> Element (WrappedPoly f a) #

lastEx :: WrappedPoly f a -> Element (WrappedPoly f a) #

unsafeHead :: WrappedPoly f a -> Element (WrappedPoly f a) #

unsafeLast :: WrappedPoly f a -> Element (WrappedPoly f a) #

maximumByEx :: (Element (WrappedPoly f a) -> Element (WrappedPoly f a) -> Ordering) -> WrappedPoly f a -> Element (WrappedPoly f a) #

minimumByEx :: (Element (WrappedPoly f a) -> Element (WrappedPoly f a) -> Ordering) -> WrappedPoly f a -> Element (WrappedPoly f a) #

oelem :: Element (WrappedPoly f a) -> WrappedPoly f a -> Bool #

onotElem :: Element (WrappedPoly f a) -> WrappedPoly f a -> Bool #

Functor f => MonoFunctor (WrappedPoly f a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (WrappedPoly f a) -> Element (WrappedPoly f a)) -> WrappedPoly f a -> WrappedPoly f a #

Applicative f => MonoPointed (WrappedPoly f a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (WrappedPoly f a) -> WrappedPoly f a #

type Element (WrappedPoly f a) 
Instance details

Defined in Data.MonoTraversable

type Element (WrappedPoly f a) = a

class MonoFoldable mono => GrowingAppend mono #

Containers which, when two values are combined, the combined length is no less than the larger of the two inputs. In code:

olength (x <> y) >= max (olength x) (olength y)

This class has no methods, and is simply used to assert that this law holds, in order to provide guarantees of correctness (see, for instance, Data.NonNull).

This should have a Semigroup superclass constraint, however, due to Semigroup only recently moving to base, some packages do not provide instances.

Instances

Instances details
GrowingAppend ByteString 
Instance details

Defined in Data.MonoTraversable

GrowingAppend ByteString 
Instance details

Defined in Data.MonoTraversable

GrowingAppend IntSet 
Instance details

Defined in Data.MonoTraversable

GrowingAppend Text 
Instance details

Defined in Data.MonoTraversable

GrowingAppend Text 
Instance details

Defined in Data.MonoTraversable

GrowingAppend (NonEmpty a) 
Instance details

Defined in Data.MonoTraversable

GrowingAppend (IntMap v) 
Instance details

Defined in Data.MonoTraversable

GrowingAppend (Seq a) 
Instance details

Defined in Data.MonoTraversable

Ord v => GrowingAppend (Set v) 
Instance details

Defined in Data.MonoTraversable

GrowingAppend mono => GrowingAppend (NonNull mono) 
Instance details

Defined in Data.NonNull

(Eq v, Hashable v) => GrowingAppend (HashSet v) 
Instance details

Defined in Data.MonoTraversable

GrowingAppend (Vector a) 
Instance details

Defined in Data.MonoTraversable

Storable a => GrowingAppend (Vector a) 
Instance details

Defined in Data.MonoTraversable

Unbox a => GrowingAppend (Vector a) 
Instance details

Defined in Data.MonoTraversable

GrowingAppend [a] 
Instance details

Defined in Data.MonoTraversable

Ord k => GrowingAppend (Map k v) 
Instance details

Defined in Data.MonoTraversable

(Eq k, Hashable k) => GrowingAppend (HashMap k v) 
Instance details

Defined in Data.MonoTraversable

class MonoFunctor mono => MonoComonad mono where #

Typeclass for monomorphic containers where it is always okay to "extract" a value from with oextract, and where you can extrapolate any "extracting" function to be a function on the whole part with oextend.

oextend and oextract should work together following the laws:

oextend oextract      = id
oextract . oextend f  = f
oextend f . oextend g = oextend (f . oextend g)

As an intuition, oextend f uses f to "build up" a new mono with pieces from the old one received by f.

Methods

oextract :: mono -> Element mono #

Extract an element from mono. Can be thought of as a dual concept to opoint.

oextend :: (mono -> Element mono) -> mono -> mono #

Extend a mono -> Element mono function to be a mono -> mono; that is, builds a new mono from the old one by using pieces glimpsed from the given function.

Instances

Instances details
MonoComonad (ViewL a) 
Instance details

Defined in Data.MonoTraversable

Methods

oextract :: ViewL a -> Element (ViewL a) #

oextend :: (ViewL a -> Element (ViewL a)) -> ViewL a -> ViewL a #

MonoComonad (ViewR a) 
Instance details

Defined in Data.MonoTraversable

Methods

oextract :: ViewR a -> Element (ViewR a) #

oextend :: (ViewR a -> Element (ViewR a)) -> ViewR a -> ViewR a #

IsSequence mono => MonoComonad (NonNull mono) 
Instance details

Defined in Data.NonNull

Methods

oextract :: NonNull mono -> Element (NonNull mono) #

oextend :: (NonNull mono -> Element (NonNull mono)) -> NonNull mono -> NonNull mono #

class MonoPointed mono where #

Typeclass for monomorphic containers that an element can be lifted into.

For any MonoFunctor, the following law holds:

omap f . opoint = opoint . f

Minimal complete definition

Nothing

Methods

opoint :: Element mono -> mono #

Lift an element into a monomorphic container.

opoint is the same as pure for an Applicative

Instances

Instances details
MonoPointed ByteString 
Instance details

Defined in Data.MonoTraversable

MonoPointed ByteString 
Instance details

Defined in Data.MonoTraversable

MonoPointed IntSet 
Instance details

Defined in Data.MonoTraversable

MonoPointed Text 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element Text -> Text #

MonoPointed Text 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element Text -> Text #

MonoPointed (ZipList a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (ZipList a) -> ZipList a #

MonoPointed (Identity a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (Identity a) -> Identity a #

MonoPointed (NonEmpty a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (NonEmpty a) -> NonEmpty a #

MonoPointed (Par1 a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (Par1 a) -> Par1 a #

MonoPointed (Seq a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (Seq a) -> Seq a #

MonoPointed (ViewL a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (ViewL a) -> ViewL a #

MonoPointed (ViewR a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (ViewR a) -> ViewR a #

MonoPointed (Set a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (Set a) -> Set a #

MonoPointed (Tree a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (Tree a) -> Tree a #

MonoPointed (IO a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (IO a) -> IO a #

MonoPointed mono => MonoPointed (NonNull mono) 
Instance details

Defined in Data.NonNull

Methods

opoint :: Element (NonNull mono) -> NonNull mono #

Hashable a => MonoPointed (HashSet a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (HashSet a) -> HashSet a #

MonoPointed (Vector a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (Vector a) -> Vector a #

Storable a => MonoPointed (Vector a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (Vector a) -> Vector a #

Unbox a => MonoPointed (Vector a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (Vector a) -> Vector a #

MonoPointed (Maybe a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (Maybe a) -> Maybe a #

MonoPointed [a] 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element [a] -> [a] #

Monad m => MonoPointed (WrappedMonad m a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (WrappedMonad m a) -> WrappedMonad m a #

MonoPointed (Either a b) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (Either a b) -> Either a b #

MonoPointed (Proxy a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (Proxy a) -> Proxy a #

MonoPointed (U1 a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (U1 a) -> U1 a #

(MonoPointed mono, Element mono ~ a) => MonoPointed (WrappedMono mono a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (WrappedMono mono a) -> WrappedMono mono a #

Applicative f => MonoPointed (WrappedPoly f a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (WrappedPoly f a) -> WrappedPoly f a #

Applicative f => MonoPointed (MaybeT f a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (MaybeT f a) -> MaybeT f a #

Monoid a => MonoPointed (a, b) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (a, b) -> (a, b) #

MonoPointed (r -> a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (r -> a) -> r -> a #

Arrow a => MonoPointed (WrappedArrow a b c) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (WrappedArrow a b c) -> WrappedArrow a b c #

Monoid m => MonoPointed (Const m a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (Const m a) -> Const m a #

Applicative f => MonoPointed (Rec1 f a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (Rec1 f a) -> Rec1 f a #

Applicative m => MonoPointed (IdentityT m a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (IdentityT m a) -> IdentityT m a #

Applicative m => MonoPointed (ReaderT r m a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (ReaderT r m a) -> ReaderT r m a #

Applicative m => MonoPointed (StateT s m a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (StateT s m a) -> StateT s m a #

Applicative m => MonoPointed (StateT s m a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (StateT s m a) -> StateT s m a #

(Monoid w, Applicative m) => MonoPointed (WriterT w m a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (WriterT w m a) -> WriterT w m a #

(Monoid w, Applicative m) => MonoPointed (WriterT w m a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (WriterT w m a) -> WriterT w m a #

(Applicative f, Applicative g) => MonoPointed (Product f g a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (Product f g a) -> Product f g a #

(Applicative f, Applicative g) => MonoPointed ((f :*: g) a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element ((f :*: g) a) -> (f :*: g) a #

(Applicative f, Applicative g) => MonoPointed ((f :+: g) a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element ((f :+: g) a) -> (f :+: g) a #

MonoPointed (ContT r m a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (ContT r m a) -> ContT r m a #

(Applicative f, Applicative g) => MonoPointed (Compose f g a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (Compose f g a) -> Compose f g a #

(Applicative f, Applicative g) => MonoPointed ((f :.: g) a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element ((f :.: g) a) -> (f :.: g) a #

Applicative f => MonoPointed (M1 i c f a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (M1 i c f a) -> M1 i c f a #

(Monoid w, Applicative m) => MonoPointed (RWST r w s m a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (RWST r w s m a) -> RWST r w s m a #

(Monoid w, Applicative m) => MonoPointed (RWST r w s m a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (RWST r w s m a) -> RWST r w s m a #

class (MonoFunctor mono, MonoFoldable mono) => MonoTraversable mono where #

Monomorphic containers that can be traversed from left to right.

NOTE: Due to limitations with the role system, GHC is yet unable to provide newtype-derivation of MonoTraversable. See https://stackoverflow.com/questions/49776924/newtype-deriving-issequence.

Minimal complete definition

Nothing

Methods

otraverse :: Applicative f => (Element mono -> f (Element mono)) -> mono -> f mono #

Map each element of a monomorphic container to an action, evaluate these actions from left to right, and collect the results.

omapM :: Applicative m => (Element mono -> m (Element mono)) -> mono -> m mono #

Map each element of a monomorphic container to a monadic action, evaluate these actions from left to right, and collect the results.

Instances

Instances details
MonoTraversable ByteString 
Instance details

Defined in Data.MonoTraversable

MonoTraversable ByteString 
Instance details

Defined in Data.MonoTraversable

MonoTraversable Text 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element Text -> f (Element Text)) -> Text -> f Text #

omapM :: Applicative m => (Element Text -> m (Element Text)) -> Text -> m Text #

MonoTraversable Text 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element Text -> f (Element Text)) -> Text -> f Text #

omapM :: Applicative m => (Element Text -> m (Element Text)) -> Text -> m Text #

MonoTraversable (Identity a) 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element (Identity a) -> f (Element (Identity a))) -> Identity a -> f (Identity a) #

omapM :: Applicative m => (Element (Identity a) -> m (Element (Identity a))) -> Identity a -> m (Identity a) #

MonoTraversable (NonEmpty a) 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element (NonEmpty a) -> f (Element (NonEmpty a))) -> NonEmpty a -> f (NonEmpty a) #

omapM :: Applicative m => (Element (NonEmpty a) -> m (Element (NonEmpty a))) -> NonEmpty a -> m (NonEmpty a) #

MonoTraversable (Par1 a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element (Par1 a) -> f (Element (Par1 a))) -> Par1 a -> f (Par1 a) #

omapM :: Applicative m => (Element (Par1 a) -> m (Element (Par1 a))) -> Par1 a -> m (Par1 a) #

MonoTraversable (IntMap a) 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element (IntMap a) -> f (Element (IntMap a))) -> IntMap a -> f (IntMap a) #

omapM :: Applicative m => (Element (IntMap a) -> m (Element (IntMap a))) -> IntMap a -> m (IntMap a) #

MonoTraversable (Seq a) 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element (Seq a) -> f (Element (Seq a))) -> Seq a -> f (Seq a) #

omapM :: Applicative m => (Element (Seq a) -> m (Element (Seq a))) -> Seq a -> m (Seq a) #

MonoTraversable (ViewL a) 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element (ViewL a) -> f (Element (ViewL a))) -> ViewL a -> f (ViewL a) #

omapM :: Applicative m => (Element (ViewL a) -> m (Element (ViewL a))) -> ViewL a -> m (ViewL a) #

MonoTraversable (ViewR a) 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element (ViewR a) -> f (Element (ViewR a))) -> ViewR a -> f (ViewR a) #

omapM :: Applicative m => (Element (ViewR a) -> m (Element (ViewR a))) -> ViewR a -> m (ViewR a) #

MonoTraversable (Tree a) 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element (Tree a) -> f (Element (Tree a))) -> Tree a -> f (Tree a) #

omapM :: Applicative m => (Element (Tree a) -> m (Element (Tree a))) -> Tree a -> m (Tree a) #

MonoTraversable mono => MonoTraversable (NonNull mono) 
Instance details

Defined in Data.NonNull

Methods

otraverse :: Applicative f => (Element (NonNull mono) -> f (Element (NonNull mono))) -> NonNull mono -> f (NonNull mono) #

omapM :: Applicative m => (Element (NonNull mono) -> m (Element (NonNull mono))) -> NonNull mono -> m (NonNull mono) #

MonoTraversable (Vector a) 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element (Vector a) -> f (Element (Vector a))) -> Vector a -> f (Vector a) #

omapM :: Applicative m => (Element (Vector a) -> m (Element (Vector a))) -> Vector a -> m (Vector a) #

Storable a => MonoTraversable (Vector a) 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element (Vector a) -> f (Element (Vector a))) -> Vector a -> f (Vector a) #

omapM :: Applicative m => (Element (Vector a) -> m (Element (Vector a))) -> Vector a -> m (Vector a) #

Unbox a => MonoTraversable (Vector a) 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element (Vector a) -> f (Element (Vector a))) -> Vector a -> f (Vector a) #

omapM :: Applicative m => (Element (Vector a) -> m (Element (Vector a))) -> Vector a -> m (Vector a) #

MonoTraversable (Maybe a) 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element (Maybe a) -> f (Element (Maybe a))) -> Maybe a -> f (Maybe a) #

omapM :: Applicative m => (Element (Maybe a) -> m (Element (Maybe a))) -> Maybe a -> m (Maybe a) #

MonoTraversable [a] 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element [a] -> f (Element [a])) -> [a] -> f [a] #

omapM :: Applicative m => (Element [a] -> m (Element [a])) -> [a] -> m [a] #

MonoTraversable (Either a b) 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element (Either a b) -> f (Element (Either a b))) -> Either a b -> f (Either a b) #

omapM :: Applicative m => (Element (Either a b) -> m (Element (Either a b))) -> Either a b -> m (Either a b) #

MonoTraversable (Proxy a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element (Proxy a) -> f (Element (Proxy a))) -> Proxy a -> f (Proxy a) #

omapM :: Applicative m => (Element (Proxy a) -> m (Element (Proxy a))) -> Proxy a -> m (Proxy a) #

MonoTraversable (U1 a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element (U1 a) -> f (Element (U1 a))) -> U1 a -> f (U1 a) #

omapM :: Applicative m => (Element (U1 a) -> m (Element (U1 a))) -> U1 a -> m (U1 a) #

MonoTraversable (V1 a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element (V1 a) -> f (Element (V1 a))) -> V1 a -> f (V1 a) #

omapM :: Applicative m => (Element (V1 a) -> m (Element (V1 a))) -> V1 a -> m (V1 a) #

MonoTraversable (Map k v) 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element (Map k v) -> f (Element (Map k v))) -> Map k v -> f (Map k v) #

omapM :: Applicative m => (Element (Map k v) -> m (Element (Map k v))) -> Map k v -> m (Map k v) #

Traversable f => MonoTraversable (MaybeT f a) 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f0 => (Element (MaybeT f a) -> f0 (Element (MaybeT f a))) -> MaybeT f a -> f0 (MaybeT f a) #

omapM :: Applicative m => (Element (MaybeT f a) -> m (Element (MaybeT f a))) -> MaybeT f a -> m (MaybeT f a) #

MonoTraversable (HashMap k v) 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element (HashMap k v) -> f (Element (HashMap k v))) -> HashMap k v -> f (HashMap k v) #

omapM :: Applicative m => (Element (HashMap k v) -> m (Element (HashMap k v))) -> HashMap k v -> m (HashMap k v) #

MonoTraversable (a, b) 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element (a, b) -> f (Element (a, b))) -> (a, b) -> f (a, b) #

omapM :: Applicative m => (Element (a, b) -> m (Element (a, b))) -> (a, b) -> m (a, b) #

MonoTraversable (Const m a) 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element (Const m a) -> f (Element (Const m a))) -> Const m a -> f (Const m a) #

omapM :: Applicative m0 => (Element (Const m a) -> m0 (Element (Const m a))) -> Const m a -> m0 (Const m a) #

Traversable f => MonoTraversable (Rec1 f a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f0 => (Element (Rec1 f a) -> f0 (Element (Rec1 f a))) -> Rec1 f a -> f0 (Rec1 f a) #

omapM :: Applicative m => (Element (Rec1 f a) -> m (Element (Rec1 f a))) -> Rec1 f a -> m (Rec1 f a) #

Traversable f => MonoTraversable (IdentityT f a) 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f0 => (Element (IdentityT f a) -> f0 (Element (IdentityT f a))) -> IdentityT f a -> f0 (IdentityT f a) #

omapM :: Applicative m => (Element (IdentityT f a) -> m (Element (IdentityT f a))) -> IdentityT f a -> m (IdentityT f a) #

Traversable f => MonoTraversable (WriterT w f a) 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f0 => (Element (WriterT w f a) -> f0 (Element (WriterT w f a))) -> WriterT w f a -> f0 (WriterT w f a) #

omapM :: Applicative m => (Element (WriterT w f a) -> m (Element (WriterT w f a))) -> WriterT w f a -> m (WriterT w f a) #

Traversable f => MonoTraversable (WriterT w f a) 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f0 => (Element (WriterT w f a) -> f0 (Element (WriterT w f a))) -> WriterT w f a -> f0 (WriterT w f a) #

omapM :: Applicative m => (Element (WriterT w f a) -> m (Element (WriterT w f a))) -> WriterT w f a -> m (WriterT w f a) #

(Traversable f, Traversable g) => MonoTraversable (Product f g a) 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f0 => (Element (Product f g a) -> f0 (Element (Product f g a))) -> Product f g a -> f0 (Product f g a) #

omapM :: Applicative m => (Element (Product f g a) -> m (Element (Product f g a))) -> Product f g a -> m (Product f g a) #

(Traversable f, Traversable g) => MonoTraversable ((f :*: g) a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f0 => (Element ((f :*: g) a) -> f0 (Element ((f :*: g) a))) -> (f :*: g) a -> f0 ((f :*: g) a) #

omapM :: Applicative m => (Element ((f :*: g) a) -> m (Element ((f :*: g) a))) -> (f :*: g) a -> m ((f :*: g) a) #

(Traversable f, Traversable g) => MonoTraversable ((f :+: g) a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f0 => (Element ((f :+: g) a) -> f0 (Element ((f :+: g) a))) -> (f :+: g) a -> f0 ((f :+: g) a) #

omapM :: Applicative m => (Element ((f :+: g) a) -> m (Element ((f :+: g) a))) -> (f :+: g) a -> m ((f :+: g) a) #

MonoTraversable (K1 i c a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element (K1 i c a) -> f (Element (K1 i c a))) -> K1 i c a -> f (K1 i c a) #

omapM :: Applicative m => (Element (K1 i c a) -> m (Element (K1 i c a))) -> K1 i c a -> m (K1 i c a) #

(Traversable f, Traversable g) => MonoTraversable (Compose f g a) 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f0 => (Element (Compose f g a) -> f0 (Element (Compose f g a))) -> Compose f g a -> f0 (Compose f g a) #

omapM :: Applicative m => (Element (Compose f g a) -> m (Element (Compose f g a))) -> Compose f g a -> m (Compose f g a) #

(Traversable f, Traversable g) => MonoTraversable ((f :.: g) a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f0 => (Element ((f :.: g) a) -> f0 (Element ((f :.: g) a))) -> (f :.: g) a -> f0 ((f :.: g) a) #

omapM :: Applicative m => (Element ((f :.: g) a) -> m (Element ((f :.: g) a))) -> (f :.: g) a -> m ((f :.: g) a) #

Traversable f => MonoTraversable (M1 i c f a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f0 => (Element (M1 i c f a) -> f0 (Element (M1 i c f a))) -> M1 i c f a -> f0 (M1 i c f a) #

omapM :: Applicative m => (Element (M1 i c f a) -> m (Element (M1 i c f a))) -> M1 i c f a -> m (M1 i c f a) #

class MonoFoldable mono where #

Monomorphic containers that can be folded.

Minimal complete definition

Nothing

Methods

ofoldMap :: Monoid m => (Element mono -> m) -> mono -> m #

Map each element of a monomorphic container to a Monoid and combine the results.

ofoldr :: (Element mono -> b -> b) -> b -> mono -> b #

Right-associative fold of a monomorphic container.

ofoldl' :: (a -> Element mono -> a) -> a -> mono -> a #

Strict left-associative fold of a monomorphic container.

otoList :: mono -> [Element mono] #

Convert a monomorphic container to a list.

oall :: (Element mono -> Bool) -> mono -> Bool #

Are all of the elements in a monomorphic container converted to booleans True?

oany :: (Element mono -> Bool) -> mono -> Bool #

Are any of the elements in a monomorphic container converted to booleans True?

onull :: mono -> Bool #

Is the monomorphic container empty?

olength :: mono -> Int #

Length of a monomorphic container, returns a Int.

olength64 :: mono -> Int64 #

Length of a monomorphic container, returns a Int64.

ocompareLength :: Integral i => mono -> i -> Ordering #

Compare the length of a monomorphic container and a given number.

otraverse_ :: Applicative f => (Element mono -> f b) -> mono -> f () #

Map each element of a monomorphic container to an action, evaluate these actions from left to right, and ignore the results.

ofor_ :: Applicative f => mono -> (Element mono -> f b) -> f () #

ofor_ is otraverse_ with its arguments flipped.

omapM_ :: Applicative m => (Element mono -> m ()) -> mono -> m () #

Map each element of a monomorphic container to a monadic action, evaluate these actions from left to right, and ignore the results.

oforM_ :: Applicative m => mono -> (Element mono -> m ()) -> m () #

oforM_ is omapM_ with its arguments flipped.

ofoldlM :: Monad m => (a -> Element mono -> m a) -> a -> mono -> m a #

Monadic fold over the elements of a monomorphic container, associating to the left.

ofoldMap1Ex :: Semigroup m => (Element mono -> m) -> mono -> m #

Map each element of a monomorphic container to a semigroup, and combine the results.

Note: this is a partial function. On an empty MonoFoldable, it will throw an exception.

See ofoldMap1 from Data.NonNull for a total version of this function.

ofoldr1Ex :: (Element mono -> Element mono -> Element mono) -> mono -> Element mono #

Right-associative fold of a monomorphic container with no base element.

Note: this is a partial function. On an empty MonoFoldable, it will throw an exception.

See ofoldr1 from Data.NonNull for a total version of this function.

ofoldl1Ex' :: (Element mono -> Element mono -> Element mono) -> mono -> Element mono #

Strict left-associative fold of a monomorphic container with no base element.

Note: this is a partial function. On an empty MonoFoldable, it will throw an exception.

See ofoldl1' from Data.NonNull for a total version of this function.

headEx :: mono -> Element mono #

Get the first element of a monomorphic container.

Note: this is a partial function. On an empty MonoFoldable, it will throw an exception.

See head from Data.NonNull for a total version of this function.

lastEx :: mono -> Element mono #

Get the last element of a monomorphic container.

Note: this is a partial function. On an empty MonoFoldable, it will throw an exception.

See last from Data.NonNull for a total version of this function.

unsafeHead :: mono -> Element mono #

Equivalent to headEx.

unsafeLast :: mono -> Element mono #

Equivalent to lastEx.

maximumByEx :: (Element mono -> Element mono -> Ordering) -> mono -> Element mono #

Get the maximum element of a monomorphic container, using a supplied element ordering function.

Note: this is a partial function. On an empty MonoFoldable, it will throw an exception.

See maximiumBy from Data.NonNull for a total version of this function.

minimumByEx :: (Element mono -> Element mono -> Ordering) -> mono -> Element mono #

Get the minimum element of a monomorphic container, using a supplied element ordering function.

Note: this is a partial function. On an empty MonoFoldable, it will throw an exception.

See minimumBy from Data.NonNull for a total version of this function.

oelem :: Element mono -> mono -> Bool #

Checks if the monomorphic container includes the supplied element.

onotElem :: Element mono -> mono -> Bool #

Checks if the monomorphic container does not include the supplied element.

Instances

Instances details
MonoFoldable ByteString 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element ByteString -> m) -> ByteString -> m #

ofoldr :: (Element ByteString -> b -> b) -> b -> ByteString -> b #

ofoldl' :: (a -> Element ByteString -> a) -> a -> ByteString -> a #

otoList :: ByteString -> [Element ByteString] #

oall :: (Element ByteString -> Bool) -> ByteString -> Bool #

oany :: (Element ByteString -> Bool) -> ByteString -> Bool #

onull :: ByteString -> Bool #

olength :: ByteString -> Int #

olength64 :: ByteString -> Int64 #

ocompareLength :: Integral i => ByteString -> i -> Ordering #

otraverse_ :: Applicative f => (Element ByteString -> f b) -> ByteString -> f () #

ofor_ :: Applicative f => ByteString -> (Element ByteString -> f b) -> f () #

omapM_ :: Applicative m => (Element ByteString -> m ()) -> ByteString -> m () #

oforM_ :: Applicative m => ByteString -> (Element ByteString -> m ()) -> m () #

ofoldlM :: Monad m => (a -> Element ByteString -> m a) -> a -> ByteString -> m a #

ofoldMap1Ex :: Semigroup m => (Element ByteString -> m) -> ByteString -> m #

ofoldr1Ex :: (Element ByteString -> Element ByteString -> Element ByteString) -> ByteString -> Element ByteString #

ofoldl1Ex' :: (Element ByteString -> Element ByteString -> Element ByteString) -> ByteString -> Element ByteString #

headEx :: ByteString -> Element ByteString #

lastEx :: ByteString -> Element ByteString #

unsafeHead :: ByteString -> Element ByteString #

unsafeLast :: ByteString -> Element ByteString #

maximumByEx :: (Element ByteString -> Element ByteString -> Ordering) -> ByteString -> Element ByteString #

minimumByEx :: (Element ByteString -> Element ByteString -> Ordering) -> ByteString -> Element ByteString #

oelem :: Element ByteString -> ByteString -> Bool #

onotElem :: Element ByteString -> ByteString -> Bool #

MonoFoldable ByteString 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element ByteString -> m) -> ByteString -> m #

ofoldr :: (Element ByteString -> b -> b) -> b -> ByteString -> b #

ofoldl' :: (a -> Element ByteString -> a) -> a -> ByteString -> a #

otoList :: ByteString -> [Element ByteString] #

oall :: (Element ByteString -> Bool) -> ByteString -> Bool #

oany :: (Element ByteString -> Bool) -> ByteString -> Bool #

onull :: ByteString -> Bool #

olength :: ByteString -> Int #

olength64 :: ByteString -> Int64 #

ocompareLength :: Integral i => ByteString -> i -> Ordering #

otraverse_ :: Applicative f => (Element ByteString -> f b) -> ByteString -> f () #

ofor_ :: Applicative f => ByteString -> (Element ByteString -> f b) -> f () #

omapM_ :: Applicative m => (Element ByteString -> m ()) -> ByteString -> m () #

oforM_ :: Applicative m => ByteString -> (Element ByteString -> m ()) -> m () #

ofoldlM :: Monad m => (a -> Element ByteString -> m a) -> a -> ByteString -> m a #

ofoldMap1Ex :: Semigroup m => (Element ByteString -> m) -> ByteString -> m #

ofoldr1Ex :: (Element ByteString -> Element ByteString -> Element ByteString) -> ByteString -> Element ByteString #

ofoldl1Ex' :: (Element ByteString -> Element ByteString -> Element ByteString) -> ByteString -> Element ByteString #

headEx :: ByteString -> Element ByteString #

lastEx :: ByteString -> Element ByteString #

unsafeHead :: ByteString -> Element ByteString #

unsafeLast :: ByteString -> Element ByteString #

maximumByEx :: (Element ByteString -> Element ByteString -> Ordering) -> ByteString -> Element ByteString #

minimumByEx :: (Element ByteString -> Element ByteString -> Ordering) -> ByteString -> Element ByteString #

oelem :: Element ByteString -> ByteString -> Bool #

onotElem :: Element ByteString -> ByteString -> Bool #

MonoFoldable IntSet 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element IntSet -> m) -> IntSet -> m #

ofoldr :: (Element IntSet -> b -> b) -> b -> IntSet -> b #

ofoldl' :: (a -> Element IntSet -> a) -> a -> IntSet -> a #

otoList :: IntSet -> [Element IntSet] #

oall :: (Element IntSet -> Bool) -> IntSet -> Bool #

oany :: (Element IntSet -> Bool) -> IntSet -> Bool #

onull :: IntSet -> Bool #

olength :: IntSet -> Int #

olength64 :: IntSet -> Int64 #

ocompareLength :: Integral i => IntSet -> i -> Ordering #

otraverse_ :: Applicative f => (Element IntSet -> f b) -> IntSet -> f () #

ofor_ :: Applicative f => IntSet -> (Element IntSet -> f b) -> f () #

omapM_ :: Applicative m => (Element IntSet -> m ()) -> IntSet -> m () #

oforM_ :: Applicative m => IntSet -> (Element IntSet -> m ()) -> m () #

ofoldlM :: Monad m => (a -> Element IntSet -> m a) -> a -> IntSet -> m a #

ofoldMap1Ex :: Semigroup m => (Element IntSet -> m) -> IntSet -> m #

ofoldr1Ex :: (Element IntSet -> Element IntSet -> Element IntSet) -> IntSet -> Element IntSet #

ofoldl1Ex' :: (Element IntSet -> Element IntSet -> Element IntSet) -> IntSet -> Element IntSet #

headEx :: IntSet -> Element IntSet #

lastEx :: IntSet -> Element IntSet #

unsafeHead :: IntSet -> Element IntSet #

unsafeLast :: IntSet -> Element IntSet #

maximumByEx :: (Element IntSet -> Element IntSet -> Ordering) -> IntSet -> Element IntSet #

minimumByEx :: (Element IntSet -> Element IntSet -> Ordering) -> IntSet -> Element IntSet #

oelem :: Element IntSet -> IntSet -> Bool #

onotElem :: Element IntSet -> IntSet -> Bool #

MonoFoldable Text 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element Text -> m) -> Text -> m #

ofoldr :: (Element Text -> b -> b) -> b -> Text -> b #

ofoldl' :: (a -> Element Text -> a) -> a -> Text -> a #

otoList :: Text -> [Element Text] #

oall :: (Element Text -> Bool) -> Text -> Bool #

oany :: (Element Text -> Bool) -> Text -> Bool #

onull :: Text -> Bool #

olength :: Text -> Int #

olength64 :: Text -> Int64 #

ocompareLength :: Integral i => Text -> i -> Ordering #

otraverse_ :: Applicative f => (Element Text -> f b) -> Text -> f () #

ofor_ :: Applicative f => Text -> (Element Text -> f b) -> f () #

omapM_ :: Applicative m => (Element Text -> m ()) -> Text -> m () #

oforM_ :: Applicative m => Text -> (Element Text -> m ()) -> m () #

ofoldlM :: Monad m => (a -> Element Text -> m a) -> a -> Text -> m a #

ofoldMap1Ex :: Semigroup m => (Element Text -> m) -> Text -> m #

ofoldr1Ex :: (Element Text -> Element Text -> Element Text) -> Text -> Element Text #

ofoldl1Ex' :: (Element Text -> Element Text -> Element Text) -> Text -> Element Text #

headEx :: Text -> Element Text #

lastEx :: Text -> Element Text #

unsafeHead :: Text -> Element Text #

unsafeLast :: Text -> Element Text #

maximumByEx :: (Element Text -> Element Text -> Ordering) -> Text -> Element Text #

minimumByEx :: (Element Text -> Element Text -> Ordering) -> Text -> Element Text #

oelem :: Element Text -> Text -> Bool #

onotElem :: Element Text -> Text -> Bool #

MonoFoldable Text 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element Text -> m) -> Text -> m #

ofoldr :: (Element Text -> b -> b) -> b -> Text -> b #

ofoldl' :: (a -> Element Text -> a) -> a -> Text -> a #

otoList :: Text -> [Element Text] #

oall :: (Element Text -> Bool) -> Text -> Bool #

oany :: (Element Text -> Bool) -> Text -> Bool #

onull :: Text -> Bool #

olength :: Text -> Int #

olength64 :: Text -> Int64 #

ocompareLength :: Integral i => Text -> i -> Ordering #

otraverse_ :: Applicative f => (Element Text -> f b) -> Text -> f () #

ofor_ :: Applicative f => Text -> (Element Text -> f b) -> f () #

omapM_ :: Applicative m => (Element Text -> m ()) -> Text -> m () #

oforM_ :: Applicative m => Text -> (Element Text -> m ()) -> m () #

ofoldlM :: Monad m => (a -> Element Text -> m a) -> a -> Text -> m a #

ofoldMap1Ex :: Semigroup m => (Element Text -> m) -> Text -> m #

ofoldr1Ex :: (Element Text -> Element Text -> Element Text) -> Text -> Element Text #

ofoldl1Ex' :: (Element Text -> Element Text -> Element Text) -> Text -> Element Text #

headEx :: Text -> Element Text #

lastEx :: Text -> Element Text #

unsafeHead :: Text -> Element Text #

unsafeLast :: Text -> Element Text #

maximumByEx :: (Element Text -> Element Text -> Ordering) -> Text -> Element Text #

minimumByEx :: (Element Text -> Element Text -> Ordering) -> Text -> Element Text #

oelem :: Element Text -> Text -> Bool #

onotElem :: Element Text -> Text -> Bool #

MonoFoldable (Identity a) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (Identity a) -> m) -> Identity a -> m #

ofoldr :: (Element (Identity a) -> b -> b) -> b -> Identity a -> b #

ofoldl' :: (a0 -> Element (Identity a) -> a0) -> a0 -> Identity a -> a0 #

otoList :: Identity a -> [Element (Identity a)] #

oall :: (Element (Identity a) -> Bool) -> Identity a -> Bool #

oany :: (Element (Identity a) -> Bool) -> Identity a -> Bool #

onull :: Identity a -> Bool #

olength :: Identity a -> Int #

olength64 :: Identity a -> Int64 #

ocompareLength :: Integral i => Identity a -> i -> Ordering #

otraverse_ :: Applicative f => (Element (Identity a) -> f b) -> Identity a -> f () #

ofor_ :: Applicative f => Identity a -> (Element (Identity a) -> f b) -> f () #

omapM_ :: Applicative m => (Element (Identity a) -> m ()) -> Identity a -> m () #

oforM_ :: Applicative m => Identity a -> (Element (Identity a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (Identity a) -> m a0) -> a0 -> Identity a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (Identity a) -> m) -> Identity a -> m #

ofoldr1Ex :: (Element (Identity a) -> Element (Identity a) -> Element (Identity a)) -> Identity a -> Element (Identity a) #

ofoldl1Ex' :: (Element (Identity a) -> Element (Identity a) -> Element (Identity a)) -> Identity a -> Element (Identity a) #

headEx :: Identity a -> Element (Identity a) #

lastEx :: Identity a -> Element (Identity a) #

unsafeHead :: Identity a -> Element (Identity a) #

unsafeLast :: Identity a -> Element (Identity a) #

maximumByEx :: (Element (Identity a) -> Element (Identity a) -> Ordering) -> Identity a -> Element (Identity a) #

minimumByEx :: (Element (Identity a) -> Element (Identity a) -> Ordering) -> Identity a -> Element (Identity a) #

oelem :: Element (Identity a) -> Identity a -> Bool #

onotElem :: Element (Identity a) -> Identity a -> Bool #

MonoFoldable (NonEmpty a) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (NonEmpty a) -> m) -> NonEmpty a -> m #

ofoldr :: (Element (NonEmpty a) -> b -> b) -> b -> NonEmpty a -> b #

ofoldl' :: (a0 -> Element (NonEmpty a) -> a0) -> a0 -> NonEmpty a -> a0 #

otoList :: NonEmpty a -> [Element (NonEmpty a)] #

oall :: (Element (NonEmpty a) -> Bool) -> NonEmpty a -> Bool #

oany :: (Element (NonEmpty a) -> Bool) -> NonEmpty a -> Bool #

onull :: NonEmpty a -> Bool #

olength :: NonEmpty a -> Int #

olength64 :: NonEmpty a -> Int64 #

ocompareLength :: Integral i => NonEmpty a -> i -> Ordering #

otraverse_ :: Applicative f => (Element (NonEmpty a) -> f b) -> NonEmpty a -> f () #

ofor_ :: Applicative f => NonEmpty a -> (Element (NonEmpty a) -> f b) -> f () #

omapM_ :: Applicative m => (Element (NonEmpty a) -> m ()) -> NonEmpty a -> m () #

oforM_ :: Applicative m => NonEmpty a -> (Element (NonEmpty a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (NonEmpty a) -> m a0) -> a0 -> NonEmpty a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (NonEmpty a) -> m) -> NonEmpty a -> m #

ofoldr1Ex :: (Element (NonEmpty a) -> Element (NonEmpty a) -> Element (NonEmpty a)) -> NonEmpty a -> Element (NonEmpty a) #

ofoldl1Ex' :: (Element (NonEmpty a) -> Element (NonEmpty a) -> Element (NonEmpty a)) -> NonEmpty a -> Element (NonEmpty a) #

headEx :: NonEmpty a -> Element (NonEmpty a) #

lastEx :: NonEmpty a -> Element (NonEmpty a) #

unsafeHead :: NonEmpty a -> Element (NonEmpty a) #

unsafeLast :: NonEmpty a -> Element (NonEmpty a) #

maximumByEx :: (Element (NonEmpty a) -> Element (NonEmpty a) -> Ordering) -> NonEmpty a -> Element (NonEmpty a) #

minimumByEx :: (Element (NonEmpty a) -> Element (NonEmpty a) -> Ordering) -> NonEmpty a -> Element (NonEmpty a) #

oelem :: Element (NonEmpty a) -> NonEmpty a -> Bool #

onotElem :: Element (NonEmpty a) -> NonEmpty a -> Bool #

MonoFoldable (Par1 a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (Par1 a) -> m) -> Par1 a -> m #

ofoldr :: (Element (Par1 a) -> b -> b) -> b -> Par1 a -> b #

ofoldl' :: (a0 -> Element (Par1 a) -> a0) -> a0 -> Par1 a -> a0 #

otoList :: Par1 a -> [Element (Par1 a)] #

oall :: (Element (Par1 a) -> Bool) -> Par1 a -> Bool #

oany :: (Element (Par1 a) -> Bool) -> Par1 a -> Bool #

onull :: Par1 a -> Bool #

olength :: Par1 a -> Int #

olength64 :: Par1 a -> Int64 #

ocompareLength :: Integral i => Par1 a -> i -> Ordering #

otraverse_ :: Applicative f => (Element (Par1 a) -> f b) -> Par1 a -> f () #

ofor_ :: Applicative f => Par1 a -> (Element (Par1 a) -> f b) -> f () #

omapM_ :: Applicative m => (Element (Par1 a) -> m ()) -> Par1 a -> m () #

oforM_ :: Applicative m => Par1 a -> (Element (Par1 a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (Par1 a) -> m a0) -> a0 -> Par1 a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (Par1 a) -> m) -> Par1 a -> m #

ofoldr1Ex :: (Element (Par1 a) -> Element (Par1 a) -> Element (Par1 a)) -> Par1 a -> Element (Par1 a) #

ofoldl1Ex' :: (Element (Par1 a) -> Element (Par1 a) -> Element (Par1 a)) -> Par1 a -> Element (Par1 a) #

headEx :: Par1 a -> Element (Par1 a) #

lastEx :: Par1 a -> Element (Par1 a) #

unsafeHead :: Par1 a -> Element (Par1 a) #

unsafeLast :: Par1 a -> Element (Par1 a) #

maximumByEx :: (Element (Par1 a) -> Element (Par1 a) -> Ordering) -> Par1 a -> Element (Par1 a) #

minimumByEx :: (Element (Par1 a) -> Element (Par1 a) -> Ordering) -> Par1 a -> Element (Par1 a) #

oelem :: Element (Par1 a) -> Par1 a -> Bool #

onotElem :: Element (Par1 a) -> Par1 a -> Bool #

MonoFoldable (IntMap a) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (IntMap a) -> m) -> IntMap a -> m #

ofoldr :: (Element (IntMap a) -> b -> b) -> b -> IntMap a -> b #

ofoldl' :: (a0 -> Element (IntMap a) -> a0) -> a0 -> IntMap a -> a0 #

otoList :: IntMap a -> [Element (IntMap a)] #

oall :: (Element (IntMap a) -> Bool) -> IntMap a -> Bool #

oany :: (Element (IntMap a) -> Bool) -> IntMap a -> Bool #

onull :: IntMap a -> Bool #

olength :: IntMap a -> Int #

olength64 :: IntMap a -> Int64 #

ocompareLength :: Integral i => IntMap a -> i -> Ordering #

otraverse_ :: Applicative f => (Element (IntMap a) -> f b) -> IntMap a -> f () #

ofor_ :: Applicative f => IntMap a -> (Element (IntMap a) -> f b) -> f () #

omapM_ :: Applicative m => (Element (IntMap a) -> m ()) -> IntMap a -> m () #

oforM_ :: Applicative m => IntMap a -> (Element (IntMap a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (IntMap a) -> m a0) -> a0 -> IntMap a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (IntMap a) -> m) -> IntMap a -> m #

ofoldr1Ex :: (Element (IntMap a) -> Element (IntMap a) -> Element (IntMap a)) -> IntMap a -> Element (IntMap a) #

ofoldl1Ex' :: (Element (IntMap a) -> Element (IntMap a) -> Element (IntMap a)) -> IntMap a -> Element (IntMap a) #

headEx :: IntMap a -> Element (IntMap a) #

lastEx :: IntMap a -> Element (IntMap a) #

unsafeHead :: IntMap a -> Element (IntMap a) #

unsafeLast :: IntMap a -> Element (IntMap a) #

maximumByEx :: (Element (IntMap a) -> Element (IntMap a) -> Ordering) -> IntMap a -> Element (IntMap a) #

minimumByEx :: (Element (IntMap a) -> Element (IntMap a) -> Ordering) -> IntMap a -> Element (IntMap a) #

oelem :: Element (IntMap a) -> IntMap a -> Bool #

onotElem :: Element (IntMap a) -> IntMap a -> Bool #

MonoFoldable (Seq a) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (Seq a) -> m) -> Seq a -> m #

ofoldr :: (Element (Seq a) -> b -> b) -> b -> Seq a -> b #

ofoldl' :: (a0 -> Element (Seq a) -> a0) -> a0 -> Seq a -> a0 #

otoList :: Seq a -> [Element (Seq a)] #

oall :: (Element (Seq a) -> Bool) -> Seq a -> Bool #

oany :: (Element (Seq a) -> Bool) -> Seq a -> Bool #

onull :: Seq a -> Bool #

olength :: Seq a -> Int #

olength64 :: Seq a -> Int64 #

ocompareLength :: Integral i => Seq a -> i -> Ordering #

otraverse_ :: Applicative f => (Element (Seq a) -> f b) -> Seq a -> f () #

ofor_ :: Applicative f => Seq a -> (Element (Seq a) -> f b) -> f () #

omapM_ :: Applicative m => (Element (Seq a) -> m ()) -> Seq a -> m () #

oforM_ :: Applicative m => Seq a -> (Element (Seq a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (Seq a) -> m a0) -> a0 -> Seq a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (Seq a) -> m) -> Seq a -> m #

ofoldr1Ex :: (Element (Seq a) -> Element (Seq a) -> Element (Seq a)) -> Seq a -> Element (Seq a) #

ofoldl1Ex' :: (Element (Seq a) -> Element (Seq a) -> Element (Seq a)) -> Seq a -> Element (Seq a) #

headEx :: Seq a -> Element (Seq a) #

lastEx :: Seq a -> Element (Seq a) #

unsafeHead :: Seq a -> Element (Seq a) #

unsafeLast :: Seq a -> Element (Seq a) #

maximumByEx :: (Element (Seq a) -> Element (Seq a) -> Ordering) -> Seq a -> Element (Seq a) #

minimumByEx :: (Element (Seq a) -> Element (Seq a) -> Ordering) -> Seq a -> Element (Seq a) #

oelem :: Element (Seq a) -> Seq a -> Bool #

onotElem :: Element (Seq a) -> Seq a -> Bool #

MonoFoldable (ViewL a) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (ViewL a) -> m) -> ViewL a -> m #

ofoldr :: (Element (ViewL a) -> b -> b) -> b -> ViewL a -> b #

ofoldl' :: (a0 -> Element (ViewL a) -> a0) -> a0 -> ViewL a -> a0 #

otoList :: ViewL a -> [Element (ViewL a)] #

oall :: (Element (ViewL a) -> Bool) -> ViewL a -> Bool #

oany :: (Element (ViewL a) -> Bool) -> ViewL a -> Bool #

onull :: ViewL a -> Bool #

olength :: ViewL a -> Int #

olength64 :: ViewL a -> Int64 #

ocompareLength :: Integral i => ViewL a -> i -> Ordering #

otraverse_ :: Applicative f => (Element (ViewL a) -> f b) -> ViewL a -> f () #

ofor_ :: Applicative f => ViewL a -> (Element (ViewL a) -> f b) -> f () #

omapM_ :: Applicative m => (Element (ViewL a) -> m ()) -> ViewL a -> m () #

oforM_ :: Applicative m => ViewL a -> (Element (ViewL a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (ViewL a) -> m a0) -> a0 -> ViewL a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (ViewL a) -> m) -> ViewL a -> m #

ofoldr1Ex :: (Element (ViewL a) -> Element (ViewL a) -> Element (ViewL a)) -> ViewL a -> Element (ViewL a) #

ofoldl1Ex' :: (Element (ViewL a) -> Element (ViewL a) -> Element (ViewL a)) -> ViewL a -> Element (ViewL a) #

headEx :: ViewL a -> Element (ViewL a) #

lastEx :: ViewL a -> Element (ViewL a) #

unsafeHead :: ViewL a -> Element (ViewL a) #

unsafeLast :: ViewL a -> Element (ViewL a) #

maximumByEx :: (Element (ViewL a) -> Element (ViewL a) -> Ordering) -> ViewL a -> Element (ViewL a) #

minimumByEx :: (Element (ViewL a) -> Element (ViewL a) -> Ordering) -> ViewL a -> Element (ViewL a) #

oelem :: Element (ViewL a) -> ViewL a -> Bool #

onotElem :: Element (ViewL a) -> ViewL a -> Bool #

MonoFoldable (ViewR a) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (ViewR a) -> m) -> ViewR a -> m #

ofoldr :: (Element (ViewR a) -> b -> b) -> b -> ViewR a -> b #

ofoldl' :: (a0 -> Element (ViewR a) -> a0) -> a0 -> ViewR a -> a0 #

otoList :: ViewR a -> [Element (ViewR a)] #

oall :: (Element (ViewR a) -> Bool) -> ViewR a -> Bool #

oany :: (Element (ViewR a) -> Bool) -> ViewR a -> Bool #

onull :: ViewR a -> Bool #

olength :: ViewR a -> Int #

olength64 :: ViewR a -> Int64 #

ocompareLength :: Integral i => ViewR a -> i -> Ordering #

otraverse_ :: Applicative f => (Element (ViewR a) -> f b) -> ViewR a -> f () #

ofor_ :: Applicative f => ViewR a -> (Element (ViewR a) -> f b) -> f () #

omapM_ :: Applicative m => (Element (ViewR a) -> m ()) -> ViewR a -> m () #

oforM_ :: Applicative m => ViewR a -> (Element (ViewR a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (ViewR a) -> m a0) -> a0 -> ViewR a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (ViewR a) -> m) -> ViewR a -> m #

ofoldr1Ex :: (Element (ViewR a) -> Element (ViewR a) -> Element (ViewR a)) -> ViewR a -> Element (ViewR a) #

ofoldl1Ex' :: (Element (ViewR a) -> Element (ViewR a) -> Element (ViewR a)) -> ViewR a -> Element (ViewR a) #

headEx :: ViewR a -> Element (ViewR a) #

lastEx :: ViewR a -> Element (ViewR a) #

unsafeHead :: ViewR a -> Element (ViewR a) #

unsafeLast :: ViewR a -> Element (ViewR a) #

maximumByEx :: (Element (ViewR a) -> Element (ViewR a) -> Ordering) -> ViewR a -> Element (ViewR a) #

minimumByEx :: (Element (ViewR a) -> Element (ViewR a) -> Ordering) -> ViewR a -> Element (ViewR a) #

oelem :: Element (ViewR a) -> ViewR a -> Bool #

onotElem :: Element (ViewR a) -> ViewR a -> Bool #

Ord e => MonoFoldable (Set e) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (Set e) -> m) -> Set e -> m #

ofoldr :: (Element (Set e) -> b -> b) -> b -> Set e -> b #

ofoldl' :: (a -> Element (Set e) -> a) -> a -> Set e -> a #

otoList :: Set e -> [Element (Set e)] #

oall :: (Element (Set e) -> Bool) -> Set e -> Bool #

oany :: (Element (Set e) -> Bool) -> Set e -> Bool #

onull :: Set e -> Bool #

olength :: Set e -> Int #

olength64 :: Set e -> Int64 #

ocompareLength :: Integral i => Set e -> i -> Ordering #

otraverse_ :: Applicative f => (Element (Set e) -> f b) -> Set e -> f () #

ofor_ :: Applicative f => Set e -> (Element (Set e) -> f b) -> f () #

omapM_ :: Applicative m => (Element (Set e) -> m ()) -> Set e -> m () #

oforM_ :: Applicative m => Set e -> (Element (Set e) -> m ()) -> m () #

ofoldlM :: Monad m => (a -> Element (Set e) -> m a) -> a -> Set e -> m a #

ofoldMap1Ex :: Semigroup m => (Element (Set e) -> m) -> Set e -> m #

ofoldr1Ex :: (Element (Set e) -> Element (Set e) -> Element (Set e)) -> Set e -> Element (Set e) #

ofoldl1Ex' :: (Element (Set e) -> Element (Set e) -> Element (Set e)) -> Set e -> Element (Set e) #

headEx :: Set e -> Element (Set e) #

lastEx :: Set e -> Element (Set e) #

unsafeHead :: Set e -> Element (Set e) #

unsafeLast :: Set e -> Element (Set e) #

maximumByEx :: (Element (Set e) -> Element (Set e) -> Ordering) -> Set e -> Element (Set e) #

minimumByEx :: (Element (Set e) -> Element (Set e) -> Ordering) -> Set e -> Element (Set e) #

oelem :: Element (Set e) -> Set e -> Bool #

onotElem :: Element (Set e) -> Set e -> Bool #

MonoFoldable (Tree a) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (Tree a) -> m) -> Tree a -> m #

ofoldr :: (Element (Tree a) -> b -> b) -> b -> Tree a -> b #

ofoldl' :: (a0 -> Element (Tree a) -> a0) -> a0 -> Tree a -> a0 #

otoList :: Tree a -> [Element (Tree a)] #

oall :: (Element (Tree a) -> Bool) -> Tree a -> Bool #

oany :: (Element (Tree a) -> Bool) -> Tree a -> Bool #

onull :: Tree a -> Bool #

olength :: Tree a -> Int #

olength64 :: Tree a -> Int64 #

ocompareLength :: Integral i => Tree a -> i -> Ordering #

otraverse_ :: Applicative f => (Element (Tree a) -> f b) -> Tree a -> f () #

ofor_ :: Applicative f => Tree a -> (Element (Tree a) -> f b) -> f () #

omapM_ :: Applicative m => (Element (Tree a) -> m ()) -> Tree a -> m () #

oforM_ :: Applicative m => Tree a -> (Element (Tree a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (Tree a) -> m a0) -> a0 -> Tree a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (Tree a) -> m) -> Tree a -> m #

ofoldr1Ex :: (Element (Tree a) -> Element (Tree a) -> Element (Tree a)) -> Tree a -> Element (Tree a) #

ofoldl1Ex' :: (Element (Tree a) -> Element (Tree a) -> Element (Tree a)) -> Tree a -> Element (Tree a) #

headEx :: Tree a -> Element (Tree a) #

lastEx :: Tree a -> Element (Tree a) #

unsafeHead :: Tree a -> Element (Tree a) #

unsafeLast :: Tree a -> Element (Tree a) #

maximumByEx :: (Element (Tree a) -> Element (Tree a) -> Ordering) -> Tree a -> Element (Tree a) #

minimumByEx :: (Element (Tree a) -> Element (Tree a) -> Ordering) -> Tree a -> Element (Tree a) #

oelem :: Element (Tree a) -> Tree a -> Bool #

onotElem :: Element (Tree a) -> Tree a -> Bool #

MonoFoldable mono => MonoFoldable (NonNull mono) 
Instance details

Defined in Data.NonNull

Methods

ofoldMap :: Monoid m => (Element (NonNull mono) -> m) -> NonNull mono -> m #

ofoldr :: (Element (NonNull mono) -> b -> b) -> b -> NonNull mono -> b #

ofoldl' :: (a -> Element (NonNull mono) -> a) -> a -> NonNull mono -> a #

otoList :: NonNull mono -> [Element (NonNull mono)] #

oall :: (Element (NonNull mono) -> Bool) -> NonNull mono -> Bool #

oany :: (Element (NonNull mono) -> Bool) -> NonNull mono -> Bool #

onull :: NonNull mono -> Bool #

olength :: NonNull mono -> Int #

olength64 :: NonNull mono -> Int64 #

ocompareLength :: Integral i => NonNull mono -> i -> Ordering #

otraverse_ :: Applicative f => (Element (NonNull mono) -> f b) -> NonNull mono -> f () #

ofor_ :: Applicative f => NonNull mono -> (Element (NonNull mono) -> f b) -> f () #

omapM_ :: Applicative m => (Element (NonNull mono) -> m ()) -> NonNull mono -> m () #

oforM_ :: Applicative m => NonNull mono -> (Element (NonNull mono) -> m ()) -> m () #

ofoldlM :: Monad m => (a -> Element (NonNull mono) -> m a) -> a -> NonNull mono -> m a #

ofoldMap1Ex :: Semigroup m => (Element (NonNull mono) -> m) -> NonNull mono -> m #

ofoldr1Ex :: (Element (NonNull mono) -> Element (NonNull mono) -> Element (NonNull mono)) -> NonNull mono -> Element (NonNull mono) #

ofoldl1Ex' :: (Element (NonNull mono) -> Element (NonNull mono) -> Element (NonNull mono)) -> NonNull mono -> Element (NonNull mono) #

headEx :: NonNull mono -> Element (NonNull mono) #

lastEx :: NonNull mono -> Element (NonNull mono) #

unsafeHead :: NonNull mono -> Element (NonNull mono) #

unsafeLast :: NonNull mono -> Element (NonNull mono) #

maximumByEx :: (Element (NonNull mono) -> Element (NonNull mono) -> Ordering) -> NonNull mono -> Element (NonNull mono) #

minimumByEx :: (Element (NonNull mono) -> Element (NonNull mono) -> Ordering) -> NonNull mono -> Element (NonNull mono) #

oelem :: Element (NonNull mono) -> NonNull mono -> Bool #

onotElem :: Element (NonNull mono) -> NonNull mono -> Bool #

MonoFoldable (HashSet e) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (HashSet e) -> m) -> HashSet e -> m #

ofoldr :: (Element (HashSet e) -> b -> b) -> b -> HashSet e -> b #

ofoldl' :: (a -> Element (HashSet e) -> a) -> a -> HashSet e -> a #

otoList :: HashSet e -> [Element (HashSet e)] #

oall :: (Element (HashSet e) -> Bool) -> HashSet e -> Bool #

oany :: (Element (HashSet e) -> Bool) -> HashSet e -> Bool #

onull :: HashSet e -> Bool #

olength :: HashSet e -> Int #

olength64 :: HashSet e -> Int64 #

ocompareLength :: Integral i => HashSet e -> i -> Ordering #

otraverse_ :: Applicative f => (Element (HashSet e) -> f b) -> HashSet e -> f () #

ofor_ :: Applicative f => HashSet e -> (Element (HashSet e) -> f b) -> f () #

omapM_ :: Applicative m => (Element (HashSet e) -> m ()) -> HashSet e -> m () #

oforM_ :: Applicative m => HashSet e -> (Element (HashSet e) -> m ()) -> m () #

ofoldlM :: Monad m => (a -> Element (HashSet e) -> m a) -> a -> HashSet e -> m a #

ofoldMap1Ex :: Semigroup m => (Element (HashSet e) -> m) -> HashSet e -> m #

ofoldr1Ex :: (Element (HashSet e) -> Element (HashSet e) -> Element (HashSet e)) -> HashSet e -> Element (HashSet e) #

ofoldl1Ex' :: (Element (HashSet e) -> Element (HashSet e) -> Element (HashSet e)) -> HashSet e -> Element (HashSet e) #

headEx :: HashSet e -> Element (HashSet e) #

lastEx :: HashSet e -> Element (HashSet e) #

unsafeHead :: HashSet e -> Element (HashSet e) #

unsafeLast :: HashSet e -> Element (HashSet e) #

maximumByEx :: (Element (HashSet e) -> Element (HashSet e) -> Ordering) -> HashSet e -> Element (HashSet e) #

minimumByEx :: (Element (HashSet e) -> Element (HashSet e) -> Ordering) -> HashSet e -> Element (HashSet e) #

oelem :: Element (HashSet e) -> HashSet e -> Bool #

onotElem :: Element (HashSet e) -> HashSet e -> Bool #

MonoFoldable (Vector a) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (Vector a) -> m) -> Vector a -> m #

ofoldr :: (Element (Vector a) -> b -> b) -> b -> Vector a -> b #

ofoldl' :: (a0 -> Element (Vector a) -> a0) -> a0 -> Vector a -> a0 #

otoList :: Vector a -> [Element (Vector a)] #

oall :: (Element (Vector a) -> Bool) -> Vector a -> Bool #

oany :: (Element (Vector a) -> Bool) -> Vector a -> Bool #

onull :: Vector a -> Bool #

olength :: Vector a -> Int #

olength64 :: Vector a -> Int64 #

ocompareLength :: Integral i => Vector a -> i -> Ordering #

otraverse_ :: Applicative f => (Element (Vector a) -> f b) -> Vector a -> f () #

ofor_ :: Applicative f => Vector a -> (Element (Vector a) -> f b) -> f () #

omapM_ :: Applicative m => (Element (Vector a) -> m ()) -> Vector a -> m () #

oforM_ :: Applicative m => Vector a -> (Element (Vector a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (Vector a) -> m a0) -> a0 -> Vector a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (Vector a) -> m) -> Vector a -> m #

ofoldr1Ex :: (Element (Vector a) -> Element (Vector a) -> Element (Vector a)) -> Vector a -> Element (Vector a) #

ofoldl1Ex' :: (Element (Vector a) -> Element (Vector a) -> Element (Vector a)) -> Vector a -> Element (Vector a) #

headEx :: Vector a -> Element (Vector a) #

lastEx :: Vector a -> Element (Vector a) #

unsafeHead :: Vector a -> Element (Vector a) #

unsafeLast :: Vector a -> Element (Vector a) #

maximumByEx :: (Element (Vector a) -> Element (Vector a) -> Ordering) -> Vector a -> Element (Vector a) #

minimumByEx :: (Element (Vector a) -> Element (Vector a) -> Ordering) -> Vector a -> Element (Vector a) #

oelem :: Element (Vector a) -> Vector a -> Bool #

onotElem :: Element (Vector a) -> Vector a -> Bool #

Storable a => MonoFoldable (Vector a) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (Vector a) -> m) -> Vector a -> m #

ofoldr :: (Element (Vector a) -> b -> b) -> b -> Vector a -> b #

ofoldl' :: (a0 -> Element (Vector a) -> a0) -> a0 -> Vector a -> a0 #

otoList :: Vector a -> [Element (Vector a)] #

oall :: (Element (Vector a) -> Bool) -> Vector a -> Bool #

oany :: (Element (Vector a) -> Bool) -> Vector a -> Bool #

onull :: Vector a -> Bool #

olength :: Vector a -> Int #

olength64 :: Vector a -> Int64 #

ocompareLength :: Integral i => Vector a -> i -> Ordering #

otraverse_ :: Applicative f => (Element (Vector a) -> f b) -> Vector a -> f () #

ofor_ :: Applicative f => Vector a -> (Element (Vector a) -> f b) -> f () #

omapM_ :: Applicative m => (Element (Vector a) -> m ()) -> Vector a -> m () #

oforM_ :: Applicative m => Vector a -> (Element (Vector a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (Vector a) -> m a0) -> a0 -> Vector a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (Vector a) -> m) -> Vector a -> m #

ofoldr1Ex :: (Element (Vector a) -> Element (Vector a) -> Element (Vector a)) -> Vector a -> Element (Vector a) #

ofoldl1Ex' :: (Element (Vector a) -> Element (Vector a) -> Element (Vector a)) -> Vector a -> Element (Vector a) #

headEx :: Vector a -> Element (Vector a) #

lastEx :: Vector a -> Element (Vector a) #

unsafeHead :: Vector a -> Element (Vector a) #

unsafeLast :: Vector a -> Element (Vector a) #

maximumByEx :: (Element (Vector a) -> Element (Vector a) -> Ordering) -> Vector a -> Element (Vector a) #

minimumByEx :: (Element (Vector a) -> Element (Vector a) -> Ordering) -> Vector a -> Element (Vector a) #

oelem :: Element (Vector a) -> Vector a -> Bool #

onotElem :: Element (Vector a) -> Vector a -> Bool #

Unbox a => MonoFoldable (Vector a) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (Vector a) -> m) -> Vector a -> m #

ofoldr :: (Element (Vector a) -> b -> b) -> b -> Vector a -> b #

ofoldl' :: (a0 -> Element (Vector a) -> a0) -> a0 -> Vector a -> a0 #

otoList :: Vector a -> [Element (Vector a)] #

oall :: (Element (Vector a) -> Bool) -> Vector a -> Bool #

oany :: (Element (Vector a) -> Bool) -> Vector a -> Bool #

onull :: Vector a -> Bool #

olength :: Vector a -> Int #

olength64 :: Vector a -> Int64 #

ocompareLength :: Integral i => Vector a -> i -> Ordering #

otraverse_ :: Applicative f => (Element (Vector a) -> f b) -> Vector a -> f () #

ofor_ :: Applicative f => Vector a -> (Element (Vector a) -> f b) -> f () #

omapM_ :: Applicative m => (Element (Vector a) -> m ()) -> Vector a -> m () #

oforM_ :: Applicative m => Vector a -> (Element (Vector a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (Vector a) -> m a0) -> a0 -> Vector a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (Vector a) -> m) -> Vector a -> m #

ofoldr1Ex :: (Element (Vector a) -> Element (Vector a) -> Element (Vector a)) -> Vector a -> Element (Vector a) #

ofoldl1Ex' :: (Element (Vector a) -> Element (Vector a) -> Element (Vector a)) -> Vector a -> Element (Vector a) #

headEx :: Vector a -> Element (Vector a) #

lastEx :: Vector a -> Element (Vector a) #

unsafeHead :: Vector a -> Element (Vector a) #

unsafeLast :: Vector a -> Element (Vector a) #

maximumByEx :: (Element (Vector a) -> Element (Vector a) -> Ordering) -> Vector a -> Element (Vector a) #

minimumByEx :: (Element (Vector a) -> Element (Vector a) -> Ordering) -> Vector a -> Element (Vector a) #

oelem :: Element (Vector a) -> Vector a -> Bool #

onotElem :: Element (Vector a) -> Vector a -> Bool #

MonoFoldable (Maybe a) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (Maybe a) -> m) -> Maybe a -> m #

ofoldr :: (Element (Maybe a) -> b -> b) -> b -> Maybe a -> b #

ofoldl' :: (a0 -> Element (Maybe a) -> a0) -> a0 -> Maybe a -> a0 #

otoList :: Maybe a -> [Element (Maybe a)] #

oall :: (Element (Maybe a) -> Bool) -> Maybe a -> Bool #

oany :: (Element (Maybe a) -> Bool) -> Maybe a -> Bool #

onull :: Maybe a -> Bool #

olength :: Maybe a -> Int #

olength64 :: Maybe a -> Int64 #

ocompareLength :: Integral i => Maybe a -> i -> Ordering #

otraverse_ :: Applicative f => (Element (Maybe a) -> f b) -> Maybe a -> f () #

ofor_ :: Applicative f => Maybe a -> (Element (Maybe a) -> f b) -> f () #

omapM_ :: Applicative m => (Element (Maybe a) -> m ()) -> Maybe a -> m () #

oforM_ :: Applicative m => Maybe a -> (Element (Maybe a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (Maybe a) -> m a0) -> a0 -> Maybe a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (Maybe a) -> m) -> Maybe a -> m #

ofoldr1Ex :: (Element (Maybe a) -> Element (Maybe a) -> Element (Maybe a)) -> Maybe a -> Element (Maybe a) #

ofoldl1Ex' :: (Element (Maybe a) -> Element (Maybe a) -> Element (Maybe a)) -> Maybe a -> Element (Maybe a) #

headEx :: Maybe a -> Element (Maybe a) #

lastEx :: Maybe a -> Element (Maybe a) #

unsafeHead :: Maybe a -> Element (Maybe a) #

unsafeLast :: Maybe a -> Element (Maybe a) #

maximumByEx :: (Element (Maybe a) -> Element (Maybe a) -> Ordering) -> Maybe a -> Element (Maybe a) #

minimumByEx :: (Element (Maybe a) -> Element (Maybe a) -> Ordering) -> Maybe a -> Element (Maybe a) #

oelem :: Element (Maybe a) -> Maybe a -> Bool #

onotElem :: Element (Maybe a) -> Maybe a -> Bool #

MonoFoldable [a] 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element [a] -> m) -> [a] -> m #

ofoldr :: (Element [a] -> b -> b) -> b -> [a] -> b #

ofoldl' :: (a0 -> Element [a] -> a0) -> a0 -> [a] -> a0 #

otoList :: [a] -> [Element [a]] #

oall :: (Element [a] -> Bool) -> [a] -> Bool #

oany :: (Element [a] -> Bool) -> [a] -> Bool #

onull :: [a] -> Bool #

olength :: [a] -> Int #

olength64 :: [a] -> Int64 #

ocompareLength :: Integral i => [a] -> i -> Ordering #

otraverse_ :: Applicative f => (Element [a] -> f b) -> [a] -> f () #

ofor_ :: Applicative f => [a] -> (Element [a] -> f b) -> f () #

omapM_ :: Applicative m => (Element [a] -> m ()) -> [a] -> m () #

oforM_ :: Applicative m => [a] -> (Element [a] -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element [a] -> m a0) -> a0 -> [a] -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element [a] -> m) -> [a] -> m #

ofoldr1Ex :: (Element [a] -> Element [a] -> Element [a]) -> [a] -> Element [a] #

ofoldl1Ex' :: (Element [a] -> Element [a] -> Element [a]) -> [a] -> Element [a] #

headEx :: [a] -> Element [a] #

lastEx :: [a] -> Element [a] #

unsafeHead :: [a] -> Element [a] #

unsafeLast :: [a] -> Element [a] #

maximumByEx :: (Element [a] -> Element [a] -> Ordering) -> [a] -> Element [a] #

minimumByEx :: (Element [a] -> Element [a] -> Ordering) -> [a] -> Element [a] #

oelem :: Element [a] -> [a] -> Bool #

onotElem :: Element [a] -> [a] -> Bool #

MonoFoldable (Either a b) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (Either a b) -> m) -> Either a b -> m #

ofoldr :: (Element (Either a b) -> b0 -> b0) -> b0 -> Either a b -> b0 #

ofoldl' :: (a0 -> Element (Either a b) -> a0) -> a0 -> Either a b -> a0 #

otoList :: Either a b -> [Element (Either a b)] #

oall :: (Element (Either a b) -> Bool) -> Either a b -> Bool #

oany :: (Element (Either a b) -> Bool) -> Either a b -> Bool #

onull :: Either a b -> Bool #

olength :: Either a b -> Int #

olength64 :: Either a b -> Int64 #

ocompareLength :: Integral i => Either a b -> i -> Ordering #

otraverse_ :: Applicative f => (Element (Either a b) -> f b0) -> Either a b -> f () #

ofor_ :: Applicative f => Either a b -> (Element (Either a b) -> f b0) -> f () #

omapM_ :: Applicative m => (Element (Either a b) -> m ()) -> Either a b -> m () #

oforM_ :: Applicative m => Either a b -> (Element (Either a b) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (Either a b) -> m a0) -> a0 -> Either a b -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (Either a b) -> m) -> Either a b -> m #

ofoldr1Ex :: (Element (Either a b) -> Element (Either a b) -> Element (Either a b)) -> Either a b -> Element (Either a b) #

ofoldl1Ex' :: (Element (Either a b) -> Element (Either a b) -> Element (Either a b)) -> Either a b -> Element (Either a b) #

headEx :: Either a b -> Element (Either a b) #

lastEx :: Either a b -> Element (Either a b) #

unsafeHead :: Either a b -> Element (Either a b) #

unsafeLast :: Either a b -> Element (Either a b) #

maximumByEx :: (Element (Either a b) -> Element (Either a b) -> Ordering) -> Either a b -> Element (Either a b) #

minimumByEx :: (Element (Either a b) -> Element (Either a b) -> Ordering) -> Either a b -> Element (Either a b) #

oelem :: Element (Either a b) -> Either a b -> Bool #

onotElem :: Element (Either a b) -> Either a b -> Bool #

MonoFoldable (Proxy a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (Proxy a) -> m) -> Proxy a -> m #

ofoldr :: (Element (Proxy a) -> b -> b) -> b -> Proxy a -> b #

ofoldl' :: (a0 -> Element (Proxy a) -> a0) -> a0 -> Proxy a -> a0 #

otoList :: Proxy a -> [Element (Proxy a)] #

oall :: (Element (Proxy a) -> Bool) -> Proxy a -> Bool #

oany :: (Element (Proxy a) -> Bool) -> Proxy a -> Bool #

onull :: Proxy a -> Bool #

olength :: Proxy a -> Int #

olength64 :: Proxy a -> Int64 #

ocompareLength :: Integral i => Proxy a -> i -> Ordering #

otraverse_ :: Applicative f => (Element (Proxy a) -> f b) -> Proxy a -> f () #

ofor_ :: Applicative f => Proxy a -> (Element (Proxy a) -> f b) -> f () #

omapM_ :: Applicative m => (Element (Proxy a) -> m ()) -> Proxy a -> m () #

oforM_ :: Applicative m => Proxy a -> (Element (Proxy a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (Proxy a) -> m a0) -> a0 -> Proxy a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (Proxy a) -> m) -> Proxy a -> m #

ofoldr1Ex :: (Element (Proxy a) -> Element (Proxy a) -> Element (Proxy a)) -> Proxy a -> Element (Proxy a) #

ofoldl1Ex' :: (Element (Proxy a) -> Element (Proxy a) -> Element (Proxy a)) -> Proxy a -> Element (Proxy a) #

headEx :: Proxy a -> Element (Proxy a) #

lastEx :: Proxy a -> Element (Proxy a) #

unsafeHead :: Proxy a -> Element (Proxy a) #

unsafeLast :: Proxy a -> Element (Proxy a) #

maximumByEx :: (Element (Proxy a) -> Element (Proxy a) -> Ordering) -> Proxy a -> Element (Proxy a) #

minimumByEx :: (Element (Proxy a) -> Element (Proxy a) -> Ordering) -> Proxy a -> Element (Proxy a) #

oelem :: Element (Proxy a) -> Proxy a -> Bool #

onotElem :: Element (Proxy a) -> Proxy a -> Bool #

MonoFoldable (U1 a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (U1 a) -> m) -> U1 a -> m #

ofoldr :: (Element (U1 a) -> b -> b) -> b -> U1 a -> b #

ofoldl' :: (a0 -> Element (U1 a) -> a0) -> a0 -> U1 a -> a0 #

otoList :: U1 a -> [Element (U1 a)] #

oall :: (Element (U1 a) -> Bool) -> U1 a -> Bool #

oany :: (Element (U1 a) -> Bool) -> U1 a -> Bool #

onull :: U1 a -> Bool #

olength :: U1 a -> Int #

olength64 :: U1 a -> Int64 #

ocompareLength :: Integral i => U1 a -> i -> Ordering #

otraverse_ :: Applicative f => (Element (U1 a) -> f b) -> U1 a -> f () #

ofor_ :: Applicative f => U1 a -> (Element (U1 a) -> f b) -> f () #

omapM_ :: Applicative m => (Element (U1 a) -> m ()) -> U1 a -> m () #

oforM_ :: Applicative m => U1 a -> (Element (U1 a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (U1 a) -> m a0) -> a0 -> U1 a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (U1 a) -> m) -> U1 a -> m #

ofoldr1Ex :: (Element (U1 a) -> Element (U1 a) -> Element (U1 a)) -> U1 a -> Element (U1 a) #

ofoldl1Ex' :: (Element (U1 a) -> Element (U1 a) -> Element (U1 a)) -> U1 a -> Element (U1 a) #

headEx :: U1 a -> Element (U1 a) #

lastEx :: U1 a -> Element (U1 a) #

unsafeHead :: U1 a -> Element (U1 a) #

unsafeLast :: U1 a -> Element (U1 a) #

maximumByEx :: (Element (U1 a) -> Element (U1 a) -> Ordering) -> U1 a -> Element (U1 a) #

minimumByEx :: (Element (U1 a) -> Element (U1 a) -> Ordering) -> U1 a -> Element (U1 a) #

oelem :: Element (U1 a) -> U1 a -> Bool #

onotElem :: Element (U1 a) -> U1 a -> Bool #

MonoFoldable (V1 a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (V1 a) -> m) -> V1 a -> m #

ofoldr :: (Element (V1 a) -> b -> b) -> b -> V1 a -> b #

ofoldl' :: (a0 -> Element (V1 a) -> a0) -> a0 -> V1 a -> a0 #

otoList :: V1 a -> [Element (V1 a)] #

oall :: (Element (V1 a) -> Bool) -> V1 a -> Bool #

oany :: (Element (V1 a) -> Bool) -> V1 a -> Bool #

onull :: V1 a -> Bool #

olength :: V1 a -> Int #

olength64 :: V1 a -> Int64 #

ocompareLength :: Integral i => V1 a -> i -> Ordering #

otraverse_ :: Applicative f => (Element (V1 a) -> f b) -> V1 a -> f () #

ofor_ :: Applicative f => V1 a -> (Element (V1 a) -> f b) -> f () #

omapM_ :: Applicative m => (Element (V1 a) -> m ()) -> V1 a -> m () #

oforM_ :: Applicative m => V1 a -> (Element (V1 a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (V1 a) -> m a0) -> a0 -> V1 a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (V1 a) -> m) -> V1 a -> m #

ofoldr1Ex :: (Element (V1 a) -> Element (V1 a) -> Element (V1 a)) -> V1 a -> Element (V1 a) #

ofoldl1Ex' :: (Element (V1 a) -> Element (V1 a) -> Element (V1 a)) -> V1 a -> Element (V1 a) #

headEx :: V1 a -> Element (V1 a) #

lastEx :: V1 a -> Element (V1 a) #

unsafeHead :: V1 a -> Element (V1 a) #

unsafeLast :: V1 a -> Element (V1 a) #

maximumByEx :: (Element (V1 a) -> Element (V1 a) -> Ordering) -> V1 a -> Element (V1 a) #

minimumByEx :: (Element (V1 a) -> Element (V1 a) -> Ordering) -> V1 a -> Element (V1 a) #

oelem :: Element (V1 a) -> V1 a -> Bool #

onotElem :: Element (V1 a) -> V1 a -> Bool #

MonoFoldable (Map k v) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (Map k v) -> m) -> Map k v -> m #

ofoldr :: (Element (Map k v) -> b -> b) -> b -> Map k v -> b #

ofoldl' :: (a -> Element (Map k v) -> a) -> a -> Map k v -> a #

otoList :: Map k v -> [Element (Map k v)] #

oall :: (Element (Map k v) -> Bool) -> Map k v -> Bool #

oany :: (Element (Map k v) -> Bool) -> Map k v -> Bool #

onull :: Map k v -> Bool #

olength :: Map k v -> Int #

olength64 :: Map k v -> Int64 #

ocompareLength :: Integral i => Map k v -> i -> Ordering #

otraverse_ :: Applicative f => (Element (Map k v) -> f b) -> Map k v -> f () #

ofor_ :: Applicative f => Map k v -> (Element (Map k v) -> f b) -> f () #

omapM_ :: Applicative m => (Element (Map k v) -> m ()) -> Map k v -> m () #

oforM_ :: Applicative m => Map k v -> (Element (Map k v) -> m ()) -> m () #

ofoldlM :: Monad m => (a -> Element (Map k v) -> m a) -> a -> Map k v -> m a #

ofoldMap1Ex :: Semigroup m => (Element (Map k v) -> m) -> Map k v -> m #

ofoldr1Ex :: (Element (Map k v) -> Element (Map k v) -> Element (Map k v)) -> Map k v -> Element (Map k v) #

ofoldl1Ex' :: (Element (Map k v) -> Element (Map k v) -> Element (Map k v)) -> Map k v -> Element (Map k v) #

headEx :: Map k v -> Element (Map k v) #

lastEx :: Map k v -> Element (Map k v) #

unsafeHead :: Map k v -> Element (Map k v) #

unsafeLast :: Map k v -> Element (Map k v) #

maximumByEx :: (Element (Map k v) -> Element (Map k v) -> Ordering) -> Map k v -> Element (Map k v) #

minimumByEx :: (Element (Map k v) -> Element (Map k v) -> Ordering) -> Map k v -> Element (Map k v) #

oelem :: Element (Map k v) -> Map k v -> Bool #

onotElem :: Element (Map k v) -> Map k v -> Bool #

MonoFoldable mono => MonoFoldable (WrappedMono mono a) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (WrappedMono mono a) -> m) -> WrappedMono mono a -> m #

ofoldr :: (Element (WrappedMono mono a) -> b -> b) -> b -> WrappedMono mono a -> b #

ofoldl' :: (a0 -> Element (WrappedMono mono a) -> a0) -> a0 -> WrappedMono mono a -> a0 #

otoList :: WrappedMono mono a -> [Element (WrappedMono mono a)] #

oall :: (Element (WrappedMono mono a) -> Bool) -> WrappedMono mono a -> Bool #

oany :: (Element (WrappedMono mono a) -> Bool) -> WrappedMono mono a -> Bool #

onull :: WrappedMono mono a -> Bool #

olength :: WrappedMono mono a -> Int #

olength64 :: WrappedMono mono a -> Int64 #

ocompareLength :: Integral i => WrappedMono mono a -> i -> Ordering #

otraverse_ :: Applicative f => (Element (WrappedMono mono a) -> f b) -> WrappedMono mono a -> f () #

ofor_ :: Applicative f => WrappedMono mono a -> (Element (WrappedMono mono a) -> f b) -> f () #

omapM_ :: Applicative m => (Element (WrappedMono mono a) -> m ()) -> WrappedMono mono a -> m () #

oforM_ :: Applicative m => WrappedMono mono a -> (Element (WrappedMono mono a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (WrappedMono mono a) -> m a0) -> a0 -> WrappedMono mono a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (WrappedMono mono a) -> m) -> WrappedMono mono a -> m #

ofoldr1Ex :: (Element (WrappedMono mono a) -> Element (WrappedMono mono a) -> Element (WrappedMono mono a)) -> WrappedMono mono a -> Element (WrappedMono mono a) #

ofoldl1Ex' :: (Element (WrappedMono mono a) -> Element (WrappedMono mono a) -> Element (WrappedMono mono a)) -> WrappedMono mono a -> Element (WrappedMono mono a) #

headEx :: WrappedMono mono a -> Element (WrappedMono mono a) #

lastEx :: WrappedMono mono a -> Element (WrappedMono mono a) #

unsafeHead :: WrappedMono mono a -> Element (WrappedMono mono a) #

unsafeLast :: WrappedMono mono a -> Element (WrappedMono mono a) #

maximumByEx :: (Element (WrappedMono mono a) -> Element (WrappedMono mono a) -> Ordering) -> WrappedMono mono a -> Element (WrappedMono mono a) #

minimumByEx :: (Element (WrappedMono mono a) -> Element (WrappedMono mono a) -> Ordering) -> WrappedMono mono a -> Element (WrappedMono mono a) #

oelem :: Element (WrappedMono mono a) -> WrappedMono mono a -> Bool #

onotElem :: Element (WrappedMono mono a) -> WrappedMono mono a -> Bool #

Foldable f => MonoFoldable (WrappedPoly f a) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (WrappedPoly f a) -> m) -> WrappedPoly f a -> m #

ofoldr :: (Element (WrappedPoly f a) -> b -> b) -> b -> WrappedPoly f a -> b #

ofoldl' :: (a0 -> Element (WrappedPoly f a) -> a0) -> a0 -> WrappedPoly f a -> a0 #

otoList :: WrappedPoly f a -> [Element (WrappedPoly f a)] #

oall :: (Element (WrappedPoly f a) -> Bool) -> WrappedPoly f a -> Bool #

oany :: (Element (WrappedPoly f a) -> Bool) -> WrappedPoly f a -> Bool #

onull :: WrappedPoly f a -> Bool #

olength :: WrappedPoly f a -> Int #

olength64 :: WrappedPoly f a -> Int64 #

ocompareLength :: Integral i => WrappedPoly f a -> i -> Ordering #

otraverse_ :: Applicative f0 => (Element (WrappedPoly f a) -> f0 b) -> WrappedPoly f a -> f0 () #

ofor_ :: Applicative f0 => WrappedPoly f a -> (Element (WrappedPoly f a) -> f0 b) -> f0 () #

omapM_ :: Applicative m => (Element (WrappedPoly f a) -> m ()) -> WrappedPoly f a -> m () #

oforM_ :: Applicative m => WrappedPoly f a -> (Element (WrappedPoly f a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (WrappedPoly f a) -> m a0) -> a0 -> WrappedPoly f a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (WrappedPoly f a) -> m) -> WrappedPoly f a -> m #

ofoldr1Ex :: (Element (WrappedPoly f a) -> Element (WrappedPoly f a) -> Element (WrappedPoly f a)) -> WrappedPoly f a -> Element (WrappedPoly f a) #

ofoldl1Ex' :: (Element (WrappedPoly f a) -> Element (WrappedPoly f a) -> Element (WrappedPoly f a)) -> WrappedPoly f a -> Element (WrappedPoly f a) #

headEx :: WrappedPoly f a -> Element (WrappedPoly f a) #

lastEx :: WrappedPoly f a -> Element (WrappedPoly f a) #

unsafeHead :: WrappedPoly f a -> Element (WrappedPoly f a) #

unsafeLast :: WrappedPoly f a -> Element (WrappedPoly f a) #

maximumByEx :: (Element (WrappedPoly f a) -> Element (WrappedPoly f a) -> Ordering) -> WrappedPoly f a -> Element (WrappedPoly f a) #

minimumByEx :: (Element (WrappedPoly f a) -> Element (WrappedPoly f a) -> Ordering) -> WrappedPoly f a -> Element (WrappedPoly f a) #

oelem :: Element (WrappedPoly f a) -> WrappedPoly f a -> Bool #

onotElem :: Element (WrappedPoly f a) -> WrappedPoly f a -> Bool #

Foldable f => MonoFoldable (MaybeT f a) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (MaybeT f a) -> m) -> MaybeT f a -> m #

ofoldr :: (Element (MaybeT f a) -> b -> b) -> b -> MaybeT f a -> b #

ofoldl' :: (a0 -> Element (MaybeT f a) -> a0) -> a0 -> MaybeT f a -> a0 #

otoList :: MaybeT f a -> [Element (MaybeT f a)] #

oall :: (Element (MaybeT f a) -> Bool) -> MaybeT f a -> Bool #

oany :: (Element (MaybeT f a) -> Bool) -> MaybeT f a -> Bool #

onull :: MaybeT f a -> Bool #

olength :: MaybeT f a -> Int #

olength64 :: MaybeT f a -> Int64 #

ocompareLength :: Integral i => MaybeT f a -> i -> Ordering #

otraverse_ :: Applicative f0 => (Element (MaybeT f a) -> f0 b) -> MaybeT f a -> f0 () #

ofor_ :: Applicative f0 => MaybeT f a -> (Element (MaybeT f a) -> f0 b) -> f0 () #

omapM_ :: Applicative m => (Element (MaybeT f a) -> m ()) -> MaybeT f a -> m () #

oforM_ :: Applicative m => MaybeT f a -> (Element (MaybeT f a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (MaybeT f a) -> m a0) -> a0 -> MaybeT f a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (MaybeT f a) -> m) -> MaybeT f a -> m #

ofoldr1Ex :: (Element (MaybeT f a) -> Element (MaybeT f a) -> Element (MaybeT f a)) -> MaybeT f a -> Element (MaybeT f a) #

ofoldl1Ex' :: (Element (MaybeT f a) -> Element (MaybeT f a) -> Element (MaybeT f a)) -> MaybeT f a -> Element (MaybeT f a) #

headEx :: MaybeT f a -> Element (MaybeT f a) #

lastEx :: MaybeT f a -> Element (MaybeT f a) #

unsafeHead :: MaybeT f a -> Element (MaybeT f a) #

unsafeLast :: MaybeT f a -> Element (MaybeT f a) #

maximumByEx :: (Element (MaybeT f a) -> Element (MaybeT f a) -> Ordering) -> MaybeT f a -> Element (MaybeT f a) #

minimumByEx :: (Element (MaybeT f a) -> Element (MaybeT f a) -> Ordering) -> MaybeT f a -> Element (MaybeT f a) #

oelem :: Element (MaybeT f a) -> MaybeT f a -> Bool #

onotElem :: Element (MaybeT f a) -> MaybeT f a -> Bool #

MonoFoldable (HashMap k v) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (HashMap k v) -> m) -> HashMap k v -> m #

ofoldr :: (Element (HashMap k v) -> b -> b) -> b -> HashMap k v -> b #

ofoldl' :: (a -> Element (HashMap k v) -> a) -> a -> HashMap k v -> a #

otoList :: HashMap k v -> [Element (HashMap k v)] #

oall :: (Element (HashMap k v) -> Bool) -> HashMap k v -> Bool #

oany :: (Element (HashMap k v) -> Bool) -> HashMap k v -> Bool #

onull :: HashMap k v -> Bool #

olength :: HashMap k v -> Int #

olength64 :: HashMap k v -> Int64 #

ocompareLength :: Integral i => HashMap k v -> i -> Ordering #

otraverse_ :: Applicative f => (Element (HashMap k v) -> f b) -> HashMap k v -> f () #

ofor_ :: Applicative f => HashMap k v -> (Element (HashMap k v) -> f b) -> f () #

omapM_ :: Applicative m => (Element (HashMap k v) -> m ()) -> HashMap k v -> m () #

oforM_ :: Applicative m => HashMap k v -> (Element (HashMap k v) -> m ()) -> m () #

ofoldlM :: Monad m => (a -> Element (HashMap k v) -> m a) -> a -> HashMap k v -> m a #

ofoldMap1Ex :: Semigroup m => (Element (HashMap k v) -> m) -> HashMap k v -> m #

ofoldr1Ex :: (Element (HashMap k v) -> Element (HashMap k v) -> Element (HashMap k v)) -> HashMap k v -> Element (HashMap k v) #

ofoldl1Ex' :: (Element (HashMap k v) -> Element (HashMap k v) -> Element (HashMap k v)) -> HashMap k v -> Element (HashMap k v) #

headEx :: HashMap k v -> Element (HashMap k v) #

lastEx :: HashMap k v -> Element (HashMap k v) #

unsafeHead :: HashMap k v -> Element (HashMap k v) #

unsafeLast :: HashMap k v -> Element (HashMap k v) #

maximumByEx :: (Element (HashMap k v) -> Element (HashMap k v) -> Ordering) -> HashMap k v -> Element (HashMap k v) #

minimumByEx :: (Element (HashMap k v) -> Element (HashMap k v) -> Ordering) -> HashMap k v -> Element (HashMap k v) #

oelem :: Element (HashMap k v) -> HashMap k v -> Bool #

onotElem :: Element (HashMap k v) -> HashMap k v -> Bool #

MonoFoldable (a, b) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (a, b) -> m) -> (a, b) -> m #

ofoldr :: (Element (a, b) -> b0 -> b0) -> b0 -> (a, b) -> b0 #

ofoldl' :: (a0 -> Element (a, b) -> a0) -> a0 -> (a, b) -> a0 #

otoList :: (a, b) -> [Element (a, b)] #

oall :: (Element (a, b) -> Bool) -> (a, b) -> Bool #

oany :: (Element (a, b) -> Bool) -> (a, b) -> Bool #

onull :: (a, b) -> Bool #

olength :: (a, b) -> Int #

olength64 :: (a, b) -> Int64 #

ocompareLength :: Integral i => (a, b) -> i -> Ordering #

otraverse_ :: Applicative f => (Element (a, b) -> f b0) -> (a, b) -> f () #

ofor_ :: Applicative f => (a, b) -> (Element (a, b) -> f b0) -> f () #

omapM_ :: Applicative m => (Element (a, b) -> m ()) -> (a, b) -> m () #

oforM_ :: Applicative m => (a, b) -> (Element (a, b) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (a, b) -> m a0) -> a0 -> (a, b) -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (a, b) -> m) -> (a, b) -> m #

ofoldr1Ex :: (Element (a, b) -> Element (a, b) -> Element (a, b)) -> (a, b) -> Element (a, b) #

ofoldl1Ex' :: (Element (a, b) -> Element (a, b) -> Element (a, b)) -> (a, b) -> Element (a, b) #

headEx :: (a, b) -> Element (a, b) #

lastEx :: (a, b) -> Element (a, b) #

unsafeHead :: (a, b) -> Element (a, b) #

unsafeLast :: (a, b) -> Element (a, b) #

maximumByEx :: (Element (a, b) -> Element (a, b) -> Ordering) -> (a, b) -> Element (a, b) #

minimumByEx :: (Element (a, b) -> Element (a, b) -> Ordering) -> (a, b) -> Element (a, b) #

oelem :: Element (a, b) -> (a, b) -> Bool #

onotElem :: Element (a, b) -> (a, b) -> Bool #

MonoFoldable (Const m a) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m0 => (Element (Const m a) -> m0) -> Const m a -> m0 #

ofoldr :: (Element (Const m a) -> b -> b) -> b -> Const m a -> b #

ofoldl' :: (a0 -> Element (Const m a) -> a0) -> a0 -> Const m a -> a0 #

otoList :: Const m a -> [Element (Const m a)] #

oall :: (Element (Const m a) -> Bool) -> Const m a -> Bool #

oany :: (Element (Const m a) -> Bool) -> Const m a -> Bool #

onull :: Const m a -> Bool #

olength :: Const m a -> Int #

olength64 :: Const m a -> Int64 #

ocompareLength :: Integral i => Const m a -> i -> Ordering #

otraverse_ :: Applicative f => (Element (Const m a) -> f b) -> Const m a -> f () #

ofor_ :: Applicative f => Const m a -> (Element (Const m a) -> f b) -> f () #

omapM_ :: Applicative m0 => (Element (Const m a) -> m0 ()) -> Const m a -> m0 () #

oforM_ :: Applicative m0 => Const m a -> (Element (Const m a) -> m0 ()) -> m0 () #

ofoldlM :: Monad m0 => (a0 -> Element (Const m a) -> m0 a0) -> a0 -> Const m a -> m0 a0 #

ofoldMap1Ex :: Semigroup m0 => (Element (Const m a) -> m0) -> Const m a -> m0 #

ofoldr1Ex :: (Element (Const m a) -> Element (Const m a) -> Element (Const m a)) -> Const m a -> Element (Const m a) #

ofoldl1Ex' :: (Element (Const m a) -> Element (Const m a) -> Element (Const m a)) -> Const m a -> Element (Const m a) #

headEx :: Const m a -> Element (Const m a) #

lastEx :: Const m a -> Element (Const m a) #

unsafeHead :: Const m a -> Element (Const m a) #

unsafeLast :: Const m a -> Element (Const m a) #

maximumByEx :: (Element (Const m a) -> Element (Const m a) -> Ordering) -> Const m a -> Element (Const m a) #

minimumByEx :: (Element (Const m a) -> Element (Const m a) -> Ordering) -> Const m a -> Element (Const m a) #

oelem :: Element (Const m a) -> Const m a -> Bool #

onotElem :: Element (Const m a) -> Const m a -> Bool #

Foldable f => MonoFoldable (Rec1 f a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (Rec1 f a) -> m) -> Rec1 f a -> m #

ofoldr :: (Element (Rec1 f a) -> b -> b) -> b -> Rec1 f a -> b #

ofoldl' :: (a0 -> Element (Rec1 f a) -> a0) -> a0 -> Rec1 f a -> a0 #

otoList :: Rec1 f a -> [Element (Rec1 f a)] #

oall :: (Element (Rec1 f a) -> Bool) -> Rec1 f a -> Bool #

oany :: (Element (Rec1 f a) -> Bool) -> Rec1 f a -> Bool #

onull :: Rec1 f a -> Bool #

olength :: Rec1 f a -> Int #

olength64 :: Rec1 f a -> Int64 #

ocompareLength :: Integral i => Rec1 f a -> i -> Ordering #

otraverse_ :: Applicative f0 => (Element (Rec1 f a) -> f0 b) -> Rec1 f a -> f0 () #

ofor_ :: Applicative f0 => Rec1 f a -> (Element (Rec1 f a) -> f0 b) -> f0 () #

omapM_ :: Applicative m => (Element (Rec1 f a) -> m ()) -> Rec1 f a -> m () #

oforM_ :: Applicative m => Rec1 f a -> (Element (Rec1 f a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (Rec1 f a) -> m a0) -> a0 -> Rec1 f a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (Rec1 f a) -> m) -> Rec1 f a -> m #

ofoldr1Ex :: (Element (Rec1 f a) -> Element (Rec1 f a) -> Element (Rec1 f a)) -> Rec1 f a -> Element (Rec1 f a) #

ofoldl1Ex' :: (Element (Rec1 f a) -> Element (Rec1 f a) -> Element (Rec1 f a)) -> Rec1 f a -> Element (Rec1 f a) #

headEx :: Rec1 f a -> Element (Rec1 f a) #

lastEx :: Rec1 f a -> Element (Rec1 f a) #

unsafeHead :: Rec1 f a -> Element (Rec1 f a) #

unsafeLast :: Rec1 f a -> Element (Rec1 f a) #

maximumByEx :: (Element (Rec1 f a) -> Element (Rec1 f a) -> Ordering) -> Rec1 f a -> Element (Rec1 f a) #

minimumByEx :: (Element (Rec1 f a) -> Element (Rec1 f a) -> Ordering) -> Rec1 f a -> Element (Rec1 f a) #

oelem :: Element (Rec1 f a) -> Rec1 f a -> Bool #

onotElem :: Element (Rec1 f a) -> Rec1 f a -> Bool #

Foldable f => MonoFoldable (IdentityT f a) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (IdentityT f a) -> m) -> IdentityT f a -> m #

ofoldr :: (Element (IdentityT f a) -> b -> b) -> b -> IdentityT f a -> b #

ofoldl' :: (a0 -> Element (IdentityT f a) -> a0) -> a0 -> IdentityT f a -> a0 #

otoList :: IdentityT f a -> [Element (IdentityT f a)] #

oall :: (Element (IdentityT f a) -> Bool) -> IdentityT f a -> Bool #

oany :: (Element (IdentityT f a) -> Bool) -> IdentityT f a -> Bool #

onull :: IdentityT f a -> Bool #

olength :: IdentityT f a -> Int #

olength64 :: IdentityT f a -> Int64 #

ocompareLength :: Integral i => IdentityT f a -> i -> Ordering #

otraverse_ :: Applicative f0 => (Element (IdentityT f a) -> f0 b) -> IdentityT f a -> f0 () #

ofor_ :: Applicative f0 => IdentityT f a -> (Element (IdentityT f a) -> f0 b) -> f0 () #

omapM_ :: Applicative m => (Element (IdentityT f a) -> m ()) -> IdentityT f a -> m () #

oforM_ :: Applicative m => IdentityT f a -> (Element (IdentityT f a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (IdentityT f a) -> m a0) -> a0 -> IdentityT f a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (IdentityT f a) -> m) -> IdentityT f a -> m #

ofoldr1Ex :: (Element (IdentityT f a) -> Element (IdentityT f a) -> Element (IdentityT f a)) -> IdentityT f a -> Element (IdentityT f a) #

ofoldl1Ex' :: (Element (IdentityT f a) -> Element (IdentityT f a) -> Element (IdentityT f a)) -> IdentityT f a -> Element (IdentityT f a) #

headEx :: IdentityT f a -> Element (IdentityT f a) #

lastEx :: IdentityT f a -> Element (IdentityT f a) #

unsafeHead :: IdentityT f a -> Element (IdentityT f a) #

unsafeLast :: IdentityT f a -> Element (IdentityT f a) #

maximumByEx :: (Element (IdentityT f a) -> Element (IdentityT f a) -> Ordering) -> IdentityT f a -> Element (IdentityT f a) #

minimumByEx :: (Element (IdentityT f a) -> Element (IdentityT f a) -> Ordering) -> IdentityT f a -> Element (IdentityT f a) #

oelem :: Element (IdentityT f a) -> IdentityT f a -> Bool #

onotElem :: Element (IdentityT f a) -> IdentityT f a -> Bool #

Foldable f => MonoFoldable (WriterT w f a) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (WriterT w f a) -> m) -> WriterT w f a -> m #

ofoldr :: (Element (WriterT w f a) -> b -> b) -> b -> WriterT w f a -> b #

ofoldl' :: (a0 -> Element (WriterT w f a) -> a0) -> a0 -> WriterT w f a -> a0 #

otoList :: WriterT w f a -> [Element (WriterT w f a)] #

oall :: (Element (WriterT w f a) -> Bool) -> WriterT w f a -> Bool #

oany :: (Element (WriterT w f a) -> Bool) -> WriterT w f a -> Bool #

onull :: WriterT w f a -> Bool #

olength :: WriterT w f a -> Int #

olength64 :: WriterT w f a -> Int64 #

ocompareLength :: Integral i => WriterT w f a -> i -> Ordering #

otraverse_ :: Applicative f0 => (Element (WriterT w f a) -> f0 b) -> WriterT w f a -> f0 () #

ofor_ :: Applicative f0 => WriterT w f a -> (Element (WriterT w f a) -> f0 b) -> f0 () #

omapM_ :: Applicative m => (Element (WriterT w f a) -> m ()) -> WriterT w f a -> m () #

oforM_ :: Applicative m => WriterT w f a -> (Element (WriterT w f a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (WriterT w f a) -> m a0) -> a0 -> WriterT w f a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (WriterT w f a) -> m) -> WriterT w f a -> m #

ofoldr1Ex :: (Element (WriterT w f a) -> Element (WriterT w f a) -> Element (WriterT w f a)) -> WriterT w f a -> Element (WriterT w f a) #

ofoldl1Ex' :: (Element (WriterT w f a) -> Element (WriterT w f a) -> Element (WriterT w f a)) -> WriterT w f a -> Element (WriterT w f a) #

headEx :: WriterT w f a -> Element (WriterT w f a) #

lastEx :: WriterT w f a -> Element (WriterT w f a) #

unsafeHead :: WriterT w f a -> Element (WriterT w f a) #

unsafeLast :: WriterT w f a -> Element (WriterT w f a) #

maximumByEx :: (Element (WriterT w f a) -> Element (WriterT w f a) -> Ordering) -> WriterT w f a -> Element (WriterT w f a) #

minimumByEx :: (Element (WriterT w f a) -> Element (WriterT w f a) -> Ordering) -> WriterT w f a -> Element (WriterT w f a) #

oelem :: Element (WriterT w f a) -> WriterT w f a -> Bool #

onotElem :: Element (WriterT w f a) -> WriterT w f a -> Bool #

Foldable f => MonoFoldable (WriterT w f a) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (WriterT w f a) -> m) -> WriterT w f a -> m #

ofoldr :: (Element (WriterT w f a) -> b -> b) -> b -> WriterT w f a -> b #

ofoldl' :: (a0 -> Element (WriterT w f a) -> a0) -> a0 -> WriterT w f a -> a0 #

otoList :: WriterT w f a -> [Element (WriterT w f a)] #

oall :: (Element (WriterT w f a) -> Bool) -> WriterT w f a -> Bool #

oany :: (Element (WriterT w f a) -> Bool) -> WriterT w f a -> Bool #

onull :: WriterT w f a -> Bool #

olength :: WriterT w f a -> Int #

olength64 :: WriterT w f a -> Int64 #

ocompareLength :: Integral i => WriterT w f a -> i -> Ordering #

otraverse_ :: Applicative f0 => (Element (WriterT w f a) -> f0 b) -> WriterT w f a -> f0 () #

ofor_ :: Applicative f0 => WriterT w f a -> (Element (WriterT w f a) -> f0 b) -> f0 () #

omapM_ :: Applicative m => (Element (WriterT w f a) -> m ()) -> WriterT w f a -> m () #

oforM_ :: Applicative m => WriterT w f a -> (Element (WriterT w f a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (WriterT w f a) -> m a0) -> a0 -> WriterT w f a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (WriterT w f a) -> m) -> WriterT w f a -> m #

ofoldr1Ex :: (Element (WriterT w f a) -> Element (WriterT w f a) -> Element (WriterT w f a)) -> WriterT w f a -> Element (WriterT w f a) #

ofoldl1Ex' :: (Element (WriterT w f a) -> Element (WriterT w f a) -> Element (WriterT w f a)) -> WriterT w f a -> Element (WriterT w f a) #

headEx :: WriterT w f a -> Element (WriterT w f a) #

lastEx :: WriterT w f a -> Element (WriterT w f a) #

unsafeHead :: WriterT w f a -> Element (WriterT w f a) #

unsafeLast :: WriterT w f a -> Element (WriterT w f a) #

maximumByEx :: (Element (WriterT w f a) -> Element (WriterT w f a) -> Ordering) -> WriterT w f a -> Element (WriterT w f a) #

minimumByEx :: (Element (WriterT w f a) -> Element (WriterT w f a) -> Ordering) -> WriterT w f a -> Element (WriterT w f a) #

oelem :: Element (WriterT w f a) -> WriterT w f a -> Bool #

onotElem :: Element (WriterT w f a) -> WriterT w f a -> Bool #

(Foldable f, Foldable g) => MonoFoldable (Product f g a) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (Product f g a) -> m) -> Product f g a -> m #

ofoldr :: (Element (Product f g a) -> b -> b) -> b -> Product f g a -> b #

ofoldl' :: (a0 -> Element (Product f g a) -> a0) -> a0 -> Product f g a -> a0 #

otoList :: Product f g a -> [Element (Product f g a)] #

oall :: (Element (Product f g a) -> Bool) -> Product f g a -> Bool #

oany :: (Element (Product f g a) -> Bool) -> Product f g a -> Bool #

onull :: Product f g a -> Bool #

olength :: Product f g a -> Int #

olength64 :: Product f g a -> Int64 #

ocompareLength :: Integral i => Product f g a -> i -> Ordering #

otraverse_ :: Applicative f0 => (Element (Product f g a) -> f0 b) -> Product f g a -> f0 () #

ofor_ :: Applicative f0 => Product f g a -> (Element (Product f g a) -> f0 b) -> f0 () #

omapM_ :: Applicative m => (Element (Product f g a) -> m ()) -> Product f g a -> m () #

oforM_ :: Applicative m => Product f g a -> (Element (Product f g a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (Product f g a) -> m a0) -> a0 -> Product f g a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (Product f g a) -> m) -> Product f g a -> m #

ofoldr1Ex :: (Element (Product f g a) -> Element (Product f g a) -> Element (Product f g a)) -> Product f g a -> Element (Product f g a) #

ofoldl1Ex' :: (Element (Product f g a) -> Element (Product f g a) -> Element (Product f g a)) -> Product f g a -> Element (Product f g a) #

headEx :: Product f g a -> Element (Product f g a) #

lastEx :: Product f g a -> Element (Product f g a) #

unsafeHead :: Product f g a -> Element (Product f g a) #

unsafeLast :: Product f g a -> Element (Product f g a) #

maximumByEx :: (Element (Product f g a) -> Element (Product f g a) -> Ordering) -> Product f g a -> Element (Product f g a) #

minimumByEx :: (Element (Product f g a) -> Element (Product f g a) -> Ordering) -> Product f g a -> Element (Product f g a) #

oelem :: Element (Product f g a) -> Product f g a -> Bool #

onotElem :: Element (Product f g a) -> Product f g a -> Bool #

(Foldable f, Foldable g) => MonoFoldable ((f :*: g) a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element ((f :*: g) a) -> m) -> (f :*: g) a -> m #

ofoldr :: (Element ((f :*: g) a) -> b -> b) -> b -> (f :*: g) a -> b #

ofoldl' :: (a0 -> Element ((f :*: g) a) -> a0) -> a0 -> (f :*: g) a -> a0 #

otoList :: (f :*: g) a -> [Element ((f :*: g) a)] #

oall :: (Element ((f :*: g) a) -> Bool) -> (f :*: g) a -> Bool #

oany :: (Element ((f :*: g) a) -> Bool) -> (f :*: g) a -> Bool #

onull :: (f :*: g) a -> Bool #

olength :: (f :*: g) a -> Int #

olength64 :: (f :*: g) a -> Int64 #

ocompareLength :: Integral i => (f :*: g) a -> i -> Ordering #

otraverse_ :: Applicative f0 => (Element ((f :*: g) a) -> f0 b) -> (f :*: g) a -> f0 () #

ofor_ :: Applicative f0 => (f :*: g) a -> (Element ((f :*: g) a) -> f0 b) -> f0 () #

omapM_ :: Applicative m => (Element ((f :*: g) a) -> m ()) -> (f :*: g) a -> m () #

oforM_ :: Applicative m => (f :*: g) a -> (Element ((f :*: g) a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element ((f :*: g) a) -> m a0) -> a0 -> (f :*: g) a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element ((f :*: g) a) -> m) -> (f :*: g) a -> m #

ofoldr1Ex :: (Element ((f :*: g) a) -> Element ((f :*: g) a) -> Element ((f :*: g) a)) -> (f :*: g) a -> Element ((f :*: g) a) #

ofoldl1Ex' :: (Element ((f :*: g) a) -> Element ((f :*: g) a) -> Element ((f :*: g) a)) -> (f :*: g) a -> Element ((f :*: g) a) #

headEx :: (f :*: g) a -> Element ((f :*: g) a) #

lastEx :: (f :*: g) a -> Element ((f :*: g) a) #

unsafeHead :: (f :*: g) a -> Element ((f :*: g) a) #

unsafeLast :: (f :*: g) a -> Element ((f :*: g) a) #

maximumByEx :: (Element ((f :*: g) a) -> Element ((f :*: g) a) -> Ordering) -> (f :*: g) a -> Element ((f :*: g) a) #

minimumByEx :: (Element ((f :*: g) a) -> Element ((f :*: g) a) -> Ordering) -> (f :*: g) a -> Element ((f :*: g) a) #

oelem :: Element ((f :*: g) a) -> (f :*: g) a -> Bool #

onotElem :: Element ((f :*: g) a) -> (f :*: g) a -> Bool #

(Foldable f, Foldable g) => MonoFoldable ((f :+: g) a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element ((f :+: g) a) -> m) -> (f :+: g) a -> m #

ofoldr :: (Element ((f :+: g) a) -> b -> b) -> b -> (f :+: g) a -> b #

ofoldl' :: (a0 -> Element ((f :+: g) a) -> a0) -> a0 -> (f :+: g) a -> a0 #

otoList :: (f :+: g) a -> [Element ((f :+: g) a)] #

oall :: (Element ((f :+: g) a) -> Bool) -> (f :+: g) a -> Bool #

oany :: (Element ((f :+: g) a) -> Bool) -> (f :+: g) a -> Bool #

onull :: (f :+: g) a -> Bool #

olength :: (f :+: g) a -> Int #

olength64 :: (f :+: g) a -> Int64 #

ocompareLength :: Integral i => (f :+: g) a -> i -> Ordering #

otraverse_ :: Applicative f0 => (Element ((f :+: g) a) -> f0 b) -> (f :+: g) a -> f0 () #

ofor_ :: Applicative f0 => (f :+: g) a -> (Element ((f :+: g) a) -> f0 b) -> f0 () #

omapM_ :: Applicative m => (Element ((f :+: g) a) -> m ()) -> (f :+: g) a -> m () #

oforM_ :: Applicative m => (f :+: g) a -> (Element ((f :+: g) a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element ((f :+: g) a) -> m a0) -> a0 -> (f :+: g) a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element ((f :+: g) a) -> m) -> (f :+: g) a -> m #

ofoldr1Ex :: (Element ((f :+: g) a) -> Element ((f :+: g) a) -> Element ((f :+: g) a)) -> (f :+: g) a -> Element ((f :+: g) a) #

ofoldl1Ex' :: (Element ((f :+: g) a) -> Element ((f :+: g) a) -> Element ((f :+: g) a)) -> (f :+: g) a -> Element ((f :+: g) a) #

headEx :: (f :+: g) a -> Element ((f :+: g) a) #

lastEx :: (f :+: g) a -> Element ((f :+: g) a) #

unsafeHead :: (f :+: g) a -> Element ((f :+: g) a) #

unsafeLast :: (f :+: g) a -> Element ((f :+: g) a) #

maximumByEx :: (Element ((f :+: g) a) -> Element ((f :+: g) a) -> Ordering) -> (f :+: g) a -> Element ((f :+: g) a) #

minimumByEx :: (Element ((f :+: g) a) -> Element ((f :+: g) a) -> Ordering) -> (f :+: g) a -> Element ((f :+: g) a) #

oelem :: Element ((f :+: g) a) -> (f :+: g) a -> Bool #

onotElem :: Element ((f :+: g) a) -> (f :+: g) a -> Bool #

MonoFoldable (K1 i c a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (K1 i c a) -> m) -> K1 i c a -> m #

ofoldr :: (Element (K1 i c a) -> b -> b) -> b -> K1 i c a -> b #

ofoldl' :: (a0 -> Element (K1 i c a) -> a0) -> a0 -> K1 i c a -> a0 #

otoList :: K1 i c a -> [Element (K1 i c a)] #

oall :: (Element (K1 i c a) -> Bool) -> K1 i c a -> Bool #

oany :: (Element (K1 i c a) -> Bool) -> K1 i c a -> Bool #

onull :: K1 i c a -> Bool #

olength :: K1 i c a -> Int #

olength64 :: K1 i c a -> Int64 #

ocompareLength :: Integral i0 => K1 i c a -> i0 -> Ordering #

otraverse_ :: Applicative f => (Element (K1 i c a) -> f b) -> K1 i c a -> f () #

ofor_ :: Applicative f => K1 i c a -> (Element (K1 i c a) -> f b) -> f () #

omapM_ :: Applicative m => (Element (K1 i c a) -> m ()) -> K1 i c a -> m () #

oforM_ :: Applicative m => K1 i c a -> (Element (K1 i c a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (K1 i c a) -> m a0) -> a0 -> K1 i c a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (K1 i c a) -> m) -> K1 i c a -> m #

ofoldr1Ex :: (Element (K1 i c a) -> Element (K1 i c a) -> Element (K1 i c a)) -> K1 i c a -> Element (K1 i c a) #

ofoldl1Ex' :: (Element (K1 i c a) -> Element (K1 i c a) -> Element (K1 i c a)) -> K1 i c a -> Element (K1 i c a) #

headEx :: K1 i c a -> Element (K1 i c a) #

lastEx :: K1 i c a -> Element (K1 i c a) #

unsafeHead :: K1 i c a -> Element (K1 i c a) #

unsafeLast :: K1 i c a -> Element (K1 i c a) #

maximumByEx :: (Element (K1 i c a) -> Element (K1 i c a) -> Ordering) -> K1 i c a -> Element (K1 i c a) #

minimumByEx :: (Element (K1 i c a) -> Element (K1 i c a) -> Ordering) -> K1 i c a -> Element (K1 i c a) #

oelem :: Element (K1 i c a) -> K1 i c a -> Bool #

onotElem :: Element (K1 i c a) -> K1 i c a -> Bool #

(Foldable f, Foldable g) => MonoFoldable (Compose f g a) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (Compose f g a) -> m) -> Compose f g a -> m #

ofoldr :: (Element (Compose f g a) -> b -> b) -> b -> Compose f g a -> b #

ofoldl' :: (a0 -> Element (Compose f g a) -> a0) -> a0 -> Compose f g a -> a0 #

otoList :: Compose f g a -> [Element (Compose f g a)] #

oall :: (Element (Compose f g a) -> Bool) -> Compose f g a -> Bool #

oany :: (Element (Compose f g a) -> Bool) -> Compose f g a -> Bool #

onull :: Compose f g a -> Bool #

olength :: Compose f g a -> Int #

olength64 :: Compose f g a -> Int64 #

ocompareLength :: Integral i => Compose f g a -> i -> Ordering #

otraverse_ :: Applicative f0 => (Element (Compose f g a) -> f0 b) -> Compose f g a -> f0 () #

ofor_ :: Applicative f0 => Compose f g a -> (Element (Compose f g a) -> f0 b) -> f0 () #

omapM_ :: Applicative m => (Element (Compose f g a) -> m ()) -> Compose f g a -> m () #

oforM_ :: Applicative m => Compose f g a -> (Element (Compose f g a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (Compose f g a) -> m a0) -> a0 -> Compose f g a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (Compose f g a) -> m) -> Compose f g a -> m #

ofoldr1Ex :: (Element (Compose f g a) -> Element (Compose f g a) -> Element (Compose f g a)) -> Compose f g a -> Element (Compose f g a) #

ofoldl1Ex' :: (Element (Compose f g a) -> Element (Compose f g a) -> Element (Compose f g a)) -> Compose f g a -> Element (Compose f g a) #

headEx :: Compose f g a -> Element (Compose f g a) #

lastEx :: Compose f g a -> Element (Compose f g a) #

unsafeHead :: Compose f g a -> Element (Compose f g a) #

unsafeLast :: Compose f g a -> Element (Compose f g a) #

maximumByEx :: (Element (Compose f g a) -> Element (Compose f g a) -> Ordering) -> Compose f g a -> Element (Compose f g a) #

minimumByEx :: (Element (Compose f g a) -> Element (Compose f g a) -> Ordering) -> Compose f g a -> Element (Compose f g a) #

oelem :: Element (Compose f g a) -> Compose f g a -> Bool #

onotElem :: Element (Compose f g a) -> Compose f g a -> Bool #

(Foldable f, Foldable g) => MonoFoldable ((f :.: g) a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element ((f :.: g) a) -> m) -> (f :.: g) a -> m #

ofoldr :: (Element ((f :.: g) a) -> b -> b) -> b -> (f :.: g) a -> b #

ofoldl' :: (a0 -> Element ((f :.: g) a) -> a0) -> a0 -> (f :.: g) a -> a0 #

otoList :: (f :.: g) a -> [Element ((f :.: g) a)] #

oall :: (Element ((f :.: g) a) -> Bool) -> (f :.: g) a -> Bool #

oany :: (Element ((f :.: g) a) -> Bool) -> (f :.: g) a -> Bool #

onull :: (f :.: g) a -> Bool #

olength :: (f :.: g) a -> Int #

olength64 :: (f :.: g) a -> Int64 #

ocompareLength :: Integral i => (f :.: g) a -> i -> Ordering #

otraverse_ :: Applicative f0 => (Element ((f :.: g) a) -> f0 b) -> (f :.: g) a -> f0 () #

ofor_ :: Applicative f0 => (f :.: g) a -> (Element ((f :.: g) a) -> f0 b) -> f0 () #

omapM_ :: Applicative m => (Element ((f :.: g) a) -> m ()) -> (f :.: g) a -> m () #

oforM_ :: Applicative m => (f :.: g) a -> (Element ((f :.: g) a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element ((f :.: g) a) -> m a0) -> a0 -> (f :.: g) a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element ((f :.: g) a) -> m) -> (f :.: g) a -> m #

ofoldr1Ex :: (Element ((f :.: g) a) -> Element ((f :.: g) a) -> Element ((f :.: g) a)) -> (f :.: g) a -> Element ((f :.: g) a) #

ofoldl1Ex' :: (Element ((f :.: g) a) -> Element ((f :.: g) a) -> Element ((f :.: g) a)) -> (f :.: g) a -> Element ((f :.: g) a) #

headEx :: (f :.: g) a -> Element ((f :.: g) a) #

lastEx :: (f :.: g) a -> Element ((f :.: g) a) #

unsafeHead :: (f :.: g) a -> Element ((f :.: g) a) #

unsafeLast :: (f :.: g) a -> Element ((f :.: g) a) #

maximumByEx :: (Element ((f :.: g) a) -> Element ((f :.: g) a) -> Ordering) -> (f :.: g) a -> Element ((f :.: g) a) #

minimumByEx :: (Element ((f :.: g) a) -> Element ((f :.: g) a) -> Ordering) -> (f :.: g) a -> Element ((f :.: g) a) #

oelem :: Element ((f :.: g) a) -> (f :.: g) a -> Bool #

onotElem :: Element ((f :.: g) a) -> (f :.: g) a -> Bool #

Foldable f => MonoFoldable (M1 i c f a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (M1 i c f a) -> m) -> M1 i c f a -> m #

ofoldr :: (Element (M1 i c f a) -> b -> b) -> b -> M1 i c f a -> b #

ofoldl' :: (a0 -> Element (M1 i c f a) -> a0) -> a0 -> M1 i c f a -> a0 #

otoList :: M1 i c f a -> [Element (M1 i c f a)] #

oall :: (Element (M1 i c f a) -> Bool) -> M1 i c f a -> Bool #

oany :: (Element (M1 i c f a) -> Bool) -> M1 i c f a -> Bool #

onull :: M1 i c f a -> Bool #

olength :: M1 i c f a -> Int #

olength64 :: M1 i c f a -> Int64 #

ocompareLength :: Integral i0 => M1 i c f a -> i0 -> Ordering #

otraverse_ :: Applicative f0 => (Element (M1 i c f a) -> f0 b) -> M1 i c f a -> f0 () #

ofor_ :: Applicative f0 => M1 i c f a -> (Element (M1 i c f a) -> f0 b) -> f0 () #

omapM_ :: Applicative m => (Element (M1 i c f a) -> m ()) -> M1 i c f a -> m () #

oforM_ :: Applicative m => M1 i c f a -> (Element (M1 i c f a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (M1 i c f a) -> m a0) -> a0 -> M1 i c f a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (M1 i c f a) -> m) -> M1 i c f a -> m #

ofoldr1Ex :: (Element (M1 i c f a) -> Element (M1 i c f a) -> Element (M1 i c f a)) -> M1 i c f a -> Element (M1 i c f a) #

ofoldl1Ex' :: (Element (M1 i c f a) -> Element (M1 i c f a) -> Element (M1 i c f a)) -> M1 i c f a -> Element (M1 i c f a) #

headEx :: M1 i c f a -> Element (M1 i c f a) #

lastEx :: M1 i c f a -> Element (M1 i c f a) #

unsafeHead :: M1 i c f a -> Element (M1 i c f a) #

unsafeLast :: M1 i c f a -> Element (M1 i c f a) #

maximumByEx :: (Element (M1 i c f a) -> Element (M1 i c f a) -> Ordering) -> M1 i c f a -> Element (M1 i c f a) #

minimumByEx :: (Element (M1 i c f a) -> Element (M1 i c f a) -> Ordering) -> M1 i c f a -> Element (M1 i c f a) #

oelem :: Element (M1 i c f a) -> M1 i c f a -> Bool #

onotElem :: Element (M1 i c f a) -> M1 i c f a -> Bool #

class MonoFunctor mono where #

Monomorphic containers that can be mapped over.

Minimal complete definition

Nothing

Methods

omap :: (Element mono -> Element mono) -> mono -> mono #

Map over a monomorphic container

Instances

Instances details
MonoFunctor ByteString 
Instance details

Defined in Data.MonoTraversable

MonoFunctor ByteString 
Instance details

Defined in Data.MonoTraversable

MonoFunctor Text 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element Text -> Element Text) -> Text -> Text #

MonoFunctor Text 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element Text -> Element Text) -> Text -> Text #

MonoFunctor (ZipList a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (ZipList a) -> Element (ZipList a)) -> ZipList a -> ZipList a #

MonoFunctor (Identity a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (Identity a) -> Element (Identity a)) -> Identity a -> Identity a #

MonoFunctor (NonEmpty a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (NonEmpty a) -> Element (NonEmpty a)) -> NonEmpty a -> NonEmpty a #

MonoFunctor (Par1 a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (Par1 a) -> Element (Par1 a)) -> Par1 a -> Par1 a #

MonoFunctor (IntMap a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (IntMap a) -> Element (IntMap a)) -> IntMap a -> IntMap a #

MonoFunctor (Seq a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (Seq a) -> Element (Seq a)) -> Seq a -> Seq a #

MonoFunctor (ViewL a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (ViewL a) -> Element (ViewL a)) -> ViewL a -> ViewL a #

MonoFunctor (ViewR a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (ViewR a) -> Element (ViewR a)) -> ViewR a -> ViewR a #

MonoFunctor (Tree a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (Tree a) -> Element (Tree a)) -> Tree a -> Tree a #

MonoFunctor (IO a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (IO a) -> Element (IO a)) -> IO a -> IO a #

MonoFunctor mono => MonoFunctor (NonNull mono) 
Instance details

Defined in Data.NonNull

Methods

omap :: (Element (NonNull mono) -> Element (NonNull mono)) -> NonNull mono -> NonNull mono #

MonoFunctor (Vector a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (Vector a) -> Element (Vector a)) -> Vector a -> Vector a #

Storable a => MonoFunctor (Vector a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (Vector a) -> Element (Vector a)) -> Vector a -> Vector a #

Unbox a => MonoFunctor (Vector a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (Vector a) -> Element (Vector a)) -> Vector a -> Vector a #

MonoFunctor (Maybe a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (Maybe a) -> Element (Maybe a)) -> Maybe a -> Maybe a #

MonoFunctor [a] 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element [a] -> Element [a]) -> [a] -> [a] #

Monad m => MonoFunctor (WrappedMonad m a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (WrappedMonad m a) -> Element (WrappedMonad m a)) -> WrappedMonad m a -> WrappedMonad m a #

MonoFunctor (Either a b) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (Either a b) -> Element (Either a b)) -> Either a b -> Either a b #

MonoFunctor (Proxy a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (Proxy a) -> Element (Proxy a)) -> Proxy a -> Proxy a #

MonoFunctor (Arg a b) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (Arg a b) -> Element (Arg a b)) -> Arg a b -> Arg a b #

MonoFunctor (U1 a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (U1 a) -> Element (U1 a)) -> U1 a -> U1 a #

MonoFunctor (V1 a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (V1 a) -> Element (V1 a)) -> V1 a -> V1 a #

MonoFunctor (Map k v) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (Map k v) -> Element (Map k v)) -> Map k v -> Map k v #

MonoFunctor mono => MonoFunctor (WrappedMono mono a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (WrappedMono mono a) -> Element (WrappedMono mono a)) -> WrappedMono mono a -> WrappedMono mono a #

Functor f => MonoFunctor (WrappedPoly f a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (WrappedPoly f a) -> Element (WrappedPoly f a)) -> WrappedPoly f a -> WrappedPoly f a #

Functor m => MonoFunctor (MaybeT m a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (MaybeT m a) -> Element (MaybeT m a)) -> MaybeT m a -> MaybeT m a #

MonoFunctor (HashMap k v) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (HashMap k v) -> Element (HashMap k v)) -> HashMap k v -> HashMap k v #

MonoFunctor (a, b) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (a, b) -> Element (a, b)) -> (a, b) -> (a, b) #

MonoFunctor (r -> a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (r -> a) -> Element (r -> a)) -> (r -> a) -> r -> a #

Arrow a => MonoFunctor (WrappedArrow a b c) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (WrappedArrow a b c) -> Element (WrappedArrow a b c)) -> WrappedArrow a b c -> WrappedArrow a b c #

MonoFunctor (Const m a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (Const m a) -> Element (Const m a)) -> Const m a -> Const m a #

Functor f => MonoFunctor (Rec1 f a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (Rec1 f a) -> Element (Rec1 f a)) -> Rec1 f a -> Rec1 f a #

Functor m => MonoFunctor (IdentityT m a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (IdentityT m a) -> Element (IdentityT m a)) -> IdentityT m a -> IdentityT m a #

Functor m => MonoFunctor (ReaderT r m a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (ReaderT r m a) -> Element (ReaderT r m a)) -> ReaderT r m a -> ReaderT r m a #

Functor m => MonoFunctor (StateT s m a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (StateT s m a) -> Element (StateT s m a)) -> StateT s m a -> StateT s m a #

Functor m => MonoFunctor (StateT s m a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (StateT s m a) -> Element (StateT s m a)) -> StateT s m a -> StateT s m a #

Functor m => MonoFunctor (WriterT w m a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (WriterT w m a) -> Element (WriterT w m a)) -> WriterT w m a -> WriterT w m a #

Functor m => MonoFunctor (WriterT w m a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (WriterT w m a) -> Element (WriterT w m a)) -> WriterT w m a -> WriterT w m a #

(Functor f, Functor g) => MonoFunctor (Product f g a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (Product f g a) -> Element (Product f g a)) -> Product f g a -> Product f g a #

(Functor f, Functor g) => MonoFunctor ((f :*: g) a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element ((f :*: g) a) -> Element ((f :*: g) a)) -> (f :*: g) a -> (f :*: g) a #

(Functor f, Functor g) => MonoFunctor ((f :+: g) a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element ((f :+: g) a) -> Element ((f :+: g) a)) -> (f :+: g) a -> (f :+: g) a #

MonoFunctor (K1 i c a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (K1 i c a) -> Element (K1 i c a)) -> K1 i c a -> K1 i c a #

Functor m => MonoFunctor (ContT r m a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (ContT r m a) -> Element (ContT r m a)) -> ContT r m a -> ContT r m a #

(Functor f, Functor g) => MonoFunctor (Compose f g a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (Compose f g a) -> Element (Compose f g a)) -> Compose f g a -> Compose f g a #

(Functor f, Functor g) => MonoFunctor ((f :.: g) a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element ((f :.: g) a) -> Element ((f :.: g) a)) -> (f :.: g) a -> (f :.: g) a #

Functor f => MonoFunctor (M1 i c f a)

Since: mono-traversable-1.0.11.0

Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (M1 i c f a) -> Element (M1 i c f a)) -> M1 i c f a -> M1 i c f a #

Functor m => MonoFunctor (RWST r w s m a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (RWST r w s m a) -> Element (RWST r w s m a)) -> RWST r w s m a -> RWST r w s m a #

Functor m => MonoFunctor (RWST r w s m a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (RWST r w s m a) -> Element (RWST r w s m a)) -> RWST r w s m a -> RWST r w s m a #

type family Element mono #

Type family for getting the type of the elements of a monomorphic container.

Instances

Instances details
type Element ByteString 
Instance details

Defined in Data.MonoTraversable

type Element ByteString 
Instance details

Defined in Data.MonoTraversable

type Element IntSet 
Instance details

Defined in Data.MonoTraversable

type Element Text 
Instance details

Defined in Data.MonoTraversable

type Element Text 
Instance details

Defined in Data.MonoTraversable

type Element (ZipList a) 
Instance details

Defined in Data.MonoTraversable

type Element (ZipList a) = a
type Element (Identity a) 
Instance details

Defined in Data.MonoTraversable

type Element (Identity a) = a
type Element (NonEmpty a) 
Instance details

Defined in Data.MonoTraversable

type Element (NonEmpty a) = a
type Element (Par1 a) 
Instance details

Defined in Data.MonoTraversable

type Element (Par1 a) = a
type Element (IntMap a) 
Instance details

Defined in Data.MonoTraversable

type Element (IntMap a) = a
type Element (Seq a) 
Instance details

Defined in Data.MonoTraversable

type Element (Seq a) = a
type Element (ViewL a) 
Instance details

Defined in Data.MonoTraversable

type Element (ViewL a) = a
type Element (ViewR a) 
Instance details

Defined in Data.MonoTraversable

type Element (ViewR a) = a
type Element (Set e) 
Instance details

Defined in Data.MonoTraversable

type Element (Set e) = e
type Element (Tree a) 
Instance details

Defined in Data.MonoTraversable

type Element (Tree a) = a
type Element (DList a) 
Instance details

Defined in Data.MonoTraversable.Instances

type Element (DList a) = a
type Element (IO a) 
Instance details

Defined in Data.MonoTraversable

type Element (IO a) = a
type Element (NonNull mono) 
Instance details

Defined in Data.NonNull

type Element (NonNull mono) = Element mono
type Element (HashSet e) 
Instance details

Defined in Data.MonoTraversable

type Element (HashSet e) = e
type Element (Vector a) 
Instance details

Defined in Data.MonoTraversable

type Element (Vector a) = a
type Element (Vector a) 
Instance details

Defined in Data.MonoTraversable

type Element (Vector a) = a
type Element (Vector a) 
Instance details

Defined in Data.MonoTraversable

type Element (Vector a) = a
type Element (Maybe a) 
Instance details

Defined in Data.MonoTraversable

type Element (Maybe a) = a
type Element [a] 
Instance details

Defined in Data.MonoTraversable

type Element [a] = a
type Element (WrappedMonad m a) 
Instance details

Defined in Data.MonoTraversable

type Element (WrappedMonad m a) = a
type Element (Either a b) 
Instance details

Defined in Data.MonoTraversable

type Element (Either a b) = b
type Element (Proxy a) 
Instance details

Defined in Data.MonoTraversable

type Element (Proxy a) = a
type Element (Arg a b) 
Instance details

Defined in Data.MonoTraversable

type Element (Arg a b) = b
type Element (U1 a) 
Instance details

Defined in Data.MonoTraversable

type Element (U1 a) = a
type Element (V1 a) 
Instance details

Defined in Data.MonoTraversable

type Element (V1 a) = a
type Element (Map k v) 
Instance details

Defined in Data.MonoTraversable

type Element (Map k v) = v
type Element (WrappedMono mono a) 
Instance details

Defined in Data.MonoTraversable

type Element (WrappedMono mono a) = Element mono
type Element (WrappedPoly f a) 
Instance details

Defined in Data.MonoTraversable

type Element (WrappedPoly f a) = a
type Element (MaybeApply f a) 
Instance details

Defined in Data.MonoTraversable.Instances

type Element (MaybeApply f a) = a
type Element (WrappedApplicative f a) 
Instance details

Defined in Data.MonoTraversable.Instances

type Element (MaybeT m a) 
Instance details

Defined in Data.MonoTraversable

type Element (MaybeT m a) = a
type Element (HashMap k v) 
Instance details

Defined in Data.MonoTraversable

type Element (HashMap k v) = v
type Element (a, b) 
Instance details

Defined in Data.MonoTraversable

type Element (a, b) = b
type Element (r -> a) 
Instance details

Defined in Data.MonoTraversable

type Element (r -> a) = a
type Element (WrappedArrow a b c) 
Instance details

Defined in Data.MonoTraversable

type Element (WrappedArrow a b c) = c
type Element (Const m a) 
Instance details

Defined in Data.MonoTraversable

type Element (Const m a) = a
type Element (Rec1 f a) 
Instance details

Defined in Data.MonoTraversable

type Element (Rec1 f a) = a
type Element (EnvT e w a) 
Instance details

Defined in Data.MonoTraversable.Instances

type Element (EnvT e w a) = a
type Element (StoreT s w a) 
Instance details

Defined in Data.MonoTraversable.Instances

type Element (StoreT s w a) = a
type Element (TracedT m w a) 
Instance details

Defined in Data.MonoTraversable.Instances

type Element (TracedT m w a) = a
type Element (Static f a b) 
Instance details

Defined in Data.MonoTraversable.Instances

type Element (Static f a b) = b
type Element (IdentityT m a) 
Instance details

Defined in Data.MonoTraversable

type Element (IdentityT m a) = a
type Element (ReaderT r m a) 
Instance details

Defined in Data.MonoTraversable

type Element (ReaderT r m a) = a
type Element (StateT s m a) 
Instance details

Defined in Data.MonoTraversable

type Element (StateT s m a) = a
type Element (StateT s m a) 
Instance details

Defined in Data.MonoTraversable

type Element (StateT s m a) = a
type Element (WriterT w m a) 
Instance details

Defined in Data.MonoTraversable

type Element (WriterT w m a) = a
type Element (WriterT w m a) 
Instance details

Defined in Data.MonoTraversable

type Element (WriterT w m a) = a
type Element (Product f g a) 
Instance details

Defined in Data.MonoTraversable

type Element (Product f g a) = a
type Element ((f :*: g) a) 
Instance details

Defined in Data.MonoTraversable

type Element ((f :*: g) a) = a
type Element ((f :+: g) a) 
Instance details

Defined in Data.MonoTraversable

type Element ((f :+: g) a) = a
type Element (K1 i c a) 
Instance details

Defined in Data.MonoTraversable

type Element (K1 i c a) = a
type Element (Cokleisli w a b) 
Instance details

Defined in Data.MonoTraversable.Instances

type Element (Cokleisli w a b) = b
type Element (ContT r m a) 
Instance details

Defined in Data.MonoTraversable

type Element (ContT r m a) = a
type Element (Compose f g a) 
Instance details

Defined in Data.MonoTraversable

type Element (Compose f g a) = a
type Element ((f :.: g) a) 
Instance details

Defined in Data.MonoTraversable

type Element ((f :.: g) a) = a
type Element (M1 i c f a) 
Instance details

Defined in Data.MonoTraversable

type Element (M1 i c f a) = a
type Element (RWST r w s m a) 
Instance details

Defined in Data.MonoTraversable

type Element (RWST r w s m a) = a
type Element (RWST r w s m a) 
Instance details

Defined in Data.MonoTraversable

type Element (RWST r w s m a) = a

class (Textual textual, IsSequence binary) => Utf8 textual binary | textual -> binary, binary -> textual where #

Textual data which can be encoded to and decoded from UTF8.

Since: mono-traversable-1.0.0

Methods

encodeUtf8 :: textual -> binary #

Encode from textual to binary using UTF-8 encoding

Since: mono-traversable-1.0.0

decodeUtf8 :: binary -> textual #

Note that this function is required to be pure. In the case of a decoding error, Unicode replacement characters must be used.

Since: mono-traversable-1.0.0

Instances

Instances details
Utf8 Text ByteString 
Instance details

Defined in Data.Sequences

Utf8 Text ByteString 
Instance details

Defined in Data.Sequences

(c ~ Char, w ~ Word8) => Utf8 [c] [w] 
Instance details

Defined in Data.Sequences

Methods

encodeUtf8 :: [c] -> [w] #

decodeUtf8 :: [w] -> [c] #

class (IsSequence lazy, IsSequence strict) => LazySequence lazy strict | lazy -> strict, strict -> lazy where #

Lazy sequences containing strict chunks of data.

Since: mono-traversable-1.0.0

Methods

toChunks :: lazy -> [strict] #

fromChunks :: [strict] -> lazy #

toStrict :: lazy -> strict #

fromStrict :: strict -> lazy #

class (IsSequence t, IsString t, Element t ~ Char) => Textual t where #

A typeclass for sequences whose elements are Chars.

Minimal complete definition

words, unwords, lines, unlines, toLower, toUpper, toCaseFold

Methods

words :: t -> [t] #

Break up a textual sequence into a list of words, which were delimited by white space.

> words "abc  def ghi"
["abc","def","ghi"]

unwords :: (Element seq ~ t, MonoFoldable seq) => seq -> t #

Join a list of textual sequences using seperating spaces.

> unwords ["abc","def","ghi"]
"abc def ghi"

lines :: t -> [t] #

Break up a textual sequence at newline characters.

> lines "hello\nworld"
["hello","world"]

unlines :: (Element seq ~ t, MonoFoldable seq) => seq -> t #

Join a list of textual sequences using newlines.

> unlines ["abc","def","ghi"]
"abc\ndef\nghi"

toLower :: t -> t #

Convert a textual sequence to lower-case.

> toLower "HELLO WORLD"
"hello world"

toUpper :: t -> t #

Convert a textual sequence to upper-case.

> toUpper "hello world"
"HELLO WORLD"

toCaseFold :: t -> t #

Convert a textual sequence to folded-case.

Slightly different from toLower, see Data.Text.toCaseFold

breakWord :: t -> (t, t) #

Split a textual sequence into two parts, split at the first space.

> breakWord "hello world"
("hello","world")

breakLine :: t -> (t, t) #

Split a textual sequence into two parts, split at the newline.

> breakLine "abc\ndef"
("abc","def")

Instances

Instances details
Textual Text 
Instance details

Defined in Data.Sequences

Methods

words :: Text -> [Text] #

unwords :: (Element seq ~ Text, MonoFoldable seq) => seq -> Text #

lines :: Text -> [Text] #

unlines :: (Element seq ~ Text, MonoFoldable seq) => seq -> Text #

toLower :: Text -> Text #

toUpper :: Text -> Text #

toCaseFold :: Text -> Text #

breakWord :: Text -> (Text, Text) #

breakLine :: Text -> (Text, Text) #

Textual Text 
Instance details

Defined in Data.Sequences

Methods

words :: Text -> [Text] #

unwords :: (Element seq ~ Text, MonoFoldable seq) => seq -> Text #

lines :: Text -> [Text] #

unlines :: (Element seq ~ Text, MonoFoldable seq) => seq -> Text #

toLower :: Text -> Text #

toUpper :: Text -> Text #

toCaseFold :: Text -> Text #

breakWord :: Text -> (Text, Text) #

breakLine :: Text -> (Text, Text) #

c ~ Char => Textual [c] 
Instance details

Defined in Data.Sequences

Methods

words :: [c] -> [[c]] #

unwords :: (Element seq ~ [c], MonoFoldable seq) => seq -> [c] #

lines :: [c] -> [[c]] #

unlines :: (Element seq ~ [c], MonoFoldable seq) => seq -> [c] #

toLower :: [c] -> [c] #

toUpper :: [c] -> [c] #

toCaseFold :: [c] -> [c] #

breakWord :: [c] -> ([c], [c]) #

breakLine :: [c] -> ([c], [c]) #

class (Monoid seq, MonoTraversable seq, SemiSequence seq, MonoPointed seq) => IsSequence seq where #

Sequence Laws:

fromList . otoList = id
fromList (x <> y) = fromList x <> fromList y
otoList (fromList x <> fromList y) = x <> y

Minimal complete definition

Nothing

Methods

fromList :: [Element seq] -> seq #

Convert a list to a sequence.

> fromList [a, b, c] :: Text
"abc"

lengthIndex :: seq -> Index seq #

lengthIndex returns the length of a sequence as Index seq.

Since: mono-traversable-1.0.2

break :: (Element seq -> Bool) -> seq -> (seq, seq) #

break applies a predicate to a sequence, and returns a tuple where the first element is the longest prefix (possibly empty) of elements that do not satisfy the predicate. The second element of the tuple is the remainder of the sequence.

break p is equivalent to span (not . p)

> break (> 3) (fromList [1,2,3,4,1,2,3,4] :: Vector Int)
(fromList [1,2,3],fromList [4,1,2,3,4])

> break (< z) (fromList "abc" :: Text)
("","abc")

> break (> z) (fromList "abc" :: Text)
("abc","")

span :: (Element seq -> Bool) -> seq -> (seq, seq) #

span applies a predicate to a sequence, and returns a tuple where the first element is the longest prefix (possibly empty) that does satisfy the predicate. The second element of the tuple is the remainder of the sequence.

span p xs is equivalent to (takeWhile p xs, dropWhile p xs)

> span (< 3) (fromList [1,2,3,4,1,2,3,4] :: Vector Int)
(fromList [1,2],fromList [3,4,1,2,3,4])

> span (< z) (fromList "abc" :: Text)
("abc","")

> span (< 0) 1,2,3

dropWhile :: (Element seq -> Bool) -> seq -> seq #

dropWhile returns the suffix remaining after takeWhile.

> dropWhile (< 3) [1,2,3,4,5,1,2,3]
[3,4,5,1,2,3]

> dropWhile (< z) (fromList "abc" :: Text)
""

takeWhile :: (Element seq -> Bool) -> seq -> seq #

takeWhile applies a predicate to a sequence, and returns the longest prefix (possibly empty) of the sequence of elements that satisfy the predicate.

> takeWhile (< 3) [1,2,3,4,5,1,2,3]
[1,2]

> takeWhile (< z) (fromList "abc" :: Text)
"abc"

splitAt :: Index seq -> seq -> (seq, seq) #

splitAt n se returns a tuple where the first element is the prefix of the sequence se with length n, and the second element is the remainder of the sequence.

> splitAt 6 "Hello world!"
("Hello ","world!")

> splitAt 3 (fromList [1,2,3,4,5] :: Vector Int)
(fromList [1,2,3],fromList [4,5])

unsafeSplitAt :: Index seq -> seq -> (seq, seq) #

Equivalent to splitAt.

take :: Index seq -> seq -> seq #

take n returns the prefix of a sequence of length n, or the sequence itself if n > olength seq.

> take 3 "abcdefg"
"abc"
> take 4 (fromList [1,2,3,4,5,6] :: Vector Int)
fromList [1,2,3,4]

unsafeTake :: Index seq -> seq -> seq #

Equivalent to take.

drop :: Index seq -> seq -> seq #

drop n returns the suffix of a sequence after the first n elements, or an empty sequence if n > olength seq.

> drop 3 "abcdefg"
"defg"
> drop 4 (fromList [1,2,3,4,5,6] :: Vector Int)
fromList [5,6]

unsafeDrop :: Index seq -> seq -> seq #

Equivalent to drop

dropEnd :: Index seq -> seq -> seq #

Same as drop but drops from the end of the sequence instead.

> dropEnd 3 "abcdefg"
"abcd"
> dropEnd 4 (fromList [1,2,3,4,5,6] :: Vector Int)
fromList [1,2]

Since: mono-traversable-1.0.4.0

partition :: (Element seq -> Bool) -> seq -> (seq, seq) #

partition takes a predicate and a sequence and returns the pair of sequences of elements which do and do not satisfy the predicate.

partition p se = (filter p se, filter (not . p) se)

uncons :: seq -> Maybe (Element seq, seq) #

uncons returns the tuple of the first element of a sequence and the rest of the sequence, or Nothing if the sequence is empty.

> uncons (fromList [1,2,3,4] :: Vector Int)
Just (1,fromList [2,3,4])

> uncons ([] :: [Int])
Nothing

unsnoc :: seq -> Maybe (seq, Element seq) #

unsnoc returns the tuple of the init of a sequence and the last element, or Nothing if the sequence is empty.

> unsnoc (fromList [1,2,3,4] :: Vector Int)
Just (fromList [1,2,3],4)

> unsnoc ([] :: [Int])
Nothing

filter :: (Element seq -> Bool) -> seq -> seq #

filter given a predicate returns a sequence of all elements that satisfy the predicate.

> filter (< 5) [1 .. 10]
[1,2,3,4]

filterM :: Monad m => (Element seq -> m Bool) -> seq -> m seq #

The monadic version of filter.

replicate :: Index seq -> Element seq -> seq #

replicate n x is a sequence of length n with x as the value of every element.

> replicate 10 a :: Text
"aaaaaaaaaa"

replicateM :: Monad m => Index seq -> m (Element seq) -> m seq #

The monadic version of replicateM.

groupBy :: (Element seq -> Element seq -> Bool) -> seq -> [seq] #

group takes a sequence and returns a list of sequences such that the concatenation of the result is equal to the argument. Each subsequence in the result contains only equal elements, using the supplied equality test.

> groupBy (==) Mississippi
[M,"i","ss","i","ss","i","pp","i"]

groupAllOn :: Eq b => (Element seq -> b) -> seq -> [seq] #

Similar to standard groupBy, but operates on the whole collection, not just the consecutive items.

subsequences :: seq -> [seq] #

subsequences returns a list of all subsequences of the argument.

> subsequences "abc"
["","a","b","ab","c","ac","bc","abc"]

permutations :: seq -> [seq] #

permutations returns a list of all permutations of the argument.

> permutations "abc"
["abc","bac","cba","bca","cab","acb"]

tailEx :: seq -> seq #

Unsafe

Get the tail of a sequence, throw an exception if the sequence is empty.

> tailEx [1,2,3]
[2,3]

tailMay :: seq -> Maybe seq #

Safe version of tailEx.

Returns Nothing instead of throwing an exception when encountering an empty monomorphic container.

Since: mono-traversable-1.0.0

initEx :: seq -> seq #

Unsafe

Get the init of a sequence, throw an exception if the sequence is empty.

> initEx [1,2,3]
[1,2]

initMay :: seq -> Maybe seq #

Safe version of initEx.

Returns Nothing instead of throwing an exception when encountering an empty monomorphic container.

Since: mono-traversable-1.0.0

unsafeTail :: seq -> seq #

Equivalent to tailEx.

unsafeInit :: seq -> seq #

Equivalent to initEx.

index :: seq -> Index seq -> Maybe (Element seq) #

Get the element of a sequence at a certain index, returns Nothing if that index does not exist.

> index (fromList [1,2,3] :: Vector Int) 1
Just 2
> index (fromList [1,2,3] :: Vector Int) 4
Nothing

indexEx :: seq -> Index seq -> Element seq #

Unsafe

Get the element of a sequence at a certain index, throws an exception if the index does not exist.

unsafeIndex :: seq -> Index seq -> Element seq #

Equivalent to indexEx.

splitWhen :: (Element seq -> Bool) -> seq -> [seq] #

splitWhen splits a sequence into components delimited by separators, where the predicate returns True for a separator element. The resulting components do not contain the separators. Two adjacent separators result in an empty component in the output. The number of resulting components is greater by one than number of separators.

Since 0.9.3

Instances

Instances details
IsSequence ByteString 
Instance details

Defined in Data.Sequences

Methods

fromList :: [Element ByteString] -> ByteString #

lengthIndex :: ByteString -> Index ByteString #

break :: (Element ByteString -> Bool) -> ByteString -> (ByteString, ByteString) #

span :: (Element ByteString -> Bool) -> ByteString -> (ByteString, ByteString) #

dropWhile :: (Element ByteString -> Bool) -> ByteString -> ByteString #

takeWhile :: (Element ByteString -> Bool) -> ByteString -> ByteString #

splitAt :: Index ByteString -> ByteString -> (ByteString, ByteString) #

unsafeSplitAt :: Index ByteString -> ByteString -> (ByteString, ByteString) #

take :: Index ByteString -> ByteString -> ByteString #

unsafeTake :: Index ByteString -> ByteString -> ByteString #

drop :: Index ByteString -> ByteString -> ByteString #

unsafeDrop :: Index ByteString -> ByteString -> ByteString #

dropEnd :: Index ByteString -> ByteString -> ByteString #

partition :: (Element ByteString -> Bool) -> ByteString -> (ByteString, ByteString) #

uncons :: ByteString -> Maybe (Element ByteString, ByteString) #

unsnoc :: ByteString -> Maybe (ByteString, Element ByteString) #

filter :: (Element ByteString -> Bool) -> ByteString -> ByteString #

filterM :: Monad m => (Element ByteString -> m Bool) -> ByteString -> m ByteString #

replicate :: Index ByteString -> Element ByteString -> ByteString #

replicateM :: Monad m => Index ByteString -> m (Element ByteString) -> m ByteString #

groupBy :: (Element ByteString -> Element ByteString -> Bool) -> ByteString -> [ByteString] #

groupAllOn :: Eq b => (Element ByteString -> b) -> ByteString -> [ByteString] #

subsequences :: ByteString -> [ByteString] #

permutations :: ByteString -> [ByteString] #

tailEx :: ByteString -> ByteString #

tailMay :: ByteString -> Maybe ByteString #

initEx :: ByteString -> ByteString #

initMay :: ByteString -> Maybe ByteString #

unsafeTail :: ByteString -> ByteString #

unsafeInit :: ByteString -> ByteString #

index :: ByteString -> Index ByteString -> Maybe (Element ByteString) #

indexEx :: ByteString -> Index ByteString -> Element ByteString #

unsafeIndex :: ByteString -> Index ByteString -> Element ByteString #

splitWhen :: (Element ByteString -> Bool) -> ByteString -> [ByteString] #

IsSequence ByteString 
Instance details

Defined in Data.Sequences

Methods

fromList :: [Element ByteString] -> ByteString #

lengthIndex :: ByteString -> Index ByteString #

break :: (Element ByteString -> Bool) -> ByteString -> (ByteString, ByteString) #

span :: (Element ByteString -> Bool) -> ByteString -> (ByteString, ByteString) #

dropWhile :: (Element ByteString -> Bool) -> ByteString -> ByteString #

takeWhile :: (Element ByteString -> Bool) -> ByteString -> ByteString #

splitAt :: Index ByteString -> ByteString -> (ByteString, ByteString) #

unsafeSplitAt :: Index ByteString -> ByteString -> (ByteString, ByteString) #

take :: Index ByteString -> ByteString -> ByteString #

unsafeTake :: Index ByteString -> ByteString -> ByteString #

drop :: Index ByteString -> ByteString -> ByteString #

unsafeDrop :: Index ByteString -> ByteString -> ByteString #

dropEnd :: Index ByteString -> ByteString -> ByteString #

partition :: (Element ByteString -> Bool) -> ByteString -> (ByteString, ByteString) #

uncons :: ByteString -> Maybe (Element ByteString, ByteString) #

unsnoc :: ByteString -> Maybe (ByteString, Element ByteString) #

filter :: (Element ByteString -> Bool) -> ByteString -> ByteString #

filterM :: Monad m => (Element ByteString -> m Bool) -> ByteString -> m ByteString #

replicate :: Index ByteString -> Element ByteString -> ByteString #

replicateM :: Monad m => Index ByteString -> m (Element ByteString) -> m ByteString #

groupBy :: (Element ByteString -> Element ByteString -> Bool) -> ByteString -> [ByteString] #

groupAllOn :: Eq b => (Element ByteString -> b) -> ByteString -> [ByteString] #

subsequences :: ByteString -> [ByteString] #

permutations :: ByteString -> [ByteString] #

tailEx :: ByteString -> ByteString #

tailMay :: ByteString -> Maybe ByteString #

initEx :: ByteString -> ByteString #

initMay :: ByteString -> Maybe ByteString #

unsafeTail :: ByteString -> ByteString #

unsafeInit :: ByteString -> ByteString #

index :: ByteString -> Index ByteString -> Maybe (Element ByteString) #

indexEx :: ByteString -> Index ByteString -> Element ByteString #

unsafeIndex :: ByteString -> Index ByteString -> Element ByteString #

splitWhen :: (Element ByteString -> Bool) -> ByteString -> [ByteString] #

IsSequence Text 
Instance details

Defined in Data.Sequences

Methods

fromList :: [Element Text] -> Text #

lengthIndex :: Text -> Index Text #

break :: (Element Text -> Bool) -> Text -> (Text, Text) #

span :: (Element Text -> Bool) -> Text -> (Text, Text) #

dropWhile :: (Element Text -> Bool) -> Text -> Text #

takeWhile :: (Element Text -> Bool) -> Text -> Text #

splitAt :: Index Text -> Text -> (Text, Text) #

unsafeSplitAt :: Index Text -> Text -> (Text, Text) #

take :: Index Text -> Text -> Text #

unsafeTake :: Index Text -> Text -> Text #

drop :: Index Text -> Text -> Text #

unsafeDrop :: Index Text -> Text -> Text #

dropEnd :: Index Text -> Text -> Text #

partition :: (Element Text -> Bool) -> Text -> (Text, Text) #

uncons :: Text -> Maybe (Element Text, Text) #

unsnoc :: Text -> Maybe (Text, Element Text) #

filter :: (Element Text -> Bool) -> Text -> Text #

filterM :: Monad m => (Element Text -> m Bool) -> Text -> m Text #

replicate :: Index Text -> Element Text -> Text #

replicateM :: Monad m => Index Text -> m (Element Text) -> m Text #

groupBy :: (Element Text -> Element Text -> Bool) -> Text -> [Text] #

groupAllOn :: Eq b => (Element Text -> b) -> Text -> [Text] #

subsequences :: Text -> [Text] #

permutations :: Text -> [Text] #

tailEx :: Text -> Text #

tailMay :: Text -> Maybe Text #

initEx :: Text -> Text #

initMay :: Text -> Maybe Text #

unsafeTail :: Text -> Text #

unsafeInit :: Text -> Text #

index :: Text -> Index Text -> Maybe (Element Text) #

indexEx :: Text -> Index Text -> Element Text #

unsafeIndex :: Text -> Index Text -> Element Text #

splitWhen :: (Element Text -> Bool) -> Text -> [Text] #

IsSequence Text 
Instance details

Defined in Data.Sequences

Methods

fromList :: [Element Text] -> Text #

lengthIndex :: Text -> Index Text #

break :: (Element Text -> Bool) -> Text -> (Text, Text) #

span :: (Element Text -> Bool) -> Text -> (Text, Text) #

dropWhile :: (Element Text -> Bool) -> Text -> Text #

takeWhile :: (Element Text -> Bool) -> Text -> Text #

splitAt :: Index Text -> Text -> (Text, Text) #

unsafeSplitAt :: Index Text -> Text -> (Text, Text) #

take :: Index Text -> Text -> Text #

unsafeTake :: Index Text -> Text -> Text #

drop :: Index Text -> Text -> Text #

unsafeDrop :: Index Text -> Text -> Text #

dropEnd :: Index Text -> Text -> Text #

partition :: (Element Text -> Bool) -> Text -> (Text, Text) #

uncons :: Text -> Maybe (Element Text, Text) #

unsnoc :: Text -> Maybe (Text, Element Text) #

filter :: (Element Text -> Bool) -> Text -> Text #

filterM :: Monad m => (Element Text -> m Bool) -> Text -> m Text #

replicate :: Index Text -> Element Text -> Text #

replicateM :: Monad m => Index Text -> m (Element Text) -> m Text #

groupBy :: (Element Text -> Element Text -> Bool) -> Text -> [Text] #

groupAllOn :: Eq b => (Element Text -> b) -> Text -> [Text] #

subsequences :: Text -> [Text] #

permutations :: Text -> [Text] #

tailEx :: Text -> Text #

tailMay :: Text -> Maybe Text #

initEx :: Text -> Text #

initMay :: Text -> Maybe Text #

unsafeTail :: Text -> Text #

unsafeInit :: Text -> Text #

index :: Text -> Index Text -> Maybe (Element Text) #

indexEx :: Text -> Index Text -> Element Text #

unsafeIndex :: Text -> Index Text -> Element Text #

splitWhen :: (Element Text -> Bool) -> Text -> [Text] #

IsSequence (Seq a) 
Instance details

Defined in Data.Sequences

Methods

fromList :: [Element (Seq a)] -> Seq a #

lengthIndex :: Seq a -> Index (Seq a) #

break :: (Element (Seq a) -> Bool) -> Seq a -> (Seq a, Seq a) #

span :: (Element (Seq a) -> Bool) -> Seq a -> (Seq a, Seq a) #

dropWhile :: (Element (Seq a) -> Bool) -> Seq a -> Seq a #

takeWhile :: (Element (Seq a) -> Bool) -> Seq a -> Seq a #

splitAt :: Index (Seq a) -> Seq a -> (Seq a, Seq a) #

unsafeSplitAt :: Index (Seq a) -> Seq a -> (Seq a, Seq a) #

take :: Index (Seq a) -> Seq a -> Seq a #

unsafeTake :: Index (Seq a) -> Seq a -> Seq a #

drop :: Index (Seq a) -> Seq a -> Seq a #

unsafeDrop :: Index (Seq a) -> Seq a -> Seq a #

dropEnd :: Index (Seq a) -> Seq a -> Seq a #

partition :: (Element (Seq a) -> Bool) -> Seq a -> (Seq a, Seq a) #

uncons :: Seq a -> Maybe (Element (Seq a), Seq a) #

unsnoc :: Seq a -> Maybe (Seq a, Element (Seq a)) #

filter :: (Element (Seq a) -> Bool) -> Seq a -> Seq a #

filterM :: Monad m => (Element (Seq a) -> m Bool) -> Seq a -> m (Seq a) #

replicate :: Index (Seq a) -> Element (Seq a) -> Seq a #

replicateM :: Monad m => Index (Seq a) -> m (Element (Seq a)) -> m (Seq a) #

groupBy :: (Element (Seq a) -> Element (Seq a) -> Bool) -> Seq a -> [Seq a] #

groupAllOn :: Eq b => (Element (Seq a) -> b) -> Seq a -> [Seq a] #

subsequences :: Seq a -> [Seq a] #

permutations :: Seq a -> [Seq a] #

tailEx :: Seq a -> Seq a #

tailMay :: Seq a -> Maybe (Seq a) #

initEx :: Seq a -> Seq a #

initMay :: Seq a -> Maybe (Seq a) #

unsafeTail :: Seq a -> Seq a #

unsafeInit :: Seq a -> Seq a #

index :: Seq a -> Index (Seq a) -> Maybe (Element (Seq a)) #

indexEx :: Seq a -> Index (Seq a) -> Element (Seq a) #

unsafeIndex :: Seq a -> Index (Seq a) -> Element (Seq a) #

splitWhen :: (Element (Seq a) -> Bool) -> Seq a -> [Seq a] #

IsSequence (Vector a) 
Instance details

Defined in Data.Sequences

Methods

fromList :: [Element (Vector a)] -> Vector a #

lengthIndex :: Vector a -> Index (Vector a) #

break :: (Element (Vector a) -> Bool) -> Vector a -> (Vector a, Vector a) #

span :: (Element (Vector a) -> Bool) -> Vector a -> (Vector a, Vector a) #

dropWhile :: (Element (Vector a) -> Bool) -> Vector a -> Vector a #

takeWhile :: (Element (Vector a) -> Bool) -> Vector a -> Vector a #

splitAt :: Index (Vector a) -> Vector a -> (Vector a, Vector a) #

unsafeSplitAt :: Index (Vector a) -> Vector a -> (Vector a, Vector a) #

take :: Index (Vector a) -> Vector a -> Vector a #

unsafeTake :: Index (Vector a) -> Vector a -> Vector a #

drop :: Index (Vector a) -> Vector a -> Vector a #

unsafeDrop :: Index (Vector a) -> Vector a -> Vector a #

dropEnd :: Index (Vector a) -> Vector a -> Vector a #

partition :: (Element (Vector a) -> Bool) -> Vector a -> (Vector a, Vector a) #

uncons :: Vector a -> Maybe (Element (Vector a), Vector a) #

unsnoc :: Vector a -> Maybe (Vector a, Element (Vector a)) #

filter :: (Element (Vector a) -> Bool) -> Vector a -> Vector a #

filterM :: Monad m => (Element (Vector a) -> m Bool) -> Vector a -> m (Vector a) #

replicate :: Index (Vector a) -> Element (Vector a) -> Vector a #

replicateM :: Monad m => Index (Vector a) -> m (Element (Vector a)) -> m (Vector a) #

groupBy :: (Element (Vector a) -> Element (Vector a) -> Bool) -> Vector a -> [Vector a] #

groupAllOn :: Eq b => (Element (Vector a) -> b) -> Vector a -> [Vector a] #

subsequences :: Vector a -> [Vector a] #

permutations :: Vector a -> [Vector a] #

tailEx :: Vector a -> Vector a #

tailMay :: Vector a -> Maybe (Vector a) #

initEx :: Vector a -> Vector a #

initMay :: Vector a -> Maybe (Vector a) #

unsafeTail :: Vector a -> Vector a #

unsafeInit :: Vector a -> Vector a #

index :: Vector a -> Index (Vector a) -> Maybe (Element (Vector a)) #

indexEx :: Vector a -> Index (Vector a) -> Element (Vector a) #

unsafeIndex :: Vector a -> Index (Vector a) -> Element (Vector a) #

splitWhen :: (Element (Vector a) -> Bool) -> Vector a -> [Vector a] #

Storable a => IsSequence (Vector a) 
Instance details

Defined in Data.Sequences

Methods

fromList :: [Element (Vector a)] -> Vector a #

lengthIndex :: Vector a -> Index (Vector a) #

break :: (Element (Vector a) -> Bool) -> Vector a -> (Vector a, Vector a) #

span :: (Element (Vector a) -> Bool) -> Vector a -> (Vector a, Vector a) #

dropWhile :: (Element (Vector a) -> Bool) -> Vector a -> Vector a #

takeWhile :: (Element (Vector a) -> Bool) -> Vector a -> Vector a #

splitAt :: Index (Vector a) -> Vector a -> (Vector a, Vector a) #

unsafeSplitAt :: Index (Vector a) -> Vector a -> (Vector a, Vector a) #

take :: Index (Vector a) -> Vector a -> Vector a #

unsafeTake :: Index (Vector a) -> Vector a -> Vector a #

drop :: Index (Vector a) -> Vector a -> Vector a #

unsafeDrop :: Index (Vector a) -> Vector a -> Vector a #

dropEnd :: Index (Vector a) -> Vector a -> Vector a #

partition :: (Element (Vector a) -> Bool) -> Vector a -> (Vector a, Vector a) #

uncons :: Vector a -> Maybe (Element (Vector a), Vector a) #

unsnoc :: Vector a -> Maybe (Vector a, Element (Vector a)) #

filter :: (Element (Vector a) -> Bool) -> Vector a -> Vector a #

filterM :: Monad m => (Element (Vector a) -> m Bool) -> Vector a -> m (Vector a) #

replicate :: Index (Vector a) -> Element (Vector a) -> Vector a #

replicateM :: Monad m => Index (Vector a) -> m (Element (Vector a)) -> m (Vector a) #

groupBy :: (Element (Vector a) -> Element (Vector a) -> Bool) -> Vector a -> [Vector a] #

groupAllOn :: Eq b => (Element (Vector a) -> b) -> Vector a -> [Vector a] #

subsequences :: Vector a -> [Vector a] #

permutations :: Vector a -> [Vector a] #

tailEx :: Vector a -> Vector a #

tailMay :: Vector a -> Maybe (Vector a) #

initEx :: Vector a -> Vector a #

initMay :: Vector a -> Maybe (Vector a) #

unsafeTail :: Vector a -> Vector a #

unsafeInit :: Vector a -> Vector a #

index :: Vector a -> Index (Vector a) -> Maybe (Element (Vector a)) #

indexEx :: Vector a -> Index (Vector a) -> Element (Vector a) #

unsafeIndex :: Vector a -> Index (Vector a) -> Element (Vector a) #

splitWhen :: (Element (Vector a) -> Bool) -> Vector a -> [Vector a] #

Unbox a => IsSequence (Vector a) 
Instance details

Defined in Data.Sequences

Methods

fromList :: [Element (Vector a)] -> Vector a #

lengthIndex :: Vector a -> Index (Vector a) #

break :: (Element (Vector a) -> Bool) -> Vector a -> (Vector a, Vector a) #

span :: (Element (Vector a) -> Bool) -> Vector a -> (Vector a, Vector a) #

dropWhile :: (Element (Vector a) -> Bool) -> Vector a -> Vector a #

takeWhile :: (Element (Vector a) -> Bool) -> Vector a -> Vector a #

splitAt :: Index (Vector a) -> Vector a -> (Vector a, Vector a) #

unsafeSplitAt :: Index (Vector a) -> Vector a -> (Vector a, Vector a) #

take :: Index (Vector a) -> Vector a -> Vector a #

unsafeTake :: Index (Vector a) -> Vector a -> Vector a #

drop :: Index (Vector a) -> Vector a -> Vector a #

unsafeDrop :: Index (Vector a) -> Vector a -> Vector a #

dropEnd :: Index (Vector a) -> Vector a -> Vector a #

partition :: (Element (Vector a) -> Bool) -> Vector a -> (Vector a, Vector a) #

uncons :: Vector a -> Maybe (Element (Vector a), Vector a) #

unsnoc :: Vector a -> Maybe (Vector a, Element (Vector a)) #

filter :: (Element (Vector a) -> Bool) -> Vector a -> Vector a #

filterM :: Monad m => (Element (Vector a) -> m Bool) -> Vector a -> m (Vector a) #

replicate :: Index (Vector a) -> Element (Vector a) -> Vector a #

replicateM :: Monad m => Index (Vector a) -> m (Element (Vector a)) -> m (Vector a) #

groupBy :: (Element (Vector a) -> Element (Vector a) -> Bool) -> Vector a -> [Vector a] #

groupAllOn :: Eq b => (Element (Vector a) -> b) -> Vector a -> [Vector a] #

subsequences :: Vector a -> [Vector a] #

permutations :: Vector a -> [Vector a] #

tailEx :: Vector a -> Vector a #

tailMay :: Vector a -> Maybe (Vector a) #

initEx :: Vector a -> Vector a #

initMay :: Vector a -> Maybe (Vector a) #

unsafeTail :: Vector a -> Vector a #

unsafeInit :: Vector a -> Vector a #

index :: Vector a -> Index (Vector a) -> Maybe (Element (Vector a)) #

indexEx :: Vector a -> Index (Vector a) -> Element (Vector a) #

unsafeIndex :: Vector a -> Index (Vector a) -> Element (Vector a) #

splitWhen :: (Element (Vector a) -> Bool) -> Vector a -> [Vector a] #

IsSequence [a] 
Instance details

Defined in Data.Sequences

Methods

fromList :: [Element [a]] -> [a] #

lengthIndex :: [a] -> Index [a] #

break :: (Element [a] -> Bool) -> [a] -> ([a], [a]) #

span :: (Element [a] -> Bool) -> [a] -> ([a], [a]) #

dropWhile :: (Element [a] -> Bool) -> [a] -> [a] #

takeWhile :: (Element [a] -> Bool) -> [a] -> [a] #

splitAt :: Index [a] -> [a] -> ([a], [a]) #

unsafeSplitAt :: Index [a] -> [a] -> ([a], [a]) #

take :: Index [a] -> [a] -> [a] #

unsafeTake :: Index [a] -> [a] -> [a] #

drop :: Index [a] -> [a] -> [a] #

unsafeDrop :: Index [a] -> [a] -> [a] #

dropEnd :: Index [a] -> [a] -> [a] #

partition :: (Element [a] -> Bool) -> [a] -> ([a], [a]) #

uncons :: [a] -> Maybe (Element [a], [a]) #

unsnoc :: [a] -> Maybe ([a], Element [a]) #

filter :: (Element [a] -> Bool) -> [a] -> [a] #

filterM :: Monad m => (Element [a] -> m Bool) -> [a] -> m [a] #

replicate :: Index [a] -> Element [a] -> [a] #

replicateM :: Monad m => Index [a] -> m (Element [a]) -> m [a] #

groupBy :: (Element [a] -> Element [a] -> Bool) -> [a] -> [[a]] #

groupAllOn :: Eq b => (Element [a] -> b) -> [a] -> [[a]] #

subsequences :: [a] -> [[a]] #

permutations :: [a] -> [[a]] #

tailEx :: [a] -> [a] #

tailMay :: [a] -> Maybe [a] #

initEx :: [a] -> [a] #

initMay :: [a] -> Maybe [a] #

unsafeTail :: [a] -> [a] #

unsafeInit :: [a] -> [a] #

index :: [a] -> Index [a] -> Maybe (Element [a]) #

indexEx :: [a] -> Index [a] -> Element [a] #

unsafeIndex :: [a] -> Index [a] -> Element [a] #

splitWhen :: (Element [a] -> Bool) -> [a] -> [[a]] #

class SetContainer set => HasKeysSet set where #

Type class for maps whose keys can be converted into sets.

Associated Types

type KeySet set #

Type of the key set.

Methods

keysSet :: set -> KeySet set #

Convert a map into a set of its keys.

Instances

Instances details
HasKeysSet (IntMap v) 
Instance details

Defined in Data.Containers

Associated Types

type KeySet (IntMap v) #

Methods

keysSet :: IntMap v -> KeySet (IntMap v) #

Ord k => HasKeysSet (Map k v) 
Instance details

Defined in Data.Containers

Associated Types

type KeySet (Map k v) #

Methods

keysSet :: Map k v -> KeySet (Map k v) #

(Hashable k, Eq k) => HasKeysSet (HashMap k v) 
Instance details

Defined in Data.Containers

Associated Types

type KeySet (HashMap k v) #

Methods

keysSet :: HashMap k v -> KeySet (HashMap k v) #

type family KeySet set #

Type of the key set.

Instances

Instances details
type KeySet (IntMap v) 
Instance details

Defined in Data.Containers

type KeySet (IntMap v) = IntSet
type KeySet (Map k v) 
Instance details

Defined in Data.Containers

type KeySet (Map k v) = Set k
type KeySet (HashMap k v) 
Instance details

Defined in Data.Containers

type KeySet (HashMap k v) = HashSet k

class MonoFunctor mono => MonoZip mono where #

Zip operations on MonoFunctors.

Methods

ozipWith :: (Element mono -> Element mono -> Element mono) -> mono -> mono -> mono #

Combine each element of two MonoZips using a supplied function.

ozip :: mono -> mono -> [(Element mono, Element mono)] #

Take two MonoZips and return a list of the pairs of their elements.

ounzip :: [(Element mono, Element mono)] -> (mono, mono) #

Take a list of pairs of elements and return a MonoZip of the first components and a MonoZip of the second components.

class (SetContainer set, Element set ~ ContainerKey set) => IsSet set where #

Polymorphic typeclass for interacting with different set types

Minimal complete definition

insertSet, deleteSet, singletonSet, setFromList, setToList

Methods

insertSet :: Element set -> set -> set #

Insert a value into a set.

deleteSet :: Element set -> set -> set #

Delete a value from a set.

singletonSet :: Element set -> set #

Create a set from a single element.

setFromList :: [Element set] -> set #

Convert a list to a set.

setToList :: set -> [Element set] #

Convert a set to a list.

filterSet :: (Element set -> Bool) -> set -> set #

Filter values in a set.

Since: mono-traversable-1.0.12.0

Instances

Instances details
IsSet IntSet 
Instance details

Defined in Data.Containers

Ord element => IsSet (Set element) 
Instance details

Defined in Data.Containers

Methods

insertSet :: Element (Set element) -> Set element -> Set element #

deleteSet :: Element (Set element) -> Set element -> Set element #

singletonSet :: Element (Set element) -> Set element #

setFromList :: [Element (Set element)] -> Set element #

setToList :: Set element -> [Element (Set element)] #

filterSet :: (Element (Set element) -> Bool) -> Set element -> Set element #

(Eq element, Hashable element) => IsSet (HashSet element) 
Instance details

Defined in Data.Containers

Methods

insertSet :: Element (HashSet element) -> HashSet element -> HashSet element #

deleteSet :: Element (HashSet element) -> HashSet element -> HashSet element #

singletonSet :: Element (HashSet element) -> HashSet element #

setFromList :: [Element (HashSet element)] -> HashSet element #

setToList :: HashSet element -> [Element (HashSet element)] #

filterSet :: (Element (HashSet element) -> Bool) -> HashSet element -> HashSet element #

class (MonoTraversable map, SetContainer map) => IsMap map where #

Polymorphic typeclass for interacting with different map types

Associated Types

type MapValue map #

In some cases, MapValue and Element will be different, e.g., the IsMap instance of associated lists.

Methods

lookup :: ContainerKey map -> map -> Maybe (MapValue map) #

Look up a value in a map with a specified key.

insertMap :: ContainerKey map -> MapValue map -> map -> map #

Insert a key-value pair into a map.

deleteMap :: ContainerKey map -> map -> map #

Delete a key-value pair of a map using a specified key.

singletonMap :: ContainerKey map -> MapValue map -> map #

Create a map from a single key-value pair.

mapFromList :: [(ContainerKey map, MapValue map)] -> map #

Convert a list of key-value pairs to a map

mapToList :: map -> [(ContainerKey map, MapValue map)] #

Convert a map to a list of key-value pairs.

findWithDefault :: MapValue map -> ContainerKey map -> map -> MapValue map #

Like lookup, but uses a default value when the key does not exist in the map.

insertWith #

Arguments

:: (MapValue map -> MapValue map -> MapValue map)

function that accepts the new value and the previous value and returns the value that will be set in the map.

-> ContainerKey map

key

-> MapValue map

new value to insert

-> map

input map

-> map

resulting map

Insert a key-value pair into a map.

Inserts the value directly if the key does not exist in the map. Otherwise, apply a supplied function that accepts the new value and the previous value and insert that result into the map.

insertWithKey #

Arguments

:: (ContainerKey map -> MapValue map -> MapValue map -> MapValue map)

function that accepts the key, the new value, and the previous value and returns the value that will be set in the map.

-> ContainerKey map

key

-> MapValue map

new value to insert

-> map

input map

-> map

resulting map

Insert a key-value pair into a map.

Inserts the value directly if the key does not exist in the map. Otherwise, apply a supplied function that accepts the key, the new value, and the previous value and insert that result into the map.

insertLookupWithKey #

Arguments

:: (ContainerKey map -> MapValue map -> MapValue map -> MapValue map)

function that accepts the key, the new value, and the previous value and returns the value that will be set in the map.

-> ContainerKey map

key

-> MapValue map

new value to insert

-> map

input map

-> (Maybe (MapValue map), map)

previous value and the resulting map

Insert a key-value pair into a map, return the previous key's value if it existed.

Inserts the value directly if the key does not exist in the map. Otherwise, apply a supplied function that accepts the key, the new value, and the previous value and insert that result into the map.

adjustMap #

Arguments

:: (MapValue map -> MapValue map)

function to apply to the previous value

-> ContainerKey map

key

-> map

input map

-> map

resulting map

Apply a function to the value of a given key.

Returns the input map when the key-value pair does not exist.

adjustWithKey #

Arguments

:: (ContainerKey map -> MapValue map -> MapValue map)

function that accepts the key and the previous value and returns the new value

-> ContainerKey map

key

-> map

input map

-> map

resulting map

Equivalent to adjustMap, but the function accepts the key, as well as the previous value.

updateMap #

Arguments

:: (MapValue map -> Maybe (MapValue map))

function that accepts the previous value and returns the new value or Nothing

-> ContainerKey map

key

-> map

input map

-> map

resulting map

Apply a function to the value of a given key.

If the function returns Nothing, this deletes the key-value pair.

Returns the input map when the key-value pair does not exist.

updateWithKey #

Arguments

:: (ContainerKey map -> MapValue map -> Maybe (MapValue map))

function that accepts the key and the previous value and returns the new value or Nothing

-> ContainerKey map

key

-> map

input map

-> map

resulting map

Equivalent to updateMap, but the function accepts the key, as well as the previous value.

updateLookupWithKey #

Arguments

:: (ContainerKey map -> MapValue map -> Maybe (MapValue map))

function that accepts the key and the previous value and returns the new value or Nothing

-> ContainerKey map

key

-> map

input map

-> (Maybe (MapValue map), map)

previous/new value and the resulting map

Apply a function to the value of a given key.

If the map does not contain the key this returns Nothing and the input map.

If the map does contain the key but the function returns Nothing, this returns the previous value and the map with the key-value pair removed.

If the map contains the key and the function returns a value, this returns the new value and the map with the key-value pair with the new value.

alterMap #

Arguments

:: (Maybe (MapValue map) -> Maybe (MapValue map))

function that accepts the previous value and returns the new value or Nothing

-> ContainerKey map

key

-> map

input map

-> map

resulting map

Update/Delete the value of a given key.

Applies a function to previous value of a given key, if it results in Nothing delete the key-value pair from the map, otherwise replace the previous value with the new value.

unionWith #

Arguments

:: (MapValue map -> MapValue map -> MapValue map)

function that accepts the first map's value and the second map's value and returns the new value that will be used

-> map

first map

-> map

second map

-> map

resulting map

Combine two maps.

When a key exists in both maps, apply a function to both of the values and use the result of that as the value of the key in the resulting map.

unionWithKey #

Arguments

:: (ContainerKey map -> MapValue map -> MapValue map -> MapValue map)

function that accepts the key, the first map's value and the second map's value and returns the new value that will be used

-> map

first map

-> map

second map

-> map

resulting map

unionsWith #

Arguments

:: (MapValue map -> MapValue map -> MapValue map)

function that accepts the first map's value and the second map's value and returns the new value that will be used

-> [map]

input list of maps

-> map

resulting map

Combine a list of maps.

When a key exists in two different maps, apply a function to both of the values and use the result of that as the value of the key in the resulting map.

mapWithKey #

Arguments

:: (ContainerKey map -> MapValue map -> MapValue map)

function that accepts the key and the previous value and returns the new value

-> map

input map

-> map

resulting map

Apply a function over every key-value pair of a map.

omapKeysWith #

Arguments

:: (MapValue map -> MapValue map -> MapValue map)

function that accepts the first map's value and the second map's value and returns the new value that will be used

-> (ContainerKey map -> ContainerKey map)

function that accepts the previous key and returns the new key

-> map

input map

-> map

resulting map

Apply a function over every key of a pair and run unionsWith over the results.

filterMap :: (MapValue map -> Bool) -> map -> map #

Filter values in a map.

Since: mono-traversable-1.0.9.0

Instances

Instances details
IsMap (IntMap value)

This instance uses the functions from Data.IntMap.Strict.

Instance details

Defined in Data.Containers

Associated Types

type MapValue (IntMap value) #

Methods

lookup :: ContainerKey (IntMap value) -> IntMap value -> Maybe (MapValue (IntMap value)) #

insertMap :: ContainerKey (IntMap value) -> MapValue (IntMap value) -> IntMap value -> IntMap value #

deleteMap :: ContainerKey (IntMap value) -> IntMap value -> IntMap value #

singletonMap :: ContainerKey (IntMap value) -> MapValue (IntMap value) -> IntMap value #

mapFromList :: [(ContainerKey (IntMap value), MapValue (IntMap value))] -> IntMap value #

mapToList :: IntMap value -> [(ContainerKey (IntMap value), MapValue (IntMap value))] #

findWithDefault :: MapValue (IntMap value) -> ContainerKey (IntMap value) -> IntMap value -> MapValue (IntMap value) #

insertWith :: (MapValue (IntMap value) -> MapValue (IntMap value) -> MapValue (IntMap value)) -> ContainerKey (IntMap value) -> MapValue (IntMap value) -> IntMap value -> IntMap value #

insertWithKey :: (ContainerKey (IntMap value) -> MapValue (IntMap value) -> MapValue (IntMap value) -> MapValue (IntMap value)) -> ContainerKey (IntMap value) -> MapValue (IntMap value) -> IntMap value -> IntMap value #

insertLookupWithKey :: (ContainerKey (IntMap value) -> MapValue (IntMap value) -> MapValue (IntMap value) -> MapValue (IntMap value)) -> ContainerKey (IntMap value) -> MapValue (IntMap value) -> IntMap value -> (Maybe (MapValue (IntMap value)), IntMap value) #

adjustMap :: (MapValue (IntMap value) -> MapValue (IntMap value)) -> ContainerKey (IntMap value) -> IntMap value -> IntMap value #

adjustWithKey :: (ContainerKey (IntMap value) -> MapValue (IntMap value) -> MapValue (IntMap value)) -> ContainerKey (IntMap value) -> IntMap value -> IntMap value #

updateMap :: (MapValue (IntMap value) -> Maybe (MapValue (IntMap value))) -> ContainerKey (IntMap value) -> IntMap value -> IntMap value #

updateWithKey :: (ContainerKey (IntMap value) -> MapValue (IntMap value) -> Maybe (MapValue (IntMap value))) -> ContainerKey (IntMap value) -> IntMap value -> IntMap value #

updateLookupWithKey :: (ContainerKey (IntMap value) -> MapValue (IntMap value) -> Maybe (MapValue (IntMap value))) -> ContainerKey (IntMap value) -> IntMap value -> (Maybe (MapValue (IntMap value)), IntMap value) #

alterMap :: (Maybe (MapValue (IntMap value)) -> Maybe (MapValue (IntMap value))) -> ContainerKey (IntMap value) -> IntMap value -> IntMap value #

unionWith :: (MapValue (IntMap value) -> MapValue (IntMap value) -> MapValue (IntMap value)) -> IntMap value -> IntMap value -> IntMap value #

unionWithKey :: (ContainerKey (IntMap value) -> MapValue (IntMap value) -> MapValue (IntMap value) -> MapValue (IntMap value)) -> IntMap value -> IntMap value -> IntMap value #

unionsWith :: (MapValue (IntMap value) -> MapValue (IntMap value) -> MapValue (IntMap value)) -> [IntMap value] -> IntMap value #

mapWithKey :: (ContainerKey (IntMap value) -> MapValue (IntMap value) -> MapValue (IntMap value)) -> IntMap value -> IntMap value #

omapKeysWith :: (MapValue (IntMap value) -> MapValue (IntMap value) -> MapValue (IntMap value)) -> (ContainerKey (IntMap value) -> ContainerKey (IntMap value)) -> IntMap value -> IntMap value #

filterMap :: (MapValue (IntMap value) -> Bool) -> IntMap value -> IntMap value #

Eq key => IsMap [(key, value)] 
Instance details

Defined in Data.Containers

Associated Types

type MapValue [(key, value)] #

Methods

lookup :: ContainerKey [(key, value)] -> [(key, value)] -> Maybe (MapValue [(key, value)]) #

insertMap :: ContainerKey [(key, value)] -> MapValue [(key, value)] -> [(key, value)] -> [(key, value)] #

deleteMap :: ContainerKey [(key, value)] -> [(key, value)] -> [(key, value)] #

singletonMap :: ContainerKey [(key, value)] -> MapValue [(key, value)] -> [(key, value)] #

mapFromList :: [(ContainerKey [(key, value)], MapValue [(key, value)])] -> [(key, value)] #

mapToList :: [(key, value)] -> [(ContainerKey [(key, value)], MapValue [(key, value)])] #

findWithDefault :: MapValue [(key, value)] -> ContainerKey [(key, value)] -> [(key, value)] -> MapValue [(key, value)] #

insertWith :: (MapValue [(key, value)] -> MapValue [(key, value)] -> MapValue [(key, value)]) -> ContainerKey [(key, value)] -> MapValue [(key, value)] -> [(key, value)] -> [(key, value)] #

insertWithKey :: (ContainerKey [(key, value)] -> MapValue [(key, value)] -> MapValue [(key, value)] -> MapValue [(key, value)]) -> ContainerKey [(key, value)] -> MapValue [(key, value)] -> [(key, value)] -> [(key, value)] #

insertLookupWithKey :: (ContainerKey [(key, value)] -> MapValue [(key, value)] -> MapValue [(key, value)] -> MapValue [(key, value)]) -> ContainerKey [(key, value)] -> MapValue [(key, value)] -> [(key, value)] -> (Maybe (MapValue [(key, value)]), [(key, value)]) #

adjustMap :: (MapValue [(key, value)] -> MapValue [(key, value)]) -> ContainerKey [(key, value)] -> [(key, value)] -> [(key, value)] #

adjustWithKey :: (ContainerKey [(key, value)] -> MapValue [(key, value)] -> MapValue [(key, value)]) -> ContainerKey [(key, value)] -> [(key, value)] -> [(key, value)] #

updateMap :: (MapValue [(key, value)] -> Maybe (MapValue [(key, value)])) -> ContainerKey [(key, value)] -> [(key, value)] -> [(key, value)] #

updateWithKey :: (ContainerKey [(key, value)] -> MapValue [(key, value)] -> Maybe (MapValue [(key, value)])) -> ContainerKey [(key, value)] -> [(key, value)] -> [(key, value)] #

updateLookupWithKey :: (ContainerKey [(key, value)] -> MapValue [(key, value)] -> Maybe (MapValue [(key, value)])) -> ContainerKey [(key, value)] -> [(key, value)] -> (Maybe (MapValue [(key, value)]), [(key, value)]) #

alterMap :: (Maybe (MapValue [(key, value)]) -> Maybe (MapValue [(key, value)])) -> ContainerKey [(key, value)] -> [(key, value)] -> [(key, value)] #

unionWith :: (MapValue [(key, value)] -> MapValue [(key, value)] -> MapValue [(key, value)]) -> [(key, value)] -> [(key, value)] -> [(key, value)] #

unionWithKey :: (ContainerKey [(key, value)] -> MapValue [(key, value)] -> MapValue [(key, value)] -> MapValue [(key, value)]) -> [(key, value)] -> [(key, value)] -> [(key, value)] #

unionsWith :: (MapValue [(key, value)] -> MapValue [(key, value)] -> MapValue [(key, value)]) -> [[(key, value)]] -> [(key, value)] #

mapWithKey :: (ContainerKey [(key, value)] -> MapValue [(key, value)] -> MapValue [(key, value)]) -> [(key, value)] -> [(key, value)] #

omapKeysWith :: (MapValue [(key, value)] -> MapValue [(key, value)] -> MapValue [(key, value)]) -> (ContainerKey [(key, value)] -> ContainerKey [(key, value)]) -> [(key, value)] -> [(key, value)] #

filterMap :: (MapValue [(key, value)] -> Bool) -> [(key, value)] -> [(key, value)] #

Ord key => IsMap (Map key value)

This instance uses the functions from Data.Map.Strict.

Instance details

Defined in Data.Containers

Associated Types

type MapValue (Map key value) #

Methods

lookup :: ContainerKey (Map key value) -> Map key value -> Maybe (MapValue (Map key value)) #

insertMap :: ContainerKey (Map key value) -> MapValue (Map key value) -> Map key value -> Map key value #

deleteMap :: ContainerKey (Map key value) -> Map key value -> Map key value #

singletonMap :: ContainerKey (Map key value) -> MapValue (Map key value) -> Map key value #

mapFromList :: [(ContainerKey (Map key value), MapValue (Map key value))] -> Map key value #

mapToList :: Map key value -> [(ContainerKey (Map key value), MapValue (Map key value))] #

findWithDefault :: MapValue (Map key value) -> ContainerKey (Map key value) -> Map key value -> MapValue (Map key value) #

insertWith :: (MapValue (Map key value) -> MapValue (Map key value) -> MapValue (Map key value)) -> ContainerKey (Map key value) -> MapValue (Map key value) -> Map key value -> Map key value #

insertWithKey :: (ContainerKey (Map key value) -> MapValue (Map key value) -> MapValue (Map key value) -> MapValue (Map key value)) -> ContainerKey (Map key value) -> MapValue (Map key value) -> Map key value -> Map key value #

insertLookupWithKey :: (ContainerKey (Map key value) -> MapValue (Map key value) -> MapValue (Map key value) -> MapValue (Map key value)) -> ContainerKey (Map key value) -> MapValue (Map key value) -> Map key value -> (Maybe (MapValue (Map key value)), Map key value) #

adjustMap :: (MapValue (Map key value) -> MapValue (Map key value)) -> ContainerKey (Map key value) -> Map key value -> Map key value #

adjustWithKey :: (ContainerKey (Map key value) -> MapValue (Map key value) -> MapValue (Map key value)) -> ContainerKey (Map key value) -> Map key value -> Map key value #

updateMap :: (MapValue (Map key value) -> Maybe (MapValue (Map key value))) -> ContainerKey (Map key value) -> Map key value -> Map key value #

updateWithKey :: (ContainerKey (Map key value) -> MapValue (Map key value) -> Maybe (MapValue (Map key value))) -> ContainerKey (Map key value) -> Map key value -> Map key value #

updateLookupWithKey :: (ContainerKey (Map key value) -> MapValue (Map key value) -> Maybe (MapValue (Map key value))) -> ContainerKey (Map key value) -> Map key value -> (Maybe (MapValue (Map key value)), Map key value) #

alterMap :: (Maybe (MapValue (Map key value)) -> Maybe (MapValue (Map key value))) -> ContainerKey (Map key value) -> Map key value -> Map key value #

unionWith :: (MapValue (Map key value) -> MapValue (Map key value) -> MapValue (Map key value)) -> Map key value -> Map key value -> Map key value #

unionWithKey :: (ContainerKey (Map key value) -> MapValue (Map key value) -> MapValue (Map key value) -> MapValue (Map key value)) -> Map key value -> Map key value -> Map key value #

unionsWith :: (MapValue (Map key value) -> MapValue (Map key value) -> MapValue (Map key value)) -> [Map key value] -> Map key value #

mapWithKey :: (ContainerKey (Map key value) -> MapValue (Map key value) -> MapValue (Map key value)) -> Map key value -> Map key value #

omapKeysWith :: (MapValue (Map key value) -> MapValue (Map key value) -> MapValue (Map key value)) -> (ContainerKey (Map key value) -> ContainerKey (Map key value)) -> Map key value -> Map key value #

filterMap :: (MapValue (Map key value) -> Bool) -> Map key value -> Map key value #

(Eq key, Hashable key) => IsMap (HashMap key value)

This instance uses the functions from Data.HashMap.Strict.

Instance details

Defined in Data.Containers

Associated Types

type MapValue (HashMap key value) #

Methods

lookup :: ContainerKey (HashMap key value) -> HashMap key value -> Maybe (MapValue (HashMap key value)) #

insertMap :: ContainerKey (HashMap key value) -> MapValue (HashMap key value) -> HashMap key value -> HashMap key value #

deleteMap :: ContainerKey (HashMap key value) -> HashMap key value -> HashMap key value #

singletonMap :: ContainerKey (HashMap key value) -> MapValue (HashMap key value) -> HashMap key value #

mapFromList :: [(ContainerKey (HashMap key value), MapValue (HashMap key value))] -> HashMap key value #

mapToList :: HashMap key value -> [(ContainerKey (HashMap key value), MapValue (HashMap key value))] #

findWithDefault :: MapValue (HashMap key value) -> ContainerKey (HashMap key value) -> HashMap key value -> MapValue (HashMap key value) #

insertWith :: (MapValue (HashMap key value) -> MapValue (HashMap key value) -> MapValue (HashMap key value)) -> ContainerKey (HashMap key value) -> MapValue (HashMap key value) -> HashMap key value -> HashMap key value #

insertWithKey :: (ContainerKey (HashMap key value) -> MapValue (HashMap key value) -> MapValue (HashMap key value) -> MapValue (HashMap key value)) -> ContainerKey (HashMap key value) -> MapValue (HashMap key value) -> HashMap key value -> HashMap key value #

insertLookupWithKey :: (ContainerKey (HashMap key value) -> MapValue (HashMap key value) -> MapValue (HashMap key value) -> MapValue (HashMap key value)) -> ContainerKey (HashMap key value) -> MapValue (HashMap key value) -> HashMap key value -> (Maybe (MapValue (HashMap key value)), HashMap key value) #

adjustMap :: (MapValue (HashMap key value) -> MapValue (HashMap key value)) -> ContainerKey (HashMap key value) -> HashMap key value -> HashMap key value #

adjustWithKey :: (ContainerKey (HashMap key value) -> MapValue (HashMap key value) -> MapValue (HashMap key value)) -> ContainerKey (HashMap key value) -> HashMap key value -> HashMap key value #

updateMap :: (MapValue (HashMap key value) -> Maybe (MapValue (HashMap key value))) -> ContainerKey (HashMap key value) -> HashMap key value -> HashMap key value #

updateWithKey :: (ContainerKey (HashMap key value) -> MapValue (HashMap key value) -> Maybe (MapValue (HashMap key value))) -> ContainerKey (HashMap key value) -> HashMap key value -> HashMap key value #

updateLookupWithKey :: (ContainerKey (HashMap key value) -> MapValue (HashMap key value) -> Maybe (MapValue (HashMap key value))) -> ContainerKey (HashMap key value) -> HashMap key value -> (Maybe (MapValue (HashMap key value)), HashMap key value) #

alterMap :: (Maybe (MapValue (HashMap key value)) -> Maybe (MapValue (HashMap key value))) -> ContainerKey (HashMap key value) -> HashMap key value -> HashMap key value #

unionWith :: (MapValue (HashMap key value) -> MapValue (HashMap key value) -> MapValue (HashMap key value)) -> HashMap key value -> HashMap key value -> HashMap key value #

unionWithKey :: (ContainerKey (HashMap key value) -> MapValue (HashMap key value) -> MapValue (HashMap key value) -> MapValue (HashMap key value)) -> HashMap key value -> HashMap key value -> HashMap key value #

unionsWith :: (MapValue (HashMap key value) -> MapValue (HashMap key value) -> MapValue (HashMap key value)) -> [HashMap key value] -> HashMap key value #

mapWithKey :: (ContainerKey (HashMap key value) -> MapValue (HashMap key value) -> MapValue (HashMap key value)) -> HashMap key value -> HashMap key value #

omapKeysWith :: (MapValue (HashMap key value) -> MapValue (HashMap key value) -> MapValue (HashMap key value)) -> (ContainerKey (HashMap key value) -> ContainerKey (HashMap key value)) -> HashMap key value -> HashMap key value #

filterMap :: (MapValue (HashMap key value) -> Bool) -> HashMap key value -> HashMap key value #

type family MapValue map #

In some cases, MapValue and Element will be different, e.g., the IsMap instance of associated lists.

Instances

Instances details
type MapValue (IntMap value) 
Instance details

Defined in Data.Containers

type MapValue (IntMap value) = value
type MapValue [(key, value)] 
Instance details

Defined in Data.Containers

type MapValue [(key, value)] = value
type MapValue (Map key value) 
Instance details

Defined in Data.Containers

type MapValue (Map key value) = value
type MapValue (HashMap key value) 
Instance details

Defined in Data.Containers

type MapValue (HashMap key value) = value

class BiPolyMap (map :: Type -> Type -> Type) where #

A Map type polymorphic in both its key and value.

Associated Types

type BPMKeyConstraint (map :: Type -> Type -> Type) key #

Methods

mapKeysWith #

Arguments

:: (BPMKeyConstraint map k1, BPMKeyConstraint map k2) 
=> (v -> v -> v)

combine values that now overlap

-> (k1 -> k2) 
-> map k1 v 
-> map k2 v 

Instances

Instances details
BiPolyMap Map 
Instance details

Defined in Data.Containers

Associated Types

type BPMKeyConstraint Map key #

Methods

mapKeysWith :: (BPMKeyConstraint Map k1, BPMKeyConstraint Map k2) => (v -> v -> v) -> (k1 -> k2) -> Map k1 v -> Map k2 v #

BiPolyMap HashMap 
Instance details

Defined in Data.Containers

Associated Types

type BPMKeyConstraint HashMap key #

Methods

mapKeysWith :: (BPMKeyConstraint HashMap k1, BPMKeyConstraint HashMap k2) => (v -> v -> v) -> (k1 -> k2) -> HashMap k1 v -> HashMap k2 v #

type family BPMKeyConstraint (map :: Type -> Type -> Type) key #

Instances

Instances details
type BPMKeyConstraint Map key 
Instance details

Defined in Data.Containers

type BPMKeyConstraint Map key = Ord key
type BPMKeyConstraint HashMap key 
Instance details

Defined in Data.Containers

type BPMKeyConstraint HashMap key = (Hashable key, Eq key)

class PolyMap (map :: Type -> Type) where #

A guaranteed-polymorphic Map, which allows for more polymorphic versions of functions.

Methods

differenceMap :: map value1 -> map value2 -> map value1 #

Get the difference between two maps, using the left map's values.

intersectionMap :: map value1 -> map value2 -> map value1 #

Get the intersection of two maps, using the left map's values.

intersectionWithMap :: (value1 -> value2 -> value3) -> map value1 -> map value2 -> map value3 #

Get the intersection of two maps with a supplied function that takes in the left map's value and the right map's value.

Instances

Instances details
PolyMap IntMap

This instance uses the functions from Data.IntMap.Strict.

Instance details

Defined in Data.Containers

Methods

differenceMap :: IntMap value1 -> IntMap value2 -> IntMap value1 #

intersectionMap :: IntMap value1 -> IntMap value2 -> IntMap value1 #

intersectionWithMap :: (value1 -> value2 -> value3) -> IntMap value1 -> IntMap value2 -> IntMap value3 #

Ord key => PolyMap (Map key)

This instance uses the functions from Data.Map.Strict.

Instance details

Defined in Data.Containers

Methods

differenceMap :: Map key value1 -> Map key value2 -> Map key value1 #

intersectionMap :: Map key value1 -> Map key value2 -> Map key value1 #

intersectionWithMap :: (value1 -> value2 -> value3) -> Map key value1 -> Map key value2 -> Map key value3 #

(Eq key, Hashable key) => PolyMap (HashMap key)

This instance uses the functions from Data.HashMap.Strict.

Instance details

Defined in Data.Containers

Methods

differenceMap :: HashMap key value1 -> HashMap key value2 -> HashMap key value1 #

intersectionMap :: HashMap key value1 -> HashMap key value2 -> HashMap key value1 #

intersectionWithMap :: (value1 -> value2 -> value3) -> HashMap key value1 -> HashMap key value2 -> HashMap key value3 #

class (Monoid set, Semigroup set, MonoFoldable set, Eq (ContainerKey set), GrowingAppend set) => SetContainer set where #

A container whose values are stored in Key-Value pairs.

Minimal complete definition

member, notMember, union, difference, intersection, keys

Associated Types

type ContainerKey set #

The type of the key

Methods

member :: ContainerKey set -> set -> Bool #

Check if there is a value with the supplied key in the container.

notMember :: ContainerKey set -> set -> Bool #

Check if there isn't a value with the supplied key in the container.

union :: set -> set -> set #

Get the union of two containers.

unions :: (MonoFoldable mono, Element mono ~ set) => mono -> set #

Combine a collection of SetContainers, with left-most values overriding when there are matching keys.

Since: mono-traversable-1.0.0

difference :: set -> set -> set #

Get the difference of two containers.

intersection :: set -> set -> set #

Get the intersection of two containers.

keys :: set -> [ContainerKey set] #

Get a list of all of the keys in the container.

Instances

Instances details
SetContainer IntSet 
Instance details

Defined in Data.Containers

Associated Types

type ContainerKey IntSet #

SetContainer (IntMap value)

This instance uses the functions from Data.IntMap.Strict.

Instance details

Defined in Data.Containers

Associated Types

type ContainerKey (IntMap value) #

Methods

member :: ContainerKey (IntMap value) -> IntMap value -> Bool #

notMember :: ContainerKey (IntMap value) -> IntMap value -> Bool #

union :: IntMap value -> IntMap value -> IntMap value #

unions :: (MonoFoldable mono, Element mono ~ IntMap value) => mono -> IntMap value #

difference :: IntMap value -> IntMap value -> IntMap value #

intersection :: IntMap value -> IntMap value -> IntMap value #

keys :: IntMap value -> [ContainerKey (IntMap value)] #

Ord element => SetContainer (Set element) 
Instance details

Defined in Data.Containers

Associated Types

type ContainerKey (Set element) #

Methods

member :: ContainerKey (Set element) -> Set element -> Bool #

notMember :: ContainerKey (Set element) -> Set element -> Bool #

union :: Set element -> Set element -> Set element #

unions :: (MonoFoldable mono, Element mono ~ Set element) => mono -> Set element #

difference :: Set element -> Set element -> Set element #

intersection :: Set element -> Set element -> Set element #

keys :: Set element -> [ContainerKey (Set element)] #

(Eq element, Hashable element) => SetContainer (HashSet element) 
Instance details

Defined in Data.Containers

Associated Types

type ContainerKey (HashSet element) #

Methods

member :: ContainerKey (HashSet element) -> HashSet element -> Bool #

notMember :: ContainerKey (HashSet element) -> HashSet element -> Bool #

union :: HashSet element -> HashSet element -> HashSet element #

unions :: (MonoFoldable mono, Element mono ~ HashSet element) => mono -> HashSet element #

difference :: HashSet element -> HashSet element -> HashSet element #

intersection :: HashSet element -> HashSet element -> HashSet element #

keys :: HashSet element -> [ContainerKey (HashSet element)] #

Eq key => SetContainer [(key, value)] 
Instance details

Defined in Data.Containers

Associated Types

type ContainerKey [(key, value)] #

Methods

member :: ContainerKey [(key, value)] -> [(key, value)] -> Bool #

notMember :: ContainerKey [(key, value)] -> [(key, value)] -> Bool #

union :: [(key, value)] -> [(key, value)] -> [(key, value)] #

unions :: (MonoFoldable mono, Element mono ~ [(key, value)]) => mono -> [(key, value)] #

difference :: [(key, value)] -> [(key, value)] -> [(key, value)] #

intersection :: [(key, value)] -> [(key, value)] -> [(key, value)] #

keys :: [(key, value)] -> [ContainerKey [(key, value)]] #

Ord k => SetContainer (Map k v)

This instance uses the functions from Data.Map.Strict.

Instance details

Defined in Data.Containers

Associated Types

type ContainerKey (Map k v) #

Methods

member :: ContainerKey (Map k v) -> Map k v -> Bool #

notMember :: ContainerKey (Map k v) -> Map k v -> Bool #

union :: Map k v -> Map k v -> Map k v #

unions :: (MonoFoldable mono, Element mono ~ Map k v) => mono -> Map k v #

difference :: Map k v -> Map k v -> Map k v #

intersection :: Map k v -> Map k v -> Map k v #

keys :: Map k v -> [ContainerKey (Map k v)] #

(Eq key, Hashable key) => SetContainer (HashMap key value)

This instance uses the functions from Data.HashMap.Strict.

Instance details

Defined in Data.Containers

Associated Types

type ContainerKey (HashMap key value) #

Methods

member :: ContainerKey (HashMap key value) -> HashMap key value -> Bool #

notMember :: ContainerKey (HashMap key value) -> HashMap key value -> Bool #

union :: HashMap key value -> HashMap key value -> HashMap key value #

unions :: (MonoFoldable mono, Element mono ~ HashMap key value) => mono -> HashMap key value #

difference :: HashMap key value -> HashMap key value -> HashMap key value #

intersection :: HashMap key value -> HashMap key value -> HashMap key value #

keys :: HashMap key value -> [ContainerKey (HashMap key value)] #

type family ContainerKey set #

The type of the key

Instances

Instances details
type ContainerKey IntSet 
Instance details

Defined in Data.Containers

type ContainerKey (IntMap value) 
Instance details

Defined in Data.Containers

type ContainerKey (IntMap value) = Int
type ContainerKey (Set element) 
Instance details

Defined in Data.Containers

type ContainerKey (Set element) = element
type ContainerKey (HashSet element) 
Instance details

Defined in Data.Containers

type ContainerKey (HashSet element) = element
type ContainerKey [(key, value)] 
Instance details

Defined in Data.Containers

type ContainerKey [(key, value)] = key
type ContainerKey (Map k v) 
Instance details

Defined in Data.Containers

type ContainerKey (Map k v) = k
type ContainerKey (HashMap key value) 
Instance details

Defined in Data.Containers

type ContainerKey (HashMap key value) = key

data NonNull mono #

A monomorphic container that is not null.

Instances

Instances details
Data mono => Data (NonNull mono) 
Instance details

Defined in Data.NonNull

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NonNull mono -> c (NonNull mono) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (NonNull mono) #

toConstr :: NonNull mono -> Constr #

dataTypeOf :: NonNull mono -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (NonNull mono)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (NonNull mono)) #

gmapT :: (forall b. Data b => b -> b) -> NonNull mono -> NonNull mono #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NonNull mono -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NonNull mono -> r #

gmapQ :: (forall d. Data d => d -> u) -> NonNull mono -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> NonNull mono -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> NonNull mono -> m (NonNull mono) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NonNull mono -> m (NonNull mono) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NonNull mono -> m (NonNull mono) #

(Semigroup mono, GrowingAppend mono) => Semigroup (NonNull mono) 
Instance details

Defined in Data.NonNull

Methods

(<>) :: NonNull mono -> NonNull mono -> NonNull mono #

sconcat :: NonEmpty (NonNull mono) -> NonNull mono #

stimes :: Integral b => b -> NonNull mono -> NonNull mono #

Read mono => Read (NonNull mono) 
Instance details

Defined in Data.NonNull

Show mono => Show (NonNull mono) 
Instance details

Defined in Data.NonNull

Methods

showsPrec :: Int -> NonNull mono -> ShowS #

show :: NonNull mono -> String #

showList :: [NonNull mono] -> ShowS #

Eq mono => Eq (NonNull mono) 
Instance details

Defined in Data.NonNull

Methods

(==) :: NonNull mono -> NonNull mono -> Bool #

(/=) :: NonNull mono -> NonNull mono -> Bool #

Ord mono => Ord (NonNull mono) 
Instance details

Defined in Data.NonNull

Methods

compare :: NonNull mono -> NonNull mono -> Ordering #

(<) :: NonNull mono -> NonNull mono -> Bool #

(<=) :: NonNull mono -> NonNull mono -> Bool #

(>) :: NonNull mono -> NonNull mono -> Bool #

(>=) :: NonNull mono -> NonNull mono -> Bool #

max :: NonNull mono -> NonNull mono -> NonNull mono #

min :: NonNull mono -> NonNull mono -> NonNull mono #

GrowingAppend mono => GrowingAppend (NonNull mono) 
Instance details

Defined in Data.NonNull

IsSequence mono => MonoComonad (NonNull mono) 
Instance details

Defined in Data.NonNull

Methods

oextract :: NonNull mono -> Element (NonNull mono) #

oextend :: (NonNull mono -> Element (NonNull mono)) -> NonNull mono -> NonNull mono #

MonoFoldable mono => MonoFoldable (NonNull mono) 
Instance details

Defined in Data.NonNull

Methods

ofoldMap :: Monoid m => (Element (NonNull mono) -> m) -> NonNull mono -> m #

ofoldr :: (Element (NonNull mono) -> b -> b) -> b -> NonNull mono -> b #

ofoldl' :: (a -> Element (NonNull mono) -> a) -> a -> NonNull mono -> a #

otoList :: NonNull mono -> [Element (NonNull mono)] #

oall :: (Element (NonNull mono) -> Bool) -> NonNull mono -> Bool #

oany :: (Element (NonNull mono) -> Bool) -> NonNull mono -> Bool #

onull :: NonNull mono -> Bool #

olength :: NonNull mono -> Int #

olength64 :: NonNull mono -> Int64 #

ocompareLength :: Integral i => NonNull mono -> i -> Ordering #

otraverse_ :: Applicative f => (Element (NonNull mono) -> f b) -> NonNull mono -> f () #

ofor_ :: Applicative f => NonNull mono -> (Element (NonNull mono) -> f b) -> f () #

omapM_ :: Applicative m => (Element (NonNull mono) -> m ()) -> NonNull mono -> m () #

oforM_ :: Applicative m => NonNull mono -> (Element (NonNull mono) -> m ()) -> m () #

ofoldlM :: Monad m => (a -> Element (NonNull mono) -> m a) -> a -> NonNull mono -> m a #

ofoldMap1Ex :: Semigroup m => (Element (NonNull mono) -> m) -> NonNull mono -> m #

ofoldr1Ex :: (Element (NonNull mono) -> Element (NonNull mono) -> Element (NonNull mono)) -> NonNull mono -> Element (NonNull mono) #

ofoldl1Ex' :: (Element (NonNull mono) -> Element (NonNull mono) -> Element (NonNull mono)) -> NonNull mono -> Element (NonNull mono) #

headEx :: NonNull mono -> Element (NonNull mono) #

lastEx :: NonNull mono -> Element (NonNull mono) #

unsafeHead :: NonNull mono -> Element (NonNull mono) #

unsafeLast :: NonNull mono -> Element (NonNull mono) #

maximumByEx :: (Element (NonNull mono) -> Element (NonNull mono) -> Ordering) -> NonNull mono -> Element (NonNull mono) #

minimumByEx :: (Element (NonNull mono) -> Element (NonNull mono) -> Ordering) -> NonNull mono -> Element (NonNull mono) #

oelem :: Element (NonNull mono) -> NonNull mono -> Bool #

onotElem :: Element (NonNull mono) -> NonNull mono -> Bool #

MonoFunctor mono => MonoFunctor (NonNull mono) 
Instance details

Defined in Data.NonNull

Methods

omap :: (Element (NonNull mono) -> Element (NonNull mono)) -> NonNull mono -> NonNull mono #

MonoPointed mono => MonoPointed (NonNull mono) 
Instance details

Defined in Data.NonNull

Methods

opoint :: Element (NonNull mono) -> NonNull mono #

MonoTraversable mono => MonoTraversable (NonNull mono) 
Instance details

Defined in Data.NonNull

Methods

otraverse :: Applicative f => (Element (NonNull mono) -> f (Element (NonNull mono))) -> NonNull mono -> f (NonNull mono) #

omapM :: Applicative m => (Element (NonNull mono) -> m (Element (NonNull mono))) -> NonNull mono -> m (NonNull mono) #

SemiSequence seq => SemiSequence (NonNull seq) 
Instance details

Defined in Data.NonNull

Associated Types

type Index (NonNull seq) #

Methods

intersperse :: Element (NonNull seq) -> NonNull seq -> NonNull seq #

reverse :: NonNull seq -> NonNull seq #

find :: (Element (NonNull seq) -> Bool) -> NonNull seq -> Maybe (Element (NonNull seq)) #

sortBy :: (Element (NonNull seq) -> Element (NonNull seq) -> Ordering) -> NonNull seq -> NonNull seq #

cons :: Element (NonNull seq) -> NonNull seq -> NonNull seq #

snoc :: NonNull seq -> Element (NonNull seq) -> NonNull seq #

type Element (NonNull mono) 
Instance details

Defined in Data.NonNull

type Element (NonNull mono) = Element mono
type Index (NonNull seq) 
Instance details

Defined in Data.NonNull

type Index (NonNull seq) = Index seq

class Monad m => MonadThrow (m :: Type -> Type) #

A class for monads in which exceptions may be thrown.

Instances should obey the following law:

throwM e >> x = throwM e

In other words, throwing an exception short-circuits the rest of the monadic computation.

Minimal complete definition

throwM

Instances

Instances details
MonadThrow STM 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e) => e -> STM a #

MonadThrow IO 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e) => e -> IO a #

MonadThrow Q 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e) => e -> Q a #

MonadThrow Maybe 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e) => e -> Maybe a #

MonadThrow List 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e) => e -> [a] #

e ~ SomeException => MonadThrow (Either e) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e0) => e0 -> Either e a #

MonadThrow (ST s) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e) => e -> ST s a #

Monad m => MonadThrow (CatchT m) 
Instance details

Defined in Control.Monad.Catch.Pure

Methods

throwM :: (HasCallStack, Exception e) => e -> CatchT m a #

MonadThrow m => MonadThrow (LoggingT m) 
Instance details

Defined in Control.Monad.Logger

Methods

throwM :: (HasCallStack, Exception e) => e -> LoggingT m a #

MonadThrow m => MonadThrow (NoLoggingT m) 
Instance details

Defined in Control.Monad.Logger

Methods

throwM :: (HasCallStack, Exception e) => e -> NoLoggingT m a #

MonadThrow m => MonadThrow (WriterLoggingT m) 
Instance details

Defined in Control.Monad.Logger

Methods

throwM :: (HasCallStack, Exception e) => e -> WriterLoggingT m a #

MonadThrow m => MonadThrow (ResourceT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

throwM :: (HasCallStack, Exception e) => e -> ResourceT m a #

MonadThrow m => MonadThrow (MaybeT m)

Throws exceptions into the base monad.

Instance details

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e) => e -> MaybeT m a #

MonadThrow (HandlerFor site) 
Instance details

Defined in Yesod.Core.Types

Methods

throwM :: (HasCallStack, Exception e) => e -> HandlerFor site a #

MonadThrow (WidgetFor site) 
Instance details

Defined in Yesod.Core.Types

Methods

throwM :: (HasCallStack, Exception e) => e -> WidgetFor site a #

(Functor f, MonadThrow m) => MonadThrow (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

throwM :: (HasCallStack, Exception e) => e -> FreeT f m a #

MonadThrow m => MonadThrow (ExceptT e m)

Throws exceptions into the base monad.

Instance details

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e0) => e0 -> ExceptT e m a #

MonadThrow m => MonadThrow (IdentityT m) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e) => e -> IdentityT m a #

MonadThrow m => MonadThrow (ReaderT r m) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e) => e -> ReaderT r m a #

MonadThrow m => MonadThrow (StateT s m) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e) => e -> StateT s m a #

MonadThrow m => MonadThrow (StateT s m) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e) => e -> StateT s m a #

(MonadThrow m, Monoid w) => MonadThrow (WriterT w m) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e) => e -> WriterT w m a #

(MonadThrow m, Monoid w) => MonadThrow (WriterT w m) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e) => e -> WriterT w m a #

MonadThrow (SubHandlerFor child master) 
Instance details

Defined in Yesod.Core.Types

Methods

throwM :: (HasCallStack, Exception e) => e -> SubHandlerFor child master a #

MonadThrow m => MonadThrow (ConduitT i o m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

throwM :: (HasCallStack, Exception e) => e -> ConduitT i o m a #

MonadThrow m => MonadThrow (ContT r m) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e) => e -> ContT r m a #

(MonadThrow m, Monoid w) => MonadThrow (RWST r w s m) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e) => e -> RWST r w s m a #

(MonadThrow m, Monoid w) => MonadThrow (RWST r w s m) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e) => e -> RWST r w s m a #

MonadThrow m => MonadThrow (Pipe l i o u m) 
Instance details

Defined in Data.Conduit.Internal.Pipe

Methods

throwM :: (HasCallStack, Exception e) => e -> Pipe l i o u m a #

class (forall (m :: Type -> Type). Monad m => Monad (t m)) => MonadTrans (t :: (Type -> Type) -> Type -> Type) where #

The class of monad transformers. For any monad m, the result t m should also be a monad, and lift should be a monad transformation from m to t m, i.e. it should satisfy the following laws:

Since 0.6.0.0 and for GHC 8.6 and later, the requirement that t m be a Monad is enforced by the implication constraint forall m. Monad m => Monad (t m) enabled by the QuantifiedConstraints extension.

Ambiguity error with GHC 9.0 to 9.2.2

Expand

These versions of GHC have a bug (https://gitlab.haskell.org/ghc/ghc/-/issues/20582) which causes constraints like

(MonadTrans t, forall m. Monad m => Monad (t m)) => ...

to be reported as ambiguous. For transformers 0.6 and later, this can be fixed by removing the second constraint, which is implied by the first.

Methods

lift :: Monad m => m a -> t m a #

Lift a computation from the argument monad to the constructed monad.

Instances

Instances details
MonadTrans CatchT 
Instance details

Defined in Control.Monad.Catch.Pure

Methods

lift :: Monad m => m a -> CatchT m a #

MonadTrans Free

This is not a true monad transformer. It is only a monad transformer "up to retract".

Instance details

Defined in Control.Monad.Free

Methods

lift :: Monad m => m a -> Free m a #

MonadTrans LoggingT 
Instance details

Defined in Control.Monad.Logger

Methods

lift :: Monad m => m a -> LoggingT m a #

MonadTrans NoLoggingT 
Instance details

Defined in Control.Monad.Logger

Methods

lift :: Monad m => m a -> NoLoggingT m a #

MonadTrans WriterLoggingT 
Instance details

Defined in Control.Monad.Logger

Methods

lift :: Monad m => m a -> WriterLoggingT m a #

MonadTrans ResourceT 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

lift :: Monad m => m a -> ResourceT m a #

MonadTrans MaybeT 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

lift :: Monad m => m a -> MaybeT m a #

MonadTrans AForm 
Instance details

Defined in Yesod.Form.Types

Methods

lift :: Monad m => m a -> AForm m a #

Functor f => MonadTrans (FreeT f) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

lift :: Monad m => m a -> FreeT f m a #

Monoid w => MonadTrans (AccumT w) 
Instance details

Defined in Control.Monad.Trans.Accum

Methods

lift :: Monad m => m a -> AccumT w m a #

MonadTrans (ExceptT e) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

lift :: Monad m => m a -> ExceptT e m a #

MonadTrans (IdentityT :: (Type -> Type) -> Type -> Type) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

lift :: Monad m => m a -> IdentityT m a #

MonadTrans (ReaderT r) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

lift :: Monad m => m a -> ReaderT r m a #

MonadTrans (SelectT r) 
Instance details

Defined in Control.Monad.Trans.Select

Methods

lift :: Monad m => m a -> SelectT r m a #

MonadTrans (StateT s) 
Instance details

Defined in Control.Monad.Trans.State.Lazy

Methods

lift :: Monad m => m a -> StateT s m a #

MonadTrans (StateT s) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

lift :: Monad m => m a -> StateT s m a #

MonadTrans (WriterT w) 
Instance details

Defined in Control.Monad.Trans.Writer.CPS

Methods

lift :: Monad m => m a -> WriterT w m a #

Monoid w => MonadTrans (WriterT w) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

lift :: Monad m => m a -> WriterT w m a #

Monoid w => MonadTrans (WriterT w) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

lift :: Monad m => m a -> WriterT w m a #

MonadTrans (ConduitT i o) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

lift :: Monad m => m a -> ConduitT i o m a #

MonadTrans (ContT r) 
Instance details

Defined in Control.Monad.Trans.Cont

Methods

lift :: Monad m => m a -> ContT r m a #

MonadTrans (RWST r w s) 
Instance details

Defined in Control.Monad.Trans.RWS.CPS

Methods

lift :: Monad m => m a -> RWST r w s m a #

Monoid w => MonadTrans (RWST r w s) 
Instance details

Defined in Control.Monad.Trans.RWS.Lazy

Methods

lift :: Monad m => m a -> RWST r w s m a #

Monoid w => MonadTrans (RWST r w s) 
Instance details

Defined in Control.Monad.Trans.RWS.Strict

Methods

lift :: Monad m => m a -> RWST r w s m a #

MonadTrans (Pipe l i o u) 
Instance details

Defined in Data.Conduit.Internal.Pipe

Methods

lift :: Monad m => m a -> Pipe l i o u m a #

data Acquire a #

A method for acquiring a scarce resource, providing the means of freeing it when no longer needed. This data type provides Functor/Applicative/Monad instances for composing different resources together. You can allocate these resources using either the bracket pattern (via with) or using ResourceT (via allocateAcquire).

This concept was originally introduced by Gabriel Gonzalez and described at: http://www.haskellforall.com/2013/06/the-resource-applicative.html. The implementation in this package is slightly different, due to taking a different approach to async exception safety.

Since: resourcet-1.1.0

Instances

Instances details
MonadIO Acquire 
Instance details

Defined in Data.Acquire.Internal

Methods

liftIO :: IO a -> Acquire a #

Applicative Acquire 
Instance details

Defined in Data.Acquire.Internal

Methods

pure :: a -> Acquire a #

(<*>) :: Acquire (a -> b) -> Acquire a -> Acquire b #

liftA2 :: (a -> b -> c) -> Acquire a -> Acquire b -> Acquire c #

(*>) :: Acquire a -> Acquire b -> Acquire b #

(<*) :: Acquire a -> Acquire b -> Acquire a #

Functor Acquire 
Instance details

Defined in Data.Acquire.Internal

Methods

fmap :: (a -> b) -> Acquire a -> Acquire b #

(<$) :: a -> Acquire b -> Acquire a #

Monad Acquire 
Instance details

Defined in Data.Acquire.Internal

Methods

(>>=) :: Acquire a -> (a -> Acquire b) -> Acquire b #

(>>) :: Acquire a -> Acquire b -> Acquire b #

return :: a -> Acquire a #

data ReleaseType #

The way in which a release is called.

Since: resourcet-1.1.2

Bundled Patterns

pattern ReleaseException :: ReleaseType 

Instances

Instances details
Show ReleaseType 
Instance details

Defined in Data.Acquire.Internal

data ResourceT (m :: Type -> Type) a #

The Resource transformer. This transformer keeps track of all registered actions, and calls them upon exit (via runResourceT). Actions may be registered via register, or resources may be allocated atomically via allocate. allocate corresponds closely to bracket.

Releasing may be performed before exit via the release function. This is a highly recommended optimization, as it will ensure that scarce resources are freed early. Note that calling release will deregister the action, so that a release action will only ever be called once.

Since 0.3.0

Instances

Instances details
MonadTrans ResourceT 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

lift :: Monad m => m a -> ResourceT m a #

MonadRWS r w s m => MonadRWS r w s (ResourceT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

MonadError e m => MonadError e (ResourceT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

throwError :: e -> ResourceT m a #

catchError :: ResourceT m a -> (e -> ResourceT m a) -> ResourceT m a #

MonadReader r m => MonadReader r (ResourceT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

ask :: ResourceT m r #

local :: (r -> r) -> ResourceT m a -> ResourceT m a #

reader :: (r -> a) -> ResourceT m a #

MonadState s m => MonadState s (ResourceT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

get :: ResourceT m s #

put :: s -> ResourceT m () #

state :: (s -> (a, s)) -> ResourceT m a #

MonadWriter w m => MonadWriter w (ResourceT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

writer :: (a, w) -> ResourceT m a #

tell :: w -> ResourceT m () #

listen :: ResourceT m a -> ResourceT m (a, w) #

pass :: ResourceT m (a, w -> w) -> ResourceT m a #

MonadFail m => MonadFail (ResourceT m)

Since: resourcet-1.2.2

Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

fail :: String -> ResourceT m a #

MonadFix m => MonadFix (ResourceT m)

Since: resourcet-1.1.8

Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

mfix :: (a -> ResourceT m a) -> ResourceT m a #

MonadIO m => MonadIO (ResourceT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

liftIO :: IO a -> ResourceT m a #

Alternative m => Alternative (ResourceT m)

Since 1.1.5

Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

empty :: ResourceT m a #

(<|>) :: ResourceT m a -> ResourceT m a -> ResourceT m a #

some :: ResourceT m a -> ResourceT m [a] #

many :: ResourceT m a -> ResourceT m [a] #

Applicative m => Applicative (ResourceT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

pure :: a -> ResourceT m a #

(<*>) :: ResourceT m (a -> b) -> ResourceT m a -> ResourceT m b #

liftA2 :: (a -> b -> c) -> ResourceT m a -> ResourceT m b -> ResourceT m c #

(*>) :: ResourceT m a -> ResourceT m b -> ResourceT m b #

(<*) :: ResourceT m a -> ResourceT m b -> ResourceT m a #

Functor m => Functor (ResourceT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

fmap :: (a -> b) -> ResourceT m a -> ResourceT m b #

(<$) :: a -> ResourceT m b -> ResourceT m a #

Monad m => Monad (ResourceT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

(>>=) :: ResourceT m a -> (a -> ResourceT m b) -> ResourceT m b #

(>>) :: ResourceT m a -> ResourceT m b -> ResourceT m b #

return :: a -> ResourceT m a #

MonadPlus m => MonadPlus (ResourceT m)

Since 1.1.5

Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

mzero :: ResourceT m a #

mplus :: ResourceT m a -> ResourceT m a -> ResourceT m a #

MonadCatch m => MonadCatch (ResourceT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

catch :: (HasCallStack, Exception e) => ResourceT m a -> (e -> ResourceT m a) -> ResourceT m a #

MonadMask m => MonadMask (ResourceT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

mask :: HasCallStack => ((forall a. ResourceT m a -> ResourceT m a) -> ResourceT m b) -> ResourceT m b #

uninterruptibleMask :: HasCallStack => ((forall a. ResourceT m a -> ResourceT m a) -> ResourceT m b) -> ResourceT m b #

generalBracket :: HasCallStack => ResourceT m a -> (a -> ExitCase b -> ResourceT m c) -> (a -> ResourceT m b) -> ResourceT m (b, c) #

MonadThrow m => MonadThrow (ResourceT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

throwM :: (HasCallStack, Exception e) => e -> ResourceT m a #

MonadLogger m => MonadLogger (ResourceT m) 
Instance details

Defined in Control.Monad.Logger

Methods

monadLoggerLog :: ToLogStr msg => Loc -> LogSource -> LogLevel -> msg -> ResourceT m () #

MonadLoggerIO m => MonadLoggerIO (ResourceT m) 
Instance details

Defined in Control.Monad.Logger

Methods

askLoggerIO :: ResourceT m (Loc -> LogSource -> LogLevel -> LogStr -> IO ()) #

MonadCont m => MonadCont (ResourceT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

callCC :: ((a -> ResourceT m b) -> ResourceT m a) -> ResourceT m a #

PrimMonad m => PrimMonad (ResourceT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Associated Types

type PrimState (ResourceT m) #

Methods

primitive :: (State# (PrimState (ResourceT m)) -> (# State# (PrimState (ResourceT m)), a #)) -> ResourceT m a #

MonadIO m => MonadResource (ResourceT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

liftResourceT :: ResourceT IO a -> ResourceT m a #

MonadUnliftIO m => MonadUnliftIO (ResourceT m)

Since: resourcet-1.1.10

Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

withRunInIO :: ((forall a. ResourceT m a -> IO a) -> IO b) -> ResourceT m b #

ToFlushBuilder builder => ToContent (ConduitT () builder (ResourceT IO) ()) 
Instance details

Defined in Yesod.Core.Content

Methods

toContent :: ConduitT () builder (ResourceT IO) () -> Content #

ToFlushBuilder builder => ToContent (SealedConduitT () builder (ResourceT IO) ()) 
Instance details

Defined in Yesod.Core.Content

Methods

toContent :: SealedConduitT () builder (ResourceT IO) () -> Content #

ToFlushBuilder builder => ToContent (Pipe () () builder () (ResourceT IO) ()) 
Instance details

Defined in Yesod.Core.Content

Methods

toContent :: Pipe () () builder () (ResourceT IO) () -> Content #

type PrimState (ResourceT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

class MonadIO m => MonadResource (m :: Type -> Type) where #

A Monad which allows for safe resource allocation. In theory, any monad transformer stack which includes a ResourceT can be an instance of MonadResource.

Note: runResourceT has a requirement for a MonadUnliftIO m monad, which allows control operations to be lifted. A MonadResource does not have this requirement. This means that transformers such as ContT can be an instance of MonadResource. However, the ContT wrapper will need to be unwrapped before calling runResourceT.

Since 0.3.0

Methods

liftResourceT :: ResourceT IO a -> m a #

Lift a ResourceT IO action into the current Monad.

Since 0.4.0

Instances

Instances details
MonadResource m => MonadResource (LoggingT m) 
Instance details

Defined in Control.Monad.Logger

Methods

liftResourceT :: ResourceT IO a -> LoggingT m a #

MonadResource m => MonadResource (NoLoggingT m) 
Instance details

Defined in Control.Monad.Logger

MonadIO m => MonadResource (ResourceT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

liftResourceT :: ResourceT IO a -> ResourceT m a #

MonadResource m => MonadResource (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

liftResourceT :: ResourceT IO a -> MaybeT m a #

MonadResource (HandlerFor site) 
Instance details

Defined in Yesod.Core.Types

Methods

liftResourceT :: ResourceT IO a -> HandlerFor site a #

MonadResource (WidgetFor site) 
Instance details

Defined in Yesod.Core.Types

Methods

liftResourceT :: ResourceT IO a -> WidgetFor site a #

MonadResource m => MonadResource (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

liftResourceT :: ResourceT IO a -> ExceptT e m a #

MonadResource m => MonadResource (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

liftResourceT :: ResourceT IO a -> IdentityT m a #

MonadResource m => MonadResource (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

liftResourceT :: ResourceT IO a -> ReaderT r m a #

MonadResource m => MonadResource (StateT s m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

liftResourceT :: ResourceT IO a -> StateT s m a #

MonadResource m => MonadResource (StateT s m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

liftResourceT :: ResourceT IO a -> StateT s m a #

(Monoid w, MonadResource m) => MonadResource (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

liftResourceT :: ResourceT IO a -> WriterT w m a #

(Monoid w, MonadResource m) => MonadResource (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

liftResourceT :: ResourceT IO a -> WriterT w m a #

MonadResource (SubHandlerFor child master) 
Instance details

Defined in Yesod.Core.Types

Methods

liftResourceT :: ResourceT IO a -> SubHandlerFor child master a #

MonadResource m => MonadResource (ConduitT i o m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

liftResourceT :: ResourceT IO a -> ConduitT i o m a #

MonadResource m => MonadResource (ContT r m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

liftResourceT :: ResourceT IO a -> ContT r m a #

(Monoid w, MonadResource m) => MonadResource (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

liftResourceT :: ResourceT IO a -> RWST r w s m a #

(Monoid w, MonadResource m) => MonadResource (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

liftResourceT :: ResourceT IO a -> RWST r w s m a #

MonadResource m => MonadResource (Pipe l i o u m) 
Instance details

Defined in Data.Conduit.Internal.Pipe

Methods

liftResourceT :: ResourceT IO a -> Pipe l i o u m a #

newtype ZipConduit i o (m :: Type -> Type) r #

Provides an alternative Applicative instance for ConduitT. In this instance, every incoming value is provided to all ConduitTs, and output is coalesced together. Leftovers from individual ConduitTs will be used within that component, and then discarded at the end of their computation. Output and finalizers will both be handled in a left-biased manner.

As an example, take the following program:

main :: IO ()
main = do
    let src = mapM_ yield [1..3 :: Int]
        conduit1 = CL.map (+1)
        conduit2 = CL.concatMap (replicate 2)
        conduit = getZipConduit $ ZipConduit conduit1 <* ZipConduit conduit2
        sink = CL.mapM_ print
    src $$ conduit =$ sink

It will produce the output: 2, 1, 1, 3, 2, 2, 4, 3, 3

Since 1.0.17

Constructors

ZipConduit 

Fields

Instances

Instances details
Monad m => Applicative (ZipConduit i o m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

pure :: a -> ZipConduit i o m a #

(<*>) :: ZipConduit i o m (a -> b) -> ZipConduit i o m a -> ZipConduit i o m b #

liftA2 :: (a -> b -> c) -> ZipConduit i o m a -> ZipConduit i o m b -> ZipConduit i o m c #

(*>) :: ZipConduit i o m a -> ZipConduit i o m b -> ZipConduit i o m b #

(<*) :: ZipConduit i o m a -> ZipConduit i o m b -> ZipConduit i o m a #

Functor (ZipConduit i o m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

fmap :: (a -> b) -> ZipConduit i o m a -> ZipConduit i o m b #

(<$) :: a -> ZipConduit i o m b -> ZipConduit i o m a #

newtype ZipSink i (m :: Type -> Type) r #

A wrapper for defining an Applicative instance for Sinks which allows to combine sinks together, generalizing zipSinks. A combined sink distributes the input to all its participants and when all finish, produces the result. This allows to define functions like

sequenceSinks :: (Monad m)
          => [ConduitT i Void m r] -> ConduitT i Void m [r]
sequenceSinks = getZipSink . sequenceA . fmap ZipSink

Note that the standard Applicative instance for conduits works differently. It feeds one sink with input until it finishes, then switches to another, etc., and at the end combines their results.

This newtype is in fact a type constrained version of ZipConduit, and has the same behavior. It's presented as a separate type since (1) it historically predates ZipConduit, and (2) the type constraining can make your code clearer (and thereby make your error messages more easily understood).

Since 1.0.13

Constructors

ZipSink 

Fields

Instances

Instances details
Monad m => Applicative (ZipSink i m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

pure :: a -> ZipSink i m a #

(<*>) :: ZipSink i m (a -> b) -> ZipSink i m a -> ZipSink i m b #

liftA2 :: (a -> b -> c) -> ZipSink i m a -> ZipSink i m b -> ZipSink i m c #

(*>) :: ZipSink i m a -> ZipSink i m b -> ZipSink i m b #

(<*) :: ZipSink i m a -> ZipSink i m b -> ZipSink i m a #

Monad m => Functor (ZipSink i m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

fmap :: (a -> b) -> ZipSink i m a -> ZipSink i m b #

(<$) :: a -> ZipSink i m b -> ZipSink i m a #

newtype ZipSource (m :: Type -> Type) o #

A wrapper for defining an Applicative instance for Sources which allows to combine sources together, generalizing zipSources. A combined source will take input yielded from each of its Sources until any of them stop producing output.

Since 1.0.13

Constructors

ZipSource 

Fields

Instances

Instances details
Monad m => Applicative (ZipSource m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

pure :: a -> ZipSource m a #

(<*>) :: ZipSource m (a -> b) -> ZipSource m a -> ZipSource m b #

liftA2 :: (a -> b -> c) -> ZipSource m a -> ZipSource m b -> ZipSource m c #

(*>) :: ZipSource m a -> ZipSource m b -> ZipSource m b #

(<*) :: ZipSource m a -> ZipSource m b -> ZipSource m a #

Monad m => Functor (ZipSource m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

fmap :: (a -> b) -> ZipSource m a -> ZipSource m b #

(<$) :: a -> ZipSource m b -> ZipSource m a #

data Flush a #

Provide for a stream of data that can be flushed.

A number of Conduits (e.g., zlib compression) need the ability to flush the stream at some point. This provides a single wrapper datatype to be used in all such circumstances.

Since 0.3.0

Constructors

Chunk a 
Flush 

Instances

Instances details
Functor Flush 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

fmap :: (a -> b) -> Flush a -> Flush b #

(<$) :: a -> Flush b -> Flush a #

Show a => Show (Flush a) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

showsPrec :: Int -> Flush a -> ShowS #

show :: Flush a -> String #

showList :: [Flush a] -> ShowS #

Eq a => Eq (Flush a) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

(==) :: Flush a -> Flush a -> Bool #

(/=) :: Flush a -> Flush a -> Bool #

Ord a => Ord (Flush a) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

compare :: Flush a -> Flush a -> Ordering #

(<) :: Flush a -> Flush a -> Bool #

(<=) :: Flush a -> Flush a -> Bool #

(>) :: Flush a -> Flush a -> Bool #

(>=) :: Flush a -> Flush a -> Bool #

max :: Flush a -> Flush a -> Flush a #

min :: Flush a -> Flush a -> Flush a #

ToFlushBuilder (Flush Html) 
Instance details

Defined in Yesod.Core.Content

ToFlushBuilder (Flush Builder) 
Instance details

Defined in Yesod.Core.Content

ToFlushBuilder (Flush ByteString) 
Instance details

Defined in Yesod.Core.Content

ToFlushBuilder (Flush ByteString) 
Instance details

Defined in Yesod.Core.Content

ToFlushBuilder (Flush Text) 
Instance details

Defined in Yesod.Core.Content

ToFlushBuilder (Flush Text) 
Instance details

Defined in Yesod.Core.Content

ToFlushBuilder (Flush String) 
Instance details

Defined in Yesod.Core.Content

type Consumer i (m :: Type -> Type) r = forall o. ConduitT i o m r #

A component which consumes a stream of input values and produces a final result, regardless of the output stream. A Consumer is a generalization of a Sink, and can be used as either a Sink or a Conduit.

Since 1.0.0

type Sink i = ConduitT i Void #

Consumes a stream of input values and produces a final result, without producing any output.

type Sink i m r = ConduitT i Void m r

Since 0.5.0

type Producer (m :: Type -> Type) o = forall i. ConduitT i o m () #

A component which produces a stream of output values, regardless of the input stream. A Producer is a generalization of a Source, and can be used as either a Source or a Conduit.

Since 1.0.0

type Source (m :: Type -> Type) o = ConduitT () o m () #

Provides a stream of output values, without consuming any input or producing a final result.

Since 0.5.0

type ConduitM = ConduitT #

Same as ConduitT, for backwards compat

data SealedConduitT i o (m :: Type -> Type) r #

In order to provide for efficient monadic composition, the ConduitT type is implemented internally using a technique known as the codensity transform. This allows for cheap appending, but makes one case much more expensive: partially running a ConduitT and that capturing the new state.

This data type is the same as ConduitT, but does not use the codensity transform technique.

Since: conduit-1.3.0

Instances

Instances details
ToFlushBuilder builder => ToContent (SealedConduitT () builder (ResourceT IO) ()) 
Instance details

Defined in Yesod.Core.Content

Methods

toContent :: SealedConduitT () builder (ResourceT IO) () -> Content #

data ConduitT i o (m :: Type -> Type) r #

Core datatype of the conduit package. This type represents a general component which can consume a stream of input values i, produce a stream of output values o, perform actions in the m monad, and produce a final result r. The type synonyms provided here are simply wrappers around this type.

Since 1.3.0

Instances

Instances details
MonadRWS r w s m => MonadRWS r w s (ConduitT i o m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

MonadError e m => MonadError e (ConduitT i o m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

throwError :: e -> ConduitT i o m a #

catchError :: ConduitT i o m a -> (e -> ConduitT i o m a) -> ConduitT i o m a #

MonadReader r m => MonadReader r (ConduitT i o m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

ask :: ConduitT i o m r #

local :: (r -> r) -> ConduitT i o m a -> ConduitT i o m a #

reader :: (r -> a) -> ConduitT i o m a #

MonadState s m => MonadState s (ConduitT i o m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

get :: ConduitT i o m s #

put :: s -> ConduitT i o m () #

state :: (s -> (a, s)) -> ConduitT i o m a #

MonadWriter w m => MonadWriter w (ConduitT i o m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

writer :: (a, w) -> ConduitT i o m a #

tell :: w -> ConduitT i o m () #

listen :: ConduitT i o m a -> ConduitT i o m (a, w) #

pass :: ConduitT i o m (a, w -> w) -> ConduitT i o m a #

MonadTrans (ConduitT i o) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

lift :: Monad m => m a -> ConduitT i o m a #

MonadFail m => MonadFail (ConduitT i o m)

Since: conduit-1.3.1

Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

fail :: String -> ConduitT i o m a #

MonadIO m => MonadIO (ConduitT i o m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

liftIO :: IO a -> ConduitT i o m a #

Applicative (ConduitT i o m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

pure :: a -> ConduitT i o m a #

(<*>) :: ConduitT i o m (a -> b) -> ConduitT i o m a -> ConduitT i o m b #

liftA2 :: (a -> b -> c) -> ConduitT i o m a -> ConduitT i o m b -> ConduitT i o m c #

(*>) :: ConduitT i o m a -> ConduitT i o m b -> ConduitT i o m b #

(<*) :: ConduitT i o m a -> ConduitT i o m b -> ConduitT i o m a #

Functor (ConduitT i o m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

fmap :: (a -> b) -> ConduitT i o m a -> ConduitT i o m b #

(<$) :: a -> ConduitT i o m b -> ConduitT i o m a #

Monad (ConduitT i o m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

(>>=) :: ConduitT i o m a -> (a -> ConduitT i o m b) -> ConduitT i o m b #

(>>) :: ConduitT i o m a -> ConduitT i o m b -> ConduitT i o m b #

return :: a -> ConduitT i o m a #

MonadThrow m => MonadThrow (ConduitT i o m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

throwM :: (HasCallStack, Exception e) => e -> ConduitT i o m a #

MonadLogger m => MonadLogger (ConduitM i o m) 
Instance details

Defined in Control.Monad.Logger

Methods

monadLoggerLog :: ToLogStr msg => Loc -> LogSource -> LogLevel -> msg -> ConduitM i o m () #

MonadLoggerIO m => MonadLoggerIO (ConduitM i o m) 
Instance details

Defined in Control.Monad.Logger

Methods

askLoggerIO :: ConduitM i o m (Loc -> LogSource -> LogLevel -> LogStr -> IO ()) #

PrimMonad m => PrimMonad (ConduitT i o m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Associated Types

type PrimState (ConduitT i o m) #

Methods

primitive :: (State# (PrimState (ConduitT i o m)) -> (# State# (PrimState (ConduitT i o m)), a #)) -> ConduitT i o m a #

MonadResource m => MonadResource (ConduitT i o m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

liftResourceT :: ResourceT IO a -> ConduitT i o m a #

MonadHandler m => MonadHandler (ConduitM i o m) 
Instance details

Defined in Yesod.Core.Class.Handler

Associated Types

type HandlerSite (ConduitM i o m) #

type SubHandlerSite (ConduitM i o m) #

MonadWidget m => MonadWidget (ConduitM i o m) 
Instance details

Defined in Yesod.Core.Class.Handler

Methods

liftWidget :: WidgetFor (HandlerSite (ConduitM i o m)) a -> ConduitM i o m a #

Monad m => Monoid (ConduitT i o m ()) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

mempty :: ConduitT i o m () #

mappend :: ConduitT i o m () -> ConduitT i o m () -> ConduitT i o m () #

mconcat :: [ConduitT i o m ()] -> ConduitT i o m () #

Monad m => Semigroup (ConduitT i o m ()) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

(<>) :: ConduitT i o m () -> ConduitT i o m () -> ConduitT i o m () #

sconcat :: NonEmpty (ConduitT i o m ()) -> ConduitT i o m () #

stimes :: Integral b => b -> ConduitT i o m () -> ConduitT i o m () #

ToFlushBuilder builder => ToContent (ConduitT () builder (ResourceT IO) ()) 
Instance details

Defined in Yesod.Core.Content

Methods

toContent :: ConduitT () builder (ResourceT IO) () -> Content #

type PrimState (ConduitT i o m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

type PrimState (ConduitT i o m) = PrimState m
type HandlerSite (ConduitM i o m) 
Instance details

Defined in Yesod.Core.Class.Handler

type SubHandlerSite (ConduitM i o m) 
Instance details

Defined in Yesod.Core.Class.Handler

type BufferAllocStrategy = (IO Buffer, Int -> Buffer -> IO (IO Buffer)) #

A buffer allocation strategy (buf0, nextBuf) specifies the initial buffer to use and how to compute a new buffer nextBuf minSize buf with at least size minSize from a filled buffer buf. The double nesting of the IO monad helps to ensure that the reference to the filled buffer buf is lost as soon as possible, but the new buffer doesn't have to be allocated too early.

Since: conduit-1.3.0

class Default a where #

A class for types with a default value.

Minimal complete definition

Nothing

Methods

def :: a #

The default value for this type.

Instances

Instances details
Default All 
Instance details

Defined in Data.Default.Class

Methods

def :: All #

Default Any 
Instance details

Defined in Data.Default.Class

Methods

def :: Any #

Default CClock 
Instance details

Defined in Data.Default.Class

Methods

def :: CClock #

Default CDouble 
Instance details

Defined in Data.Default.Class

Methods

def :: CDouble #

Default CFloat 
Instance details

Defined in Data.Default.Class

Methods

def :: CFloat #

Default CInt 
Instance details

Defined in Data.Default.Class

Methods

def :: CInt #

Default CIntMax 
Instance details

Defined in Data.Default.Class

Methods

def :: CIntMax #

Default CIntPtr 
Instance details

Defined in Data.Default.Class

Methods

def :: CIntPtr #

Default CLLong 
Instance details

Defined in Data.Default.Class

Methods

def :: CLLong #

Default CLong 
Instance details

Defined in Data.Default.Class

Methods

def :: CLong #

Default CPtrdiff 
Instance details

Defined in Data.Default.Class

Methods

def :: CPtrdiff #

Default CSUSeconds 
Instance details

Defined in Data.Default.Class

Methods

def :: CSUSeconds #

Default CShort 
Instance details

Defined in Data.Default.Class

Methods

def :: CShort #

Default CSigAtomic 
Instance details

Defined in Data.Default.Class

Methods

def :: CSigAtomic #

Default CSize 
Instance details

Defined in Data.Default.Class

Methods

def :: CSize #

Default CTime 
Instance details

Defined in Data.Default.Class

Methods

def :: CTime #

Default CUInt 
Instance details

Defined in Data.Default.Class

Methods

def :: CUInt #

Default CUIntMax 
Instance details

Defined in Data.Default.Class

Methods

def :: CUIntMax #

Default CUIntPtr 
Instance details

Defined in Data.Default.Class

Methods

def :: CUIntPtr #

Default CULLong 
Instance details

Defined in Data.Default.Class

Methods

def :: CULLong #

Default CULong 
Instance details

Defined in Data.Default.Class

Methods

def :: CULong #

Default CUSeconds 
Instance details

Defined in Data.Default.Class

Methods

def :: CUSeconds #

Default CUShort 
Instance details

Defined in Data.Default.Class

Methods

def :: CUShort #

Default Int16 
Instance details

Defined in Data.Default.Class

Methods

def :: Int16 #

Default Int32 
Instance details

Defined in Data.Default.Class

Methods

def :: Int32 #

Default Int64 
Instance details

Defined in Data.Default.Class

Methods

def :: Int64 #

Default Int8 
Instance details

Defined in Data.Default.Class

Methods

def :: Int8 #

Default Word16 
Instance details

Defined in Data.Default.Class

Methods

def :: Word16 #

Default Word32 
Instance details

Defined in Data.Default.Class

Methods

def :: Word32 #

Default Word64 
Instance details

Defined in Data.Default.Class

Methods

def :: Word64 #

Default Word8 
Instance details

Defined in Data.Default.Class

Methods

def :: Word8 #

Default HashingPolicy 
Instance details

Defined in Crypto.BCrypt

Methods

def :: HashingPolicy #

Default SetCookie
def = defaultSetCookie
Instance details

Defined in Web.Cookie

Methods

def :: SetCookie #

Default TLSSettings 
Instance details

Defined in Network.Connection.Types

Methods

def :: TLSSettings #

Default Ordering 
Instance details

Defined in Data.Default.Class

Methods

def :: Ordering #

Default GzipSettings

Use default MIME settings; do not compress files; skip compression on data smaller than 860 bytes.

Instance details

Defined in Network.Wai.Middleware.Gzip

Methods

def :: GzipSettings #

Default DetailedSettings 
Instance details

Defined in Network.Wai.Middleware.RequestLogger

Default RequestLoggerSettings 
Instance details

Defined in Network.Wai.Middleware.RequestLogger

Default WidgetFileSettings 
Instance details

Defined in Yesod.Default.Util

Default CombineSettings 
Instance details

Defined in Yesod.Static

Default Integer 
Instance details

Defined in Data.Default.Class

Methods

def :: Integer #

Default () 
Instance details

Defined in Data.Default.Class

Methods

def :: () #

Default Double 
Instance details

Defined in Data.Default.Class

Methods

def :: Double #

Default Float 
Instance details

Defined in Data.Default.Class

Methods

def :: Float #

Default Int 
Instance details

Defined in Data.Default.Class

Methods

def :: Int #

Default Word 
Instance details

Defined in Data.Default.Class

Methods

def :: Word #

(Default a, RealFloat a) => Default (Complex a) 
Instance details

Defined in Data.Default.Class

Methods

def :: Complex a #

Default (First a) 
Instance details

Defined in Data.Default.Class

Methods

def :: First a #

Default (Last a) 
Instance details

Defined in Data.Default.Class

Methods

def :: Last a #

Default a => Default (Dual a) 
Instance details

Defined in Data.Default.Class

Methods

def :: Dual a #

Default (Endo a) 
Instance details

Defined in Data.Default.Class

Methods

def :: Endo a #

Num a => Default (Product a) 
Instance details

Defined in Data.Default.Class

Methods

def :: Product a #

Num a => Default (Sum a) 
Instance details

Defined in Data.Default.Class

Methods

def :: Sum a #

Integral a => Default (Ratio a) 
Instance details

Defined in Data.Default.Class

Methods

def :: Ratio a #

Default a => Default (IO a) 
Instance details

Defined in Data.Default.Class

Methods

def :: IO a #

Default (Maybe a) 
Instance details

Defined in Data.Default.Class

Methods

def :: Maybe a #

Default [a] 
Instance details

Defined in Data.Default.Class

Methods

def :: [a] #

(Default a, Default b) => Default (a, b) 
Instance details

Defined in Data.Default.Class

Methods

def :: (a, b) #

Default r => Default (e -> r) 
Instance details

Defined in Data.Default.Class

Methods

def :: e -> r #

(Default a, Default b, Default c) => Default (a, b, c) 
Instance details

Defined in Data.Default.Class

Methods

def :: (a, b, c) #

(Default a, Default b, Default c, Default d) => Default (a, b, c, d) 
Instance details

Defined in Data.Default.Class

Methods

def :: (a, b, c, d) #

(Default a, Default b, Default c, Default d, Default e) => Default (a, b, c, d, e) 
Instance details

Defined in Data.Default.Class

Methods

def :: (a, b, c, d, e) #

(Default a, Default b, Default c, Default d, Default e, Default f) => Default (a, b, c, d, e, f) 
Instance details

Defined in Data.Default.Class

Methods

def :: (a, b, c, d, e, f) #

(Default a, Default b, Default c, Default d, Default e, Default f, Default g) => Default (a, b, c, d, e, f, g) 
Instance details

Defined in Data.Default.Class

Methods

def :: (a, b, c, d, e, f, g) #

class HasHttpManager a where #

Methods

getHttpManager :: a -> Manager #

Instances

Instances details
HasHttpManager App Source # 
Instance details

Defined in Foundation

HasHttpManager Manager 
Instance details

Defined in Network.HTTP.Client.Types

data Manager #

Keeps track of open connections for keep-alive.

If possible, you should share a single Manager between multiple threads and requests.

Since 0.1.0

Instances

Instances details
HasHttpManager Manager 
Instance details

Defined in Network.HTTP.Client.Types

data ProxyOverride #

How the HTTP proxy server settings should be discovered.

Since 0.4.7

data ManagerSettings #

Settings for a Manager. Please use the defaultManagerSettings function and then modify individual settings. For more information, see http://www.yesodweb.com/book/settings-types.

Since 0.1.0

data Response body #

A simple representation of the HTTP response.

Since 0.1.0

Instances

Instances details
Foldable Response 
Instance details

Defined in Network.HTTP.Client.Types

Methods

fold :: Monoid m => Response m -> m #

foldMap :: Monoid m => (a -> m) -> Response a -> m #

foldMap' :: Monoid m => (a -> m) -> Response a -> m #

foldr :: (a -> b -> b) -> b -> Response a -> b #

foldr' :: (a -> b -> b) -> b -> Response a -> b #

foldl :: (b -> a -> b) -> b -> Response a -> b #

foldl' :: (b -> a -> b) -> b -> Response a -> b #

foldr1 :: (a -> a -> a) -> Response a -> a #

foldl1 :: (a -> a -> a) -> Response a -> a #

toList :: Response a -> [a] #

null :: Response a -> Bool #

length :: Response a -> Int #

elem :: Eq a => a -> Response a -> Bool #

maximum :: Ord a => Response a -> a #

minimum :: Ord a => Response a -> a #

sum :: Num a => Response a -> a #

product :: Num a => Response a -> a #

Traversable Response 
Instance details

Defined in Network.HTTP.Client.Types

Methods

traverse :: Applicative f => (a -> f b) -> Response a -> f (Response b) #

sequenceA :: Applicative f => Response (f a) -> f (Response a) #

mapM :: Monad m => (a -> m b) -> Response a -> m (Response b) #

sequence :: Monad m => Response (m a) -> m (Response a) #

Functor Response 
Instance details

Defined in Network.HTTP.Client.Types

Methods

fmap :: (a -> b) -> Response a -> Response b #

(<$) :: a -> Response b -> Response a #

Show body => Show (Response body) 
Instance details

Defined in Network.HTTP.Client.Types

Methods

showsPrec :: Int -> Response body -> ShowS #

show :: Response body -> String #

showList :: [Response body] -> ShowS #

data ResponseTimeout #

How to deal with timing out on retrieval of response headers.

Since: http-client-0.5.0

data Request #

All information on how to connect to a host and what should be sent in the HTTP request.

If you simply wish to download from a URL, see parseRequest.

The constructor for this data type is not exposed. Instead, you should use either the defaultRequest value, or parseRequest to construct from a URL, and then use the records below to make modifications. This approach allows http-client to add configuration options without breaking backwards compatibility.

For example, to construct a POST request, you could do something like:

initReq <- parseRequest "http://www.example.com/path"
let req = initReq
            { method = "POST"
            }

For more information, please see http://www.yesodweb.com/book/settings-types.

Since 0.1.0

Instances

Instances details
Show Request 
Instance details

Defined in Network.HTTP.Client.Types

type GivesPopper a = NeedsPopper a -> IO a #

A function which will provide a Popper to a NeedsPopper. This seemingly convoluted structure allows for creation of request bodies which allocate scarce resources in an exception safe manner.

Since 0.1.0

type NeedsPopper a = Popper -> IO a #

A function which must be provided with a Popper.

Since 0.1.0

type Popper = IO ByteString #

A function which generates successive chunks of a request body, provider a single empty bytestring when no more data is available.

Since 0.1.0

data RequestBody #

When using one of the RequestBodyStream / RequestBodyStreamChunked constructors, you must ensure that the GivesPopper can be called multiple times. Usually this is not a problem.

The RequestBodyStreamChunked will send a chunked request body. Note that not all servers support this. Only use RequestBodyStreamChunked if you know the server you're sending to supports chunked request bodies.

Since 0.1.0

Constructors

RequestBodyLBS ByteString 
RequestBodyBS ByteString 
RequestBodyBuilder Int64 Builder 
RequestBodyStream Int64 (GivesPopper ()) 
RequestBodyStreamChunked (GivesPopper ()) 
RequestBodyIO (IO RequestBody)

Allows creation of a RequestBody inside the IO monad, which is useful for making easier APIs (like setRequestBodyFile).

Since: http-client-0.4.28

data HttpExceptionContent #

Constructors

StatusCodeException (Response ()) ByteString

Generated by the parseUrlThrow function when the server returns a non-2XX response status code.

May include the beginning of the response body.

Since: http-client-0.5.0

TooManyRedirects [Response ByteString]

The server responded with too many redirects for a request.

Contains the list of encountered responses containing redirects in reverse chronological order; including last redirect, which triggered the exception and was not followed.

Since: http-client-0.5.0

OverlongHeaders

Either too many headers, or too many total bytes in a single header, were returned by the server, and the memory exhaustion protection in this library has kicked in.

Since: http-client-0.5.0

ResponseTimeout

The server took too long to return a response. This can be altered via responseTimeout or managerResponseTimeout.

Since: http-client-0.5.0

ConnectionTimeout

Attempting to connect to the server timed out.

Since: http-client-0.5.0

ConnectionFailure SomeException

An exception occurred when trying to connect to the server.

Since: http-client-0.5.0

InvalidStatusLine ByteString

The status line returned by the server could not be parsed.

Since: http-client-0.5.0

InvalidHeader ByteString

The given response header line could not be parsed

Since: http-client-0.5.0

InvalidRequestHeader ByteString

The given request header is not compliant (e.g. has newlines)

Since: http-client-0.5.14

InternalException SomeException

An exception was raised by an underlying library when performing the request. Most often, this is caused by a failing socket action or a TLS exception.

Since: http-client-0.5.0

ProxyConnectException ByteString Int Status

A non-200 status code was returned when trying to connect to the proxy server on the given host and port.

Since: http-client-0.5.0

NoResponseDataReceived

No response data was received from the server at all. This exception may deserve special handling within the library, since it may indicate that a pipelining has been used, and a connection thought to be open was in fact closed.

Since: http-client-0.5.0

TlsNotSupported

Exception thrown when using a Manager which does not have support for secure connections. Typically, you will want to use tlsManagerSettings from http-client-tls to overcome this.

Since: http-client-0.5.0

WrongRequestBodyStreamSize Word64 Word64

The request body provided did not match the expected size.

Provides the expected and actual size.

Since: http-client-0.4.31

ResponseBodyTooShort Word64 Word64

The returned response body is too short. Provides the expected size and actual size.

Since: http-client-0.5.0

InvalidChunkHeaders

A chunked response body had invalid headers.

Since: http-client-0.5.0

IncompleteHeaders

An incomplete set of response headers were returned.

Since: http-client-0.5.0

InvalidDestinationHost ByteString

The host we tried to connect to is invalid (e.g., an empty string).

HttpZlibException ZlibException

An exception was thrown when inflating a response body.

Since: http-client-0.5.0

InvalidProxyEnvironmentVariable Text Text

Values in the proxy environment variable were invalid. Provides the environment variable name and its value.

Since: http-client-0.5.0

ConnectionClosed

Attempted to use a Connection which was already closed

Since: http-client-0.5.0

InvalidProxySettings Text

Proxy settings are not valid (Windows specific currently) @since 0.5.7

data HttpException #

An exception which may be generated by this library

Since: http-client-0.5.0

Constructors

HttpExceptionRequest Request HttpExceptionContent

Most exceptions are specific to a Request. Inspect the HttpExceptionContent value for details on what occurred.

Since: http-client-0.5.0

InvalidUrlException String String

A URL (first field) is invalid for a given reason (second argument).

Since: http-client-0.5.0

data HistoriedResponse body #

A datatype holding information on redirected requests and the final response.

Since 0.4.1

Instances

Instances details
Foldable HistoriedResponse 
Instance details

Defined in Network.HTTP.Client

Methods

fold :: Monoid m => HistoriedResponse m -> m #

foldMap :: Monoid m => (a -> m) -> HistoriedResponse a -> m #

foldMap' :: Monoid m => (a -> m) -> HistoriedResponse a -> m #

foldr :: (a -> b -> b) -> b -> HistoriedResponse a -> b #

foldr' :: (a -> b -> b) -> b -> HistoriedResponse a -> b #

foldl :: (b -> a -> b) -> b -> HistoriedResponse a -> b #

foldl' :: (b -> a -> b) -> b -> HistoriedResponse a -> b #

foldr1 :: (a -> a -> a) -> HistoriedResponse a -> a #

foldl1 :: (a -> a -> a) -> HistoriedResponse a -> a #

toList :: HistoriedResponse a -> [a] #

null :: HistoriedResponse a -> Bool #

length :: HistoriedResponse a -> Int #

elem :: Eq a => a -> HistoriedResponse a -> Bool #

maximum :: Ord a => HistoriedResponse a -> a #

minimum :: Ord a => HistoriedResponse a -> a #

sum :: Num a => HistoriedResponse a -> a #

product :: Num a => HistoriedResponse a -> a #

Traversable HistoriedResponse 
Instance details

Defined in Network.HTTP.Client

Methods

traverse :: Applicative f => (a -> f b) -> HistoriedResponse a -> f (HistoriedResponse b) #

sequenceA :: Applicative f => HistoriedResponse (f a) -> f (HistoriedResponse a) #

mapM :: Monad m => (a -> m b) -> HistoriedResponse a -> m (HistoriedResponse b) #

sequence :: Monad m => HistoriedResponse (m a) -> m (HistoriedResponse a) #

Functor HistoriedResponse 
Instance details

Defined in Network.HTTP.Client

Generic (HistoriedResponse body) 
Instance details

Defined in Network.HTTP.Client

Associated Types

type Rep (HistoriedResponse body) :: Type -> Type #

Methods

from :: HistoriedResponse body -> Rep (HistoriedResponse body) x #

to :: Rep (HistoriedResponse body) x -> HistoriedResponse body #

Show body => Show (HistoriedResponse body) 
Instance details

Defined in Network.HTTP.Client

type Rep (HistoriedResponse body) 
Instance details

Defined in Network.HTTP.Client

type Rep (HistoriedResponse body) = D1 ('MetaData "HistoriedResponse" "Network.HTTP.Client" "http-client-0.7.16-AWeDs181duv2MX9bCXr6kL" 'False) (C1 ('MetaCons "HistoriedResponse" 'PrefixI 'True) (S1 ('MetaSel ('Just "hrRedirects") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Request, Response ByteString)]) :*: (S1 ('MetaSel ('Just "hrFinalRequest") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Request) :*: S1 ('MetaSel ('Just "hrFinalResponse") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Response body)))))

type ResponseHeaders = [Header] #

A list of Headers.

Same type as RequestHeaders, but useful to differentiate in type signatures.

type RequestHeaders = [Header] #

A list of Headers.

Same type as ResponseHeaders, but useful to differentiate in type signatures.

type Query = [QueryItem] #

A sequence of QueryItems.

type QueryItem = (ByteString, Maybe ByteString) #

An item from the query string, split up into two parts.

The second part should be Nothing if there was no key-value separator after the query item name.

Since: http-types-0.2.0

type ByteRanges = [ByteRange] #

A list of byte ranges.

Since: http-types-0.6.11

data ByteRange #

An individual byte range.

Negative indices are not allowed!

Since: http-types-0.6.11

Instances

Instances details
Data ByteRange

Since: http-types-0.8.4

Instance details

Defined in Network.HTTP.Types.Header

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ByteRange -> c ByteRange #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ByteRange #

toConstr :: ByteRange -> Constr #

dataTypeOf :: ByteRange -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ByteRange) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ByteRange) #

gmapT :: (forall b. Data b => b -> b) -> ByteRange -> ByteRange #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ByteRange -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ByteRange -> r #

gmapQ :: (forall d. Data d => d -> u) -> ByteRange -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ByteRange -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ByteRange -> m ByteRange #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteRange -> m ByteRange #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteRange -> m ByteRange #

Generic ByteRange 
Instance details

Defined in Network.HTTP.Types.Header

Associated Types

type Rep ByteRange :: Type -> Type #

Show ByteRange

Since: http-types-0.8.4

Instance details

Defined in Network.HTTP.Types.Header

Eq ByteRange

Since: http-types-0.8.4

Instance details

Defined in Network.HTTP.Types.Header

Ord ByteRange

Since: http-types-0.8.4

Instance details

Defined in Network.HTTP.Types.Header

type Rep ByteRange

Since: http-types-0.12.4

Instance details

Defined in Network.HTTP.Types.Header

type HeaderName = CI ByteString #

A case-insensitive name of a header field.

This is the part of the header field before the colon: HeaderName: some value

data StdMethod #

HTTP standard method (as defined by RFC 2616, and PATCH which is defined by RFC 5789).

Since: http-types-0.2.0

Constructors

GET 
POST 
HEAD 
PUT 
DELETE 
TRACE 
CONNECT 
OPTIONS 
PATCH

Since: http-types-0.8.0

Instances

Instances details
Data StdMethod

Since: http-types-0.12.4

Instance details

Defined in Network.HTTP.Types.Method

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> StdMethod -> c StdMethod #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c StdMethod #

toConstr :: StdMethod -> Constr #

dataTypeOf :: StdMethod -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c StdMethod) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c StdMethod) #

gmapT :: (forall b. Data b => b -> b) -> StdMethod -> StdMethod #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> StdMethod -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> StdMethod -> r #

gmapQ :: (forall d. Data d => d -> u) -> StdMethod -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> StdMethod -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> StdMethod -> m StdMethod #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> StdMethod -> m StdMethod #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> StdMethod -> m StdMethod #

Bounded StdMethod 
Instance details

Defined in Network.HTTP.Types.Method

Enum StdMethod 
Instance details

Defined in Network.HTTP.Types.Method

Generic StdMethod 
Instance details

Defined in Network.HTTP.Types.Method

Associated Types

type Rep StdMethod :: Type -> Type #

Ix StdMethod 
Instance details

Defined in Network.HTTP.Types.Method

Read StdMethod 
Instance details

Defined in Network.HTTP.Types.Method

Show StdMethod 
Instance details

Defined in Network.HTTP.Types.Method

Eq StdMethod 
Instance details

Defined in Network.HTTP.Types.Method

Ord StdMethod 
Instance details

Defined in Network.HTTP.Types.Method

type Rep StdMethod

Since: http-types-0.12.4

Instance details

Defined in Network.HTTP.Types.Method

type Rep StdMethod = D1 ('MetaData "StdMethod" "Network.HTTP.Types.Method" "http-types-0.12.4-7ravU9ZeEhYD9G3h69uf3" 'False) (((C1 ('MetaCons "GET" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "POST" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "HEAD" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PUT" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "DELETE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TRACE" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CONNECT" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "OPTIONS" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PATCH" 'PrefixI 'False) (U1 :: Type -> Type)))))

type Method = ByteString #

HTTP method (flat ByteString type).

data Status #

HTTP Status.

Only the statusCode is used for comparisons.

Please use mkStatus to create status codes from code and message, or the Enum instance or the status code constants (like ok200). There might be additional record members in the future.

Note that the Show instance is only for debugging.

Constructors

Status 

Instances

Instances details
Data Status

Since: http-types-0.12.4

Instance details

Defined in Network.HTTP.Types.Status

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Status -> c Status #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Status #

toConstr :: Status -> Constr #

dataTypeOf :: Status -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Status) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Status) #

gmapT :: (forall b. Data b => b -> b) -> Status -> Status #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Status -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Status -> r #

gmapQ :: (forall d. Data d => d -> u) -> Status -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Status -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Status -> m Status #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Status -> m Status #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Status -> m Status #

Bounded Status

Since: http-types-0.11

Instance details

Defined in Network.HTTP.Types.Status

Enum Status

Be advised, that when using the "enumFrom*" family of methods or ranges in lists, it will generate all possible status codes.

E.g. [status100 .. status200] generates Statuses of 100, 101, 102 .. 198, 199, 200

The statuses not included in this library will have an empty message.

Since: http-types-0.7.3

Instance details

Defined in Network.HTTP.Types.Status

Generic Status 
Instance details

Defined in Network.HTTP.Types.Status

Associated Types

type Rep Status :: Type -> Type #

Methods

from :: Status -> Rep Status x #

to :: Rep Status x -> Status #

Show Status 
Instance details

Defined in Network.HTTP.Types.Status

Eq Status

A Status is equal to another Status if the status codes are equal.

Instance details

Defined in Network.HTTP.Types.Status

Methods

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

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

Ord Status

Statuses are ordered according to their status codes only.

Instance details

Defined in Network.HTTP.Types.Status

type Rep Status

Since: http-types-0.12.4

Instance details

Defined in Network.HTTP.Types.Status

type Rep Status = D1 ('MetaData "Status" "Network.HTTP.Types.Status" "http-types-0.12.4-7ravU9ZeEhYD9G3h69uf3" 'False) (C1 ('MetaCons "Status" 'PrefixI 'True) (S1 ('MetaSel ('Just "statusCode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "statusMessage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)))

type PartialEscapeQuery = [PartialEscapeQueryItem] #

Query with some characters that should not be escaped.

General form: a=b&c=d:e+f&g=h

Since: http-types-0.12.1

type PartialEscapeQueryItem = (ByteString, [EscapeItem]) #

Partially escaped query item.

The key will always be encoded using 'urlEncode True', but the value will be encoded depending on which EscapeItems are used.

Since: http-types-0.12.1

data EscapeItem #

Section of a query item value that decides whether to use regular URL encoding (using 'urlEncode True') with QE, or to not encode anything with QN.

Since: http-types-0.12.1

Constructors

QE ByteString

will be URL encoded

QN ByteString

will NOT at all be URL encoded

type SimpleQueryItem = (ByteString, ByteString) #

Simplified query item type without support for parameter-less items.

Since: http-types-0.2.0

type QueryText = [(Text, Maybe Text)] #

Like Query, but with Text instead of ByteString (UTF8-encoded).

Since: http-types-0.5.2

class QueryLike a where #

Types which can, and commonly are, converted to Query are in this class.

You can use lists of simple key value pairs, with ByteString (strict, or lazy: ByteString), Text, or String as the key/value types. You can also have the value type lifted into a Maybe to support keys without values; and finally it is possible to put each pair into a Maybe for key-value pairs that aren't always present.

Since: http-types-0.7.0

Methods

toQuery :: a -> Query #

Convert to Query.

Instances

Instances details
(QueryKeyLike k, QueryValueLike v) => QueryLike [Maybe (k, v)] 
Instance details

Defined in Network.HTTP.Types.QueryLike

Methods

toQuery :: [Maybe (k, v)] -> Query #

(QueryKeyLike k, QueryValueLike v) => QueryLike [(k, v)] 
Instance details

Defined in Network.HTTP.Types.QueryLike

Methods

toQuery :: [(k, v)] -> Query #

data HttpVersion #

HTTP Version.

Note that the Show instance is intended merely for debugging.

Constructors

HttpVersion 

Fields

Instances

Instances details
Data HttpVersion

Since: http-types-0.12.4

Instance details

Defined in Network.HTTP.Types.Version

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HttpVersion -> c HttpVersion #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HttpVersion #

toConstr :: HttpVersion -> Constr #

dataTypeOf :: HttpVersion -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HttpVersion) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HttpVersion) #

gmapT :: (forall b. Data b => b -> b) -> HttpVersion -> HttpVersion #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HttpVersion -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HttpVersion -> r #

gmapQ :: (forall d. Data d => d -> u) -> HttpVersion -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HttpVersion -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HttpVersion -> m HttpVersion #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HttpVersion -> m HttpVersion #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HttpVersion -> m HttpVersion #

Generic HttpVersion 
Instance details

Defined in Network.HTTP.Types.Version

Associated Types

type Rep HttpVersion :: Type -> Type #

Show HttpVersion
>>> show http11
"HTTP/1.1"
Instance details

Defined in Network.HTTP.Types.Version

Eq HttpVersion 
Instance details

Defined in Network.HTTP.Types.Version

Ord HttpVersion 
Instance details

Defined in Network.HTTP.Types.Version

type Rep HttpVersion

Since: http-types-0.12.4

Instance details

Defined in Network.HTTP.Types.Version

type Rep HttpVersion = D1 ('MetaData "HttpVersion" "Network.HTTP.Types.Version" "http-types-0.12.4-7ravU9ZeEhYD9G3h69uf3" 'False) (C1 ('MetaCons "HttpVersion" 'PrefixI 'True) (S1 ('MetaSel ('Just "httpMajor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "httpMinor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)))

class Monad m => MonadLogger (m :: Type -> Type) #

A Monad which has the ability to log messages in some manner.

Instances

Instances details
MonadIO m => MonadLogger (LoggingT m) 
Instance details

Defined in Control.Monad.Logger

Methods

monadLoggerLog :: ToLogStr msg => Loc -> LogSource -> LogLevel -> msg -> LoggingT m () #

Monad m => MonadLogger (NoLoggingT m) 
Instance details

Defined in Control.Monad.Logger

Methods

monadLoggerLog :: ToLogStr msg => Loc -> LogSource -> LogLevel -> msg -> NoLoggingT m () #

Monad m => MonadLogger (WriterLoggingT m) 
Instance details

Defined in Control.Monad.Logger

Methods

monadLoggerLog :: ToLogStr msg => Loc -> LogSource -> LogLevel -> msg -> WriterLoggingT m () #

MonadLogger m => MonadLogger (ResourceT m) 
Instance details

Defined in Control.Monad.Logger

Methods

monadLoggerLog :: ToLogStr msg => Loc -> LogSource -> LogLevel -> msg -> ResourceT m () #

MonadLogger m => MonadLogger (MaybeT m) 
Instance details

Defined in Control.Monad.Logger

Methods

monadLoggerLog :: ToLogStr msg => Loc -> LogSource -> LogLevel -> msg -> MaybeT m () #

MonadLogger (HandlerFor site) 
Instance details

Defined in Yesod.Core.Types

Methods

monadLoggerLog :: ToLogStr msg => Loc -> LogSource -> LogLevel -> msg -> HandlerFor site () #

MonadLogger (WidgetFor site) 
Instance details

Defined in Yesod.Core.Types

Methods

monadLoggerLog :: ToLogStr msg => Loc -> LogSource -> LogLevel -> msg -> WidgetFor site () #

MonadLogger m => MonadLogger (ExceptT e m) 
Instance details

Defined in Control.Monad.Logger

Methods

monadLoggerLog :: ToLogStr msg => Loc -> LogSource -> LogLevel -> msg -> ExceptT e m () #

MonadLogger m => MonadLogger (IdentityT m) 
Instance details

Defined in Control.Monad.Logger

Methods

monadLoggerLog :: ToLogStr msg => Loc -> LogSource -> LogLevel -> msg -> IdentityT m () #

MonadLogger m => MonadLogger (ReaderT r m) 
Instance details

Defined in Control.Monad.Logger

Methods

monadLoggerLog :: ToLogStr msg => Loc -> LogSource -> LogLevel -> msg -> ReaderT r m () #

MonadLogger m => MonadLogger (StateT s m) 
Instance details

Defined in Control.Monad.Logger

Methods

monadLoggerLog :: ToLogStr msg => Loc -> LogSource -> LogLevel -> msg -> StateT s m () #

MonadLogger m => MonadLogger (StateT s m) 
Instance details

Defined in Control.Monad.Logger

Methods

monadLoggerLog :: ToLogStr msg => Loc -> LogSource -> LogLevel -> msg -> StateT s m () #

(MonadLogger m, Monoid w) => MonadLogger (WriterT w m) 
Instance details

Defined in Control.Monad.Logger

Methods

monadLoggerLog :: ToLogStr msg => Loc -> LogSource -> LogLevel -> msg -> WriterT w m () #

(MonadLogger m, Monoid w) => MonadLogger (WriterT w m) 
Instance details

Defined in Control.Monad.Logger

Methods

monadLoggerLog :: ToLogStr msg => Loc -> LogSource -> LogLevel -> msg -> WriterT w m () #

MonadLogger (SubHandlerFor child master) 
Instance details

Defined in Yesod.Core.Types

Methods

monadLoggerLog :: ToLogStr msg => Loc -> LogSource -> LogLevel -> msg -> SubHandlerFor child master () #

MonadLogger m => MonadLogger (ConduitM i o m) 
Instance details

Defined in Control.Monad.Logger

Methods

monadLoggerLog :: ToLogStr msg => Loc -> LogSource -> LogLevel -> msg -> ConduitM i o m () #

MonadLogger m => MonadLogger (ContT r m) 
Instance details

Defined in Control.Monad.Logger

Methods

monadLoggerLog :: ToLogStr msg => Loc -> LogSource -> LogLevel -> msg -> ContT r m () #

(MonadLogger m, Monoid w) => MonadLogger (RWST r w s m) 
Instance details

Defined in Control.Monad.Logger

Methods

monadLoggerLog :: ToLogStr msg => Loc -> LogSource -> LogLevel -> msg -> RWST r w s m () #

(MonadLogger m, Monoid w) => MonadLogger (RWST r w s m) 
Instance details

Defined in Control.Monad.Logger

Methods

monadLoggerLog :: ToLogStr msg => Loc -> LogSource -> LogLevel -> msg -> RWST r w s m () #

MonadLogger m => MonadLogger (Pipe l i o u m) 
Instance details

Defined in Control.Monad.Logger

Methods

monadLoggerLog :: ToLogStr msg => Loc -> LogSource -> LogLevel -> msg -> Pipe l i o u m () #

data LogLevel #

Instances

Instances details
Read LogLevel 
Instance details

Defined in Control.Monad.Logger

Show LogLevel 
Instance details

Defined in Control.Monad.Logger

Eq LogLevel 
Instance details

Defined in Control.Monad.Logger

Ord LogLevel 
Instance details

Defined in Control.Monad.Logger

Lift LogLevel 
Instance details

Defined in Control.Monad.Logger

Methods

lift :: Quote m => LogLevel -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => LogLevel -> Code m LogLevel #

class PathMultiPiece s where #

Instances

Instances details
PersistEntity record => PathMultiPiece (ViaPersistEntity record) 
Instance details

Defined in Database.Persist.Class.PersistEntity

PathPiece a => PathMultiPiece [a] 
Instance details

Defined in Web.PathPieces

Methods

fromPathMultiPiece :: [Text] -> Maybe [a] #

toPathMultiPiece :: [a] -> [Text] #

class PathPiece s where #

Methods

fromPathPiece :: Text -> Maybe s #

toPathPiece :: s -> Text #

Instances

Instances details
PathPiece Int16 
Instance details

Defined in Web.PathPieces

PathPiece Int32 
Instance details

Defined in Web.PathPieces

PathPiece Int64 
Instance details

Defined in Web.PathPieces

PathPiece Int8 
Instance details

Defined in Web.PathPieces

PathPiece Word16 
Instance details

Defined in Web.PathPieces

PathPiece Word32 
Instance details

Defined in Web.PathPieces

PathPiece Word64 
Instance details

Defined in Web.PathPieces

PathPiece Word8 
Instance details

Defined in Web.PathPieces

PathPiece FilterP Source # 
Instance details

Defined in PathPiece

PathPiece SharedP Source # 
Instance details

Defined in PathPiece

PathPiece TagsP Source # 
Instance details

Defined in PathPiece

PathPiece UTCTimeStr Source # 
Instance details

Defined in Model

PathPiece UserNameP Source # 
Instance details

Defined in PathPiece

PathPiece BmSlug Source # 
Instance details

Defined in PathPiece

PathPiece NtSlug Source # 
Instance details

Defined in PathPiece

PathPiece PersistValue 
Instance details

Defined in Database.Persist.PersistValue

PathPiece Checkmark 
Instance details

Defined in Database.Persist.Types.Base

PathPiece Text 
Instance details

Defined in Web.PathPieces

PathPiece Text 
Instance details

Defined in Web.PathPieces

PathPiece Day 
Instance details

Defined in Web.PathPieces

PathPiece String 
Instance details

Defined in Web.PathPieces

PathPiece Integer 
Instance details

Defined in Web.PathPieces

PathPiece () 
Instance details

Defined in Web.PathPieces

Methods

fromPathPiece :: Text -> Maybe () #

toPathPiece :: () -> Text #

PathPiece Bool 
Instance details

Defined in Web.PathPieces

PathPiece Int 
Instance details

Defined in Web.PathPieces

PathPiece Word 
Instance details

Defined in Web.PathPieces

PathPiece (Key Bookmark) Source # 
Instance details

Defined in Model

PathPiece (Key BookmarkTag) Source # 
Instance details

Defined in Model

PathPiece (Key Note) Source # 
Instance details

Defined in Model

PathPiece (Key User) Source # 
Instance details

Defined in Model

PathPiece a => PathPiece (Maybe a) 
Instance details

Defined in Web.PathPieces

class PersistConfig c where #

Represents a value containing all the configuration options for a specific backend. This abstraction makes it easier to write code that can easily swap backends.

Minimal complete definition

loadConfig, createPoolConfig, runPool

Associated Types

type PersistConfigBackend c :: (Type -> Type) -> Type -> Type #

type PersistConfigPool c #

Methods

loadConfig :: Value -> Parser c #

Load the config settings from a Value, most likely taken from a YAML config file.

applyEnv :: c -> IO c #

Modify the config settings based on environment variables.

createPoolConfig :: c -> IO (PersistConfigPool c) #

Create a new connection pool based on the given config settings.

runPool :: MonadUnliftIO m => c -> PersistConfigBackend c m a -> PersistConfigPool c -> m a #

Run a database action by taking a connection from the pool.

type family PersistConfigBackend c :: (Type -> Type) -> Type -> Type #

Instances

Instances details
type PersistConfigBackend SqliteConf 
Instance details

Defined in Database.Persist.Sqlite

type PersistConfigBackend (Either c1 c2) 
Instance details

Defined in Database.Persist.Class.PersistConfig

type family PersistConfigPool c #

Instances

Instances details
type PersistConfigPool SqliteConf 
Instance details

Defined in Database.Persist.Sqlite

type PersistConfigPool (Either c1 c2) 
Instance details

Defined in Database.Persist.Class.PersistConfig

newtype ConstraintNameHS #

An ConstraintNameHS represents the Haskell-side name that persistent will use for a constraint.

Since: persistent-2.12.0.0

Constructors

ConstraintNameHS 

newtype ConstraintNameDB #

A ConstraintNameDB represents the datastore-side name that persistent will use for a constraint.

Since: persistent-2.12.0.0

Constructors

ConstraintNameDB 

Instances

Instances details
Read ConstraintNameDB 
Instance details

Defined in Database.Persist.Names

Show ConstraintNameDB 
Instance details

Defined in Database.Persist.Names

Eq ConstraintNameDB 
Instance details

Defined in Database.Persist.Names

Ord ConstraintNameDB 
Instance details

Defined in Database.Persist.Names

DatabaseName ConstraintNameDB

Since: persistent-2.12.0.0

Instance details

Defined in Database.Persist.Names

Methods

escapeWith :: (Text -> str) -> ConstraintNameDB -> str #

Lift ConstraintNameDB 
Instance details

Defined in Database.Persist.Names

Methods

lift :: Quote m => ConstraintNameDB -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => ConstraintNameDB -> Code m ConstraintNameDB #

newtype EntityNameDB #

An EntityNameDB represents the datastore-side name that persistent will use for an entity.

Since: persistent-2.12.0.0

Constructors

EntityNameDB 

Fields

newtype EntityNameHS #

An EntityNameHS represents the Haskell-side name that persistent will use for an entity.

Since: persistent-2.12.0.0

Constructors

EntityNameHS 

Fields

newtype FieldNameHS #

A FieldNameHS represents the Haskell-side name that persistent will use for a field.

Since: persistent-2.12.0.0

Constructors

FieldNameHS 

Fields

newtype FieldNameDB #

A FieldNameDB represents the datastore-side name that persistent will use for a field.

Since: persistent-2.12.0.0

Constructors

FieldNameDB 

Fields

Instances

Instances details
Read FieldNameDB 
Instance details

Defined in Database.Persist.Names

Show FieldNameDB 
Instance details

Defined in Database.Persist.Names

Eq FieldNameDB 
Instance details

Defined in Database.Persist.Names

Ord FieldNameDB 
Instance details

Defined in Database.Persist.Names

DatabaseName FieldNameDB

Since: persistent-2.12.0.0

Instance details

Defined in Database.Persist.Names

Methods

escapeWith :: (Text -> str) -> FieldNameDB -> str #

Lift FieldNameDB 
Instance details

Defined in Database.Persist.Names

Methods

lift :: Quote m => FieldNameDB -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => FieldNameDB -> Code m FieldNameDB #

class DatabaseName a where #

Convenience operations for working with '-NameDB' types.

Since: persistent-2.12.0.0

Methods

escapeWith :: (Text -> str) -> a -> str #

Instances

Instances details
DatabaseName ConstraintNameDB

Since: persistent-2.12.0.0

Instance details

Defined in Database.Persist.Names

Methods

escapeWith :: (Text -> str) -> ConstraintNameDB -> str #

DatabaseName EntityNameDB 
Instance details

Defined in Database.Persist.Names

Methods

escapeWith :: (Text -> str) -> EntityNameDB -> str #

DatabaseName FieldNameDB

Since: persistent-2.12.0.0

Instance details

Defined in Database.Persist.Names

Methods

escapeWith :: (Text -> str) -> FieldNameDB -> str #

data LiteralType #

A type that determines how a backend should handle the literal.

Since: persistent-2.12.0.0

Constructors

Escaped

The accompanying value will be escaped before inserting into the database. This is the correct default choice to use.

Since: persistent-2.12.0.0

Unescaped

The accompanying value will not be escaped when inserting into the database. This is potentially dangerous - use this with care.

Since: persistent-2.12.0.0

DbSpecific

The DbSpecific constructor corresponds to the legacy PersistDbSpecific constructor. We need to keep this around because old databases may have serialized JSON representations that reference this. We don't want to break the ability of a database to load rows.

Since: persistent-2.12.0.0

data PersistValue #

A raw value which can be stored in any backend and can be marshalled to and from a PersistField.

Constructors

PersistText Text 
PersistByteString ByteString 
PersistInt64 Int64 
PersistDouble Double 
PersistRational Rational 
PersistBool Bool 
PersistDay Day 
PersistTimeOfDay TimeOfDay 
PersistUTCTime UTCTime 
PersistNull 
PersistList [PersistValue] 
PersistMap [(Text, PersistValue)] 
PersistObjectId ByteString

Intended especially for MongoDB backend

PersistArray [PersistValue]

Intended especially for PostgreSQL backend for text arrays

PersistLiteral_ LiteralType ByteString

This constructor is used to specify some raw literal value for the backend. The LiteralType value specifies how the value should be escaped. This can be used to make special, custom types avaialable in the back end.

Since: persistent-2.12.0.0

Bundled Patterns

pattern PersistLiteral :: ByteString -> PersistValue

This pattern synonym used to be a data constructor on PersistValue, but was changed into a catch-all pattern synonym to allow backwards compatiblity with database types. See the documentation on PersistDbSpecific for more details.

Since: persistent-2.12.0.0

pattern PersistLiteralEscaped :: ByteString -> PersistValue

This pattern synonym used to be a data constructor on PersistValue, but was changed into a catch-all pattern synonym to allow backwards compatiblity with database types. See the documentation on PersistDbSpecific for more details.

Since: persistent-2.12.0.0

pattern PersistDbSpecific :: ByteString -> PersistValue

This pattern synonym used to be a data constructor for the PersistValue type. It was changed to be a pattern so that JSON-encoded database values could be parsed into their corresponding values. You should not use this, and instead prefer to pattern match on PersistLiteral_ directly.

If you use this, it will overlap a patern match on the 'PersistLiteral_, PersistLiteral, and PersistLiteralEscaped patterns. If you need to disambiguate between these constructors, pattern match on PersistLiteral_ directly.

Since: persistent-2.12.0.0

Instances

Instances details
FromJSON PersistValue 
Instance details

Defined in Database.Persist.PersistValue

ToJSON PersistValue 
Instance details

Defined in Database.Persist.PersistValue

Read PersistValue 
Instance details

Defined in Database.Persist.PersistValue

Show PersistValue 
Instance details

Defined in Database.Persist.PersistValue

NFData PersistValue

Since: persistent-2.14.4.0

Instance details

Defined in Database.Persist.PersistValue

Methods

rnf :: PersistValue -> () #

Eq PersistValue 
Instance details

Defined in Database.Persist.PersistValue

Ord PersistValue 
Instance details

Defined in Database.Persist.PersistValue

FromHttpApiData PersistValue 
Instance details

Defined in Database.Persist.PersistValue

ToHttpApiData PersistValue 
Instance details

Defined in Database.Persist.PersistValue

PathPiece PersistValue 
Instance details

Defined in Database.Persist.PersistValue

PersistField PersistValue 
Instance details

Defined in Database.Persist.Class.PersistField

PersistFieldSql PersistValue 
Instance details

Defined in Database.Persist.Sql.Class

data FieldDef #

A FieldDef represents the inormation that persistent knows about a field of a datatype. This includes information used to parse the field out of the database and what the field corresponds to.

Constructors

FieldDef 

Fields

Instances

Instances details
Read FieldDef 
Instance details

Defined in Database.Persist.Types.Base

Show FieldDef 
Instance details

Defined in Database.Persist.Types.Base

Eq FieldDef 
Instance details

Defined in Database.Persist.Types.Base

Ord FieldDef 
Instance details

Defined in Database.Persist.Types.Base

Lift FieldDef 
Instance details

Defined in Database.Persist.Types.Base

Methods

lift :: Quote m => FieldDef -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => FieldDef -> Code m FieldDef #

type family BackendSpecificUpdate backend record #

type family BackendSpecificFilter backend record #

data SqlType #

A SQL data type. Naming attempts to reflect the underlying Haskell datatypes, eg SqlString instead of SqlVarchar. Different SQL databases may have different translations for these types.

Constructors

SqlString 
SqlInt32 
SqlInt64 
SqlReal 
SqlNumeric Word32 Word32 
SqlBool 
SqlDay 
SqlTime 
SqlDayTime

Always uses UTC timezone

SqlBlob 
SqlOther Text

a backend-specific name

Instances

Instances details
Read SqlType 
Instance details

Defined in Database.Persist.Types.Base

Show SqlType 
Instance details

Defined in Database.Persist.Types.Base

Eq SqlType 
Instance details

Defined in Database.Persist.Types.Base

Methods

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

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

Ord SqlType 
Instance details

Defined in Database.Persist.Types.Base

Lift SqlType 
Instance details

Defined in Database.Persist.Types.Base

Methods

lift :: Quote m => SqlType -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => SqlType -> Code m SqlType #

data FieldCascade #

This datatype describes how a foreign reference field cascades deletes or updates.

This type is used in both parsing the model definitions and performing migrations. A Nothing in either of the field values means that the user has not specified a CascadeAction. An unspecified CascadeAction is defaulted to Restrict when doing migrations.

Since: persistent-2.11.0

data ForeignDef #

Constructors

ForeignDef 

Fields

type ForeignFieldDef = (FieldNameHS, FieldNameDB) #

Used instead of FieldDef to generate a smaller amount of code

data UniqueDef #

Type for storing the Uniqueness constraint in the Schema. Assume you have the following schema with a uniqueness constraint:

Person
  name String
  age Int
  UniqueAge age

This will be represented as:

UniqueDef
    { uniqueHaskell = ConstraintNameHS (packPTH UniqueAge)
    , uniqueDBName = ConstraintNameDB (packPTH "unique_age")
    , uniqueFields = [(FieldNameHS (packPTH "age"), FieldNameDB (packPTH "age"))]
    , uniqueAttrs = []
    }

data EmbedFieldDef #

An EmbedFieldDef is the same as a FieldDef But it is only used for embeddedFields so it only has data needed for embedding

Constructors

EmbedFieldDef 

data EmbedEntityDef #

An EmbedEntityDef is the same as an EntityDef But it is only used for fieldReference so it only has data needed for embedding

data ReferenceDef #

There are 3 kinds of references 1) composite (to fields that exist in the record) 2) single field 3) embedded

Constructors

NoReference 
ForeignRef !EntityNameHS

A ForeignRef has a late binding to the EntityDef it references via name and has the Haskell type of the foreign key in the form of FieldType

EmbedRef EntityNameHS 
SelfReference

A SelfReference stops an immediate cycle which causes non-termination at compile-time (issue #311).

data FieldType #

A FieldType describes a field parsed from the QuasiQuoter and is used to determine the Haskell type in the generated code.

name Text parses into FTTypeCon Nothing Text

name T.Text parses into FTTypeCon (Just T Text)

name (Jsonb User) parses into:

FTApp (FTTypeCon Nothing Jsonb) (FTTypeCon Nothing User)

data FieldAttr #

Attributes that may be attached to fields that can affect migrations and serialization in backend-specific ways.

While we endeavor to, we can't forsee all use cases for all backends, and so FieldAttr is extensible through its constructor FieldAttrOther.

Since: persistent-2.11.0.0

Constructors

FieldAttrMaybe

The Maybe keyword goes after the type. This indicates that the column is nullable, and the generated Haskell code will have a Maybe type for it.

Example:

User
    name Text Maybe
FieldAttrNullable

This indicates that the column is nullable, but should not have a Maybe type. For this to work out, you need to ensure that the PersistField instance for the type in question can support a PersistNull value.

data What = NoWhat | Hello Text

instance PersistField What where
    fromPersistValue PersistNull =
        pure NoWhat
    fromPersistValue pv =
        Hello $ fromPersistValue pv

instance PersistFieldSql What where
    sqlType _ = SqlString

User
    what What nullable
FieldAttrMigrationOnly

This tag means that the column will not be present on the Haskell code, but will not be removed from the database. Useful to deprecate fields in phases.

You should set the column to be nullable in the database. Otherwise, inserts won't have values.

User
    oldName Text MigrationOnly
    newName Text
FieldAttrSafeToRemove

A SafeToRemove attribute is not present on the Haskell datatype, and the backend migrations should attempt to drop the column without triggering any unsafe migration warnings.

Useful after you've used MigrationOnly to remove a column from the database in phases.

User
    oldName Text SafeToRemove
    newName Text
FieldAttrNoreference

This attribute indicates that we should not create a foreign key reference from a column. By default, persistent will try and create a foreign key reference for a column if it can determine that the type of the column is a Key entity or an EntityId and the Entity's name was present in mkPersist.

This is useful if you want to use the explicit foreign key syntax.

Post
    title    Text

Comment
    postId   PostId      noreference
    Foreign Post fk_comment_post postId
FieldAttrReference Text

This is set to specify precisely the database table the column refers to.

Post
    title    Text

Comment
    postId   PostId references="post"

You should not need this - persistent should be capable of correctly determining the target table's name. If you do need this, please file an issue describing why.

FieldAttrConstraint Text

Specify a name for the constraint on the foreign key reference for this table.

Post
    title    Text

Comment
    postId   PostId constraint="my_cool_constraint_name"
FieldAttrDefault Text

Specify the default value for a column.

User
    createdAt    UTCTime     default="NOW()"

Note that a default= attribute does not mean you can omit the value while inserting.

FieldAttrSqltype Text

Specify a custom SQL type for the column. Generally, you should define a custom datatype with a custom PersistFieldSql instance instead of using this.

User
    uuid     Text    sqltype=UUID
FieldAttrMaxlen Integer

Set a maximum length for a column. Useful for VARCHAR and indexes.

User
    name     Text    maxlen=200

    UniqueName name
FieldAttrSql Text

Specify the database name of the column.

User
    blarghle     Int     sql="b_l_a_r_g_h_l_e"

Useful for performing phased migrations, where one column is renamed to another column over time.

FieldAttrOther Text

A grab bag of random attributes that were unrecognized by the parser.

type Attr = Text #

type ExtraLine = [Text] #

data EntityIdDef #

The definition for the entity's primary key ID.

Since: persistent-2.13.0.0

Constructors

EntityIdField !FieldDef

The entity has a single key column, and it is a surrogate key - that is, you can't go from rec -> Key rec.

Since: persistent-2.13.0.0

EntityIdNaturalKey !CompositeDef

The entity has a natural key. This means you can write rec -> Key rec because all the key fields are present on the datatype.

A natural key can have one or more columns.

Since: persistent-2.13.0.0

data EntityDef #

An EntityDef represents the information that persistent knows about an Entity. It uses this information to generate the Haskell datatype, the SQL migrations, and other relevant conversions.

data WhyNullable #

The reason why a field is nullable is very important. A field that is nullable because of a Maybe tag will have its type changed from A to Maybe A. OTOH, a field that is nullable because of a nullable tag will remain with the same type.

Instances

Instances details
Show WhyNullable 
Instance details

Defined in Database.Persist.Types.Base

Eq WhyNullable 
Instance details

Defined in Database.Persist.Types.Base

data IsNullable #

Instances

Instances details
Show IsNullable 
Instance details

Defined in Database.Persist.Types.Base

Eq IsNullable 
Instance details

Defined in Database.Persist.Types.Base

data Checkmark #

A Checkmark should be used as a field type whenever a uniqueness constraint should guarantee that a certain kind of record may appear at most once, but other kinds of records may appear any number of times.

NOTE: You need to mark any Checkmark fields as nullable (see the following example).

For example, suppose there's a Location entity that represents where a user has lived:

Location
    user    UserId
    name    Text
    current Checkmark nullable

    UniqueLocation user current

The UniqueLocation constraint allows any number of Inactive Locations to be current. However, there may be at most one current Location per user (i.e., either zero or one per user).

This data type works because of the way that SQL treats NULLable fields within uniqueness constraints. The SQL standard says that NULL values should be considered different, so we represent Inactive as SQL NULL, thus allowing any number of Inactive records. On the other hand, we represent Active as TRUE, so the uniqueness constraint will disallow more than one Active record.

Note: There may be DBMSs that do not respect the SQL standard's treatment of NULL values on uniqueness constraints, please check if this data type works before relying on it.

The SQL BOOLEAN type is used because it's the smallest data type available. Note that we never use FALSE, just TRUE and NULL. Provides the same behavior Maybe () would if () was a valid PersistField.

Constructors

Active

When used on a uniqueness constraint, there may be at most one Active record.

Inactive

When used on a uniqueness constraint, there may be any number of Inactive records.

Instances

Instances details
Bounded Checkmark 
Instance details

Defined in Database.Persist.Types.Base

Enum Checkmark 
Instance details

Defined in Database.Persist.Types.Base

Read Checkmark 
Instance details

Defined in Database.Persist.Types.Base

Show Checkmark 
Instance details

Defined in Database.Persist.Types.Base

Eq Checkmark 
Instance details

Defined in Database.Persist.Types.Base

Ord Checkmark 
Instance details

Defined in Database.Persist.Types.Base

FromHttpApiData Checkmark 
Instance details

Defined in Database.Persist.Types.Base

ToHttpApiData Checkmark 
Instance details

Defined in Database.Persist.Types.Base

PathPiece Checkmark 
Instance details

Defined in Database.Persist.Types.Base

PersistField Checkmark 
Instance details

Defined in Database.Persist.Class.PersistField

PersistFieldSql Checkmark 
Instance details

Defined in Database.Persist.Sql.Class

newtype OverflowNatural #

Prior to persistent-2.11.0, we provided an instance of PersistField for the Natural type. This was in error, because Natural represents an infinite value, and databases don't have reasonable types for this.

The instance for Natural used the Int64 underlying type, which will cause underflow and overflow errors. This type has the exact same code in the instances, and will work seamlessly.

A more appropriate type for this is the Word series of types from Data.Word. These have a bounded size, are guaranteed to be non-negative, and are quite efficient for the database to store.

Since: persistent-2.11.0

Constructors

OverflowNatural 

Instances

Instances details
Num OverflowNatural 
Instance details

Defined in Database.Persist.Class.PersistField

Show OverflowNatural 
Instance details

Defined in Database.Persist.Class.PersistField

Eq OverflowNatural 
Instance details

Defined in Database.Persist.Class.PersistField

Ord OverflowNatural 
Instance details

Defined in Database.Persist.Class.PersistField

PersistField OverflowNatural 
Instance details

Defined in Database.Persist.Class.PersistField

PersistFieldSql OverflowNatural

This type uses the SqlInt64 version, which will exhibit overflow and underflow behavior. Additionally, it permits negative values in the database, which isn't ideal.

Since: persistent-2.11.0

Instance details

Defined in Database.Persist.Sql.Class

class PersistField a where #

This class teaches Persistent how to take a custom type and marshal it to and from a PersistValue, allowing it to be stored in a database.

Examples

Expand
Simple Newtype

You can use newtype to add more type safety/readability to a basis type like ByteString. In these cases, just derive PersistField and PersistFieldSql:

{-# LANGUAGE GeneralizedNewtypeDeriving #-}

newtype HashedPassword = HashedPassword ByteString
  deriving (Eq, Show, PersistField, PersistFieldSql)
Smart Constructor Newtype

In this example, we create a PersistField instance for a newtype following the "Smart Constructor" pattern.

{-# LANGUAGE GeneralizedNewtypeDeriving #-}
import qualified Data.Text as T
import qualified Data.Char as C

-- | An American Social Security Number
newtype SSN = SSN ErrorMessage
 deriving (Eq, Show, PersistFieldSql)

mkSSN :: ErrorMessage -> Either ErrorMessage SSN
mkSSN t = if (T.length t == 9) && (T.all C.isDigit t)
 then Right $ SSN t
 else Left $ "Invalid SSN: " <> t

instance PersistField SSN where
  toPersistValue (SSN t) = PersistText t
  fromPersistValue (PersistText t) = mkSSN t
  -- Handle cases where the database does not give us PersistText
  fromPersistValue x = Left $ "File.hs: When trying to deserialize an SSN: expected PersistText, received: " <> T.pack (show x)

Tips:

  • This file contain dozens of PersistField instances you can look at for examples.
  • Typically custom PersistField instances will only accept a single PersistValue constructor in fromPersistValue.
  • Internal PersistField instances accept a wide variety of PersistValues to accomodate e.g. storing booleans as integers, booleans or strings.
  • If you're making a custom instance and using a SQL database, you'll also need PersistFieldSql to specify the type of the database column.

Instances

Instances details
PersistField Int16 
Instance details

Defined in Database.Persist.Class.PersistField

PersistField Int32 
Instance details

Defined in Database.Persist.Class.PersistField

PersistField Int64 
Instance details

Defined in Database.Persist.Class.PersistField

PersistField Int8 
Instance details

Defined in Database.Persist.Class.PersistField

PersistField Rational 
Instance details

Defined in Database.Persist.Class.PersistField

PersistField Word16 
Instance details

Defined in Database.Persist.Class.PersistField

PersistField Word32 
Instance details

Defined in Database.Persist.Class.PersistField

PersistField Word64 
Instance details

Defined in Database.Persist.Class.PersistField

PersistField Word8 
Instance details

Defined in Database.Persist.Class.PersistField

PersistField Html 
Instance details

Defined in Database.Persist.Class.PersistField

PersistField ByteString 
Instance details

Defined in Database.Persist.Class.PersistField

PersistField Bookmark Source # 
Instance details

Defined in Model

PersistField BookmarkTag Source # 
Instance details

Defined in Model

PersistField Note Source # 
Instance details

Defined in Model

PersistField User Source # 
Instance details

Defined in Model

PersistField BCrypt Source # 
Instance details

Defined in ModelCustom

PersistField BmSlug Source # 
Instance details

Defined in ModelCustom

PersistField HashedApiKey Source # 
Instance details

Defined in ModelCustom

PersistField NtSlug Source # 
Instance details

Defined in ModelCustom

PersistField OverflowNatural 
Instance details

Defined in Database.Persist.Class.PersistField

PersistField PersistValue 
Instance details

Defined in Database.Persist.Class.PersistField

PersistField Checkmark 
Instance details

Defined in Database.Persist.Class.PersistField

PersistField Text 
Instance details

Defined in Database.Persist.Class.PersistField

PersistField Text 
Instance details

Defined in Database.Persist.Class.PersistField

PersistField Day 
Instance details

Defined in Database.Persist.Class.PersistField

PersistField UTCTime 
Instance details

Defined in Database.Persist.Class.PersistField

PersistField TimeOfDay 
Instance details

Defined in Database.Persist.Class.PersistField

PersistField Textarea 
Instance details

Defined in Yesod.Form.Fields

(TypeError ((((('Text "The instance of PersistField for the Natural type was removed." ':$$: 'Text "Please see the documentation for OverflowNatural if you want to ") ':$$: 'Text "continue using the old behavior or want to see documentation on ") ':$$: 'Text "why the instance was removed.") ':$$: 'Text "") ':$$: 'Text "This error instance will be removed in a future release.") :: Constraint) => PersistField Natural 
Instance details

Defined in Database.Persist.Class.PersistField

PersistField Bool 
Instance details

Defined in Database.Persist.Class.PersistField

PersistField Double 
Instance details

Defined in Database.Persist.Class.PersistField

PersistField Int 
Instance details

Defined in Database.Persist.Class.PersistField

PersistField Word 
Instance details

Defined in Database.Persist.Class.PersistField

PersistField v => PersistField (IntMap v) 
Instance details

Defined in Database.Persist.Class.PersistField

(Ord a, PersistField a) => PersistField (Set a) 
Instance details

Defined in Database.Persist.Class.PersistField

(PersistEntity record, PersistField record, PersistField (Key record)) => PersistField (Entity record) 
Instance details

Defined in Database.Persist.Class.PersistEntity

PersistField (Key Bookmark) Source # 
Instance details

Defined in Model

PersistField (Key BookmarkTag) Source # 
Instance details

Defined in Model

PersistField (Key Note) Source # 
Instance details

Defined in Model

PersistField (Key User) Source # 
Instance details

Defined in Model

(BackendCompatible b s, PersistField (BackendKey b)) => PersistField (BackendKey (Compatible b s)) 
Instance details

Defined in Database.Persist.Compatible.Types

(PersistCore b, PersistCore (RawSqlite b), PersistField (BackendKey b)) => PersistField (BackendKey (RawSqlite b)) 
Instance details

Defined in Database.Persist.Sqlite

PersistField a => PersistField (Vector a) 
Instance details

Defined in Database.Persist.Class.PersistField

PersistField a => PersistField (Maybe a) 
Instance details

Defined in Database.Persist.Class.PersistField

PersistField [Char] 
Instance details

Defined in Database.Persist.Class.PersistField

PersistField a => PersistField [a] 
Instance details

Defined in Database.Persist.Class.PersistField

HasResolution a => PersistField (Fixed a) 
Instance details

Defined in Database.Persist.Class.PersistField

PersistField v => PersistField (Map Text v) 
Instance details

Defined in Database.Persist.Class.PersistField

(PersistField a, PersistField b) => PersistField (a, b) 
Instance details

Defined in Database.Persist.Class.PersistField

class SafeToInsert a #

A type class which is used to witness that a type is safe to insert into the database without providing a primary key.

The TemplateHaskell function mkPersist will generate instances of this class for any entity that it works on. If the entity has a default primary key, then it provides a regular instance. If the entity has a Primary natural key, then this works fine. But if the entity has an Id column with no default=, then this does a TypeError and forces the user to use insertKey.

Since: persistent-2.14.0.0

Instances

Instances details
SafeToInsert Bookmark Source # 
Instance details

Defined in Model

SafeToInsert BookmarkTag Source # 
Instance details

Defined in Model

SafeToInsert Note Source # 
Instance details

Defined in Model

SafeToInsert User Source # 
Instance details

Defined in Model

(TypeError (EntityErrorMessage a) :: Constraint) => SafeToInsert (Entity a) 
Instance details

Defined in Database.Persist.Class.PersistEntity

(TypeError (FunctionErrorMessage a b) :: Constraint) => SafeToInsert (a -> b) 
Instance details

Defined in Database.Persist.Class.PersistEntity

class SymbolToField (sym :: Symbol) rec typ | sym rec -> typ where #

This type class is used with the OverloadedLabels extension to provide a more convenient means of using the EntityField type. EntityField definitions are prefixed with the type name to avoid ambiguity, but this ambiguity can result in verbose code.

If you have a table User with a name Text field, then the corresponding EntityField is UserName. With this, we can write #name :: EntityField User Text.

What's more fun is that the type is more general: it's actually #name :: (SymbolToField "name" rec typ) => EntityField rec typ

Which means it is *polymorphic* over the actual record. This allows you to write code that can be generic over the tables, provided they have the right fields.

Since: persistent-2.11.0.0

Methods

symbolToField :: EntityField rec typ #

Instances

Instances details
SymbolToField "archiveDefault" User Bool Source # 
Instance details

Defined in Model

SymbolToField "bookmarkId" BookmarkTag BookmarkId Source # 
Instance details

Defined in Model

SymbolToField "created" Note UTCTime Source # 
Instance details

Defined in Model

SymbolToField "description" Bookmark Text Source # 
Instance details

Defined in Model

SymbolToField "extended" Bookmark Text Source # 
Instance details

Defined in Model

SymbolToField "href" Bookmark Text Source # 
Instance details

Defined in Model

SymbolToField "isMarkdown" Note Bool Source # 
Instance details

Defined in Model

SymbolToField "length" Note Int Source # 
Instance details

Defined in Model

SymbolToField "name" User Text Source # 
Instance details

Defined in Model

SymbolToField "passwordHash" User BCrypt Source # 
Instance details

Defined in Model

SymbolToField "privacyLock" User Bool Source # 
Instance details

Defined in Model

SymbolToField "privateDefault" User Bool Source # 
Instance details

Defined in Model

SymbolToField "selected" Bookmark Bool Source # 
Instance details

Defined in Model

SymbolToField "seq" BookmarkTag Int Source # 
Instance details

Defined in Model

SymbolToField "shared" Bookmark Bool Source # 
Instance details

Defined in Model

SymbolToField "shared" Note Bool Source # 
Instance details

Defined in Model

SymbolToField "slug" Bookmark BmSlug Source # 
Instance details

Defined in Model

SymbolToField "slug" Note NtSlug Source # 
Instance details

Defined in Model

SymbolToField "tag" BookmarkTag Text Source # 
Instance details

Defined in Model

SymbolToField "text" Note Text Source # 
Instance details

Defined in Model

SymbolToField "time" Bookmark UTCTime Source # 
Instance details

Defined in Model

SymbolToField "title" Note Text Source # 
Instance details

Defined in Model

SymbolToField "toRead" Bookmark Bool Source # 
Instance details

Defined in Model

SymbolToField "updated" Note UTCTime Source # 
Instance details

Defined in Model

SymbolToField "userId" Bookmark UserId Source # 
Instance details

Defined in Model

SymbolToField "userId" BookmarkTag UserId Source # 
Instance details

Defined in Model

SymbolToField "userId" Note UserId Source # 
Instance details

Defined in Model

SymbolToField "apiToken" User (Maybe HashedApiKey) Source # 
Instance details

Defined in Model

SymbolToField "archiveHref" Bookmark (Maybe Text) Source # 
Instance details

Defined in Model

SymbolToField "id" Bookmark (Key Bookmark) Source # 
Instance details

Defined in Model

SymbolToField "id" BookmarkTag (Key BookmarkTag) Source # 
Instance details

Defined in Model

SymbolToField "id" Note (Key Note) Source # 
Instance details

Defined in Model

SymbolToField "id" User (Key User) Source # 
Instance details

Defined in Model

data Entity record #

Datatype that represents an entity, with both its Key and its Haskell record representation.

When using a SQL-based backend (such as SQLite or PostgreSQL), an Entity may take any number of columns depending on how many fields it has. In order to reconstruct your entity on the Haskell side, persistent needs all of your entity columns and in the right order. Note that you don't need to worry about this when using persistent's API since everything is handled correctly behind the scenes.

However, if you want to issue a raw SQL command that returns an Entity, then you have to be careful with the column order. While you could use SELECT Entity.* WHERE ... and that would work most of the time, there are times when the order of the columns on your database is different from the order that persistent expects (for example, if you add a new field in the middle of you entity definition and then use the migration code -- persistent will expect the column to be in the middle, but your DBMS will put it as the last column). So, instead of using a query like the one above, you may use rawSql (from the Database.Persist.Sql module) with its /entity selection placeholder/ (a double question mark ??). Using rawSql the query above must be written as SELECT ?? WHERE ... Then rawSql will replace ?? with the list of all columns that we need from your entity in the right order. If your query returns two entities (i.e. (Entity backend a, Entity backend b)), then you must you use SELECT ??, ?? WHERE ..., and so on.

Constructors

Entity 

Fields

Instances

Instances details
(PersistEntity rec, PersistField typ, SymbolToField sym rec typ) => HasField (sym :: Symbol) (SqlExpr (Entity rec)) (SqlExpr (Value typ))

This instance allows you to use record.field notation with GHC 9.2's OverloadedRecordDot extension.

Example:

-- persistent model:
BlogPost
    authorId     PersonId
    title        Text

-- query:
select $ do
    bp <- from $ table @BlogPost
    pure $ bp.title

This is exactly equivalent to the following:

blogPost :: SqlExpr (Entity BlogPost)

blogPost ^. BlogPostTitle
blogPost ^. #title
blogPost.title

There's another instance defined on SqlExpr (Entity (Maybe rec)), which allows you to project from a LEFT JOINed entity.

Since: esqueleto-3.5.4.0

Instance details

Defined in Database.Esqueleto.Internal.Internal

Methods

getField :: SqlExpr (Entity rec) -> SqlExpr (Value typ) #

(PersistEntity rec, PersistField typ, SymbolToField sym rec typ) => HasField (sym :: Symbol) (SqlExpr (Maybe (Entity rec))) (SqlExpr (Value (Maybe typ)))

This instance allows you to use record.field notation with GC 9.2's OverloadedRecordDot extension.

Example:

-- persistent model:
Person
    name         Text

BlogPost
    title        Text
    authorId     PersonId

-- query:

select $ do
    (p :& bp) <- from $
        table Person
        leftJoin table BlogPost
        on do
            \(p :& bp) ->
                just p.id ==. bp.authorId
    pure (p.name, bp.title)

The following forms are all equivalent:

blogPost :: SqlExpr (Maybe (Entity BlogPost))

blogPost ?. BlogPostTitle
blogPost ?. #title
blogPost.title

Since: esqueleto-3.5.4.0

Instance details

Defined in Database.Esqueleto.Internal.Internal

Methods

getField :: SqlExpr (Maybe (Entity rec)) -> SqlExpr (Value (Maybe typ)) #

FromJSON (Entity Bookmark) Source # 
Instance details

Defined in Model

FromJSON (Entity BookmarkTag) Source # 
Instance details

Defined in Model

FromJSON (Entity Note) Source # 
Instance details

Defined in Model

FromJSON (Entity User) Source # 
Instance details

Defined in Model

ToJSON (Entity Bookmark) Source # 
Instance details

Defined in Model

ToJSON (Entity BookmarkTag) Source # 
Instance details

Defined in Model

ToJSON (Entity Note) Source # 
Instance details

Defined in Model

ToJSON (Entity User) Source # 
Instance details

Defined in Model

(Generic (Key record), Generic record) => Generic (Entity record) 
Instance details

Defined in Database.Persist.Class.PersistEntity

Associated Types

type Rep (Entity record) :: Type -> Type #

Methods

from :: Entity record -> Rep (Entity record) x #

to :: Rep (Entity record) x -> Entity record #

(Read (Key record), Read record) => Read (Entity record) 
Instance details

Defined in Database.Persist.Class.PersistEntity

Methods

readsPrec :: Int -> ReadS (Entity record) #

readList :: ReadS [Entity record] #

readPrec :: ReadPrec (Entity record) #

readListPrec :: ReadPrec [Entity record] #

(Show (Key record), Show record) => Show (Entity record) 
Instance details

Defined in Database.Persist.Class.PersistEntity

Methods

showsPrec :: Int -> Entity record -> ShowS #

show :: Entity record -> String #

showList :: [Entity record] -> ShowS #

ToAlias (SqlExpr (Entity a)) 
Instance details

Defined in Database.Esqueleto.Experimental.ToAlias

Methods

toAlias :: SqlExpr (Entity a) -> SqlQuery (SqlExpr (Entity a)) #

ToAlias (SqlExpr (Maybe (Entity a))) 
Instance details

Defined in Database.Esqueleto.Experimental.ToAlias

Methods

toAlias :: SqlExpr (Maybe (Entity a)) -> SqlQuery (SqlExpr (Maybe (Entity a))) #

ToAliasReference (SqlExpr (Entity a)) 
Instance details

Defined in Database.Esqueleto.Experimental.ToAliasReference

ToAliasReference (SqlExpr (Maybe (Entity a))) 
Instance details

Defined in Database.Esqueleto.Experimental.ToAliasReference

ToMaybe (SqlExpr (Entity a)) 
Instance details

Defined in Database.Esqueleto.Experimental.ToMaybe

Associated Types

type ToMaybeT (SqlExpr (Entity a)) #

Methods

toMaybe :: SqlExpr (Entity a) -> ToMaybeT (SqlExpr (Entity a)) #

FromPreprocess (SqlExpr (Entity val)) => From (SqlExpr (Entity val)) 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Methods

from_ :: SqlQuery (SqlExpr (Entity val)) #

FromPreprocess (SqlExpr (Maybe (Entity val))) => From (SqlExpr (Maybe (Entity val))) 
Instance details

Defined in Database.Esqueleto.Internal.Internal

Methods

from_ :: SqlQuery (SqlExpr (Maybe (Entity val))) #

(PersistEntity val, BackendCompatible SqlBackend (PersistEntityBackend val)) => FromPreprocess (SqlExpr (Entity val)) 
Instance details

Defined in Database.Esqueleto.Internal.Internal

(PersistEntity val, BackendCompatible SqlBackend (PersistEntityBackend val)) => FromPreprocess (SqlExpr (Maybe (Entity val))) 
Instance details

Defined in Database.Esqueleto.Internal.Internal

PersistEntity val => LockableEntity (SqlExpr (Entity val)) 
Instance details

Defined in Database.Esqueleto.Internal.Internal

(Eq (Key record), Eq record) => Eq (Entity record) 
Instance details

Defined in Database.Persist.Class.PersistEntity

Methods

(==) :: Entity record -> Entity record -> Bool #

(/=) :: Entity record -> Entity record -> Bool #

(Ord (Key record), Ord record) => Ord (Entity record) 
Instance details

Defined in Database.Persist.Class.PersistEntity

Methods

compare :: Entity record -> Entity record -> Ordering #

(<) :: Entity record -> Entity record -> Bool #

(<=) :: Entity record -> Entity record -> Bool #

(>) :: Entity record -> Entity record -> Bool #

(>=) :: Entity record -> Entity record -> Bool #

max :: Entity record -> Entity record -> Entity record #

min :: Entity record -> Entity record -> Entity record #

(TypeError (EntityErrorMessage a) :: Constraint) => SafeToInsert (Entity a) 
Instance details

Defined in Database.Persist.Class.PersistEntity

(PersistEntity record, PersistField record, PersistField (Key record)) => PersistField (Entity record) 
Instance details

Defined in Database.Persist.Class.PersistEntity

(PersistField record, PersistEntity record) => PersistFieldSql (Entity record) 
Instance details

Defined in Database.Persist.Sql.Class

Methods

sqlType :: Proxy (Entity record) -> SqlType #

(PersistEntity record, PersistEntityBackend record ~ backend, IsPersistBackend backend) => RawSql (Entity record) 
Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> Entity record -> (Int, [Text]) #

rawSqlColCountReason :: Entity record -> String #

rawSqlProcessRow :: [PersistValue] -> Either Text (Entity record) #

PersistEntity ent => ToFrom (Table ent) (SqlExpr (Entity ent)) 
Instance details

Defined in Database.Esqueleto.Experimental.From

Methods

toFrom :: Table ent -> From (SqlExpr (Entity ent)) #

PersistEntity a => SqlSelect (SqlExpr (Entity a)) (Entity a)

You may return an Entity from a select query.

Instance details

Defined in Database.Esqueleto.Internal.Internal

PersistEntity a => SqlSelect (SqlExpr (Maybe (Entity a))) (Maybe (Entity a))

You may return a possibly-NULL Entity from a select query.

Instance details

Defined in Database.Esqueleto.Internal.Internal

type Rep (Entity record) 
Instance details

Defined in Database.Persist.Class.PersistEntity

type Rep (Entity record) = D1 ('MetaData "Entity" "Database.Persist.Class.PersistEntity" "persistent-2.14.6.0-3I5zQUddzkt3mMmi5XNQpK" 'False) (C1 ('MetaCons "Entity" 'PrefixI 'True) (S1 ('MetaSel ('Just "entityKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Key record)) :*: S1 ('MetaSel ('Just "entityVal") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 record)))
type ToMaybeT (SqlExpr (Entity a)) 
Instance details

Defined in Database.Esqueleto.Experimental.ToMaybe

data FilterValue typ where #

Value to filter with. Highly dependant on the type of filter used.

Since: persistent-2.10.0

Constructors

FilterValue :: forall typ. typ -> FilterValue typ 
FilterValues :: forall typ. [typ] -> FilterValue typ 
UnsafeValue :: forall a typ. PersistField a => a -> FilterValue typ 

data Filter record #

Filters which are available for select, updateWhere and deleteWhere. Each filter constructor specifies the field being filtered on, the type of comparison applied (equals, not equals, etc) and the argument for the comparison.

Persistent users use combinators to create these.

Note that it's important to be careful about the PersistFilter that you are using, if you use this directly. For example, using the In PersistFilter requires that you have an array- or list-shaped EntityField. It is possible to construct values using this that will create malformed runtime values.

Constructors

PersistField typ => Filter 
FilterAnd [Filter record]

convenient for internal use, not needed for the API

FilterOr [Filter record] 
BackendFilter (BackendSpecificFilter (PersistEntityBackend record) record) 

data SelectOpt record #

Query options.

Persistent users use these directly.

Constructors

Asc (EntityField record typ) 
Desc (EntityField record typ) 
OffsetBy Int 
LimitTo Int 

data Update record #

Updating a database entity.

Persistent users use combinators to create these.

type family PersistEntityBackend record #

Persistent allows multiple different backends (databases).

Instances

Instances details
type PersistEntityBackend Bookmark Source # 
Instance details

Defined in Model

type PersistEntityBackend BookmarkTag Source # 
Instance details

Defined in Model

type PersistEntityBackend Note Source # 
Instance details

Defined in Model

type PersistEntityBackend User Source # 
Instance details

Defined in Model

data family EntityField record :: Type -> Type #

An EntityField is parameterised by the Haskell record it belongs to and the additional type of that field.

As of persistent-2.11.0.0, it's possible to use the OverloadedLabels language extension to refer to EntityField values polymorphically. See the documentation on SymbolToField for more information.

Instances

Instances details
SymbolToField sym rec typ => IsLabel sym (EntityField rec typ)

This instance delegates to SymbolToField to provide OverloadedLabels support to the EntityField type.

Since: persistent-2.11.0.0

Instance details

Defined in Database.Persist.Class.PersistEntity

Methods

fromLabel :: EntityField rec typ #

data EntityField Bookmark typ Source # 
Instance details

Defined in Model

data EntityField BookmarkTag typ Source # 
Instance details

Defined in Model

data EntityField Note typ Source # 
Instance details

Defined in Model

data EntityField Note typ
data EntityField User typ Source # 
Instance details

Defined in Model

class (Show (BackendKey backend), Read (BackendKey backend), Eq (BackendKey backend), Ord (BackendKey backend), PersistStoreRead backend, PersistField (BackendKey backend), ToJSON (BackendKey backend), FromJSON (BackendKey backend)) => PersistStoreWrite backend where #

Minimal complete definition

insert, insertKey, repsert, replace, delete, update

Methods

insert :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, SafeToInsert record) => record -> ReaderT backend m (Key record) #

Create a new record in the database, returning an automatically created key (in SQL an auto-increment id).

Example usage

Expand

Using schema-1 and dataset-1, let's insert a new user John.

insertJohn :: MonadIO m => ReaderT SqlBackend m (Key User)
insertJohn = insert $ User "John" 30
johnId <- insertJohn

The above query when applied on dataset-1, will produce this:

+-----+------+-----+
|id   |name  |age  |
+-----+------+-----+
|1    |SPJ   |40   |
+-----+------+-----+
|2    |Simon |41   |
+-----+------+-----+
|3    |John  |30   |
+-----+------+-----+

insert_ :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, SafeToInsert record) => record -> ReaderT backend m () #

Same as insert, but doesn't return a Key.

Example usage

Expand

with schema-1 and dataset-1,

insertJohn :: MonadIO m => ReaderT SqlBackend m (Key User)
insertJohn = insert_ $ User "John" 30

The above query when applied on dataset-1, will produce this:

+-----+------+-----+
|id   |name  |age  |
+-----+------+-----+
|1    |SPJ   |40   |
+-----+------+-----+
|2    |Simon |41   |
+-----+------+-----+
|3    |John  |30   |
+-----+------+-----+

insertMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, SafeToInsert record) => [record] -> ReaderT backend m [Key record] #

Create multiple records in the database and return their Keys.

If you don't need the inserted Keys, use insertMany_.

The MongoDB and PostgreSQL backends insert all records and retrieve their keys in one database query.

The SQLite and MySQL backends use the slow, default implementation of mapM insert.

Example usage

Expand

with schema-1 and dataset-1,

insertUsers :: MonadIO m => ReaderT SqlBackend m [Key User]
insertUsers = insertMany [User "John" 30, User "Nick" 32, User "Jane" 20]
userIds <- insertUsers

The above query when applied on dataset-1, will produce this:

+-----+------+-----+
|id   |name  |age  |
+-----+------+-----+
|1    |SPJ   |40   |
+-----+------+-----+
|2    |Simon |41   |
+-----+------+-----+
|3    |John  |30   |
+-----+------+-----+
|4    |Nick  |32   |
+-----+------+-----+
|5    |Jane  |20   |
+-----+------+-----+

insertMany_ :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, SafeToInsert record) => [record] -> ReaderT backend m () #

Same as insertMany, but doesn't return any Keys.

The MongoDB, PostgreSQL, SQLite and MySQL backends insert all records in one database query.

Example usage

Expand

With schema-1 and dataset-1,

insertUsers_ :: MonadIO m => ReaderT SqlBackend m ()
insertUsers_ = insertMany_ [User "John" 30, User "Nick" 32, User "Jane" 20]

The above query when applied on dataset-1, will produce this:

+-----+------+-----+
|id   |name  |age  |
+-----+------+-----+
|1    |SPJ   |40   |
+-----+------+-----+
|2    |Simon |41   |
+-----+------+-----+
|3    |John  |30   |
+-----+------+-----+
|4    |Nick  |32   |
+-----+------+-----+
|5    |Jane  |20   |
+-----+------+-----+

insertEntityMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => [Entity record] -> ReaderT backend m () #

Same as insertMany_, but takes an Entity instead of just a record.

Useful when migrating data from one entity to another and want to preserve ids.

The MongoDB, PostgreSQL, SQLite and MySQL backends insert all records in one database query.

Example usage

Expand

With schema-1 and dataset-1,

insertUserEntityMany :: MonadIO m => ReaderT SqlBackend m ()
insertUserEntityMany = insertEntityMany [SnakeEntity, EvaEntity]

The above query when applied on dataset-1, will produce this:

+-----+------+-----+
|id   |name  |age  |
+-----+------+-----+
|1    |SPJ   |40   |
+-----+------+-----+
|2    |Simon |41   |
+-----+------+-----+
|3    |Snake |38   |
+-----+------+-----+
|4    |Eva   |38   |
+-----+------+-----+

insertKey :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => Key record -> record -> ReaderT backend m () #

Create a new record in the database using the given key.

Example usage

Expand

With schema-1 and dataset-1,

insertAliceKey :: MonadIO m => Key User -> ReaderT SqlBackend m ()
insertAliceKey key = insertKey key $ User "Alice" 20
insertAliceKey $ UserKey {unUserKey = SqlBackendKey {unSqlBackendKey = 3}}

The above query when applied on dataset-1, will produce this:

+-----+------+-----+
|id   |name  |age  |
+-----+------+-----+
|1    |SPJ   |40   |
+-----+------+-----+
|2    |Simon |41   |
+-----+------+-----+
|3    |Alice |20   |
+-----+------+-----+

repsert :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => Key record -> record -> ReaderT backend m () #

Put the record in the database with the given key. Unlike replace, if a record with the given key does not exist then a new record will be inserted.

Example usage

Expand

We try to explain upsertBy using schema-1 and dataset-1.

First, we insert Philip to dataset-1.

insertPhilip :: MonadIO m => ReaderT SqlBackend m (Key User)
insertPhilip = insert $ User "Philip" 42
philipId <- insertPhilip

This query will produce:

+-----+------+-----+
|id   |name  |age  |
+-----+------+-----+
|1    |SPJ   |40   |
+-----+------+-----+
|2    |Simon |41   |
+-----+------+-----+
|3    |Philip|42   |
+-----+------+-----+
repsertHaskell :: MonadIO m => Key record -> ReaderT SqlBackend m ()
repsertHaskell id = repsert id $ User "Haskell" 81
repsertHaskell philipId

This query will replace Philip's record with Haskell's one:

+-----+-----------------+--------+
|id   |name             |age     |
+-----+-----------------+--------+
|1    |SPJ              |40      |
+-----+-----------------+--------+
|2    |Simon            |41      |
+-----+-----------------+--------+
|3    |Philip -> Haskell|42 -> 81|
+-----+-----------------+--------+

repsert inserts the given record if the key doesn't exist.

repsertXToUnknown :: MonadIO m => ReaderT SqlBackend m ()
repsertXToUnknown = repsert unknownId $ User "X" 999

For example, applying the above query to dataset-1 will produce this:

+-----+------+-----+
|id   |name  |age  |
+-----+------+-----+
|1    |SPJ   |40   |
+-----+------+-----+
|2    |Simon |41   |
+-----+------+-----+
|3    |X     |999  |
+-----+------+-----+

repsertMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => [(Key record, record)] -> ReaderT backend m () #

Put many entities into the database.

Batch version of repsert for SQL backends.

Useful when migrating data from one entity to another and want to preserve ids.

Example usage

Expand

With schema-1 and dataset-1,

repsertManyUsers :: MonadIO m =>ReaderT SqlBackend m ()
repsertManyusers = repsertMany [(simonId, User "Philip" 20), (unknownId999, User "Mr. X" 999)]

The above query when applied on dataset-1, will produce this:

+-----+----------------+---------+
|id   |name            |age      |
+-----+----------------+---------+
|1    |SPJ             |40       |
+-----+----------------+---------+
|2    |Simon -> Philip |41 -> 20 |
+-----+----------------+---------+
|999  |Mr. X           |999      |
+-----+----------------+---------+

Since: persistent-2.8.1

replace :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => Key record -> record -> ReaderT backend m () #

Replace the record in the database with the given key. Note that the result is undefined if such record does not exist, so you must use insertKey or repsert in these cases.

Example usage

Expand

With schema-1 schama-1 and dataset-1,

replaceSpj :: MonadIO m => User -> ReaderT SqlBackend m ()
replaceSpj record = replace spjId record

The above query when applied on dataset-1, will produce this:

+-----+------+-----+
|id   |name  |age  |
+-----+------+-----+
|1    |Mike  |45   |
+-----+------+-----+
|2    |Simon |41   |
+-----+------+-----+

delete :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => Key record -> ReaderT backend m () #

Delete a specific record by identifier. Does nothing if record does not exist.

Example usage

Expand

With schema-1 and dataset-1,

deleteSpj :: MonadIO m => ReaderT SqlBackend m ()
deleteSpj = delete spjId

The above query when applied on dataset-1, will produce this:

+-----+------+-----+
|id   |name  |age  |
+-----+------+-----+
|2    |Simon |41   |
+-----+------+-----+

update :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => Key record -> [Update record] -> ReaderT backend m () #

Update individual fields on a specific record.

Example usage

Expand

With schema-1 and dataset-1,

updateSpj :: MonadIO m => [Update User] -> ReaderT SqlBackend m ()
updateSpj updates = update spjId updates
updateSpj [UserAge +=. 100]

The above query when applied on dataset-1, will produce this:

+-----+------+-----+
|id   |name  |age  |
+-----+------+-----+
|1    |SPJ   |140  |
+-----+------+-----+
|2    |Simon |41   |
+-----+------+-----+

updateGet :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => Key record -> [Update record] -> ReaderT backend m record #

Update individual fields on a specific record, and retrieve the updated value from the database.

Note that this function will throw an exception if the given key is not found in the database.

Example usage

Expand

With schema-1 and dataset-1,

updateGetSpj :: MonadIO m => [Update User] -> ReaderT SqlBackend m User
updateGetSpj updates = updateGet spjId updates
spj <- updateGetSpj [UserAge +=. 100]

The above query when applied on dataset-1, will produce this:

+-----+------+-----+
|id   |name  |age  |
+-----+------+-----+
|1    |SPJ   |140  |
+-----+------+-----+
|2    |Simon |41   |
+-----+------+-----+

Instances

Instances details
(HasPersistBackend b, PersistStoreWrite b) => PersistStoreWrite (RawSqlite b) 
Instance details

Defined in Database.Persist.Sqlite

Methods

insert :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b), SafeToInsert record) => record -> ReaderT (RawSqlite b) m (Key record) #

insert_ :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b), SafeToInsert record) => record -> ReaderT (RawSqlite b) m () #

insertMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b), SafeToInsert record) => [record] -> ReaderT (RawSqlite b) m [Key record] #

insertMany_ :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b), SafeToInsert record) => [record] -> ReaderT (RawSqlite b) m () #

insertEntityMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => [Entity record] -> ReaderT (RawSqlite b) m () #

insertKey :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => Key record -> record -> ReaderT (RawSqlite b) m () #

repsert :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => Key record -> record -> ReaderT (RawSqlite b) m () #

repsertMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => [(Key record, record)] -> ReaderT (RawSqlite b) m () #

replace :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => Key record -> record -> ReaderT (RawSqlite b) m () #

delete :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => Key record -> ReaderT (RawSqlite b) m () #

update :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => Key record -> [Update record] -> ReaderT (RawSqlite b) m () #

updateGet :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => Key record -> [Update record] -> ReaderT (RawSqlite b) m record #

(HasPersistBackend b, BackendCompatible b s, PersistStoreWrite b) => PersistStoreWrite (Compatible b s) 
Instance details

Defined in Database.Persist.Compatible.Types

Methods

insert :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s), SafeToInsert record) => record -> ReaderT (Compatible b s) m (Key record) #

insert_ :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s), SafeToInsert record) => record -> ReaderT (Compatible b s) m () #

insertMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s), SafeToInsert record) => [record] -> ReaderT (Compatible b s) m [Key record] #

insertMany_ :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s), SafeToInsert record) => [record] -> ReaderT (Compatible b s) m () #

insertEntityMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s)) => [Entity record] -> ReaderT (Compatible b s) m () #

insertKey :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s)) => Key record -> record -> ReaderT (Compatible b s) m () #

repsert :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s)) => Key record -> record -> ReaderT (Compatible b s) m () #

repsertMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s)) => [(Key record, record)] -> ReaderT (Compatible b s) m () #

replace :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s)) => Key record -> record -> ReaderT (Compatible b s) m () #

delete :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s)) => Key record -> ReaderT (Compatible b s) m () #

update :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s)) => Key record -> [Update record] -> ReaderT (Compatible b s) m () #

updateGet :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s)) => Key record -> [Update record] -> ReaderT (Compatible b s) m record #

class (Show (BackendKey backend), Read (BackendKey backend), Eq (BackendKey backend), Ord (BackendKey backend), PersistCore backend, PersistField (BackendKey backend), ToJSON (BackendKey backend), FromJSON (BackendKey backend)) => PersistStoreRead backend where #

Minimal complete definition

get

Methods

get :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => Key record -> ReaderT backend m (Maybe record) #

Get a record by identifier, if available.

Example usage

Expand

With schema-1 and dataset-1,

getSpj :: MonadIO m => ReaderT SqlBackend m (Maybe User)
getSpj = get spjId
mspj <- getSpj

The above query when applied on dataset-1, will get this:

+------+-----+
| name | age |
+------+-----+
| SPJ  |  40 |
+------+-----+

getMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => [Key record] -> ReaderT backend m (Map (Key record) record) #

Get many records by their respective identifiers, if available.

Example usage

Expand

With schema-1 and dataset-1:

getUsers :: MonadIO m => ReaderT SqlBackend m (Map (Key User) User)
getUsers = getMany allkeys
musers <- getUsers

The above query when applied on dataset-1, will get these records:

+----+-------+-----+
| id | name  | age |
+----+-------+-----+
|  1 | SPJ   |  40 |
+----+-------+-----+
|  2 | Simon |  41 |
+----+-------+-----+

Since: persistent-2.8.1

Instances

Instances details
(HasPersistBackend b, PersistStoreRead b) => PersistStoreRead (RawSqlite b) 
Instance details

Defined in Database.Persist.Sqlite

Methods

get :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => Key record -> ReaderT (RawSqlite b) m (Maybe record) #

getMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => [Key record] -> ReaderT (RawSqlite b) m (Map (Key record) record) #

(HasPersistBackend b, BackendCompatible b s, PersistStoreRead b) => PersistStoreRead (Compatible b s) 
Instance details

Defined in Database.Persist.Compatible.Types

Methods

get :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s)) => Key record -> ReaderT (Compatible b s) m (Maybe record) #

getMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s)) => [Key record] -> ReaderT (Compatible b s) m (Map (Key record) record) #

class PersistCore backend #

Associated Types

data BackendKey backend #

Instances

Instances details
PersistCore b => PersistCore (RawSqlite b) 
Instance details

Defined in Database.Persist.Sqlite

Associated Types

data BackendKey (RawSqlite b) #

(BackendCompatible b s, PersistCore b) => PersistCore (Compatible b s) 
Instance details

Defined in Database.Persist.Compatible.Types

Associated Types

data BackendKey (Compatible b s) #

data family BackendKey backend #

Instances

Instances details
(BackendCompatible b s, FromJSON (BackendKey b)) => FromJSON (BackendKey (Compatible b s)) 
Instance details

Defined in Database.Persist.Compatible.Types

(PersistCore b, PersistCore (RawSqlite b), FromJSON (BackendKey b)) => FromJSON (BackendKey (RawSqlite b)) 
Instance details

Defined in Database.Persist.Sqlite

(BackendCompatible b s, ToJSON (BackendKey b)) => ToJSON (BackendKey (Compatible b s)) 
Instance details

Defined in Database.Persist.Compatible.Types

(PersistCore b, PersistCore (RawSqlite b), ToJSON (BackendKey b)) => ToJSON (BackendKey (RawSqlite b)) 
Instance details

Defined in Database.Persist.Sqlite

(BackendCompatible b s, Bounded (BackendKey b)) => Bounded (BackendKey (Compatible b s)) 
Instance details

Defined in Database.Persist.Compatible.Types

(PersistCore b, PersistCore (RawSqlite b), Bounded (BackendKey b)) => Bounded (BackendKey (RawSqlite b)) 
Instance details

Defined in Database.Persist.Sqlite

(BackendCompatible b s, Enum (BackendKey b)) => Enum (BackendKey (Compatible b s)) 
Instance details

Defined in Database.Persist.Compatible.Types

(PersistCore b, PersistCore (RawSqlite b), Enum (BackendKey b)) => Enum (BackendKey (RawSqlite b)) 
Instance details

Defined in Database.Persist.Sqlite

(BackendCompatible b s, Num (BackendKey b)) => Num (BackendKey (Compatible b s)) 
Instance details

Defined in Database.Persist.Compatible.Types

(PersistCore b, PersistCore (RawSqlite b), Num (BackendKey b)) => Num (BackendKey (RawSqlite b)) 
Instance details

Defined in Database.Persist.Sqlite

(BackendCompatible b s, Read (BackendKey b)) => Read (BackendKey (Compatible b s)) 
Instance details

Defined in Database.Persist.Compatible.Types

(PersistCore b, PersistCore (RawSqlite b), Read (BackendKey b)) => Read (BackendKey (RawSqlite b)) 
Instance details

Defined in Database.Persist.Sqlite

(BackendCompatible b s, Integral (BackendKey b)) => Integral (BackendKey (Compatible b s)) 
Instance details

Defined in Database.Persist.Compatible.Types

(PersistCore b, PersistCore (RawSqlite b), Integral (BackendKey b)) => Integral (BackendKey (RawSqlite b)) 
Instance details

Defined in Database.Persist.Sqlite

(BackendCompatible b s, Real (BackendKey b)) => Real (BackendKey (Compatible b s)) 
Instance details

Defined in Database.Persist.Compatible.Types

(PersistCore b, PersistCore (RawSqlite b), Real (BackendKey b)) => Real (BackendKey (RawSqlite b)) 
Instance details

Defined in Database.Persist.Sqlite

(BackendCompatible b s, Show (BackendKey b)) => Show (BackendKey (Compatible b s)) 
Instance details

Defined in Database.Persist.Compatible.Types

(PersistCore b, PersistCore (RawSqlite b), Show (BackendKey b)) => Show (BackendKey (RawSqlite b)) 
Instance details

Defined in Database.Persist.Sqlite

(BackendCompatible b s, Eq (BackendKey b)) => Eq (BackendKey (Compatible b s)) 
Instance details

Defined in Database.Persist.Compatible.Types

(PersistCore b, PersistCore (RawSqlite b), Eq (BackendKey b)) => Eq (BackendKey (RawSqlite b)) 
Instance details

Defined in Database.Persist.Sqlite

(BackendCompatible b s, Ord (BackendKey b)) => Ord (BackendKey (Compatible b s)) 
Instance details

Defined in Database.Persist.Compatible.Types

(PersistCore b, PersistCore (RawSqlite b), Ord (BackendKey b)) => Ord (BackendKey (RawSqlite b)) 
Instance details

Defined in Database.Persist.Sqlite

(BackendCompatible b s, PersistField (BackendKey b)) => PersistField (BackendKey (Compatible b s)) 
Instance details

Defined in Database.Persist.Compatible.Types

(PersistCore b, PersistCore (RawSqlite b), PersistField (BackendKey b)) => PersistField (BackendKey (RawSqlite b)) 
Instance details

Defined in Database.Persist.Sqlite

(BackendCompatible b s, PersistFieldSql (BackendKey b)) => PersistFieldSql (BackendKey (Compatible b s)) 
Instance details

Defined in Database.Persist.Compatible.Types

(PersistCore b, PersistCore (RawSqlite b), PersistFieldSql (BackendKey b)) => PersistFieldSql (BackendKey (RawSqlite b)) 
Instance details

Defined in Database.Persist.Sqlite

newtype BackendKey SqlReadBackend 
Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

newtype BackendKey SqlWriteBackend 
Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

newtype BackendKey SqlBackend 
Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

type Rep (BackendKey SqlReadBackend) 
Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

type Rep (BackendKey SqlReadBackend) = D1 ('MetaData "BackendKey" "Database.Persist.Sql.Orphan.PersistStore" "persistent-2.14.6.0-3I5zQUddzkt3mMmi5XNQpK" 'True) (C1 ('MetaCons "SqlReadBackendKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSqlReadBackendKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)))
type Rep (BackendKey SqlWriteBackend) 
Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

type Rep (BackendKey SqlWriteBackend) = D1 ('MetaData "BackendKey" "Database.Persist.Sql.Orphan.PersistStore" "persistent-2.14.6.0-3I5zQUddzkt3mMmi5XNQpK" 'True) (C1 ('MetaCons "SqlWriteBackendKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSqlWriteBackendKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)))
type Rep (BackendKey SqlBackend) 
Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

type Rep (BackendKey SqlBackend) = D1 ('MetaData "BackendKey" "Database.Persist.Sql.Orphan.PersistStore" "persistent-2.14.6.0-3I5zQUddzkt3mMmi5XNQpK" 'True) (C1 ('MetaCons "SqlBackendKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSqlBackendKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)))
newtype BackendKey (RawSqlite b) 
Instance details

Defined in Database.Persist.Sqlite

newtype BackendKey (Compatible b s) 
Instance details

Defined in Database.Persist.Compatible.Types

class (PersistEntity record, PersistEntityBackend record ~ backend, PersistCore backend) => ToBackendKey backend record where #

ToBackendKey converts a PersistEntity Key into a BackendKey This can be used by each backend to convert between a Key and a plain Haskell type. For Sql, that is done with toSqlKey and fromSqlKey.

By default, a PersistEntity uses the default BackendKey for its Key and is an instance of ToBackendKey

A Key that instead uses a custom type will not be an instance of ToBackendKey.

Methods

toBackendKey :: Key record -> BackendKey backend #

fromBackendKey :: BackendKey backend -> Key record #

type PersistRecordBackend record backend = (PersistEntity record, PersistEntityBackend record ~ BaseBackend backend) #

A convenient alias for common type signatures

class BackendCompatible sup sub where #

This class witnesses that two backend are compatible, and that you can convert from the sub backend into the sup backend. This is similar to the HasPersistBackend and IsPersistBackend classes, but where you don't want to fix the type associated with the PersistEntityBackend of a record.

Generally speaking, where you might have:

foo ::
  ( PersistEntity record
  , PersistEntityBackend record ~ BaseBackend backend
  , IsSqlBackend backend
  )

this can be replaced with:

foo ::
  ( PersistEntity record,
  , PersistEntityBackend record ~ backend
  , BackendCompatible SqlBackend backend
  )

This works for SqlReadBackend because of the instance BackendCompatible SqlBackend SqlReadBackend, without needing to go through the BaseBackend type family.

Likewise, functions that are currently hardcoded to use SqlBackend can be generalized:

-- before:
asdf :: ReaderT SqlBackend m ()
asdf = pure ()

-- after:
asdf' :: BackendCompatible SqlBackend backend => ReaderT backend m ()
asdf' = withCompatibleBackend asdf

Since: persistent-2.7.1

Methods

projectBackend :: sub -> sup #

Instances

Instances details
BackendCompatible b (RawSqlite b) 
Instance details

Defined in Database.Persist.Sqlite

Methods

projectBackend :: RawSqlite b -> b #

class HasPersistBackend backend => IsPersistBackend backend #

Class which witnesses that backend is essentially the same as BaseBackend backend. That is, they're isomorphic and backend is just some wrapper over BaseBackend backend.

Minimal complete definition

mkPersistBackend

class HasPersistBackend backend where #

Class which allows the plucking of a BaseBackend backend from some larger type. For example, instance HasPersistBackend (SqlReadBackend, Int) where type BaseBackend (SqlReadBackend, Int) = SqlBackend persistBackend = unSqlReadBackend . fst

Associated Types

type BaseBackend backend #

Methods

persistBackend :: backend -> BaseBackend backend #

data SqlBackend #

A SqlBackend represents a handle or connection to a database. It contains functions and values that allow databases to have more optimized implementations, as well as references that benefit performance and sharing.

Instead of using the SqlBackend constructor directly, use the mkSqlBackend function.

A SqlBackend is *not* thread-safe. You should not assume that a SqlBackend can be shared among threads and run concurrent queries. This *will* result in problems. Instead, you should create a Pool SqlBackend, known as a ConnectionPool, and pass that around in multi-threaded applications.

To run actions in the persistent library, you should use the runSqlConn function. If you're using a multithreaded application, use the runSqlPool function.

Instances

Instances details
HasPersistBackend SqlBackend 
Instance details

Defined in Database.Persist.SqlBackend.Internal

Associated Types

type BaseBackend SqlBackend #

IsPersistBackend SqlBackend 
Instance details

Defined in Database.Persist.SqlBackend.Internal

ToBackendKey SqlBackend Bookmark Source # 
Instance details

Defined in Model

ToBackendKey SqlBackend BookmarkTag Source # 
Instance details

Defined in Model

ToBackendKey SqlBackend Note Source # 
Instance details

Defined in Model

ToBackendKey SqlBackend User Source # 
Instance details

Defined in Model

newtype BackendKey SqlBackend 
Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

type BaseBackend SqlBackend 
Instance details

Defined in Database.Persist.SqlBackend.Internal

type Rep (BackendKey SqlBackend) 
Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

type Rep (BackendKey SqlBackend) = D1 ('MetaData "BackendKey" "Database.Persist.Sql.Orphan.PersistStore" "persistent-2.14.6.0-3I5zQUddzkt3mMmi5XNQpK" 'True) (C1 ('MetaCons "SqlBackendKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSqlBackendKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)))

class PersistEntity record => AtLeastOneUniqueKey record where #

This class is used to ensure that functions requring at least one unique key are not called with records that have 0 unique keys. The quasiquoter automatically writes working instances for appropriate entities, and generates TypeError instances for records that have 0 unique keys.

Since: persistent-2.10.0

Methods

requireUniquesP :: record -> NonEmpty (Unique record) #

Instances

Instances details
AtLeastOneUniqueKey Bookmark Source # 
Instance details

Defined in Model

AtLeastOneUniqueKey BookmarkTag Source # 
Instance details

Defined in Model

(TypeError (MultipleUniqueKeysError Note) :: Constraint) => AtLeastOneUniqueKey Note Source # 
Instance details

Defined in Model

AtLeastOneUniqueKey User Source # 
Instance details

Defined in Model

type MultipleUniqueKeysError ty = ((('Text "The entity " ':<>: 'ShowType ty) ':<>: 'Text " has multiple unique keys.") ':$$: ('Text "The function you are trying to call requires only a single " ':<>: 'Text "unique key.")) ':$$: (('Text "There is probably a variant of the function with 'By' " ':<>: 'Text "appended that will allow you to select a unique key ") ':<>: 'Text "for the operation.") #

This is an error message. It is used when an entity has multiple unique keys, and the function expects a single unique key.

Since: persistent-2.10.0

type NoUniqueKeysError ty = (('Text "The entity " ':<>: 'ShowType ty) ':<>: 'Text " does not have any unique keys.") ':$$: ('Text "The function you are trying to call requires a unique key " ':<>: 'Text "to be defined on the entity.") #

This is an error message. It is used when writing instances of OnlyOneUniqueKey for an entity that has no unique keys.

Since: persistent-2.10.0

class PersistEntity record => OnlyOneUniqueKey record where #

This class is used to ensure that upsert is only called on records that have a single Unique key. The quasiquoter automatically generates working instances for appropriate records, and generates TypeError instances for records that have 0 or multiple unique keys.

Since: persistent-2.10.0

Methods

onlyUniqueP :: record -> Unique record #

Instances

Instances details
(TypeError (MultipleUniqueKeysError Bookmark) :: Constraint) => OnlyOneUniqueKey Bookmark Source # 
Instance details

Defined in Model

(TypeError (MultipleUniqueKeysError BookmarkTag) :: Constraint) => OnlyOneUniqueKey BookmarkTag Source # 
Instance details

Defined in Model

(TypeError (NoUniqueKeysError Note) :: Constraint) => OnlyOneUniqueKey Note Source # 
Instance details

Defined in Model

OnlyOneUniqueKey User Source # 
Instance details

Defined in Model

class (PersistUniqueRead backend, PersistStoreWrite backend) => PersistUniqueWrite backend where #

Some functions in this module (insertUnique, insertBy, and replaceUnique) first query the unique indexes to check for conflicts. You could instead optimistically attempt to perform the operation (e.g. replace instead of replaceUnique). However,

  • there is some fragility to trying to catch the correct exception and determing the column of failure;
  • an exception will automatically abort the current SQL transaction.

Minimal complete definition

deleteBy

Methods

deleteBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => Unique record -> ReaderT backend m () #

Delete a specific record by unique key. Does nothing if no record matches.

Example usage

Expand

With schema-1 and dataset-1,

deleteBySpjName :: MonadIO m => ReaderT SqlBackend m ()
deleteBySpjName = deleteBy UniqueUserName "SPJ"

The above query when applied on dataset-1, will produce this:

+-----+------+-----+
|id   |name  |age  |
+-----+------+-----+
|2    |Simon |41   |
+-----+------+-----+

insertUnique :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, SafeToInsert record) => record -> ReaderT backend m (Maybe (Key record)) #

Like insert, but returns Nothing when the record couldn't be inserted because of a uniqueness constraint.

Example usage

Expand

With schema-1 and dataset-1, we try to insert the following two records:

linusId <- insertUnique $ User "Linus" 48
spjId   <- insertUnique $ User "SPJ" 90
+-----+------+-----+
|id   |name  |age  |
+-----+------+-----+
|1    |SPJ   |40   |
+-----+------+-----+
|2    |Simon |41   |
+-----+------+-----+
|3    |Linus |48   |
+-----+------+-----+

Linus's record was inserted to dataset-1, while SPJ wasn't because SPJ already exists in dataset-1.

insertUnique_ :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, SafeToInsert record) => record -> ReaderT backend m (Maybe ()) #

Same as insertUnique but doesn't return a Key.

Example usage

Expand

With schema-1 and dataset-1, we try to insert the following two records:

linusId <- insertUnique_ $ User "Linus" 48
spjId   <- insertUnique_ $ User "SPJ" 90
+-----+------+-----+
|id   |name  |age  |
+-----+------+-----+
|1    |SPJ   |40   |
+-----+------+-----+
|2    |Simon |41   |
+-----+------+-----+
|3    |Linus |48   |
+-----+------+-----+

Linus's record was inserted to dataset-1, while SPJ wasn't because SPJ already exists in dataset-1.

Since: persistent-2.14.5.0

upsert #

Arguments

:: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, OnlyOneUniqueKey record, SafeToInsert record) 
=> record

new record to insert

-> [Update record]

updates to perform if the record already exists

-> ReaderT backend m (Entity record)

the record in the database after the operation

Update based on a uniqueness constraint or insert:

  • insert the new record if it does not exist;
  • If the record exists (matched via it's uniqueness constraint), then update the existing record with the parameters which is passed on as list to the function.

Example usage

Expand

First, we try to explain upsert using schema-1 and dataset-1.

upsertSpj :: MonadIO m => [Update User] -> ReaderT SqlBackend m (Maybe (Entity User))
upsertSpj updates = upsert (User "SPJ" 999) updates
mSpjEnt <- upsertSpj [UserAge +=. 15]

The above query when applied on dataset-1, will produce this:

+-----+-----+--------+
|id   |name |age     |
+-----+-----+--------+
|1    |SPJ  |40 -> 55|
+-----+-----+--------+
|2    |Simon|41      |
+-----+-----+--------+
upsertX :: MonadIO m => [Update User] -> ReaderT SqlBackend m (Maybe (Entity User))
upsertX updates = upsert (User "X" 999) updates
mXEnt <- upsertX [UserAge +=. 15]

The above query when applied on dataset-1, will produce this:

+-----+-----+--------+
|id   |name |age     |
+-----+-----+--------+
|1    |SPJ  |40      |
+-----+-----+--------+
|2    |Simon|41      |
+-----+-----+--------+
|3    |X    |999     |
+-----+-----+--------+

Next, what if the schema has two uniqueness constraints? Let's check it out using schema-2:

mSpjEnt <- upsertSpj [UserAge +=. 15]

This fails with a compile-time type error alerting us to the fact that this record has multiple unique keys, and suggests that we look for upsertBy to select the unique key we want.

upsertBy #

Arguments

:: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, SafeToInsert record) 
=> Unique record

uniqueness constraint to find by

-> record

new record to insert

-> [Update record]

updates to perform if the record already exists

-> ReaderT backend m (Entity record)

the record in the database after the operation

Update based on a given uniqueness constraint or insert:

  • insert the new record if it does not exist;
  • update the existing record that matches the given uniqueness constraint.

Example usage

Expand

We try to explain upsertBy using schema-2 and dataset-1.

upsertBySpjName :: MonadIO m => User -> [Update User] -> ReaderT SqlBackend m (Entity User)
upsertBySpjName record updates = upsertBy (UniqueUserName "SPJ") record updates
mSpjEnt <- upsertBySpjName (Person "X" 999) [PersonAge += .15]

The above query will alter dataset-1 to:

+-----+-----+--------+
|id   |name |age     |
+-----+-----+--------+
|1    |SPJ  |40 -> 55|
+-----+-----+--------+
|2    |Simon|41      |
+-----+-----+--------+
upsertBySimonAge :: MonadIO m => User -> [Update User] -> ReaderT SqlBackend m (Entity User)
upsertBySimonAge record updates = upsertBy (UniqueUserName "SPJ") record updates
mPhilipEnt <- upsertBySimonAge (User "X" 999) [UserName =. "Philip"]

The above query will alter dataset-1 to:

+----+-----------------+-----+
| id |      name       | age |
+----+-----------------+-----+
|  1 | SPJ             |  40 |
+----+-----------------+-----+
|  2 | Simon -> Philip |  41 |
+----+-----------------+-----+
upsertByUnknownName :: MonadIO m => User -> [Update User] -> ReaderT SqlBackend m (Entity User)
upsertByUnknownName record updates = upsertBy (UniqueUserName "Unknown") record updates
mXEnt <- upsertByUnknownName (User "X" 999) [UserAge +=. 15]

This query will alter dataset-1 to:

+-----+-----+-----+
|id   |name |age  |
+-----+-----+-----+
|1    |SPJ  |40   |
+-----+-----+-----+
|2    |Simon|41   |
+-----+-----+-----+
|3    |X    |999  |
+-----+-----+-----+

putMany #

Arguments

:: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, SafeToInsert record) 
=> [record]

A list of the records you want to insert or replace.

-> ReaderT backend m () 

Put many records into db

  • insert new records that do not exist (or violate any unique constraints)
  • replace existing records (matching any unique constraint)

Since: persistent-2.8.1

Instances

Instances details
(HasPersistBackend b, PersistUniqueWrite b) => PersistUniqueWrite (RawSqlite b) 
Instance details

Defined in Database.Persist.Sqlite

Methods

deleteBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => Unique record -> ReaderT (RawSqlite b) m () #

insertUnique :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b), SafeToInsert record) => record -> ReaderT (RawSqlite b) m (Maybe (Key record)) #

insertUnique_ :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b), SafeToInsert record) => record -> ReaderT (RawSqlite b) m (Maybe ()) #

upsert :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b), OnlyOneUniqueKey record, SafeToInsert record) => record -> [Update record] -> ReaderT (RawSqlite b) m (Entity record) #

upsertBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b), SafeToInsert record) => Unique record -> record -> [Update record] -> ReaderT (RawSqlite b) m (Entity record) #

putMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b), SafeToInsert record) => [record] -> ReaderT (RawSqlite b) m () #

(HasPersistBackend b, BackendCompatible b s, PersistUniqueWrite b) => PersistUniqueWrite (Compatible b s) 
Instance details

Defined in Database.Persist.Compatible.Types

Methods

deleteBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s)) => Unique record -> ReaderT (Compatible b s) m () #

insertUnique :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s), SafeToInsert record) => record -> ReaderT (Compatible b s) m (Maybe (Key record)) #

insertUnique_ :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s), SafeToInsert record) => record -> ReaderT (Compatible b s) m (Maybe ()) #

upsert :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s), OnlyOneUniqueKey record, SafeToInsert record) => record -> [Update record] -> ReaderT (Compatible b s) m (Entity record) #

upsertBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s), SafeToInsert record) => Unique record -> record -> [Update record] -> ReaderT (Compatible b s) m (Entity record) #

putMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s), SafeToInsert record) => [record] -> ReaderT (Compatible b s) m () #

class PersistStoreRead backend => PersistUniqueRead backend where #

Queries against Unique keys (other than the id Key).

Please read the general Persistent documentation to learn how to create Unique keys.

Using this with an Entity without a Unique key leads to undefined behavior. A few of these functions require a single Unique, so using an Entity with multiple Uniques is also undefined. In these cases persistent's goal is to throw an exception as soon as possible, but persistent is still transitioning to that.

SQL backends automatically create uniqueness constraints, but for MongoDB you must manually place a unique index on a field to have a uniqueness constraint.

Minimal complete definition

getBy

Methods

getBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => Unique record -> ReaderT backend m (Maybe (Entity record)) #

Get a record by unique key, if available. Returns also the identifier.

Example usage

Expand

With schema-1 and dataset-1:

getBySpjName :: MonadIO m  => ReaderT SqlBackend m (Maybe (Entity User))
getBySpjName = getBy $ UniqueUserName "SPJ"
mSpjEnt <- getBySpjName

The above query when applied on dataset-1, will get this entity:

+----+------+-----+
| id | name | age |
+----+------+-----+
|  1 | SPJ  |  40 |
+----+------+-----+

existsBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => Unique record -> ReaderT backend m Bool #

Returns True if a record with this unique key exists, otherwise False.

Example usage

Expand

With schema-1 and dataset-1:

existsBySpjName :: MonadIO m  => ReaderT SqlBackend m Bool
existsBySpjName = existsBy $ UniqueUserName "SPJ"
spjEntExists <- existsBySpjName

The above query when applied on dataset-1, will return the value True.

Since: persistent-2.14.5

Instances

Instances details
(HasPersistBackend b, PersistUniqueRead b) => PersistUniqueRead (RawSqlite b) 
Instance details

Defined in Database.Persist.Sqlite

Methods

getBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => Unique record -> ReaderT (RawSqlite b) m (Maybe (Entity record)) #

existsBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => Unique record -> ReaderT (RawSqlite b) m Bool #

(HasPersistBackend b, BackendCompatible b s, PersistUniqueRead b) => PersistUniqueRead (Compatible b s) 
Instance details

Defined in Database.Persist.Compatible.Types

Methods

getBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s)) => Unique record -> ReaderT (Compatible b s) m (Maybe (Entity record)) #

existsBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s)) => Unique record -> ReaderT (Compatible b s) m Bool #

class (PersistQueryRead backend, PersistStoreWrite backend) => PersistQueryWrite backend where #

Backends supporting conditional write operations

Methods

updateWhere :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record backend) => [Filter record] -> [Update record] -> ReaderT backend m () #

Update individual fields on any record matching the given criterion.

deleteWhere :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record backend) => [Filter record] -> ReaderT backend m () #

Delete all records matching the given criterion.

Instances

Instances details
(HasPersistBackend b, PersistQueryWrite b) => PersistQueryWrite (RawSqlite b) 
Instance details

Defined in Database.Persist.Sqlite

Methods

updateWhere :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record (RawSqlite b)) => [Filter record] -> [Update record] -> ReaderT (RawSqlite b) m () #

deleteWhere :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record (RawSqlite b)) => [Filter record] -> ReaderT (RawSqlite b) m () #

(HasPersistBackend b, BackendCompatible b s, PersistQueryWrite b) => PersistQueryWrite (Compatible b s) 
Instance details

Defined in Database.Persist.Compatible.Types

Methods

updateWhere :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record (Compatible b s)) => [Filter record] -> [Update record] -> ReaderT (Compatible b s) m () #

deleteWhere :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record (Compatible b s)) => [Filter record] -> ReaderT (Compatible b s) m () #

class (PersistCore backend, PersistStoreRead backend) => PersistQueryRead backend where #

Backends supporting conditional read operations.

Minimal complete definition

selectSourceRes, selectKeysRes, count, exists

Methods

selectSourceRes :: forall record (m1 :: Type -> Type) (m2 :: Type -> Type). (PersistRecordBackend record backend, MonadIO m1, MonadIO m2) => [Filter record] -> [SelectOpt record] -> ReaderT backend m1 (Acquire (ConduitM () (Entity record) m2 ())) #

Get all records matching the given criterion in the specified order. Returns also the identifiers.

NOTE: This function returns an Acquire and a ConduitM, which implies that it streams from the database. It does not. Please use selectList to simplify the code. If you want streaming behavior, consider persistent-pagination which efficiently chunks a query into ranges, or investigate a backend-specific streaming solution.

selectFirst :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record backend) => [Filter record] -> [SelectOpt record] -> ReaderT backend m (Maybe (Entity record)) #

Get just the first record for the criterion.

selectKeysRes :: forall (m1 :: Type -> Type) (m2 :: Type -> Type) record. (MonadIO m1, MonadIO m2, PersistRecordBackend record backend) => [Filter record] -> [SelectOpt record] -> ReaderT backend m1 (Acquire (ConduitM () (Key record) m2 ())) #

Get the Keys of all records matching the given criterion.

count :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record backend) => [Filter record] -> ReaderT backend m Int #

The total number of records fulfilling the given criterion.

exists :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record backend) => [Filter record] -> ReaderT backend m Bool #

Check if there is at least one record fulfilling the given criterion.

Since: persistent-2.11

Instances

Instances details
(HasPersistBackend b, PersistQueryRead b) => PersistQueryRead (RawSqlite b) 
Instance details

Defined in Database.Persist.Sqlite

Methods

selectSourceRes :: forall record (m1 :: Type -> Type) (m2 :: Type -> Type). (PersistRecordBackend record (RawSqlite b), MonadIO m1, MonadIO m2) => [Filter record] -> [SelectOpt record] -> ReaderT (RawSqlite b) m1 (Acquire (ConduitM () (Entity record) m2 ())) #

selectFirst :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record (RawSqlite b)) => [Filter record] -> [SelectOpt record] -> ReaderT (RawSqlite b) m (Maybe (Entity record)) #

selectKeysRes :: forall (m1 :: Type -> Type) (m2 :: Type -> Type) record. (MonadIO m1, MonadIO m2, PersistRecordBackend record (RawSqlite b)) => [Filter record] -> [SelectOpt record] -> ReaderT (RawSqlite b) m1 (Acquire (ConduitM () (Key record) m2 ())) #

count :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record (RawSqlite b)) => [Filter record] -> ReaderT (RawSqlite b) m Int #

exists :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record (RawSqlite b)) => [Filter record] -> ReaderT (RawSqlite b) m Bool #

(HasPersistBackend b, BackendCompatible b s, PersistQueryRead b) => PersistQueryRead (Compatible b s) 
Instance details

Defined in Database.Persist.Compatible.Types

Methods

selectSourceRes :: forall record (m1 :: Type -> Type) (m2 :: Type -> Type). (PersistRecordBackend record (Compatible b s), MonadIO m1, MonadIO m2) => [Filter record] -> [SelectOpt record] -> ReaderT (Compatible b s) m1 (Acquire (ConduitM () (Entity record) m2 ())) #

selectFirst :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record (Compatible b s)) => [Filter record] -> [SelectOpt record] -> ReaderT (Compatible b s) m (Maybe (Entity record)) #

selectKeysRes :: forall (m1 :: Type -> Type) (m2 :: Type -> Type) record. (MonadIO m1, MonadIO m2, PersistRecordBackend record (Compatible b s)) => [Filter record] -> [SelectOpt record] -> ReaderT (Compatible b s) m1 (Acquire (ConduitM () (Key record) m2 ())) #

count :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record (Compatible b s)) => [Filter record] -> ReaderT (Compatible b s) m Int #

exists :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record (Compatible b s)) => [Filter record] -> ReaderT (Compatible b s) m Bool #

type PersistStore a = PersistStoreWrite a #

A backwards-compatible alias for those that don't care about distinguishing between read and write queries. It signifies the assumption that, by default, a backend can write as well as read.

type PersistQuery a = PersistQueryWrite a #

A backwards-compatible alias for those that don't care about distinguishing between read and write queries. It signifies the assumption that, by default, a backend can write as well as read.

type PersistUnique a = PersistUniqueWrite a #

A backwards-compatible alias for those that don't care about distinguishing between read and write queries. It signifies the assumption that, by default, a backend can write as well as read.

data ImplicitIdDef #

A specification for how the implied ID columns are created.

By default, persistent will give each table a default column named id (customizable by PersistSettings), and the column type will be whatever you'd expect from BackendKey yourBackendType. For The SqlBackend type, this is an auto incrementing integer primary key.

You might want to give a different example. A common use case in postgresql is to use the UUID type, and automatically generate them using a SQL function.

Previously, you'd need to add a custom Id annotation for each model.

User
    Id   UUID default="uuid_generate_v1mc()"
    name Text

Dog
    Id   UUID default="uuid_generate_v1mc()"
    name Text
    user UserId

Now, you can simply create an ImplicitIdDef that corresponds to this declaration.

newtype UUID = UUID ByteString

instance PersistField UUID where
    toPersistValue (UUID bs) =
        PersistLiteral_ Escaped bs
    fromPersistValue pv =
        case pv of
            PersistLiteral_ Escaped bs ->
                Right (UUID bs)
            _ ->
                Left "nope"

instance PersistFieldSql UUID where
    sqlType _ = SqlOther UUID

With this instance at the ready, we can now create our implicit definition:

uuidDef :: ImplicitIdDef
uuidDef = mkImplicitIdDef @UUID "uuid_generate_v1mc()"

And we can use setImplicitIdDef to use this with the MkPersistSettings for our block.

mkPersist (setImplicitIdDef uuidDef sqlSettings) [persistLowerCase| ... |]

TODO: either explain interaction with mkMigrate or fix it. see issue #1249 for more details.

Since: persistent-2.13.0.0

data EntityJSON #

Constructors

EntityJSON 

Fields

data MkPersistSettings #

Settings to be passed to the mkPersist function.

type JavascriptUrl url = (url -> [(Text, Text)] -> Text) -> Javascript #

Return type of template-reading functions.

type CssUrl url = (url -> [(Text, Text)] -> Text) -> Css #

type HtmlUrl url = Render url -> Html #

A function generating an Html given a URL-rendering function.

data SomeMessage master #

Constructors

RenderMessage master msg => SomeMessage msg 

Instances

Instances details
master ~ master' => RenderMessage master (SomeMessage master') 
Instance details

Defined in Text.Shakespeare.I18N

Methods

renderMessage :: master -> [Lang] -> SomeMessage master' -> Text #

IsString (SomeMessage master) 
Instance details

Defined in Text.Shakespeare.I18N

Methods

fromString :: String -> SomeMessage master #

type Lang = Text #

an RFC1766 / ISO 639-1 language code (eg, fr, en-GB, etc).

class RenderMessage master message where #

the RenderMessage is used to provide translations for a message types

The master argument exists so that it is possible to provide more than one set of translations for a message type. This is useful if a library provides a default set of translations, but the user of the library wants to provide a different set of translations.

Methods

renderMessage #

Arguments

:: master

type that specifies which set of translations to use

-> [Lang]

acceptable languages in descending order of preference

-> message

message to translate

-> Text 

Instances

Instances details
RenderMessage App FormMessage Source # 
Instance details

Defined in Foundation

Methods

renderMessage :: App -> [Lang] -> FormMessage -> Text #

RenderMessage master Text 
Instance details

Defined in Text.Shakespeare.I18N

Methods

renderMessage :: master -> [Lang] -> Text -> Text #

master ~ master' => RenderMessage master (SomeMessage master') 
Instance details

Defined in Text.Shakespeare.I18N

Methods

renderMessage :: master -> [Lang] -> SomeMessage master' -> Text #

class ToMessage a where #

ToMessage is used to convert the value inside #{ } to Text

The primary purpose of this class is to allow the value in #{ } to be a String or Text rather than forcing it to always be Text.

Methods

toMessage :: a -> Text #

Instances

Instances details
ToMessage Text 
Instance details

Defined in Text.Shakespeare.I18N

Methods

toMessage :: Text -> Text #

ToMessage String 
Instance details

Defined in Text.Shakespeare.I18N

Methods

toMessage :: String -> Text #

data FileInfo #

class RenderRoute a => RouteAttrs a where #

Instances

Instances details
RouteAttrs App Source # 
Instance details

Defined in Foundation

Methods

routeAttrs :: Route App -> Set Text #

RouteAttrs Auth 
Instance details

Defined in Yesod.Auth.Routes

Methods

routeAttrs :: Route Auth -> Set Text #

class RenderRoute a => ParseRoute a where #

Methods

parseRoute #

Arguments

:: ([Text], [(Text, Text)])

The path of the URL split on forward slashes, and a list of query parameters with their associated value.

-> Maybe (Route a) 

Instances

Instances details
ParseRoute App Source # 
Instance details

Defined in Foundation

Methods

parseRoute :: ([Text], [(Text, Text)]) -> Maybe (Route App) #

ParseRoute Auth 
Instance details

Defined in Yesod.Auth.Routes

Methods

parseRoute :: ([Text], [(Text, Text)]) -> Maybe (Route Auth) #

ParseRoute LiteApp 
Instance details

Defined in Yesod.Core.Internal.LiteApp

Methods

parseRoute :: ([Text], [(Text, Text)]) -> Maybe (Route LiteApp) #

ParseRoute WaiSubsite 
Instance details

Defined in Yesod.Core.Types

Methods

parseRoute :: ([Text], [(Text, Text)]) -> Maybe (Route WaiSubsite) #

ParseRoute WaiSubsiteWithAuth 
Instance details

Defined in Yesod.Core.Types

ParseRoute Static 
Instance details

Defined in Yesod.Static

Methods

parseRoute :: ([Text], [(Text, Text)]) -> Maybe (Route Static) #

class Eq (Route a) => RenderRoute a where #

Associated Types

data Route a #

The type-safe URLs associated with a site argument.

Methods

renderRoute #

Arguments

:: Route a 
-> ([Text], [(Text, Text)])

The path of the URL split on forward slashes, and a list of query parameters with their associated value.

Instances

Instances details
RenderRoute App Source # 
Instance details

Defined in Foundation

Associated Types

data Route App #

Methods

renderRoute :: Route App -> ([Text], [(Text, Text)]) #

RenderRoute Auth 
Instance details

Defined in Yesod.Auth.Routes

Associated Types

data Route Auth #

Methods

renderRoute :: Route Auth -> ([Text], [(Text, Text)]) #

RenderRoute LiteApp 
Instance details

Defined in Yesod.Core.Internal.LiteApp

Associated Types

data Route LiteApp #

Methods

renderRoute :: Route LiteApp -> ([Text], [(Text, Text)]) #

RenderRoute WaiSubsite 
Instance details

Defined in Yesod.Core.Types

Associated Types

data Route WaiSubsite #

Methods

renderRoute :: Route WaiSubsite -> ([Text], [(Text, Text)]) #

RenderRoute WaiSubsiteWithAuth 
Instance details

Defined in Yesod.Core.Types

Associated Types

data Route WaiSubsiteWithAuth #

RenderRoute Static 
Instance details

Defined in Yesod.Static

Associated Types

data Route Static #

Methods

renderRoute :: Route Static -> ([Text], [(Text, Text)]) #

data family Route a #

The type-safe URLs associated with a site argument.

Instances

Instances details
RedirectUrl master (Route master) 
Instance details

Defined in Yesod.Core.Handler

Methods

toTextUrl :: (MonadHandler m, HandlerSite m ~ master) => Route master -> m Text #

(key ~ Text, val ~ Text) => RedirectUrl master (Route master, Map key val) 
Instance details

Defined in Yesod.Core.Handler

Methods

toTextUrl :: (MonadHandler m, HandlerSite m ~ master) => (Route master, Map key val) -> m Text #

(key ~ Text, val ~ Text) => RedirectUrl master (Route master, [(key, val)]) 
Instance details

Defined in Yesod.Core.Handler

Methods

toTextUrl :: (MonadHandler m, HandlerSite m ~ master) => (Route master, [(key, val)]) -> m Text #

Generic (Route App) Source # 
Instance details

Defined in Foundation

Associated Types

type Rep (Route App) :: Type -> Type #

Methods

from :: Route App -> Rep (Route App) x #

to :: Rep (Route App) x -> Route App #

Read (Route App) Source # 
Instance details

Defined in Foundation

Read (Route Auth) 
Instance details

Defined in Yesod.Auth.Routes

Read (Route LiteApp) 
Instance details

Defined in Yesod.Core.Internal.LiteApp

Read (Route WaiSubsite) 
Instance details

Defined in Yesod.Core.Types

Read (Route WaiSubsiteWithAuth) 
Instance details

Defined in Yesod.Core.Types

Read (Route Static) 
Instance details

Defined in Yesod.Static

Show (Route App) Source # 
Instance details

Defined in Foundation

Show (Route Auth) 
Instance details

Defined in Yesod.Auth.Routes

Show (Route LiteApp) 
Instance details

Defined in Yesod.Core.Internal.LiteApp

Show (Route WaiSubsite) 
Instance details

Defined in Yesod.Core.Types

Show (Route WaiSubsiteWithAuth) 
Instance details

Defined in Yesod.Core.Types

Show (Route Static) 
Instance details

Defined in Yesod.Static

Eq (Route App) Source # 
Instance details

Defined in Foundation

Methods

(==) :: Route App -> Route App -> Bool #

(/=) :: Route App -> Route App -> Bool #

Eq (Route Auth) 
Instance details

Defined in Yesod.Auth.Routes

Methods

(==) :: Route Auth -> Route Auth -> Bool #

(/=) :: Route Auth -> Route Auth -> Bool #

Eq (Route LiteApp) 
Instance details

Defined in Yesod.Core.Internal.LiteApp

Eq (Route WaiSubsite) 
Instance details

Defined in Yesod.Core.Types

Eq (Route WaiSubsiteWithAuth) 
Instance details

Defined in Yesod.Core.Types

Eq (Route Static) 
Instance details

Defined in Yesod.Static

Ord (Route LiteApp) 
Instance details

Defined in Yesod.Core.Internal.LiteApp

Ord (Route WaiSubsite) 
Instance details

Defined in Yesod.Core.Types

Ord (Route WaiSubsiteWithAuth) 
Instance details

Defined in Yesod.Core.Types

data Route App Source # 
Instance details

Defined in Foundation

data Route Auth 
Instance details

Defined in Yesod.Auth.Routes

data Route LiteApp 
Instance details

Defined in Yesod.Core.Internal.LiteApp

data Route WaiSubsite 
Instance details

Defined in Yesod.Core.Types

data Route WaiSubsiteWithAuth 
Instance details

Defined in Yesod.Core.Types

data Route Static 
Instance details

Defined in Yesod.Static

type Rep (Route App) Source # 
Instance details

Defined in Foundation

type Rep (Route App) = D1 ('MetaData "Route" "Foundation" "espial-0.0.20-EcVaTGJvbgfEg2qawed6qP" 'False) (((((C1 ('MetaCons "StaticR" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Route Static))) :+: C1 ('MetaCons "FaviconR" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "RobotsR" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AuthR" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Route Auth))))) :+: ((C1 ('MetaCons "NotesR" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UserNameP)) :+: C1 ('MetaCons "AddNoteViewR" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UserNameP))) :+: (C1 ('MetaCons "AddNoteSlimViewR" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NotesFeedR" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UserNameP))))) :+: (((C1 ('MetaCons "NoteR" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UserNameP) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NtSlug)) :+: C1 ('MetaCons "AddNoteR" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "DeleteNoteR" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)) :+: C1 ('MetaCons "HomeR" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "UserR" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UserNameP)) :+: C1 ('MetaCons "UserSharedR" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UserNameP) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SharedP))) :+: (C1 ('MetaCons "UserFilterR" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UserNameP) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilterP)) :+: C1 ('MetaCons "UserTagsR" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UserNameP) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TagsP)))))) :+: ((((C1 ('MetaCons "UserFeedR" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UserNameP)) :+: C1 ('MetaCons "UserFeedSharedR" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UserNameP) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SharedP))) :+: (C1 ('MetaCons "UserFeedFilterR" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UserNameP) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilterP)) :+: C1 ('MetaCons "UserFeedTagsR" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UserNameP) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TagsP)))) :+: ((C1 ('MetaCons "AccountSettingsR" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EditAccountSettingsR" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ChangePasswordR" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AddViewR" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "AddR" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LookupTitleR" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "UserTagCloudR" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "UserTagCloudModeR" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "DeleteR" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)) :+: C1 ('MetaCons "ReadR" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64))) :+: (C1 ('MetaCons "StarR" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)) :+: (C1 ('MetaCons "UnstarR" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)) :+: C1 ('MetaCons "DocsSearchR" 'PrefixI 'False) (U1 :: Type -> Type)))))))

data SubHandlerFor sub master a #

A handler monad for subsite

Since: yesod-core-1.6.0

Instances

Instances details
MonadIO (SubHandlerFor child master) 
Instance details

Defined in Yesod.Core.Types

Methods

liftIO :: IO a -> SubHandlerFor child master a #

Applicative (SubHandlerFor child master) 
Instance details

Defined in Yesod.Core.Types

Methods

pure :: a -> SubHandlerFor child master a #

(<*>) :: SubHandlerFor child master (a -> b) -> SubHandlerFor child master a -> SubHandlerFor child master b #

liftA2 :: (a -> b -> c) -> SubHandlerFor child master a -> SubHandlerFor child master b -> SubHandlerFor child master c #

(*>) :: SubHandlerFor child master a -> SubHandlerFor child master b -> SubHandlerFor child master b #

(<*) :: SubHandlerFor child master a -> SubHandlerFor child master b -> SubHandlerFor child master a #

Functor (SubHandlerFor sub master) 
Instance details

Defined in Yesod.Core.Types

Methods

fmap :: (a -> b) -> SubHandlerFor sub master a -> SubHandlerFor sub master b #

(<$) :: a -> SubHandlerFor sub master b -> SubHandlerFor sub master a #

Monad (SubHandlerFor child master) 
Instance details

Defined in Yesod.Core.Types

Methods

(>>=) :: SubHandlerFor child master a -> (a -> SubHandlerFor child master b) -> SubHandlerFor child master b #

(>>) :: SubHandlerFor child master a -> SubHandlerFor child master b -> SubHandlerFor child master b #

return :: a -> SubHandlerFor child master a #

MonadThrow (SubHandlerFor child master) 
Instance details

Defined in Yesod.Core.Types

Methods

throwM :: (HasCallStack, Exception e) => e -> SubHandlerFor child master a #

MonadLogger (SubHandlerFor child master) 
Instance details

Defined in Yesod.Core.Types

Methods

monadLoggerLog :: ToLogStr msg => Loc -> LogSource -> LogLevel -> msg -> SubHandlerFor child master () #

MonadLoggerIO (SubHandlerFor child master) 
Instance details

Defined in Yesod.Core.Types

Methods

askLoggerIO :: SubHandlerFor child master (Loc -> LogSource -> LogLevel -> LogStr -> IO ()) #

MonadResource (SubHandlerFor child master) 
Instance details

Defined in Yesod.Core.Types

Methods

liftResourceT :: ResourceT IO a -> SubHandlerFor child master a #

MonadUnliftIO (SubHandlerFor child master)

Since: yesod-core-1.4.38

Instance details

Defined in Yesod.Core.Types

Methods

withRunInIO :: ((forall a. SubHandlerFor child master a -> IO a) -> IO b) -> SubHandlerFor child master b #

MonadHandler (SubHandlerFor sub master) 
Instance details

Defined in Yesod.Core.Class.Handler

Associated Types

type HandlerSite (SubHandlerFor sub master) #

type SubHandlerSite (SubHandlerFor sub master) #

Methods

liftHandler :: HandlerFor (HandlerSite (SubHandlerFor sub master)) a -> SubHandlerFor sub master a #

liftSubHandler :: SubHandlerFor (SubHandlerSite (SubHandlerFor sub master)) (HandlerSite (SubHandlerFor sub master)) a -> SubHandlerFor sub master a #

MonadReader (HandlerData child master) (SubHandlerFor child master) 
Instance details

Defined in Yesod.Core.Types

Methods

ask :: SubHandlerFor child master (HandlerData child master) #

local :: (HandlerData child master -> HandlerData child master) -> SubHandlerFor child master a -> SubHandlerFor child master a #

reader :: (HandlerData child master -> a) -> SubHandlerFor child master a #

type HandlerSite (SubHandlerFor sub master) 
Instance details

Defined in Yesod.Core.Class.Handler

type HandlerSite (SubHandlerFor sub master) = master
type SubHandlerSite (SubHandlerFor sub master) 
Instance details

Defined in Yesod.Core.Class.Handler

type SubHandlerSite (SubHandlerFor sub master) = sub

data ErrorResponse #

Responses to indicate some form of an error occurred.

Constructors

NotFound

The requested resource was not found. Examples of when this occurs include when an incorrect URL is used, or yesod-persistent's get404 doesn't find a value. HTTP status: 404.

InternalError !Text

Some sort of unexpected exception. If your application uses throwIO or error to throw an exception, this is the form it would take. HTTP status: 500.

InvalidArgs ![Text]

Indicates some sort of invalid or missing argument, like a missing query parameter or malformed JSON body. Examples Yesod functions that send this include requireCheckJsonBody and Yesod.Auth.GoogleEmail2. HTTP status: 400.

NotAuthenticated

Indicates the user is not logged in. This is thrown when isAuthorized returns AuthenticationRequired. HTTP code: 401.

PermissionDenied !Text

Indicates the user doesn't have permission to access the requested resource. This is thrown when isAuthorized returns Unauthorized. HTTP code: 403.

BadMethod !Method

Indicates the URL would have been valid if used with a different HTTP method (e.g. a GET was used, but only POST is handled.) HTTP code: 405.

Instances

Instances details
Generic ErrorResponse 
Instance details

Defined in Yesod.Core.Types

Associated Types

type Rep ErrorResponse :: Type -> Type #

Show ErrorResponse 
Instance details

Defined in Yesod.Core.Types

NFData ErrorResponse 
Instance details

Defined in Yesod.Core.Types

Methods

rnf :: ErrorResponse -> () #

Eq ErrorResponse 
Instance details

Defined in Yesod.Core.Types

type Rep ErrorResponse 
Instance details

Defined in Yesod.Core.Types

type Rep ErrorResponse = D1 ('MetaData "ErrorResponse" "Yesod.Core.Types" "yesod-core-1.6.25.1-4Ew2LtlQ8DQ8yT5DsBQIRA" 'False) ((C1 ('MetaCons "NotFound" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "InternalError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :+: C1 ('MetaCons "InvalidArgs" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Text])))) :+: (C1 ('MetaCons "NotAuthenticated" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "PermissionDenied" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :+: C1 ('MetaCons "BadMethod" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Method)))))

newtype DontFullyEvaluate a #

Prevents a response body from being fully evaluated before sending the request.

Since 1.1.0

Constructors

DontFullyEvaluate 

Fields

Instances

Instances details
HasContentType a => HasContentType (DontFullyEvaluate a) 
Instance details

Defined in Yesod.Core.Content

ToContent a => ToContent (DontFullyEvaluate a) 
Instance details

Defined in Yesod.Core.Content

ToTypedContent a => ToTypedContent (DontFullyEvaluate a) 
Instance details

Defined in Yesod.Core.Content

newtype RepXml #

Constructors

RepXml Content 

Instances

Instances details
HasContentType RepXml 
Instance details

Defined in Yesod.Core.Content

ToContent RepXml 
Instance details

Defined in Yesod.Core.Content

Methods

toContent :: RepXml -> Content #

ToTypedContent RepXml 
Instance details

Defined in Yesod.Core.Content

newtype RepPlain #

Constructors

RepPlain Content 

Instances

Instances details
HasContentType RepPlain 
Instance details

Defined in Yesod.Core.Content

ToContent RepPlain 
Instance details

Defined in Yesod.Core.Content

ToTypedContent RepPlain 
Instance details

Defined in Yesod.Core.Content

newtype RepJson #

Constructors

RepJson Content 

Instances

Instances details
HasContentType RepJson 
Instance details

Defined in Yesod.Core.Content

ToContent RepJson 
Instance details

Defined in Yesod.Core.Content

Methods

toContent :: RepJson -> Content #

ToTypedContent RepJson 
Instance details

Defined in Yesod.Core.Content

type RepHtml = Html #

data TypedContent #

Instances

Instances details
ToContent TypedContent 
Instance details

Defined in Yesod.Core.Content

ToTypedContent TypedContent 
Instance details

Defined in Yesod.Core.Content

data PageContent url #

Content for a web page. By providing this datatype, we can easily create generic site templates, which would have the type signature:

PageContent url -> HtmlUrl url

Constructors

PageContent 

Fields

newtype CssBuilder #

Newtype wrapper allowing injection of arbitrary content into CSS.

Usage:

toWidget $ CssBuilder "p { color: red }"

Since: 1.1.3

Constructors

CssBuilder 

Instances

Instances details
ToWidget site CssBuilder 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidget :: (MonadWidget m, HandlerSite m ~ site) => CssBuilder -> m () #

ToWidgetHead site CssBuilder 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidgetHead :: (MonadWidget m, HandlerSite m ~ site) => CssBuilder -> m () #

ToWidgetMedia site CssBuilder 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidgetMedia :: (MonadWidget m, HandlerSite m ~ site) => Text -> CssBuilder -> m () #

render ~ RY site => ToWidget site (render -> CssBuilder) 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidget :: (MonadWidget m, HandlerSite m ~ site) => (render -> CssBuilder) -> m () #

render ~ RY site => ToWidgetHead site (render -> CssBuilder) 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidgetHead :: (MonadWidget m, HandlerSite m ~ site) => (render -> CssBuilder) -> m () #

render ~ RY site => ToWidgetMedia site (render -> CssBuilder) 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidgetMedia :: (MonadWidget m, HandlerSite m ~ site) => Text -> (render -> CssBuilder) -> m () #

data WidgetFor site a #

A generic widget, allowing specification of both the subsite and master site datatypes. While this is simply a WriterT, we define a newtype for better error messages.

Instances

Instances details
(site' ~ site, a ~ ()) => ToWidget site' (WidgetFor site a) 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidget :: (MonadWidget m, HandlerSite m ~ site') => WidgetFor site a -> m () #

MonadIO (WidgetFor site) 
Instance details

Defined in Yesod.Core.Types

Methods

liftIO :: IO a -> WidgetFor site a #

Applicative (WidgetFor site) 
Instance details

Defined in Yesod.Core.Types

Methods

pure :: a -> WidgetFor site a #

(<*>) :: WidgetFor site (a -> b) -> WidgetFor site a -> WidgetFor site b #

liftA2 :: (a -> b -> c) -> WidgetFor site a -> WidgetFor site b -> WidgetFor site c #

(*>) :: WidgetFor site a -> WidgetFor site b -> WidgetFor site b #

(<*) :: WidgetFor site a -> WidgetFor site b -> WidgetFor site a #

Functor (WidgetFor site) 
Instance details

Defined in Yesod.Core.Types

Methods

fmap :: (a -> b) -> WidgetFor site a -> WidgetFor site b #

(<$) :: a -> WidgetFor site b -> WidgetFor site a #

Monad (WidgetFor site) 
Instance details

Defined in Yesod.Core.Types

Methods

(>>=) :: WidgetFor site a -> (a -> WidgetFor site b) -> WidgetFor site b #

(>>) :: WidgetFor site a -> WidgetFor site b -> WidgetFor site b #

return :: a -> WidgetFor site a #

MonadThrow (WidgetFor site) 
Instance details

Defined in Yesod.Core.Types

Methods

throwM :: (HasCallStack, Exception e) => e -> WidgetFor site a #

MonadLogger (WidgetFor site) 
Instance details

Defined in Yesod.Core.Types

Methods

monadLoggerLog :: ToLogStr msg => Loc -> LogSource -> LogLevel -> msg -> WidgetFor site () #

MonadLoggerIO (WidgetFor site) 
Instance details

Defined in Yesod.Core.Types

Methods

askLoggerIO :: WidgetFor site (Loc -> LogSource -> LogLevel -> LogStr -> IO ()) #

PrimMonad (WidgetFor site)

Since: yesod-core-1.6.7

Instance details

Defined in Yesod.Core.Types

Associated Types

type PrimState (WidgetFor site) #

Methods

primitive :: (State# (PrimState (WidgetFor site)) -> (# State# (PrimState (WidgetFor site)), a #)) -> WidgetFor site a #

MonadResource (WidgetFor site) 
Instance details

Defined in Yesod.Core.Types

Methods

liftResourceT :: ResourceT IO a -> WidgetFor site a #

MonadUnliftIO (WidgetFor site)

Since: yesod-core-1.4.38

Instance details

Defined in Yesod.Core.Types

Methods

withRunInIO :: ((forall a. WidgetFor site a -> IO a) -> IO b) -> WidgetFor site b #

MonadHandler (WidgetFor site) 
Instance details

Defined in Yesod.Core.Class.Handler

Associated Types

type HandlerSite (WidgetFor site) #

type SubHandlerSite (WidgetFor site) #

MonadWidget (WidgetFor site) 
Instance details

Defined in Yesod.Core.Class.Handler

Methods

liftWidget :: WidgetFor (HandlerSite (WidgetFor site)) a -> WidgetFor site a #

MonadReader (WidgetData site) (WidgetFor site) 
Instance details

Defined in Yesod.Core.Types

Methods

ask :: WidgetFor site (WidgetData site) #

local :: (WidgetData site -> WidgetData site) -> WidgetFor site a -> WidgetFor site a #

reader :: (WidgetData site -> a) -> WidgetFor site a #

a ~ () => IsString (WidgetFor site a)

A String can be trivially promoted to a widget.

For example, in a yesod-scaffold site you could use:

getHomeR = do defaultLayout "Widget text"
Instance details

Defined in Yesod.Core.Types

Methods

fromString :: String -> WidgetFor site a #

a ~ () => Monoid (WidgetFor site a) 
Instance details

Defined in Yesod.Core.Types

Methods

mempty :: WidgetFor site a #

mappend :: WidgetFor site a -> WidgetFor site a -> WidgetFor site a #

mconcat :: [WidgetFor site a] -> WidgetFor site a #

a ~ () => Semigroup (WidgetFor site a) 
Instance details

Defined in Yesod.Core.Types

Methods

(<>) :: WidgetFor site a -> WidgetFor site a -> WidgetFor site a #

sconcat :: NonEmpty (WidgetFor site a) -> WidgetFor site a #

stimes :: Integral b => b -> WidgetFor site a -> WidgetFor site a #

type PrimState (WidgetFor site) 
Instance details

Defined in Yesod.Core.Types

type HandlerSite (WidgetFor site) 
Instance details

Defined in Yesod.Core.Class.Handler

type HandlerSite (WidgetFor site) = site
type SubHandlerSite (WidgetFor site) 
Instance details

Defined in Yesod.Core.Class.Handler

type SubHandlerSite (WidgetFor site) = site

data HandlerFor site a #

A generic handler monad, which can have a different subsite and master site. We define a newtype for better error message.

Instances

Instances details
MonadIO (HandlerFor site) 
Instance details

Defined in Yesod.Core.Types

Methods

liftIO :: IO a -> HandlerFor site a #

Applicative (HandlerFor site) 
Instance details

Defined in Yesod.Core.Types

Methods

pure :: a -> HandlerFor site a #

(<*>) :: HandlerFor site (a -> b) -> HandlerFor site a -> HandlerFor site b #

liftA2 :: (a -> b -> c) -> HandlerFor site a -> HandlerFor site b -> HandlerFor site c #

(*>) :: HandlerFor site a -> HandlerFor site b -> HandlerFor site b #

(<*) :: HandlerFor site a -> HandlerFor site b -> HandlerFor site a #

Functor (HandlerFor site) 
Instance details

Defined in Yesod.Core.Types

Methods

fmap :: (a -> b) -> HandlerFor site a -> HandlerFor site b #

(<$) :: a -> HandlerFor site b -> HandlerFor site a #

Monad (HandlerFor site) 
Instance details

Defined in Yesod.Core.Types

Methods

(>>=) :: HandlerFor site a -> (a -> HandlerFor site b) -> HandlerFor site b #

(>>) :: HandlerFor site a -> HandlerFor site b -> HandlerFor site b #

return :: a -> HandlerFor site a #

MonadThrow (HandlerFor site) 
Instance details

Defined in Yesod.Core.Types

Methods

throwM :: (HasCallStack, Exception e) => e -> HandlerFor site a #

MonadLogger (HandlerFor site) 
Instance details

Defined in Yesod.Core.Types

Methods

monadLoggerLog :: ToLogStr msg => Loc -> LogSource -> LogLevel -> msg -> HandlerFor site () #

MonadLoggerIO (HandlerFor site) 
Instance details

Defined in Yesod.Core.Types

Methods

askLoggerIO :: HandlerFor site (Loc -> LogSource -> LogLevel -> LogStr -> IO ()) #

PrimMonad (HandlerFor site)

Since: yesod-core-1.6.7

Instance details

Defined in Yesod.Core.Types

Associated Types

type PrimState (HandlerFor site) #

Methods

primitive :: (State# (PrimState (HandlerFor site)) -> (# State# (PrimState (HandlerFor site)), a #)) -> HandlerFor site a #

MonadResource (HandlerFor site) 
Instance details

Defined in Yesod.Core.Types

Methods

liftResourceT :: ResourceT IO a -> HandlerFor site a #

MonadUnliftIO (HandlerFor site)

Since: yesod-core-1.4.38

Instance details

Defined in Yesod.Core.Types

Methods

withRunInIO :: ((forall a. HandlerFor site a -> IO a) -> IO b) -> HandlerFor site b #

MonadHandler (HandlerFor site) 
Instance details

Defined in Yesod.Core.Class.Handler

Associated Types

type HandlerSite (HandlerFor site) #

type SubHandlerSite (HandlerFor site) #

MonadReader (HandlerData site site) (HandlerFor site) 
Instance details

Defined in Yesod.Core.Types

Methods

ask :: HandlerFor site (HandlerData site site) #

local :: (HandlerData site site -> HandlerData site site) -> HandlerFor site a -> HandlerFor site a #

reader :: (HandlerData site site -> a) -> HandlerFor site a #

type PrimState (HandlerFor site) 
Instance details

Defined in Yesod.Core.Types

type HandlerSite (HandlerFor site) 
Instance details

Defined in Yesod.Core.Class.Handler

type HandlerSite (HandlerFor site) = site
type SubHandlerSite (HandlerFor site) 
Instance details

Defined in Yesod.Core.Class.Handler

type SubHandlerSite (HandlerFor site) = site

newtype WaiSubsiteWithAuth #

Like WaiSubsite, but applies parent site's middleware and isAuthorized.

Since: yesod-core-1.4.34

Instances

Instances details
ParseRoute WaiSubsiteWithAuth 
Instance details

Defined in Yesod.Core.Types

RenderRoute WaiSubsiteWithAuth 
Instance details

Defined in Yesod.Core.Types

Associated Types

data Route WaiSubsiteWithAuth #

YesodSubDispatch WaiSubsiteWithAuth master 
Instance details

Defined in Yesod.Core.Class.Dispatch

Read (Route WaiSubsiteWithAuth) 
Instance details

Defined in Yesod.Core.Types

Show (Route WaiSubsiteWithAuth) 
Instance details

Defined in Yesod.Core.Types

Eq (Route WaiSubsiteWithAuth) 
Instance details

Defined in Yesod.Core.Types

Ord (Route WaiSubsiteWithAuth) 
Instance details

Defined in Yesod.Core.Types

data Route WaiSubsiteWithAuth 
Instance details

Defined in Yesod.Core.Types

newtype WaiSubsite #

Wrap up a normal WAI application as a Yesod subsite. Ignore parent site's middleware and isAuthorized.

Constructors

WaiSubsite 

Instances

Instances details
ParseRoute WaiSubsite 
Instance details

Defined in Yesod.Core.Types

Methods

parseRoute :: ([Text], [(Text, Text)]) -> Maybe (Route WaiSubsite) #

RenderRoute WaiSubsite 
Instance details

Defined in Yesod.Core.Types

Associated Types

data Route WaiSubsite #

Methods

renderRoute :: Route WaiSubsite -> ([Text], [(Text, Text)]) #

YesodSubDispatch WaiSubsite master 
Instance details

Defined in Yesod.Core.Class.Dispatch

Read (Route WaiSubsite) 
Instance details

Defined in Yesod.Core.Types

Show (Route WaiSubsite) 
Instance details

Defined in Yesod.Core.Types

Eq (Route WaiSubsite) 
Instance details

Defined in Yesod.Core.Types

Ord (Route WaiSubsite) 
Instance details

Defined in Yesod.Core.Types

data Route WaiSubsite 
Instance details

Defined in Yesod.Core.Types

type Texts = [Text] #

type BottomOfHeadAsync master #

Arguments

 = [Text]

urls to load asynchronously

-> Maybe (HtmlUrl (Route master))

widget of js to run on async completion

-> HtmlUrl (Route master)

widget to insert at the bottom of head

data AuthResult #

Instances

Instances details
Read AuthResult 
Instance details

Defined in Yesod.Core.Types

Show AuthResult 
Instance details

Defined in Yesod.Core.Types

Eq AuthResult 
Instance details

Defined in Yesod.Core.Types

data Approot master #

How to determine the root of the application for constructing URLs.

Note that future versions of Yesod may add new constructors without bumping the major version number. As a result, you should not pattern match on Approot values.

Constructors

ApprootRelative

No application root.

ApprootStatic !Text 
ApprootMaster !(master -> Text) 
ApprootRequest !(master -> Request -> Text) 

type RequestBodyContents = ([(Text, Text)], [(Text, FileInfo)]) #

A tuple containing both the POST parameters and submitted files.

data YesodRequest #

The parsed request information. This type augments the standard WAI Request with additional information.

Constructors

YesodRequest 

Fields

newtype SessionBackend #

Constructors

SessionBackend 

Fields

class ToContent a => ToTypedContent a where #

Any type which can be converted to TypedContent.

Since 1.2.0

Instances

Instances details
ToTypedContent Encoding 
Instance details

Defined in Yesod.Core.Content

ToTypedContent Value 
Instance details

Defined in Yesod.Core.Content

ToTypedContent Void 
Instance details

Defined in Yesod.Core.Content

ToTypedContent Html 
Instance details

Defined in Yesod.Core.Content

ToTypedContent Css 
Instance details

Defined in Yesod.Core.Content

ToTypedContent Javascript 
Instance details

Defined in Yesod.Core.Content

ToTypedContent Text 
Instance details

Defined in Yesod.Core.Content

ToTypedContent Text 
Instance details

Defined in Yesod.Core.Content

ToTypedContent RepJson 
Instance details

Defined in Yesod.Core.Content

ToTypedContent RepPlain 
Instance details

Defined in Yesod.Core.Content

ToTypedContent RepXml 
Instance details

Defined in Yesod.Core.Content

ToTypedContent TypedContent 
Instance details

Defined in Yesod.Core.Content

ToTypedContent RepRss 
Instance details

Defined in Yesod.RssFeed

ToTypedContent () 
Instance details

Defined in Yesod.Core.Content

Methods

toTypedContent :: () -> TypedContent #

ToTypedContent a => ToTypedContent (DontFullyEvaluate a) 
Instance details

Defined in Yesod.Core.Content

ToTypedContent (JSONResponse a) 
Instance details

Defined in Yesod.Core.Content

ToTypedContent [Char] 
Instance details

Defined in Yesod.Core.Content

ToTypedContent (ContentType, Content) 
Instance details

Defined in Yesod.Core.Content

class ToTypedContent a => HasContentType a where #

Methods

getContentType :: Monad m => m a -> ContentType #

Instances

Instances details
HasContentType Encoding 
Instance details

Defined in Yesod.Core.Content

HasContentType Value 
Instance details

Defined in Yesod.Core.Content

Methods

getContentType :: Monad m => m Value -> ContentType #

HasContentType Html 
Instance details

Defined in Yesod.Core.Content

Methods

getContentType :: Monad m => m Html -> ContentType #

HasContentType Css 
Instance details

Defined in Yesod.Core.Content

Methods

getContentType :: Monad m => m Css -> ContentType #

HasContentType Javascript 
Instance details

Defined in Yesod.Core.Content

HasContentType Text 
Instance details

Defined in Yesod.Core.Content

Methods

getContentType :: Monad m => m Text -> ContentType #

HasContentType Text 
Instance details

Defined in Yesod.Core.Content

Methods

getContentType :: Monad m => m Text -> ContentType #

HasContentType RepJson 
Instance details

Defined in Yesod.Core.Content

HasContentType RepPlain 
Instance details

Defined in Yesod.Core.Content

HasContentType RepXml 
Instance details

Defined in Yesod.Core.Content

HasContentType RepRss 
Instance details

Defined in Yesod.RssFeed

HasContentType a => HasContentType (DontFullyEvaluate a) 
Instance details

Defined in Yesod.Core.Content

HasContentType (JSONResponse a) 
Instance details

Defined in Yesod.Core.Content

class ToFlushBuilder a where #

A class for all data which can be sent in a streaming response. Note that for textual data, instances must use UTF-8 encoding.

Since 1.2.0

Methods

toFlushBuilder :: a -> Flush Builder #

Instances

Instances details
ToFlushBuilder Html 
Instance details

Defined in Yesod.Core.Content

ToFlushBuilder Builder 
Instance details

Defined in Yesod.Core.Content

ToFlushBuilder ByteString 
Instance details

Defined in Yesod.Core.Content

ToFlushBuilder ByteString 
Instance details

Defined in Yesod.Core.Content

ToFlushBuilder Text 
Instance details

Defined in Yesod.Core.Content

ToFlushBuilder Text 
Instance details

Defined in Yesod.Core.Content

ToFlushBuilder String 
Instance details

Defined in Yesod.Core.Content

ToFlushBuilder (Flush Html) 
Instance details

Defined in Yesod.Core.Content

ToFlushBuilder (Flush Builder) 
Instance details

Defined in Yesod.Core.Content

ToFlushBuilder (Flush ByteString) 
Instance details

Defined in Yesod.Core.Content

ToFlushBuilder (Flush ByteString) 
Instance details

Defined in Yesod.Core.Content

ToFlushBuilder (Flush Text) 
Instance details

Defined in Yesod.Core.Content

ToFlushBuilder (Flush Text) 
Instance details

Defined in Yesod.Core.Content

ToFlushBuilder (Flush String) 
Instance details

Defined in Yesod.Core.Content

class ToContent a where #

Anything which can be converted into Content. Most of the time, you will want to use the ContentBuilder constructor. An easier approach will be to use a pre-defined toContent function, such as converting your data into a lazy bytestring and then calling toContent on that.

Please note that the built-in instances for lazy data structures (String, lazy ByteString, lazy Text and Html) will not automatically include the content length for the ContentBuilder constructor.

Methods

toContent :: a -> Content #

Instances

Instances details
ToContent Encoding 
Instance details

Defined in Yesod.Core.Content

ToContent Value 
Instance details

Defined in Yesod.Core.Content

Methods

toContent :: Value -> Content #

ToContent Void 
Instance details

Defined in Yesod.Core.Content

Methods

toContent :: Void -> Content #

ToContent Html 
Instance details

Defined in Yesod.Core.Content

Methods

toContent :: Html -> Content #

ToContent Builder 
Instance details

Defined in Yesod.Core.Content

Methods

toContent :: Builder -> Content #

ToContent ByteString 
Instance details

Defined in Yesod.Core.Content

ToContent ByteString 
Instance details

Defined in Yesod.Core.Content

ToContent Css 
Instance details

Defined in Yesod.Core.Content

Methods

toContent :: Css -> Content #

ToContent Javascript 
Instance details

Defined in Yesod.Core.Content

ToContent Text 
Instance details

Defined in Yesod.Core.Content

Methods

toContent :: Text -> Content #

ToContent Text 
Instance details

Defined in Yesod.Core.Content

Methods

toContent :: Text -> Content #

ToContent Content 
Instance details

Defined in Yesod.Core.Content

Methods

toContent :: Content -> Content #

ToContent RepJson 
Instance details

Defined in Yesod.Core.Content

Methods

toContent :: RepJson -> Content #

ToContent RepPlain 
Instance details

Defined in Yesod.Core.Content

ToContent RepXml 
Instance details

Defined in Yesod.Core.Content

Methods

toContent :: RepXml -> Content #

ToContent TypedContent 
Instance details

Defined in Yesod.Core.Content

ToContent RepRss 
Instance details

Defined in Yesod.RssFeed

Methods

toContent :: RepRss -> Content #

ToContent String 
Instance details

Defined in Yesod.Core.Content

Methods

toContent :: String -> Content #

ToContent () 
Instance details

Defined in Yesod.Core.Content

Methods

toContent :: () -> Content #

ToContent a => ToContent (DontFullyEvaluate a) 
Instance details

Defined in Yesod.Core.Content

ToContent (JSONResponse a) 
Instance details

Defined in Yesod.Core.Content

ToContent (ContentType, Content) 
Instance details

Defined in Yesod.Core.Content

ToFlushBuilder builder => ToContent (ConduitT () builder (ResourceT IO) ()) 
Instance details

Defined in Yesod.Core.Content

Methods

toContent :: ConduitT () builder (ResourceT IO) () -> Content #

ToFlushBuilder builder => ToContent (SealedConduitT () builder (ResourceT IO) ()) 
Instance details

Defined in Yesod.Core.Content

Methods

toContent :: SealedConduitT () builder (ResourceT IO) () -> Content #

ToFlushBuilder builder => ToContent (Pipe () () builder () (ResourceT IO) ()) 
Instance details

Defined in Yesod.Core.Content

Methods

toContent :: Pipe () () builder () (ResourceT IO) () -> Content #

class MonadHandler m => MonadWidget (m :: Type -> Type) where #

Methods

liftWidget :: WidgetFor (HandlerSite m) a -> m a #

Instances

Instances details
MonadWidget m => MonadWidget (MaybeT m) 
Instance details

Defined in Yesod.Core.Class.Handler

Methods

liftWidget :: WidgetFor (HandlerSite (MaybeT m)) a -> MaybeT m a #

MonadWidget (WidgetFor site) 
Instance details

Defined in Yesod.Core.Class.Handler

Methods

liftWidget :: WidgetFor (HandlerSite (WidgetFor site)) a -> WidgetFor site a #

MonadWidget m => MonadWidget (ExceptT e m) 
Instance details

Defined in Yesod.Core.Class.Handler

Methods

liftWidget :: WidgetFor (HandlerSite (ExceptT e m)) a -> ExceptT e m a #

MonadWidget m => MonadWidget (IdentityT m) 
Instance details

Defined in Yesod.Core.Class.Handler

MonadWidget m => MonadWidget (ReaderT r m) 
Instance details

Defined in Yesod.Core.Class.Handler

Methods

liftWidget :: WidgetFor (HandlerSite (ReaderT r m)) a -> ReaderT r m a #

MonadWidget m => MonadWidget (StateT s m) 
Instance details

Defined in Yesod.Core.Class.Handler

Methods

liftWidget :: WidgetFor (HandlerSite (StateT s m)) a -> StateT s m a #

MonadWidget m => MonadWidget (StateT s m) 
Instance details

Defined in Yesod.Core.Class.Handler

Methods

liftWidget :: WidgetFor (HandlerSite (StateT s m)) a -> StateT s m a #

(Monoid w, MonadWidget m) => MonadWidget (WriterT w m) 
Instance details

Defined in Yesod.Core.Class.Handler

Methods

liftWidget :: WidgetFor (HandlerSite (WriterT w m)) a -> WriterT w m a #

(Monoid w, MonadWidget m) => MonadWidget (WriterT w m) 
Instance details

Defined in Yesod.Core.Class.Handler

Methods

liftWidget :: WidgetFor (HandlerSite (WriterT w m)) a -> WriterT w m a #

MonadWidget m => MonadWidget (ConduitM i o m) 
Instance details

Defined in Yesod.Core.Class.Handler

Methods

liftWidget :: WidgetFor (HandlerSite (ConduitM i o m)) a -> ConduitM i o m a #

(Monoid w, MonadWidget m) => MonadWidget (RWST r w s m) 
Instance details

Defined in Yesod.Core.Class.Handler

Methods

liftWidget :: WidgetFor (HandlerSite (RWST r w s m)) a -> RWST r w s m a #

(Monoid w, MonadWidget m) => MonadWidget (RWST r w s m) 
Instance details

Defined in Yesod.Core.Class.Handler

Methods

liftWidget :: WidgetFor (HandlerSite (RWST r w s m)) a -> RWST r w s m a #

MonadWidget m => MonadWidget (Pipe l i o u m) 
Instance details

Defined in Yesod.Core.Class.Handler

Methods

liftWidget :: WidgetFor (HandlerSite (Pipe l i o u m)) a -> Pipe l i o u m a #

class (MonadResource m, MonadLogger m) => MonadHandler (m :: Type -> Type) where #

Associated Types

type HandlerSite (m :: Type -> Type) #

type SubHandlerSite (m :: Type -> Type) #

Instances

Instances details
MonadHandler m => MonadHandler (MaybeT m) 
Instance details

Defined in Yesod.Core.Class.Handler

Associated Types

type HandlerSite (MaybeT m) #

type SubHandlerSite (MaybeT m) #

MonadHandler (HandlerFor site) 
Instance details

Defined in Yesod.Core.Class.Handler

Associated Types

type HandlerSite (HandlerFor site) #

type SubHandlerSite (HandlerFor site) #

MonadHandler (WidgetFor site) 
Instance details

Defined in Yesod.Core.Class.Handler

Associated Types

type HandlerSite (WidgetFor site) #

type SubHandlerSite (WidgetFor site) #

MonadHandler m => MonadHandler (ExceptT e m) 
Instance details

Defined in Yesod.Core.Class.Handler

Associated Types

type HandlerSite (ExceptT e m) #

type SubHandlerSite (ExceptT e m) #

MonadHandler m => MonadHandler (IdentityT m) 
Instance details

Defined in Yesod.Core.Class.Handler

Associated Types

type HandlerSite (IdentityT m) #

type SubHandlerSite (IdentityT m) #

MonadHandler m => MonadHandler (ReaderT r m) 
Instance details

Defined in Yesod.Core.Class.Handler

Associated Types

type HandlerSite (ReaderT r m) #

type SubHandlerSite (ReaderT r m) #

MonadHandler m => MonadHandler (StateT s m) 
Instance details

Defined in Yesod.Core.Class.Handler

Associated Types

type HandlerSite (StateT s m) #

type SubHandlerSite (StateT s m) #

MonadHandler m => MonadHandler (StateT s m) 
Instance details

Defined in Yesod.Core.Class.Handler

Associated Types

type HandlerSite (StateT s m) #

type SubHandlerSite (StateT s m) #

(Monoid w, MonadHandler m) => MonadHandler (WriterT w m) 
Instance details

Defined in Yesod.Core.Class.Handler

Associated Types

type HandlerSite (WriterT w m) #

type SubHandlerSite (WriterT w m) #

(Monoid w, MonadHandler m) => MonadHandler (WriterT w m) 
Instance details

Defined in Yesod.Core.Class.Handler

Associated Types

type HandlerSite (WriterT w m) #

type SubHandlerSite (WriterT w m) #

MonadHandler (SubHandlerFor sub master) 
Instance details

Defined in Yesod.Core.Class.Handler

Associated Types

type HandlerSite (SubHandlerFor sub master) #

type SubHandlerSite (SubHandlerFor sub master) #

Methods

liftHandler :: HandlerFor (HandlerSite (SubHandlerFor sub master)) a -> SubHandlerFor sub master a #

liftSubHandler :: SubHandlerFor (SubHandlerSite (SubHandlerFor sub master)) (HandlerSite (SubHandlerFor sub master)) a -> SubHandlerFor sub master a #

MonadHandler m => MonadHandler (ConduitM i o m) 
Instance details

Defined in Yesod.Core.Class.Handler

Associated Types

type HandlerSite (ConduitM i o m) #

type SubHandlerSite (ConduitM i o m) #

(Monoid w, MonadHandler m) => MonadHandler (RWST r w s m) 
Instance details

Defined in Yesod.Core.Class.Handler

Associated Types

type HandlerSite (RWST r w s m) #

type SubHandlerSite (RWST r w s m) #

Methods

liftHandler :: HandlerFor (HandlerSite (RWST r w s m)) a -> RWST r w s m a #

liftSubHandler :: SubHandlerFor (SubHandlerSite (RWST r w s m)) (HandlerSite (RWST r w s m)) a -> RWST r w s m a #

(Monoid w, MonadHandler m) => MonadHandler (RWST r w s m) 
Instance details

Defined in Yesod.Core.Class.Handler

Associated Types

type HandlerSite (RWST r w s m) #

type SubHandlerSite (RWST r w s m) #

Methods

liftHandler :: HandlerFor (HandlerSite (RWST r w s m)) a -> RWST r w s m a #

liftSubHandler :: SubHandlerFor (SubHandlerSite (RWST r w s m)) (HandlerSite (RWST r w s m)) a -> RWST r w s m a #

MonadHandler m => MonadHandler (Pipe l i o u m) 
Instance details

Defined in Yesod.Core.Class.Handler

Associated Types

type HandlerSite (Pipe l i o u m) #

type SubHandlerSite (Pipe l i o u m) #

Methods

liftHandler :: HandlerFor (HandlerSite (Pipe l i o u m)) a -> Pipe l i o u m a #

liftSubHandler :: SubHandlerFor (SubHandlerSite (Pipe l i o u m)) (HandlerSite (Pipe l i o u m)) a -> Pipe l i o u m a #

type family HandlerSite (m :: Type -> Type) #

Instances

Instances details
type HandlerSite (MaybeT m) 
Instance details

Defined in Yesod.Core.Class.Handler

type HandlerSite (HandlerFor site) 
Instance details

Defined in Yesod.Core.Class.Handler

type HandlerSite (HandlerFor site) = site
type HandlerSite (WidgetFor site) 
Instance details

Defined in Yesod.Core.Class.Handler

type HandlerSite (WidgetFor site) = site
type HandlerSite (ExceptT e m) 
Instance details

Defined in Yesod.Core.Class.Handler

type HandlerSite (IdentityT m) 
Instance details

Defined in Yesod.Core.Class.Handler

type HandlerSite (ReaderT r m) 
Instance details

Defined in Yesod.Core.Class.Handler

type HandlerSite (StateT s m) 
Instance details

Defined in Yesod.Core.Class.Handler

type HandlerSite (StateT s m) 
Instance details

Defined in Yesod.Core.Class.Handler

type HandlerSite (WriterT w m) 
Instance details

Defined in Yesod.Core.Class.Handler

type HandlerSite (WriterT w m) 
Instance details

Defined in Yesod.Core.Class.Handler

type HandlerSite (SubHandlerFor sub master) 
Instance details

Defined in Yesod.Core.Class.Handler

type HandlerSite (SubHandlerFor sub master) = master
type HandlerSite (ConduitM i o m) 
Instance details

Defined in Yesod.Core.Class.Handler

type HandlerSite (RWST r w s m) 
Instance details

Defined in Yesod.Core.Class.Handler

type HandlerSite (RWST r w s m) = HandlerSite m
type HandlerSite (RWST r w s m) 
Instance details

Defined in Yesod.Core.Class.Handler

type HandlerSite (RWST r w s m) = HandlerSite m
type HandlerSite (Pipe l i o u m) 
Instance details

Defined in Yesod.Core.Class.Handler

type HandlerSite (Pipe l i o u m) = HandlerSite m

type family SubHandlerSite (m :: Type -> Type) #

Instances

Instances details
type SubHandlerSite (MaybeT m) 
Instance details

Defined in Yesod.Core.Class.Handler

type SubHandlerSite (HandlerFor site) 
Instance details

Defined in Yesod.Core.Class.Handler

type SubHandlerSite (HandlerFor site) = site
type SubHandlerSite (WidgetFor site) 
Instance details

Defined in Yesod.Core.Class.Handler

type SubHandlerSite (WidgetFor site) = site
type SubHandlerSite (ExceptT e m) 
Instance details

Defined in Yesod.Core.Class.Handler

type SubHandlerSite (IdentityT m) 
Instance details

Defined in Yesod.Core.Class.Handler

type SubHandlerSite (ReaderT r m) 
Instance details

Defined in Yesod.Core.Class.Handler

type SubHandlerSite (StateT s m) 
Instance details

Defined in Yesod.Core.Class.Handler

type SubHandlerSite (StateT s m) 
Instance details

Defined in Yesod.Core.Class.Handler

type SubHandlerSite (WriterT w m) 
Instance details

Defined in Yesod.Core.Class.Handler

type SubHandlerSite (WriterT w m) 
Instance details

Defined in Yesod.Core.Class.Handler

type SubHandlerSite (SubHandlerFor sub master) 
Instance details

Defined in Yesod.Core.Class.Handler

type SubHandlerSite (SubHandlerFor sub master) = sub
type SubHandlerSite (ConduitM i o m) 
Instance details

Defined in Yesod.Core.Class.Handler

type SubHandlerSite (RWST r w s m) 
Instance details

Defined in Yesod.Core.Class.Handler

type SubHandlerSite (RWST r w s m) 
Instance details

Defined in Yesod.Core.Class.Handler

type SubHandlerSite (Pipe l i o u m) 
Instance details

Defined in Yesod.Core.Class.Handler

type SubHandlerSite (Pipe l i o u m) = SubHandlerSite m

data ProvidedRep (m :: Type -> Type) #

Internal representation of a single provided representation.

Since: yesod-core-1.2.0

data Fragment a b #

Add a fragment identifier to a route to be used when redirecting. For example:

redirect (NewsfeedR :#: storyId)

@since 1.2.9.

Constructors

a :#: b 

Instances

Instances details
(RedirectUrl master a, PathPiece b) => RedirectUrl master (Fragment a b) 
Instance details

Defined in Yesod.Core.Handler

Methods

toTextUrl :: (MonadHandler m, HandlerSite m ~ master) => Fragment a b -> m Text #

(Show a, Show b) => Show (Fragment a b) 
Instance details

Defined in Yesod.Core.Handler

Methods

showsPrec :: Int -> Fragment a b -> ShowS #

show :: Fragment a b -> String #

showList :: [Fragment a b] -> ShowS #

class RedirectUrl master a where #

Some value which can be turned into a URL for redirects.

Methods

toTextUrl :: (MonadHandler m, HandlerSite m ~ master) => a -> m Text #

Converts the value to the URL and a list of query-string parameters.

Instances

Instances details
RedirectUrl master Text 
Instance details

Defined in Yesod.Core.Handler

Methods

toTextUrl :: (MonadHandler m, HandlerSite m ~ master) => Text -> m Text #

RedirectUrl master String 
Instance details

Defined in Yesod.Core.Handler

Methods

toTextUrl :: (MonadHandler m, HandlerSite m ~ master) => String -> m Text #

RedirectUrl master (Route master) 
Instance details

Defined in Yesod.Core.Handler

Methods

toTextUrl :: (MonadHandler m, HandlerSite m ~ master) => Route master -> m Text #

(RedirectUrl master a, PathPiece b) => RedirectUrl master (Fragment a b) 
Instance details

Defined in Yesod.Core.Handler

Methods

toTextUrl :: (MonadHandler m, HandlerSite m ~ master) => Fragment a b -> m Text #

(key ~ Text, val ~ Text) => RedirectUrl master (Route master, Map key val) 
Instance details

Defined in Yesod.Core.Handler

Methods

toTextUrl :: (MonadHandler m, HandlerSite m ~ master) => (Route master, Map key val) -> m Text #

(key ~ Text, val ~ Text) => RedirectUrl master (Route master, [(key, val)]) 
Instance details

Defined in Yesod.Core.Handler

Methods

toTextUrl :: (MonadHandler m, HandlerSite m ~ master) => (Route master, [(key, val)]) -> m Text #

type HandlerT site (m :: Type -> Type) = HandlerFor site #

class ToWidgetHead site a where #

Methods

toWidgetHead :: (MonadWidget m, HandlerSite m ~ site) => a -> m () #

Instances

Instances details
ToWidgetHead site Html 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidgetHead :: (MonadWidget m, HandlerSite m ~ site) => Html -> m () #

ToWidgetHead site Css 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidgetHead :: (MonadWidget m, HandlerSite m ~ site) => Css -> m () #

ToWidgetHead site Javascript 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidgetHead :: (MonadWidget m, HandlerSite m ~ site) => Javascript -> m () #

ToWidgetHead site CssBuilder 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidgetHead :: (MonadWidget m, HandlerSite m ~ site) => CssBuilder -> m () #

render ~ RY site => ToWidgetHead site (render -> Html) 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidgetHead :: (MonadWidget m, HandlerSite m ~ site) => (render -> Html) -> m () #

render ~ RY site => ToWidgetHead site (render -> Css) 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidgetHead :: (MonadWidget m, HandlerSite m ~ site) => (render -> Css) -> m () #

render ~ RY site => ToWidgetHead site (render -> Javascript) 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidgetHead :: (MonadWidget m, HandlerSite m ~ site) => (render -> Javascript) -> m () #

render ~ RY site => ToWidgetHead site (render -> CssBuilder) 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidgetHead :: (MonadWidget m, HandlerSite m ~ site) => (render -> CssBuilder) -> m () #

class ToWidgetBody site a where #

Methods

toWidgetBody :: (MonadWidget m, HandlerSite m ~ site) => a -> m () #

Instances

Instances details
ToWidgetBody site Html 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidgetBody :: (MonadWidget m, HandlerSite m ~ site) => Html -> m () #

ToWidgetBody site Javascript 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidgetBody :: (MonadWidget m, HandlerSite m ~ site) => Javascript -> m () #

render ~ RY site => ToWidgetBody site (render -> Html) 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidgetBody :: (MonadWidget m, HandlerSite m ~ site) => (render -> Html) -> m () #

render ~ RY site => ToWidgetBody site (render -> Javascript) 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidgetBody :: (MonadWidget m, HandlerSite m ~ site) => (render -> Javascript) -> m () #

class ToWidgetMedia site a where #

Allows adding some CSS to the page with a specific media type.

Since 1.2

Methods

toWidgetMedia #

Arguments

:: (MonadWidget m, HandlerSite m ~ site) 
=> Text

media value

-> a 
-> m () 

Add the given content to the page, but only for the given media type.

Since 1.2

Instances

Instances details
ToWidgetMedia site Css 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidgetMedia :: (MonadWidget m, HandlerSite m ~ site) => Text -> Css -> m () #

ToWidgetMedia site CssBuilder 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidgetMedia :: (MonadWidget m, HandlerSite m ~ site) => Text -> CssBuilder -> m () #

render ~ RY site => ToWidgetMedia site (render -> Css) 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidgetMedia :: (MonadWidget m, HandlerSite m ~ site) => Text -> (render -> Css) -> m () #

render ~ RY site => ToWidgetMedia site (render -> CssBuilder) 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidgetMedia :: (MonadWidget m, HandlerSite m ~ site) => Text -> (render -> CssBuilder) -> m () #

class ToWidget site a where #

Methods

toWidget :: (MonadWidget m, HandlerSite m ~ site) => a -> m () #

Instances

Instances details
ToWidget site Html 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidget :: (MonadWidget m, HandlerSite m ~ site) => Html -> m () #

ToWidget site Css 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidget :: (MonadWidget m, HandlerSite m ~ site) => Css -> m () #

ToWidget site Javascript 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidget :: (MonadWidget m, HandlerSite m ~ site) => Javascript -> m () #

ToWidget site Text

Since: yesod-core-1.4.28

Instance details

Defined in Yesod.Core.Widget

Methods

toWidget :: (MonadWidget m, HandlerSite m ~ site) => Text -> m () #

ToWidget site Builder

Since: yesod-core-1.4.28

Instance details

Defined in Yesod.Core.Widget

Methods

toWidget :: (MonadWidget m, HandlerSite m ~ site) => Builder -> m () #

ToWidget site Text

Since: yesod-core-1.4.28

Instance details

Defined in Yesod.Core.Widget

Methods

toWidget :: (MonadWidget m, HandlerSite m ~ site) => Text -> m () #

ToWidget site CssBuilder 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidget :: (MonadWidget m, HandlerSite m ~ site) => CssBuilder -> m () #

render ~ RY site => ToWidget site (render -> Html) 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidget :: (MonadWidget m, HandlerSite m ~ site) => (render -> Html) -> m () #

render ~ RY site => ToWidget site (render -> Css) 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidget :: (MonadWidget m, HandlerSite m ~ site) => (render -> Css) -> m () #

render ~ RY site => ToWidget site (render -> Javascript) 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidget :: (MonadWidget m, HandlerSite m ~ site) => (render -> Javascript) -> m () #

render ~ RY site => ToWidget site (render -> CssBuilder) 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidget :: (MonadWidget m, HandlerSite m ~ site) => (render -> CssBuilder) -> m () #

(site' ~ site, a ~ ()) => ToWidget site' (WidgetFor site a) 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidget :: (MonadWidget m, HandlerSite m ~ site') => WidgetFor site a -> m () #

type WidgetT site (m :: Type -> Type) = WidgetFor site #

class YesodSubDispatch sub master where #

Instances

Instances details
YesodSubDispatch WaiSubsite master 
Instance details

Defined in Yesod.Core.Class.Dispatch

YesodSubDispatch WaiSubsiteWithAuth master 
Instance details

Defined in Yesod.Core.Class.Dispatch

YesodSubDispatch Static master 
Instance details

Defined in Yesod.Static

class Yesod site => YesodDispatch site where #

This class is automatically instantiated when you use the template haskell mkYesod function. You should never need to deal with it directly.

Instances

Instances details
YesodDispatch App Source # 
Instance details

Defined in Application

YesodDispatch LiteApp 
Instance details

Defined in Yesod.Core.Internal.LiteApp

newtype LiteApp #

Constructors

LiteApp 

Instances

Instances details
Monoid LiteApp 
Instance details

Defined in Yesod.Core.Internal.LiteApp

Semigroup LiteApp 
Instance details

Defined in Yesod.Core.Internal.LiteApp

YesodDispatch LiteApp 
Instance details

Defined in Yesod.Core.Internal.LiteApp

Yesod LiteApp 
Instance details

Defined in Yesod.Core.Internal.LiteApp

Methods

approot :: Approot LiteApp #

catchHandlerExceptions :: MonadUnliftIO m => LiteApp -> m a -> (SomeException -> m a) -> m a #

errorHandler :: ErrorResponse -> HandlerFor LiteApp TypedContent #

defaultLayout :: WidgetFor LiteApp () -> HandlerFor LiteApp Html #

urlParamRenderOverride :: LiteApp -> Route LiteApp -> [(Text, Text)] -> Maybe Builder #

isAuthorized :: Route LiteApp -> Bool -> HandlerFor LiteApp AuthResult #

isWriteRequest :: Route LiteApp -> HandlerFor LiteApp Bool #

authRoute :: LiteApp -> Maybe (Route LiteApp) #

cleanPath :: LiteApp -> [Text] -> Either [Text] [Text] #

joinPath :: LiteApp -> Text -> [Text] -> [(Text, Text)] -> Builder #

addStaticContent :: Text -> Text -> ByteString -> HandlerFor LiteApp (Maybe (Either Text (Route LiteApp, [(Text, Text)]))) #

maximumContentLength :: LiteApp -> Maybe (Route LiteApp) -> Maybe Word64 #

maximumContentLengthIO :: LiteApp -> Maybe (Route LiteApp) -> IO (Maybe Word64) #

makeLogger :: LiteApp -> IO Logger #

messageLoggerSource :: LiteApp -> Logger -> Loc -> LogSource -> LogLevel -> LogStr -> IO () #

jsLoader :: LiteApp -> ScriptLoadPosition LiteApp #

jsAttributes :: LiteApp -> [(Text, Text)] #

jsAttributesHandler :: HandlerFor LiteApp [(Text, Text)] #

makeSessionBackend :: LiteApp -> IO (Maybe SessionBackend) #

fileUpload :: LiteApp -> RequestBodyLength -> FileUpload #

shouldLogIO :: LiteApp -> LogSource -> LogLevel -> IO Bool #

yesodMiddleware :: ToTypedContent res => HandlerFor LiteApp res -> HandlerFor LiteApp res #

yesodWithInternalState :: LiteApp -> Maybe (Route LiteApp) -> (InternalState -> IO a) -> IO a #

defaultMessageWidget :: Html -> HtmlUrl (Route LiteApp) -> WidgetFor LiteApp () #

ParseRoute LiteApp 
Instance details

Defined in Yesod.Core.Internal.LiteApp

Methods

parseRoute :: ([Text], [(Text, Text)]) -> Maybe (Route LiteApp) #

RenderRoute LiteApp 
Instance details

Defined in Yesod.Core.Internal.LiteApp

Associated Types

data Route LiteApp #

Methods

renderRoute :: Route LiteApp -> ([Text], [(Text, Text)]) #

Read (Route LiteApp) 
Instance details

Defined in Yesod.Core.Internal.LiteApp

Show (Route LiteApp) 
Instance details

Defined in Yesod.Core.Internal.LiteApp

Eq (Route LiteApp) 
Instance details

Defined in Yesod.Core.Internal.LiteApp

Ord (Route LiteApp) 
Instance details

Defined in Yesod.Core.Internal.LiteApp

data Route LiteApp 
Instance details

Defined in Yesod.Core.Internal.LiteApp

class YesodBreadcrumbs site where #

A type-safe, concise method of creating breadcrumbs for pages. For each resource, you declare the title of the page and the parent resource (if present).

Methods

breadcrumb :: Route site -> HandlerFor site (Text, Maybe (Route site)) #

Returns the title and the parent resource, if available. If you return a Nothing, then this is considered a top-level page.

data RouteOpts #

General opts data type for generating yesod.

Contains options for what instances are derived for the route. Use the setting functions on defaultOpts to set specific fields.

Since: yesod-core-1.6.25.0

type Env = Map Text [Text] #

data Field (m :: Type -> Type) a #

Constructors

Field 

type FieldViewFunc (m :: Type -> Type) a #

Arguments

 = Text

ID

-> Text

Name

-> [(Text, Text)]

Attributes

-> Either Text a

Either (invalid text) or (legitimate result)

-> Bool

Required?

-> WidgetFor (HandlerSite m) () 

data FieldView site #

Constructors

FieldView 

data FieldSettings master #

Constructors

FieldSettings 

Fields

Instances

Instances details
IsString (FieldSettings a) 
Instance details

Defined in Yesod.Form.Types

newtype AForm (m :: Type -> Type) a #

Constructors

AForm 

Instances

Instances details
MonadTrans AForm 
Instance details

Defined in Yesod.Form.Types

Methods

lift :: Monad m => m a -> AForm m a #

Monad m => Applicative (AForm m) 
Instance details

Defined in Yesod.Form.Types

Methods

pure :: a -> AForm m a #

(<*>) :: AForm m (a -> b) -> AForm m a -> AForm m b #

liftA2 :: (a -> b -> c) -> AForm m a -> AForm m b -> AForm m c #

(*>) :: AForm m a -> AForm m b -> AForm m b #

(<*) :: AForm m a -> AForm m b -> AForm m a #

Monad m => Functor (AForm m) 
Instance details

Defined in Yesod.Form.Types

Methods

fmap :: (a -> b) -> AForm m a -> AForm m b #

(<$) :: a -> AForm m b -> AForm m a #

Monad m => Monad (AForm m) 
Instance details

Defined in Yesod.Form.Types

Methods

(>>=) :: AForm m a -> (a -> AForm m b) -> AForm m b #

(>>) :: AForm m a -> AForm m b -> AForm m b #

return :: a -> AForm m a #

(Monad m, Monoid a) => Monoid (AForm m a) 
Instance details

Defined in Yesod.Form.Types

Methods

mempty :: AForm m a #

mappend :: AForm m a -> AForm m a -> AForm m a #

mconcat :: [AForm m a] -> AForm m a #

(Monad m, Semigroup a) => Semigroup (AForm m a) 
Instance details

Defined in Yesod.Form.Types

Methods

(<>) :: AForm m a -> AForm m a -> AForm m a #

sconcat :: NonEmpty (AForm m a) -> AForm m a #

stimes :: Integral b => b -> AForm m a -> AForm m a #

type MForm (m :: Type -> Type) a = RWST (Maybe (Env, FileEnv), HandlerSite m, [Lang]) Enctype Ints m a #

type WForm (m :: Type -> Type) a = MForm (WriterT [FieldView (HandlerSite m)] m) a #

MForm variant stacking a WriterT. The following code example using a monadic form MForm:

formToAForm $ do
  (field1F, field1V) <- mreq textField MsgField1 Nothing
  (field2F, field2V) <- mreq (checkWith field1F textField) MsgField2 Nothing
  (field3F, field3V) <- mreq (checkWith field1F textField) MsgField3 Nothing
  return
    ( MyForm <$> field1F <*> field2F <*> field3F
    , [field1V, field2V, field3V]
    )

Could be rewritten as follows using WForm:

wFormToAForm $ do
  field1F <- wreq textField MsgField1 Nothing
  field2F <- wreq (checkWith field1F textField) MsgField2 Nothing
  field3F <- wreq (checkWith field1F textField) MsgField3 Nothing
  return $ MyForm <$> field1F <*> field2F <*> field3F

Since: yesod-form-1.4.14

data Ints #

Constructors

IntCons Int Ints 
IntSingle Int 

Instances

Instances details
Show Ints 
Instance details

Defined in Yesod.Form.Types

Methods

showsPrec :: Int -> Ints -> ShowS #

show :: Ints -> String #

showList :: [Ints] -> ShowS #

data Enctype #

The encoding type required by a form. The ToHtml instance produces values that can be inserted directly into HTML.

Constructors

UrlEncoded 
Multipart 

Instances

Instances details
Monoid Enctype 
Instance details

Defined in Yesod.Form.Types

Semigroup Enctype 
Instance details

Defined in Yesod.Form.Types

Bounded Enctype 
Instance details

Defined in Yesod.Form.Types

Enum Enctype 
Instance details

Defined in Yesod.Form.Types

ToMarkup Enctype 
Instance details

Defined in Yesod.Form.Types

ToValue Enctype 
Instance details

Defined in Yesod.Form.Types

Eq Enctype 
Instance details

Defined in Yesod.Form.Types

Methods

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

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

data FormResult a #

A form can produce three different results: there was no data available, the data was invalid, or there was a successful parse.

The Applicative instance will concatenate the failure messages in two FormResults. The Alternative instance will choose FormFailure before FormSuccess, and FormMissing last of all.

Instances

Instances details
Foldable FormResult

Since: yesod-form-1.4.5

Instance details

Defined in Yesod.Form.Types

Methods

fold :: Monoid m => FormResult m -> m #

foldMap :: Monoid m => (a -> m) -> FormResult a -> m #

foldMap' :: Monoid m => (a -> m) -> FormResult a -> m #

foldr :: (a -> b -> b) -> b -> FormResult a -> b #

foldr' :: (a -> b -> b) -> b -> FormResult a -> b #

foldl :: (b -> a -> b) -> b -> FormResult a -> b #

foldl' :: (b -> a -> b) -> b -> FormResult a -> b #

foldr1 :: (a -> a -> a) -> FormResult a -> a #

foldl1 :: (a -> a -> a) -> FormResult a -> a #

toList :: FormResult a -> [a] #

null :: FormResult a -> Bool #

length :: FormResult a -> Int #

elem :: Eq a => a -> FormResult a -> Bool #

maximum :: Ord a => FormResult a -> a #

minimum :: Ord a => FormResult a -> a #

sum :: Num a => FormResult a -> a #

product :: Num a => FormResult a -> a #

Traversable FormResult

Since: yesod-form-1.4.5

Instance details

Defined in Yesod.Form.Types

Methods

traverse :: Applicative f => (a -> f b) -> FormResult a -> f (FormResult b) #

sequenceA :: Applicative f => FormResult (f a) -> f (FormResult a) #

mapM :: Monad m => (a -> m b) -> FormResult a -> m (FormResult b) #

sequence :: Monad m => FormResult (m a) -> m (FormResult a) #

Alternative FormResult

Since: yesod-form-1.4.15

Instance details

Defined in Yesod.Form.Types

Applicative FormResult 
Instance details

Defined in Yesod.Form.Types

Methods

pure :: a -> FormResult a #

(<*>) :: FormResult (a -> b) -> FormResult a -> FormResult b #

liftA2 :: (a -> b -> c) -> FormResult a -> FormResult b -> FormResult c #

(*>) :: FormResult a -> FormResult b -> FormResult b #

(<*) :: FormResult a -> FormResult b -> FormResult a #

Functor FormResult 
Instance details

Defined in Yesod.Form.Types

Methods

fmap :: (a -> b) -> FormResult a -> FormResult b #

(<$) :: a -> FormResult b -> FormResult a #

Monoid m => Monoid (FormResult m) 
Instance details

Defined in Yesod.Form.Types

Semigroup m => Semigroup (FormResult m) 
Instance details

Defined in Yesod.Form.Types

Show a => Show (FormResult a) 
Instance details

Defined in Yesod.Form.Types

Eq a => Eq (FormResult a) 
Instance details

Defined in Yesod.Form.Types

Methods

(==) :: FormResult a -> FormResult a -> Bool #

(/=) :: FormResult a -> FormResult a -> Bool #

newtype FormInput (m :: Type -> Type) a #

Type for a form which parses a value of type a with the base monad m (usually your Handler). Can compose this using its Applicative instance.

Constructors

FormInput 

Fields

Instances

Instances details
Monad m => Applicative (FormInput m) 
Instance details

Defined in Yesod.Form.Input

Methods

pure :: a -> FormInput m a #

(<*>) :: FormInput m (a -> b) -> FormInput m a -> FormInput m b #

liftA2 :: (a -> b -> c) -> FormInput m a -> FormInput m b -> FormInput m c #

(*>) :: FormInput m a -> FormInput m b -> FormInput m b #

(<*) :: FormInput m a -> FormInput m b -> FormInput m a #

Monad m => Functor (FormInput m) 
Instance details

Defined in Yesod.Form.Input

Methods

fmap :: (a -> b) -> FormInput m a -> FormInput m b #

(<$) :: a -> FormInput m b -> FormInput m a #

type FormRender (m :: Type -> Type) a = AForm m a -> Markup -> MForm m (FormResult a, WidgetFor (HandlerSite m) ()) #

data OptionList a #

A structure holding a list of options. Typically you can use a convenience function like mkOptionList or optionsPairs instead of creating this directly.

Extended by OptionListGrouped in 1.7.0.

Constructors

OptionList 

Fields

OptionListGrouped 

Fields

Instances

Instances details
Functor OptionList

Since: yesod-form-1.4.6

Instance details

Defined in Yesod.Form.Fields

Methods

fmap :: (a -> b) -> OptionList a -> OptionList b #

(<$) :: a -> OptionList b -> OptionList a #

newtype Textarea #

A newtype wrapper around a Text whose ToMarkup instance converts newlines to HTML <br> tags.

(When text is entered into a <textarea>, newline characters are used to separate lines. If this text is then placed verbatim into HTML, the lines won't be separated, thus the need for replacing with <br> tags). If you don't need this functionality, simply use unTextarea to access the raw text.

Constructors

Textarea 

Fields

Instances

Instances details
FromJSON Textarea 
Instance details

Defined in Yesod.Form.Fields

ToJSON Textarea 
Instance details

Defined in Yesod.Form.Fields

IsString Textarea 
Instance details

Defined in Yesod.Form.Fields

Read Textarea 
Instance details

Defined in Yesod.Form.Fields

Show Textarea 
Instance details

Defined in Yesod.Form.Fields

ToMarkup Textarea 
Instance details

Defined in Yesod.Form.Fields

Eq Textarea 
Instance details

Defined in Yesod.Form.Fields

Ord Textarea 
Instance details

Defined in Yesod.Form.Fields

PersistField Textarea 
Instance details

Defined in Yesod.Form.Fields

PersistFieldSql Textarea 
Instance details

Defined in Yesod.Form.Fields

newtype DBRunner site #

Constructors

DBRunner 

Fields

class YesodPersist site => YesodPersistRunner site where #

Since 1.2.0

Methods

getDBRunner :: HandlerFor site (DBRunner site, HandlerFor site ()) #

This function differs from runDB in that it returns a database runner function, as opposed to simply running a single action. This will usually mean that a connection is taken from a pool and then reused for each invocation. This can be useful for creating streaming responses; see runDBSource.

It additionally returns a cleanup function to free the connection. If your code finishes successfully, you must call this cleanup to indicate changes should be committed. Otherwise, for SQL backends at least, a rollback will be used instead.

Since 1.2.0

Instances

Instances details
YesodPersistRunner App Source # 
Instance details

Defined in Foundation

class Monad (YesodDB site) => YesodPersist site where #

Associated Types

type YesodPersistBackend site #

Methods

runDB :: YesodDB site a -> HandlerFor site a #

Allows you to execute database actions within Yesod Handlers. For databases that support it, code inside the action will run as an atomic transaction.

Example Usage

Expand
userId <- runDB $ do
  userId <- insert $ User "username" "email@example.com"
  insert_ $ UserPreferences userId True
  pure userId

Instances

Instances details
YesodPersist App Source # 
Instance details

Defined in Foundation

Associated Types

type YesodPersistBackend App #

Methods

runDB :: YesodDB App a -> HandlerFor App a #

type family YesodPersistBackend site #

Instances

Instances details
type YesodPersistBackend App Source # 
Instance details

Defined in Foundation

type YesodDB site = ReaderT (YesodPersistBackend site) (HandlerFor site) #

data FeedEntry url #

Each feed entry

Constructors

FeedEntry 

Fields

data EntryCategory #

RSS 2.0 and Atom allow category in a feed entry.

RSS feeds ignore categoryLabel

Since: yesod-newsfeed-1.7

Constructors

EntryCategory 

Fields

data EntryEnclosure url #

RSS and Atom allow for linked content to be enclosed in a feed entry. This represents the enclosed content.

Atom feeds ignore enclosedSize and enclosedMimeType.

Since: yesod-newsfeed-1.6

Constructors

EntryEnclosure 

Fields

data Feed url #

The overall feed

Constructors

Feed 

Fields

data CombineSettings #

Data type for holding all settings for combining files.

This data type is a settings type. For more information, see:

http://www.yesodweb.com/book/settings-types

Since 1.2.0

Instances

Instances details
Default CombineSettings 
Instance details

Defined in Yesod.Static

newtype MaybeT (m :: Type -> Type) a #

The parameterizable maybe monad, obtained by composing an arbitrary monad with the Maybe monad.

Computations are actions that may produce a value or exit.

The return function yields a computation that produces that value, while >>= sequences two subcomputations, exiting if either computation does.

Constructors

MaybeT 

Fields

Instances

Instances details
MonadTransControl MaybeT 
Instance details

Defined in Control.Monad.Trans.Control

Associated Types

type StT MaybeT a #

Methods

liftWith :: Monad m => (Run MaybeT -> m a) -> MaybeT m a #

restoreT :: Monad m => m (StT MaybeT a) -> MaybeT m a #

MonadTrans MaybeT 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

lift :: Monad m => m a -> MaybeT m a #

Functor m => Generic1 (MaybeT m :: Type -> Type) 
Instance details

Defined in Control.Monad.Trans.Maybe

Associated Types

type Rep1 (MaybeT m) :: k -> Type #

Methods

from1 :: forall (a :: k). MaybeT m a -> Rep1 (MaybeT m) a #

to1 :: forall (a :: k). Rep1 (MaybeT m) a -> MaybeT m a #

MonadBaseControl b m => MonadBaseControl b (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Control

Associated Types

type StM (MaybeT m) a #

Methods

liftBaseWith :: (RunInBase (MaybeT m) b -> b a) -> MaybeT m a #

restoreM :: StM (MaybeT m) a -> MaybeT m a #

MonadReader r m => MonadReader r (MaybeT m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: MaybeT m r #

local :: (r -> r) -> MaybeT m a -> MaybeT m a #

reader :: (r -> a) -> MaybeT m a #

MonadWriter w m => MonadWriter w (MaybeT m) 
Instance details

Defined in Control.Monad.Writer.Class

Methods

writer :: (a, w) -> MaybeT m a #

tell :: w -> MaybeT m () #

listen :: MaybeT m a -> MaybeT m (a, w) #

pass :: MaybeT m (a, w -> w) -> MaybeT m a #

Monad m => MonadFail (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

fail :: String -> MaybeT m a #

MonadFix m => MonadFix (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

mfix :: (a -> MaybeT m a) -> MaybeT m a #

MonadIO m => MonadIO (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

liftIO :: IO a -> MaybeT m a #

MonadZip m => MonadZip (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

mzip :: MaybeT m a -> MaybeT m b -> MaybeT m (a, b) #

mzipWith :: (a -> b -> c) -> MaybeT m a -> MaybeT m b -> MaybeT m c #

munzip :: MaybeT m (a, b) -> (MaybeT m a, MaybeT m b) #

Foldable f => Foldable (MaybeT f) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

fold :: Monoid m => MaybeT f m -> m #

foldMap :: Monoid m => (a -> m) -> MaybeT f a -> m #

foldMap' :: Monoid m => (a -> m) -> MaybeT f a -> m #

foldr :: (a -> b -> b) -> b -> MaybeT f a -> b #

foldr' :: (a -> b -> b) -> b -> MaybeT f a -> b #

foldl :: (b -> a -> b) -> b -> MaybeT f a -> b #

foldl' :: (b -> a -> b) -> b -> MaybeT f a -> b #

foldr1 :: (a -> a -> a) -> MaybeT f a -> a #

foldl1 :: (a -> a -> a) -> MaybeT f a -> a #

toList :: MaybeT f a -> [a] #

null :: MaybeT f a -> Bool #

length :: MaybeT f a -> Int #

elem :: Eq a => a -> MaybeT f a -> Bool #

maximum :: Ord a => MaybeT f a -> a #

minimum :: Ord a => MaybeT f a -> a #

sum :: Num a => MaybeT f a -> a #

product :: Num a => MaybeT f a -> a #

Eq1 m => Eq1 (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

liftEq :: (a -> b -> Bool) -> MaybeT m a -> MaybeT m b -> Bool #

Ord1 m => Ord1 (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

liftCompare :: (a -> b -> Ordering) -> MaybeT m a -> MaybeT m b -> Ordering #

Read1 m => Read1 (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (MaybeT m a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [MaybeT m a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (MaybeT m a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [MaybeT m a] #

Show1 m => Show1 (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> MaybeT m a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [MaybeT m a] -> ShowS #

Contravariant m => Contravariant (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

contramap :: (a' -> a) -> MaybeT m a -> MaybeT m a' #

(>$) :: b -> MaybeT m b -> MaybeT m a #

Traversable f => Traversable (MaybeT f) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

traverse :: Applicative f0 => (a -> f0 b) -> MaybeT f a -> f0 (MaybeT f b) #

sequenceA :: Applicative f0 => MaybeT f (f0 a) -> f0 (MaybeT f a) #

mapM :: Monad m => (a -> m b) -> MaybeT f a -> m (MaybeT f b) #

sequence :: Monad m => MaybeT f (m a) -> m (MaybeT f a) #

(Functor m, Monad m) => Alternative (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

empty :: MaybeT m a #

(<|>) :: MaybeT m a -> MaybeT m a -> MaybeT m a #

some :: MaybeT m a -> MaybeT m [a] #

many :: MaybeT m a -> MaybeT m [a] #

(Functor m, Monad m) => Applicative (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

pure :: a -> MaybeT m a #

(<*>) :: MaybeT m (a -> b) -> MaybeT m a -> MaybeT m b #

liftA2 :: (a -> b -> c) -> MaybeT m a -> MaybeT m b -> MaybeT m c #

(*>) :: MaybeT m a -> MaybeT m b -> MaybeT m b #

(<*) :: MaybeT m a -> MaybeT m b -> MaybeT m a #

Functor m => Functor (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

fmap :: (a -> b) -> MaybeT m a -> MaybeT m b #

(<$) :: a -> MaybeT m b -> MaybeT m a #

Monad m => Monad (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

(>>=) :: MaybeT m a -> (a -> MaybeT m b) -> MaybeT m b #

(>>) :: MaybeT m a -> MaybeT m b -> MaybeT m b #

return :: a -> MaybeT m a #

Monad m => MonadPlus (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

mzero :: MaybeT m a #

mplus :: MaybeT m a -> MaybeT m a -> MaybeT m a #

MonadCatch m => MonadCatch (MaybeT m)

Catches exceptions from the base monad.

Instance details

Defined in Control.Monad.Catch

Methods

catch :: (HasCallStack, Exception e) => MaybeT m a -> (e -> MaybeT m a) -> MaybeT m a #

MonadMask m => MonadMask (MaybeT m)

Since: exceptions-0.10.0

Instance details

Defined in Control.Monad.Catch

Methods

mask :: HasCallStack => ((forall a. MaybeT m a -> MaybeT m a) -> MaybeT m b) -> MaybeT m b #

uninterruptibleMask :: HasCallStack => ((forall a. MaybeT m a -> MaybeT m a) -> MaybeT m b) -> MaybeT m b #

generalBracket :: HasCallStack => MaybeT m a -> (a -> ExitCase b -> MaybeT m c) -> (a -> MaybeT m b) -> MaybeT m (b, c) #

MonadThrow m => MonadThrow (MaybeT m)

Throws exceptions into the base monad.

Instance details

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e) => e -> MaybeT m a #

MonadLogger m => MonadLogger (MaybeT m) 
Instance details

Defined in Control.Monad.Logger

Methods

monadLoggerLog :: ToLogStr msg => Loc -> LogSource -> LogLevel -> msg -> MaybeT m () #

MonadLoggerIO m => MonadLoggerIO (MaybeT m) 
Instance details

Defined in Control.Monad.Logger

Methods

askLoggerIO :: MaybeT m (Loc -> LogSource -> LogLevel -> LogStr -> IO ()) #

PrimMonad m => PrimMonad (MaybeT m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (MaybeT m) #

Methods

primitive :: (State# (PrimState (MaybeT m)) -> (# State# (PrimState (MaybeT m)), a #)) -> MaybeT m a #

MonadResource m => MonadResource (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

liftResourceT :: ResourceT IO a -> MaybeT m a #

MonadHandler m => MonadHandler (MaybeT m) 
Instance details

Defined in Yesod.Core.Class.Handler

Associated Types

type HandlerSite (MaybeT m) #

type SubHandlerSite (MaybeT m) #

MonadWidget m => MonadWidget (MaybeT m) 
Instance details

Defined in Yesod.Core.Class.Handler

Methods

liftWidget :: WidgetFor (HandlerSite (MaybeT m)) a -> MaybeT m a #

Generic (MaybeT m a) 
Instance details

Defined in Control.Monad.Trans.Maybe

Associated Types

type Rep (MaybeT m a) :: Type -> Type #

Methods

from :: MaybeT m a -> Rep (MaybeT m a) x #

to :: Rep (MaybeT m a) x -> MaybeT m a #

(Read1 m, Read a) => Read (MaybeT m a) 
Instance details

Defined in Control.Monad.Trans.Maybe

(Show1 m, Show a) => Show (MaybeT m a) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

showsPrec :: Int -> MaybeT m a -> ShowS #

show :: MaybeT m a -> String #

showList :: [MaybeT m a] -> ShowS #

(Eq1 m, Eq a) => Eq (MaybeT m a) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

(==) :: MaybeT m a -> MaybeT m a -> Bool #

(/=) :: MaybeT m a -> MaybeT m a -> Bool #

(Ord1 m, Ord a) => Ord (MaybeT m a) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

compare :: MaybeT m a -> MaybeT m a -> Ordering #

(<) :: MaybeT m a -> MaybeT m a -> Bool #

(<=) :: MaybeT m a -> MaybeT m a -> Bool #

(>) :: MaybeT m a -> MaybeT m a -> Bool #

(>=) :: MaybeT m a -> MaybeT m a -> Bool #

max :: MaybeT m a -> MaybeT m a -> MaybeT m a #

min :: MaybeT m a -> MaybeT m a -> MaybeT m a #

Foldable f => MonoFoldable (MaybeT f a) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (MaybeT f a) -> m) -> MaybeT f a -> m #

ofoldr :: (Element (MaybeT f a) -> b -> b) -> b -> MaybeT f a -> b #

ofoldl' :: (a0 -> Element (MaybeT f a) -> a0) -> a0 -> MaybeT f a -> a0 #

otoList :: MaybeT f a -> [Element (MaybeT f a)] #

oall :: (Element (MaybeT f a) -> Bool) -> MaybeT f a -> Bool #

oany :: (Element (MaybeT f a) -> Bool) -> MaybeT f a -> Bool #

onull :: MaybeT f a -> Bool #

olength :: MaybeT f a -> Int #

olength64 :: MaybeT f a -> Int64 #

ocompareLength :: Integral i => MaybeT f a -> i -> Ordering #

otraverse_ :: Applicative f0 => (Element (MaybeT f a) -> f0 b) -> MaybeT f a -> f0 () #

ofor_ :: Applicative f0 => MaybeT f a -> (Element (MaybeT f a) -> f0 b) -> f0 () #

omapM_ :: Applicative m => (Element (MaybeT f a) -> m ()) -> MaybeT f a -> m () #

oforM_ :: Applicative m => MaybeT f a -> (Element (MaybeT f a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (MaybeT f a) -> m a0) -> a0 -> MaybeT f a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (MaybeT f a) -> m) -> MaybeT f a -> m #

ofoldr1Ex :: (Element (MaybeT f a) -> Element (MaybeT f a) -> Element (MaybeT f a)) -> MaybeT f a -> Element (MaybeT f a) #

ofoldl1Ex' :: (Element (MaybeT f a) -> Element (MaybeT f a) -> Element (MaybeT f a)) -> MaybeT f a -> Element (MaybeT f a) #

headEx :: MaybeT f a -> Element (MaybeT f a) #

lastEx :: MaybeT f a -> Element (MaybeT f a) #

unsafeHead :: MaybeT f a -> Element (MaybeT f a) #

unsafeLast :: MaybeT f a -> Element (MaybeT f a) #

maximumByEx :: (Element (MaybeT f a) -> Element (MaybeT f a) -> Ordering) -> MaybeT f a -> Element (MaybeT f a) #

minimumByEx :: (Element (MaybeT f a) -> Element (MaybeT f a) -> Ordering) -> MaybeT f a -> Element (MaybeT f a) #

oelem :: Element (MaybeT f a) -> MaybeT f a -> Bool #

onotElem :: Element (MaybeT f a) -> MaybeT f a -> Bool #

Functor m => MonoFunctor (MaybeT m a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (MaybeT m a) -> Element (MaybeT m a)) -> MaybeT m a -> MaybeT m a #

Applicative f => MonoPointed (MaybeT f a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (MaybeT f a) -> MaybeT f a #

Traversable f => MonoTraversable (MaybeT f a) 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f0 => (Element (MaybeT f a) -> f0 (Element (MaybeT f a))) -> MaybeT f a -> f0 (MaybeT f a) #

omapM :: Applicative m => (Element (MaybeT f a) -> m (Element (MaybeT f a))) -> MaybeT f a -> m (MaybeT f a) #

type StT MaybeT a 
Instance details

Defined in Control.Monad.Trans.Control

type StT MaybeT a = Maybe a
type Rep1 (MaybeT m :: Type -> Type) 
Instance details

Defined in Control.Monad.Trans.Maybe

type Rep1 (MaybeT m :: Type -> Type) = D1 ('MetaData "MaybeT" "Control.Monad.Trans.Maybe" "transformers-0.6.1.0" 'True) (C1 ('MetaCons "MaybeT" 'PrefixI 'True) (S1 ('MetaSel ('Just "runMaybeT") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (m :.: Rec1 Maybe)))
type PrimState (MaybeT m) 
Instance details

Defined in Control.Monad.Primitive

type HandlerSite (MaybeT m) 
Instance details

Defined in Yesod.Core.Class.Handler

type SubHandlerSite (MaybeT m) 
Instance details

Defined in Yesod.Core.Class.Handler

type StM (MaybeT m) a 
Instance details

Defined in Control.Monad.Trans.Control

type StM (MaybeT m) a = ComposeSt MaybeT m a
type Rep (MaybeT m a) 
Instance details

Defined in Control.Monad.Trans.Maybe

type Rep (MaybeT m a) = D1 ('MetaData "MaybeT" "Control.Monad.Trans.Maybe" "transformers-0.6.1.0" 'True) (C1 ('MetaCons "MaybeT" 'PrefixI 'True) (S1 ('MetaSel ('Just "runMaybeT") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (m (Maybe a)))))
type Element (MaybeT m a) 
Instance details

Defined in Data.MonoTraversable

type Element (MaybeT m a) = a

data Auth #

Instances

Instances details
ParseRoute Auth 
Instance details

Defined in Yesod.Auth.Routes

Methods

parseRoute :: ([Text], [(Text, Text)]) -> Maybe (Route Auth) #

RenderRoute Auth 
Instance details

Defined in Yesod.Auth.Routes

Associated Types

data Route Auth #

Methods

renderRoute :: Route Auth -> ([Text], [(Text, Text)]) #

RouteAttrs Auth 
Instance details

Defined in Yesod.Auth.Routes

Methods

routeAttrs :: Route Auth -> Set Text #

Read (Route Auth) 
Instance details

Defined in Yesod.Auth.Routes

Show (Route Auth) 
Instance details

Defined in Yesod.Auth.Routes

Eq (Route Auth) 
Instance details

Defined in Yesod.Auth.Routes

Methods

(==) :: Route Auth -> Route Auth -> Bool #

(/=) :: Route Auth -> Route Auth -> Bool #

data Route Auth 
Instance details

Defined in Yesod.Auth.Routes

class RawJS a where #

Methods

rawJS :: a -> RawJavascript #

Instances

Instances details
RawJS Text 
Instance details

Defined in Text.Julius

Methods

rawJS :: Text -> RawJavascript #

RawJS Builder 
Instance details

Defined in Text.Julius

RawJS Text 
Instance details

Defined in Text.Julius

Methods

rawJS :: Text -> RawJavascript #

RawJS Bool 
Instance details

Defined in Text.Julius

Methods

rawJS :: Bool -> RawJavascript #

RawJS [Char] 
Instance details

Defined in Text.Julius

Methods

rawJS :: [Char] -> RawJavascript #

newtype RawJavascript #

Constructors

RawJavascript Builder 

Instances

Instances details
ToJavascript RawJavascript 
Instance details

Defined in Text.Julius

class ToJavascript a where #

A typeclass for types that can be interpolated in CoffeeScript templates.

Methods

toJavascript :: a -> Javascript #

Instances

Instances details
ToJavascript Value 
Instance details

Defined in Text.Julius

ToJavascript RawJavascript 
Instance details

Defined in Text.Julius

ToJavascript Text 
Instance details

Defined in Text.Julius

ToJavascript Text 
Instance details

Defined in Text.Julius

ToJavascript String 
Instance details

Defined in Text.Julius

ToJavascript Bool 
Instance details

Defined in Text.Julius

newtype Javascript #

Newtype wrapper of Builder.

Constructors

Javascript 

Instances

Instances details
Monoid Javascript 
Instance details

Defined in Text.Julius

Semigroup Javascript 
Instance details

Defined in Text.Julius

HasContentType Javascript 
Instance details

Defined in Yesod.Core.Content

ToContent Javascript 
Instance details

Defined in Yesod.Core.Content

ToTypedContent Javascript 
Instance details

Defined in Yesod.Core.Content

ToWidget site Javascript 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidget :: (MonadWidget m, HandlerSite m ~ site) => Javascript -> m () #

ToWidgetBody site Javascript 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidgetBody :: (MonadWidget m, HandlerSite m ~ site) => Javascript -> m () #

ToWidgetHead site Javascript 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidgetHead :: (MonadWidget m, HandlerSite m ~ site) => Javascript -> m () #

render ~ RY site => ToWidget site (render -> Javascript) 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidget :: (MonadWidget m, HandlerSite m ~ site) => (render -> Javascript) -> m () #

render ~ RY site => ToWidgetBody site (render -> Javascript) 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidgetBody :: (MonadWidget m, HandlerSite m ~ site) => (render -> Javascript) -> m () #

render ~ RY site => ToWidgetHead site (render -> Javascript) 
Instance details

Defined in Yesod.Core.Widget

Methods

toWidgetHead :: (MonadWidget m, HandlerSite m ~ site) => (render -> Javascript) -> m () #

data EnvUsage #

Defines how we want to use the environment variables when loading a config file. Use the smart constructors provided by this module.

Since: yaml-0.8.16

newtype MergedValue #

Constructors

MergedValue 

Instances

Instances details
Semigroup MergedValue 
Instance details

Defined in Yesod.Default.Config2

class (YesodAuth master, YesodPersist master) => YesodAuthPersist master where #

Class which states that the given site is an instance of YesodAuth and that its AuthId is a lookup key for the full user information in a YesodPersist database.

The default implementation of getAuthEntity assumes that the AuthId for the YesodAuth superclass is in fact a persistent Key for the given value. This is the common case in Yesod, and means that you can easily look up the full information on a given user.

Since: yesod-auth-1.4.0

Minimal complete definition

Nothing

Associated Types

type AuthEntity master #

If the AuthId for a given site is a persistent ID, this will give the value for that entity. E.g.:

type AuthId MySite = UserId
AuthEntity MySite ~ User

Since: yesod-auth-1.2.0

type AuthEntity master = KeyEntity (AuthId master)

Methods

getAuthEntity :: (MonadHandler m, HandlerSite m ~ master) => AuthId master -> m (Maybe (AuthEntity master)) #

Instances

Instances details
YesodAuthPersist App Source # 
Instance details

Defined in Foundation

Associated Types

type AuthEntity App #

type family AuthEntity master #

If the AuthId for a given site is a persistent ID, this will give the value for that entity. E.g.:

type AuthId MySite = UserId
AuthEntity MySite ~ User

Since: yesod-auth-1.2.0

Instances

Instances details
type AuthEntity App Source # 
Instance details

Defined in Foundation

type AuthEntity App = KeyEntity (AuthId App)

class (Yesod master, PathPiece (AuthId master), RenderMessage master FormMessage) => YesodAuth master where #

Minimal complete definition

loginDest, logoutDest, (authenticate | getAuthId), authPlugins

Associated Types

type AuthId master #

Methods

authLayout :: (MonadHandler m, HandlerSite m ~ master) => WidgetFor master () -> m Html #

specify the layout. Uses defaultLayout by default

loginDest :: master -> Route master #

Default destination on successful login, if no other destination exists.

logoutDest :: master -> Route master #

Default destination on successful logout, if no other destination exists.

authenticate :: (MonadHandler m, HandlerSite m ~ master) => Creds master -> m (AuthenticationResult master) #

Perform authentication based on the given credentials.

Default implementation is in terms of getAuthId

@since: 1.4.4

getAuthId :: (MonadHandler m, HandlerSite m ~ master) => Creds master -> m (Maybe (AuthId master)) #

Determine the ID associated with the set of credentials.

Default implementation is in terms of authenticate

authPlugins :: master -> [AuthPlugin master] #

Which authentication backends to use.

loginHandler :: AuthHandler master Html #

What to show on the login page.

By default this calls defaultLoginHandler, which concatenates plugin widgets and wraps the result in authLayout. Override if you need fancy widget containers, additional functionality, or an entirely custom page. For example, in some applications you may want to prevent the login page being displayed for a user who is already logged in, even if the URL is visited explicitly; this can be done by overriding loginHandler in your instance declaration with something like:

instance YesodAuth App where
    ...
    loginHandler = do
        ma <- lift maybeAuthId
        when (isJust ma) $
            lift $ redirect HomeR   -- or any other Handler code you want
        defaultLoginHandler

renderAuthMessage #

Arguments

:: master 
-> [Text]

languages

-> AuthMessage 
-> Text 

Used for i18n of messages provided by this package.

redirectToReferer :: master -> Bool #

After login and logout, redirect to the referring page, instead of loginDest and logoutDest. Default is False.

redirectToCurrent :: master -> Bool #

When being redirected to the login page should the current page be set to redirect back to. Default is True.

Since: yesod-auth-1.4.21

authHttpManager :: (MonadHandler m, HandlerSite m ~ master) => m Manager #

Return an HTTP connection manager that is stored in the foundation type. This allows backends to reuse persistent connections. If none of the backends you're using use HTTP connections, you can safely return error "authHttpManager" here.

onLogin :: (MonadHandler m, master ~ HandlerSite m) => m () #

Called on a successful login. By default, calls addMessageI "success" NowLoggedIn.

onLogout :: (MonadHandler m, master ~ HandlerSite m) => m () #

Called on logout. By default, does nothing

maybeAuthId :: (MonadHandler m, master ~ HandlerSite m) => m (Maybe (AuthId master)) #

Retrieves user credentials, if user is authenticated.

By default, this calls defaultMaybeAuthId to get the user ID from the session. This can be overridden to allow authentication via other means, such as checking for a special token in a request header. This is especially useful for creating an API to be accessed via some means other than a browser.

Since: yesod-auth-1.2.0

onErrorHtml :: (MonadHandler m, HandlerSite m ~ master) => Route master -> Text -> m Html #

Called on login error for HTTP requests. By default, calls addMessage with "error" as status and redirects to dest.

runHttpRequest :: (MonadHandler m, HandlerSite m ~ master, MonadUnliftIO m) => Request -> (Response BodyReader -> m a) -> m a #

runHttpRequest gives you a chance to handle an HttpException and retry The default behavior is to simply execute the request which will throw an exception on failure

The HTTP Request is given in case it is useful to change behavior based on inspecting the request. This is an experimental API that is not broadly used throughout the yesod-auth code base

type family AuthId master #

Instances

Instances details
type AuthId App Source # 
Instance details

Defined in Foundation

data Creds master #

User credentials

Constructors

Creds 

Fields

Instances

Instances details
Show (Creds master) 
Instance details

Defined in Yesod.Auth

Methods

showsPrec :: Int -> Creds master -> ShowS #

show :: Creds master -> String #

showList :: [Creds master] -> ShowS #

data AuthPlugin master #

Constructors

AuthPlugin 

Fields

data AuthenticationResult master #

The result of an authentication based on credentials

Since: yesod-auth-1.4.4

Constructors

Authenticated (AuthId master)

Authenticated successfully

UserError AuthMessage

Invalid credentials provided by user

ServerError Text

Some other error

type AuthHandler master a = forall (m :: Type -> Type). MonadAuthHandler master m => m a #

type MonadAuthHandler master (m :: Type -> Type) = (MonadHandler m, YesodAuth master, master ~ HandlerSite m, Auth ~ SubHandlerSite m, MonadUnliftIO m) #

data User Source #

Instances

Instances details
FromJSON User Source # 
Instance details

Defined in Model

ToJSON User Source # 
Instance details

Defined in Model

Show User Source # 
Instance details

Defined in Model

Methods

showsPrec :: Int -> User -> ShowS #

show :: User -> String #

showList :: [User] -> ShowS #

Eq User Source # 
Instance details

Defined in Model

Methods

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

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

Ord User Source # 
Instance details

Defined in Model

Methods

compare :: User -> User -> Ordering #

(<) :: User -> User -> Bool #

(<=) :: User -> User -> Bool #

(>) :: User -> User -> Bool #

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

max :: User -> User -> User #

min :: User -> User -> User #

PersistEntity User Source # 
Instance details

Defined in Model

Associated Types

type PersistEntityBackend User #

data Key User #

data EntityField User :: Type -> Type #

data Unique User #

SafeToInsert User Source # 
Instance details

Defined in Model

PersistField User Source # 
Instance details

Defined in Model

AtLeastOneUniqueKey User Source # 
Instance details

Defined in Model

OnlyOneUniqueKey User Source # 
Instance details

Defined in Model

PersistFieldSql User Source # 
Instance details

Defined in Model

Methods

sqlType :: Proxy User -> SqlType #

ToBackendKey SqlBackend User Source # 
Instance details

Defined in Model

SymbolToField "archiveDefault" User Bool Source # 
Instance details

Defined in Model

SymbolToField "name" User Text Source # 
Instance details

Defined in Model

SymbolToField "passwordHash" User BCrypt Source # 
Instance details

Defined in Model

SymbolToField "privacyLock" User Bool Source # 
Instance details

Defined in Model

SymbolToField "privateDefault" User Bool Source # 
Instance details

Defined in Model

SymbolToField "userId" Bookmark UserId Source # 
Instance details

Defined in Model

SymbolToField "userId" BookmarkTag UserId Source # 
Instance details

Defined in Model

SymbolToField "userId" Note UserId Source # 
Instance details

Defined in Model

SymbolToField "apiToken" User (Maybe HashedApiKey) Source # 
Instance details

Defined in Model

SymbolToField "id" User (Key User) Source # 
Instance details

Defined in Model

FromJSON (Entity User) Source # 
Instance details

Defined in Model

FromJSON (Key User) Source # 
Instance details

Defined in Model

ToJSON (Entity User) Source # 
Instance details

Defined in Model

ToJSON (Key User) Source # 
Instance details

Defined in Model

Read (Key User) Source # 
Instance details

Defined in Model

Show (Key User) Source # 
Instance details

Defined in Model

Methods

showsPrec :: Int -> Key User -> ShowS #

show :: Key User -> String #

showList :: [Key User] -> ShowS #

Eq (Key User) Source # 
Instance details

Defined in Model

Methods

(==) :: Key User -> Key User -> Bool #

(/=) :: Key User -> Key User -> Bool #

Ord (Key User) Source # 
Instance details

Defined in Model

Methods

compare :: Key User -> Key User -> Ordering #

(<) :: Key User -> Key User -> Bool #

(<=) :: Key User -> Key User -> Bool #

(>) :: Key User -> Key User -> Bool #

(>=) :: Key User -> Key User -> Bool #

max :: Key User -> Key User -> Key User #

min :: Key User -> Key User -> Key User #

FromHttpApiData (Key User) Source # 
Instance details

Defined in Model

ToHttpApiData (Key User) Source # 
Instance details

Defined in Model

PathPiece (Key User) Source # 
Instance details

Defined in Model

PersistField (Key User) Source # 
Instance details

Defined in Model

PersistFieldSql (Key User) Source # 
Instance details

Defined in Model

Methods

sqlType :: Proxy (Key User) -> SqlType #

data EntityField User typ Source # 
Instance details

Defined in Model

newtype Key User Source # 
Instance details

Defined in Model

type PersistEntityBackend User Source # 
Instance details

Defined in Model

data Unique User Source # 
Instance details

Defined in Model

newtype BCrypt Source #

Constructors

BCrypt 

Fields

Instances

Instances details
FromJSON BCrypt Source # 
Instance details

Defined in ModelCustom

ToJSON BCrypt Source # 
Instance details

Defined in ModelCustom

Show BCrypt Source # 
Instance details

Defined in ModelCustom

Eq BCrypt Source # 
Instance details

Defined in ModelCustom

Methods

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

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

Ord BCrypt Source # 
Instance details

Defined in ModelCustom

PersistField BCrypt Source # 
Instance details

Defined in ModelCustom

PersistFieldSql BCrypt Source # 
Instance details

Defined in ModelCustom

SymbolToField "passwordHash" User BCrypt Source # 
Instance details

Defined in Model

newtype UserNameP Source #

Constructors

UserNameP 

Fields

Instances

Instances details
Read UserNameP Source # 
Instance details

Defined in Model

Show UserNameP Source # 
Instance details

Defined in Model

Eq UserNameP Source # 
Instance details

Defined in Model

PathPiece UserNameP Source # 
Instance details

Defined in PathPiece

type DBM m a = MonadUnliftIO m => SqlPersistT m a Source #

class HasConstructor (f :: Type -> Type) where Source #

Methods

genericConstrName :: f x -> String Source #

Instances

Instances details
(HasConstructor x, HasConstructor y) => HasConstructor (x :+: y) Source # 
Instance details

Defined in Generic

Methods

genericConstrName :: (x :+: y) x0 -> String Source #

Constructor c => HasConstructor (C1 c f) Source # 
Instance details

Defined in Generic

Methods

genericConstrName :: C1 c f x -> String Source #

HasConstructor f => HasConstructor (D1 c f) Source # 
Instance details

Defined in Generic

Methods

genericConstrName :: D1 c f x -> String Source #

newtype BmSlug Source #

Constructors

BmSlug 

Fields

Instances

Instances details
FromJSON BmSlug Source # 
Instance details

Defined in ModelCustom

ToJSON BmSlug Source # 
Instance details

Defined in ModelCustom

Read BmSlug Source # 
Instance details

Defined in ModelCustom

Show BmSlug Source # 
Instance details

Defined in ModelCustom

Eq BmSlug Source # 
Instance details

Defined in ModelCustom

Methods

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

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

Ord BmSlug Source # 
Instance details

Defined in ModelCustom

PathPiece BmSlug Source # 
Instance details

Defined in PathPiece

PersistField BmSlug Source # 
Instance details

Defined in ModelCustom

PersistFieldSql BmSlug Source # 
Instance details

Defined in ModelCustom

SymbolToField "slug" Bookmark BmSlug Source # 
Instance details

Defined in Model

newtype NtSlug Source #

Constructors

NtSlug 

Fields

Instances

Instances details
FromJSON NtSlug Source # 
Instance details

Defined in ModelCustom

ToJSON NtSlug Source # 
Instance details

Defined in ModelCustom

Read NtSlug Source # 
Instance details

Defined in ModelCustom

Show NtSlug Source # 
Instance details

Defined in ModelCustom

Eq NtSlug Source # 
Instance details

Defined in ModelCustom

Methods

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

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

Ord NtSlug Source # 
Instance details

Defined in ModelCustom

PathPiece NtSlug Source # 
Instance details

Defined in PathPiece

PersistField NtSlug Source # 
Instance details

Defined in ModelCustom

PersistFieldSql NtSlug Source # 
Instance details

Defined in ModelCustom

SymbolToField "slug" Note NtSlug Source # 
Instance details

Defined in Model

newtype ApiKey Source #

Constructors

ApiKey 

Fields

newtype HashedApiKey Source #

Constructors

HashedApiKey Text 

Instances

Instances details
FromJSON HashedApiKey Source # 
Instance details

Defined in ModelCustom

ToJSON HashedApiKey Source # 
Instance details

Defined in ModelCustom

Show HashedApiKey Source # 
Instance details

Defined in ModelCustom

Eq HashedApiKey Source # 
Instance details

Defined in ModelCustom

Ord HashedApiKey Source # 
Instance details

Defined in ModelCustom

PersistField HashedApiKey Source # 
Instance details

Defined in ModelCustom

PersistFieldSql HashedApiKey Source # 
Instance details

Defined in ModelCustom

SymbolToField "apiToken" User (Maybe HashedApiKey) Source # 
Instance details

Defined in Model

data AppSettings Source #

Runtime settings to configure this application. These settings can be loaded from various sources: defaults, environment variables, config files, theoretically even a database.

Constructors

AppSettings 

Fields

Instances

Instances details
FromJSON AppSettings Source # 
Instance details

Defined in Settings

type DB a = forall m. DBM m a Source #

newtype UTCTimeStr Source #

Constructors

UTCTimeStr 

Instances

Instances details
FromJSON UTCTimeStr Source # 
Instance details

Defined in Model

ToJSON UTCTimeStr Source # 
Instance details

Defined in Model

Generic UTCTimeStr Source # 
Instance details

Defined in Model

Associated Types

type Rep UTCTimeStr :: Type -> Type #

Read UTCTimeStr Source # 
Instance details

Defined in Model

Show UTCTimeStr Source # 
Instance details

Defined in Model

Eq UTCTimeStr Source # 
Instance details

Defined in Model

PathPiece UTCTimeStr Source # 
Instance details

Defined in Model

type Rep UTCTimeStr Source # 
Instance details

Defined in Model

type Rep UTCTimeStr = D1 ('MetaData "UTCTimeStr" "Model" "espial-0.0.20-EcVaTGJvbgfEg2qawed6qP" 'True) (C1 ('MetaCons "UTCTimeStr" 'PrefixI 'True) (S1 ('MetaSel ('Just "unUTCTimeStr") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UTCTime)))

newtype TagsP Source #

Constructors

TagsP 

Fields

Instances

Instances details
Read TagsP Source # 
Instance details

Defined in Model

Show TagsP Source # 
Instance details

Defined in Model

Methods

showsPrec :: Int -> TagsP -> ShowS #

show :: TagsP -> String #

showList :: [TagsP] -> ShowS #

Eq TagsP Source # 
Instance details

Defined in Model

Methods

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

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

PathPiece TagsP Source # 
Instance details

Defined in PathPiece

data SharedP Source #

Instances

Instances details
Read SharedP Source # 
Instance details

Defined in Model

Show SharedP Source # 
Instance details

Defined in Model

Eq SharedP Source # 
Instance details

Defined in Model

Methods

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

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

PathPiece SharedP Source # 
Instance details

Defined in PathPiece

data FilterP Source #

Instances

Instances details
Read FilterP Source # 
Instance details

Defined in Model

Show FilterP Source # 
Instance details

Defined in Model

Eq FilterP Source # 
Instance details

Defined in Model

Methods

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

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

PathPiece FilterP Source # 
Instance details

Defined in PathPiece

newtype UnreadOnly Source #

Constructors

UnreadOnly 

Fields

Instances

Instances details
Read UnreadOnly Source # 
Instance details

Defined in Model

Show UnreadOnly Source # 
Instance details

Defined in Model

Eq UnreadOnly Source # 
Instance details

Defined in Model

data Bookmark Source #

Instances

Instances details
FromJSON Bookmark Source # 
Instance details

Defined in Model

ToJSON Bookmark Source # 
Instance details

Defined in Model

Show Bookmark Source # 
Instance details

Defined in Model

Eq Bookmark Source # 
Instance details

Defined in Model

Ord Bookmark Source # 
Instance details

Defined in Model

PersistEntity Bookmark Source # 
Instance details

Defined in Model

SafeToInsert Bookmark Source # 
Instance details

Defined in Model

PersistField Bookmark Source # 
Instance details

Defined in Model

AtLeastOneUniqueKey Bookmark Source # 
Instance details

Defined in Model

(TypeError (MultipleUniqueKeysError Bookmark) :: Constraint) => OnlyOneUniqueKey Bookmark Source # 
Instance details

Defined in Model

PersistFieldSql Bookmark Source # 
Instance details

Defined in Model

ToBackendKey SqlBackend Bookmark Source # 
Instance details

Defined in Model

SymbolToField "bookmarkId" BookmarkTag BookmarkId Source # 
Instance details

Defined in Model

SymbolToField "description" Bookmark Text Source # 
Instance details

Defined in Model

SymbolToField "extended" Bookmark Text Source # 
Instance details

Defined in Model

SymbolToField "href" Bookmark Text Source # 
Instance details

Defined in Model

SymbolToField "selected" Bookmark Bool Source # 
Instance details

Defined in Model

SymbolToField "shared" Bookmark Bool Source # 
Instance details

Defined in Model

SymbolToField "slug" Bookmark BmSlug Source # 
Instance details

Defined in Model

SymbolToField "time" Bookmark UTCTime Source # 
Instance details

Defined in Model

SymbolToField "toRead" Bookmark Bool Source # 
Instance details

Defined in Model

SymbolToField "userId" Bookmark UserId Source # 
Instance details

Defined in Model

SymbolToField "archiveHref" Bookmark (Maybe Text) Source # 
Instance details

Defined in Model

SymbolToField "id" Bookmark (Key Bookmark) Source # 
Instance details

Defined in Model

FromJSON (Entity Bookmark) Source # 
Instance details

Defined in Model

FromJSON (Key Bookmark) Source # 
Instance details

Defined in Model

ToJSON (Entity Bookmark) Source # 
Instance details

Defined in Model

ToJSON (Key Bookmark) Source # 
Instance details

Defined in Model

Read (Key Bookmark) Source # 
Instance details

Defined in Model

Show (Key Bookmark) Source # 
Instance details

Defined in Model

Eq (Key Bookmark) Source # 
Instance details

Defined in Model

Ord (Key Bookmark) Source # 
Instance details

Defined in Model

FromHttpApiData (Key Bookmark) Source # 
Instance details

Defined in Model

ToHttpApiData (Key Bookmark) Source # 
Instance details

Defined in Model

PathPiece (Key Bookmark) Source # 
Instance details

Defined in Model

PersistField (Key Bookmark) Source # 
Instance details

Defined in Model

PersistFieldSql (Key Bookmark) Source # 
Instance details

Defined in Model

data EntityField Bookmark typ Source # 
Instance details

Defined in Model

newtype Key Bookmark Source # 
Instance details

Defined in Model

type PersistEntityBackend Bookmark Source # 
Instance details

Defined in Model

data Unique Bookmark Source # 
Instance details

Defined in Model

data BookmarkTag Source #

Instances

Instances details
FromJSON BookmarkTag Source # 
Instance details

Defined in Model

ToJSON BookmarkTag Source # 
Instance details

Defined in Model

Show BookmarkTag Source # 
Instance details

Defined in Model

Eq BookmarkTag Source # 
Instance details

Defined in Model

Ord BookmarkTag Source # 
Instance details

Defined in Model

PersistEntity BookmarkTag Source # 
Instance details

Defined in Model

SafeToInsert BookmarkTag Source # 
Instance details

Defined in Model

PersistField BookmarkTag Source # 
Instance details

Defined in Model

AtLeastOneUniqueKey BookmarkTag Source # 
Instance details

Defined in Model

(TypeError (MultipleUniqueKeysError BookmarkTag) :: Constraint) => OnlyOneUniqueKey BookmarkTag Source # 
Instance details

Defined in Model

PersistFieldSql BookmarkTag Source # 
Instance details

Defined in Model

ToBackendKey SqlBackend BookmarkTag Source # 
Instance details

Defined in Model

SymbolToField "bookmarkId" BookmarkTag BookmarkId Source # 
Instance details

Defined in Model

SymbolToField "seq" BookmarkTag Int Source # 
Instance details

Defined in Model

SymbolToField "tag" BookmarkTag Text Source # 
Instance details

Defined in Model

SymbolToField "userId" BookmarkTag UserId Source # 
Instance details

Defined in Model

SymbolToField "id" BookmarkTag (Key BookmarkTag) Source # 
Instance details

Defined in Model

FromJSON (Entity BookmarkTag) Source # 
Instance details

Defined in Model

FromJSON (Key BookmarkTag) Source # 
Instance details

Defined in Model

ToJSON (Entity BookmarkTag) Source # 
Instance details

Defined in Model

ToJSON (Key BookmarkTag) Source # 
Instance details

Defined in Model

Read (Key BookmarkTag) Source # 
Instance details

Defined in Model

Show (Key BookmarkTag) Source # 
Instance details

Defined in Model

Eq (Key BookmarkTag) Source # 
Instance details

Defined in Model

Ord (Key BookmarkTag) Source # 
Instance details

Defined in Model

FromHttpApiData (Key BookmarkTag) Source # 
Instance details

Defined in Model

ToHttpApiData (Key BookmarkTag) Source # 
Instance details

Defined in Model

PathPiece (Key BookmarkTag) Source # 
Instance details

Defined in Model

PersistField (Key BookmarkTag) Source # 
Instance details

Defined in Model

PersistFieldSql (Key BookmarkTag) Source # 
Instance details

Defined in Model

data EntityField BookmarkTag typ Source # 
Instance details

Defined in Model

newtype Key BookmarkTag Source # 
Instance details

Defined in Model

type PersistEntityBackend BookmarkTag Source # 
Instance details

Defined in Model

data Unique BookmarkTag Source # 
Instance details

Defined in Model

data Note Source #

Instances

Instances details
FromJSON Note Source # 
Instance details

Defined in Model

ToJSON Note Source # 
Instance details

Defined in Model

Show Note Source # 
Instance details

Defined in Model

Methods

showsPrec :: Int -> Note -> ShowS #

show :: Note -> String #

showList :: [Note] -> ShowS #

Eq Note Source # 
Instance details

Defined in Model

Methods

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

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

Ord Note Source # 
Instance details

Defined in Model

Methods

compare :: Note -> Note -> Ordering #

(<) :: Note -> Note -> Bool #

(<=) :: Note -> Note -> Bool #

(>) :: Note -> Note -> Bool #

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

max :: Note -> Note -> Note #

min :: Note -> Note -> Note #

PersistEntity Note Source # 
Instance details

Defined in Model

Associated Types

type PersistEntityBackend Note #

data Key Note #

data EntityField Note :: Type -> Type #

data Unique Note #

SafeToInsert Note Source # 
Instance details

Defined in Model

PersistField Note Source # 
Instance details

Defined in Model

(TypeError (MultipleUniqueKeysError Note) :: Constraint) => AtLeastOneUniqueKey Note Source # 
Instance details

Defined in Model

(TypeError (NoUniqueKeysError Note) :: Constraint) => OnlyOneUniqueKey Note Source # 
Instance details

Defined in Model

PersistFieldSql Note Source # 
Instance details

Defined in Model

Methods

sqlType :: Proxy Note -> SqlType #

ToBackendKey SqlBackend Note Source # 
Instance details

Defined in Model

SymbolToField "created" Note UTCTime Source # 
Instance details

Defined in Model

SymbolToField "isMarkdown" Note Bool Source # 
Instance details

Defined in Model

SymbolToField "length" Note Int Source # 
Instance details

Defined in Model

SymbolToField "shared" Note Bool Source # 
Instance details

Defined in Model

SymbolToField "slug" Note NtSlug Source # 
Instance details

Defined in Model

SymbolToField "text" Note Text Source # 
Instance details

Defined in Model

SymbolToField "title" Note Text Source # 
Instance details

Defined in Model

SymbolToField "updated" Note UTCTime Source # 
Instance details

Defined in Model

SymbolToField "userId" Note UserId Source # 
Instance details

Defined in Model

SymbolToField "id" Note (Key Note) Source # 
Instance details

Defined in Model

FromJSON (Entity Note) Source # 
Instance details

Defined in Model

FromJSON (Key Note) Source # 
Instance details

Defined in Model

ToJSON (Entity Note) Source # 
Instance details

Defined in Model

ToJSON (Key Note) Source # 
Instance details

Defined in Model

Read (Key Note) Source # 
Instance details

Defined in Model

Show (Key Note) Source # 
Instance details

Defined in Model

Methods

showsPrec :: Int -> Key Note -> ShowS #

show :: Key Note -> String #

showList :: [Key Note] -> ShowS #

Eq (Key Note) Source # 
Instance details

Defined in Model

Methods

(==) :: Key Note -> Key Note -> Bool #

(/=) :: Key Note -> Key Note -> Bool #

Ord (Key Note) Source # 
Instance details

Defined in Model

Methods

compare :: Key Note -> Key Note -> Ordering #

(<) :: Key Note -> Key Note -> Bool #

(<=) :: Key Note -> Key Note -> Bool #

(>) :: Key Note -> Key Note -> Bool #

(>=) :: Key Note -> Key Note -> Bool #

max :: Key Note -> Key Note -> Key Note #

min :: Key Note -> Key Note -> Key Note #

FromHttpApiData (Key Note) Source # 
Instance details

Defined in Model

ToHttpApiData (Key Note) Source # 
Instance details

Defined in Model

PathPiece (Key Note) Source # 
Instance details

Defined in Model

PersistField (Key Note) Source # 
Instance details

Defined in Model

PersistFieldSql (Key Note) Source # 
Instance details

Defined in Model

Methods

sqlType :: Proxy (Key Note) -> SqlType #

data EntityField Note typ Source # 
Instance details

Defined in Model

data EntityField Note typ
newtype Key Note Source # 
Instance details

Defined in Model

type PersistEntityBackend Note Source # 
Instance details

Defined in Model

data Unique Note Source # 
Instance details

Defined in Model

data FileBookmark Source #

data FFBookmarkNode Source #

data TagCloudMode Source #

Instances

Instances details
FromJSON TagCloudMode Source # 
Instance details

Defined in Model

ToJSON TagCloudMode Source # 
Instance details

Defined in Model

Generic TagCloudMode Source # 
Instance details

Defined in Model

Associated Types

type Rep TagCloudMode :: Type -> Type #

Read TagCloudMode Source # 
Instance details

Defined in Model

Show TagCloudMode Source # 
Instance details

Defined in Model

Eq TagCloudMode Source # 
Instance details

Defined in Model

type Rep TagCloudMode Source # 
Instance details

Defined in Model

data FileNote Source #

Instances

Instances details
FromJSON FileNote Source # 
Instance details

Defined in Model

ToJSON FileNote Source # 
Instance details

Defined in Model

Show FileNote Source # 
Instance details

Defined in Model

Eq FileNote Source # 
Instance details

Defined in Model

Ord FileNote Source # 
Instance details

Defined in Model

data AccountSettingsForm Source #

Instances

Instances details
FromJSON AccountSettingsForm Source # 
Instance details

Defined in Model

ToJSON AccountSettingsForm Source # 
Instance details

Defined in Model

Generic AccountSettingsForm Source # 
Instance details

Defined in Model

Associated Types

type Rep AccountSettingsForm :: Type -> Type #

Read AccountSettingsForm Source # 
Instance details

Defined in Model

Show AccountSettingsForm Source # 
Instance details

Defined in Model

Eq AccountSettingsForm Source # 
Instance details

Defined in Model

type Rep AccountSettingsForm Source # 
Instance details

Defined in Model

type Rep AccountSettingsForm = D1 ('MetaData "AccountSettingsForm" "Model" "espial-0.0.20-EcVaTGJvbgfEg2qawed6qP" 'False) (C1 ('MetaCons "AccountSettingsForm" 'PrefixI 'True) (S1 ('MetaSel ('Just "_privateDefault") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "_archiveDefault") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "_privacyLock") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))))

data BookmarkForm Source #

Instances

Instances details
FromJSON BookmarkForm Source # 
Instance details

Defined in Model

ToJSON BookmarkForm Source # 
Instance details

Defined in Model

Generic BookmarkForm Source # 
Instance details

Defined in Model

Associated Types

type Rep BookmarkForm :: Type -> Type #

Read BookmarkForm Source # 
Instance details

Defined in Model

Show BookmarkForm Source # 
Instance details

Defined in Model

Eq BookmarkForm Source # 
Instance details

Defined in Model

type Rep BookmarkForm Source # 
Instance details

Defined in Model

data UpsertResult a Source #

Constructors

Created a 
Updated a 
Failed String 

Instances

Instances details
Functor UpsertResult Source # 
Instance details

Defined in Model

Methods

fmap :: (a -> b) -> UpsertResult a -> UpsertResult b #

(<$) :: a -> UpsertResult b -> UpsertResult a #

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

Defined in Model

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

Defined in Model

pattern AddCookie :: !SetCookie -> Header #

pattern DeleteCookie :: !ByteString -> !ByteString -> Header #

name and path

array :: ToJSON a => [a] -> Value #

Convert a list of values to an Array.

async :: MonadUnliftIO m => m a -> m (Async a) #

Unlifted async.

Since: unliftio-0.1.0.0

deepseq :: NFData a => a -> b -> b infixr 0 #

deepseq: fully evaluates the first argument, before returning the second.

The name deepseq is used to illustrate the relationship to seq: where seq is shallow in the sense that it only evaluates the top level of its argument, deepseq traverses the entire data structure evaluating it completely.

deepseq can be useful for forcing pending exceptions, eradicating space leaks, or forcing lazy I/O to happen. It is also useful in conjunction with parallel Strategies (see the parallel package).

There is no guarantee about the ordering of evaluation. The implementation may evaluate the components of the structure in any order or in parallel. To impose an actual order on evaluation, use pseq from Control.Parallel in the parallel package.

Since: deepseq-1.1.0.0

say :: MonadIO m => Text -> m () #

Send a Text to standard output, appending a newline, and chunking the data. By default, the chunk size is 2048 characters, so any messages below that size will be sent as one contiguous unit. If larger messages are used, it is possible for interleaving with other threads to occur.

Since: say-0.1.0.0

void :: Functor f => f a -> f () #

void value discards or ignores the result of evaluation, such as the return value of an IO action.

Examples

Expand

Replace the contents of a Maybe Int with unit:

>>> void Nothing
Nothing
>>> void (Just 3)
Just ()

Replace the contents of an Either Int Int with unit, resulting in an Either Int ():

>>> void (Left 8675309)
Left 8675309
>>> void (Right 8675309)
Right ()

Replace every element of a list with unit:

>>> void [1,2,3]
[(),(),()]

Replace the second element of a pair with unit:

>>> void (1,2)
(1,())

Discard the result of an IO action:

>>> mapM print [1,2]
1
2
[(),()]
>>> void $ mapM print [1,2]
1
2

warp :: YesodDispatch site => Int -> site -> IO () #

A convenience method to run an application using the Warp webserver on the specified port. Automatically calls toWaiApp. Provides a default set of middlewares. This set may change at any point without a breaking version number. Currently, it includes:

  • Logging
  • GZIP compression
  • Automatic HEAD method handling
  • Request method override with the _method query string parameter
  • Accept header override with the _accept query string parameter

If you need more fine-grained control of middlewares, please use toWaiApp directly.

Since 1.2.0

assert :: Bool -> a -> a #

If the first argument evaluates to True, then the result is the second argument. Otherwise an AssertionFailed exception is raised, containing a String with the source file and line number of the call to assert.

Assertions can normally be turned on or off with a compiler flag (for GHC, assertions are normally on unless optimisation is turned on with -O or the -fignore-asserts option is given). When assertions are turned off, the first argument to assert is ignored, and the second argument is returned as the result.

($) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b infixr 0 #

Application operator. This operator is redundant, since ordinary application (f x) means the same as (f $ x). However, $ has low, right-associative binding precedence, so it sometimes allows parentheses to be omitted; for example:

f $ g $ h x  =  f (g (h x))

It is also useful in higher-order situations, such as map ($ 0) xs, or zipWith ($) fs xs.

Note that ($) is representation-polymorphic in its result type, so that foo $ True where foo :: Bool -> Int# is well-typed.

otherwise :: Bool #

otherwise is defined as the value True. It helps to make guards more readable. eg.

 f x | x < 0     = ...
     | otherwise = ...

(++) :: Monoid m => m -> m -> m infixr 5 #

foldr :: MonoFoldable mono => (Element mono -> b -> b) -> b -> mono -> b #

Synonym for ofoldr

Since: mono-traversable-1.0.0

map :: Functor f => (a -> b) -> f a -> f b #

join :: Monad m => m (m a) -> m a #

The join function is the conventional monad join operator. It is used to remove one level of monadic structure, projecting its bound argument into the outer level.

'join bss' can be understood as the do expression

do bs <- bss
   bs

Examples

Expand

A common use of join is to run an IO computation returned from an STM transaction, since STM transactions can't perform IO directly. Recall that

atomically :: STM a -> IO a

is used to run STM transactions atomically. So, by specializing the types of atomically and join to

atomically :: STM (IO b) -> IO (IO b)
join       :: IO (IO b)  -> IO b

we can compose them as

join . atomically :: STM (IO b) -> IO b

to run an STM transaction and the IO action it returns.

sort :: (SemiSequence seq, Ord (Element seq)) => seq -> seq #

Sort a ordered sequence.

> sort [4,3,1,2]
[1,2,3,4]

toList :: MonoFoldable mono => mono -> [Element mono] #

Synonym for otoList

Since: mono-traversable-1.0.0

evaluate :: MonadIO m => a -> m a #

Lifted version of evaluate.

Since: unliftio-0.1.0.0

finally #

Arguments

:: MonadUnliftIO m 
=> m a

thing

-> m b

after

-> m a 

Perform thing, guaranteeing that after will run after, even if an exception occurs.

Same interruptible vs uninterrupible points apply as with bracket. See base's finally for more information.

Since: unliftio-0.1.0.0

handle :: (MonadUnliftIO m, Exception e) => (e -> m a) -> m a -> m a #

Flipped version of catch.

Since: unliftio-0.1.0.0

realToFrac :: (Real a, Fractional b) => a -> b #

General coercion to Fractional types.

WARNING: This function goes through the Rational type, which does not have values for NaN for example. This means it does not round-trip.

For Double it also behaves differently with or without -O0:

Prelude> realToFrac nan -- With -O0
-Infinity
Prelude> realToFrac nan
NaN

fromIntegral :: (Integral a, Num b) => a -> b #

General coercion from Integral types.

WARNING: This function performs silent truncation if the result type is not at least as big as the argument's type.

($=) :: forall (m :: Type -> Type) a b c r. Monad m => Conduit a m b -> ConduitT b c m r -> ConduitT a c m r infixl 1 #

A synonym for =$= for backwards compatibility.

Since 0.4.0

liftCallCC :: CallCC m (Maybe a) (Maybe b) -> CallCC (MaybeT m) a b #

Lift a callCC operation to the new monad.

either :: (a -> c) -> (b -> c) -> Either a b -> c #

Case analysis for the Either type. If the value is Left a, apply the first function to a; if it is Right b, apply the second function to b.

Examples

Expand

We create two values of type Either String Int, one using the Left constructor and another using the Right constructor. Then we apply "either" the length function (if we have a String) or the "times-two" function (if we have an Int):

>>> let s = Left "foo" :: Either String Int
>>> let n = Right 3 :: Either String Int
>>> either length (*2) s
3
>>> either length (*2) n
6

id :: forall (a :: k). Category cat => cat a a #

the identity morphism

(.) :: forall (b :: k) (c :: k) (a :: k). Category cat => cat b c -> cat a b -> cat a c infixr 9 #

morphism composition

fst :: (a, b) -> a #

Extract the first component of a pair.

snd :: (a, b) -> b #

Extract the second component of a pair.

liftM :: Monad m => (a1 -> r) -> m a1 -> m r #

Promote a function to a monad.

null :: MonoFoldable mono => mono -> Bool #

Synonym for onull

Since: mono-traversable-1.0.0

singleton :: MonoPointed seq => Element seq -> seq #

Create a sequence from a single element.

> singleton a :: String
"a"
> singleton a :: Vector Char
fromList "a"

foldl' :: MonoFoldable mono => (a -> Element mono -> a) -> a -> mono -> a #

Synonym for ofoldl'

Since: mono-traversable-1.0.0

mapMaybe :: (a -> Maybe b) -> [a] -> [b] #

The mapMaybe function is a version of map which can throw out elements. In particular, the functional argument returns something of type Maybe b. If this is Nothing, no element is added on to the result list. If it is Just b, then b is included in the result list.

Examples

Expand

Using mapMaybe f x is a shortcut for catMaybes $ map f x in most cases:

>>> import Text.Read ( readMaybe )
>>> let readMaybeInt = readMaybe :: String -> Maybe Int
>>> mapMaybe readMaybeInt ["1", "Foo", "3"]
[1,3]
>>> catMaybes $ map readMaybeInt ["1", "Foo", "3"]
[1,3]

If we map the Just constructor, the entire list should be returned:

>>> mapMaybe Just [1,2,3]
[1,2,3]

object :: [Pair] -> Value #

Create a Value from a list of name/value Pairs. If duplicate keys arise, later keys and their associated values win.

bool :: a -> a -> Bool -> a #

Case analysis for the Bool type. bool x y p evaluates to x when p is False, and evaluates to y when p is True.

This is equivalent to if p then y else x; that is, one can think of it as an if-then-else construct with its arguments reordered.

Examples

Expand

Basic usage:

>>> bool "foo" "bar" True
"bar"
>>> bool "foo" "bar" False
"foo"

Confirm that bool x y p and if p then y else x are equivalent:

>>> let p = True; x = "bar"; y = "foo"
>>> bool x y p == if p then y else x
True
>>> let p = False
>>> bool x y p == if p then y else x
True

Since: base-4.7.0.0

(.:) :: FromJSON a => Object -> Key -> Parser a #

Retrieve the value associated with the given key of an Object. The result is empty if the key is not present or the value cannot be converted to the desired type.

This accessor is appropriate if the key and value must be present in an object for it to be valid. If the key and value are optional, use .:? instead.

(.=) :: (KeyValue e kv, ToJSON v) => Key -> v -> kv infixr 8 #

when :: Applicative f => Bool -> f () -> f () #

Conditional execution of Applicative expressions. For example,

when debug (putStrLn "Debugging")

will output the string Debugging if the Boolean value debug is True, and otherwise do nothing.

liftM2 :: Monad m => (a1 -> a2 -> r) -> m a1 -> m a2 -> m r #

Promote a function to a monad, scanning the monadic arguments from left to right. For example,

liftM2 (+) [0,1] [0,2] = [0,2,1,3]
liftM2 (+) (Just 1) Nothing = Nothing

fromMaybe :: a -> Maybe a -> a #

The fromMaybe function takes a default value and a Maybe value. If the Maybe is Nothing, it returns the default value; otherwise, it returns the value contained in the Maybe.

Examples

Expand

Basic usage:

>>> fromMaybe "" (Just "Hello, World!")
"Hello, World!"
>>> fromMaybe "" Nothing
""

Read an integer from a string using readMaybe. If we fail to parse an integer, we want to return 0 by default:

>>> import Text.Read ( readMaybe )
>>> fromMaybe 0 (readMaybe "5")
5
>>> fromMaybe 0 (readMaybe "")
0

catMaybes :: (IsSequence (f (Maybe t)), Functor f, Element (f (Maybe t)) ~ Maybe t) => f (Maybe t) -> f t #

Takes all of the Just values from a sequence of Maybe ts and concatenates them into an unboxed sequence of ts.

Since 0.6.2

($>) :: Functor f => f a -> b -> f b infixl 4 #

Flipped version of <$.

Examples

Expand

Replace the contents of a Maybe Int with a constant String:

>>> Nothing $> "foo"
Nothing
>>> Just 90210 $> "foo"
Just "foo"

Replace the contents of an Either Int Int with a constant String, resulting in an Either Int String:

>>> Left 8675309 $> "foo"
Left 8675309
>>> Right 8675309 $> "foo"
Right "foo"

Replace each element of a list with a constant String:

>>> [1,2,3] $> "foo"
["foo","foo","foo"]

Replace the second element of a pair with a constant String:

>>> (1,2) $> "foo"
(1,"foo")

Since: base-4.7.0.0

unless :: Applicative f => Bool -> f () -> f () #

The reverse of when.

(<$>) :: Functor f => (a -> b) -> f a -> f b infixl 4 #

An infix synonym for fmap.

The name of this operator is an allusion to $. Note the similarities between their types:

 ($)  ::              (a -> b) ->   a ->   b
(<$>) :: Functor f => (a -> b) -> f a -> f b

Whereas $ is function application, <$> is function application lifted over a Functor.

Examples

Expand

Convert from a Maybe Int to a Maybe String using show:

>>> show <$> Nothing
Nothing
>>> show <$> Just 3
Just "3"

Convert from an Either Int Int to an Either Int String using show:

>>> show <$> Left 17
Left 17
>>> show <$> Right 17
Right "17"

Double each element of a list:

>>> (*2) <$> [1,2,3]
[2,4,6]

Apply even to the second element of a pair:

>>> even <$> (2,2)
(2,True)

seq :: forall {r :: RuntimeRep} a (b :: TYPE r). a -> b -> b infixr 0 #

The value of seq a b is bottom if a is bottom, and otherwise equal to b. In other words, it evaluates the first argument a to weak head normal form (WHNF). seq is usually introduced to improve performance by avoiding unneeded laziness.

A note on evaluation order: the expression seq a b does not guarantee that a will be evaluated before b. The only guarantee given by seq is that the both a and b will be evaluated before seq returns a value. In particular, this means that b may be evaluated before a. If you need to guarantee a specific order of evaluation, you must use the function pseq from the "parallel" package.

guard :: Alternative f => Bool -> f () #

Conditional failure of Alternative computations. Defined by

guard True  = pure ()
guard False = empty

Examples

Expand

Common uses of guard include conditionally signaling an error in an error monad and conditionally rejecting the current choice in an Alternative-based parser.

As an example of signaling an error in the error monad Maybe, consider a safe division function safeDiv x y that returns Nothing when the denominator y is zero and Just (x `div` y) otherwise. For example:

>>> safeDiv 4 0
Nothing
>>> safeDiv 4 2
Just 2

A definition of safeDiv using guards, but not guard:

safeDiv :: Int -> Int -> Maybe Int
safeDiv x y | y /= 0    = Just (x `div` y)
            | otherwise = Nothing

A definition of safeDiv using guard and Monad do-notation:

safeDiv :: Int -> Int -> Maybe Int
safeDiv x y = do
  guard (y /= 0)
  return (x `div` y)

bracket_ :: MonadUnliftIO m => m a -> m b -> m c -> m c #

Same as bracket, but does not pass the acquired resource to cleanup and use functions.

For more information, see base's bracket_.

Since: unliftio-0.1.0.0

hIsTerminalDevice :: MonadIO m => Handle -> m Bool #

Lifted version of hIsTerminalDevice

Since: unliftio-0.2.1.0

setTitle :: MonadWidget m => Html -> m () #

Set the page title.

Calling setTitle or setTitleI multiple times overrides previously set values.

SEO Notes:

  • Title tags are the second most important on-page factor for SEO, after content
  • Every page should have a unique title tag
  • Start your title tag with your main targeted keyword
  • Don't stuff your keywords
  • Google typically shows 55-64 characters, so aim to keep your title length under 60 characters

(<**>) :: Applicative f => f a -> f (a -> b) -> f b infixl 4 #

A variant of <*> with the arguments reversed.

try :: (MonadUnliftIO m, Exception e) => m a -> m (Either e a) #

Run the given action and catch any synchronous exceptions as a Left value.

This is parameterized on the exception type. To catch all synchronous exceptions, use tryAny.

Since: unliftio-0.1.0.0

swap :: (a, b) -> (b, a) #

Swap the components of a pair.

asyncBound :: MonadUnliftIO m => m a -> m (Async a) #

Unlifted asyncBound.

Since: unliftio-0.1.0.0

asyncOn :: MonadUnliftIO m => Int -> m a -> m (Async a) #

Unlifted asyncOn.

Since: unliftio-0.1.0.0

asyncWithUnmask :: MonadUnliftIO m => ((forall b. m b -> m b) -> m a) -> m (Async a) #

Unlifted asyncWithUnmask.

Since: unliftio-0.1.0.0

asyncOnWithUnmask :: MonadUnliftIO m => Int -> ((forall b. m b -> m b) -> m a) -> m (Async a) #

Unlifted asyncOnWithUnmask.

Since: unliftio-0.1.0.0

withAsync :: MonadUnliftIO m => m a -> (Async a -> m b) -> m b #

Unlifted withAsync.

Since: unliftio-0.1.0.0

withAsyncBound :: MonadUnliftIO m => m a -> (Async a -> m b) -> m b #

Unlifted withAsyncBound.

Since: unliftio-0.1.0.0

withAsyncOn :: MonadUnliftIO m => Int -> m a -> (Async a -> m b) -> m b #

Unlifted withAsyncOn.

Since: unliftio-0.1.0.0

withAsyncWithUnmask :: MonadUnliftIO m => ((forall c. m c -> m c) -> m a) -> (Async a -> m b) -> m b #

Unlifted withAsyncWithUnmask.

Since: unliftio-0.1.0.0

withAsyncOnWithUnmask :: MonadUnliftIO m => Int -> ((forall c. m c -> m c) -> m a) -> (Async a -> m b) -> m b #

Unlifted withAsyncOnWithMask.

Since: unliftio-0.1.0.0

wait :: MonadIO m => Async a -> m a #

Lifted wait.

Since: unliftio-0.1.0.0

waitCatch :: MonadIO m => Async a -> m (Either SomeException a) #

Lifted waitCatch.

Since: unliftio-0.1.0.0

poll :: MonadIO m => Async a -> m (Maybe (Either SomeException a)) #

Lifted poll.

Since: unliftio-0.1.0.0

waitSTM :: Async a -> STM a #

A version of wait that can be used inside an STM transaction.

waitCatchSTM :: Async a -> STM (Either SomeException a) #

A version of waitCatch that can be used inside an STM transaction.

pollSTM :: Async a -> STM (Maybe (Either SomeException a)) #

A version of poll that can be used inside an STM transaction.

cancel :: MonadIO m => Async a -> m () #

Lifted cancel.

Since: unliftio-0.1.0.0

uninterruptibleCancel :: MonadIO m => Async a -> m () #

Lifted uninterruptibleCancel.

Since: unliftio-0.1.0.0

cancelWith :: (Exception e, MonadIO m) => Async a -> e -> m () #

Lifted cancelWith. Additionally uses toAsyncException to ensure async exception safety.

Since: unliftio-0.1.0.0

waitAnyCatch :: MonadIO m => [Async a] -> m (Async a, Either SomeException a) #

Lifted waitAnyCatch.

Since: unliftio-0.1.0.0

waitAnyCatchSTM :: [Async a] -> STM (Async a, Either SomeException a) #

A version of waitAnyCatch that can be used inside an STM transaction.

Since: async-2.1.0

waitAnyCatchCancel :: MonadIO m => [Async a] -> m (Async a, Either SomeException a) #

Lifted waitAnyCatchCancel.

Since: unliftio-0.1.0.0

waitAny :: MonadIO m => [Async a] -> m (Async a, a) #

Lifted waitAny.

Since: unliftio-0.1.0.0

waitAnySTM :: [Async a] -> STM (Async a, a) #

A version of waitAny that can be used inside an STM transaction.

Since: async-2.1.0

waitAnyCancel :: MonadIO m => [Async a] -> m (Async a, a) #

Lifted waitAnyCancel.

Since: unliftio-0.1.0.0

waitEitherCatch :: MonadIO m => Async a -> Async b -> m (Either (Either SomeException a) (Either SomeException b)) #

Lifted waitEitherCatch.

Since: unliftio-0.1.0.0

waitEitherCatchSTM :: Async a -> Async b -> STM (Either (Either SomeException a) (Either SomeException b)) #

A version of waitEitherCatch that can be used inside an STM transaction.

Since: async-2.1.0

waitEitherCatchCancel :: MonadIO m => Async a -> Async b -> m (Either (Either SomeException a) (Either SomeException b)) #

Lifted waitEitherCatchCancel.

Since: unliftio-0.1.0.0

waitEither :: MonadIO m => Async a -> Async b -> m (Either a b) #

Lifted waitEither.

Since: unliftio-0.1.0.0

waitEitherSTM :: Async a -> Async b -> STM (Either a b) #

A version of waitEither that can be used inside an STM transaction.

Since: async-2.1.0

waitEither_ :: MonadIO m => Async a -> Async b -> m () #

Lifted waitEither_.

Since: unliftio-0.1.0.0

waitEitherSTM_ :: Async a -> Async b -> STM () #

A version of waitEither_ that can be used inside an STM transaction.

Since: async-2.1.0

waitEitherCancel :: MonadIO m => Async a -> Async b -> m (Either a b) #

Lifted waitEitherCancel.

Since: unliftio-0.1.0.0

waitBoth :: MonadIO m => Async a -> Async b -> m (a, b) #

Lifted waitBoth.

Since: unliftio-0.1.0.0

waitBothSTM :: Async a -> Async b -> STM (a, b) #

A version of waitBoth that can be used inside an STM transaction.

Since: async-2.1.0

link :: MonadIO m => Async a -> m () #

Lifted link.

Since: unliftio-0.1.0.0

link2 :: MonadIO m => Async a -> Async b -> m () #

Lifted link2.

Since: unliftio-0.1.0.0

race :: MonadUnliftIO m => m a -> m b -> m (Either a b) #

Unlifted race.

Since: unliftio-0.1.0.0

race_ :: MonadUnliftIO m => m a -> m b -> m () #

Unlifted race_.

Since: unliftio-0.1.0.0

concurrently :: MonadUnliftIO m => m a -> m b -> m (a, b) #

Unlifted concurrently.

Since: unliftio-0.1.0.0

concurrently_ :: MonadUnliftIO m => m a -> m b -> m () #

Unlifted concurrently_.

Since: unliftio-0.1.0.0

mapConcurrently :: (MonadUnliftIO m, Traversable t) => (a -> m b) -> t a -> m (t b) #

Executes a Traversable container of items concurrently, it uses the Flat type internally.

Since: unliftio-0.1.0.0

forConcurrently :: (MonadUnliftIO m, Traversable t) => t a -> (a -> m b) -> m (t b) #

Similar to mapConcurrently but with arguments flipped

Since: unliftio-0.1.0.0

mapConcurrently_ :: (MonadUnliftIO m, Foldable f) => (a -> m b) -> f a -> m () #

Executes a Traversable container of items concurrently, it uses the Flat type internally. This function ignores the results.

Since: unliftio-0.1.0.0

forConcurrently_ :: (MonadUnliftIO m, Foldable f) => f a -> (a -> m b) -> m () #

Similar to mapConcurrently_ but with arguments flipped

Since: unliftio-0.1.0.0

replicateConcurrently :: MonadUnliftIO f => Int -> f a -> f [a] #

Unlifted replicateConcurrently.

Since: unliftio-0.1.0.0

replicateConcurrently_ :: (Applicative m, MonadUnliftIO m) => Int -> m a -> m () #

Unlifted replicateConcurrently_.

Since: unliftio-0.1.0.0

mapM_ :: (MonoFoldable mono, Applicative m) => (Element mono -> m ()) -> mono -> m () #

Synonym for omapM_

Since: mono-traversable-1.0.0

forM_ :: (MonoFoldable mono, Applicative m) => mono -> (Element mono -> m ()) -> m () #

Synonym for oforM_

Since: mono-traversable-1.0.0

const :: a -> b -> a #

const x y always evaluates to x, ignoring its second argument.

>>> const 42 "hello"
42
>>> map (const 42) [0..3]
[42,42,42,42]

getCurrentTime :: IO UTCTime #

Get the current UTCTime from the system clock.

atomicModifyIORef' :: MonadIO m => IORef a -> (a -> (a, b)) -> m b #

Lifted atomicModifyIORef'.

Since: unliftio-0.1.0.0

error :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => [Char] -> a #

error stops execution and displays an error message.

zipWith :: Zip f => (a -> b -> c) -> f a -> f b -> f c #

zip :: Zip f => f a -> f b -> f (a, b) #

unzip :: Zip f => f (a, b) -> (f a, f b) #

even :: Integral a => a -> Bool #

atomically :: MonadIO m => STM a -> m a #

Lifted version of atomically

Since: unliftio-0.2.1.0

bracket :: MonadUnliftIO m => m a -> (a -> m b) -> (a -> m c) -> m c #

Allocate and clean up a resource safely.

For more information on motivation and usage of this function, see base's bracket. This function has two differences from the one in base. The first, and more obvious, is that it works on any MonadUnliftIO instance, not just IO.

The more subtle difference is that this function will use uninterruptible masking for its cleanup handler. This is a subtle distinction, but at a high level, means that resource cleanup has more guarantees to complete. This comes at the cost that an incorrectly written cleanup function cannot be interrupted.

For more information, please see https://github.com/fpco/safe-exceptions/issues/3.

Since: unliftio-0.1.0.0

hGetContents :: MonadIO m => Handle -> m ByteString #

Strictly read the contents of the given Handle into a ByteString.

Since: classy-prelude-1.2.0

maximumBy :: MonoFoldable mono => (Element mono -> Element mono -> Ordering) -> NonNull mono -> Element mono #

Get the maximum element of a monomorphic container, using a supplied element ordering function.

Safe version of maximumByEx, only works on monomorphic containers wrapped in a NonNull.

minimumBy :: MonoFoldable mono => (Element mono -> Element mono -> Ordering) -> NonNull mono -> Element mono #

Get the minimum element of a monomorphic container, using a supplied element ordering function.

Safe version of minimumByEx, only works on monomorphic containers wrapped in a NonNull.

uncurry :: (a -> b -> c) -> (a, b) -> c #

uncurry converts a curried function to a function on pairs.

Examples

Expand
>>> uncurry (+) (1,2)
3
>>> uncurry ($) (show, 1)
"1"
>>> map (uncurry max) [(1,2), (3,4), (6,8)]
[2,4,8]

openFile :: MonadIO m => FilePath -> IOMode -> m Handle #

Lifted version of openFile

Since: unliftio-0.2.20

length :: MonoFoldable mono => mono -> Int #

Synonym for olength

Since: mono-traversable-1.0.0

head :: MonoFoldable mono => NonNull mono -> Element mono #

Return the first element of a monomorphic container.

Safe version of headEx, only works on monomorphic containers wrapped in a NonNull.

group :: (IsSequence seq, Eq (Element seq)) => seq -> [seq] #

Equivalent to groupBy (==)

for :: (Traversable t, Applicative f) => t a -> (a -> f b) -> f (t b) #

for is traverse with its arguments flipped. For a version that ignores the results see for_.

forM :: (Traversable t, Monad m) => t a -> (a -> m b) -> m (t b) #

forM is mapM with its arguments flipped. For a version that ignores the results see forM_.

throwTo :: (Exception e, MonadIO m) => ThreadId -> e -> m () #

Throw an asynchronous exception to another thread.

Synchronously typed exceptions will be wrapped into an AsyncExceptionWrapper, see https://github.com/fpco/safe-exceptions#determining-sync-vs-async.

It's usually a better idea to use the UnliftIO.Async module, see https://github.com/fpco/safe-exceptions#quickstart.

Since: unliftio-0.1.0.0

atomicWriteIORef :: MonadIO m => IORef a -> a -> m () #

Lifted atomicWriteIORef.

Since: unliftio-0.1.0.0

atomicModifyIORef :: MonadIO m => IORef a -> (a -> (a, b)) -> m b #

Lifted atomicModifyIORef.

Since: unliftio-0.1.0.0

forever :: Applicative f => f a -> f b #

Repeat an action indefinitely.

Examples

Expand

A common use of forever is to process input from network sockets, Handles, and channels (e.g. MVar and Chan).

For example, here is how we might implement an echo server, using forever both to listen for client connections on a network socket and to echo client input on client connection handles:

echoServer :: Socket -> IO ()
echoServer socket = forever $ do
  client <- accept socket
  forkFinally (echo client) (\_ -> hClose client)
  where
    echo :: Handle -> IO ()
    echo client = forever $
      hGetLine client >>= hPutStrLn client

Note that "forever" isn't necessarily non-terminating. If the action is in a MonadPlus and short-circuits after some number of iterations. then forever actually returns mzero, effectively short-circuiting its caller.

hSeek :: MonadIO m => Handle -> SeekMode -> Integer -> m () #

Lifted version of hSeek

Since: unliftio-0.2.1.0

hFlush :: MonadIO m => Handle -> m () #

Lifted version of hFlush

Since: unliftio-0.2.1.0

mask :: MonadUnliftIO m => ((forall a. m a -> m a) -> m b) -> m b #

Unlifted version of mask.

Since: unliftio-0.1.0.0

throwIO :: (MonadIO m, Exception e) => e -> m a #

Synchronously throw the given exception.

Note that, if you provide an exception value which is of an asynchronous type, it will be wrapped up in SyncExceptionWrapper. See toSyncException.

Since: unliftio-0.1.0.0

newTChanIO :: MonadIO m => m (TChan a) #

Lifted version of newTChanIO

Since: unliftio-0.2.1.0

newBroadcastTChanIO :: MonadIO m => m (TChan a) #

Lifted version of newBroadcastTChanIO

Since: unliftio-0.2.1.0

newTQueueIO :: MonadIO m => m (TQueue a) #

Lifted version of newTQueueIO

Since: unliftio-0.2.1.0

newTBQueueIO :: MonadIO m => Natural -> m (TBQueue a) #

Lifted version of newTBQueueIO

Since: unliftio-0.2.1.0

newTMVarIO :: MonadIO m => a -> m (TMVar a) #

Lifted version of newTMVarIO

Since: unliftio-0.2.1.0

catch #

Arguments

:: (MonadUnliftIO m, Exception e) 
=> m a

action

-> (e -> m a)

handler

-> m a 

Catch a synchronous (but not asynchronous) exception and recover from it.

This is parameterized on the exception type. To catch all synchronous exceptions, use catchAny.

Since: unliftio-0.1.0.0

writeFile :: MonadIO m => FilePath -> ByteString -> m () #

Write a ByteString to a file.

Since: classy-prelude-1.2.0

getLine :: MonadIO m => m Text #

Read a line from stdin

Uses system locale settings

Since: classy-prelude-1.3.1

putStrLn :: MonadIO m => Text -> m () #

Write a Text followed by a newline to stdout

Uses system locale settings

Since: classy-prelude-1.3.1

isDoesNotExistError :: IOError -> Bool #

An error indicating that an IO operation failed because one of its arguments does not exist.

getArgs :: MonadIO m => m [Text] #

hClose :: MonadIO m => Handle -> m () #

Lifted version of hClose

Since: unliftio-0.2.1.0

isAlreadyInUseError :: IOError -> Bool #

An error indicating that an IO operation failed because one of its arguments is a single-use resource, which is already being used (for example, opening the same file twice for writing might give this error).

isPermissionError :: IOError -> Bool #

An error indicating that an IO operation failed because the user does not have sufficient operating system privilege to perform that operation.

isFullError :: IOError -> Bool #

An error indicating that an IO operation failed because the device is full.

isEOFError :: IOError -> Bool #

An error indicating that an IO operation failed because the end of file has been reached.

isIllegalOperation :: IOError -> Bool #

An error indicating that an IO operation failed because the operation was not possible. Any computation which returns an IO result may fail with isIllegalOperation. In some cases, an implementation will not be able to distinguish between the possible error causes. In this case it should fail with isIllegalOperation.

(***) :: Arrow a => a b c -> a b' c' -> a (b, b') (c, c') infixr 3 #

Split the input between the two argument arrows and combine their output. Note that this is in general not a functor.

The default definition may be overridden with a more efficient version if desired.

(&&&) :: Arrow a => a b c -> a b c' -> a b (c, c') infixr 3 #

Fanout: send the input to both argument arrows and combine their output.

The default definition may be overridden with a more efficient version if desired.

hWaitForInput :: MonadIO m => Handle -> Int -> m Bool #

Lifted version of hWaitForInput

Since: unliftio-0.2.1.0

sortOn :: (Ord o, SemiSequence seq) => (Element seq -> o) -> seq -> seq #

Same as sortBy . comparing.

Since 0.7.0

concat :: (MonoFoldable mono, Monoid (Element mono)) => mono -> Element mono #

Synonym for oconcat

Since: mono-traversable-1.0.0

print :: (Show a, MonadIO m) => a -> m () #

trace :: String -> a -> a #

We define our own trace (and also its variants) which provides a warning when used. So that tracing is available during development, but the compiler reminds you to not leave them in the code for production.

(^) :: (Num a, Integral b) => a -> b -> a infixr 8 #

raise a number to a non-negative integral power

(&&) :: Bool -> Bool -> Bool infixr 3 #

Boolean "and", lazy in the second argument

(||) :: Bool -> Bool -> Bool infixr 2 #

Boolean "or", lazy in the second argument

not :: Bool -> Bool #

Boolean "not"

undefined :: HasCallStack => a #

We define our own undefined which is marked as deprecated. This makes it useful to use during development, but lets you more easily get notifications if you accidentally ship partial code in production.

The classy prelude recommendation for when you need to really have a partial function in production is to use error with a very descriptive message so that, in case an exception is thrown, you get more information than Prelude.undefined.

Since 0.5.5

liftA :: Applicative f => (a -> b) -> f a -> f b #

Lift a function to actions. Equivalent to Functor's fmap but implemented using only Applicative's methods: liftA f a = pure f <*> a

As such this function may be used to implement a Functor instance from an Applicative one.

Examples

Expand

Using the Applicative instance for Lists:

>>> liftA (+1) [1, 2]
[2,3]

Or the Applicative instance for Maybe

>>> liftA (+1) (Just 3)
Just 4

liftA3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d #

Lift a ternary function to actions.

(=<<) :: Monad m => (a -> m b) -> m a -> m b infixr 1 #

Same as >>=, but with the arguments interchanged.

liftM3 :: Monad m => (a1 -> a2 -> a3 -> r) -> m a1 -> m a2 -> m a3 -> m r #

Promote a function to a monad, scanning the monadic arguments from left to right (cf. liftM2).

liftM4 :: Monad m => (a1 -> a2 -> a3 -> a4 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m r #

Promote a function to a monad, scanning the monadic arguments from left to right (cf. liftM2).

liftM5 :: Monad m => (a1 -> a2 -> a3 -> a4 -> a5 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m a5 -> m r #

Promote a function to a monad, scanning the monadic arguments from left to right (cf. liftM2).

ap :: Monad m => m (a -> b) -> m a -> m b #

In many situations, the liftM operations can be replaced by uses of ap, which promotes function application.

return f `ap` x1 `ap` ... `ap` xn

is equivalent to

liftMn f x1 x2 ... xn

flip :: (a -> b -> c) -> b -> a -> c #

flip f takes its (first) two arguments in the reverse order of f.

>>> flip (++) "hello" "world"
"worldhello"

($!) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b infixr 0 #

Strict (call-by-value) application operator. It takes a function and an argument, evaluates the argument to weak head normal form (WHNF), then calls the function with that value.

until :: (a -> Bool) -> (a -> a) -> a -> a #

until p f yields the result of applying f until p holds.

asTypeOf :: a -> a -> a #

asTypeOf is a type-restricted version of const. It is usually used as an infix operator, and its typing forces its first argument (which is usually overloaded) to have the same type as the second.

subtract :: Num a => a -> a -> a #

the same as flip (-).

Because - is treated specially in the Haskell grammar, (- e) is not a section, but an application of prefix negation. However, (subtract exp) is equivalent to the disallowed section.

maybe :: b -> (a -> b) -> Maybe a -> b #

The maybe function takes a default value, a function, and a Maybe value. If the Maybe value is Nothing, the function returns the default value. Otherwise, it applies the function to the value inside the Just and returns the result.

Examples

Expand

Basic usage:

>>> maybe False odd (Just 3)
True
>>> maybe False odd Nothing
False

Read an integer from a string using readMaybe. If we succeed, return twice the integer; that is, apply (*2) to it. If instead we fail to parse an integer, return 0 by default:

>>> import Text.Read ( readMaybe )
>>> maybe 0 (*2) (readMaybe "5")
10
>>> maybe 0 (*2) (readMaybe "")
0

Apply show to a Maybe Int. If we have Just n, we want to show the underlying Int n. But if we have Nothing, we return the empty string instead of (for example) "Nothing":

>>> maybe "" show (Just 5)
"5"
>>> maybe "" show Nothing
""

isJust :: Maybe a -> Bool #

The isJust function returns True iff its argument is of the form Just _.

Examples

Expand

Basic usage:

>>> isJust (Just 3)
True
>>> isJust (Just ())
True
>>> isJust Nothing
False

Only the outer constructor is taken into consideration:

>>> isJust (Just Nothing)
True

isNothing :: Maybe a -> Bool #

The isNothing function returns True iff its argument is Nothing.

Examples

Expand

Basic usage:

>>> isNothing (Just 3)
False
>>> isNothing (Just ())
False
>>> isNothing Nothing
True

Only the outer constructor is taken into consideration:

>>> isNothing (Just Nothing)
False

maybeToList :: Maybe a -> [a] #

The maybeToList function returns an empty list when given Nothing or a singleton list when given Just.

Examples

Expand

Basic usage:

>>> maybeToList (Just 7)
[7]
>>> maybeToList Nothing
[]

One can use maybeToList to avoid pattern matching when combined with a function that (safely) works on lists:

>>> import Text.Read ( readMaybe )
>>> sum $ maybeToList (readMaybe "3")
3
>>> sum $ maybeToList (readMaybe "")
0

listToMaybe :: [a] -> Maybe a #

The listToMaybe function returns Nothing on an empty list or Just a where a is the first element of the list.

Examples

Expand

Basic usage:

>>> listToMaybe []
Nothing
>>> listToMaybe [9]
Just 9
>>> listToMaybe [1,2,3]
Just 1

Composing maybeToList with listToMaybe should be the identity on singleton/empty lists:

>>> maybeToList $ listToMaybe [5]
[5]
>>> maybeToList $ listToMaybe []
[]

But not on lists with more than one element:

>>> maybeToList $ listToMaybe [1,2,3]
[1]

tail :: IsSequence seq => NonNull seq -> seq #

Safe version of tailEx, only working on non-nullable sequences.

last :: MonoFoldable mono => NonNull mono -> Element mono #

Return the last element of a monomorphic container.

Safe version of lastEx, only works on monomorphic containers wrapped in a NonNull.

init :: IsSequence seq => NonNull seq -> seq #

Safe version of initEx, only working on non-nullable sequences.

sum :: (MonoFoldable mono, Num (Element mono)) => mono -> Element mono #

Synonym for osum

Since: mono-traversable-1.0.0

product :: (MonoFoldable mono, Num (Element mono)) => mono -> Element mono #

Synonym for oproduct

Since: mono-traversable-1.0.0

maximum :: (MonoFoldable mono, Ord (Element mono)) => NonNull mono -> Element mono #

Get the maximum element of a monomorphic container.

Safe version of maximumEx, only works on monomorphic containers wrapped in a NonNull.

Examples

Expand
> let xs = ncons 1 [2, 3 :: Int]
> maximum xs
3

minimum :: (MonoFoldable mono, Ord (Element mono)) => NonNull mono -> Element mono #

Get the minimum element of a monomorphic container.

Safe version of minimumEx, only works on monomorphic containers wrapped in a NonNull.

Examples

Expand
> let xs = ncons 1 [2, 3 :: Int]
> minimum xs
1

repeat :: a -> [a] #

repeat x is an infinite list, with x the value of every element.

>>> repeat 17
[17,17,17,17,17,17,17,17,17...

and :: (MonoFoldable mono, Element mono ~ Bool) => mono -> Bool #

Synonym for oand

Since: mono-traversable-1.0.0

or :: (MonoFoldable mono, Element mono ~ Bool) => mono -> Bool #

Synonym for oor

Since: mono-traversable-1.0.0

any :: MonoFoldable mono => (Element mono -> Bool) -> mono -> Bool #

Synonym for oany

Since: mono-traversable-1.0.0

all :: MonoFoldable mono => (Element mono -> Bool) -> mono -> Bool #

Synonym for oall

Since: mono-traversable-1.0.0

elem :: (MonoFoldable mono, Eq (Element mono)) => Element mono -> mono -> Bool #

Synonym for oelem

Since: mono-traversable-1.0.0

notElem :: (MonoFoldable mono, Eq (Element mono)) => Element mono -> mono -> Bool #

Synonym for onotElem

Since: mono-traversable-1.0.0

concatMap :: (MonoFoldable mono, Monoid m) => (Element mono -> m) -> mono -> m #

Synonym for oconcatMap

Since: mono-traversable-1.0.0

zip3 :: Zip3 f => f a -> f b -> f c -> f (a, b, c) #

zipWith3 :: Zip3 f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d #

unzip3 :: Zip3 f => f (a, b, c) -> (f a, f b, f c) #

odd :: Integral a => a -> Bool #

(^^) :: (Fractional a, Integral b) => a -> b -> a infixr 8 #

raise a number to an integral power

curry :: ((a, b) -> c) -> a -> b -> c #

curry converts an uncurried function to a curried function.

Examples

Expand
>>> curry fst 1 2
1

newEmptyMVar :: MonadIO m => m (MVar a) #

Lifted newEmptyMVar.

Since: unliftio-0.1.0.0

newMVar :: MonadIO m => a -> m (MVar a) #

Lifted newMVar.

Since: unliftio-0.1.0.0

takeMVar :: MonadIO m => MVar a -> m a #

Lifted takeMVar.

Since: unliftio-0.1.0.0

readMVar :: MonadIO m => MVar a -> m a #

Lifted readMVar.

Since: unliftio-0.1.0.0

putMVar :: MonadIO m => MVar a -> a -> m () #

Lifted putMVar.

Since: unliftio-0.1.0.0

tryTakeMVar :: MonadIO m => MVar a -> m (Maybe a) #

Lifted tryTakeMVar.

Since: unliftio-0.1.0.0

tryPutMVar :: MonadIO m => MVar a -> a -> m Bool #

Lifted tryPutMVar.

Since: unliftio-0.1.0.0

tryReadMVar :: MonadIO m => MVar a -> m (Maybe a) #

Lifted tryReadMVar.

Since: unliftio-0.1.0.0

isEmptyMVar :: MonadIO m => MVar a -> m Bool #

Lifted isEmptyMVar.

Since: unliftio-0.1.0.0

(<&>) :: Functor f => f a -> (a -> b) -> f b infixl 1 #

Flipped version of <$>.

(<&>) = flip fmap

Examples

Expand

Apply (+1) to a list, a Just and a Right:

>>> Just 2 <&> (+1)
Just 3
>>> [1,2,3] <&> (+1)
[2,3,4]
>>> Right 3 <&> (+1)
Right 4

Since: base-4.11.0.0

on :: (b -> b -> c) -> (a -> b) -> a -> a -> c infixl 0 #

on b u x y runs the binary function b on the results of applying unary function u to two arguments x and y. From the opposite perspective, it transforms two inputs and combines the outputs.

((+) `on` f) x y = f x + f y

Typical usage: sortBy (compare `on` fst).

Algebraic properties:

  • (*) `on` id = (*) -- (if (*) ∉ {⊥, const ⊥})
  • ((*) `on` f) `on` g = (*) `on` (f . g)
  • flip on f . flip on g = flip on (g . f)

optional :: Alternative f => f a -> f (Maybe a) #

One or none.

It is useful for modelling any computation that is allowed to fail.

Examples

Expand

Using the Alternative instance of Control.Monad.Except, the following functions:

>>> import Control.Monad.Except
>>> canFail = throwError "it failed" :: Except String Int
>>> final = return 42                :: Except String Int

Can be combined by allowing the first function to fail:

>>> runExcept $ canFail *> final
Left "it failed"
>>> runExcept $ optional canFail *> final
Right 42

lefts :: [Either a b] -> [a] #

Extracts from a list of Either all the Left elements. All the Left elements are extracted in order.

Examples

Expand

Basic usage:

>>> let list = [ Left "foo", Right 3, Left "bar", Right 7, Left "baz" ]
>>> lefts list
["foo","bar","baz"]

rights :: [Either a b] -> [b] #

Extracts from a list of Either all the Right elements. All the Right elements are extracted in order.

Examples

Expand

Basic usage:

>>> let list = [ Left "foo", Right 3, Left "bar", Right 7, Left "baz" ]
>>> rights list
[3,7]

partitionEithers :: [Either a b] -> ([a], [b]) #

Partitions a list of Either into two lists. All the Left elements are extracted, in order, to the first component of the output. Similarly the Right elements are extracted to the second component of the output.

Examples

Expand

Basic usage:

>>> let list = [ Left "foo", Right 3, Left "bar", Right 7, Left "baz" ]
>>> partitionEithers list
(["foo","bar","baz"],[3,7])

The pair returned by partitionEithers x should be the same pair as (lefts x, rights x):

>>> let list = [ Left "foo", Right 3, Left "bar", Right 7, Left "baz" ]
>>> partitionEithers list == (lefts list, rights list)
True

comparing :: Ord a => (b -> a) -> b -> b -> Ordering #

comparing p x y = compare (p x) (p y)

Useful combinator for use in conjunction with the xxxBy family of functions from Data.List, for example:

  ... sortBy (comparing fst) ...

getMonotonicTime :: MonadIO m => m Double #

Get the number of seconds which have passed since an arbitrary starting time, useful for calculating runtime in a program.

Since: unliftio-0.2.3.0

fold :: (MonoFoldable mono, Monoid (Element mono)) => mono -> Element mono #

Synonym for ofold

Since: mono-traversable-1.0.0

foldMap :: (MonoFoldable mono, Monoid m) => (Element mono -> m) -> mono -> m #

Synonym for ofoldMap

Since: mono-traversable-1.0.0

foldlM :: (MonoFoldable mono, Monad m) => (a -> Element mono -> m a) -> a -> mono -> m a #

Synonym for ofoldlM

Since: mono-traversable-1.0.0

traverse_ :: (MonoFoldable mono, Applicative f) => (Element mono -> f b) -> mono -> f () #

Synonym for otraverse_

Since: mono-traversable-1.0.0

for_ :: (MonoFoldable mono, Applicative f) => mono -> (Element mono -> f b) -> f () #

Synonym for ofor_

Since: mono-traversable-1.0.0

sequence_ :: (Applicative m, MonoFoldable mono, Element mono ~ m ()) => mono -> m () #

Synonym for osequence_

Since: mono-traversable-1.0.0

asum :: (Foldable t, Alternative f) => t (f a) -> f a #

The sum of a collection of actions using (<|>), generalizing concat.

asum is just like msum, but generalised to Alternative.

Examples

Expand

Basic usage:

>>> asum [Just "Hello", Nothing, Just "World"]
Just "Hello"

stripPrefix :: (IsSequence seq, Eq (Element seq)) => seq -> seq -> Maybe seq #

stripPrefix drops the given prefix from a sequence. It returns Nothing if the sequence did not start with the prefix given, or Just the sequence after the prefix, if it does.

> stripPrefix "foo" "foobar"
Just "bar"
> stripPrefix "abc" "foobar"
Nothing

isPrefixOf :: (IsSequence seq, Eq (Element seq)) => seq -> seq -> Bool #

isPrefixOf takes two sequences and returns True if the first sequence is a prefix of the second.

isSuffixOf :: (IsSequence seq, Eq (Element seq)) => seq -> seq -> Bool #

isSuffixOf takes two sequences and returns True if the first sequence is a suffix of the second.

isInfixOf :: (IsSequence seq, Eq (Element seq)) => seq -> seq -> Bool #

isInfixOf takes two sequences and returns true if the first sequence is contained, wholly and intact, anywhere within the second.

(\\) :: SetContainer a => a -> a -> a infixl 9 #

An alias for difference.

intersect :: SetContainer a => a -> a -> a #

An alias for intersection.

intercalate :: (MonoFoldable mono, Monoid (Element mono)) => Element mono -> mono -> Element mono #

Synonym for ointercalate

Since: mono-traversable-1.0.0

insertBy :: forall record backend (m :: Type -> Type). (MonadIO m, PersistUniqueWrite backend, PersistRecordBackend record backend, AtLeastOneUniqueKey record, SafeToInsert record) => record -> ReaderT backend m (Either (Entity record) (Key record)) #

Insert a value, checking for conflicts with any unique constraints. If a duplicate exists in the database, it is returned as Left. Otherwise, the new 'Key is returned as Right.

Example usage

Expand

With schema-2 and dataset-1, we have following lines of code:

l1 <- insertBy $ User "SPJ" 20
l2 <- insertBy $ User "XXX" 41
l3 <- insertBy $ User "SPJ" 40
r1 <- insertBy $ User "XXX" 100

First three lines return Left because there're duplicates in given record's uniqueness constraints. While the last line returns a new key as Right.

zip4 :: Zip4 f => f a -> f b -> f c -> f d -> f (a, b, c, d) #

zipWith4 :: Zip4 f => (a -> b -> c -> d -> e) -> f a -> f b -> f c -> f d -> f e #

unzip4 :: Zip4 f => f (a, b, c, d) -> (f a, f b, f c, f d) #

zip5 :: Zip5 f => f a -> f b -> f c -> f d -> f e -> f (a, b, c, d, e) #

zipWith5 :: Zip5 f => (a -> b -> c -> d -> e -> g) -> f a -> f b -> f c -> f d -> f e -> f g #

unzip5 :: Zip5 f => f (a, b, c, d, e) -> (f a, f b, f c, f d, f e) #

zip6 :: Zip6 f => f a -> f b -> f c -> f d -> f e -> f g -> f (a, b, c, d, e, g) #

zipWith6 :: Zip6 f => (a -> b -> c -> d -> e -> g -> h) -> f a -> f b -> f c -> f d -> f e -> f g -> f h #

unzip6 :: Zip6 f => f (a, b, c, d, e, g) -> (f a, f b, f c, f d, f e, f g) #

zip7 :: Zip7 f => f a -> f b -> f c -> f d -> f e -> f g -> f h -> f (a, b, c, d, e, g, h) #

zipWith7 :: Zip7 f => (a -> b -> c -> d -> e -> g -> h -> i) -> f a -> f b -> f c -> f d -> f e -> f g -> f h -> f i #

unzip7 :: Zip7 f => f (a, b, c, d, e, g, h) -> (f a, f b, f c, f d, f e, f g, f h) #

userError :: String -> IOError #

Construct an IOException value with a string describing the error. The fail method of the IO instance of the Monad class raises a userError, thus:

instance Monad IO where
  ...
  fail s = ioError (userError s)

catchAny :: MonadUnliftIO m => m a -> (SomeException -> m a) -> m a #

catch specialized to catch all synchronous exceptions.

Since: unliftio-0.1.0.0

onException :: MonadUnliftIO m => m a -> m b -> m a #

Like finally, but only call after if an exception occurs.

Since: unliftio-0.1.0.0

mask_ :: MonadUnliftIO m => m a -> m a #

Unlifted version of mask_.

Since: unliftio-0.1.0.0

uninterruptibleMask_ :: MonadUnliftIO m => m a -> m a #

Unlifted version of uninterruptibleMask_.

Since: unliftio-0.1.0.0

uninterruptibleMask :: MonadUnliftIO m => ((forall a. m a -> m a) -> m b) -> m b #

Unlifted version of uninterruptibleMask.

Since: unliftio-0.1.0.0

newIORef :: MonadIO m => a -> m (IORef a) #

Lifted newIORef.

Since: unliftio-0.1.0.0

readIORef :: MonadIO m => IORef a -> m a #

Lifted readIORef.

Since: unliftio-0.1.0.0

writeIORef :: MonadIO m => IORef a -> a -> m () #

Lifted writeIORef.

Since: unliftio-0.1.0.0

mkWeakIORef :: MonadUnliftIO m => IORef a -> m () -> m (Weak (IORef a)) #

Unlifted mkWeakIORef.

Since: unliftio-0.1.0.0

modifyIORef :: MonadIO m => IORef a -> (a -> a) -> m () #

Lifted modifyIORef.

Since: unliftio-0.1.0.0

modifyIORef' :: MonadIO m => IORef a -> (a -> a) -> m () #

Lifted modifyIORef'.

Since: unliftio-0.1.0.0

asyncExceptionToException :: Exception e => e -> SomeException #

Since: base-4.7.0.0

ioError :: IOError -> IO a #

Raise an IOException in the IO monad.

yield #

Arguments

:: forall (m :: Type -> Type) o i. Monad m 
=> o

output value

-> ConduitT i o m () 

Send a value downstream to the next component to consume. If the downstream component terminates, this call will never return control.

Since 0.5.0

orElse :: STM a -> STM a -> STM a #

Compose two alternative STM actions (GHC only).

If the first action completes without retrying then it forms the result of the orElse. Otherwise, if the first action retries, then the second action is tried in its place. If both actions retry then the orElse as a whole retries.

newTVar :: a -> STM (TVar a) #

Create a new TVar holding a value supplied

newTVarIO :: MonadIO m => a -> m (TVar a) #

Lifted version of newTVarIO

Since: unliftio-0.2.1.0

readTVarIO :: MonadIO m => TVar a -> m a #

Lifted version of readTVarIO

Since: unliftio-0.2.1.0

readTVar :: TVar a -> STM a #

Return the current value stored in a TVar.

writeTVar :: TVar a -> a -> STM () #

Write the supplied value into a TVar.

withMVar :: MonadUnliftIO m => MVar a -> (a -> m b) -> m b #

Unlifted withMVar.

Since: unliftio-0.1.0.0

modifyMVar_ :: MonadUnliftIO m => MVar a -> (a -> m a) -> m () #

Unlifted modifyMVar_.

Since: unliftio-0.1.0.0

catchJust :: (MonadUnliftIO m, Exception e) => (e -> Maybe b) -> m a -> (b -> m a) -> m a #

catchJust is like catch but it takes an extra argument which is an exception predicate, a function which selects which type of exceptions we're interested in.

Since: unliftio-0.1.0.0

handleJust :: (MonadUnliftIO m, Exception e) => (e -> Maybe b) -> (b -> m a) -> m a -> m a #

Flipped catchJust.

Since: unliftio-0.1.0.0

tryJust :: (MonadUnliftIO m, Exception e) => (e -> Maybe b) -> m a -> m (Either b a) #

A variant of try that takes an exception predicate to select which exceptions are caught.

Since: unliftio-0.1.0.0

bracketOnError :: MonadUnliftIO m => m a -> (a -> m b) -> (a -> m c) -> m c #

Same as bracket, but only perform the cleanup if an exception is thrown.

Since: unliftio-0.1.0.0

catches :: MonadUnliftIO m => m a -> [Handler m a] -> m a #

Similar to catch, but provides multiple different handler functions.

For more information on motivation, see base's catches. Note that, unlike that function, this function will not catch asynchronous exceptions.

Since: unliftio-0.1.0.0

swapMVar :: MonadIO m => MVar a -> a -> m a #

Lifted swapMVar.

Since: unliftio-0.1.0.0

withMVarMasked :: MonadUnliftIO m => MVar a -> (a -> m b) -> m b #

Unlifted withMVarMasked.

Since: unliftio-0.1.0.0

modifyMVar :: MonadUnliftIO m => MVar a -> (a -> m (a, b)) -> m b #

Unlifted modifyMVar.

Since: unliftio-0.1.0.0

modifyMVarMasked_ :: MonadUnliftIO m => MVar a -> (a -> m a) -> m () #

Unlifted modifyMVarMasked_.

Since: unliftio-0.1.0.0

modifyMVarMasked :: MonadUnliftIO m => MVar a -> (a -> m (a, b)) -> m b #

Unlifted modifyMVarMasked.

Since: unliftio-0.1.0.0

mkWeakMVar :: MonadUnliftIO m => MVar a -> m () -> m (Weak (MVar a)) #

Unlifted mkWeakMVar.

Since: unliftio-0.1.0.0

tryIOError :: IO a -> IO (Either IOError a) #

The construct tryIOError comp exposes IO errors which occur within a computation, and which are not fully handled.

Non-I/O exceptions are not caught by this variant; to catch all exceptions, use try from Control.Exception.

Since: base-4.4.0.0

mkIOError :: IOErrorType -> String -> Maybe Handle -> Maybe FilePath -> IOError #

Construct an IOException of the given type where the second argument describes the error location and the third and fourth argument contain the file handle and file path of the file involved in the error if applicable.

isAlreadyExistsError :: IOError -> Bool #

An error indicating that an IO operation failed because one of its arguments already exists.

isUserError :: IOError -> Bool #

A programmer-defined error value constructed using userError.

isResourceVanishedError :: IOError -> Bool #

An error indicating that the operation failed because the resource vanished. See resourceVanishedErrorType.

Since: base-4.14.0.0

alreadyExistsErrorType :: IOErrorType #

I/O error where the operation failed because one of its arguments already exists.

doesNotExistErrorType :: IOErrorType #

I/O error where the operation failed because one of its arguments does not exist.

alreadyInUseErrorType :: IOErrorType #

I/O error where the operation failed because one of its arguments is a single-use resource, which is already being used.

fullErrorType :: IOErrorType #

I/O error where the operation failed because the device is full.

eofErrorType :: IOErrorType #

I/O error where the operation failed because the end of file has been reached.

illegalOperationErrorType :: IOErrorType #

I/O error where the operation is not possible.

permissionErrorType :: IOErrorType #

I/O error where the operation failed because the user does not have sufficient operating system privilege to perform that operation.

userErrorType :: IOErrorType #

I/O error that is programmer-defined.

resourceVanishedErrorType :: IOErrorType #

I/O error where the operation failed because the resource vanished. This happens when, for example, attempting to write to a closed socket or attempting to write to a named pipe that was deleted.

Since: base-4.14.0.0

isAlreadyExistsErrorType :: IOErrorType -> Bool #

I/O error where the operation failed because one of its arguments already exists.

isDoesNotExistErrorType :: IOErrorType -> Bool #

I/O error where the operation failed because one of its arguments does not exist.

isAlreadyInUseErrorType :: IOErrorType -> Bool #

I/O error where the operation failed because one of its arguments is a single-use resource, which is already being used.

isFullErrorType :: IOErrorType -> Bool #

I/O error where the operation failed because the device is full.

isEOFErrorType :: IOErrorType -> Bool #

I/O error where the operation failed because the end of file has been reached.

isIllegalOperationErrorType :: IOErrorType -> Bool #

I/O error where the operation is not possible.

isPermissionErrorType :: IOErrorType -> Bool #

I/O error where the operation failed because the user does not have sufficient operating system privilege to perform that operation.

isUserErrorType :: IOErrorType -> Bool #

I/O error that is programmer-defined.

isResourceVanishedErrorType :: IOErrorType -> Bool #

I/O error where the operation failed because the resource vanished. See resourceVanishedErrorType.

Since: base-4.14.0.0

modifyIOError :: (IOError -> IOError) -> IO a -> IO a #

Catch any IOException that occurs in the computation and throw a modified version.

annotateIOError :: IOError -> String -> Maybe Handle -> Maybe FilePath -> IOError #

Adds a location description and maybe a file path and file handle to an IOException. If any of the file handle or file path is not given the corresponding value in the IOException remains unaltered.

registerDelay :: MonadIO m => Int -> m (TVar Bool) #

Lifted version of registerDelay

Since: unliftio-0.2.1.0

withFile :: MonadUnliftIO m => FilePath -> IOMode -> (Handle -> m a) -> m a #

Unlifted version of withFile.

Since: unliftio-0.1.0.0

withBinaryFile :: MonadUnliftIO m => FilePath -> IOMode -> (Handle -> m a) -> m a #

Unlifted version of withBinaryFile.

Since: unliftio-0.1.0.0

hFileSize :: MonadIO m => Handle -> m Integer #

Lifted version of hFileSize

Since: unliftio-0.2.1.0

hSetFileSize :: MonadIO m => Handle -> Integer -> m () #

Lifted version of hSetFileSize

Since: unliftio-0.2.1.0

hIsEOF :: MonadIO m => Handle -> m Bool #

Lifted version of hIsEOF

Since: unliftio-0.2.1.0

hSetBuffering :: MonadIO m => Handle -> BufferMode -> m () #

Lifted version of hSetBuffering

Since: unliftio-0.2.1.0

hTell :: MonadIO m => Handle -> m Integer #

Lifted version of hTell

Since: unliftio-0.2.1.0

hIsOpen :: MonadIO m => Handle -> m Bool #

Lifted version of hIsOpen

Since: unliftio-0.2.1.0

hIsClosed :: MonadIO m => Handle -> m Bool #

Lifted version of hIsClosed

Since: unliftio-0.2.1.0

hIsReadable :: MonadIO m => Handle -> m Bool #

Lifted version of hIsReadable

Since: unliftio-0.2.1.0

hIsWritable :: MonadIO m => Handle -> m Bool #

Lifted version of hIsWritable

Since: unliftio-0.2.1.0

hGetBuffering :: MonadIO m => Handle -> m BufferMode #

Lifted version of hGetBuffering

Since: unliftio-0.2.1.0

hIsSeekable :: MonadIO m => Handle -> m Bool #

Lifted version of hIsSeekable

Since: unliftio-0.2.1.0

hSetEcho :: MonadIO m => Handle -> Bool -> m () #

Lifted version of hSetEcho

Since: unliftio-0.2.1.0

hGetEcho :: MonadIO m => Handle -> m Bool #

Lifted version of hGetEcho

Since: unliftio-0.2.1.0

putChar :: MonadIO m => Char -> m () #

Write a character to stdout

Uses system locale settings

Since: classy-prelude-1.3.1

putStr :: MonadIO m => Text -> m () #

Write a Text to stdout

Uses system locale settings

Since: classy-prelude-1.3.1

getChar :: MonadIO m => m Char #

Read a character from stdin

Uses system locale settings

Since: classy-prelude-1.3.1

getContents :: MonadIO m => m LText #

Read all input from stdin into a lazy Text (LText)

Uses system locale settings

Since: classy-prelude-1.3.1

interact :: MonadIO m => (LText -> LText) -> m () #

Takes a function of type 'LText -> LText' and passes all input on stdin to it, then prints result to stdout

Uses lazy IO Uses system locale settings

Since: classy-prelude-1.3.1

readFile :: MonadIO m => FilePath -> m ByteString #

Strictly read a file into a ByteString.

Since: classy-prelude-1.2.0

hReady :: MonadIO m => Handle -> m Bool #

Lifted version of hReady

Since: unliftio-0.2.1.0

(>=>) :: Monad m => (a -> m b) -> (b -> m c) -> a -> m c infixr 1 #

Left-to-right composition of Kleisli arrows.

'(bs >=> cs) a' can be understood as the do expression

do b <- bs a
   cs b

(<=<) :: Monad m => (b -> m c) -> (a -> m b) -> a -> m c infixr 1 #

Right-to-left composition of Kleisli arrows. (>=>), with the arguments flipped.

Note how this operator resembles function composition (.):

(.)   ::            (b ->   c) -> (a ->   b) -> a ->   c
(<=<) :: Monad m => (b -> m c) -> (a -> m b) -> a -> m c

foldM :: (MonoFoldable mono, Monad m) => (a -> Element mono -> m a) -> a -> mono -> m a #

Synonym for ofoldM

Since: mono-traversable-1.0.0

replicateM_ :: Applicative m => Int -> m a -> m () #

Like replicateM, but discards the result.

Examples

Expand
>>> replicateM_ 3 (putStrLn "a")
a
a
a

traceShowM :: (Show a, Monad m) => a -> m () #

Since 0.5.9

traceM :: Monad m => String -> m () #

Since 0.5.9

traceShowId :: Show a => a -> a #

Since 0.5.9

traceShow :: Show a => a -> b -> b #

traceId :: String -> String #

Since 0.5.9

sourceFile :: forall (m :: Type -> Type) i. MonadResource m => FilePath -> ConduitT i ByteString m () #

Stream the contents of a file as binary data.

Since: conduit-1.3.0

(<|) :: SemiSequence seq => Element seq -> NonNull seq -> NonNull seq infixr 5 #

Prepend an element to a non-null SemiSequence.

sortWith :: (Ord a, IsSequence c) => (Element c -> a) -> c -> c #

Sort elements using the user supplied function to project something out of each element. Inspired by http://hackage.haskell.org/packages/archive/base/latest/doc/html/GHC-Exts.html#v:sortWith.

newQSemN :: MonadIO m => Int -> m QSemN #

Lifted newQSemN.

Since: unliftio-0.2.14

waitQSemN :: MonadIO m => QSemN -> Int -> m () #

Lifted waitQSemN.

Since: unliftio-0.2.14

signalQSemN :: MonadIO m => QSemN -> Int -> m () #

Lifted signalQSemN.

Since: unliftio-0.2.14

newQSem :: MonadIO m => Int -> m QSem #

Lifted newQSem.

Since: unliftio-0.2.14

waitQSem :: MonadIO m => QSem -> m () #

Lifted waitQSem.

Since: unliftio-0.2.14

signalQSem :: MonadIO m => QSem -> m () #

Lifted signalQSem.

Since: unliftio-0.2.14

newChan :: MonadIO m => m (Chan a) #

Lifted newChan.

Since: unliftio-0.1.0.0

writeChan :: MonadIO m => Chan a -> a -> m () #

Lifted writeChan.

Since: unliftio-0.1.0.0

readChan :: MonadIO m => Chan a -> m a #

Lifted readChan.

Since: unliftio-0.1.0.0

dupChan :: MonadIO m => Chan a -> m (Chan a) #

Lifted dupChan.

Since: unliftio-0.1.0.0

getChanContents :: MonadIO m => Chan a -> m [a] #

Lifted getChanContents.

Since: unliftio-0.1.0.0

writeList2Chan :: MonadIO m => Chan a -> [a] -> m () #

Lifted writeList2Chan.

Since: unliftio-0.1.0.0

timeout :: MonadUnliftIO m => Int -> m a -> m (Maybe a) #

Unlifted timeout.

Since: unliftio-0.1.0.0

toNonEmpty :: MonoFoldable mono => NonNull mono -> NonEmpty (Element mono) #

Safely convert from a NonNull container to a NonEmpty list.

Since: mono-traversable-1.0.15.0

force :: NFData a => a -> a #

a variant of deepseq that is useful in some circumstances:

force x = x `deepseq` x

force x fully evaluates x, and then returns it. Note that force x only performs evaluation when the value of force x itself is demanded, so essentially it turns shallow evaluation into deep evaluation.

force can be conveniently used in combination with ViewPatterns:

{-# LANGUAGE BangPatterns, ViewPatterns #-}
import Control.DeepSeq

someFun :: ComplexData -> SomeResult
someFun (force -> !arg) = {- 'arg' will be fully evaluated -}

Another useful application is to combine force with evaluate in order to force deep evaluation relative to other IO operations:

import Control.Exception (evaluate)
import Control.DeepSeq

main = do
  result <- evaluate $ force $ pureComputation
  {- 'result' will be fully evaluated at this point -}
  return ()

Finally, here's an exception safe variant of the readFile' example:

readFile' :: FilePath -> IO String
readFile' fn = bracket (openFile fn ReadMode) hClose $ \h ->
                       evaluate . force =<< hGetContents h

Since: deepseq-1.2.0.0

stripSuffix :: (IsSequence seq, Eq (Element seq)) => seq -> seq -> Maybe seq #

stripSuffix drops the given suffix from a sequence. It returns Nothing if the sequence did not end with the suffix given, or Just the sequence before the suffix, if it does.

> stripSuffix "bar" "foobar"
Just "foo"
> stripSuffix "abc" "foobar"
Nothing

(<.>) :: FilePath -> String -> FilePath infixr 7 #

Add an extension, even if there is already one there, equivalent to addExtension.

"/directory/path" <.> "ext" == "/directory/path.ext"
"/directory/path" <.> ".ext" == "/directory/path.ext"

(</>) :: FilePath -> FilePath -> FilePath infixr 5 #

Combine two paths with a path separator. If the second path starts with a path separator or a drive letter, then it returns the second. The intention is that readFile (dir </> file) will access the same file as setCurrentDirectory dir; readFile file.

Posix:   "/directory" </> "file.ext" == "/directory/file.ext"
Windows: "/directory" </> "file.ext" == "/directory\\file.ext"
         "directory" </> "/file.ext" == "/file.ext"
Valid x => (takeDirectory x </> takeFileName x) `equalFilePath` x

Combined:

Posix:   "/" </> "test" == "/test"
Posix:   "home" </> "bob" == "home/bob"
Posix:   "x:" </> "foo" == "x:/foo"
Windows: "C:\\foo" </> "bar" == "C:\\foo\\bar"
Windows: "home" </> "bob" == "home\\bob"

Not combined:

Posix:   "home" </> "/bob" == "/bob"
Windows: "home" </> "C:\\bob" == "C:\\bob"

Not combined (tricky):

On Windows, if a filepath starts with a single slash, it is relative to the root of the current drive. In [1], this is (confusingly) referred to as an absolute path. The current behavior of </> is to never combine these forms.

Windows: "home" </> "/bob" == "/bob"
Windows: "home" </> "\\bob" == "\\bob"
Windows: "C:\\home" </> "\\bob" == "\\bob"

On Windows, from [1]: "If a file name begins with only a disk designator but not the backslash after the colon, it is interpreted as a relative path to the current directory on the drive with the specified letter." The current behavior of </> is to never combine these forms.

Windows: "D:\\foo" </> "C:bar" == "C:bar"
Windows: "C:\\foo" </> "C:bar" == "C:bar"

equating :: Eq a => (b -> a) -> b -> b -> Bool #

terror :: HasCallStack => Text -> a #

error applied to Text

Since 0.4.1

tshow :: Show a => a -> Text #

readMay :: (Element c ~ Char, MonoFoldable c, Read a) => c -> Maybe a #

toHtml :: ToMarkup a => a -> Html #

embed :: FilePath -> Q Exp #

Produce a Static based on embedding all of the static files' contents in the executable at compile time.

You should use Yesod.EmbeddedStatic instead, it is much more powerful.

Nota Bene: if you replace the scaffolded static call in Settings/StaticFiles.hs you will need to change the scaffolded addStaticContent. Otherwise, some of your assets will be 404'ed. This is because by default yesod will generate compile those assets to static/tmp which for static is fine since they are served out of the directory itself. With embedded static, that will not work. You can easily change addStaticContent to _ _ _ -> return Nothing as a workaround. This will cause yesod to embed those assets into the generated HTML file itself.

preEscapedToMarkup :: ToMarkup a => a -> Markup #

Convert a value to Markup without escaping

hPut :: MonadIO m => Handle -> ByteString -> m () #

Write a ByteString to the given Handle.

Since: classy-prelude-1.2.0

pack :: IsSequence seq => [Element seq] -> seq #

Synonym for fromList

Since: mono-traversable-1.0.0

unpack :: MonoFoldable mono => mono -> [Element mono] #

Synonym for otoList

Since: mono-traversable-1.0.0

compareLength :: (MonoFoldable mono, Integral i) => mono -> i -> Ordering #

Synonym for ocompareLength

Since: mono-traversable-1.0.0

textToBuilder :: ToBuilder Text builder => Text -> builder #

Provided for type disambiguation in the presence of OverloadedStrings.

Since 0.1.0.0

hGetChunk :: MonadIO m => Handle -> m ByteString #

Read a single chunk of data as a ByteString from the given Handle.

Under the surface, this uses hGetSome with the default chunk size.

Since: classy-prelude-1.2.0

($!!) :: NFData a => (a -> b) -> a -> b infixr 0 #

the deep analogue of $!. In the expression f $!! x, x is fully evaluated before the function f is applied to it.

Since: deepseq-1.2.0.0

asks #

Arguments

:: MonadReader r m 
=> (r -> a)

The selector function to apply to the environment.

-> m a 

Retrieves a function of the current environment.

primToPrim :: (PrimBase m1, PrimMonad m2, PrimState m1 ~ PrimState m2) => m1 a -> m2 a #

Convert a PrimBase to another monad with the same state token.

primToIO :: (PrimBase m, PrimState m ~ RealWorld) => m a -> IO a #

Convert a PrimBase with a RealWorld state token to IO

primToST :: PrimBase m => m a -> ST (PrimState m) a #

Convert a PrimBase to ST

toGregorian :: Day -> (Year, MonthOfYear, DayOfMonth) #

Convert to proleptic Gregorian calendar.

fromGregorian :: Year -> MonthOfYear -> DayOfMonth -> Day #

Convert from proleptic Gregorian calendar. Invalid values will be clipped to the correct range, month first, then day.

defaultTimeLocale :: TimeLocale #

Locale representing American usage.

knownTimeZones contains only the ten time-zones mentioned in RFC 822 sec. 5: "UT", "GMT", "EST", "EDT", "CST", "CDT", "MST", "MDT", "PST", "PDT". Note that the parsing functions will regardless parse "UTC", single-letter military time-zones, and +HHMM format.

formatTime :: FormatTime t => TimeLocale -> String -> t -> String #

Substitute various time-related information for each %-code in the string, as per formatCharacter.

The general form is %<modifier><width><alternate><specifier>, where <modifier>, <width>, and <alternate> are optional.

<modifier>

glibc-style modifiers can be used before the specifier (here marked as z):

%-z
no padding
%_z
pad with spaces
%0z
pad with zeros
%^z
convert to upper case
%#z
convert to lower case (consistently, unlike glibc)

<width>

Width digits can also be used after any modifiers and before the specifier (here marked as z), for example:

%4z
pad to 4 characters (with default padding character)
%_12z
pad with spaces to 12 characters

<alternate>

An optional E character indicates an alternate formatting. Currently this only affects %Z and %z.

%Ez
alternate formatting

<specifier>

For all types (note these three are done by formatTime, not by formatCharacter):

%%
%
%t
tab
%n
newline

TimeZone

For TimeZone (and ZonedTime and UTCTime):

%z
timezone offset in the format ±HHMM
%Ez
timezone offset in the format ±HH:MM
%Z
timezone name (or else offset in the format ±HHMM)
%EZ
timezone name (or else offset in the format ±HH:MM)

LocalTime

For LocalTime (and ZonedTime and UTCTime and UniversalTime):

%c
as dateTimeFmt locale (e.g. %a %b %e %H:%M:%S %Z %Y)

TimeOfDay

For TimeOfDay (and LocalTime and ZonedTime and UTCTime and UniversalTime):

%R
same as %H:%M
%T
same as %H:%M:%S
%X
as timeFmt locale (e.g. %H:%M:%S)
%r
as time12Fmt locale (e.g. %I:%M:%S %p)
%P
day-half of day from (amPm locale), converted to lowercase, am, pm
%p
day-half of day from (amPm locale), AM, PM
%H
hour of day (24-hour), 0-padded to two chars, 00 - 23
%k
hour of day (24-hour), space-padded to two chars, 0 - 23
%I
hour of day-half (12-hour), 0-padded to two chars, 01 - 12
%l
hour of day-half (12-hour), space-padded to two chars, 1 - 12
%M
minute of hour, 0-padded to two chars, 00 - 59
%S
second of minute (without decimal part), 0-padded to two chars, 00 - 60
%q
picosecond of second, 0-padded to twelve chars, 000000000000 - 999999999999.
%Q
decimal point and fraction of second, up to 12 second decimals, without trailing zeros. For a whole number of seconds, %Q omits the decimal point unless padding is specified.

UTCTime and ZonedTime

For UTCTime and ZonedTime:

%s
number of whole seconds since the Unix epoch. For times before the Unix epoch, this is a negative number. Note that in %s.%q and %s%Q the decimals are positive, not negative. For example, 0.9 seconds before the Unix epoch is formatted as -1.1 with %s%Q.

DayOfWeek

For DayOfWeek (and Day and LocalTime and ZonedTime and UTCTime and UniversalTime):

%u
day of week number for Week Date format, 1 (= Monday) - 7 (= Sunday)
%w
day of week number, 0 (= Sunday) - 6 (= Saturday)
%a
day of week, short form (snd from wDays locale), Sun - Sat
%A
day of week, long form (fst from wDays locale), Sunday - Saturday

Month

For Month (and Day and LocalTime and ZonedTime and UTCTime and UniversalTime):

%Y
year, no padding. Note %0Y and %_Y pad to four chars
%y
year of century, 0-padded to two chars, 00 - 99
%C
century, no padding. Note %0C and %_C pad to two chars
%B
month name, long form (fst from months locale), January - December
%b, %h
month name, short form (snd from months locale), Jan - Dec
%m
month of year, 0-padded to two chars, 01 - 12

Day

For Day (and LocalTime and ZonedTime and UTCTime and UniversalTime):

%D
same as %m/%d/%y
%F
same as %Y-%m-%d
%x
as dateFmt locale (e.g. %m/%d/%y)
%d
day of month, 0-padded to two chars, 01 - 31
%e
day of month, space-padded to two chars, 1 - 31
%j
day of year, 0-padded to three chars, 001 - 366
%f
century for Week Date format, no padding. Note %0f and %_f pad to two chars
%V
week of year for Week Date format, 0-padded to two chars, 01 - 53
%U
week of year where weeks start on Sunday (as sundayStartWeek), 0-padded to two chars, 00 - 53
%W
week of year where weeks start on Monday (as mondayStartWeek), 0-padded to two chars, 00 - 53

Duration types

The specifiers for DiffTime, NominalDiffTime, CalendarDiffDays, and CalendarDiffTime are semantically separate from the other types. Specifiers on negative time differences will generally be negative (think rem rather than mod).

NominalDiffTime and DiffTime

Note that a "minute" of DiffTime is simply 60 SI seconds, rather than a minute of civil time. Use NominalDiffTime to work with civil time, ignoring any leap seconds.

For NominalDiffTime and DiffTime:

%w
total whole weeks
%d
total whole days
%D
whole days of week
%h
total whole hours
%H
whole hours of day
%m
total whole minutes
%M
whole minutes of hour
%s
total whole seconds
%Es
total seconds, with decimal point and up to <width> (default 12) decimal places, without trailing zeros. For a whole number of seconds, %Es omits the decimal point unless padding is specified.
%0Es
total seconds, with decimal point and <width> (default 12) decimal places.
%S
whole seconds of minute
%ES
seconds of minute, with decimal point and up to <width> (default 12) decimal places, without trailing zeros. For a whole number of seconds, %ES omits the decimal point unless padding is specified.
%0ES
seconds of minute as two digits, with decimal point and <width> (default 12) decimal places.

CalendarDiffDays

For CalendarDiffDays (and CalendarDiffTime):

%y
total years
%b
total months
%B
months of year
%w
total weeks, not including months
%d
total days, not including months
%D
days of week

CalendarDiffTime

For CalendarDiffTime:

%h
total hours, not including months
%H
hours of day
%m
total minutes, not including months
%M
minutes of hour
%s
total whole seconds, not including months
%Es
total seconds, not including months, with decimal point and up to <width> (default 12) decimal places, without trailing zeros. For a whole number of seconds, %Es omits the decimal point unless padding is specified.
%0Es
total seconds, not including months, with decimal point and <width> (default 12) decimal places.
%S
whole seconds of minute
%ES
seconds of minute, with decimal point and up to <width> (default 12) decimal places, without trailing zeros. For a whole number of seconds, %ES omits the decimal point unless padding is specified.
%0ES
seconds of minute as two digits, with decimal point and <width> (default 12) decimal places.

parseTimeM #

Arguments

:: (MonadFail m, ParseTime t) 
=> Bool

Accept leading and trailing whitespace?

-> TimeLocale

Time locale.

-> String

Format string.

-> String

Input string.

-> m t

Return the time value, or fail if the input could not be parsed using the given format.

Parses a time value given a format string. Missing information will be derived from 1970-01-01 00:00 UTC (which was a Thursday). Supports the same %-codes as formatTime, including %-, %_ and %0 modifiers, however padding widths are not supported. Case is not significant in the input string. Some variations in the input are accepted:

%z %Ez
accepts any of ±HHMM or ±HH:MM.
%Z %EZ
accepts any string of letters, or any of the formats accepted by %z.
%0Y
accepts exactly four digits.
%0G
accepts exactly four digits.
%0C
accepts exactly two digits.
%0f
accepts exactly two digits.

For example, to parse a date in YYYY-MM-DD format, while allowing the month and date to have optional leading zeros (notice the - modifier used for %m and %d):

Prelude Data.Time> parseTimeM True defaultTimeLocale "%Y-%-m-%-d" "2010-3-04" :: Maybe Day
Just 2010-03-04

tlshow :: Show a => a -> LText #

charToLower :: Char -> Char #

Convert a character to lower case.

Character-based case conversion is lossy in comparison to string-based toLower. For instance, İ will be converted to i, instead of i̇.

charToUpper :: Char -> Char #

Convert a character to upper case.

Character-based case conversion is lossy in comparison to string-based toUpper. For instance, ß won't be converted to SS.

asHashMap :: HashMap k v -> HashMap k v #

asList :: [a] -> [a] #

asMap :: Map k v -> Map k v #

asMaybe :: Maybe a -> Maybe a #

asSet :: Set a -> Set a #

asString :: [Char] -> [Char] #

yieldThread :: MonadIO m => m () #

Originally yield.

hashNub :: (Hashable a, Eq a) => [a] -> [a] #

same behavior as nub, but requires Hashable & Eq and is O(n log n)

https://github.com/nh2/haskell-ordnub

ordNub :: Ord a => [a] -> [a] #

same behavior as nub, but requires Ord and is O(n log n)

https://github.com/nh2/haskell-ordnub

ordNubBy :: Ord b => (a -> b) -> (a -> a -> Bool) -> [a] -> [a] #

same behavior as nubBy, but requires Ord and is O(n log n)

https://github.com/nh2/haskell-ordnub

orElseSTM :: STM a -> STM a -> STM a #

Synonym for orElse.

whenM :: Monad m => m Bool -> m () -> m () #

Only perform the action if the predicate returns True.

Since 0.9.2

unlessM :: Monad m => m Bool -> m () -> m () #

Only perform the action if the predicate returns False.

Since 0.9.2

asDList :: DList a -> DList a #

Force type to a DList

Since 0.11.0

applyDList :: DList a -> [a] -> [a] #

Synonym for apply

Since 0.11.0

(<&&>) :: Applicative a => a Bool -> a Bool -> a Bool infixr 3 #

&& lifted to an Applicative.

Since: classy-prelude-0.12.8

(<||>) :: Applicative a => a Bool -> a Bool -> a Bool infixr 2 #

|| lifted to an Applicative.

Since: classy-prelude-0.12.8

toByteVector :: ByteString -> SVector Word8 #

Convert a ByteString into a storable Vector.

fromByteVector :: SVector Word8 -> ByteString #

Convert a storable Vector into a ByteString.

waitAsync :: MonadIO m => Async a -> m a #

waitSTM for any MonadIO

Since: classy-prelude-1.0.0

pollAsync :: MonadIO m => Async a -> m (Maybe (Either SomeException a)) #

pollSTM for any MonadIO

Since: classy-prelude-1.0.0

waitCatchAsync :: MonadIO m => Async a -> m (Either SomeException a) #

waitCatchSTM for any MonadIO

Since: classy-prelude-1.0.0

linkAsync :: MonadIO m => Async a -> m () #

link generalized to any MonadIO

Since: classy-prelude-1.0.0

link2Async :: MonadIO m => Async a -> Async b -> m () #

link2 generalized to any MonadIO

Since: classy-prelude-1.0.0

readFileUtf8 :: MonadIO m => FilePath -> m Text #

Strictly read a file into a Text using a UTF-8 character encoding. In the event of a character encoding error, a Unicode replacement character will be used (a.k.a., lenientDecode).

Since: classy-prelude-1.2.0

writeFileUtf8 :: MonadIO m => FilePath -> Text -> m () #

Write a Text to a file using a UTF-8 character encoding.

Since: classy-prelude-1.2.0

parseTime #

Arguments

:: ParseTime t 
=> TimeLocale

Time locale.

-> String

Format string.

-> String

Input string.

-> Maybe t

The time value, or Nothing if the input could not be parsed using the given format.

throwString :: (MonadIO m, HasCallStack) => String -> m a #

A convenience function for throwing a user error. This is useful for cases where it would be too high a burden to define your own exception type.

This throws an exception of type StringException. When GHC supports it (base 4.9 and GHC 8.0 and onward), it includes a call stack.

Since: unliftio-0.1.0.0

impureThrow :: Exception e => e -> a #

Generate a pure value which, when forced, will synchronously throw the given exception.

Generally it's better to avoid using this function and instead use throwIO, see https://github.com/fpco/safe-exceptions#quickstart.

Since: unliftio-0.1.0.0

catchIO :: MonadUnliftIO m => m a -> (IOException -> m a) -> m a #

catch specialized to only catching IOExceptions.

Since: unliftio-0.1.0.0

catchDeep :: (MonadUnliftIO m, Exception e, NFData a) => m a -> (e -> m a) -> m a #

Same as catch, but fully force evaluation of the result value to find all impure exceptions.

Since: unliftio-0.1.0.0

catchAnyDeep :: (NFData a, MonadUnliftIO m) => m a -> (SomeException -> m a) -> m a #

catchDeep specialized to catch all synchronous exception.

Since: unliftio-0.1.0.0

handleIO :: MonadUnliftIO m => (IOException -> m a) -> m a -> m a #

handle specialized to only catching IOExceptions.

Since: unliftio-0.1.0.0

handleAny :: MonadUnliftIO m => (SomeException -> m a) -> m a -> m a #

Flipped version of catchAny.

Since: unliftio-0.1.0.0

handleDeep :: (MonadUnliftIO m, Exception e, NFData a) => (e -> m a) -> m a -> m a #

Flipped version of catchDeep.

Since: unliftio-0.1.0.0

handleAnyDeep :: (MonadUnliftIO m, NFData a) => (SomeException -> m a) -> m a -> m a #

Flipped version of catchAnyDeep.

Since: unliftio-0.1.0.0

tryIO :: MonadUnliftIO m => m a -> m (Either IOException a) #

try specialized to only catching IOExceptions.

Since: unliftio-0.1.0.0

tryAny :: MonadUnliftIO m => m a -> m (Either SomeException a) #

try specialized to catch all synchronous exceptions.

Since: unliftio-0.1.0.0

tryDeep :: (MonadUnliftIO m, Exception e, NFData a) => m a -> m (Either e a) #

Same as try, but fully force evaluation of the result value to find all impure exceptions.

Since: unliftio-0.1.0.0

tryAnyDeep :: (MonadUnliftIO m, NFData a) => m a -> m (Either SomeException a) #

tryDeep specialized to catch all synchronous exceptions.

Since: unliftio-0.1.0.0

withException :: (MonadUnliftIO m, Exception e) => m a -> (e -> m b) -> m a #

Like onException, but provides the handler the thrown exception.

Since: unliftio-0.1.0.0

bracketOnError_ :: MonadUnliftIO m => m a -> m b -> m c -> m c #

A variant of bracketOnError where the return value from the first computation is not required.

Since: unliftio-0.1.0.0

toSyncException :: Exception e => e -> SomeException #

Convert an exception into a synchronous exception.

For synchronous exceptions, this is the same as toException. For asynchronous exceptions, this will wrap up the exception with SyncExceptionWrapper.

Since: unliftio-0.1.0.0

toAsyncException :: Exception e => e -> SomeException #

Convert an exception into an asynchronous exception.

For asynchronous exceptions, this is the same as toException. For synchronous exceptions, this will wrap up the exception with AsyncExceptionWrapper.

Since: unliftio-0.1.0.0

isSyncException :: Exception e => e -> Bool #

Check if the given exception is synchronous.

Since: unliftio-0.1.0.0

isAsyncException :: Exception e => e -> Bool #

Check if the given exception is asynchronous.

Since: unliftio-0.1.0.0

catchesDeep :: (MonadUnliftIO m, NFData a) => m a -> [Handler m a] -> m a #

Same as catches, but fully force evaluation of the result value to find all impure exceptions.

Since: unliftio-0.1.0.0

evaluateDeep :: (MonadIO m, NFData a) => a -> m a #

Deeply evaluate a value using evaluate and NFData.

Since: unliftio-0.1.0.0

newTBQueue #

Arguments

:: Natural

maximum number of elements the queue can hold

-> STM (TBQueue a) 

Builds and returns a new instance of TBQueue.

writeTBQueue :: TBQueue a -> a -> STM () #

Write a value to a TBQueue; blocks if the queue is full.

readTBQueue :: TBQueue a -> STM a #

Read the next value from the TBQueue.

tryReadTBQueue :: TBQueue a -> STM (Maybe a) #

A version of readTBQueue which does not retry. Instead it returns Nothing if no value is available.

flushTBQueue :: TBQueue a -> STM [a] #

Efficiently read the entire contents of a TBQueue into a list. This function never retries.

Since: stm-2.4.5

peekTBQueue :: TBQueue a -> STM a #

Get the next value from the TBQueue without removing it, retrying if the channel is empty.

tryPeekTBQueue :: TBQueue a -> STM (Maybe a) #

A version of peekTBQueue which does not retry. Instead it returns Nothing if no value is available.

unGetTBQueue :: TBQueue a -> a -> STM () #

Put a data item back onto a channel, where it will be the next item read. Blocks if the queue is full.

lengthTBQueue :: TBQueue a -> STM Natural #

Return the length of a TBQueue.

Since: stm-2.5.0.0

isEmptyTBQueue :: TBQueue a -> STM Bool #

Returns True if the supplied TBQueue is empty.

isFullTBQueue :: TBQueue a -> STM Bool #

Returns True if the supplied TBQueue is full.

Since: stm-2.4.3

newTChan :: STM (TChan a) #

Build and return a new instance of TChan

newBroadcastTChan :: STM (TChan a) #

Create a write-only TChan. More precisely, readTChan will retry even after items have been written to the channel. The only way to read a broadcast channel is to duplicate it with dupTChan.

Consider a server that broadcasts messages to clients:

serve :: TChan Message -> Client -> IO loop
serve broadcastChan client = do
    myChan <- dupTChan broadcastChan
    forever $ do
        message <- readTChan myChan
        send client message

The problem with using newTChan to create the broadcast channel is that if it is only written to and never read, items will pile up in memory. By using newBroadcastTChan to create the broadcast channel, items can be garbage collected after clients have seen them.

Since: stm-2.4

writeTChan :: TChan a -> a -> STM () #

Write a value to a TChan.

readTChan :: TChan a -> STM a #

Read the next value from the TChan.

tryReadTChan :: TChan a -> STM (Maybe a) #

A version of readTChan which does not retry. Instead it returns Nothing if no value is available.

Since: stm-2.3

peekTChan :: TChan a -> STM a #

Get the next value from the TChan without removing it, retrying if the channel is empty.

Since: stm-2.3

tryPeekTChan :: TChan a -> STM (Maybe a) #

A version of peekTChan which does not retry. Instead it returns Nothing if no value is available.

Since: stm-2.3

dupTChan :: TChan a -> STM (TChan a) #

Duplicate a TChan: the duplicate channel begins empty, but data written to either channel from then on will be available from both. Hence this creates a kind of broadcast channel, where data written by anyone is seen by everyone else.

unGetTChan :: TChan a -> a -> STM () #

Put a data item back onto a channel, where it will be the next item read.

isEmptyTChan :: TChan a -> STM Bool #

Returns True if the supplied TChan is empty.

cloneTChan :: TChan a -> STM (TChan a) #

Clone a TChan: similar to dupTChan, but the cloned channel starts with the same content available as the original channel.

Since: stm-2.4

newTMVar :: a -> STM (TMVar a) #

Create a TMVar which contains the supplied value.

newEmptyTMVar :: STM (TMVar a) #

Create a TMVar which is initially empty.

newEmptyTMVarIO :: MonadIO m => m (TMVar a) #

Lifted version of newEmptyTMVarIO

Since: unliftio-0.2.1.0

takeTMVar :: TMVar a -> STM a #

Return the contents of the TMVar. If the TMVar is currently empty, the transaction will retry. After a takeTMVar, the TMVar is left empty.

tryTakeTMVar :: TMVar a -> STM (Maybe a) #

A version of takeTMVar that does not retry. The tryTakeTMVar function returns Nothing if the TMVar was empty, or Just a if the TMVar was full with contents a. After tryTakeTMVar, the TMVar is left empty.

putTMVar :: TMVar a -> a -> STM () #

Put a value into a TMVar. If the TMVar is currently full, putTMVar will retry.

tryPutTMVar :: TMVar a -> a -> STM Bool #

A version of putTMVar that does not retry. The tryPutTMVar function attempts to put the value a into the TMVar, returning True if it was successful, or False otherwise.

readTMVar :: TMVar a -> STM a #

This is a combination of takeTMVar and putTMVar; ie. it takes the value from the TMVar, puts it back, and also returns it.

tryReadTMVar :: TMVar a -> STM (Maybe a) #

A version of readTMVar which does not retry. Instead it returns Nothing if no value is available.

Since: stm-2.3

swapTMVar :: TMVar a -> a -> STM a #

Swap the contents of a TMVar for a new value.

writeTMVar :: TMVar a -> a -> STM () #

Non-blocking write of a new value to a TMVar Puts if empty. Replaces if populated.

isEmptyTMVar :: TMVar a -> STM Bool #

Check whether a given TMVar is empty.

mkWeakTMVar :: MonadUnliftIO m => TMVar a -> m () -> m (Weak (TMVar a)) #

Lifted version of mkWeakTMVar

Since: unliftio-0.2.1.0

newTQueue :: STM (TQueue a) #

Build and returns a new instance of TQueue

writeTQueue :: TQueue a -> a -> STM () #

Write a value to a TQueue.

readTQueue :: TQueue a -> STM a #

Read the next value from the TQueue.

tryReadTQueue :: TQueue a -> STM (Maybe a) #

A version of readTQueue which does not retry. Instead it returns Nothing if no value is available.

peekTQueue :: TQueue a -> STM a #

Get the next value from the TQueue without removing it, retrying if the channel is empty.

tryPeekTQueue :: TQueue a -> STM (Maybe a) #

A version of peekTQueue which does not retry. Instead it returns Nothing if no value is available.

unGetTQueue :: TQueue a -> a -> STM () #

Put a data item back onto a channel, where it will be the next item read.

isEmptyTQueue :: TQueue a -> STM Bool #

Returns True if the supplied TQueue is empty.

modifyTVar :: TVar a -> (a -> a) -> STM () #

Mutate the contents of a TVar. N.B., this version is non-strict.

Since: stm-2.3

modifyTVar' :: TVar a -> (a -> a) -> STM () #

Strict version of modifyTVar.

Since: stm-2.3

stateTVar :: TVar s -> (s -> (a, s)) -> STM a #

Like modifyTVar' but the function is a simple state transition that can return a side value which is passed on as the result of the STM.

Since: stm-2.5.0

swapTVar :: TVar a -> a -> STM a #

Swap the contents of a TVar for a new value.

Since: stm-2.3

mkWeakTVar :: MonadUnliftIO m => TVar a -> m () -> m (Weak (TVar a)) #

Lifted version of mkWeakTVar

Since: unliftio-0.2.1.0

catchSyncOrAsync :: (MonadUnliftIO m, Exception e) => m a -> (e -> m a) -> m a #

A variant of catch that catches both synchronous and asynchronous exceptions.

WARNING: This function (and other *SyncOrAsync functions) is for advanced users. Most of the time, you probably want to use the non-SyncOrAsync versions.

Before attempting to use this function, be familiar with the "Rules for async safe handling" section in this blog post.

Since: unliftio-0.2.17

handleSyncOrAsync :: (MonadUnliftIO m, Exception e) => (e -> m a) -> m a -> m a #

A variant of handle that catches both synchronous and asynchronous exceptions.

See catchSyncOrAsync.

Since: unliftio-0.2.17

trySyncOrAsync :: (MonadUnliftIO m, Exception e) => m a -> m (Either e a) #

A variant of try that catches both synchronous and asynchronous exceptions.

See catchSyncOrAsync.

Since: unliftio-0.2.17

pureTry :: a -> Either SomeException a #

Evaluate the value to WHNF and catch any synchronous exceptions.

The expression may still have bottom values within it; you may instead want to use pureTryDeep.

Since: unliftio-0.2.2.0

pureTryDeep :: NFData a => a -> Either SomeException a #

Evaluate the value to NF and catch any synchronous exceptions.

Since: unliftio-0.2.2.0

fromExceptionUnwrap :: Exception e => SomeException -> Maybe e #

Convert from a possibly wrapped exception.

The inverse of toAsyncException and toSyncException. When using those functions (or functions that use them, like throwTo or throwIO), fromException might not be sufficient because the exception might be wrapped within SyncExceptionWrapper or AsyncExceptionWrapper.

Since: unliftio-0.2.17

stringException :: HasCallStack => String -> StringException #

Smart constructor for a StringException that deals with the call stack.

Since: unliftio-0.1.0.0

fromEither :: (Exception e, MonadIO m) => Either e a -> m a #

Unwrap an Either value, throwing its Left value as a runtime exception via throwIO if present.

Since: unliftio-0.1.0.0

fromEitherIO :: (Exception e, MonadIO m) => IO (Either e a) -> m a #

Same as fromEither, but works on an IO-wrapped Either.

Since: unliftio-0.1.0.0

fromEitherM :: (Exception e, MonadIO m) => m (Either e a) -> m a #

Same as fromEither, but works on an m-wrapped Either.

Since: unliftio-0.1.0.0

mapExceptionM :: (Exception e1, Exception e2, MonadUnliftIO m) => (e1 -> e2) -> m a -> m a #

Same as mapException, except works in a monadic context.

Since: unliftio-0.2.15

conc :: m a -> Conc m a #

Construct a value of type Conc from an action. Compose these values using the typeclass instances (most commonly Applicative and Alternative) and then run with runConc.

Since: unliftio-0.2.9.0

runConc :: MonadUnliftIO m => Conc m a -> m a #

Run a Conc value on multiple threads.

Since: unliftio-0.2.9.0

pooledMapConcurrentlyN #

Arguments

:: (MonadUnliftIO m, Traversable t) 
=> Int

Max. number of threads. Should not be less than 1.

-> (a -> m b) 
-> t a 
-> m (t b) 

Like mapConcurrently from async, but instead of one thread per element, it does pooling from a set of threads. This is useful in scenarios where resource consumption is bounded and for use cases where too many concurrent tasks aren't allowed.

Example usage

Expand
import Say

action :: Int -> IO Int
action n = do
  tid <- myThreadId
  sayString $ show tid
  threadDelay (2 * 10^6) -- 2 seconds
  return n

main :: IO ()
main = do
  yx <- pooledMapConcurrentlyN 5 (\x -> action x) [1..5]
  print yx

On executing you can see that five threads have been spawned:

$ ./pool
ThreadId 36
ThreadId 38
ThreadId 40
ThreadId 42
ThreadId 44
[1,2,3,4,5]

Let's modify the above program such that there are less threads than the number of items in the list:

import Say

action :: Int -> IO Int
action n = do
  tid <- myThreadId
  sayString $ show tid
  threadDelay (2 * 10^6) -- 2 seconds
  return n

main :: IO ()
main = do
  yx <- pooledMapConcurrentlyN 3 (\x -> action x) [1..5]
  print yx

On executing you can see that only three threads are active totally:

$ ./pool
ThreadId 35
ThreadId 37
ThreadId 39
ThreadId 35
ThreadId 39
[1,2,3,4,5]

Since: unliftio-0.2.10

pooledMapConcurrently :: (MonadUnliftIO m, Traversable t) => (a -> m b) -> t a -> m (t b) #

Similar to pooledMapConcurrentlyN but with number of threads set from getNumCapabilities. Usually this is useful for CPU bound tasks.

Since: unliftio-0.2.10

pooledForConcurrentlyN #

Arguments

:: (MonadUnliftIO m, Traversable t) 
=> Int

Max. number of threads. Should not be less than 1.

-> t a 
-> (a -> m b) 
-> m (t b) 

Similar to pooledMapConcurrentlyN but with flipped arguments.

Since: unliftio-0.2.10

pooledForConcurrently :: (MonadUnliftIO m, Traversable t) => t a -> (a -> m b) -> m (t b) #

Similar to pooledForConcurrentlyN but with number of threads set from getNumCapabilities. Usually this is useful for CPU bound tasks.

Since: unliftio-0.2.10

pooledMapConcurrentlyN_ #

Arguments

:: (MonadUnliftIO m, Foldable f) 
=> Int

Max. number of threads. Should not be less than 1.

-> (a -> m b) 
-> f a 
-> m () 

Like pooledMapConcurrentlyN but with the return value discarded.

Since: unliftio-0.2.10

pooledMapConcurrently_ :: (MonadUnliftIO m, Foldable f) => (a -> m b) -> f a -> m () #

Like pooledMapConcurrently but with the return value discarded.

Since: unliftio-0.2.10

pooledForConcurrently_ :: (MonadUnliftIO m, Foldable f) => f a -> (a -> m b) -> m () #

Like pooledMapConcurrently_ but with flipped arguments.

Since: unliftio-0.2.10

pooledForConcurrentlyN_ #

Arguments

:: (MonadUnliftIO m, Foldable t) 
=> Int

Max. number of threads. Should not be less than 1.

-> t a 
-> (a -> m b) 
-> m () 

Like pooledMapConcurrentlyN_ but with flipped arguments.

Since: unliftio-0.2.10

pooledReplicateConcurrentlyN #

Arguments

:: MonadUnliftIO m 
=> Int

Max. number of threads. Should not be less than 1.

-> Int

Number of times to perform the action.

-> m a 
-> m [a] 

Pooled version of replicateConcurrently. Performs the action in the pooled threads.

Since: unliftio-0.2.10

pooledReplicateConcurrently #

Arguments

:: MonadUnliftIO m 
=> Int

Number of times to perform the action.

-> m a 
-> m [a] 

Similar to pooledReplicateConcurrentlyN but with number of threads set from getNumCapabilities. Usually this is useful for CPU bound tasks.

Since: unliftio-0.2.10

pooledReplicateConcurrentlyN_ #

Arguments

:: MonadUnliftIO m 
=> Int

Max. number of threads. Should not be less than 1.

-> Int

Number of times to perform the action.

-> m a 
-> m () 

Pooled version of replicateConcurrently_. Performs the action in the pooled threads.

Since: unliftio-0.2.10

pooledReplicateConcurrently_ #

Arguments

:: MonadUnliftIO m 
=> Int

Number of times to perform the action.

-> m a 
-> m () 

Similar to pooledReplicateConcurrently_ but with number of threads set from getNumCapabilities. Usually this is useful for CPU bound tasks.

Since: unliftio-0.2.10

runMemoized :: MonadIO m => Memoized a -> m a #

Extract a value from a Memoized, running an action if no cached value is available.

Since: unliftio-0.2.8.0

memoizeRef :: MonadUnliftIO m => m a -> m (Memoized a) #

Create a new Memoized value using an IORef under the surface. Note that the action may be run in multiple threads simultaneously, so this may not be thread safe (depending on the underlying action). Consider using memoizeMVar.

Since: unliftio-0.2.8.0

memoizeMVar :: MonadUnliftIO m => m a -> m (Memoized a) #

Same as memoizeRef, but uses an MVar to ensure that an action is only run once, even in a multithreaded application.

Since: unliftio-0.2.8.0

withQSem :: MonadUnliftIO m => QSem -> m a -> m a #

withQSem is an exception-safe wrapper for performing the provided operation while holding a unit of value from the semaphore. It ensures the semaphore cannot be leaked if there are exceptions.

Since: unliftio-0.2.14

withQSemN :: MonadUnliftIO m => QSemN -> Int -> m a -> m a #

withQSemN is an exception-safe wrapper for performing the provided operation while holding N unit of value from the semaphore. It ensures the semaphore cannot be leaked if there are exceptions.

Since: unliftio-0.2.14

retrySTM :: STM a #

Renamed retry for unqualified export

Since: unliftio-0.2.1.0

checkSTM :: Bool -> STM () #

Renamed check for unqualified export

Since: unliftio-0.2.1.0

withSystemTempFile #

Arguments

:: MonadUnliftIO m 
=> String

File name template. See openTempFile.

-> (FilePath -> Handle -> m a)

Callback that can use the file

-> m a 

Create and use a temporary file in the system standard temporary directory.

Behaves exactly the same as withTempFile, except that the parent temporary directory will be that returned by getCanonicalTemporaryDirectory.

Since: unliftio-0.1.0.0

withSystemTempDirectory #

Arguments

:: MonadUnliftIO m 
=> String

Directory name template. See openTempFile.

-> (FilePath -> m a)

Callback that can use the directory.

-> m a 

Create and use a temporary directory in the system standard temporary directory.

Behaves exactly the same as withTempDirectory, except that the parent temporary directory will be that returned by getCanonicalTemporaryDirectory.

Since: unliftio-0.1.0.0

withTempFile #

Arguments

:: MonadUnliftIO m 
=> FilePath

Temp dir to create the file in.

-> String

File name template. See openTempFile.

-> (FilePath -> Handle -> m a)

Callback that can use the file.

-> m a 

Use a temporary filename that doesn't already exist.

Creates a new temporary file inside the given directory, making use of the template. The temp file is deleted after use. For example:

withTempFile "src" "sdist." $ \tmpFile hFile -> do ...

The tmpFile will be file in the given directory, e.g. src/sdist.342.

Since: unliftio-0.1.0.0

withTempDirectory #

Arguments

:: MonadUnliftIO m 
=> FilePath

Temp directory to create the directory in.

-> String

Directory name template. See openTempFile.

-> (FilePath -> m a)

Callback that can use the directory.

-> m a 

Create and use a temporary directory.

Creates a new temporary directory inside the given directory, making use of the template. The temp directory is deleted after use. For example:

withTempDirectory "src" "sdist." $ \tmpDir -> do ...

The tmpDir will be a new subdirectory of the given directory, e.g. src/sdist.342.

Since: unliftio-0.1.0.0

askUnliftIO :: MonadUnliftIO m => m (UnliftIO m) #

Capture the current monadic context, providing the ability to run monadic actions in IO.

See UnliftIO for an explanation of why we need a helper datatype here.

Prior to version 0.2.0.0 of this library, this was a method in the MonadUnliftIO type class. It was moved out due to https://github.com/fpco/unliftio/issues/55.

Since: unliftio-core-0.1.0.0

askRunInIO :: MonadUnliftIO m => m (m a -> IO a) #

Same as askUnliftIO, but returns a monomorphic function instead of a polymorphic newtype wrapper. If you only need to apply the transformation on one concrete type, this function can be more convenient.

Since: unliftio-core-0.1.0.0

withUnliftIO :: MonadUnliftIO m => (UnliftIO m -> IO a) -> m a #

Convenience function for capturing the monadic context and running an IO action. The UnliftIO newtype wrapper is rarely needed, so prefer withRunInIO to this function.

Since: unliftio-core-0.1.0.0

toIO :: MonadUnliftIO m => m a -> m (IO a) #

Convert an action in m to an action in IO.

Since: unliftio-core-0.1.0.0

wrappedWithRunInIO #

Arguments

:: MonadUnliftIO n 
=> (n b -> m b)

The wrapper, for instance IdentityT.

-> (forall a. m a -> n a)

The inverse, for instance runIdentityT.

-> ((forall a. m a -> IO a) -> IO b)

The actual function to invoke withRunInIO with.

-> m b 

A helper function for implementing MonadUnliftIO instances. Useful for the common case where you want to simply delegate to the underlying transformer.

Note: You can derive MonadUnliftIO for newtypes without this helper function in unliftio-core 0.2.0.0 and later.

Example

Expand
newtype AppT m a = AppT { unAppT :: ReaderT Int (ResourceT m) a }
  deriving (Functor, Applicative, Monad, MonadIO)

-- Same as `deriving newtype (MonadUnliftIO)`
instance MonadUnliftIO m => MonadUnliftIO (AppT m) where
  withRunInIO = wrappedWithRunInIO AppT unAppT

Since: unliftio-core-0.1.2.0

liftIOOp :: MonadUnliftIO m => (IO a -> IO b) -> m a -> m b #

A helper function for lifting IO a -> IO b functions into any MonadUnliftIO.

Example

Expand
liftedTry :: (Exception e, MonadUnliftIO m) => m a -> m (Either e a)
liftedTry m = liftIOOp Control.Exception.try m

Since: unliftio-core-0.2.1.0

asIORef :: IORef a -> IORef a #

Since 0.2.0

asSTRef :: STRef s a -> STRef s a #

Since 0.2.0

asMutVar :: MutVar s a -> MutVar s a #

Since 0.2.0

asBRef :: BRef s a -> BRef s a #

Since 0.2.0

asDLList :: DLList s a -> DLList s a #

Since 0.2.0

asUDeque :: UDeque s a -> UDeque s a #

Since 0.2.0

asSDeque :: SDeque s a -> SDeque s a #

Since 0.2.0

asBDeque :: BDeque s a -> BDeque s a #

Since 0.2.0

asPRef :: PRef s a -> PRef s a #

Since 0.2.0

asSRef :: SRef s a -> SRef s a #

Since 0.2.0

asURef :: URef s a -> URef s a #

Since 0.2.0

newTBChan :: Int -> STM (TBChan a) #

Build and returns a new instance of TBChan with the given capacity. N.B., we do not verify the capacity is positive, but if it is non-positive then writeTBChan will always retry and isFullTBChan will always be true.

newTBChanIO :: Int -> IO (TBChan a) #

IO version of newTBChan. This is useful for creating top-level TBChans using unsafePerformIO, because using atomically inside unsafePerformIO isn't possible.

readTBChan :: TBChan a -> STM a #

Read the next value from the TBChan, retrying if the channel is empty.

tryReadTBChan :: TBChan a -> STM (Maybe a) #

A version of readTBChan which does not retry. Instead it returns Nothing if no value is available.

peekTBChan :: TBChan a -> STM a #

Get the next value from the TBChan without removing it, retrying if the channel is empty.

tryPeekTBChan :: TBChan a -> STM (Maybe a) #

A version of peekTBChan which does not retry. Instead it returns Nothing if no value is available.

writeTBChan :: TBChan a -> a -> STM () #

Write a value to a TBChan, retrying if the channel is full.

tryWriteTBChan :: TBChan a -> a -> STM Bool #

A version of writeTBChan which does not retry. Returns True if the value was successfully written, and False otherwise.

unGetTBChan :: TBChan a -> a -> STM () #

Put a data item back onto a channel, where it will be the next item read. N.B., this could allow the channel to temporarily become longer than the specified limit, which is necessary to ensure that the item is indeed the next one read.

isEmptyTBChan :: TBChan a -> STM Bool #

Returns True if the supplied TBChan is empty (i.e., has no elements). N.B., a TBChan can be both "empty" and "full" at the same time, if the initial limit was non-positive.

isFullTBChan :: TBChan a -> STM Bool #

Returns True if the supplied TBChan is full (i.e., is over its limit). N.B., a TBChan can be both "empty" and "full" at the same time, if the initial limit was non-positive. N.B., a TBChan may still be full after reading, if unGetTBChan was used to go over the initial limit.

This is equivalent to: liftM (<= 0) estimateFreeSlotsTBMChan

estimateFreeSlotsTBChan :: TBChan a -> STM Int #

Estimate the number of free slots. If the result is positive, then it's a minimum bound; if it's non-positive then it's exact. It will only be negative if the initial limit was negative or if unGetTBChan was used to go over the initial limit.

This function always contends with writers, but only contends with readers when it has to; compare against freeSlotsTBChan.

freeSlotsTBChan :: TBChan a -> STM Int #

Return the exact number of free slots. The result can be negative if the initial limit was negative or if unGetTBChan was used to go over the initial limit.

This function always contends with both readers and writers; compare against estimateFreeSlotsTBChan.

newTBMChan :: Int -> STM (TBMChan a) #

Build and returns a new instance of TBMChan with the given capacity. N.B., we do not verify the capacity is positive, but if it is non-positive then writeTBMChan will always retry and isFullTBMChan will always be true.

newTBMChanIO :: Int -> IO (TBMChan a) #

IO version of newTBMChan. This is useful for creating top-level TBMChans using unsafePerformIO, because using atomically inside unsafePerformIO isn't possible.

readTBMChan :: TBMChan a -> STM (Maybe a) #

Read the next value from the TBMChan, retrying if the channel is empty (and not closed). We return Nothing immediately if the channel is closed and empty.

tryReadTBMChan :: TBMChan a -> STM (Maybe (Maybe a)) #

A version of readTBMChan which does not retry. Instead it returns Just Nothing if the channel is open but no value is available; it still returns Nothing if the channel is closed and empty.

peekTBMChan :: TBMChan a -> STM (Maybe a) #

Get the next value from the TBMChan without removing it, retrying if the channel is empty.

tryPeekTBMChan :: TBMChan a -> STM (Maybe (Maybe a)) #

A version of peekTBMChan which does not retry. Instead it returns Just Nothing if the channel is open but no value is available; it still returns Nothing if the channel is closed and empty.

writeTBMChan :: TBMChan a -> a -> STM () #

Write a value to a TBMChan, retrying if the channel is full. If the channel is closed then the value is silently discarded. Use isClosedTBMChan to determine if the channel is closed before writing, as needed.

tryWriteTBMChan :: TBMChan a -> a -> STM (Maybe Bool) #

A version of writeTBMChan which does not retry. Returns Just True if the value was successfully written, Just False if it could not be written (but the channel was open), and Nothing if it was discarded (i.e., the channel was closed).

unGetTBMChan :: TBMChan a -> a -> STM () #

Put a data item back onto a channel, where it will be the next item read. If the channel is closed then the value is silently discarded; you can use peekTBMChan to circumvent this in certain circumstances. N.B., this could allow the channel to temporarily become longer than the specified limit, which is necessary to ensure that the item is indeed the next one read.

closeTBMChan :: TBMChan a -> STM () #

Closes the TBMChan, preventing any further writes.

isClosedTBMChan :: TBMChan a -> STM Bool #

Returns True if the supplied TBMChan has been closed.

isEmptyTBMChan :: TBMChan a -> STM Bool #

Returns True if the supplied TBMChan is empty (i.e., has no elements). N.B., a TBMChan can be both "empty" and "full" at the same time, if the initial limit was non-positive.

isFullTBMChan :: TBMChan a -> STM Bool #

Returns True if the supplied TBMChan is full (i.e., is over its limit). N.B., a TBMChan can be both "empty" and "full" at the same time, if the initial limit was non-positive. N.B., a TBMChan may still be full after reading, if unGetTBMChan was used to go over the initial limit.

This is equivalent to: liftM (<= 0) estimateFreeSlotsTBMChan

estimateFreeSlotsTBMChan :: TBMChan a -> STM Int #

Estimate the number of free slots. If the result is positive, then it's a minimum bound; if it's non-positive then it's exact. It will only be negative if the initial limit was negative or if unGetTBMChan was used to go over the initial limit.

This function always contends with writers, but only contends with readers when it has to; compare against freeSlotsTBMChan.

freeSlotsTBMChan :: TBMChan a -> STM Int #

Return the exact number of free slots. The result can be negative if the initial limit was negative or if unGetTBMChan was used to go over the initial limit.

This function always contends with both readers and writers; compare against estimateFreeSlotsTBMChan.

newTBMQueue :: Int -> STM (TBMQueue a) #

Build and returns a new instance of TBMQueue with the given capacity. N.B., we do not verify the capacity is positive, but if it is non-positive then writeTBMQueue will always retry and isFullTBMQueue will always be true.

newTBMQueueIO :: Int -> IO (TBMQueue a) #

IO version of newTBMQueue. This is useful for creating top-level TBMQueues using unsafePerformIO, because using atomically inside unsafePerformIO isn't possible.

readTBMQueue :: TBMQueue a -> STM (Maybe a) #

Read the next value from the TBMQueue, retrying if the queue is empty (and not closed). We return Nothing immediately if the queue is closed and empty.

tryReadTBMQueue :: TBMQueue a -> STM (Maybe (Maybe a)) #

A version of readTBMQueue which does not retry. Instead it returns Just Nothing if the queue is open but no value is available; it still returns Nothing if the queue is closed and empty.

peekTBMQueue :: TBMQueue a -> STM (Maybe a) #

Get the next value from the TBMQueue without removing it, retrying if the queue is empty.

tryPeekTBMQueue :: TBMQueue a -> STM (Maybe (Maybe a)) #

A version of peekTBMQueue which does not retry. Instead it returns Just Nothing if the queue is open but no value is available; it still returns Nothing if the queue is closed and empty.

writeTBMQueue :: TBMQueue a -> a -> STM () #

Write a value to a TBMQueue, retrying if the queue is full. If the queue is closed then the value is silently discarded. Use isClosedTBMQueue to determine if the queue is closed before writing, as needed.

tryWriteTBMQueue :: TBMQueue a -> a -> STM (Maybe Bool) #

A version of writeTBMQueue which does not retry. Returns Just True if the value was successfully written, Just False if it could not be written (but the queue was open), and Nothing if it was discarded (i.e., the queue was closed).

unGetTBMQueue :: TBMQueue a -> a -> STM () #

Put a data item back onto a queue, where it will be the next item read. If the queue is closed then the value is silently discarded; you can use peekTBMQueue to circumvent this in certain circumstances. N.B., this could allow the queue to temporarily become longer than the specified limit, which is necessary to ensure that the item is indeed the next one read.

closeTBMQueue :: TBMQueue a -> STM () #

Closes the TBMQueue, preventing any further writes.

isClosedTBMQueue :: TBMQueue a -> STM Bool #

Returns True if the supplied TBMQueue has been closed.

isEmptyTBMQueue :: TBMQueue a -> STM Bool #

Returns True if the supplied TBMQueue is empty (i.e., has no elements). N.B., a TBMQueue can be both "empty" and "full" at the same time, if the initial limit was non-positive.

isFullTBMQueue :: TBMQueue a -> STM Bool #

Returns True if the supplied TBMQueue is full (i.e., is over its limit). N.B., a TBMQueue can be both "empty" and "full" at the same time, if the initial limit was non-positive. N.B., a TBMQueue may still be full after reading, if unGetTBMQueue was used to go over the initial limit.

This is equivalent to: liftM (<= 0) estimateFreeSlotsTBMQueue

estimateFreeSlotsTBMQueue :: TBMQueue a -> STM Int #

Estimate the number of free slots. If the result is positive, then it's a minimum bound; if it's non-positive then it's exact. It will only be negative if the initial limit was negative or if unGetTBMQueue was used to go over the initial limit.

This function always contends with writers, but only contends with readers when it has to; compare against freeSlotsTBMQueue.

freeSlotsTBMQueue :: TBMQueue a -> STM Int #

Return the exact number of free slots. The result can be negative if the initial limit was negative or if unGetTBMQueue was used to go over the initial limit.

This function always contends with both readers and writers; compare against estimateFreeSlotsTBMQueue.

newTMChan :: STM (TMChan a) #

Build and returns a new instance of TMChan.

newTMChanIO :: IO (TMChan a) #

IO version of newTMChan. This is useful for creating top-level TMChans using unsafePerformIO, because using atomically inside unsafePerformIO isn't possible.

newBroadcastTMChanIO :: IO (TMChan a) #

IO version of newBroadcastTMChan.

Since: 2.1.0

dupTMChan :: TMChan a -> STM (TMChan a) #

Duplicate a TMChan: the duplicate channel begins empty, but data written to either channel from then on will be available from both, and closing one copy will close them all. Hence this creates a kind of broadcast channel, where data written by anyone is seen by everyone else.

readTMChan :: TMChan a -> STM (Maybe a) #

Read the next value from the TMChan, retrying if the channel is empty (and not closed). We return Nothing immediately if the channel is closed and empty.

tryReadTMChan :: TMChan a -> STM (Maybe (Maybe a)) #

A version of readTMChan which does not retry. Instead it returns Just Nothing if the channel is open but no value is available; it still returns Nothing if the channel is closed and empty.

peekTMChan :: TMChan a -> STM (Maybe a) #

Get the next value from the TMChan without removing it, retrying if the channel is empty.

tryPeekTMChan :: TMChan a -> STM (Maybe (Maybe a)) #

A version of peekTMChan which does not retry. Instead it returns Just Nothing if the channel is open but no value is available; it still returns Nothing if the channel is closed and empty.

writeTMChan :: TMChan a -> a -> STM () #

Write a value to a TMChan. If the channel is closed then the value is silently discarded. Use isClosedTMChan to determine if the channel is closed before writing, as needed.

unGetTMChan :: TMChan a -> a -> STM () #

Put a data item back onto a channel, where it will be the next item read. If the channel is closed then the value is silently discarded; you can use peekTMChan to circumvent this in certain circumstances.

closeTMChan :: TMChan a -> STM () #

Closes the TMChan, preventing any further writes.

isClosedTMChan :: TMChan a -> STM Bool #

Returns True if the supplied TMChan has been closed.

isEmptyTMChan :: TMChan a -> STM Bool #

Returns True if the supplied TMChan is empty.

newTMQueue :: STM (TMQueue a) #

Build and returns a new instance of TMQueue.

newTMQueueIO :: IO (TMQueue a) #

IO version of newTMQueue. This is useful for creating top-level TMQueues using unsafePerformIO, because using atomically inside unsafePerformIO isn't possible.

readTMQueue :: TMQueue a -> STM (Maybe a) #

Read the next value from the TMQueue, retrying if the queue is empty (and not closed). We return Nothing immediately if the queue is closed and empty.

tryReadTMQueue :: TMQueue a -> STM (Maybe (Maybe a)) #

A version of readTMQueue which does not retry. Instead it returns Just Nothing if the queue is open but no value is available; it still returns Nothing if the queue is closed and empty.

peekTMQueue :: TMQueue a -> STM (Maybe a) #

Get the next value from the TMQueue without removing it, retrying if the queue is empty.

tryPeekTMQueue :: TMQueue a -> STM (Maybe (Maybe a)) #

A version of peekTMQueue which does not retry. Instead it returns Just Nothing if the queue is open but no value is available; it still returns Nothing if the queue is closed and empty.

writeTMQueue :: TMQueue a -> a -> STM () #

Write a value to a TMQueue. If the queue is closed then the value is silently discarded. Use isClosedTMQueue to determine if the queue is closed before writing, as needed.

unGetTMQueue :: TMQueue a -> a -> STM () #

Put a data item back onto a queue, where it will be the next item read. If the queue is closed then the value is silently discarded; you can use peekTMQueue to circumvent this in certain circumstances.

closeTMQueue :: TMQueue a -> STM () #

Closes the TMQueue, preventing any further writes.

isClosedTMQueue :: TMQueue a -> STM Bool #

Returns True if the supplied TMQueue has been closed.

isEmptyTMQueue :: TMQueue a -> STM Bool #

Returns True if the supplied TMQueue is empty.

newMutVar :: PrimMonad m => a -> m (MutVar (PrimState m) a) #

Create a new MutVar with the specified initial value.

readMutVar :: PrimMonad m => MutVar (PrimState m) a -> m a #

Read the value of a MutVar.

writeMutVar :: PrimMonad m => MutVar (PrimState m) a -> a -> m () #

Write a new value into a MutVar.

atomicModifyMutVar :: PrimMonad m => MutVar (PrimState m) a -> (a -> (a, b)) -> m b #

Atomically mutate the contents of a MutVar.

This function is useful for using MutVar in a safe way in a multithreaded program. If you only have one MutVar, then using atomicModifyMutVar to access and modify it will prevent race conditions.

Extending the atomicity to multiple MutVars is problematic, so if you need to do anything more complicated, using MVar instead is a good idea.

atomicModifyMutVar does not apply the function strictly. This means if a program calls atomicModifyMutVar many times, but seldom uses the value, thunks will pile up in memory resulting in a space leak. To avoid this problem, use atomicModifyMutVar' instead.

atomicModifyMutVar' :: PrimMonad m => MutVar (PrimState m) a -> (a -> (a, b)) -> m b #

Strict version of atomicModifyMutVar. This forces both the value stored in the MutVar as well as the value returned.

modifyMutVar :: PrimMonad m => MutVar (PrimState m) a -> (a -> a) -> m () #

Mutate the contents of a MutVar.

modifyMutVar does not apply the function strictly. This means if a program calls modifyMutVar many times, but seldom uses the value, thunks will pile up in memory resulting in a space leak. To avoid this problem, use modifyMutVar' instead.

modifyMutVar' :: PrimMonad m => MutVar (PrimState m) a -> (a -> a) -> m () #

Strict version of modifyMutVar.

replaceElem :: (MonoFunctor mono, Eq (Element mono)) => Element mono -> Element mono -> mono -> mono #

replaceElem old new replaces all old elements with new.

Since: mono-traversable-1.0.1

headMay :: MonoFoldable mono => mono -> Maybe (Element mono) #

Safe version of headEx.

Returns Nothing instead of throwing an exception when encountering an empty monomorphic container.

lastMay :: MonoFoldable mono => mono -> Maybe (Element mono) #

Safe version of lastEx.

Returns Nothing instead of throwing an exception when encountering an empty monomorphic container.

osum :: (MonoFoldable mono, Num (Element mono)) => mono -> Element mono #

osum computes the sum of the numbers of a monomorphic container.

oproduct :: (MonoFoldable mono, Num (Element mono)) => mono -> Element mono #

oproduct computes the product of the numbers of a monomorphic container.

oand :: (Element mono ~ Bool, MonoFoldable mono) => mono -> Bool #

Are all of the elements True?

Since: mono-traversable-0.6.0

oor :: (Element mono ~ Bool, MonoFoldable mono) => mono -> Bool #

Are any of the elements True?

Since: mono-traversable-0.6.0

oconcatMap :: (MonoFoldable mono, Monoid m) => (Element mono -> m) -> mono -> m #

Synonym for ofoldMap

Since: mono-traversable-1.0.0

ofold :: (MonoFoldable mono, Monoid (Element mono)) => mono -> Element mono #

Monoidally combine all values in the container

Since: mono-traversable-1.0.0

oconcat :: (MonoFoldable mono, Monoid (Element mono)) => mono -> Element mono #

Synonym for ofold

Since: mono-traversable-1.0.0

ofoldM :: (MonoFoldable mono, Monad m) => (a -> Element mono -> m a) -> a -> mono -> m a #

Synonym for ofoldlM

Since: mono-traversable-1.0.0

osequence_ :: (Applicative m, MonoFoldable mono, Element mono ~ m ()) => mono -> m () #

Perform all actions in the given container

Since: mono-traversable-1.0.0

maximumEx :: (MonoFoldable mono, Ord (Element mono)) => mono -> Element mono #

Get the minimum element of a monomorphic container.

Note: this is a partial function. On an empty MonoFoldable, it will throw an exception.

See maximum from Data.NonNull for a total version of this function.

minimumEx :: (MonoFoldable mono, Ord (Element mono)) => mono -> Element mono #

Get the maximum element of a monomorphic container.

Note: this is a partial function. On an empty MonoFoldable, it will throw an exception.

See minimum from Data.NonNull for a total version of this function.

maximumMay :: (MonoFoldable mono, Ord (Element mono)) => mono -> Maybe (Element mono) #

Safe version of maximumEx.

Returns Nothing instead of throwing an exception when encountering an empty monomorphic container.

maximumByMay :: MonoFoldable mono => (Element mono -> Element mono -> Ordering) -> mono -> Maybe (Element mono) #

Safe version of maximumByEx.

Returns Nothing instead of throwing an exception when encountering an empty monomorphic container.

minimumMay :: (MonoFoldable mono, Ord (Element mono)) => mono -> Maybe (Element mono) #

Safe version of minimumEx.

Returns Nothing instead of throwing an exception when encountering an empty monomorphic container.

minimumByMay :: MonoFoldable mono => (Element mono -> Element mono -> Ordering) -> mono -> Maybe (Element mono) #

Safe version of minimumByEx.

Returns Nothing instead of throwing an exception when encountering an empty monomorphic container.

ofor :: (MonoTraversable mono, Applicative f) => mono -> (Element mono -> f (Element mono)) -> f mono #

ofor is otraverse with its arguments flipped.

oforM :: (MonoTraversable mono, Applicative f) => mono -> (Element mono -> f (Element mono)) -> f mono #

oforM is omapM with its arguments flipped.

ofoldlUnwrap :: MonoFoldable mono => (x -> Element mono -> x) -> x -> (x -> b) -> mono -> b #

A strict left fold, together with an unwrap function.

This is convenient when the accumulator value is not the same as the final expected type. It is provided mainly for integration with the foldl package, to be used in conjunction with purely.

Since: mono-traversable-0.3.1

ofoldMUnwrap :: (Monad m, MonoFoldable mono) => (x -> Element mono -> m x) -> m x -> (x -> m b) -> mono -> m b #

A monadic strict left fold, together with an unwrap function.

Similar to foldlUnwrap, but allows monadic actions. To be used with impurely from foldl.

Since: mono-traversable-0.3.1

ointercalate :: (MonoFoldable mono, Monoid (Element mono)) => Element mono -> mono -> Element mono #

intercalate seq seqs inserts seq in between seqs and concatenates the result.

Since: mono-traversable-1.0.0

unwrapMono :: WrappedMono mono a -> mono #

Unwraps a WrappedMono.

Since: mono-traversable-1.0.14.0

length64 :: MonoFoldable mono => mono -> Int64 #

Synonym for olength64

Since: mono-traversable-1.0.0

foldMap1Ex :: (MonoFoldable mono, Semigroup m) => (Element mono -> m) -> mono -> m #

Synonym for ofoldMap1Ex

Since: mono-traversable-1.0.0

foldr1Ex :: MonoFoldable mono => (Element mono -> Element mono -> Element mono) -> mono -> Element mono #

Synonym for ofoldr1Ex

Since: mono-traversable-1.0.0

foldl1Ex' :: MonoFoldable mono => (Element mono -> Element mono -> Element mono) -> mono -> Element mono #

Synonym for ofoldl1Ex'

Since: mono-traversable-1.0.0

point :: MonoPointed mono => Element mono -> mono #

Synonym for opoint

Since: mono-traversable-1.0.0

defaultFind :: MonoFoldable seq => (Element seq -> Bool) -> seq -> Maybe (Element seq) #

Use Data.List's implementation of find.

defaultIntersperse :: IsSequence seq => Element seq -> seq -> seq #

Use Data.List's implementation of intersperse.

defaultReverse :: IsSequence seq => seq -> seq #

Use Data.List's implementation of reverse.

defaultSortBy :: IsSequence seq => (Element seq -> Element seq -> Ordering) -> seq -> seq #

Use Data.List's implementation of sortBy.

defaultSplitWhen :: IsSequence seq => (Element seq -> Bool) -> seq -> [seq] #

vectorSortBy :: Vector v e => (e -> e -> Ordering) -> v e -> v e #

Sort a vector using an supplied element ordering function.

vectorSort :: (Vector v e, Ord e) => v e -> v e #

Sort a vector.

defaultCons :: IsSequence seq => Element seq -> seq -> seq #

Use Data.List's : to prepend an element to a sequence.

defaultSnoc :: IsSequence seq => seq -> Element seq -> seq #

Use Data.List's ++ to append an element to a sequence.

tailDef :: IsSequence seq => seq -> seq #

like Data.List.tail, but an input of mempty returns mempty

initDef :: IsSequence seq => seq -> seq #

like Data.List.init, but an input of mempty returns mempty

splitElem :: (IsSequence seq, Eq (Element seq)) => Element seq -> seq -> [seq] #

splitElem splits a sequence into components delimited by separator element. It's equivalent to splitWhen with equality predicate:

splitElem sep === splitWhen (== sep)

Since 0.9.3

splitSeq :: (IsSequence seq, Eq (Element seq)) => seq -> seq -> [seq] #

splitSeq splits a sequence into components delimited by separator subsequence. splitSeq is the right inverse of intercalate:

ointercalate x . splitSeq x === id

splitElem can be considered a special case of splitSeq

splitSeq (singleton sep) === splitElem sep

splitSeq mempty is another special case: it splits just before each element, and in line with splitWhen rules, it has at least one output component:

> splitSeq "" ""
[""]
> splitSeq "" "a"
["", "a"]
> splitSeq "" "ab"
["", "a", "b"]

Since 0.9.3

replaceSeq :: (IsSequence seq, Eq (Element seq)) => seq -> seq -> seq -> seq #

replaceSeq old new replaces all old subsequences with new.

replaceSeq old new === ointercalate new . splitSeq old

Since: mono-traversable-1.0.1

dropPrefix :: (IsSequence seq, Eq (Element seq)) => seq -> seq -> seq #

dropPrefix drops the given prefix from a sequence. It returns the original sequence if the sequence doesn't start with the given prefix.

> dropPrefix "foo" "foobar"
"bar"
> dropPrefix "abc" "foobar"
"foobar"

Since: mono-traversable-1.0.7.0

dropSuffix :: (IsSequence seq, Eq (Element seq)) => seq -> seq -> seq #

dropSuffix drops the given suffix from a sequence. It returns the original sequence if the sequence doesn't end with the given suffix.

> dropSuffix "bar" "foobar"
"foo"
> dropSuffix "abc" "foobar"
"foobar"

Since: mono-traversable-1.0.7.0

ensurePrefix :: (Eq (Element seq), IsSequence seq) => seq -> seq -> seq #

ensurePrefix will add a prefix to a sequence if it doesn't exist, and otherwise have no effect.

> ensurePrefix "foo" "foobar"
"foobar"
> ensurePrefix "abc" "foobar"
"abcfoobar"

Since: mono-traversable-1.0.3

ensureSuffix :: (Eq (Element seq), IsSequence seq) => seq -> seq -> seq #

Append a suffix to a sequence, unless it already has that suffix.

> ensureSuffix "bar" "foobar"
"foobar"
> ensureSuffix "abc" "foobar"
"foobarabc"

Since: mono-traversable-1.0.3

groupAll :: (IsSequence seq, Eq (Element seq)) => seq -> [seq] #

Similar to standard group, but operates on the whole collection, not just the consecutive items.

Equivalent to groupAllOn id

repack :: (MonoFoldable a, IsSequence b, Element a ~ Element b) => a -> b #

Repack from one type to another, dropping to a list in the middle.

repack = pack . unpack.

Since: mono-traversable-1.0.0

fromNonEmpty :: IsSequence seq => NonEmpty (Element seq) -> NonNull seq #

Safely convert from a NonEmpty list to a non-null monomorphic container.

ofoldMap1 :: (MonoFoldable mono, Semigroup m) => (Element mono -> m) -> NonNull mono -> m #

Map each element of a monomorphic container to a semigroup, and combine the results.

Safe version of ofoldMap1Ex, only works on monomorphic containers wrapped in a NonNull.

Examples

Expand
> let xs = ncons ("hello", 1 :: Integer) [(" world", 2)]
> ofoldMap1 fst xs
"hello world"

ofoldr1 :: MonoFoldable mono => (Element mono -> Element mono -> Element mono) -> NonNull mono -> Element mono #

Right-associative fold of a monomorphic container with no base element.

Safe version of ofoldr1Ex, only works on monomorphic containers wrapped in a NonNull.

foldr1 f = Prelude.foldr1 f . otoList

Examples

Expand
> let xs = ncons "a" ["b", "c"]
> ofoldr1 (++) xs
"abc"

ofoldl1' :: MonoFoldable mono => (Element mono -> Element mono -> Element mono) -> NonNull mono -> Element mono #

Strict left-associative fold of a monomorphic container with no base element.

Safe version of ofoldl1Ex', only works on monomorphic containers wrapped in a NonNull.

foldl1' f = Prelude.foldl1' f . otoList

Examples

Expand
> let xs = ncons "a" ["b", "c"]
> ofoldl1' (++) xs
"abc"

fromNullable :: MonoFoldable mono => mono -> Maybe (NonNull mono) #

Safely convert from an unsafe monomorphic container to a safe non-null monomorphic container.

impureNonNull :: MonoFoldable mono => mono -> NonNull mono #

Unsafely convert from an unsafe monomorphic container to a safe non-null monomorphic container.

Throws an exception if the monomorphic container is empty.

Since: mono-traversable-1.0.0

nonNull :: MonoFoldable mono => mono -> NonNull mono #

Old synonym for impureNonNull

toMinList :: NonEmpty a -> NonNull [a] #

Specializes fromNonEmpty to lists only.

ncons :: SemiSequence seq => Element seq -> seq -> NonNull seq #

Prepend an element to a SemiSequence, creating a non-null SemiSequence.

Generally this uses cons underneath. cons is not efficient for most data structures.

Alternatives:

  • if you don't need to cons, use fromNullable or nonNull if you can create your structure in one go.
  • if you need to cons, you might be able to start off with an efficient data structure such as a NonEmpty List. fronNonEmpty will convert that to your data structure using the structure's fromList function.

nuncons :: IsSequence seq => NonNull seq -> (Element seq, Maybe (NonNull seq)) #

Extract the first element of a sequnce and the rest of the non-null sequence if it exists.

splitFirst :: IsSequence seq => NonNull seq -> (Element seq, seq) #

Same as nuncons with no guarantee that the rest of the sequence is non-null.

nfilter :: IsSequence seq => (Element seq -> Bool) -> NonNull seq -> seq #

Equivalent to Data.Sequences.filter, but works on non-nullable sequences.

nfilterM :: (Monad m, IsSequence seq) => (Element seq -> m Bool) -> NonNull seq -> m seq #

Equivalent to Data.Sequences.filterM, but works on non-nullable sequences.

nReplicate :: IsSequence seq => Index seq -> Element seq -> NonNull seq #

Equivalent to Data.Sequences.replicate

i must be > 0

i <= 0 is treated the same as providing 1

ofold1 :: (MonoFoldable mono, Semigroup (Element mono)) => NonNull mono -> Element mono #

Join a monomorphic container, whose elements are Semigroups, together.

Safe, only works on monomorphic containers wrapped in a NonNull.

Examples

Expand
> let xs = ncons "a" ["b", "c"]
> xs
NonNull {toNullable = ["a","b","c"]}

> ofold1 xs
"abc"

mapNonNull :: (Functor f, MonoFoldable (f b)) => (a -> b) -> NonNull (f a) -> NonNull (f b) #

fmap over the underlying container in a NonNull.

Since: mono-traversable-1.0.6.0

sayString :: MonadIO m => String -> m () #

Same as say, but operates on a String. Note that this will force the entire String into memory at once, and will fail for infinite Strings.

Since: say-0.1.0.0

sayShow :: (MonadIO m, Show a) => a -> m () #

Same as say, but for instances of Show.

If your Show instance generates infinite output, this will fail. However, an infinite result for show would generally be considered an invalid instance anyway.

Since: say-0.1.0.0

sayErr :: MonadIO m => Text -> m () #

Same as say, but data is sent to standard error.

Since: say-0.1.0.0

sayErrString :: MonadIO m => String -> m () #

Same as sayString, but data is sent to standard error.

Since: say-0.1.0.0

sayErrShow :: (MonadIO m, Show a) => a -> m () #

Same as sayShow, but data is sent to standard error.

Since: say-0.1.0.0

hSay :: MonadIO m => Handle -> Text -> m () #

Same as say, but data is sent to the provided Handle.

Since: say-0.1.0.0

hSayString :: MonadIO m => Handle -> String -> m () #

Same as sayString, but data is sent to the provided Handle.

Since: say-0.1.0.0

hSayShow :: (MonadIO m, Show a) => Handle -> a -> m () #

Same as sayShow, but data is sent to the provided Handle.

Since: say-0.1.0.0

mkAcquire #

Arguments

:: IO a

acquire the resource

-> (a -> IO ())

free the resource

-> Acquire a 

Create an Acquire value using the given allocate and free functions.

To acquire and free the resource in an arbitrary monad with MonadUnliftIO, do the following:

acquire <- withRunInIO $ \runInIO ->
  return $ mkAcquire (runInIO create) (runInIO . free)

Note that this is only safe if the Acquire is run and freed within the same monadic scope it was created in.

Since: resourcet-1.1.0

mkAcquireType #

Arguments

:: IO a

acquire the resource

-> (a -> ReleaseType -> IO ())

free the resource

-> Acquire a 

Same as mkAcquire, but the cleanup function will be informed of how cleanup was initiated. This allows you to distinguish, for example, between normal and exceptional exits.

To acquire and free the resource in an arbitrary monad with MonadUnliftIO, do the following:

acquire <- withRunInIO $ \runInIO ->
  return $ mkAcquireType (runInIO create) (\a -> runInIO . free a)

Note that this is only safe if the Acquire is run and freed within the same monadic scope it was created in.

Since: resourcet-1.1.2

allocateAcquire :: MonadResource m => Acquire a -> m (ReleaseKey, a) #

Allocate a resource and register an action with the MonadResource to free the resource.

Since: resourcet-1.1.0

withAcquire :: MonadUnliftIO m => Acquire a -> (a -> m b) -> m b #

Longer name for with, in case with is not obvious enough in context.

Since: resourcet-1.2.0

runResourceT :: MonadUnliftIO m => ResourceT m a -> m a #

Unwrap a ResourceT transformer, and call all registered release actions.

Note that there is some reference counting involved due to resourceForkIO. If multiple threads are sharing the same collection of resources, only the last call to runResourceT will deallocate the resources.

NOTE Since version 1.2.0, this function will throw a ResourceCleanupException if any of the cleanup functions throw an exception.

Since: resourcet-0.3.0

sealConduitT :: forall i o (m :: Type -> Type) r. ConduitT i o m r -> SealedConduitT i o m r #

unsealConduitT :: forall (m :: Type -> Type) i o r. Monad m => SealedConduitT i o m r -> ConduitT i o m r #

toProducer :: forall (m :: Type -> Type) a i. Monad m => ConduitT () a m () -> ConduitT i a m () #

Generalize a Source to a Producer.

Since 1.0.0

toConsumer :: forall (m :: Type -> Type) a b o. Monad m => ConduitT a Void m b -> ConduitT a o m b #

Generalize a Sink to a Consumer.

Since 1.0.0

catchC :: forall (m :: Type -> Type) e i o r. (MonadUnliftIO m, Exception e) => ConduitT i o m r -> (e -> ConduitT i o m r) -> ConduitT i o m r #

Catch all exceptions thrown by the current component of the pipeline.

Note: this will not catch exceptions thrown by other components! For example, if an exception is thrown in a Source feeding to a Sink, and the Sink uses catchC, the exception will not be caught.

Due to this behavior (as well as lack of async exception safety), you should not try to implement combinators such as onException in terms of this primitive function.

Note also that the exception handling will not be applied to any finalizers generated by this conduit.

Since 1.0.11

handleC :: forall (m :: Type -> Type) e i o r. (MonadUnliftIO m, Exception e) => (e -> ConduitT i o m r) -> ConduitT i o m r -> ConduitT i o m r #

The same as flip catchC.

Since 1.0.11

tryC :: forall (m :: Type -> Type) e i o r. (MonadUnliftIO m, Exception e) => ConduitT i o m r -> ConduitT i o m (Either e r) #

A version of try for use within a pipeline. See the comments in catchC for more details.

Since 1.0.11

fuseReturnLeftovers :: forall (m :: Type -> Type) a b c r. Monad m => ConduitT a b m () -> ConduitT b c m r -> ConduitT a c m (r, [b]) #

Same as normal fusion (e.g. =$=), except instead of discarding leftovers from the downstream component, return them.

Since 1.0.17

fuseLeftovers :: forall (m :: Type -> Type) b a c r. Monad m => ([b] -> [a]) -> ConduitT a b m () -> ConduitT b c m r -> ConduitT a c m r #

Similar to fuseReturnLeftovers, but use the provided function to convert downstream leftovers to upstream leftovers.

Since 1.0.17

mergeSource :: forall (m :: Type -> Type) i a. Monad m => ConduitT () i m () -> ConduitT a (i, a) m () #

Merge a Source into a Conduit. The new conduit will stop processing once either source or upstream have been exhausted.

passthroughSink #

Arguments

:: Monad m 
=> ConduitT i Void m r 
-> (r -> m ())

finalizer

-> ConduitT i i m () 

Turn a Sink into a Conduit in the following way:

  • All input passed to the Sink is yielded downstream.
  • When the Sink finishes processing, the result is passed to the provided to the finalizer function.

Note that the Sink will stop receiving input as soon as the downstream it is connected to shuts down.

An example usage would be to write the result of a Sink to some mutable variable while allowing other processing to continue.

Since 1.1.0

sourceToList :: Monad m => ConduitT () a m () -> m [a] #

Convert a Source into a list. The basic functionality can be explained as:

sourceToList src = src $$ Data.Conduit.List.consume

However, sourceToList is able to produce its results lazily, which cannot be done when running a conduit pipeline in general. Unlike the Data.Conduit.Lazy module (in conduit-extra), this function performs no unsafe I/O operations, and therefore can only be as lazy as the underlying monad.

Since 1.2.6

connect :: Monad m => ConduitT () a m () -> ConduitT a Void m r -> m r #

Equivalent to using runConduit and .| together.

Since 1.2.3

fuse :: forall (m :: Type -> Type) a b c r. Monad m => ConduitT a b m () -> ConduitT b c m r -> ConduitT a c m r #

Named function synonym for .|

Equivalent to .| and =$=. However, the latter is deprecated and will be removed in a future version.

Since 1.2.3

(.|) infixr 2 #

Arguments

:: forall (m :: Type -> Type) a b c r. Monad m 
=> ConduitT a b m ()

upstream

-> ConduitT b c m r

downstream

-> ConduitT a c m r 

Combine two Conduits together into a new Conduit (aka fuse).

Output from the upstream (left) conduit will be fed into the downstream (right) conduit. Processing will terminate when downstream (right) returns. Leftover data returned from the right Conduit will be discarded.

Equivalent to fuse and =$=, however the latter is deprecated and will be removed in a future version.

Note that, while this operator looks like categorical composition (from Control.Category), there are a few reasons it's different:

  • The position of the type parameters to ConduitT do not match. We would need to change ConduitT i o m r to ConduitT r m i o, which would preclude a Monad or MonadTrans instance.
  • The result value from upstream and downstream are allowed to differ between upstream and downstream. In other words, we would need the type signature here to look like ConduitT a b m r -> ConduitT b c m r -> ConduitT a c m r.
  • Due to leftovers, we do not have a left identity in Conduit. This can be achieved with the underlying Pipe datatype, but this is not generally recommended. See https://stackoverflow.com/a/15263700.

Since: conduit-1.2.8

($$) :: Monad m => Source m a -> Sink a m b -> m b infixr 0 #

The connect operator, which pulls data from a source and pushes to a sink. If you would like to keep the Source open to be used for other operations, use the connect-and-resume operator $$+.

Since 0.4.0

(=$) :: forall (m :: Type -> Type) a b c r. Monad m => Conduit a m b -> ConduitT b c m r -> ConduitT a c m r infixr 2 #

A synonym for =$= for backwards compatibility.

Since 0.4.0

(=$=) :: forall (m :: Type -> Type) a b c r. Monad m => Conduit a m b -> ConduitT b c m r -> ConduitT a c m r infixr 2 #

Deprecated fusion operator.

Since 0.4.0

await :: forall (m :: Type -> Type) i o. Monad m => ConduitT i o m (Maybe i) #

Wait for a single input value from upstream. If no data is available, returns Nothing. Once await returns Nothing, subsequent calls will also return Nothing.

Since 0.5.0

yieldM :: Monad m => m o -> ConduitT i o m () #

Send a monadic value downstream for the next component to consume.

Since: conduit-1.2.7

leftover :: forall i o (m :: Type -> Type). i -> ConduitT i o m () #

Provide a single piece of leftover input to be consumed by the next component in the current monadic binding.

Note: it is highly encouraged to only return leftover values from input already consumed from upstream.

Since: conduit-0.5.0

runConduit :: Monad m => ConduitT () Void m r -> m r #

Run a pipeline until processing completes.

Since 1.2.1

bracketP #

Arguments

:: forall (m :: Type -> Type) a i o r. MonadResource m 
=> IO a

computation to run first ("acquire resource")

-> (a -> IO ())

computation to run last ("release resource")

-> (a -> ConduitT i o m r)

computation to run in-between

-> ConduitT i o m r 

Bracket a conduit computation between allocation and release of a resource. Two guarantees are given about resource finalization:

  1. It will be prompt. The finalization will be run as early as possible.
  2. It is exception safe. Due to usage of resourcet, the finalization will be run in the event of any exceptions.

Since 0.5.0

awaitForever :: forall (m :: Type -> Type) i o r. Monad m => (i -> ConduitT i o m r) -> ConduitT i o m () #

Wait for input forever, calling the given inner component for each piece of new input.

This function is provided as a convenience for the common pattern of awaiting input, checking if it's Just and then looping.

Since 0.5.0

transPipe :: Monad m => (forall a. m a -> n a) -> ConduitT i o m r -> ConduitT i o n r #

Transform the monad that a ConduitT lives in.

Note that the monad transforming function will be run multiple times, resulting in unintuitive behavior in some cases. For a fuller treatment, please see:

https://github.com/snoyberg/conduit/wiki/Dealing-with-monad-transformers

Since 0.4.0

mapOutput :: forall (m :: Type -> Type) o1 o2 i r. Monad m => (o1 -> o2) -> ConduitT i o1 m r -> ConduitT i o2 m r #

Apply a function to all the output values of a ConduitT.

This mimics the behavior of fmap for a Source and Conduit in pre-0.4 days. It can also be simulated by fusing with the map conduit from Data.Conduit.List.

Since 0.4.1

mapOutputMaybe :: forall (m :: Type -> Type) o1 o2 i r. Monad m => (o1 -> Maybe o2) -> ConduitT i o1 m r -> ConduitT i o2 m r #

Same as mapOutput, but use a function that returns Maybe values.

Since 0.5.0

mapInput #

Arguments

:: forall (m :: Type -> Type) i1 i2 o r. Monad m 
=> (i1 -> i2)

map initial input to new input

-> (i2 -> Maybe i1)

map new leftovers to initial leftovers

-> ConduitT i2 o m r 
-> ConduitT i1 o m r 

Apply a function to all the input values of a ConduitT.

Since 0.5.0

mapInputM #

Arguments

:: Monad m 
=> (i1 -> m i2)

map initial input to new input

-> (i2 -> m (Maybe i1))

map new leftovers to initial leftovers

-> ConduitT i2 o m r 
-> ConduitT i1 o m r 

Apply a monadic action to all the input values of a ConduitT.

Since 1.3.2

($$+) :: Monad m => ConduitT () a m () -> ConduitT a Void m b -> m (SealedConduitT () a m (), b) infixr 0 #

The connect-and-resume operator. This does not close the Source, but instead returns it to be used again. This allows a Source to be used incrementally in a large program, without forcing the entire program to live in the Sink monad.

Mnemonic: connect + do more.

Since 0.5.0

($$++) :: Monad m => SealedConduitT () a m () -> ConduitT a Void m b -> m (SealedConduitT () a m (), b) infixr 0 #

Continue processing after usage of $$+.

Since 0.5.0

($$+-) :: Monad m => SealedConduitT () a m () -> ConduitT a Void m b -> m b infixr 0 #

Same as $$++ and connectResume, but doesn't include the updated SealedConduitT.

NOTE In previous versions, this would cause finalizers to run. Since version 1.3.0, there are no finalizers in conduit.

Since 0.5.0

($=+) :: forall (m :: Type -> Type) a b. Monad m => SealedConduitT () a m () -> ConduitT a b m () -> SealedConduitT () b m () infixl 1 #

Left fusion for a sealed source.

Since 1.0.16

sequenceSources :: forall f (m :: Type -> Type) o. (Traversable f, Monad m) => f (ConduitT () o m ()) -> ConduitT () (f o) m () #

Coalesce all values yielded by all of the Sources.

Implemented on top of ZipSource and as such, it exhibits the same short-circuiting behavior as ZipSource. See that data type for more details. If you want to create a source that yields *all* values from multiple sources, use sequence_.

Since 1.0.13

sequenceSinks :: forall f (m :: Type -> Type) i r. (Traversable f, Monad m) => f (ConduitT i Void m r) -> ConduitT i Void m (f r) #

Send incoming values to all of the Sink providing, and ultimately coalesce together all return values.

Implemented on top of ZipSink, see that data type for more details.

Since 1.0.13

(=$$+) :: forall (m :: Type -> Type) a b r. Monad m => ConduitT a b m () -> ConduitT b Void m r -> ConduitT a Void m (SealedConduitT a b m (), r) infixr 0 #

The connect-and-resume operator. This does not close the Conduit, but instead returns it to be used again. This allows a Conduit to be used incrementally in a large program, without forcing the entire program to live in the Sink monad.

Leftover data returned from the Sink will be discarded.

Mnemonic: connect + do more.

Since 1.0.17

(=$$++) :: forall (m :: Type -> Type) i o r. Monad m => SealedConduitT i o m () -> ConduitT o Void m r -> ConduitT i Void m (SealedConduitT i o m (), r) infixr 0 #

Continue processing after usage of =$$+. Connect a SealedConduitT to a sink and return the output of the sink together with a new SealedConduitT.

Since 1.0.17

(=$$+-) :: forall (m :: Type -> Type) i o r. Monad m => SealedConduitT i o m () -> ConduitT o Void m r -> ConduitT i Void m r infixr 0 #

Same as =$$++, but doesn't include the updated SealedConduitT.

NOTE In previous versions, this would cause finalizers to run. Since version 1.3.0, there are no finalizers in conduit.

Since 1.0.17

sequenceConduits :: forall f (m :: Type -> Type) i o r. (Traversable f, Monad m) => f (ConduitT i o m r) -> ConduitT i o m (f r) #

Provide identical input to all of the Conduits and combine their outputs into a single stream.

Implemented on top of ZipConduit, see that data type for more details.

Since 1.0.17

fuseBoth :: forall (m :: Type -> Type) a b r1 c r2. Monad m => ConduitT a b m r1 -> ConduitT b c m r2 -> ConduitT a c m (r1, r2) #

Fuse two ConduitTs together, and provide the return value of both. Note that this will force the entire upstream ConduitT to be run to produce the result value, even if the downstream terminates early.

Since 1.1.5

fuseBothMaybe :: forall (m :: Type -> Type) a b r1 c r2. Monad m => ConduitT a b m r1 -> ConduitT b c m r2 -> ConduitT a c m (Maybe r1, r2) #

Like fuseBoth, but does not force consumption of the Producer. In the case that the Producer terminates, the result value is provided as a Just value. If it does not terminate, then a Nothing value is returned.

One thing to note here is that "termination" here only occurs if the Producer actually yields a Nothing value. For example, with the Producer mapM_ yield [1..5], if five values are requested, the Producer has not yet terminated. Termination only occurs when the sixth value is awaited for and the Producer signals termination.

Since 1.2.4

fuseUpstream :: forall (m :: Type -> Type) a b r c. Monad m => ConduitT a b m r -> ConduitT b c m () -> ConduitT a c m r #

Same as fuseBoth, but ignore the return value from the downstream Conduit. Same caveats of forced consumption apply.

Since 1.1.5

runConduitPure :: ConduitT () Void Identity r -> r #

Run a pure pipeline until processing completes, i.e. a pipeline with Identity as the base monad. This is equivalient to runIdentity . runConduit.

Since: conduit-1.2.8

runConduitRes :: MonadUnliftIO m => ConduitT () Void (ResourceT m) r -> m r #

Run a pipeline which acquires resources with ResourceT, and then run the ResourceT transformer. This is equivalent to runResourceT . runConduit.

Since: conduit-1.2.8

exceptC :: forall (m :: Type -> Type) i o e a. Monad m => ConduitT i o m (Either e a) -> ConduitT i o (ExceptT e m) a #

Wrap the base monad in ExceptT

Since 1.2.12

runExceptC :: forall (m :: Type -> Type) i o e r. Monad m => ConduitT i o (ExceptT e m) r -> ConduitT i o m (Either e r) #

Run ExceptT in the base monad

Since 1.2.12

catchExceptC :: forall (m :: Type -> Type) i o e r. Monad m => ConduitT i o (ExceptT e m) r -> (e -> ConduitT i o (ExceptT e m) r) -> ConduitT i o (ExceptT e m) r #

Catch an error in the base monad

Since 1.2.12

runCatchC :: forall (m :: Type -> Type) i o r. Monad m => ConduitT i o (CatchT m) r -> ConduitT i o m (Either SomeException r) #

Run CatchT in the base monad

Since 1.1.0

catchCatchC :: forall (m :: Type -> Type) i o r. Monad m => ConduitT i o (CatchT m) r -> (SomeException -> ConduitT i o (CatchT m) r) -> ConduitT i o (CatchT m) r #

Catch an exception in the base monad

Since 1.1.0

maybeC :: forall (m :: Type -> Type) i o a. Monad m => ConduitT i o m (Maybe a) -> ConduitT i o (MaybeT m) a #

Wrap the base monad in MaybeT

Since 1.0.11

runMaybeC :: forall (m :: Type -> Type) i o r. Monad m => ConduitT i o (MaybeT m) r -> ConduitT i o m (Maybe r) #

Run MaybeT in the base monad

Since 1.0.11

readerC :: forall (m :: Type -> Type) r i o a. Monad m => (r -> ConduitT i o m a) -> ConduitT i o (ReaderT r m) a #

Wrap the base monad in ReaderT

Since 1.0.11

runReaderC :: forall (m :: Type -> Type) r i o res. Monad m => r -> ConduitT i o (ReaderT r m) res -> ConduitT i o m res #

Run ReaderT in the base monad

Since 1.0.11

stateLC :: forall (m :: Type -> Type) s i o a. Monad m => (s -> ConduitT i o m (a, s)) -> ConduitT i o (StateT s m) a #

Wrap the base monad in StateT

Since 1.0.11

runStateLC :: forall (m :: Type -> Type) s i o r. Monad m => s -> ConduitT i o (StateT s m) r -> ConduitT i o m (r, s) #

Run StateT in the base monad

Since 1.0.11

evalStateLC :: forall (m :: Type -> Type) s i o r. Monad m => s -> ConduitT i o (StateT s m) r -> ConduitT i o m r #

Evaluate StateT in the base monad

Since 1.0.11

execStateLC :: forall (m :: Type -> Type) s i o r. Monad m => s -> ConduitT i o (StateT s m) r -> ConduitT i o m s #

Execute StateT in the base monad

Since 1.0.11

stateC :: forall (m :: Type -> Type) s i o a. Monad m => (s -> ConduitT i o m (a, s)) -> ConduitT i o (StateT s m) a #

Wrap the base monad in StateT

Since 1.0.11

runStateC :: forall (m :: Type -> Type) s i o r. Monad m => s -> ConduitT i o (StateT s m) r -> ConduitT i o m (r, s) #

Run StateT in the base monad

Since 1.0.11

evalStateC :: forall (m :: Type -> Type) s i o r. Monad m => s -> ConduitT i o (StateT s m) r -> ConduitT i o m r #

Evaluate StateT in the base monad

Since 1.0.11

execStateC :: forall (m :: Type -> Type) s i o r. Monad m => s -> ConduitT i o (StateT s m) r -> ConduitT i o m s #

Execute StateT in the base monad

Since 1.0.11

writerLC :: forall (m :: Type -> Type) w i o b. (Monad m, Monoid w) => ConduitT i o m (b, w) -> ConduitT i o (WriterT w m) b #

Wrap the base monad in WriterT

Since 1.0.11

runWriterLC :: forall (m :: Type -> Type) w i o r. (Monad m, Monoid w) => ConduitT i o (WriterT w m) r -> ConduitT i o m (r, w) #

Run WriterT in the base monad

Since 1.0.11

execWriterLC :: forall (m :: Type -> Type) w i o r. (Monad m, Monoid w) => ConduitT i o (WriterT w m) r -> ConduitT i o m w #

Execute WriterT in the base monad

Since 1.0.11

writerC :: forall (m :: Type -> Type) w i o b. (Monad m, Monoid w) => ConduitT i o m (b, w) -> ConduitT i o (WriterT w m) b #

Wrap the base monad in WriterT

Since 1.0.11

runWriterC :: forall (m :: Type -> Type) w i o r. (Monad m, Monoid w) => ConduitT i o (WriterT w m) r -> ConduitT i o m (r, w) #

Run WriterT in the base monad

Since 1.0.11

execWriterC :: forall (m :: Type -> Type) w i o r. (Monad m, Monoid w) => ConduitT i o (WriterT w m) r -> ConduitT i o m w #

Execute WriterT in the base monad

Since 1.0.11

rwsLC :: forall (m :: Type -> Type) w r s i o a. (Monad m, Monoid w) => (r -> s -> ConduitT i o m (a, s, w)) -> ConduitT i o (RWST r w s m) a #

Wrap the base monad in RWST

Since 1.0.11

runRWSLC :: forall (m :: Type -> Type) w r s i o res. (Monad m, Monoid w) => r -> s -> ConduitT i o (RWST r w s m) res -> ConduitT i o m (res, s, w) #

Run RWST in the base monad

Since 1.0.11

evalRWSLC :: forall (m :: Type -> Type) w r s i o res. (Monad m, Monoid w) => r -> s -> ConduitT i o (RWST r w s m) res -> ConduitT i o m (res, w) #

Evaluate RWST in the base monad

Since 1.0.11

execRWSLC :: forall (m :: Type -> Type) w r s i o res. (Monad m, Monoid w) => r -> s -> ConduitT i o (RWST r w s m) res -> ConduitT i o m (s, w) #

Execute RWST in the base monad

Since 1.0.11

rwsC :: forall (m :: Type -> Type) w r s i o a. (Monad m, Monoid w) => (r -> s -> ConduitT i o m (a, s, w)) -> ConduitT i o (RWST r w s m) a #

Wrap the base monad in RWST

Since 1.0.11

runRWSC :: forall (m :: Type -> Type) w r s i o res. (Monad m, Monoid w) => r -> s -> ConduitT i o (RWST r w s m) res -> ConduitT i o m (res, s, w) #

Run RWST in the base monad

Since 1.0.11

evalRWSC :: forall (m :: Type -> Type) w r s i o res. (Monad m, Monoid w) => r -> s -> ConduitT i o (RWST r w s m) res -> ConduitT i o m (res, w) #

Evaluate RWST in the base monad

Since 1.0.11

execRWSC :: forall (m :: Type -> Type) w r s i o res. (Monad m, Monoid w) => r -> s -> ConduitT i o (RWST r w s m) res -> ConduitT i o m (s, w) #

Execute RWST in the base monad

Since 1.0.11

yieldMany :: forall (m :: Type -> Type) mono i. (Monad m, MonoFoldable mono) => mono -> ConduitT i (Element mono) m () #

Yield each of the values contained by the given MonoFoldable.

This will work on many data structures, including lists, ByteStrings, and Vectors.

Subject to fusion

Since: conduit-1.3.0

sourceLazy :: forall (m :: Type -> Type) lazy strict i. (Monad m, LazySequence lazy strict) => lazy -> ConduitT i strict m () #

Generate a producer by yielding each of the strict chunks in a LazySequence.

For more information, see toChunks.

Subject to fusion

Since: conduit-1.3.0

sourceHandle :: forall (m :: Type -> Type) i. MonadIO m => Handle -> ConduitT i ByteString m () #

Stream the contents of a Handle as binary data. Note that this function will not automatically close the Handle when processing completes, since it did not acquire the Handle in the first place.

Since: conduit-1.3.0

sourceHandleUnsafe :: forall (m :: Type -> Type) i. MonadIO m => Handle -> ConduitT i ByteString m () #

Same as sourceHandle, but instead of allocating a new buffer for each incoming chunk of data, reuses the same buffer. Therefore, the ByteStrings yielded by this function are not referentially transparent between two different yields.

This function will be slightly more efficient than sourceHandle by avoiding allocations and reducing garbage collections, but should only be used if you can guarantee that you do not reuse a ByteString (or any slice thereof) between two calls to await.

Since: conduit-1.3.0

sourceIOHandle :: forall (m :: Type -> Type) i. MonadResource m => IO Handle -> ConduitT i ByteString m () #

An alternative to sourceHandle. Instead of taking a pre-opened Handle, it takes an action that opens a Handle (in read mode), so that it can open it only when needed and close it as soon as possible.

Since: conduit-1.3.0

sourceFileBS :: forall (m :: Type -> Type) i. MonadResource m => FilePath -> ConduitT i ByteString m () #

Same as sourceFile. The alternate name is a holdover from an older version, when sourceFile was more polymorphic than it is today.

Since: conduit-1.3.0

sinkFile :: forall (m :: Type -> Type) o. MonadResource m => FilePath -> ConduitT ByteString o m () #

Stream all incoming data to the given file.

Since: conduit-1.3.0

sinkFileCautious :: forall (m :: Type -> Type) o. MonadResource m => FilePath -> ConduitM ByteString o m () #

Cautious version of sinkFile. The idea here is to stream the values to a temporary file in the same directory of the destination file, and only on successfully writing the entire file, moves it atomically to the destination path.

In the event of an exception occurring, the temporary file will be deleted and no move will be made. If the application shuts down without running exception handling (such as machine failure or a SIGKILL), the temporary file will remain and the destination file will be untouched.

Since: conduit-1.3.0

withSinkFileCautious :: forall m (n :: Type -> Type) o a. (MonadUnliftIO m, MonadIO n) => FilePath -> (ConduitM ByteString o n () -> m a) -> m a #

Like sinkFileCautious, but uses the with pattern instead of MonadResource.

Since: conduit-1.3.0

sinkTempFile #

Arguments

:: forall (m :: Type -> Type) o. MonadResource m 
=> FilePath

temp directory

-> String

filename pattern

-> ConduitM ByteString o m FilePath 

Stream data into a temporary file in the given directory with the given filename pattern, and return the temporary filename. The temporary file will be automatically deleted when exiting the active ResourceT block, if it still exists.

Since: conduit-1.3.0

sinkSystemTempFile #

Arguments

:: forall (m :: Type -> Type) o. MonadResource m 
=> String

filename pattern

-> ConduitM ByteString o m FilePath 

Same as sinkTempFile, but will use the default temp file directory for the system as the first argument.

Since: conduit-1.3.0

sinkHandle :: forall (m :: Type -> Type) o. MonadIO m => Handle -> ConduitT ByteString o m () #

Stream all incoming data to the given Handle. Note that this function does not flush and will not close the Handle when processing completes.

Since: conduit-1.3.0

sinkHandleBuilder :: forall (m :: Type -> Type) o. MonadIO m => Handle -> ConduitM Builder o m () #

Stream incoming builders, executing them directly on the buffer of the given Handle. Note that this function does not automatically close the Handle when processing completes. Pass flush to flush the buffer.

Since: conduit-1.3.0

sinkHandleFlush :: forall (m :: Type -> Type) o. MonadIO m => Handle -> ConduitM (Flush ByteString) o m () #

Stream incoming Flushes, executing them on IO.Handle Note that this function does not automatically close the Handle when processing completes

Since: conduit-1.3.0

sinkIOHandle :: forall (m :: Type -> Type) o. MonadResource m => IO Handle -> ConduitT ByteString o m () #

An alternative to sinkHandle. Instead of taking a pre-opened Handle, it takes an action that opens a Handle (in write mode), so that it can open it only when needed and close it as soon as possible.

Since: conduit-1.3.0

withSourceFile :: forall m (n :: Type -> Type) i a. (MonadUnliftIO m, MonadIO n) => FilePath -> (ConduitM i ByteString n () -> m a) -> m a #

Like withBinaryFile, but provides a source to read bytes from.

Since: conduit-1.3.0

withSinkFile :: forall m (n :: Type -> Type) o a. (MonadUnliftIO m, MonadIO n) => FilePath -> (ConduitM ByteString o n () -> m a) -> m a #

Like withBinaryFile, but provides a sink to write bytes to.

Since: conduit-1.3.0

withSinkFileBuilder :: forall m (n :: Type -> Type) o a. (MonadUnliftIO m, MonadIO n) => FilePath -> (ConduitM Builder o n () -> m a) -> m a #

Same as withSinkFile, but lets you use a Builder.

Since: conduit-1.3.0

sourceDirectory :: forall (m :: Type -> Type) i. MonadResource m => FilePath -> ConduitT i FilePath m () #

Stream the contents of the given directory, without traversing deeply.

This function will return all of the contents of the directory, whether they be files, directories, etc.

Note that the generated filepaths will be the complete path, not just the filename. In other words, if you have a directory foo containing files bar and baz, and you use sourceDirectory on foo, the results will be foo/bar and foo/baz.

Since: conduit-1.3.0

sourceDirectoryDeep #

Arguments

:: forall (m :: Type -> Type) i. MonadResource m 
=> Bool

Follow directory symlinks

-> FilePath

Root directory

-> ConduitT i FilePath m () 

Deeply stream the contents of the given directory.

This works the same as sourceDirectory, but will not return directories at all. This function also takes an extra parameter to indicate whether symlinks will be followed.

Since: conduit-1.3.0

sinkLazy :: forall (m :: Type -> Type) lazy strict o. (Monad m, LazySequence lazy strict) => ConduitT strict o m lazy #

Consume all incoming strict chunks into a lazy sequence. Note that the entirety of the sequence will be resident at memory.

This can be used to consume a stream of strict ByteStrings into a lazy ByteString, for example.

Subject to fusion

Since: conduit-1.3.0

sinkList :: forall (m :: Type -> Type) a o. Monad m => ConduitT a o m [a] #

Consume all values from the stream and return as a list. Note that this will pull all values into memory.

Subject to fusion

Since: conduit-1.3.0

sinkVector :: forall v a (m :: Type -> Type) o. (Vector v a, PrimMonad m) => ConduitT a o m (v a) #

Sink incoming values into a vector, growing the vector as necessary to fit more elements.

Note that using this function is more memory efficient than sinkList and then converting to a Vector, as it avoids intermediate list constructors.

Subject to fusion

Since: conduit-1.3.0

sinkVectorN #

Arguments

:: forall v a (m :: Type -> Type) o. (Vector v a, PrimMonad m) 
=> Int

maximum allowed size

-> ConduitT a o m (v a) 

Sink incoming values into a vector, up until size maxSize. Subsequent values will be left in the stream. If there are less than maxSize values present, returns a Vector of smaller size.

Note that using this function is more memory efficient than sinkList and then converting to a Vector, as it avoids intermediate list constructors.

Subject to fusion

Since: conduit-1.3.0

sinkLazyBuilder :: forall (m :: Type -> Type) o. Monad m => ConduitT Builder o m ByteString #

Same as sinkBuilder, but afterwards convert the builder to its lazy representation.

Alternatively, this could be considered an alternative to sinkLazy, with the following differences:

  • This function will allow multiple input types, not just the strict version of the lazy structure.
  • Some buffer copying may occur in this version.

Subject to fusion

Since: conduit-1.3.0

sinkNull :: forall (m :: Type -> Type) a o. Monad m => ConduitT a o m () #

Consume and discard all remaining values in the stream.

Subject to fusion

Since: conduit-1.3.0

awaitNonNull :: forall (m :: Type -> Type) a o. (Monad m, MonoFoldable a) => ConduitT a o m (Maybe (NonNull a)) #

Same as await, but discards any leading onull values.

Since: conduit-1.3.0

sinkFileBS :: forall (m :: Type -> Type) o. MonadResource m => FilePath -> ConduitT ByteString o m () #

sinkFile specialized to ByteString to help with type inference.

Since: conduit-1.3.0

builderToByteString :: forall (m :: Type -> Type). PrimMonad m => ConduitT Builder ByteString m () #

Incrementally execute builders and pass on the filled chunks as bytestrings.

Since: conduit-1.3.0

builderToByteStringFlush :: forall (m :: Type -> Type). PrimMonad m => ConduitT (Flush Builder) (Flush ByteString) m () #

Same as builderToByteString, but input and output are wrapped in Flush.

Since: conduit-1.3.0

unsafeBuilderToByteString :: forall (m :: Type -> Type). PrimMonad m => ConduitT Builder ByteString m () #

Incrementally execute builders on the given buffer and pass on the filled chunks as bytestrings. Note that, if the given buffer is too small for the execution of a build step, a larger one will be allocated.

WARNING: This conduit yields bytestrings that are NOT referentially transparent. Their content will be overwritten as soon as control is returned from the inner sink!

Since: conduit-1.3.0

builderToByteStringWith :: forall (m :: Type -> Type). PrimMonad m => BufferAllocStrategy -> ConduitT Builder ByteString m () #

A conduit that incrementally executes builders and passes on the filled chunks as bytestrings to an inner sink.

INV: All bytestrings passed to the inner sink are non-empty.

Since: conduit-1.3.0

builderToByteStringWithFlush :: forall (m :: Type -> Type). PrimMonad m => BufferAllocStrategy -> ConduitT (Flush Builder) (Flush ByteString) m () #

Since: conduit-1.3.0

allNewBuffersStrategy :: Int -> BufferAllocStrategy #

The simplest buffer allocation strategy: whenever a buffer is requested, allocate a new one that is big enough for the next build step to execute.

NOTE that this allocation strategy may spill quite some memory upon direct insertion of a bytestring by the builder. Thats no problem for garbage collection, but it may lead to unreasonably high memory consumption in special circumstances.

Since: conduit-1.3.0

reuseBufferStrategy :: IO Buffer -> BufferAllocStrategy #

An unsafe, but possibly more efficient buffer allocation strategy: reuse the buffer, if it is big enough for the next build step to execute.

Since: conduit-1.3.0

mapAccumS :: forall (m :: Type -> Type) a s b. Monad m => (a -> s -> ConduitT b Void m s) -> s -> ConduitT () b m () -> ConduitT a Void m s #

Consume a source with a strict accumulator, in a way piecewise defined by a controlling stream. The latter will be evaluated until it terminates.

>>> let f a s = liftM (:s) $ mapC (*a) =$ CL.take a
>>> reverse $ runIdentity $ yieldMany [0..3] $$ mapAccumS f [] (yieldMany [1..])
[[],[1],[4,6],[12,15,18]] :: [[Int]]

peekForever :: forall (m :: Type -> Type) i o. Monad m => ConduitT i o m () -> ConduitT i o m () #

Run a consuming conduit repeatedly, only stopping when there is no more data available from upstream.

Since: conduit-1.3.0

peekForeverE :: forall (m :: Type -> Type) i o. (Monad m, MonoFoldable i) => ConduitT i o m () -> ConduitT i o m () #

Run a consuming conduit repeatedly, only stopping when there is no more data available from upstream.

In contrast to peekForever, this function will ignore empty chunks of data. So for example, if a stream of data contains an empty ByteString, it is still treated as empty, and the consuming function is not called.

Since: conduit-1.3.0

unfoldC :: forall (m :: Type -> Type) b a i. Monad m => (b -> Maybe (a, b)) -> b -> ConduitT i a m () #

Generate a producer from a seed value.

Since: conduit-1.3.0

enumFromToC :: forall (m :: Type -> Type) a i. (Monad m, Enum a, Ord a) => a -> a -> ConduitT i a m () #

Enumerate from a value to a final value, inclusive, via succ.

This is generally more efficient than using Prelude's enumFromTo and combining with sourceList since this avoids any intermediate data structures.

Since: conduit-1.3.0

iterateC :: forall (m :: Type -> Type) a i. Monad m => (a -> a) -> a -> ConduitT i a m () #

Produces an infinite stream of repeated applications of f to x.

Since: conduit-1.3.0

repeatC :: forall (m :: Type -> Type) a i. Monad m => a -> ConduitT i a m () #

Produce an infinite stream consisting entirely of the given value.

Since: conduit-1.3.0

replicateC :: forall (m :: Type -> Type) a i. Monad m => Int -> a -> ConduitT i a m () #

Produce a finite stream consisting of n copies of the given value.

Since: conduit-1.3.0

repeatMC :: Monad m => m a -> ConduitT i a m () #

Repeatedly run the given action and yield all values it produces.

Since: conduit-1.3.0

repeatWhileMC :: Monad m => m a -> (a -> Bool) -> ConduitT i a m () #

Repeatedly run the given action and yield all values it produces, until the provided predicate returns False.

Since: conduit-1.3.0

replicateMC :: Monad m => Int -> m a -> ConduitT i a m () #

Perform the given action n times, yielding each result.

Since: conduit-1.3.0

stdinC :: forall (m :: Type -> Type) i. MonadIO m => ConduitT i ByteString m () #

sourceHandle applied to stdin.

Since: conduit-1.3.0

dropC :: forall (m :: Type -> Type) a o. Monad m => Int -> ConduitT a o m () #

Ignore a certain number of values in the stream.

Note: since this function doesn't produce anything, you probably want to use it with (>>) instead of directly plugging it into a pipeline:

>>> runConduit $ yieldMany [1..5] .| dropC 2 .| sinkList
[]
>>> runConduit $ yieldMany [1..5] .| (dropC 2 >> sinkList)
[3,4,5]

Since: conduit-1.3.0

dropCE :: forall (m :: Type -> Type) seq o. (Monad m, IsSequence seq) => Index seq -> ConduitT seq o m () #

Drop a certain number of elements from a chunked stream.

Note: you likely want to use it with monadic composition. See the docs for dropC.

Since: conduit-1.3.0

dropWhileC :: forall (m :: Type -> Type) a o. Monad m => (a -> Bool) -> ConduitT a o m () #

Drop all values which match the given predicate.

Note: you likely want to use it with monadic composition. See the docs for dropC.

Since: conduit-1.3.0

dropWhileCE :: forall (m :: Type -> Type) seq o. (Monad m, IsSequence seq) => (Element seq -> Bool) -> ConduitT seq o m () #

Drop all elements in the chunked stream which match the given predicate.

Note: you likely want to use it with monadic composition. See the docs for dropC.

Since: conduit-1.3.0

foldC :: forall (m :: Type -> Type) a o. (Monad m, Monoid a) => ConduitT a o m a #

Monoidally combine all values in the stream.

Since: conduit-1.3.0

foldCE :: forall (m :: Type -> Type) mono o. (Monad m, MonoFoldable mono, Monoid (Element mono)) => ConduitT mono o m (Element mono) #

Monoidally combine all elements in the chunked stream.

Since: conduit-1.3.0

foldlC :: forall (m :: Type -> Type) a b o. Monad m => (a -> b -> a) -> a -> ConduitT b o m a #

A strict left fold.

Since: conduit-1.3.0

foldlCE :: forall (m :: Type -> Type) mono a o. (Monad m, MonoFoldable mono) => (a -> Element mono -> a) -> a -> ConduitT mono o m a #

A strict left fold on a chunked stream.

Since: conduit-1.3.0

foldMapC :: forall (m :: Type -> Type) b a o. (Monad m, Monoid b) => (a -> b) -> ConduitT a o m b #

Apply the provided mapping function and monoidal combine all values.

Since: conduit-1.3.0

foldMapCE :: forall (m :: Type -> Type) mono w o. (Monad m, MonoFoldable mono, Monoid w) => (Element mono -> w) -> ConduitT mono o m w #

Apply the provided mapping function and monoidal combine all elements of the chunked stream.

Since: conduit-1.3.0

allC :: forall (m :: Type -> Type) a o. Monad m => (a -> Bool) -> ConduitT a o m Bool #

Check that all values in the stream return True.

Subject to shortcut logic: at the first False, consumption of the stream will stop.

Since: conduit-1.3.0

allCE :: forall (m :: Type -> Type) mono o. (Monad m, MonoFoldable mono) => (Element mono -> Bool) -> ConduitT mono o m Bool #

Check that all elements in the chunked stream return True.

Subject to shortcut logic: at the first False, consumption of the stream will stop.

Since: conduit-1.3.0

anyC :: forall (m :: Type -> Type) a o. Monad m => (a -> Bool) -> ConduitT a o m Bool #

Check that at least one value in the stream returns True.

Subject to shortcut logic: at the first True, consumption of the stream will stop.

Since: conduit-1.3.0

anyCE :: forall (m :: Type -> Type) mono o. (Monad m, MonoFoldable mono) => (Element mono -> Bool) -> ConduitT mono o m Bool #

Check that at least one element in the chunked stream returns True.

Subject to shortcut logic: at the first True, consumption of the stream will stop.

Since: conduit-1.3.0

andC :: forall (m :: Type -> Type) o. Monad m => ConduitT Bool o m Bool #

Are all values in the stream True?

Consumption stops once the first False is encountered.

Since: conduit-1.3.0

andCE :: forall (m :: Type -> Type) mono o. (Monad m, MonoFoldable mono, Element mono ~ Bool) => ConduitT mono o m Bool #

Are all elements in the chunked stream True?

Consumption stops once the first False is encountered.

Since: conduit-1.3.0

orC :: forall (m :: Type -> Type) o. Monad m => ConduitT Bool o m Bool #

Are any values in the stream True?

Consumption stops once the first True is encountered.

Since: conduit-1.3.0

orCE :: forall (m :: Type -> Type) mono o. (Monad m, MonoFoldable mono, Element mono ~ Bool) => ConduitT mono o m Bool #

Are any elements in the chunked stream True?

Consumption stops once the first True is encountered.

Since: conduit-1.3.0

asumC :: forall (m :: Type -> Type) f a o. (Monad m, Alternative f) => ConduitT (f a) o m (f a) #

Alternatively combine all values in the stream.

Since: conduit-1.3.0

elemC :: forall (m :: Type -> Type) a o. (Monad m, Eq a) => a -> ConduitT a o m Bool #

Are any values in the stream equal to the given value?

Stops consuming as soon as a match is found.

Since: conduit-1.3.0

elemCE :: forall (m :: Type -> Type) seq o. (Monad m, IsSequence seq, Eq (Element seq)) => Element seq -> ConduitT seq o m Bool #

Are any elements in the chunked stream equal to the given element?

Stops consuming as soon as a match is found.

Since: conduit-1.3.0

notElemC :: forall (m :: Type -> Type) a o. (Monad m, Eq a) => a -> ConduitT a o m Bool #

Are no values in the stream equal to the given value?

Stops consuming as soon as a match is found.

Since: conduit-1.3.0

notElemCE :: forall (m :: Type -> Type) seq o. (Monad m, IsSequence seq, Eq (Element seq)) => Element seq -> ConduitT seq o m Bool #

Are no elements in the chunked stream equal to the given element?

Stops consuming as soon as a match is found.

Since: conduit-1.3.0

headC :: forall (m :: Type -> Type) a o. Monad m => ConduitT a o m (Maybe a) #

Take a single value from the stream, if available.

Since: conduit-1.3.0

headDefC :: forall (m :: Type -> Type) a o. Monad m => a -> ConduitT a o m a #

Same as headC, but returns a default value if none are available from the stream.

Since: conduit-1.3.0

headCE :: forall (m :: Type -> Type) seq o. (Monad m, IsSequence seq) => ConduitT seq o m (Maybe (Element seq)) #

Get the next element in the chunked stream.

Since: conduit-1.3.0

peekC :: forall (m :: Type -> Type) a o. Monad m => ConduitT a o m (Maybe a) #

View the next value in the stream without consuming it.

Since: conduit-1.3.0

peekCE :: forall (m :: Type -> Type) mono o. (Monad m, MonoFoldable mono) => ConduitT mono o m (Maybe (Element mono)) #

View the next element in the chunked stream without consuming it.

Since: conduit-1.3.0

lastC :: forall (m :: Type -> Type) a o. Monad m => ConduitT a o m (Maybe a) #

Retrieve the last value in the stream, if present.

Since: conduit-1.3.0

lastDefC :: forall (m :: Type -> Type) a o. Monad m => a -> ConduitT a o m a #

Same as lastC, but returns a default value if none are available from the stream.

Since: conduit-1.3.0

lastCE :: forall (m :: Type -> Type) seq o. (Monad m, IsSequence seq) => ConduitT seq o m (Maybe (Element seq)) #

Retrieve the last element in the chunked stream, if present.

Since: conduit-1.3.0

lengthC :: forall (m :: Type -> Type) len a o. (Monad m, Num len) => ConduitT a o m len #

Count how many values are in the stream.

Since: conduit-1.3.0

lengthCE :: forall (m :: Type -> Type) len mono o. (Monad m, Num len, MonoFoldable mono) => ConduitT mono o m len #

Count how many elements are in the chunked stream.

Since: conduit-1.3.0

lengthIfC :: forall (m :: Type -> Type) len a o. (Monad m, Num len) => (a -> Bool) -> ConduitT a o m len #

Count how many values in the stream pass the given predicate.

Since: conduit-1.3.0

lengthIfCE :: forall (m :: Type -> Type) len mono o. (Monad m, Num len, MonoFoldable mono) => (Element mono -> Bool) -> ConduitT mono o m len #

Count how many elements in the chunked stream pass the given predicate.

Since: conduit-1.3.0

maximumC :: forall (m :: Type -> Type) a o. (Monad m, Ord a) => ConduitT a o m (Maybe a) #

Get the largest value in the stream, if present.

Since: conduit-1.3.0

maximumCE :: forall (m :: Type -> Type) seq o. (Monad m, IsSequence seq, Ord (Element seq)) => ConduitT seq o m (Maybe (Element seq)) #

Get the largest element in the chunked stream, if present.

Since: conduit-1.3.0

minimumC :: forall (m :: Type -> Type) a o. (Monad m, Ord a) => ConduitT a o m (Maybe a) #

Get the smallest value in the stream, if present.

Since: conduit-1.3.0

minimumCE :: forall (m :: Type -> Type) seq o. (Monad m, IsSequence seq, Ord (Element seq)) => ConduitT seq o m (Maybe (Element seq)) #

Get the smallest element in the chunked stream, if present.

Since: conduit-1.3.0

nullC :: forall (m :: Type -> Type) a o. Monad m => ConduitT a o m Bool #

True if there are no values in the stream.

This function does not modify the stream.

Since: conduit-1.3.0

nullCE :: forall (m :: Type -> Type) mono o. (Monad m, MonoFoldable mono) => ConduitT mono o m Bool #

True if there are no elements in the chunked stream.

This function may remove empty leading chunks from the stream, but otherwise will not modify it.

Since: conduit-1.3.0

sumC :: forall (m :: Type -> Type) a o. (Monad m, Num a) => ConduitT a o m a #

Get the sum of all values in the stream.

Since: conduit-1.3.0

sumCE :: forall (m :: Type -> Type) mono o. (Monad m, MonoFoldable mono, Num (Element mono)) => ConduitT mono o m (Element mono) #

Get the sum of all elements in the chunked stream.

Since: conduit-1.3.0

productC :: forall (m :: Type -> Type) a o. (Monad m, Num a) => ConduitT a o m a #

Get the product of all values in the stream.

Since: conduit-1.3.0

productCE :: forall (m :: Type -> Type) mono o. (Monad m, MonoFoldable mono, Num (Element mono)) => ConduitT mono o m (Element mono) #

Get the product of all elements in the chunked stream.

Since: conduit-1.3.0

findC :: forall (m :: Type -> Type) a o. Monad m => (a -> Bool) -> ConduitT a o m (Maybe a) #

Find the first matching value.

Since: conduit-1.3.0

mapM_C :: Monad m => (a -> m ()) -> ConduitT a o m () #

Apply the action to all values in the stream.

Note: if you want to pass the values instead of consuming them, use iterM instead.

Since: conduit-1.3.0

mapM_CE :: (Monad m, MonoFoldable mono) => (Element mono -> m ()) -> ConduitT mono o m () #

Apply the action to all elements in the chunked stream.

Note: the same caveat as with mapM_C applies. If you don't want to consume the values, you can use iterM:

iterM (omapM_ f)

Since: conduit-1.3.0

foldMC :: Monad m => (a -> b -> m a) -> a -> ConduitT b o m a #

A monadic strict left fold.

Since: conduit-1.3.0

foldMCE :: (Monad m, MonoFoldable mono) => (a -> Element mono -> m a) -> a -> ConduitT mono o m a #

A monadic strict left fold on a chunked stream.

Since: conduit-1.3.0

foldMapMC :: (Monad m, Monoid w) => (a -> m w) -> ConduitT a o m w #

Apply the provided monadic mapping function and monoidal combine all values.

Since: conduit-1.3.0

foldMapMCE :: (Monad m, MonoFoldable mono, Monoid w) => (Element mono -> m w) -> ConduitT mono o m w #

Apply the provided monadic mapping function and monoidal combine all elements in the chunked stream.

Since: conduit-1.3.0

printC :: forall a (m :: Type -> Type) o. (Show a, MonadIO m) => ConduitT a o m () #

Print all incoming values to stdout.

Since: conduit-1.3.0

stdoutC :: forall (m :: Type -> Type) o. MonadIO m => ConduitT ByteString o m () #

sinkHandle applied to stdout.

Since: conduit-1.3.0

stderrC :: forall (m :: Type -> Type) o. MonadIO m => ConduitT ByteString o m () #

sinkHandle applied to stderr.

Since: conduit-1.3.0

mapC :: forall (m :: Type -> Type) a b. Monad m => (a -> b) -> ConduitT a b m () #

Apply a transformation to all values in a stream.

Since: conduit-1.3.0

mapCE :: forall (m :: Type -> Type) f a b. (Monad m, Functor f) => (a -> b) -> ConduitT (f a) (f b) m () #

Apply a transformation to all elements in a chunked stream.

Since: conduit-1.3.0

omapCE :: forall (m :: Type -> Type) mono. (Monad m, MonoFunctor mono) => (Element mono -> Element mono) -> ConduitT mono mono m () #

Apply a monomorphic transformation to all elements in a chunked stream.

Unlike mapE, this will work on types like ByteString and Text which are MonoFunctor but not Functor.

Since: conduit-1.3.0

concatMapC :: forall (m :: Type -> Type) mono a. (Monad m, MonoFoldable mono) => (a -> mono) -> ConduitT a (Element mono) m () #

Apply the function to each value in the stream, resulting in a foldable value (e.g., a list). Then yield each of the individual values in that foldable value separately.

Generalizes concatMap, mapMaybe, and mapFoldable.

Since: conduit-1.3.0

concatMapCE :: forall (m :: Type -> Type) mono w. (Monad m, MonoFoldable mono, Monoid w) => (Element mono -> w) -> ConduitT mono w m () #

Apply the function to each element in the chunked stream, resulting in a foldable value (e.g., a list). Then yield each of the individual values in that foldable value separately.

Generalizes concatMap, mapMaybe, and mapFoldable.

Since: conduit-1.3.0

takeC :: forall (m :: Type -> Type) a. Monad m => Int -> ConduitT a a m () #

Stream up to n number of values downstream.

Note that, if downstream terminates early, not all values will be consumed. If you want to force exactly the given number of values to be consumed, see takeExactly.

Since: conduit-1.3.0

takeCE :: forall (m :: Type -> Type) seq. (Monad m, IsSequence seq) => Index seq -> ConduitT seq seq m () #

Stream up to n number of elements downstream in a chunked stream.

Note that, if downstream terminates early, not all values will be consumed. If you want to force exactly the given number of values to be consumed, see takeExactlyE.

Since: conduit-1.3.0

takeWhileC :: forall (m :: Type -> Type) a. Monad m => (a -> Bool) -> ConduitT a a m () #

Stream all values downstream that match the given predicate.

Same caveats regarding downstream termination apply as with take.

Since: conduit-1.3.0

takeWhileCE :: forall (m :: Type -> Type) seq. (Monad m, IsSequence seq) => (Element seq -> Bool) -> ConduitT seq seq m () #

Stream all elements downstream that match the given predicate in a chunked stream.

Same caveats regarding downstream termination apply as with takeE.

Since: conduit-1.3.0

takeExactlyC :: forall (m :: Type -> Type) a b r. Monad m => Int -> ConduitT a b m r -> ConduitT a b m r #

Consume precisely the given number of values and feed them downstream.

This function is in contrast to take, which will only consume up to the given number of values, and will terminate early if downstream terminates early. This function will discard any additional values in the stream if they are unconsumed.

Note that this function takes a downstream ConduitT as a parameter, as opposed to working with normal fusion. For more information, see http://www.yesodweb.com/blog/2013/10/core-flaw-pipes-conduit, the section titled "pipes and conduit: isolate".

Since: conduit-1.3.0

takeExactlyCE :: forall (m :: Type -> Type) a b r. (Monad m, IsSequence a) => Index a -> ConduitT a b m r -> ConduitT a b m r #

Same as takeExactly, but for chunked streams.

Since: conduit-1.3.0

concatC :: forall (m :: Type -> Type) mono. (Monad m, MonoFoldable mono) => ConduitT mono (Element mono) m () #

Flatten out a stream by yielding the values contained in an incoming MonoFoldable as individually yielded values.

Since: conduit-1.3.0

filterC :: forall (m :: Type -> Type) a. Monad m => (a -> Bool) -> ConduitT a a m () #

Keep only values in the stream passing a given predicate.

Since: conduit-1.3.0

filterCE :: forall seq (m :: Type -> Type). (IsSequence seq, Monad m) => (Element seq -> Bool) -> ConduitT seq seq m () #

Keep only elements in the chunked stream passing a given predicate.

Since: conduit-1.3.0

mapWhileC :: forall (m :: Type -> Type) a b. Monad m => (a -> Maybe b) -> ConduitT a b m () #

Map values as long as the result is Just.

Since: conduit-1.3.0

conduitVector #

Arguments

:: forall v a (m :: Type -> Type). (Vector v a, PrimMonad m) 
=> Int

maximum allowed size

-> ConduitT a (v a) m () 

Break up a stream of values into vectors of size n. The final vector may be smaller than n if the total number of values is not a strict multiple of n. No empty vectors will be yielded.

Since: conduit-1.3.0

scanlC :: forall (m :: Type -> Type) a b. Monad m => (a -> b -> a) -> a -> ConduitT b a m () #

Analog of scanl for lists.

Since: conduit-1.3.0

mapAccumWhileC :: forall (m :: Type -> Type) a s b. Monad m => (a -> s -> Either s (s, b)) -> s -> ConduitT a b m s #

mapWhileC with a break condition dependent on a strict accumulator. Equivalently, mapAccum as long as the result is Right. Instead of producing a leftover, the breaking input determines the resulting accumulator via Left.

concatMapAccumC :: forall (m :: Type -> Type) a accum b. Monad m => (a -> accum -> (accum, [b])) -> accum -> ConduitT a b m () #

concatMap with an accumulator.

Since: conduit-1.3.0

intersperseC :: forall (m :: Type -> Type) a. Monad m => a -> ConduitT a a m () #

Insert the given value between each two values in the stream.

Since: conduit-1.3.0

slidingWindowC :: forall (m :: Type -> Type) seq a. (Monad m, IsSequence seq, Element seq ~ a) => Int -> ConduitT a seq m () #

Sliding window of values 1,2,3,4,5 with window size 2 gives [1,2],[2,3],[3,4],[4,5]

Best used with structures that support O(1) snoc.

Since: conduit-1.3.0

chunksOfCE :: forall (m :: Type -> Type) seq. (Monad m, IsSequence seq) => Index seq -> ConduitT seq seq m () #

Split input into chunk of size chunkSize

The last element may be smaller than the chunkSize (see also chunksOfExactlyE which will not yield this last element)

Since: conduit-1.3.0

chunksOfExactlyCE :: forall (m :: Type -> Type) seq. (Monad m, IsSequence seq) => Index seq -> ConduitT seq seq m () #

Split input into chunk of size chunkSize

If the input does not split into chunks exactly, the remainder will be leftover (see also chunksOfE)

Since: conduit-1.3.0

mapMC :: Monad m => (a -> m b) -> ConduitT a b m () #

Apply a monadic transformation to all values in a stream.

If you do not need the transformed values, and instead just want the monadic side-effects of running the action, see mapM_.

Since: conduit-1.3.0

mapMCE :: (Monad m, Traversable f) => (a -> m b) -> ConduitT (f a) (f b) m () #

Apply a monadic transformation to all elements in a chunked stream.

Since: conduit-1.3.0

omapMCE :: (Monad m, MonoTraversable mono) => (Element mono -> m (Element mono)) -> ConduitT mono mono m () #

Apply a monadic monomorphic transformation to all elements in a chunked stream.

Unlike mapME, this will work on types like ByteString and Text which are MonoFunctor but not Functor.

Since: conduit-1.3.0

concatMapMC :: (Monad m, MonoFoldable mono) => (a -> m mono) -> ConduitT a (Element mono) m () #

Apply the monadic function to each value in the stream, resulting in a foldable value (e.g., a list). Then yield each of the individual values in that foldable value separately.

Generalizes concatMapM, mapMaybeM, and mapFoldableM.

Since: conduit-1.3.0

filterMC :: Monad m => (a -> m Bool) -> ConduitT a a m () #

Keep only values in the stream passing a given monadic predicate.

Since: conduit-1.3.0

filterMCE :: (Monad m, IsSequence seq) => (Element seq -> m Bool) -> ConduitT seq seq m () #

Keep only elements in the chunked stream passing a given monadic predicate.

Since: conduit-1.3.0

iterMC :: Monad m => (a -> m ()) -> ConduitT a a m () #

Apply a monadic action on all values in a stream.

This Conduit can be used to perform a monadic side-effect for every value, whilst passing the value through the Conduit as-is.

iterM f = mapM (\a -> f a >>= \() -> return a)

Since: conduit-1.3.0

scanlMC :: Monad m => (a -> b -> m a) -> a -> ConduitT b a m () #

Analog of scanl for lists, monadic.

Since: conduit-1.3.0

mapAccumWhileMC :: Monad m => (a -> s -> m (Either s (s, b))) -> s -> ConduitT a b m s #

concatMapAccumMC :: Monad m => (a -> accum -> m (accum, [b])) -> accum -> ConduitT a b m () #

concatMapM with an accumulator.

Since: conduit-1.3.0

encodeUtf8C :: forall (m :: Type -> Type) text binary. (Monad m, Utf8 text binary) => ConduitT text binary m () #

Encode a stream of text as UTF8.

Since: conduit-1.3.0

decodeUtf8C :: forall (m :: Type -> Type). MonadThrow m => ConduitT ByteString Text m () #

Decode a stream of binary data as UTF8.

Since: conduit-1.3.0

decodeUtf8LenientC :: forall (m :: Type -> Type). Monad m => ConduitT ByteString Text m () #

Decode a stream of binary data as UTF8, replacing any invalid bytes with the Unicode replacement character.

Since: conduit-1.3.0

lineC :: forall (m :: Type -> Type) seq o r. (Monad m, IsSequence seq, Element seq ~ Char) => ConduitT seq o m r -> ConduitT seq o m r #

Stream in the entirety of a single line.

Like takeExactly, this will consume the entirety of the line regardless of the behavior of the inner Conduit.

Since: conduit-1.3.0

lineAsciiC :: forall (m :: Type -> Type) seq o r. (Monad m, IsSequence seq, Element seq ~ Word8) => ConduitT seq o m r -> ConduitT seq o m r #

Same as line, but operates on ASCII/binary data.

Since: conduit-1.3.0

unlinesC :: forall (m :: Type -> Type) seq. (Monad m, IsSequence seq, Element seq ~ Char) => ConduitT seq seq m () #

Insert a newline character after each incoming chunk of data.

Since: conduit-1.3.0

unlinesAsciiC :: forall (m :: Type -> Type) seq. (Monad m, IsSequence seq, Element seq ~ Word8) => ConduitT seq seq m () #

Same as unlines, but operates on ASCII/binary data.

Since: conduit-1.3.0

linesUnboundedC :: forall (m :: Type -> Type) seq. (Monad m, IsSequence seq, Element seq ~ Char) => ConduitT seq seq m () #

Convert a stream of arbitrarily-chunked textual data into a stream of data where each chunk represents a single line. Note that, if you have unknownuntrusted input, this function is unsafe/, since it would allow an attacker to form lines of massive length and exhaust memory.

Since: conduit-1.3.0

linesUnboundedAsciiC :: forall (m :: Type -> Type) seq. (Monad m, IsSequence seq, Element seq ~ Word8) => ConduitT seq seq m () #

Same as linesUnbounded, but for ASCII/binary data.

Since: conduit-1.3.0

vectorBuilderC #

Arguments

:: forall (m :: Type -> Type) v e n i r. (PrimMonad m, Vector v e, PrimMonad n, PrimState m ~ PrimState n) 
=> Int

size

-> ((e -> n ()) -> ConduitT i Void m r) 
-> ConduitT i (v e) m r 

Generally speaking, yielding values from inside a Conduit requires some allocation for constructors. This can introduce an overhead, similar to the overhead needed to represent a list of values instead of a vector. This overhead is even more severe when talking about unboxed values.

This combinator allows you to overcome this overhead, and efficiently fill up vectors. It takes two parameters. The first is the size of each mutable vector to be allocated. The second is a function. The function takes an argument which will yield the next value into a mutable vector.

Under the surface, this function uses a number of tricks to get high performance. For more information on both usage and implementation, please see: https://www.fpcomplete.com/user/snoyberg/library-documentation/vectorbuilder

Since: conduit-1.3.0

urlEncodeBuilder :: Bool -> ByteString -> Builder #

Percent-encoding for URLs.

Like urlEncode, but only makes the Builder.

Since: http-types-0.5

equalCookie :: Cookie -> Cookie -> Bool #

Instead of (==).

Since there was some confusion in the history of this library about how the Eq instance should work, it was removed for clarity, and replaced by equal and equiv. equal gives you equality of all fields of the Cookie record.

Since: http-client-0.7.0

equivCookie :: Cookie -> Cookie -> Bool #

Equality of name, domain, path only. This corresponds to step 11 of the algorithm described in Section 5.3 "Storage Model". See also: equal.

Since: http-client-0.7.0

compareCookies :: Cookie -> Cookie -> Ordering #

Instead of instance Ord Cookie. See equalCookie, equivCookie.

Since: http-client-0.7.0

equalCookieJar :: CookieJar -> CookieJar -> Bool #

See equalCookie.

Since: http-client-0.7.0

equivCookieJar :: CookieJar -> CookieJar -> Bool #

See equalCookieJar, equalCookie.

Since: http-client-0.7.0

makeConnection #

Arguments

:: IO ByteString

read

-> (ByteString -> IO ())

write

-> IO ()

close

-> IO Connection 

Create a new Connection from a read, write, and close function.

Since: http-client-0.5.3

socketConnection #

Arguments

:: Socket 
-> Int

chunk size

-> IO Connection 

Create a new Connection from a Socket.

Since: http-client-0.5.3

strippedHostName :: String -> String #

strippedHostName takes a URI host name, as extracted by regName, and strips square brackets around IPv6 addresses.

The result is suitable for passing to services such as name resolution (getAddr).

@since

brReadSome :: BodyReader -> Int -> IO ByteString #

Continuously call brRead, building up a lazy ByteString until a chunk is constructed that is at least as many bytes as requested.

Since 0.4.20

parseUrl :: MonadThrow m => String -> m Request #

Deprecated synonym for parseUrlThrow. You probably want parseRequest or parseRequest_ instead.

Since: http-client-0.1.0

parseUrlThrow :: MonadThrow m => String -> m Request #

Same as parseRequest, except will throw an HttpException in the event of a non-2XX response. This uses throwErrorStatusCodes to implement checkResponse.

Since: http-client-0.4.30

throwErrorStatusCodes :: MonadIO m => Request -> Response BodyReader -> m () #

Throws a StatusCodeException wrapped in HttpExceptionRequest, if the response's status code indicates an error (if it isn't 2xx). This can be used to implement checkResponse.

Since: http-client-0.5.13

parseRequest :: MonadThrow m => String -> m Request #

Convert a URL into a Request.

This function defaults some of the values in Request, such as setting method to GET and requestHeaders to [].

Since this function uses MonadThrow, the return monad can be anything that is an instance of MonadThrow, such as IO or Maybe.

You can place the request method at the beginning of the URL separated by a space, e.g.:

parseRequest "POST http://httpbin.org/post"

Note that the request method must be provided as all capital letters.

A Request created by this function won't cause exceptions on non-2XX response status codes.

To create a request which throws on non-2XX status codes, see parseUrlThrow

Since: http-client-0.4.30

parseRequest_ :: String -> Request #

Same as parseRequest, but parse errors cause an impure exception. Mostly useful for static strings which are known to be correctly formatted.

requestFromURI :: MonadThrow m => URI -> m Request #

Convert a URI into a Request.

This can fail if the given URI is not absolute, or if the URI scheme is not "http" or "https". In these cases the function will throw an error via MonadThrow.

This function defaults some of the values in Request, such as setting method to GET and requestHeaders to [].

A Request created by this function won't cause exceptions on non-2XX response status codes.

Since: http-client-0.5.12

requestFromURI_ :: URI -> Request #

Same as requestFromURI, but if the conversion would fail, throws an impure exception.

Since: http-client-0.5.12

getUri :: Request -> URI #

Extract a URI from the request.

Since 0.1.0

defaultRequest :: Request #

A default request value, a GET request of localhost/:80, with an empty request body.

Note that the default checkResponse does nothing.

Since: http-client-0.4.30

applyBasicAuth :: ByteString -> ByteString -> Request -> Request #

Add a Basic Auth header (with the specified user name and password) to the given Request. Ignore error handling:

 applyBasicAuth "user" "pass" $ parseRequest_ url

NOTE: The function applyDigestAuth is provided by the http-client-tls package instead of this package due to extra dependencies. Please use that package if you need to use digest authentication.

Since 0.1.0

applyBearerAuth :: ByteString -> Request -> Request #

Add a Bearer Auth header to the given Request

Since: http-client-0.7.6

applyBasicProxyAuth :: ByteString -> ByteString -> Request -> Request #

Add a Proxy-Authorization header (with the specified username and password) to the given Request. Ignore error handling:

applyBasicProxyAuth "user" "pass" <$> parseRequest "http://example.org"

Since 0.3.4

urlEncodedBody :: [(ByteString, ByteString)] -> Request -> Request #

Add url-encoded parameters to the Request.

This sets a new requestBody, adds a content-type request header and changes the method to POST.

Since 0.1.0

setRequestIgnoreStatus :: Request -> Request #

Modify the request so that non-2XX status codes do not generate a runtime StatusCodeException.

Since: http-client-0.4.29

setRequestCheckStatus :: Request -> Request #

Modify the request so that non-2XX status codes generate a runtime StatusCodeException, by using throwErrorStatusCodes

Since: http-client-0.5.13

setQueryString :: [(ByteString, Maybe ByteString)] -> Request -> Request #

Set the query string to the given key/value pairs.

Since 0.3.6

setQueryStringPartialEscape :: [(ByteString, [EscapeItem])] -> Request -> Request #

Set the query string to the given key/value pairs.

Since: http-client-0.5.10

streamFile :: FilePath -> IO RequestBody #

Send a file as the request body.

It is expected that the file size does not change between calling streamFile and making any requests using this request body.

Since 0.4.9

observedStreamFile :: (StreamFileStatus -> IO ()) -> FilePath -> IO RequestBody #

Send a file as the request body, while observing streaming progress via a PopObserver. Observations are made between reading and sending a chunk.

It is expected that the file size does not change between calling observedStreamFile and making any requests using this request body.

Since 0.4.9

getOriginalRequest :: Response a -> Request #

Retrieve the orignal Request from a Response

Note that the requestBody is not available and always set to empty.

Since: http-client-0.7.8

rawConnectionModifySocket :: (Socket -> IO ()) -> IO (Maybe HostAddress -> String -> Int -> IO Connection) #

A value for the managerRawConnection setting, but also allows you to modify the underlying Socket to set additional settings. For a motivating use case, see: https://github.com/snoyberg/http-client/issues/71.

Since 0.3.8

rawConnectionModifySocketSize :: (Socket -> IO ()) -> IO (Int -> Maybe HostAddress -> String -> Int -> IO Connection) #

Same as rawConnectionModifySocket, but also takes in a chunk size.

Since: http-client-0.5.2

withManager :: ManagerSettings -> (Manager -> IO a) -> IO a #

Create, use and close a Manager.

Since 0.2.1

proxyFromRequest :: ProxyOverride #

Get the proxy settings from the Request itself.

Since 0.4.7

noProxy :: ProxyOverride #

Never connect using a proxy, regardless of the proxy value in the Request.

Since 0.4.7

useProxy :: Proxy -> ProxyOverride #

Use the given proxy settings, regardless of the proxy value in the Request.

Since 0.4.7

useProxySecureWithoutConnect :: Proxy -> ProxyOverride #

Send secure requests to the proxy in plain text rather than using CONNECT, regardless of the value in the Request.

Since: http-client-0.7.2

proxyEnvironment #

Arguments

:: Maybe Proxy

fallback if no environment set

-> ProxyOverride 

Get the proxy settings from the default environment variable (http_proxy for insecure, https_proxy for secure). If no variable is set, then fall back to the given value. Nothing is equivalent to noProxy, Just is equivalent to useProxy.

Since 0.4.7

proxyEnvironmentNamed #

Arguments

:: Text

environment variable name

-> Maybe Proxy

fallback if no environment set

-> ProxyOverride 

Same as proxyEnvironment, but instead of default environment variable names, allows you to set your own name.

Since 0.4.7

defaultProxy :: ProxyOverride #

The default proxy settings for a manager. In particular: if the http_proxy (or https_proxy) environment variable is set, use it. Otherwise, use the values in the Request.

Since 0.4.7

domainMatches #

Arguments

:: ByteString

Domain to test

-> ByteString

Domain from a cookie

-> Bool 

This corresponds to the subcomponent algorithm entitled "Domain Matching" detailed in section 5.1.3

defaultPath :: Request -> ByteString #

This corresponds to the subcomponent algorithm entitled "Paths" detailed in section 5.1.4

pathMatches :: ByteString -> ByteString -> Bool #

This corresponds to the subcomponent algorithm entitled "Path-Match" detailed in section 5.1.4

isPotentiallyTrustworthyOrigin #

Arguments

:: Bool

True if HTTPS

-> ByteString

Host

-> Bool

Whether or not the origin is potentially trustworthy

Algorithm described in "Secure Contexts", Section 3.1, "Is origin potentially trustworthy?"

Note per RFC6265 section 5.4 user agent is free to define the meaning of "secure" protocol.

See: https://w3c.github.io/webappsec-secure-contexts/#is-origin-trustworthy

evictExpiredCookies #

Arguments

:: CookieJar

Input cookie jar

-> UTCTime

Value that should be used as "now"

-> CookieJar

Filtered cookie jar

This corresponds to the eviction algorithm described in Section 5.3 "Storage Model"

insertCookiesIntoRequest #

Arguments

:: Request

The request to insert into

-> CookieJar

Current cookie jar

-> UTCTime

Value that should be used as "now"

-> (Request, CookieJar)

(Output request, Updated cookie jar (last-access-time is updated))

This applies the computeCookieString to a given Request

computeCookieString #

Arguments

:: Request

Input request

-> CookieJar

Current cookie jar

-> UTCTime

Value that should be used as "now"

-> Bool

Whether or not this request is coming from an "http" source (not javascript or anything like that)

-> (ByteString, CookieJar)

(Contents of a "Cookie" header, Updated cookie jar (last-access-time is updated))

This corresponds to the algorithm described in Section 5.4 "The Cookie Header"

updateCookieJar #

Arguments

:: Response a

Response received from server

-> Request

Request which generated the response

-> UTCTime

Value that should be used as "now"

-> CookieJar

Current cookie jar

-> (CookieJar, Response a)

(Updated cookie jar with cookies from the Response, The response stripped of any "Set-Cookie" header)

This applies receiveSetCookie to a given Response

receiveSetCookie #

Arguments

:: SetCookie

The SetCookie the cookie jar is receiving

-> Request

The request that originated the response that yielded the SetCookie

-> UTCTime

Value that should be used as "now"

-> Bool

Whether or not this request is coming from an "http" source (not javascript or anything like that)

-> CookieJar

Input cookie jar to modify

-> CookieJar

Updated cookie jar

This corresponds to the algorithm described in Section 5.3 "Storage Model" This function consists of calling generateCookie followed by insertCheckedCookie. Use this function if you plan to do both in a row. generateCookie and insertCheckedCookie are only provided for more fine-grained control.

insertCheckedCookie #

Arguments

:: Cookie

The SetCookie the cookie jar is receiving

-> CookieJar

Input cookie jar to modify

-> Bool

Whether or not this request is coming from an "http" source (not javascript or anything like that)

-> CookieJar

Updated (or not) cookie jar

Insert a cookie created by generateCookie into the cookie jar (or not if it shouldn't be allowed in)

generateCookie #

Arguments

:: SetCookie

The SetCookie we are encountering

-> Request

The request that originated the response that yielded the SetCookie

-> UTCTime

Value that should be used as "now"

-> Bool

Whether or not this request is coming from an "http" source (not javascript or anything like that)

-> Maybe Cookie

The optional output cookie

Turn a SetCookie into a Cookie, if it is valid

withConnection :: Request -> Manager -> (Connection -> IO a) -> IO a #

Perform an action using a Connection acquired from the given Manager.

You should use this only when you have to read and write interactively through the connection (e.g. connection by the WebSocket protocol).

Since: http-client-0.5.13

responseOpenHistory :: Request -> Manager -> IO (HistoriedResponse BodyReader) #

A variant of responseOpen which keeps a history of all redirects performed in the interim, together with the first 1024 bytes of their response bodies.

Since 0.4.1

withResponseHistory :: Request -> Manager -> (HistoriedResponse BodyReader -> IO a) -> IO a #

A variant of withResponse which keeps a history of all redirects performed in the interim, together with the first 1024 bytes of their response bodies.

Since 0.4.1

managerSetInsecureProxy :: ProxyOverride -> ManagerSettings -> ManagerSettings #

Set the proxy override value, only for HTTP (insecure) connections.

Since 0.4.7

managerSetSecureProxy :: ProxyOverride -> ManagerSettings -> ManagerSettings #

Set the proxy override value, only for HTTPS (secure) connections.

Since 0.4.7

managerSetProxy :: ProxyOverride -> ManagerSettings -> ManagerSettings #

Set the proxy override value, for both HTTP (insecure) and HTTPS (insecure) connections.

Since 0.4.7

responseTimeoutMicro :: Int -> ResponseTimeout #

Specify maximum time in microseconds the retrieval of response headers is allowed to take

Since: http-client-0.5.0

responseTimeoutNone :: ResponseTimeout #

Do not have a response timeout

Since: http-client-0.5.0

responseTimeoutDefault :: ResponseTimeout #

Use the default response timeout

When used on a Request, means: use the manager's timeout value

When used on a ManagerSettings, means: default to 30 seconds

Since: http-client-0.5.0

withResponse :: forall m (n :: Type -> Type) env i a. (MonadUnliftIO m, MonadIO n, MonadReader env m, HasHttpManager env) => Request -> (Response (ConduitM i ByteString n ()) -> m a) -> m a #

Conduit powered version of withResponse. Differences are:

  • Response body is represented as a Producer.
  • Generalized to any instance of MonadUnliftIO, not just IO.
  • The Manager is contained by a MonadReader context.

Since 2.1.0

acquireResponse :: forall (n :: Type -> Type) env m i. (MonadIO n, MonadReader env m, HasHttpManager env) => Request -> m (Acquire (Response (ConduitM i ByteString n ()))) #

An Acquire for getting a Response.

Since 2.1.0

defaultManagerSettings :: ManagerSettings #

TLS-powered manager settings.

Since 2.1.0

newManager :: MonadIO m => m Manager #

Get a new manager using defaultManagerSettings.

Since 2.1.0

newManagerSettings :: MonadIO m => ManagerSettings -> m Manager #

Get a new manager using the given settings.

Since 2.1.0

responseOpen :: forall m (n :: Type -> Type) env i. (MonadIO m, MonadIO n, MonadReader env m, HasHttpManager env) => Request -> m (Response (ConduitM i ByteString n ())) #

Conduit-powered version of responseOpen.

See withResponse for the differences with responseOpen.

Since 2.1.0

responseClose :: MonadIO m => Response body -> m () #

Generalized version of responseClose.

Since 2.1.0

bodyReaderSource :: forall (m :: Type -> Type) i. MonadIO m => BodyReader -> ConduitM i ByteString m () #

httpLbs :: (MonadIO m, HasHttpManager env, MonadReader env m) => Request -> m (Response ByteString) #

Same as httpLbs, except it uses the Manager in the reader environment.

Since 2.1.1

httpNoBody :: (MonadIO m, HasHttpManager env, MonadReader env m) => Request -> m (Response ()) #

Same as httpNoBody, except it uses the Manager in the reader environment.

This can be more convenient that using withManager as it avoids the need to specify the base monad for the response body.

Since 2.1.2

httpSource :: forall (m :: Type -> Type) (n :: Type -> Type) env r. (MonadResource m, MonadIO n, MonadReader env m, HasHttpManager env) => Request -> (Response (ConduitM () ByteString n ()) -> ConduitM () r m ()) -> ConduitM () r m () #

Same as httpSource, but uses Manager from Reader environment instead of the global one.

Since 2.3.6

hAccept :: HeaderName #

Accept

Since: http-types-0.7.0

hAcceptLanguage :: HeaderName #

Accept-Language

Since: http-types-0.7.0

hAuthorization :: HeaderName #

Authorization

Since: http-types-0.7.0

hCacheControl :: HeaderName #

Cache-Control

Since: http-types-0.7.0

hConnection :: HeaderName #

Connection

Since: http-types-0.7.0

hContentLength :: HeaderName #

Content-Length

Since: http-types-0.7.0

hContentMD5 :: HeaderName #

Content-MD5

This header has been obsoleted in RFC 9110.

Since: http-types-0.7.0

hContentType :: HeaderName #

Content-Type

Since: http-types-0.7.0

hDate :: HeaderName #

Date

Since: http-types-0.7.0

hIfRange :: HeaderName #

If-Range

Since: http-types-0.7.0

hLastModified :: HeaderName #

Last-Modified

Since: http-types-0.7.0

hLocation :: HeaderName #

Location

Since: http-types-0.7.1

hRange :: HeaderName #

Range

Since: http-types-0.7.0

hReferer :: HeaderName #

Referer

Since: http-types-0.7.0

hServer :: HeaderName #

Server

Since: http-types-0.7.1

hUserAgent :: HeaderName #

User-Agent

Since: http-types-0.7.0

hCookie :: HeaderName #

Cookie

Since: http-types-0.7.0

renderByteRangeBuilder :: ByteRange -> Builder #

Turns a byte range into a byte string Builder.

Since: http-types-0.6.11

renderByteRange :: ByteRange -> ByteString #

Renders a byte range into a ByteString.

>>> renderByteRange (ByteRangeFrom 2048)
"2048-"

Since: http-types-0.6.11

renderByteRangesBuilder :: ByteRanges -> Builder #

Turns a list of byte ranges into a byte string Builder.

Since: http-types-0.6.11

renderByteRanges :: ByteRanges -> ByteString #

Renders a list of byte ranges into a ByteString.

>>> renderByteRanges [ByteRangeFrom 2048, ByteRangeSuffix 20]
"bytes=2048-,-20"

Since: http-types-0.6.11

parseByteRanges :: ByteString -> Maybe ByteRanges #

Parse the value of a Range header into a ByteRanges.

>>> parseByteRanges "error"
Nothing
>>> parseByteRanges "bytes=0-499"
Just [ByteRangeFromTo 0 499]
>>> parseByteRanges "bytes=500-999"
Just [ByteRangeFromTo 500 999]
>>> parseByteRanges "bytes=-500"
Just [ByteRangeSuffix 500]
>>> parseByteRanges "bytes=9500-"
Just [ByteRangeFrom 9500]
>>> parseByteRanges "bytes=0-0,-1"
Just [ByteRangeFromTo 0 0,ByteRangeSuffix 1]
>>> parseByteRanges "bytes=500-600,601-999"
Just [ByteRangeFromTo 500 600,ByteRangeFromTo 601 999]
>>> parseByteRanges "bytes=500-700,601-999"
Just [ByteRangeFromTo 500 700,ByteRangeFromTo 601 999]

Since: http-types-0.9.1

methodGet :: Method #

HTTP GET Method

methodPost :: Method #

HTTP POST Method

methodHead :: Method #

HTTP HEAD Method

methodPut :: Method #

HTTP PUT Method

methodDelete :: Method #

HTTP DELETE Method

methodTrace :: Method #

HTTP TRACE Method

methodConnect :: Method #

HTTP CONNECT Method

methodOptions :: Method #

HTTP OPTIONS Method

methodPatch :: Method #

HTTP PATCH Method

Since: http-types-0.8.0

parseMethod :: Method -> Either ByteString StdMethod #

Convert a method ByteString to a StdMethod if possible.

Since: http-types-0.2.0

renderMethod :: Either ByteString StdMethod -> Method #

Convert an algebraic method to a ByteString.

renderMethod (parseMethod bs) == bs

Since: http-types-0.3.0

renderStdMethod :: StdMethod -> Method #

Convert a StdMethod to a ByteString.

Since: http-types-0.2.0

mkStatus :: Int -> ByteString -> Status #

Create a Status from a status code and message.

status100 :: Status #

Continue 100

Since: http-types-0.6.6

continue100 :: Status #

Continue 100

Since: http-types-0.6.6

status101 :: Status #

Switching Protocols 101

Since: http-types-0.6.6

switchingProtocols101 :: Status #

Switching Protocols 101

Since: http-types-0.6.6

status200 :: Status #

OK 200

ok200 :: Status #

OK 200

status201 :: Status #

Created 201

created201 :: Status #

Created 201

status202 :: Status #

Accepted 202

Since: http-types-0.6.6

accepted202 :: Status #

Accepted 202

Since: http-types-0.6.6

status203 :: Status #

Non-Authoritative Information 203

Since: http-types-0.6.6

nonAuthoritative203 :: Status #

Non-Authoritative Information 203

Since: http-types-0.6.6

status204 :: Status #

No Content 204

Since: http-types-0.6.6

noContent204 :: Status #

No Content 204

Since: http-types-0.6.6

status205 :: Status #

Reset Content 205

Since: http-types-0.6.6

resetContent205 :: Status #

Reset Content 205

Since: http-types-0.6.6

status206 :: Status #

Partial Content 206

Since: http-types-0.5.1

partialContent206 :: Status #

Partial Content 206

Since: http-types-0.5.1

status300 :: Status #

Multiple Choices 300

multipleChoices300 :: Status #

Multiple Choices 300

status301 :: Status #

Moved Permanently 301

movedPermanently301 :: Status #

Moved Permanently 301

status302 :: Status #

Found 302

found302 :: Status #

Found 302

status303 :: Status #

See Other 303

seeOther303 :: Status #

See Other 303

status304 :: Status #

Not Modified 304

Since: http-types-0.6.1

notModified304 :: Status #

Not Modified 304

Since: http-types-0.6.1

status305 :: Status #

Use Proxy 305

Since: http-types-0.6.6

useProxy305 :: Status #

Use Proxy 305

Since: http-types-0.6.6

status307 :: Status #

Temporary Redirect 307

Since: http-types-0.6.6

temporaryRedirect307 :: Status #

Temporary Redirect 307

Since: http-types-0.6.6

status308 :: Status #

Permanent Redirect 308

Since: http-types-0.9

permanentRedirect308 :: Status #

Permanent Redirect 308

Since: http-types-0.9

status400 :: Status #

Bad Request 400

badRequest400 :: Status #

Bad Request 400

status401 :: Status #

Unauthorized 401

unauthorized401 :: Status #

Unauthorized 401

status402 :: Status #

Payment Required 402

Since: http-types-0.6.6

paymentRequired402 :: Status #

Payment Required 402

Since: http-types-0.6.6

status403 :: Status #

Forbidden 403

forbidden403 :: Status #

Forbidden 403

status404 :: Status #

Not Found 404

notFound404 :: Status #

Not Found 404

status405 :: Status #

Method Not Allowed 405

methodNotAllowed405 :: Status #

Method Not Allowed 405

status406 :: Status #

Not Acceptable 406

Since: http-types-0.6.6

notAcceptable406 :: Status #

Not Acceptable 406

Since: http-types-0.6.6

status407 :: Status #

Proxy Authentication Required 407

Since: http-types-0.6.6

proxyAuthenticationRequired407 :: Status #

Proxy Authentication Required 407

Since: http-types-0.6.6

status408 :: Status #

Request Timeout 408

Since: http-types-0.6.6

requestTimeout408 :: Status #

Request Timeout 408

Since: http-types-0.6.6

status409 :: Status #

Conflict 409

Since: http-types-0.6.6

conflict409 :: Status #

Conflict 409

Since: http-types-0.6.6

status410 :: Status #

Gone 410

Since: http-types-0.6.6

gone410 :: Status #

Gone 410

Since: http-types-0.6.6

status411 :: Status #

Length Required 411

Since: http-types-0.6.6

lengthRequired411 :: Status #

Length Required 411

Since: http-types-0.6.6

status412 :: Status #

Precondition Failed 412

Since: http-types-0.6.1

preconditionFailed412 :: Status #

Precondition Failed 412

Since: http-types-0.6.1

status413 :: Status #

Request Entity Too Large 413

Since: http-types-0.6.6

requestEntityTooLarge413 :: Status #

Request Entity Too Large 413

Since: http-types-0.6.6

status414 :: Status #

Request-URI Too Long 414

Since: http-types-0.6.6

requestURITooLong414 :: Status #

Request-URI Too Long 414

Since: http-types-0.6.6

status415 :: Status #

Unsupported Media Type 415

Since: http-types-0.6.6

unsupportedMediaType415 :: Status #

Unsupported Media Type 415

Since: http-types-0.6.6

status416 :: Status #

Requested Range Not Satisfiable 416

Since: http-types-0.6.1

requestedRangeNotSatisfiable416 :: Status #

Requested Range Not Satisfiable 416

Since: http-types-0.6.1

status417 :: Status #

Expectation Failed 417

Since: http-types-0.6.6

expectationFailed417 :: Status #

Expectation Failed 417

Since: http-types-0.6.6

status418 :: Status #

I'm a teapot 418

Since: http-types-0.6.6

imATeapot418 :: Status #

I'm a teapot 418

Since: http-types-0.6.6

status422 :: Status #

Unprocessable Entity 422 (RFC 4918)

Since: http-types-0.9.1

unprocessableEntity422 :: Status #

Unprocessable Entity 422 (RFC 4918)

Since: http-types-0.9.1

status428 :: Status #

Precondition Required 428 (RFC 6585)

Since: http-types-0.8.5

preconditionRequired428 :: Status #

Precondition Required 428 (RFC 6585)

Since: http-types-0.8.5

status429 :: Status #

Too Many Requests 429 (RFC 6585)

Since: http-types-0.8.5

tooManyRequests429 :: Status #

Too Many Requests 429 (RFC 6585)

Since: http-types-0.8.5

status431 :: Status #

Request Header Fields Too Large 431 (RFC 6585)

Since: http-types-0.8.5

requestHeaderFieldsTooLarge431 :: Status #

Request Header Fields Too Large 431 (RFC 6585)

Since: http-types-0.8.5

status500 :: Status #

Internal Server Error 500

internalServerError500 :: Status #

Internal Server Error 500

status501 :: Status #

Not Implemented 501

Since: http-types-0.6.1

notImplemented501 :: Status #

Not Implemented 501

Since: http-types-0.6.1

status502 :: Status #

Bad Gateway 502

Since: http-types-0.6.6

badGateway502 :: Status #

Bad Gateway 502

Since: http-types-0.6.6

status503 :: Status #

Service Unavailable 503

Since: http-types-0.6.6

serviceUnavailable503 :: Status #

Service Unavailable 503

Since: http-types-0.6.6

status504 :: Status #

Gateway Timeout 504

Since: http-types-0.6.6

gatewayTimeout504 :: Status #

Gateway Timeout 504

Since: http-types-0.6.6

status505 :: Status #

HTTP Version Not Supported 505

Since: http-types-0.6.6

httpVersionNotSupported505 :: Status #

HTTP Version Not Supported 505

Since: http-types-0.6.6

status511 :: Status #

Network Authentication Required 511 (RFC 6585)

Since: http-types-0.8.5

networkAuthenticationRequired511 :: Status #

Network Authentication Required 511 (RFC 6585)

Since: http-types-0.8.5

statusIsInformational :: Status -> Bool #

Informational class

Checks if the status is in the 1XX range.

Since: http-types-0.8.0

statusIsSuccessful :: Status -> Bool #

Successful class

Checks if the status is in the 2XX range.

Since: http-types-0.8.0

statusIsRedirection :: Status -> Bool #

Redirection class

Checks if the status is in the 3XX range.

Since: http-types-0.8.0

statusIsClientError :: Status -> Bool #

Client Error class

Checks if the status is in the 4XX range.

Since: http-types-0.8.0

statusIsServerError :: Status -> Bool #

Server Error class

Checks if the status is in the 5XX range.

Since: http-types-0.8.0

queryTextToQuery :: QueryText -> Query #

Convert QueryText to Query.

Since: http-types-0.5.2

renderQueryText :: Bool -> QueryText -> Builder #

Convert QueryText to a Builder.

If you want a question mark (?) added to the front of the result, use True.

Since: http-types-0.5.2

queryToQueryText :: Query -> QueryText #

Convert Query to QueryText (leniently decoding the UTF-8).

Since: http-types-0.5.2

parseQueryText :: ByteString -> QueryText #

Parse a QueryText from a ByteString. See parseQuery for details.

queryToQueryText . parseQuery

Since: http-types-0.5.2

simpleQueryToQuery :: SimpleQuery -> Query #

Convert SimpleQuery to Query.

Since: http-types-0.5

renderQueryBuilder :: Bool -> Query -> Builder #

Renders the given Query into a Builder.

If you want a question mark (?) added to the front of the result, use True.

Since: http-types-0.5

renderQuery :: Bool -> Query -> ByteString #

Renders the given Query into a ByteString.

If you want a question mark (?) added to the front of the result, use True.

Since: http-types-0.2.0

renderSimpleQuery :: Bool -> SimpleQuery -> ByteString #

Render the given SimpleQuery into a ByteString.

If you want a question mark (?) added to the front of the result, use True.

Since: http-types-0.2.0

parseQuery :: ByteString -> Query #

Split out the query string into a list of keys and values. A few importants points:

  • The result returned is still bytestrings, since we perform no character decoding here. Most likely, you will want to use UTF-8 decoding, but this is left to the user of the library.
  • Percent decoding errors are ignored. In particular, "%Q" will be output as "%Q".
  • It decodes '+' characters to ' '

Since: http-types-0.2.0

parseQueryReplacePlus :: Bool -> ByteString -> Query #

Same functionality as parseQuery, but with the option to decode '+' characters to ' ' or to preserve any '+' encountered.

If you want to replace any '+' with a space, use True.

Since: http-types-0.12.2

parseSimpleQuery :: ByteString -> SimpleQuery #

Parse SimpleQuery from a ByteString.

This uses parseQuery under the hood, and will transform any Nothing values into an empty ByteString.

Since: http-types-0.2.0

urlEncode :: Bool -> ByteString -> ByteString #

Percent-encoding for URLs.

In short:

  • if you're encoding (parts of) a path element, use False.
  • if you're encoding (parts of) a query string, use True.

In-depth explanation

Expand

This will substitute every byte with its percent-encoded equivalent unless:

  • The byte is alphanumeric. (i.e. A-Z, a-z, or 0-9)
  • The byte is either a dash '-', an underscore '_', a dot '.', or a tilde '~'
  • If False is used, the following will also not be percent-encoded:

    • colon ':', at sign '@', ampersand '&', equals sign '=', plus sign '+', dollar sign '$' or a comma ','

Since: http-types-0.2.0

urlDecode :: Bool -> ByteString -> ByteString #

Percent-decoding.

If you want to replace any '+' with a space, use True.

Since: http-types-0.2.0

encodePathSegments :: [Text] -> Builder #

Encodes a list of path segments into a valid URL fragment.

This function takes the following three steps:

  • UTF-8 encodes the characters.
  • Prepends each segment with a slash.
  • Performs percent-encoding on all characters that are not:

    • alphanumeric (i.e. A-Z and a-z)
    • digits (i.e. 0-9)
    • a dash '-', an underscore '_', a dot '.', or a tilde '~'

For example:

>>> encodePathSegments ["foo", "bar1", "~baz"]
"/foo/bar1/~baz"
>>> encodePathSegments ["foo bar", "baz/bin"]
"/foo%20bar/baz%2Fbin"
>>> encodePathSegments ["שלום"]
"/%D7%A9%D7%9C%D7%95%D7%9D"

Huge thanks to Jeremy Shaw who created the original implementation of this function in web-routes and did such thorough research to determine all correct escaping procedures.

Since: http-types-0.5

encodePathSegmentsRelative :: [Text] -> Builder #

Like encodePathSegments, but without the initial slash.

Since: http-types-0.6.10

decodePathSegments :: ByteString -> [Text] #

Parse a list of path segments from a valid URL fragment.

Will also decode any percent-encoded characters.

Since: http-types-0.5

extractPath :: ByteString -> ByteString #

Extract whole path (path segments + query) from a RFC 2616 Request-URI.

Though a more accurate description of this function's behaviour is that it removes the domain/origin if the string starts with an HTTP protocol. (i.e. http:// or https://)

This function will not change anything when given any other ByteString. (except return a root path "/" if given an empty string)

>>> extractPath "/path"
"/path"
>>> extractPath "http://example.com:8080/path"
"/path"
>>> extractPath "http://example.com"
"/"
>>> extractPath ""
"/"
>>> extractPath "www.google.com/some/path"
"www.google.com/some/path"

Since: http-types-0.8.5

encodePath :: [Text] -> Query -> Builder #

Encode a whole path (path segments + query).

Since: http-types-0.5

decodePath :: ByteString -> ([Text], Query) #

Decode a whole path (path segments + query).

Since: http-types-0.5

renderQueryPartialEscape :: Bool -> PartialEscapeQuery -> ByteString #

Convert PartialEscapeQuery to ByteString.

If you want a question mark (?) added to the front of the result, use True.

>>> renderQueryPartialEscape True [("a", [QN "x:z + ", QE (encodeUtf8 "They said: \"שלום\"")])]
"?a=x:z + They%20said%3A%20%22%D7%A9%D7%9C%D7%95%D7%9D%22"

Since: http-types-0.12.1

renderQueryBuilderPartialEscape :: Bool -> PartialEscapeQuery -> Builder #

Convert a PartialEscapeQuery to a Builder.

If you want a question mark (?) added to the front of the result, use True.

Since: http-types-0.12.1

http09 :: HttpVersion #

HTTP 0.9

http10 :: HttpVersion #

HTTP 1.0

http11 :: HttpVersion #

HTTP 1.1

http20 :: HttpVersion #

HTTP 2.0

Since: http-types-0.10

logDebug :: Q Exp #

Generates a function that takes a Text and logs a LevelDebug message. Usage:

$(logDebug) "This is a debug log message"

logOther :: Text -> Q Exp #

Generates a function that takes a Text and logs a LevelOther message. Usage:

$(logOther "My new level") "This is a log message"

logDebugS :: Q Exp #

Generates a function that takes a LogSource and Text and logs a LevelDebug message. Usage:

$logDebugS "SomeSource" "This is a debug log message"

logOtherS :: Q Exp #

Generates a function that takes a LogSource, a level name and a Text and logs a LevelOther message. Usage:

$logOtherS "SomeSource" "My new level" "This is a log message"

entitiesPrimary :: EntityDef -> NonEmpty FieldDef #

Return the [FieldDef] for the entity keys.

keyAndEntityFields :: EntityDef -> NonEmpty FieldDef #

Returns a NonEmpty list of FieldDef that correspond with the key columns for an EntityDef.

parseFieldAttrs :: [Text] -> [FieldAttr] #

Parse raw field attributes into structured form. Any unrecognized attributes will be preserved, identically as they are encountered, as FieldAttrOther values.

Since: persistent-2.11.0.0

isHaskellField :: FieldDef -> Bool #

Returns True if the FieldDef does not have a MigrationOnly or SafeToRemove flag from the QuasiQuoter.

Since: persistent-2.13.0.0

noCascade :: FieldCascade #

A FieldCascade that does nothing.

Since: persistent-2.11.0

renderFieldCascade :: FieldCascade -> Text #

Renders a FieldCascade value such that it can be used in SQL migrations.

Since: persistent-2.11.0

renderCascadeAction :: CascadeAction -> Text #

Render a CascadeAction to Text such that it can be used in a SQL command.

Since: persistent-2.11.0

setFieldAttrs :: [FieldAttr] -> FieldDef -> FieldDef #

Replace the FieldDef FieldAttr with the new list.

Since: persistent-2.13.0.0

overFieldAttrs :: ([FieldAttr] -> [FieldAttr]) -> FieldDef -> FieldDef #

Modify the list of field attributes.

Since: persistent-2.13.0.0

addFieldAttr :: FieldAttr -> FieldDef -> FieldDef #

Add an attribute to the list of field attributes.

Since: persistent-2.13.0.0

isFieldNullable :: FieldDef -> IsNullable #

Check if the field definition is nullable

Since: persistent-2.13.0.0

isFieldMaybe :: FieldDef -> Bool #

Check if the field is `Maybe a`

Since: persistent-2.13.0.0

getEntityUniquesNoPrimaryKey :: EntityDef -> [UniqueDef] #

Retrieve the list of UniqueDef from an EntityDef. This does not include a Primary key, if one is defined. A future version of persistent will include a Primary key among the Unique constructors for the Entity.

Since: persistent-2.14.0.0

getEntityUniques :: EntityDef -> [UniqueDef] #

Retrieve the list of UniqueDef from an EntityDef. As of version 2.14, this will also include the primary key on the entity, if one is defined. If you do not want the primary key, see getEntityUniquesNoPrimaryKey.

Since: persistent-2.13.0.0

getEntityHaskellName :: EntityDef -> EntityNameHS #

Retrieve the Haskell name of the given entity.

Since: persistent-2.13.0.0

getEntityDBName :: EntityDef -> EntityNameDB #

Return the database name for the given entity.

Since: persistent-2.13.0.0

setEntityDBName :: EntityNameDB -> EntityDef -> EntityDef #

Since: persistent-2.13.0.0

getEntityForeignDefs :: EntityDef -> [ForeignDef] #

Since: persistent-2.13.0.0

getEntityFields :: EntityDef -> [FieldDef] #

Retrieve the list of FieldDef that makes up the fields of the entity.

This does not return the fields for an Id column or an implicit id. It will return the key columns if you used the Primary syntax for defining the primary key.

This does not return fields that are marked SafeToRemove or MigrationOnly - so it only returns fields that are represented in the Haskell type. If you need those fields, use getEntityFieldsDatabase.

Since: persistent-2.13.0.0

getEntityFieldsDatabase :: EntityDef -> [FieldDef] #

This returns all of the FieldDef defined for the EntityDef, including those fields that are marked as MigrationOnly (and therefore only present in the database) or SafeToRemove (and a migration will drop the column if it exists in the database).

For all the fields that are present on the Haskell-type, see getEntityFields.

Since: persistent-2.13.0.0

isEntitySum :: EntityDef -> Bool #

Since: persistent-2.13.0.0

getEntityId :: EntityDef -> EntityIdDef #

Since: persistent-2.13.0.0

getEntityIdField :: EntityDef -> Maybe FieldDef #

Since: persistent-2.13.0.0

setEntityId :: FieldDef -> EntityDef -> EntityDef #

Set an entityId to be the given FieldDef.

Since: persistent-2.13.0.0

setEntityIdDef :: EntityIdDef -> EntityDef -> EntityDef #

Since: persistent-2.13.0.0

getEntityKeyFields :: EntityDef -> NonEmpty FieldDef #

Since: persistent-2.13.0.0

overEntityFields :: ([FieldDef] -> [FieldDef]) -> EntityDef -> EntityDef #

Perform a mapping function over all of the entity fields, as determined by getEntityFieldsDatabase.

Since: persistent-2.13.0.0

getPersistMap :: PersistValue -> Either Text [(Text, PersistValue)] #

FIXME Add documentation to that.

tabulateEntity :: PersistEntity record => (forall a. EntityField record a -> a) -> Entity record #

Construct an Entity record by providing a value for each of the record's fields.

These constructions are equivalent:

entityMattConstructor, entityMattTabulate :: Entity User
entityMattConstructor =
    Entity
        { entityKey = toSqlKey 123
        , entityVal =
            User
                { userName = Matt
                , userAge = 33
                }
        }

entityMattTabulate =
    tabulateEntity $ \case
        UserId ->
            toSqlKey 123
        UserName ->
            Matt
        UserAge ->
            33

This is a specialization of tabulateEntityA, which allows you to construct an Entity by providing an Applicative action for each field instead of a regular function.

Since: persistent-2.14.0.0

entityValues :: PersistEntity record => Entity record -> [PersistValue] #

Get list of values corresponding to given entity.

keyValueEntityToJSON :: (PersistEntity record, ToJSON record) => Entity record -> Value #

Predefined toJSON. The resulting JSON looks like {"key": 1, "value": {"name": ...}}.

The typical usage is:

instance ToJSON (Entity User) where
    toJSON = keyValueEntityToJSON

keyValueEntityFromJSON :: (PersistEntity record, FromJSON record) => Value -> Parser (Entity record) #

Predefined parseJSON. The input JSON looks like {"key": 1, "value": {"name": ...}}.

The typical usage is:

instance FromJSON (Entity User) where
    parseJSON = keyValueEntityFromJSON

entityIdToJSON :: (PersistEntity record, ToJSON record) => Entity record -> Value #

Predefined toJSON. The resulting JSON looks like {"id": 1, "name": ...}.

The typical usage is:

instance ToJSON (Entity User) where
    toJSON = entityIdToJSON

entityIdFromJSON :: (PersistEntity record, FromJSON record) => Value -> Parser (Entity record) #

Predefined parseJSON. The input JSON looks like {"id": 1, "name": ...}.

The typical usage is:

instance FromJSON (Entity User) where
    parseJSON = entityIdFromJSON

toPersistValueJSON :: ToJSON a => a -> PersistValue #

Convenience function for getting a free PersistField instance from a type with JSON instances.

Example usage in combination with fromPersistValueJSON:

instance PersistField MyData where
  fromPersistValue = fromPersistValueJSON
  toPersistValue = toPersistValueJSON

fromPersistValueJSON :: FromJSON a => PersistValue -> Either Text a #

Convenience function for getting a free PersistField instance from a type with JSON instances. The JSON parser used will accept JSON values other that object and arrays. So, if your instance serializes the data to a JSON string, this will still work.

Example usage in combination with toPersistValueJSON:

instance PersistField MyData where
  fromPersistValue = fromPersistValueJSON
  toPersistValue = toPersistValueJSON

withBaseBackend :: forall backend (m :: Type -> Type) a. HasPersistBackend backend => ReaderT (BaseBackend backend) m a -> ReaderT backend m a #

Run a query against a larger backend by plucking out BaseBackend backend

This is a helper for reusing existing queries when expanding the backend type.

Since: persistent-2.12.0

withCompatibleBackend :: forall sup sub (m :: Type -> Type) a. BackendCompatible sup sub => ReaderT sup m a -> ReaderT sub m a #

Run a query against a compatible backend, by projecting the backend

This is a helper for using queries which run against a specific backend type that your backend is compatible with.

Since: persistent-2.12.0

liftPersist :: (MonadIO m, MonadReader backend m) => ReaderT backend IO b -> m b #

getJust :: forall record backend (m :: Type -> Type). (PersistStoreRead backend, PersistRecordBackend record backend, MonadIO m) => Key record -> ReaderT backend m record #

Same as get, but for a non-null (not Maybe) foreign key. Unsafe unless your database is enforcing that the foreign key is valid.

Example usage

Expand

With schema-1 and dataset-1,

getJustSpj :: MonadIO m => ReaderT SqlBackend m User
getJustSpj = getJust spjId
spj <- getJust spjId

The above query when applied on dataset-1, will get this record:

+----+------+-----+
| id | name | age |
+----+------+-----+
|  1 | SPJ  |  40 |
+----+------+-----+
getJustUnknown :: MonadIO m => ReaderT SqlBackend m User
getJustUnknown = getJust unknownId

mrx <- getJustUnknown

This just throws an error.

getJustEntity :: forall record backend (m :: Type -> Type). (PersistEntityBackend record ~ BaseBackend backend, MonadIO m, PersistEntity record, PersistStoreRead backend) => Key record -> ReaderT backend m (Entity record) #

Same as getJust, but returns an Entity instead of just the record.

Example usage

Expand

With schema-1 and dataset-1,

getJustEntitySpj :: MonadIO m => ReaderT SqlBackend m (Entity User)
getJustEntitySpj = getJustEntity spjId
spjEnt <- getJustEntitySpj

The above query when applied on dataset-1, will get this entity:

+----+------+-----+
| id | name | age |
+----+------+-----+
|  1 | SPJ  |  40 |
+----+------+-----+

Since: persistent-2.6.1

belongsTo :: forall ent1 ent2 backend (m :: Type -> Type). (PersistStoreRead backend, PersistEntity ent1, PersistRecordBackend ent2 backend, MonadIO m) => (ent1 -> Maybe (Key ent2)) -> ent1 -> ReaderT backend m (Maybe ent2) #

Curry this to make a convenience function that loads an associated model.

foreign = belongsTo foreignId

belongsToJust :: forall ent1 ent2 backend (m :: Type -> Type). (PersistStoreRead backend, PersistEntity ent1, PersistRecordBackend ent2 backend, MonadIO m) => (ent1 -> Key ent2) -> ent1 -> ReaderT backend m ent2 #

Same as belongsTo, but uses getJust and therefore is similarly unsafe.

insertEntity :: forall e backend (m :: Type -> Type). (PersistStoreWrite backend, PersistRecordBackend e backend, SafeToInsert e, MonadIO m, HasCallStack) => e -> ReaderT backend m (Entity e) #

Like insert, but returns the complete Entity.

Example usage

Expand

With schema-1 and dataset-1,

insertHaskellEntity :: MonadIO m => ReaderT SqlBackend m (Entity User)
insertHaskellEntity = insertEntity $ User "Haskell" 81
haskellEnt <- insertHaskellEntity

The above query when applied on dataset-1, will produce this:

+----+---------+-----+
| id |  name   | age |
+----+---------+-----+
|  1 | SPJ     |  40 |
+----+---------+-----+
|  2 | Simon   |  41 |
+----+---------+-----+
|  3 | Haskell |  81 |
+----+---------+-----+

getEntity :: forall e backend (m :: Type -> Type). (PersistStoreRead backend, PersistRecordBackend e backend, MonadIO m) => Key e -> ReaderT backend m (Maybe (Entity e)) #

Like get, but returns the complete Entity.

Example usage

Expand

With schema-1 and dataset-1,

getSpjEntity :: MonadIO m => ReaderT SqlBackend m (Maybe (Entity User))
getSpjEntity = getEntity spjId
mSpjEnt <- getSpjEntity

The above query when applied on dataset-1, will get this entity:

+----+------+-----+
| id | name | age |
+----+------+-----+
|  1 | SPJ  |  40 |
+----+------+-----+

insertRecord :: forall record backend (m :: Type -> Type). (PersistEntityBackend record ~ BaseBackend backend, PersistEntity record, MonadIO m, PersistStoreWrite backend, SafeToInsert record, HasCallStack) => record -> ReaderT backend m record #

Like insertEntity but just returns the record instead of Entity.

Example usage

Expand

With schema-1 and dataset-1,

insertDaveRecord :: MonadIO m => ReaderT SqlBackend m User
insertDaveRecord = insertRecord $ User "Dave" 50
dave <- insertDaveRecord

The above query when applied on dataset-1, will produce this:

+-----+------+-----+
|id   |name  |age  |
+-----+------+-----+
|1    |SPJ   |40   |
+-----+------+-----+
|2    |Simon |41   |
+-----+------+-----+
|3    |Dave  |50   |
+-----+------+-----+

Since: persistent-2.6.1

onlyOneUniqueDef :: (OnlyOneUniqueKey record, Monad proxy) => proxy record -> UniqueDef #

Given a proxy for a PersistEntity record, this returns the sole UniqueDef for that entity.

Since: persistent-2.13.0.0

insertUniqueEntity :: forall record backend (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, PersistUniqueWrite backend, SafeToInsert record) => record -> ReaderT backend m (Maybe (Entity record)) #

Like insertEntity, but returns Nothing when the record couldn't be inserted because of a uniqueness constraint.

Example usage

Expand

We use schema-2 and dataset-1 here.

insertUniqueSpjEntity :: MonadIO m => ReaderT SqlBackend m (Maybe (Entity User))
insertUniqueSpjEntity = insertUniqueEntity $ User "SPJ" 50
mSpjEnt <- insertUniqueSpjEntity

The above query results Nothing as SPJ already exists.

insertUniqueAlexaEntity :: MonadIO m => ReaderT SqlBackend m (Maybe (Entity User))
insertUniqueAlexaEntity = insertUniqueEntity $ User "Alexa" 3
mAlexaEnt <- insertUniqueSpjEntity

Because there's no such unique keywords of the given record, the above query when applied on dataset-1, will produce this:

+----+-------+-----+
| id | name  | age |
+----+-------+-----+
|  1 | SPJ   |  40 |
+----+-------+-----+
|  2 | Simon |  41 |
+----+-------+-----+
|  3 | Alexa |   3 |
+----+-------+-----+

Since: persistent-2.7.1

onlyUnique :: forall record backend (m :: Type -> Type). (MonadIO m, PersistUniqueWrite backend, PersistRecordBackend record backend, OnlyOneUniqueKey record) => record -> ReaderT backend m (Unique record) #

Return the single unique key for a record.

Example usage

Expand

We use shcema-1 and dataset-1 here.

onlySimonConst :: MonadIO m => ReaderT SqlBackend m (Unique User)
onlySimonConst = onlyUnique $ User "Simon" 999
mSimonConst <- onlySimonConst

mSimonConst would be Simon's uniqueness constraint. Note that onlyUnique doesn't work if there're more than two constraints. It will fail with a type error instead.

getByValue :: forall record (m :: Type -> Type) backend. (MonadIO m, PersistUniqueRead backend, PersistRecordBackend record backend, AtLeastOneUniqueKey record) => record -> ReaderT backend m (Maybe (Entity record)) #

A modification of getBy, which takes the PersistEntity itself instead of a Unique record. Returns a record matching one of the unique keys. This function makes the most sense on entities with a single Unique constructor.

Example usage

Expand

With schema-1 and dataset-1,

getBySpjValue :: MonadIO m => ReaderT SqlBackend m (Maybe (Entity User)) getBySpjValue = getByValue $ User SPJ 999

mSpjEnt <- getBySpjValue

The above query when applied on dataset-1, will get this record:

+----+------+-----+
| id | name | age |
+----+------+-----+
|  1 | SPJ  |  40 |
+----+------+-----+

replaceUnique :: forall record backend (m :: Type -> Type). (MonadIO m, Eq (Unique record), PersistRecordBackend record backend, PersistUniqueWrite backend) => Key record -> record -> ReaderT backend m (Maybe (Unique record)) #

Attempt to replace the record of the given key with the given new record. First query the unique fields to make sure the replacement maintains uniqueness constraints.

Return Nothing if the replacement was made. If uniqueness is violated, return a Just with the Unique violation

Since: persistent-1.2.2.0

checkUnique :: forall record backend (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, PersistUniqueRead backend) => record -> ReaderT backend m (Maybe (Unique record)) #

Check whether there are any conflicts for unique keys with this entity and existing entities in the database.

Returns Nothing if the entity would be unique, and could thus safely be inserted. on a conflict returns the conflicting key

Example usage

Expand

We use schema-1 and dataset-1 here.

This would be Nothing:

mAlanConst <- checkUnique $ User "Alan" 70

While this would be Just because SPJ already exists:

mSpjConst <- checkUnique $ User "SPJ" 60

checkUniqueUpdateable :: forall record backend (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, PersistUniqueRead backend) => Entity record -> ReaderT backend m (Maybe (Unique record)) #

Check whether there are any conflicts for unique keys with this entity and existing entities in the database.

Returns Nothing if the entity would stay unique, and could thus safely be updated. on a conflict returns the conflicting key

This is similar to checkUnique, except it's useful for updating - when the particular entity already exists, it would normally conflict with itself. This variant ignores those conflicts

Example usage

Expand

We use schema-1 and dataset-1 here.

This would be Nothing:

mAlanConst <- checkUnique $ User "Alan" 70

While this would be Just because SPJ already exists:

mSpjConst <- checkUnique $ User "SPJ" 60

Since: persistent-2.11.0.0

selectSource :: forall record backend (m :: Type -> Type). (PersistQueryRead backend, MonadResource m, PersistRecordBackend record backend, MonadReader backend m) => [Filter record] -> [SelectOpt record] -> ConduitM () (Entity record) m () #

Get all records matching the given criterion in the specified order. Returns also the identifiers.

WARNING: This function returns a ConduitM, which suggests that it streams the results. It does not stream results on most backends. If you need streaming, see persistent-pagination for a means of chunking results based on indexed ranges.

selectKeys :: forall record backend (m :: Type -> Type). (PersistQueryRead backend, MonadResource m, PersistRecordBackend record backend, MonadReader backend m) => [Filter record] -> [SelectOpt record] -> ConduitM () (Key record) m () #

Get the Keys of all records matching the given criterion.

For an example, see selectList.

selectList :: forall record backend (m :: Type -> Type). (MonadIO m, PersistQueryRead backend, PersistRecordBackend record backend) => [Filter record] -> [SelectOpt record] -> ReaderT backend m [Entity record] #

Returns a [Entity record] corresponding to the filters and options provided.

Filters are constructed using the operators defined in Database.Persist (and re-exported from Database.Persist.Sql). Let's look at some examples:

usersWithAgeOver40 :: SqlPersistT IO [Entity User]
usersWithAgeOver40 =
    selectList [UserAge >=. 40] []

If you provide multiple values in the list, the conditions are ANDed together.

usersWithAgeBetween30And50 :: SqlPersistT IO [Entity User]
usersWithAgeBetween30And50 =
     selectList
         [ UserAge >=. 30
         , UserAge <=. 50
         ]
         []

The second list contains the SelectOpt for a record. We can select the first ten records with LimitTo

firstTenUsers =
    selectList [] [LimitTo 10]

And we can select the second ten users with OffsetBy.

secondTenUsers =
    selectList [] [LimitTo 10, OffsetBy 10]

Warning that LIMIT/OFFSET is bad for pagination!

The type of record can usually be infered from the types of the provided filters and select options. In the previous two examples, though, you'll notice that the select options are polymorphic, applying to any record type. In order to help type inference in such situations, or simply as an enhancement to readability, you might find type application useful, illustrated below.

{-# LANGUAGE TypeApplications #-}
...

firstTenUsers =
    selectList User [] [LimitTo 10]

secondTenUsers =
    selectList User [] [LimitTo 10, OffsetBy 10]

With Asc and Desc, we can provide the field we want to sort on. We can provide multiple sort orders - later ones are used to sort records that are equal on the first field.

newestUsers =
    selectList [] [Desc UserCreatedAt, LimitTo 10]

oldestUsers =
    selectList [] [Asc UserCreatedAt, LimitTo 10]

selectKeysList :: forall record backend (m :: Type -> Type). (MonadIO m, PersistQueryRead backend, PersistRecordBackend record backend) => [Filter record] -> [SelectOpt record] -> ReaderT backend m [Key record] #

Call selectKeys but return the result as a list.

(=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Update v infixr 3 #

Assign a field a value.

Examples

updateAge :: MonadIO m => ReaderT SqlBackend m ()
updateAge = updateWhere [UserName ==. "SPJ" ] [UserAge =. 45]

Similar to updateWhere which is shown in the above example you can use other functions present in the module Database.Persist.Class. Note that the first parameter of updateWhere is [Filter val] and second parameter is [Update val]. By comparing this with the type of ==. and =., you can see that they match up in the above usage.

The above query when applied on dataset-1, will produce this:

+-----+-----+--------+
|id   |name |age     |
+-----+-----+--------+
|1    |SPJ  |40 -> 45|
+-----+-----+--------+
|2    |Simon|41      |
+-----+-----+--------+

(+=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Update v infixr 3 #

Assign a field by addition (+=).

Examples

addAge :: MonadIO m => ReaderT SqlBackend m ()
addAge = updateWhere [UserName ==. "SPJ" ] [UserAge +=. 1]

The above query when applied on dataset-1, will produce this:

+-----+-----+---------+
|id   |name |age      |
+-----+-----+---------+
|1    |SPJ  |40 -> 41 |
+-----+-----+---------+
|2    |Simon|41       |
+-----+-----+---------+

(-=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Update v infixr 3 #

Assign a field by subtraction (-=).

Examples

subtractAge :: MonadIO m => ReaderT SqlBackend m ()
subtractAge = updateWhere [UserName ==. "SPJ" ] [UserAge -=. 1]

The above query when applied on dataset-1, will produce this:

+-----+-----+---------+
|id   |name |age      |
+-----+-----+---------+
|1    |SPJ  |40 -> 39 |
+-----+-----+---------+
|2    |Simon|41       |
+-----+-----+---------+

(*=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Update v infixr 3 #

Assign a field by multiplication (*=).

Examples

multiplyAge :: MonadIO m => ReaderT SqlBackend m ()
multiplyAge = updateWhere [UserName ==. "SPJ" ] [UserAge *=. 2]

The above query when applied on dataset-1, will produce this:

+-----+-----+--------+
|id   |name |age     |
+-----+-----+--------+
|1    |SPJ  |40 -> 80|
+-----+-----+--------+
|2    |Simon|41      |
+-----+-----+--------+

(/=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Update v infixr 3 #

Assign a field by division (/=).

Examples

divideAge :: MonadIO m => ReaderT SqlBackend m ()
divideAge = updateWhere [UserName ==. "SPJ" ] [UserAge /=. 2]

The above query when applied on dataset-1, will produce this:

+-----+-----+---------+
|id   |name |age      |
+-----+-----+---------+
|1    |SPJ  |40 -> 20 |
+-----+-----+---------+
|2    |Simon|41       |
+-----+-----+---------+

(==.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Filter v infix 4 #

Check for equality.

Examples

selectSPJ :: MonadIO m => ReaderT SqlBackend m [Entity User]
selectSPJ = selectList [UserName ==. "SPJ" ] []

The above query when applied on dataset-1, will produce this:

+-----+-----+-----+
|id   |name |age  |
+-----+-----+-----+
|1    |SPJ  |40   |
+-----+-----+-----+

(!=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Filter v infix 4 #

Non-equality check.

Examples

selectSimon :: MonadIO m => ReaderT SqlBackend m [Entity User]
selectSimon = selectList [UserName !=. "SPJ" ] []

The above query when applied on dataset-1, will produce this:

+-----+-----+-----+
|id   |name |age  |
+-----+-----+-----+
|2    |Simon|41   |
+-----+-----+-----+

(<.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Filter v infix 4 #

Less-than check.

Examples

selectLessAge :: MonadIO m => ReaderT SqlBackend m [Entity User]
selectLessAge = selectList [UserAge <. 41 ] []

The above query when applied on dataset-1, will produce this:

+-----+-----+-----+
|id   |name |age  |
+-----+-----+-----+
|1    |SPJ  |40   |
+-----+-----+-----+

(<=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Filter v infix 4 #

Less-than or equal check.

Examples

selectLessEqualAge :: MonadIO m => ReaderT SqlBackend m [Entity User]
selectLessEqualAge = selectList [UserAge <=. 40 ] []

The above query when applied on dataset-1, will produce this:

+-----+-----+-----+
|id   |name |age  |
+-----+-----+-----+
|1    |SPJ  |40   |
+-----+-----+-----+

(>.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Filter v infix 4 #

Greater-than check.

Examples

selectGreaterAge :: MonadIO m => ReaderT SqlBackend m [Entity User]
selectGreaterAge = selectList [UserAge >. 40 ] []

The above query when applied on dataset-1, will produce this:

+-----+-----+-----+
|id   |name |age  |
+-----+-----+-----+
|2    |Simon|41   |
+-----+-----+-----+

(>=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Filter v infix 4 #

Greater-than or equal check.

Examples

selectGreaterEqualAge :: MonadIO m => ReaderT SqlBackend m [Entity User]
selectGreaterEqualAge = selectList [UserAge >=. 41 ] []

The above query when applied on dataset-1, will produce this:

+-----+-----+-----+
|id   |name |age  |
+-----+-----+-----+
|2    |Simon|41   |
+-----+-----+-----+

(<-.) :: forall v typ. PersistField typ => EntityField v typ -> [typ] -> Filter v infix 4 #

Check if value is in given list.

Examples

selectUsers :: MonadIO m => ReaderT SqlBackend m [Entity User]
selectUsers = selectList [UserAge <-. [40, 41]] []

The above query when applied on dataset-1, will produce this:

+-----+-----+-----+
|id   |name |age  |
+-----+-----+-----+
|1    |SPJ  |40   |
+-----+-----+-----+
|2    |Simon|41   |
+-----+-----+-----+
selectSPJ :: MonadIO m => ReaderT SqlBackend m [Entity User]
selectSPJ = selectList [UserAge <-. [40]] []

The above query when applied on dataset-1, will produce this:

+-----+-----+-----+
|id   |name |age  |
+-----+-----+-----+
|1    |SPJ  |40   |
+-----+-----+-----+

(/<-.) :: forall v typ. PersistField typ => EntityField v typ -> [typ] -> Filter v infix 4 #

Check if value is not in given list.

Examples

selectSimon :: MonadIO m => ReaderT SqlBackend m [Entity User]
selectSimon = selectList [UserAge /<-. [40]] []

The above query when applied on dataset-1, will produce this:

+-----+-----+-----+
|id   |name |age  |
+-----+-----+-----+
|2    |Simon|41   |
+-----+-----+-----+

(||.) :: [Filter v] -> [Filter v] -> [Filter v] infixl 3 #

The OR of two lists of filters. For example:

selectList
    ([ PersonAge >. 25
     , PersonAge <. 30 ] ||.
     [ PersonIncome >. 15000
     , PersonIncome <. 25000 ])
    []

will filter records where a person's age is between 25 and 30 or a person's income is between (15000 and 25000).

If you are looking for an (&&.) operator to do (A AND B AND (C OR D)) you can use the (++) operator instead as there is no (&&.). For example:

selectList
    ([ PersonAge >. 25
     , PersonAge <. 30 ] ++
    ([PersonCategory ==. 1] ||.
     [PersonCategory ==. 5]))
    []

will filter records where a person's age is between 25 and 30 and (person's category is either 1 or 5).

listToJSON :: [PersistValue] -> Text #

Convert list of PersistValues into textual representation of JSON object. This is a type-constrained synonym for toJsonText.

mapToJSON :: [(Text, PersistValue)] -> Text #

Convert map (list of tuples) into textual representation of JSON object. This is a type-constrained synonym for toJsonText.

toJsonText :: ToJSON j => j -> Text #

A more general way to convert instances of ToJSON type class to strict text Text.

limitOffsetOrder :: PersistEntity val => [SelectOpt val] -> (Int, Int, [SelectOpt val]) #

FIXME What's this exactly?

runMigration :: forall (m :: Type -> Type). MonadIO m => Migration -> ReaderT SqlBackend m () #

Runs a migration. If the migration fails to parse or if any of the migrations are unsafe, then this throws a PersistUnsafeMigrationException.

persistWith :: PersistSettings -> QuasiQuoter #

Converts a quasi-quoted syntax into a list of entity definitions, to be used as input to the template haskell generation code (mkPersist).

persistFileWith :: PersistSettings -> FilePath -> Q Exp #

Same as persistWith, but uses an external file instead of a quasiquotation. The recommended file extension is .persistentmodels.

persistManyFileWith :: PersistSettings -> [FilePath] -> Q Exp #

Same as persistFileWith, but uses several external files instead of one. Splitting your Persistent definitions into multiple modules can potentially dramatically speed up compile times.

The recommended file extension is .persistentmodels.

Examples

Expand

Split your Persistent definitions into multiple files (models1, models2), then create a new module for each new file and run mkPersist there:

-- Model1.hs
share
    [mkPersist sqlSettings]
    $(persistFileWith lowerCaseSettings "models1")
-- Model2.hs
share
    [mkPersist sqlSettings]
    $(persistFileWith lowerCaseSettings "models2")

Use persistManyFileWith to create your migrations:

-- Migrate.hs
mkMigrate "migrateAll"
    $(persistManyFileWith lowerCaseSettings ["models1.persistentmodels","models2.persistentmodels"])

Tip: To get the same import behavior as if you were declaring all your models in one file, import your new files as Name into another file, then export module Name.

This approach may be used in the future to reduce memory usage during compilation, but so far we've only seen mild reductions.

See persistent#778 and persistent#791 for more details.

Since: persistent-2.5.4

embedEntityDefs #

Arguments

:: [EntityDef]

A list of EntityDef that have been defined in a previous mkPersist call.

Since: persistent-2.13.0.0

-> [UnboundEntityDef] 
-> [UnboundEntityDef] 

Takes a list of (potentially) independently defined entities and properly links all foreign keys to reference the right EntityDef, tying the knot between entities.

Allows users to define entities indepedently or in separate modules and then fix the cross-references between them at runtime to create a Migration.

Since: persistent-2.7.2

parseReferences :: PersistSettings -> Text -> Q Exp #

Calls parse to Quasi.parse individual entities in isolation afterwards, sets references to other entities

In 2.13.0.0, this was changed to splice in [UnboundEntityDef] instead of [EntityDef].

Since: persistent-2.5.3

mkPersist :: MkPersistSettings -> [UnboundEntityDef] -> Q [Dec] #

Create data types and appropriate PersistEntity instances for the given UnboundEntityDefs.

This function should be used if you are only defining a single block of Persistent models for the entire application. If you intend on defining multiple blocks in different fiels, see mkPersistWith which allows you to provide existing entity definitions so foreign key references work.

Example:

mkPersist sqlSettings [persistLowerCase|
     User
         name    Text
         age     Int

     Dog
         name    Text
         owner   UserId

|]

Example from a file:

mkPersist sqlSettings $(persistFileWith lowerCaseSettings "models.persistentmodels")

For full information on the QuasiQuoter syntax, see Database.Persist.Quasi documentation.

mkPersistWith :: MkPersistSettings -> [EntityDef] -> [UnboundEntityDef] -> Q [Dec] #

Like mkPersist, but allows you to provide a [EntityDef] representing the predefined entities. This function will include those EntityDef when looking for foreign key references.

You should use this if you intend on defining Persistent models in multiple files.

Suppose we define a table Foo which has no dependencies.

module DB.Foo where

    mkPersistWith sqlSettings [] [persistLowerCase|
        Foo
           name    Text
       |]

Then, we define a table Bar which depends on Foo:

module DB.Bar where

    import DB.Foo

    mkPersistWith sqlSettings [entityDef (Proxy :: Proxy Foo)] [persistLowerCase|
        Bar
            fooId  FooId
     |]

Writing out the list of EntityDef can be annoying. The $(discoverEntities) shortcut will work to reduce this boilerplate.

module DB.Quux where

    import DB.Foo
    import DB.Bar

    mkPersistWith sqlSettings $(discoverEntities) [persistLowerCase|
        Quux
            name     Text
            fooId    FooId
            barId    BarId
     |]

Since: persistent-2.13.0.0

setImplicitIdDef :: ImplicitIdDef -> MkPersistSettings -> MkPersistSettings #

Set the ImplicitIdDef in the given MkPersistSettings. The default value is autoIncrementingInteger.

Since: persistent-2.13.0.0

mkPersistSettings #

Arguments

:: Type

Value for mpsBackend

-> MkPersistSettings 

Create an MkPersistSettings with default values.

sqlSettings :: MkPersistSettings #

Use the SqlPersist backend.

lensPTH :: (s -> a) -> (s -> b -> t) -> Lens s t a b #

pkNewtype :: MkPersistSettings -> UnboundEntityDef -> Bool #

Returns True if the key definition has less than 2 fields.

Since: persistent-2.11.0.0

fieldError :: Text -> Text -> Text -> Text #

Render an error message based on the tableName and fieldName with the provided message.

Since: persistent-2.8.2

persistFieldFromEntity :: MkPersistSettings -> UnboundEntityDef -> Q [Dec] #

Produce code similar to the following:

  instance PersistEntity e => PersistField e where
     toPersistValue = entityToPersistValueHelper
     fromPersistValue = entityFromPersistValueHelper ["col1", "col2"]
     sqlType _ = SqlString

share :: [[a] -> Q [Dec]] -> [a] -> Q [Dec] #

Apply the given list of functions to the same EntityDefs.

This function is useful for cases such as:

share [mkEntityDefList "myDefs", mkPersist sqlSettings] [persistLowerCase|
    -- ...
|]

If you only have a single function, though, you don't need this. The following is redundant:

share [mkPersist sqlSettings] [persistLowerCase|
     -- ...
|]

Most functions require a full [EntityDef], which can be provided using $(discoverEntities) for all entites in scope, or defining mkEntityDefList to define a list of entities from the given block.

mkEntityDefList #

Arguments

:: String

The name that will be given to the EntityDef list.

-> [UnboundEntityDef] 
-> Q [Dec] 

Creates a declaration for the [EntityDef] from the persistent schema. This is necessary because the Persistent QuasiQuoter is unable to know the correct type of ID fields, and assumes that they are all Int64.

Provide this in the list you give to share, much like mkMigrate.

share [mkMigrate "migrateAll", mkEntityDefList "entityDefs"] [...]

Since: persistent-2.7.1

derivePersistField :: String -> Q [Dec] #

Automatically creates a valid PersistField instance for any datatype that has valid Show and Read instances. Can be very convenient for Enum types.

derivePersistFieldJSON :: String -> Q [Dec] #

Automatically creates a valid PersistField instance for any datatype that has valid ToJSON and FromJSON instances. For a datatype T it generates instances similar to these:

   instance PersistField T where
       toPersistValue = PersistByteString . L.toStrict . encode
       fromPersistValue = (left T.pack) . eitherDecodeStrict' <=< fromPersistValue
   instance PersistFieldSql T where
       sqlType _ = SqlString

migrateModels :: [EntityDef] -> Migration #

The basic function for migrating models, no Template Haskell required.

It's probably best to use this in concert with mkEntityDefList, and then call migrateModels with the result from that function.

share [mkPersist sqlSettings, mkEntityDefList "entities"] [persistLowerCase| ... |]

migrateAll = migrateModels entities

The function mkMigrate currently implements exactly this behavior now. If you're splitting up the entity definitions into separate files, then it is better to use the entity definition list and the concatenate all the models together into a big list to call with migrateModels.

module Foo where

    share [mkPersist s, mkEntityDefList "fooModels"] ...


module Bar where

    share [mkPersist s, mkEntityDefList "barModels"] ...

module Migration where

    import Foo
    import Bar

    migrateAll = migrateModels (fooModels <> barModels)

Since: persistent-2.13.0.0

mkMigrate :: String -> [UnboundEntityDef] -> Q [Dec] #

Creates a single function to perform all migrations for the entities defined here. One thing to be aware of is dependencies: if you have entities with foreign references, make sure to place those definitions after the entities they reference.

In persistent-2.13.0.0, this was changed to *ignore* the input entity def list, and instead defer to mkEntityDefList to get the correct entities. This avoids problems where the QuasiQuoter is unable to know what the right reference types are. This sets mkPersist to be the "single source of truth" for entity definitions.

discoverEntities :: Q Exp #

Splice in a list of all EntityDef in scope. This is useful when running mkPersist to ensure that all entity definitions are available for setting foreign keys, and for performing migrations with all entities available.

mkPersist has the type MkPersistSettings -> [EntityDef] -> DecsQ. So, to account for entities defined elsewhere, you'll mappend $(discoverEntities).

For example,

share
  [ mkPersistWith sqlSettings $(discoverEntities)
  ]
  [persistLowerCase| ... |]

Likewise, to run migrations with all entity instances in scope, you'd write:

migrateAll = migrateModels $(discoverEntities)

Note that there is some odd behavior with Template Haskell and splicing groups. If you call discoverEntities in the same module that defines PersistEntity instances, you need to ensure they are in different top-level binding groups. You can write $(pure []) at the top level to do this.

-- Foo and Bar both export an instance of PersistEntity
import Foo
import Bar

-- Since Foo and Bar are both imported, discoverEntities can find them here.
mkPersistWith sqlSettings $(discoverEntities) [persistLowerCase|
  User
    name Text
    age  Int
  |]

-- onlyFooBar is defined in the same 'top level group' as the above generated
-- instance for User, so it isn't present in this list.
onlyFooBar :: [EntityDef]
onlyFooBar = $(discoverEntities)

-- We can manually create a new binding group with this, which splices an
-- empty list of declarations in.
$(pure [])

-- fooBarUser is able to see the User instance.
fooBarUser :: [EntityDef]
fooBarUser = $(discoverEntities)

Since: persistent-2.13.0.0

renderJavascriptUrl :: (url -> [(Text, Text)] -> Text) -> JavascriptUrl url -> Text #

render with route interpolation. If using this module standalone, apart from type-safe routes, a dummy renderer can be used:

renderJavascriptUrl (\_ _ -> undefined) javascriptUrl

When using Yesod, a renderer is generated for you, which can be accessed within the GHandler monad: getUrlRenderParams.

renderCssUrl :: (url -> [(Text, Text)] -> Text) -> CssUrl url -> Text #

lucius :: QuasiQuoter #

>>> renderCss ([lucius|foo{bar:baz}|] undefined)
"foo{bar:baz}"

shamlet :: QuasiQuoter #

"Simple Hamlet" quasi-quoter. May only be used to generate expressions.

Generated expressions have type Html.

>>> putStrLn (renderHtml [shamlet|<div>Hello, world!|])
<div>Hello, world!</div>

hamlet :: QuasiQuoter #

Hamlet quasi-quoter. May only be used to generate expressions.

Generated expression have type HtmlUrl url, for some url.

data MyRoute = Home

render :: Render MyRoute
render Home _ = "/home"

>>> putStrLn (renderHtml ([hamlet|<a href=@{Home}>Home|] render))
<a href="/home">Home</a>

xhamlet :: QuasiQuoter #

Like hamlet, but produces XHTML.

mkMessage #

Arguments

:: String

base name to use for translation type

-> FilePath

subdirectory which contains the translation files

-> Lang

default translation language

-> Q [Dec] 

generate translations from translation files

This function will:

  1. look in the supplied subdirectory for files ending in .msg
  2. generate a type based on the constructors found
  3. create a RenderMessage instance

mkMessageFor #

Arguments

:: String

master translation data type

-> String

existing type to add translations for

-> FilePath

path to translation folder

-> Lang

default language

-> Q [Dec] 

create RenderMessage instance for an existing data-type

mkMessageVariant #

Arguments

:: String

master translation data type

-> String

existing type to add translations for

-> FilePath

path to translation folder

-> Lang

default language

-> Q [Dec] 

create an additional set of translations for a type created by mkMessage

getUrlRenderParams :: MonadHandler m => m (Route (HandlerSite m) -> [(Text, Text)] -> Text) #

The URL rendering function with query-string parameters.

guessApproot :: Approot site #

Guess the approot based on request headers. For more information, see Network.Wai.Middleware.Approot

In the case of headers being unavailable, it falls back to ApprootRelative

Since 1.4.16

setHeader :: MonadHandler m => Text -> Text -> m () #

Deprecated synonym for addHeader.

sendFile :: MonadHandler m => ContentType -> FilePath -> m a #

Bypass remaining handler code and output the given file.

For some backends, this is more efficient than reading in the file to memory, since they can optimize file sending via a system call to sendfile.

sendResponse :: (MonadHandler m, ToTypedContent c) => c -> m a #

Bypass remaining handler code and output the given content with a 200 status code.

formatW3 :: UTCTime -> Text #

Format a UTCTime in W3 format.

formatRFC1123 :: UTCTime -> Text #

Format as per RFC 1123.

formatRFC822 :: UTCTime -> Text #

Format as per RFC 822.

clientSessionDateCacher #

Arguments

:: NominalDiffTime

Inactive session validity.

-> IO (IO ClientSessionDateCache, IO ()) 

emptyContent :: Content #

Zero-length enumerator.

repJson :: ToContent a => a -> RepJson #

repXml :: ToContent a => a -> RepXml #

simpleContentType :: ContentType -> ContentType #

Removes "extra" information at the end of a content type string. In particular, removes everything after the semicolon, if present.

For example, "text/html; charset=utf-8" is commonly used to specify the character encoding for HTML data. This function would return "text/html".

contentTypeTypes :: ContentType -> (ByteString, ByteString) #

Give just the media types as a pair.

For example, "text/html; charset=utf-8" returns ("text", "html")

getYesod :: MonadHandler m => m (HandlerSite m) #

Get the master site application argument.

getsYesod :: MonadHandler m => (HandlerSite m -> a) -> m a #

Get a specific component of the master site application argument. Analogous to the gets function for operating on StateT.

getUrlRender :: MonadHandler m => m (Route (HandlerSite m) -> Text) #

Get the URL rendering function.

getPostParams :: MonadHandler m => m [(Text, Text)] #

Get all the post parameters passed to the handler. To also get the submitted files (if any), you have to use runRequestBody instead of this function.

Since: yesod-core-1.4.33

getCurrentRoute :: MonadHandler m => m (Maybe (Route (HandlerSite m))) #

Get the route requested by the user. If this is a 404 response- where the user requested an invalid route- this function will return Nothing.

handlerToIO :: MonadIO m => HandlerFor site (HandlerFor site a -> m a) #

Returns a function that runs HandlerFor actions inside IO.

Sometimes you want to run an inner HandlerFor action outside the control flow of an HTTP request (on the outer HandlerFor action). For example, you may want to spawn a new thread:

getFooR :: Handler RepHtml
getFooR = do
  runInnerHandler <- handlerToIO
  liftIO $ forkIO $ runInnerHandler $ do
    Code here runs inside HandlerFor but on a new thread.
    This is the inner HandlerFor.
    ...
  Code here runs inside the request's control flow.
  This is the outer HandlerFor.
  ...

Another use case for this function is creating a stream of server-sent events using HandlerFor actions (see yesod-eventsource).

Most of the environment from the outer HandlerFor is preserved on the inner HandlerFor, however:

  • The request body is cleared (otherwise it would be very difficult to prevent huge memory leaks).
  • The cache is cleared (see cached).

Changes to the response made inside the inner HandlerFor are ignored (e.g., session variables, cookies, response headers). This allows the inner HandlerFor to outlive the outer HandlerFor (e.g., on the forkIO example above, a response may be sent to the client without killing the new thread).

forkHandler #

Arguments

:: (SomeException -> HandlerFor site ())

error handler

-> HandlerFor site () 
-> HandlerFor site () 

forkIO for a Handler (run an action in the background)

Uses handlerToIO, liftResourceT, and resourceForkIO for correctness and efficiency

Since: yesod-core-1.2.8

redirect :: (MonadHandler m, RedirectUrl (HandlerSite m) url) => url -> m a #

Redirect to the given route. HTTP status code 303 for HTTP 1.1 clients and 302 for HTTP 1.0 This is the appropriate choice for a get-following-post technique, which should be the usual use case.

If you want direct control of the final status code, or need a different status code, please use redirectWith.

redirectWith :: (MonadHandler m, RedirectUrl (HandlerSite m) url) => Status -> url -> m a #

Redirect to the given URL with the specified status code.

setUltDest :: (MonadHandler m, RedirectUrl (HandlerSite m) url) => url -> m () #

Sets the ultimate destination variable to the given route.

An ultimate destination is stored in the user session and can be loaded later by redirectUltDest.

setUltDestCurrent :: MonadHandler m => m () #

Same as setUltDest, but uses the current page.

If this is a 404 handler, there is no current page, and then this call does nothing.

setUltDestReferer :: MonadHandler m => m () #

Sets the ultimate destination to the referer request header, if present.

This function will not overwrite an existing ultdest.

redirectUltDest #

Arguments

:: (RedirectUrl (HandlerSite m) url, MonadHandler m) 
=> url

default destination if nothing in session

-> m a 

Redirect to the ultimate destination in the user's session. Clear the value from the session.

The ultimate destination is set with setUltDest.

This function uses redirect, and thus will perform a temporary redirect to a GET request.

clearUltDest :: MonadHandler m => m () #

Remove a previously set ultimate destination. See setUltDest.

addMessage #

Arguments

:: MonadHandler m 
=> Text

status

-> Html

message

-> m () 

Adds a status and message in the user's session.

See getMessages.

Since: yesod-core-1.4.20

addMessageI :: (MonadHandler m, RenderMessage (HandlerSite m) msg) => Text -> msg -> m () #

Adds a message in the user's session but uses RenderMessage to allow for i18n

See getMessages.

Since: yesod-core-1.4.20

getMessages :: MonadHandler m => m [(Text, Html)] #

Gets all messages in the user's session, and then clears the variable.

See addMessage.

Since: yesod-core-1.4.20

setMessage :: MonadHandler m => Html -> m () #

Calls addMessage with an empty status

setMessageI :: (MonadHandler m, RenderMessage (HandlerSite m) msg) => msg -> m () #

Calls addMessageI with an empty status

getMessage :: MonadHandler m => m (Maybe Html) #

Gets just the last message in the user's session, discards the rest and the status

sendFilePart #

Arguments

:: MonadHandler m 
=> ContentType 
-> FilePath 
-> Integer

offset

-> Integer

count

-> m a 

Same as sendFile, but only sends part of a file.

sendResponseStatus :: (MonadHandler m, ToTypedContent c) => Status -> c -> m a #

Bypass remaining handler code and output the given content with the given status code.

sendStatusJSON :: (MonadHandler m, ToJSON c) => Status -> c -> m a #

Bypass remaining handler code and output the given JSON with the given status code.

Since: yesod-core-1.4.18

sendResponseCreated :: MonadHandler m => Route (HandlerSite m) -> m a #

Send a 201 Created response with the given route as the Location response header.

sendResponseNoContent :: MonadHandler m => m a #

Bypass remaining handler code and output no content with a 204 status code.

Since: yesod-core-1.6.9

sendWaiResponse :: MonadHandler m => Response -> m b #

Send a Response. Please note: this function is rarely necessary, and will disregard any changes to response headers and session that you have already specified. This function short-circuits. It should be considered only for very specific needs. If you are not sure if you need it, you don't.

sendWaiApplication :: MonadHandler m => Application -> m b #

Switch over to handling the current request with a WAI Application.

Since: yesod-core-1.2.17

sendRawResponseNoConduit :: (MonadHandler m, MonadUnliftIO m) => (IO ByteString -> (ByteString -> IO ()) -> m ()) -> m a #

Send a raw response without conduit. This is used for cases such as WebSockets. Requires WAI 3.0 or later, and a web server which supports raw responses (e.g., Warp).

Since: yesod-core-1.2.16

sendRawResponse :: (MonadHandler m, MonadUnliftIO m) => (ConduitT () ByteString IO () -> ConduitT ByteString Void IO () -> m ()) -> m a #

Send a raw response. This is used for cases such as WebSockets. Requires WAI 2.1 or later, and a web server which supports raw responses (e.g., Warp).

Since: yesod-core-1.2.7

notModified :: MonadHandler m => m a #

Send a 304 not modified response immediately. This is a short-circuiting action.

Since: yesod-core-1.4.4

notFound :: MonadHandler m => m a #

Return a 404 not found page. Also denotes no handler available.

badMethod :: MonadHandler m => m a #

Return a 405 method not supported page.

notAuthenticated :: MonadHandler m => m a #

Return a 401 status code

permissionDenied :: MonadHandler m => Text -> m a #

Return a 403 permission denied page.

permissionDeniedI :: (RenderMessage (HandlerSite m) msg, MonadHandler m) => msg -> m a #

Return a 403 permission denied page.

invalidArgs :: MonadHandler m => [Text] -> m a #

Return a 400 invalid arguments page.

invalidArgsI :: (MonadHandler m, RenderMessage (HandlerSite m) msg) => [msg] -> m a #

Return a 400 invalid arguments page.

setCookie :: MonadHandler m => SetCookie -> m () #

Set the cookie on the client.

getExpires #

Arguments

:: MonadIO m 
=> Int

minutes

-> m UTCTime 

Helper function for setCookieExpires value

deleteCookie #

Arguments

:: MonadHandler m 
=> Text

key

-> Text

path

-> m () 

Unset the cookie on the client.

Note: although the value used for key and path is Text, you should only use ASCII values to be HTTP compliant.

setLanguage :: MonadHandler m => Text -> m () #

Set the language in the user session. Will show up in languages on the next request.

addContentDispositionFileName :: MonadHandler m => Text -> m () #

Set attachment file name.

Allows Unicode characters by encoding to UTF-8. Some modurn browser parse UTF-8 characters with out encoding setting. But, for example IE9 can't parse UTF-8 characters. This function use RFC 6266(RFC 5987)

Since: yesod-core-1.6.4

addHeader :: MonadHandler m => Text -> Text -> m () #

Set an arbitrary response header.

Note that, while the data type used here is Text, you must provide only ASCII value to be HTTP compliant.

Since: yesod-core-1.2.0

replaceOrAddHeader :: MonadHandler m => Text -> Text -> m () #

Replace an existing header with a new value or add a new header if not present.

Note that, while the data type used here is Text, you must provide only ASCII value to be HTTP compliant.

Since: yesod-core-1.4.36

cacheSeconds :: MonadHandler m => Int -> m () #

Set the Cache-Control header to indicate this response should be cached for the given number of seconds.

neverExpires :: MonadHandler m => m () #

Set the Expires header to some date in 2037. In other words, this content is never (realistically) expired.

alreadyExpired :: MonadHandler m => m () #

Set an Expires header in the past, meaning this content should not be cached.

expiresAt :: MonadHandler m => UTCTime -> m () #

Set an Expires header to the given date.

setEtag :: MonadHandler m => Text -> m () #

Check the if-none-match header and, if it matches the given value, return a 304 not modified response. Otherwise, set the etag header to the given value.

Note that it is the responsibility of the caller to ensure that the provided value is a valid etag value, no sanity checking is performed by this function.

Since: yesod-core-1.4.4

setWeakEtag :: MonadHandler m => Text -> m () #

Check the if-none-match header and, if it matches the given value, return a 304 not modified response. Otherwise, set the etag header to the given value.

A weak etag is only expected to be semantically identical to the prior content, but doesn't have to be byte-for-byte identical. Therefore it can be useful for dynamically generated content that may be difficult to perform bytewise hashing upon.

Note that it is the responsibility of the caller to ensure that the provided value is a valid etag value, no sanity checking is performed by this function.

Since: yesod-core-1.4.37

setSession #

Arguments

:: MonadHandler m 
=> Text

key

-> Text

value

-> m () 

Set a variable in the user's session.

The session is handled by the clientsession package: it sets an encrypted and hashed cookie on the client. This ensures that all data is secure and not tampered with.

setSessionBS :: MonadHandler m => Text -> ByteString -> m () #

Same as setSession, but uses binary data for the value.

deleteSession :: MonadHandler m => Text -> m () #

Unsets a session variable. See setSession.

clearSession :: MonadHandler m => m () #

Clear all session variables.

@since: 1.0.1

lookupSession :: MonadHandler m => Text -> m (Maybe Text) #

Lookup for session data.

lookupSessionBS :: MonadHandler m => Text -> m (Maybe ByteString) #

Lookup for session data in binary format.

getSession :: MonadHandler m => m SessionMap #

Get all session variables.

newIdent :: MonadHandler m => m Text #

Get a unique identifier.

redirectToPost :: (MonadHandler m, RedirectUrl (HandlerSite m) url) => url -> m a #

Redirect to a POST resource.

This is not technically a redirect; instead, it returns an HTML page with a POST form, and some Javascript to automatically submit the form. This can be useful when you need to post a plain link somewhere that needs to cause changes on the server.

hamletToRepHtml :: MonadHandler m => HtmlUrl (Route (HandlerSite m)) -> m Html #

Wraps the Content generated by hamletToContent in a RepHtml.

giveUrlRenderer :: MonadHandler m => ((Route (HandlerSite m) -> [(Text, Text)] -> Text) -> output) -> m output #

Deprecated synonym for withUrlRenderer.

Since: yesod-core-1.2.0

withUrlRenderer :: MonadHandler m => ((Route (HandlerSite m) -> [(Text, Text)] -> Text) -> output) -> m output #

Provide a URL rendering function to the given function and return the result. Useful for processing Shakespearean templates.

Since: yesod-core-1.2.20

waiRequest :: MonadHandler m => m Request #

Get the request's Request value.

getMessageRender :: (MonadHandler m, RenderMessage (HandlerSite m) message) => m (message -> Text) #

cached :: (MonadHandler m, Typeable a) => m a -> m a #

Use a per-request cache to avoid performing the same action multiple times. Values are stored by their type, the result of typeOf from Typeable. Therefore, you should use different newtype wrappers at each cache site.

For example, yesod-auth uses an un-exported newtype, CachedMaybeAuth and exports functions that utilize it such as maybeAuth. This means that another module can create its own newtype wrapper to cache the same type from a different action without any cache conflicts.

See the original announcement: http://www.yesodweb.com/blog/2013/03/yesod-1-2-cleaner-internals

Since: yesod-core-1.2.0

cacheGet :: (MonadHandler m, Typeable a) => m (Maybe a) #

Retrieves a value from the cache used by cached.

Since: yesod-core-1.6.10

cacheSet :: (MonadHandler m, Typeable a) => a -> m () #

Sets a value in the cache used by cached.

Since: yesod-core-1.6.10

cachedBy :: (MonadHandler m, Typeable a) => ByteString -> m a -> m a #

a per-request cache. just like cached. cached can only cache a single value per type. cachedBy stores multiple values per type by usage of a ByteString key

cached is ideal to cache an action that has only one value of a type, such as the session's current user cachedBy is required if the action has parameters and can return multiple values per type. You can turn those parameters into a ByteString cache key. For example, caching a lookup of a Link by a token where multiple token lookups might be performed.

Since: yesod-core-1.4.0

cacheByGet :: (MonadHandler m, Typeable a) => ByteString -> m (Maybe a) #

Retrieves a value from the cache used by cachedBy.

Since: yesod-core-1.6.10

cacheBySet :: (MonadHandler m, Typeable a) => ByteString -> a -> m () #

Sets a value in the cache used by cachedBy.

Since: yesod-core-1.6.10

languages :: MonadHandler m => m [Text] #

Get the list of supported languages supplied by the user.

Languages are determined based on the following (in descending order of preference):

  • The _LANG get parameter.
  • The _LANG user session variable.
  • The _LANG cookie.
  • Accept-Language HTTP header.

Yesod will seek the first language from the returned list matched with languages supporting by your application. This language will be used to render i18n templates. If a matching language is not found the default language will be used.

This is handled by parseWaiRequest (not exposed).

NOTE: Before version 1.6.19.0, this function prioritized the session variable above all other sources.

lookupHeader :: MonadHandler m => CI ByteString -> m (Maybe ByteString) #

Lookup a request header.

Since: yesod-core-1.2.2

lookupHeaders :: MonadHandler m => CI ByteString -> m [ByteString] #

Lookup a request header.

Since: yesod-core-1.2.2

lookupBasicAuth :: MonadHandler m => m (Maybe (Text, Text)) #

Lookup basic authentication data from Authorization header of request. Returns user name and password

Since: yesod-core-1.4.9

lookupBearerAuth :: MonadHandler m => m (Maybe Text) #

Lookup bearer authentication datafrom Authorization header of request. Returns bearer token value

Since: yesod-core-1.4.9

lookupGetParams :: MonadHandler m => Text -> m [Text] #

Lookup for GET parameters.

lookupGetParam :: MonadHandler m => Text -> m (Maybe Text) #

Lookup for GET parameters.

lookupPostParams :: (MonadResource m, MonadHandler m) => Text -> m [Text] #

Lookup for POST parameters.

lookupFile :: MonadHandler m => Text -> m (Maybe FileInfo) #

Lookup for POSTed files.

lookupFiles :: MonadHandler m => Text -> m [FileInfo] #

Lookup for POSTed files.

lookupCookie :: MonadHandler m => Text -> m (Maybe Text) #

Lookup for cookie data.

lookupCookies :: MonadHandler m => Text -> m [Text] #

Lookup for cookie data.

selectRep :: MonadHandler m => Writer (Endo [ProvidedRep m]) () -> m TypedContent #

Select a representation to send to the client based on the representations provided inside this do-block. Should be used together with provideRep.

Since: yesod-core-1.2.0

provideRep :: (Monad m, HasContentType a) => m a -> Writer (Endo [ProvidedRep m]) () #

Provide a single representation to be used, based on the request of the client. Should be used together with selectRep.

Since: yesod-core-1.2.0

provideRepType :: (Monad m, ToContent a) => ContentType -> m a -> Writer (Endo [ProvidedRep m]) () #

Same as provideRep, but instead of determining the content type from the type of the value itself, you provide the content type separately. This can be a convenience instead of creating newtype wrappers for uncommonly used content types.

provideRepType "application/x-special-format" "This is the content"

Since: yesod-core-1.2.0

rawRequestBody :: forall (m :: Type -> Type) i. MonadHandler m => ConduitT i ByteString m () #

Stream in the raw request body without any parsing.

Since: yesod-core-1.2.0

fileSource :: forall (m :: Type -> Type). MonadResource m => FileInfo -> ConduitT () ByteString m () #

Stream the data from the file. Since Yesod 1.2, this has been generalized to work in any MonadResource.

fileSourceByteString :: MonadResource m => FileInfo -> m ByteString #

Extract a strict ByteString body from a FileInfo.

This function will block while reading the file.

do
    fileByteString <- fileSourceByteString fileInfo

Since: yesod-core-1.6.5

respond :: (Monad m, ToContent a) => ContentType -> a -> m TypedContent #

Provide a pure value for the response body.

respond ct = return . TypedContent ct . toContent

Since: yesod-core-1.2.0

respondSource :: ContentType -> ConduitT () (Flush Builder) (HandlerFor site) () -> HandlerFor site TypedContent #

Use a Source for the response body.

Note that, for ease of use, the underlying monad is a HandlerFor. This implies that you can run any HandlerFor action. However, since a streaming response occurs after the response headers have already been sent, some actions make no sense here. For example: short-circuit responses, setting headers, changing status codes, etc.

Since: yesod-core-1.2.0

sendChunk :: forall (m :: Type -> Type) a i. (Monad m, ToFlushBuilder a) => a -> ConduitT i (Flush Builder) m () #

In a streaming response, send a single chunk of data. This function works on most datatypes, such as ByteString and Html.

Since: yesod-core-1.2.0

sendFlush :: forall (m :: Type -> Type) i. Monad m => ConduitT i (Flush Builder) m () #

In a streaming response, send a flush command, causing all buffered data to be immediately sent to the client.

Since: yesod-core-1.2.0

sendChunkBS :: forall (m :: Type -> Type) i. Monad m => ByteString -> ConduitT i (Flush Builder) m () #

Type-specialized version of sendChunk for strict ByteStrings.

Since: yesod-core-1.2.0

sendChunkLBS :: forall (m :: Type -> Type) i. Monad m => ByteString -> ConduitT i (Flush Builder) m () #

Type-specialized version of sendChunk for lazy ByteStrings.

Since: yesod-core-1.2.0

sendChunkText :: forall (m :: Type -> Type) i. Monad m => Text -> ConduitT i (Flush Builder) m () #

Type-specialized version of sendChunk for strict Texts.

Since: yesod-core-1.2.0

sendChunkLazyText :: forall (m :: Type -> Type) i. Monad m => Text -> ConduitT i (Flush Builder) m () #

Type-specialized version of sendChunk for lazy Texts.

Since: yesod-core-1.2.0

sendChunkHtml :: forall (m :: Type -> Type) i. Monad m => Html -> ConduitT i (Flush Builder) m () #

Type-specialized version of sendChunk for Htmls.

Since: yesod-core-1.2.0

defaultCsrfCookieName :: ByteString #

The default cookie name for the CSRF token ("XSRF-TOKEN").

Since: yesod-core-1.4.14

setCsrfCookie :: MonadHandler m => m () #

Sets a cookie with a CSRF token, using defaultCsrfCookieName for the cookie name.

The cookie's path is set to /, making it valid for your whole website.

Since: yesod-core-1.4.14

setCsrfCookieWithCookie :: MonadHandler m => SetCookie -> m () #

Takes a SetCookie and overrides its value with a CSRF token, then sets the cookie.

Make sure to set the setCookiePath to the root path of your application, otherwise you'll generate a new CSRF token for every path of your app. If your app is run from from e.g. www.example.com/app1, use app1. The vast majority of sites will just use /.

Since: yesod-core-1.4.14

defaultCsrfHeaderName :: CI ByteString #

The default header name for the CSRF token ("X-XSRF-TOKEN").

Since: yesod-core-1.4.14

checkCsrfHeaderNamed :: MonadHandler m => CI ByteString -> m () #

Takes a header name to lookup a CSRF token. If the value doesn't match the token stored in the session, this function throws a PermissionDenied error.

Since: yesod-core-1.4.14

hasValidCsrfHeaderNamed :: MonadHandler m => CI ByteString -> m Bool #

Takes a header name to lookup a CSRF token, and returns whether the value matches the token stored in the session.

Since: yesod-core-1.4.14

defaultCsrfParamName :: Text #

The default parameter name for the CSRF token ("_token")

Since: yesod-core-1.4.14

checkCsrfParamNamed :: MonadHandler m => Text -> m () #

Takes a POST parameter name to lookup a CSRF token. If the value doesn't match the token stored in the session, this function throws a PermissionDenied error.

Since: yesod-core-1.4.14

hasValidCsrfParamNamed :: MonadHandler m => Text -> m Bool #

Takes a POST parameter name to lookup a CSRF token, and returns whether the value matches the token stored in the session.

Since: yesod-core-1.4.14

checkCsrfHeaderOrParam #

Arguments

:: (MonadHandler m, MonadLogger m) 
=> CI ByteString

The header name to lookup the CSRF token

-> Text

The POST parameter name to lookup the CSRF token

-> m () 

Checks that a valid CSRF token is present in either the request headers or POST parameters. If the value doesn't match the token stored in the session, this function throws a PermissionDenied error.

Since: yesod-core-1.4.14

setTitleI :: (MonadWidget m, RenderMessage (HandlerSite m) msg) => msg -> m () #

Set the localised page title.

n.b. See comments for setTitle

setDescription :: MonadWidget m => Text -> m () #

Add description meta tag to the head of the page

Google does not use the description tag as a ranking signal, but the contents of this tag will likely affect your click-through rate since it shows up in search results.

The average length of the description shown in Google's search results is about 160 characters on desktop, and about 130 characters on mobile, at time of writing.

Source: https://www.advancedwebranking.com/blog/meta-tags-important-in-seo/

Since: yesod-core-1.6.18

setDescriptionI :: (MonadWidget m, RenderMessage (HandlerSite m) msg) => msg -> m () #

Add translated description meta tag to the head of the page

n.b. See comments for setDescription.

Since: yesod-core-1.6.18

setDescriptionIdemp :: MonadWidget m => Text -> m () #

Add description meta tag to the head of the page

Google does not use the description tag as a ranking signal, but the contents of this tag will likely affect your click-through rate since it shows up in search results.

The average length of the description shown in Google's search results is about 160 characters on desktop, and about 130 characters on mobile, at time of writing.

Unlike setDescription, this version is *idempotent* - calling it multiple times will result in only a single description meta tag in the head.

Source: https://www.advancedwebranking.com/blog/meta-tags-important-in-seo/

Since: yesod-core-1.6.23

setDescriptionIdempI :: (MonadWidget m, RenderMessage (HandlerSite m) msg) => msg -> m () #

Add translated description meta tag to the head of the page

n.b. See comments for setDescriptionIdemp.

Unlike setDescriptionI, this version is *idempotent* - calling it multiple times will result in only a single description meta tag in the head.

Since: yesod-core-1.6.23

setOGType :: MonadWidget m => Text -> m () #

Add OpenGraph type meta tag to the head of the page

See all available OG types here: https://ogp.me/#types

Since: yesod-core-1.6.18

setOGImage :: MonadWidget m => Text -> m () #

Add OpenGraph image meta tag to the head of the page

Best practices:

  • Use custom images for shareable pages, e.g., homepage, articles, etc.
  • Use your logo or any other branded image for the rest of your pages.
  • Use images with a 1.91:1 ratio and minimum recommended dimensions of 1200x630 for optimal clarity across all devices.

Source: https://ahrefs.com/blog/open-graph-meta-tags/

Since: yesod-core-1.6.18

addStylesheet :: MonadWidget m => Route (HandlerSite m) -> m () #

Link to the specified local stylesheet.

addStylesheetAttrs :: MonadWidget m => Route (HandlerSite m) -> [(Text, Text)] -> m () #

Link to the specified local stylesheet.

addStylesheetRemote :: MonadWidget m => Text -> m () #

Link to the specified remote stylesheet.

addStylesheetRemoteAttrs :: MonadWidget m => Text -> [(Text, Text)] -> m () #

Link to the specified remote stylesheet.

addScript :: MonadWidget m => Route (HandlerSite m) -> m () #

Link to the specified local script.

addScriptAttrs :: MonadWidget m => Route (HandlerSite m) -> [(Text, Text)] -> m () #

Link to the specified local script.

addScriptRemote :: MonadWidget m => Text -> m () #

Link to the specified remote script.

addScriptRemoteAttrs :: MonadWidget m => Text -> [(Text, Text)] -> m () #

Link to the specified remote script.

asWidgetT :: forall site (m :: Type -> Type). WidgetT site m () -> WidgetT site m () #

ihamletToRepHtml :: (MonadHandler m, RenderMessage (HandlerSite m) message) => HtmlUrlI18n message (Route (HandlerSite m)) -> m Html #

Wraps the Content generated by hamletToContent in a RepHtml.

ihamletToHtml :: (MonadHandler m, RenderMessage (HandlerSite m) message) => HtmlUrlI18n message (Route (HandlerSite m)) -> m Html #

Wraps the Content generated by hamletToContent in a RepHtml.

Since 1.2.1

defaultMakeLogger :: IO Logger #

Default implementation of makeLogger. Sends to stdout and automatically flushes on each write.

Since 1.4.10

defaultMessageLoggerSource #

Arguments

:: (LogSource -> LogLevel -> IO Bool)

Check whether we should log this

-> Logger 
-> Loc

position in source code

-> LogSource 
-> LogLevel 
-> LogStr

message

-> IO () 

Default implementation of messageLoggerSource. Checks if the message should be logged using the provided function, and if so, formats using formatLogMessage. You can use defaultShouldLogIO as the provided function.

Since 1.4.10

defaultShouldLogIO :: LogSource -> LogLevel -> IO Bool #

Default implementation of shouldLog. Logs everything at or above LevelInfo.

Since 1.4.10

defaultYesodMiddleware :: Yesod site => HandlerFor site res -> HandlerFor site res #

Default implementation of yesodMiddleware. Adds the response header "Vary: Accept, Accept-Language", "X-XSS-Protection: 1; mode=block", and performs authorization checks.

Since 1.2.0

sslOnlySessions :: IO (Maybe SessionBackend) -> IO (Maybe SessionBackend) #

Defends against session hijacking by setting the secure bit on session cookies so that browsers will not transmit them over http. With this setting on, it follows that the server will regard requests made over http as sessionless, because the session cookie will not be included in the request. Use this as part of a total security measure which also includes disabling HTTP traffic to the site or issuing redirects from HTTP urls, and composing sslOnlyMiddleware with the site's yesodMiddleware.

Since 1.4.7

laxSameSiteSessions :: IO (Maybe SessionBackend) -> IO (Maybe SessionBackend) #

Helps defend against CSRF attacks by setting the SameSite attribute on session cookies to Lax. With the Lax setting, the cookie will be sent with same-site requests, and with cross-site top-level navigations.

This option is liable to change in future versions of Yesod as the spec evolves. View more information here.

Since: yesod-core-1.4.23

strictSameSiteSessions :: IO (Maybe SessionBackend) -> IO (Maybe SessionBackend) #

Helps defend against CSRF attacks by setting the SameSite attribute on session cookies to Strict. With the Strict setting, the cookie will only be sent with same-site requests.

This option is liable to change in future versions of Yesod as the spec evolves. View more information here.

Since: yesod-core-1.4.23

sslOnlyMiddleware #

Arguments

:: Int

minutes

-> HandlerFor site res 
-> HandlerFor site res 

Apply a Strict-Transport-Security header with the specified timeout to all responses so that browsers will rewrite all http links to https until the timeout expires. For security, the max-age of the STS header should always equal or exceed the client sessions timeout. This defends against SSL-stripping man-in-the-middle attacks. It is only effective if a secure connection has already been made; Strict-Transport-Security headers are ignored over HTTP.

Since 1.4.7

authorizationCheck :: Yesod site => HandlerFor site () #

Check if a given request is authorized via isAuthorized and isWriteRequest.

Since 1.2.0

csrfCheckMiddleware #

Arguments

:: HandlerFor site res 
-> HandlerFor site Bool

Whether or not to perform the CSRF check.

-> CI ByteString

The header name to lookup the CSRF token from.

-> Text

The POST parameter name to lookup the CSRF token from.

-> HandlerFor site res 

Looks up the CSRF token from the request headers or POST parameters. If the value doesn't match the token stored in the session, this function throws a PermissionDenied error.

For details, see the "AJAX CSRF protection" section of Yesod.Core.Handler.

Since 1.4.14

defaultCsrfSetCookieMiddleware :: HandlerFor site res -> HandlerFor site res #

Calls csrfSetCookieMiddleware with the defaultCsrfCookieName.

The cookie's path is set to /, making it valid for your whole website.

Since 1.4.14

csrfSetCookieMiddleware :: HandlerFor site res -> SetCookie -> HandlerFor site res #

Takes a SetCookie and overrides its value with a CSRF token, then sets the cookie. See setCsrfCookieWithCookie.

For details, see the "AJAX CSRF protection" section of Yesod.Core.Handler.

Make sure to set the setCookiePath to the root path of your application, otherwise you'll generate a new CSRF token for every path of your app. If your app is run from from e.g. www.example.com/app1, use app1. The vast majority of sites will just use /.

Since 1.4.14

defaultCsrfMiddleware :: Yesod site => HandlerFor site res -> HandlerFor site res #

Calls defaultCsrfSetCookieMiddleware and defaultCsrfCheckMiddleware.

For details, see the "AJAX CSRF protection" section of Yesod.Core.Handler.

You can chain this middleware together with other middleware like so:

yesodMiddleware = defaultYesodMiddleware . defaultCsrfMiddleware

or:

yesodMiddleware app = defaultYesodMiddleware $ defaultCsrfMiddleware $ app

Since 1.4.14

widgetToPageContent :: Yesod site => WidgetFor site () -> HandlerFor site (PageContent (Route site)) #

Convert a widget to a PageContent.

defaultErrorHandler :: Yesod site => ErrorResponse -> HandlerFor site TypedContent #

The default error handler for errorHandler.

formatLogMessage #

Arguments

:: IO ZonedDate 
-> Loc 
-> LogSource 
-> LogLevel 
-> LogStr

message

-> IO LogStr 

Default formatting for log messages. When you use the template haskell logging functions for to log with information about the source location, that information will be appended to the end of the log. When you use the non-TH logging functions, like logDebugN, this function does not include source information. This currently works by checking to see if the package name is the string "<unknown>". This is a hack, but it removes some of the visual clutter from non-TH logs.

Since 1.4.10

customizeSessionCookies :: (SetCookie -> SetCookie) -> SessionBackend -> SessionBackend #

Customize the cookies used by the session backend. You may use this function on your definition of makeSessionBackend.

For example, you could set the cookie domain so that it would work across many subdomains:

makeSessionBackend site =
    (fmap . fmap) (customizeSessionCookies addDomain) ...
  where
    addDomain cookie = cookie { setCookieDomain = Just ".example.com" }

Default: Do not customize anything (id).

defaultClientSessionBackend #

Arguments

:: Int

minutes

-> FilePath

key file

-> IO SessionBackend 

envClientSessionBackend #

Arguments

:: Int

minutes

-> String

environment variable name

-> IO SessionBackend 

Create a SessionBackend which reads the session key from the named environment variable.

This can be useful if:

  1. You can't rely on a persistent file system (e.g. Heroku)
  2. Your application is open source (e.g. you can't commit the key)

By keeping a consistent value in the environment variable, your users will have consistent sessions without relying on the file system.

Note: A suitable value should only be obtained in one of two ways:

  1. Run this code without the variable set, a value will be generated and printed on devstdout/
  2. Use clientsession-generate

Since 1.4.5

guessApprootOr :: Approot site -> Approot site #

Guess the approot based on request headers, with fall back to the specified AppRoot.

Since 1.4.16

getApprootText :: Approot site -> site -> Request -> Text #

Get the textual application root from an Approot value.

Since 1.4.17

defaultLayoutJson #

Arguments

:: (Yesod site, ToJSON a) 
=> WidgetFor site ()

HTML

-> HandlerFor site a

JSON

-> HandlerFor site TypedContent 

Provide both an HTML and JSON representation for a piece of data, using the default layout for the HTML output (defaultLayout).

Since: yesod-core-0.3.0

jsonToRepJson :: (Monad m, ToJSON a) => a -> m Value #

Wraps a data type in a RepJson. The data type must support conversion to JSON via ToJSON.

Since: yesod-core-0.3.0

returnJson :: (Monad m, ToJSON a) => a -> m Value #

Convert a value to a JSON representation via aeson's toJSON function.

Since: yesod-core-1.2.1

returnJsonEncoding :: (Monad m, ToJSON a) => a -> m Encoding #

Convert a value to a JSON representation via aeson's toEncoding function.

Since: yesod-core-1.4.21

provideJson :: forall (m :: Type -> Type) a. (Monad m, ToJSON a) => a -> Writer (Endo [ProvidedRep m]) () #

Provide a JSON representation for usage with selectReps, using aeson's toJSON (aeson >= 0.11: toEncoding) function to perform the conversion.

Since: yesod-core-1.2.1

parseJsonBody :: (MonadHandler m, FromJSON a) => m (Result a) #

Same as parseInsecureJsonBody

Since: yesod-core-0.3.0

parseInsecureJsonBody :: (MonadHandler m, FromJSON a) => m (Result a) #

Same as parseCheckJsonBody, but does not check that the mime type indicates JSON content.

Note: This function is vulnerable to CSRF attacks.

Since: yesod-core-1.6.11

parseCheckJsonBody :: (MonadHandler m, FromJSON a) => m (Result a) #

Parse the request body to a data type as a JSON value. The data type must support conversion from JSON via FromJSON. If you want the raw JSON value, just ask for a Result Value.

The MIME type must indicate JSON content. Requiring a JSON content-type helps secure your site against CSRF attacks (browsers will perform POST requests for form and text/plain content-types without doing a CORS check, and those content-types can easily contain valid JSON).

Note that this function will consume the request body. As such, calling it twice will result in a parse error on the second call, since the request body will no longer be available.

Since: yesod-core-0.3.0

parseJsonBody_ :: (MonadHandler m, FromJSON a) => m a #

Same as parseInsecureJsonBody, but return an invalid args response on a parse error.

requireJsonBody :: (MonadHandler m, FromJSON a) => m a #

Same as parseInsecureJsonBody, but return an invalid args response on a parse error.

requireInsecureJsonBody :: (MonadHandler m, FromJSON a) => m a #

Same as parseInsecureJsonBody, but return an invalid args response on a parse error.

Since: yesod-core-1.6.11

requireCheckJsonBody :: (MonadHandler m, FromJSON a) => m a #

Same as parseCheckJsonBody, but return an invalid args response on a parse error.

jsonOrRedirect #

Arguments

:: (MonadHandler m, ToJSON a) 
=> Route (HandlerSite m)

Redirect target

-> a

Data to send via JSON

-> m Value 

jsonOrRedirect simplifies the scenario where a POST handler sends a different response based on Accept headers:

  1. 200 with JSON data if the client prefers application/json (e.g. AJAX, see acceptsJSON).
  2. 3xx otherwise, following the PRG pattern.

jsonEncodingOrRedirect #

Arguments

:: (MonadHandler m, ToJSON a) 
=> Route (HandlerSite m)

Redirect target

-> a

Data to send via JSON

-> m Encoding 

jsonEncodingOrRedirect simplifies the scenario where a POST handler sends a different response based on Accept headers:

  1. 200 with JSON data if the client prefers application/json (e.g. AJAX, see acceptsJSON).
  2. 3xx otherwise, following the PRG pattern. @since 1.4.21

acceptsJson :: MonadHandler m => m Bool #

Returns True if the client prefers application/json as indicated by the Accept HTTP header.

contentTypeHeaderIsJson :: ByteString -> Bool #

Given the Content-Type header, returns if it is JSON.

This function is currently a simple check for application/json, but in the future may check for alternative representations such as xxx/yyy+json.

Since: yesod-core-1.6.17

runFakeHandler :: (Yesod site, MonadIO m) => SessionMap -> (site -> Logger) -> site -> HandlerT site IO a -> m (Either ErrorResponse a) #

yesodRunner :: (ToTypedContent res, Yesod site) => HandlerFor site res -> YesodRunnerEnv site -> Maybe (Route site) -> Application #

yesodRender #

Arguments

:: Yesod y 
=> y 
-> ResolvedApproot 
-> Route y 
-> [(Text, Text)]

url query string

-> Text 

breadcrumbs :: (YesodBreadcrumbs site, Show (Route site), Eq (Route site)) => HandlerFor site (Text, [(Route site, Text)]) #

Gets the title of the current page and the hierarchy of parent pages, along with their respective titles.

defaultOpts :: RouteOpts #

Default options for generating routes.

Defaults to all instances derived.

Since: yesod-core-1.6.25.0

setEqDerived :: Bool -> RouteOpts -> RouteOpts #

Since: yesod-core-1.6.25.0

setShowDerived :: Bool -> RouteOpts -> RouteOpts #

Since: yesod-core-1.6.25.0

setReadDerived :: Bool -> RouteOpts -> RouteOpts #

Since: yesod-core-1.6.25.0

parseRoutes :: QuasiQuoter #

A quasi-quoter to parse a string into a list of Resources. Checks for overlapping routes, failing if present; use parseRoutesNoCheck to skip the checking. See documentation site for details on syntax.

parseRoutesFile :: FilePath -> Q Exp #

Same as parseRoutes, but uses an external file instead of quasiquotation.

The recommended file extension is .yesodroutes.

parseRoutesFileNoCheck :: FilePath -> Q Exp #

Same as parseRoutesNoCheck, but uses an external file instead of quasiquotation.

The recommended file extension is .yesodroutes.

parseRoutesNoCheck :: QuasiQuoter #

Same as parseRoutes, but performs no overlap checking.

mkYesod #

Arguments

:: String

name of the argument datatype

-> [ResourceTree String] 
-> Q [Dec] 

Generates URL datatype and site function for the given Resources. This is used for creating sites, not subsites. See mkYesodSubData and mkYesodSubDispatch for the latter. Use parseRoutes to create the Resources.

Contexts and type variables in the name of the datatype are parsed. For example, a datatype App a with typeclass constraint MyClass a can be written as "(MyClass a) => App a".

mkYesodOpts :: RouteOpts -> String -> [ResourceTree String] -> Q [Dec] #

mkYesod but with custom options.

Since: yesod-core-1.6.25.0

mkYesodWith #

Arguments

:: [[String]]

list of contexts

-> String

name of the argument datatype

-> [String]

list of type variables

-> [ResourceTree String] 
-> Q [Dec] 

Similar to mkYesod, except contexts and type variables are not parsed. Instead, they are explicitly provided. You can write (MyClass a) => App a with mkYesodWith [["MyClass","a"]] "App" ["a"] ....

mkYesodData :: String -> [ResourceTree String] -> Q [Dec] #

Sometimes, you will want to declare your routes in one file and define your handlers elsewhere. For example, this is the only way to break up a monolithic file into smaller parts. Use this function, paired with mkYesodDispatch, to do just that.

mkYesodDataOpts :: RouteOpts -> String -> [ResourceTree String] -> Q [Dec] #

mkYesodData but with custom options.

Since: yesod-core-1.6.25.0

mkYesodSubDataOpts :: RouteOpts -> String -> [ResourceTree String] -> Q [Dec] #

Since: yesod-core-1.6.25.0

mkYesodDispatchOpts :: RouteOpts -> String -> [ResourceTree String] -> Q [Dec] #

See mkYesodDataOpts

Since: yesod-core-1.6.25.0

toWaiAppPlain :: YesodDispatch site => site -> IO Application #

Convert the given argument into a WAI application, executable with any WAI handler. This function will provide no middlewares; if you want commonly used middlewares, please use toWaiApp.

defaultGen :: IO Int #

Generate a random number uniformly distributed in the full range of Int.

Note: Before 1.6.20, this generates pseudo-random number in an unspecified range. The range size may not be a power of 2. Since 1.6.20, this uses a secure entropy source and generates in the full range of Int.

Since: yesod-core-1.6.21.0

toWaiAppYre :: YesodDispatch site => YesodRunnerEnv site -> Application #

Pure low level function to construct WAI application. Usefull when you need not standard way to run your app, or want to embed it inside another app.

Since: yesod-core-1.4.29

toWaiApp :: YesodDispatch site => site -> IO Application #

Same as toWaiAppPlain, but provides a default set of middlewares. This set may change with future releases, but currently covers:

  • Logging
  • GZIP compression
  • Automatic HEAD method handling
  • Request method override with the _method query string parameter
  • Accept header override with the _accept query string parameter

mkDefaultMiddlewares :: Logger -> IO Middleware #

A default set of middlewares.

Since 1.2.0

defaultMiddlewaresNoLogging :: Middleware #

All of the default middlewares, excluding logging.

Since 1.2.12

warpDebug :: YesodDispatch site => Int -> site -> IO () #

Deprecated synonym for warp.

warpEnv :: YesodDispatch site => site -> IO () #

Runs your application using default middlewares (i.e., via toWaiApp). It reads port information from the PORT environment variable, as used by tools such as Keter and the FP Complete School of Haskell.

Note that the exact behavior of this function may be modified slightly over time to work correctly with external tools, without a change to the type signature.

getGetMaxExpires :: IO (IO Text) #

Default constructor for yreGetMaxExpires field. Low level function for simple manual construction of YesodRunnerEnv.

Since: yesod-core-1.4.29

unauthorizedI :: (MonadHandler m, RenderMessage (HandlerSite m) msg) => msg -> m AuthResult #

Return an Unauthorized value, with the given i18n message.

maybeAuthorized #

Arguments

:: Yesod site 
=> Route site 
-> Bool

is this a write request?

-> HandlerT site IO (Maybe (Route site)) 

Return the same URL if the user is authorized to see it.

Built on top of isAuthorized. This is useful for building page that only contain links to pages the user is allowed to see.

check :: forall (m :: Type -> Type) msg a. (Monad m, RenderMessage (HandlerSite m) msg) => (a -> Either msg a) -> Field m a -> Field m a #

ireq #

Arguments

:: forall (m :: Type -> Type) a. (Monad m, RenderMessage (HandlerSite m) FormMessage) 
=> Field m a 
-> Text

name of the field

-> FormInput m a 

Promote a Field into a FormInput, requiring that the value be present and valid.

iopt :: forall (m :: Type -> Type) a. Monad m => Field m a -> Text -> FormInput m (Maybe a) #

Promote a Field into a FormInput, with its presence being optional. If the value is present but does not parse correctly, the form will still fail.

runInputGet :: MonadHandler m => FormInput m a -> m a #

Run a FormInput on the GET parameters (i.e., query string). If parsing fails, calls invalidArgs.

runInputGetResult :: MonadHandler m => FormInput m a -> m (FormResult a) #

Run a FormInput on the GET parameters (i.e., query string). Does not throw exceptions on failure.

Since 1.4.1

runInputPost :: MonadHandler m => FormInput m a -> m a #

Run a FormInput on the POST parameters (i.e., request body). If parsing fails, calls invalidArgs.

runInputPostResult :: MonadHandler m => FormInput m a -> m (FormResult a) #

Run a FormInput on the POST parameters (i.e., request body). Does not throw exceptions on failure.

newFormIdent :: forall (m :: Type -> Type). Monad m => MForm m Text #

Get a unique identifier.

formToAForm :: forall (m :: Type -> Type) site a. (HandlerSite m ~ site, Monad m) => MForm m (FormResult a, [FieldView site]) -> AForm m a #

aFormToForm :: forall (m :: Type -> Type) site a. (Monad m, HandlerSite m ~ site) => AForm m a -> MForm m (FormResult a, [FieldView site] -> [FieldView site]) #

askParams :: forall (m :: Type -> Type). Monad m => MForm m (Maybe Env) #

askFiles :: forall (m :: Type -> Type). Monad m => MForm m (Maybe FileEnv) #

wreq #

Arguments

:: forall site (m :: Type -> Type) a. (RenderMessage site FormMessage, HandlerSite m ~ site, MonadHandler m) 
=> Field m a

form field

-> FieldSettings site

settings for this field

-> Maybe a

optional default value

-> WForm m (FormResult a) 

Converts a form field into monadic form WForm. This field requires a value and will return FormFailure if left empty.

Since: yesod-form-1.4.14

wreqMsg #

Arguments

:: forall site msg (m :: Type -> Type) a. (RenderMessage site msg, HandlerSite m ~ site, MonadHandler m) 
=> Field m a

form field

-> FieldSettings site

settings for this field

-> msg

message to use in case value is Nothing

-> Maybe a

optional default value

-> WForm m (FormResult a) 

Same as wreq but with your own message to be rendered in case the value is not provided.

This is useful when you have several required fields on the page and you want to differentiate between which fields were left blank. Otherwise the user sees "Value is required" multiple times, which is ambiguous.

Since: yesod-form-1.6.7

wopt #

Arguments

:: forall (m :: Type -> Type) site a. (MonadHandler m, HandlerSite m ~ site) 
=> Field m a

form field

-> FieldSettings site

settings for this field

-> Maybe (Maybe a)

optional default value

-> WForm m (FormResult (Maybe a)) 

Converts a form field into monadic form WForm. This field is optional, i.e. if filled in, it returns 'Just a', if left empty, it returns Nothing. Arguments are the same as for wreq (apart from type of default value).

Since: yesod-form-1.4.14

wFormToAForm #

Arguments

:: forall (m :: Type -> Type) a. MonadHandler m 
=> WForm m (FormResult a)

input form

-> AForm m a

output form

Converts a monadic form WForm into an applicative form AForm.

Since: yesod-form-1.4.14

wFormToMForm #

Arguments

:: forall (m :: Type -> Type) site a. (MonadHandler m, HandlerSite m ~ site) 
=> WForm m a

input form

-> MForm m (a, [FieldView site])

output form

Converts a monadic form WForm into another monadic form MForm.

Since: yesod-form-1.4.14

mFormToWForm #

Arguments

:: forall (m :: Type -> Type) site a. (MonadHandler m, HandlerSite m ~ site) 
=> MForm m (a, FieldView site)

input form

-> WForm m a

output form

Converts a monadic form MForm into another monadic form WForm.

Since: yesod-form-1.4.14

mreq #

Arguments

:: forall site (m :: Type -> Type) a. (RenderMessage site FormMessage, HandlerSite m ~ site, MonadHandler m) 
=> Field m a

form field

-> FieldSettings site

settings for this field

-> Maybe a

optional default value

-> MForm m (FormResult a, FieldView site) 

Converts a form field into monadic form. This field requires a value and will return FormFailure if left empty.

mreqMsg #

Arguments

:: forall site msg (m :: Type -> Type) a. (RenderMessage site msg, HandlerSite m ~ site, MonadHandler m) 
=> Field m a

form field

-> FieldSettings site

settings for this field

-> msg

Message to use in case value is Nothing

-> Maybe a

optional default value

-> MForm m (FormResult a, FieldView site) 

Same as mreq but with your own message to be rendered in case the value is not provided.

This is useful when you have several required fields on the page and you want to differentiate between which fields were left blank. Otherwise the user sees "Value is required" multiple times, which is ambiguous.

Since: yesod-form-1.6.6

mopt :: forall site (m :: Type -> Type) a. (site ~ HandlerSite m, MonadHandler m) => Field m a -> FieldSettings site -> Maybe (Maybe a) -> MForm m (FormResult (Maybe a), FieldView site) #

Converts a form field into monadic form. This field is optional, i.e. if filled in, it returns 'Just a', if left empty, it returns Nothing. Arguments are the same as for mreq (apart from type of default value).

areq #

Arguments

:: forall site (m :: Type -> Type) a. (RenderMessage site FormMessage, HandlerSite m ~ site, MonadHandler m) 
=> Field m a

form field

-> FieldSettings site

settings for this field

-> Maybe a

optional default value

-> AForm m a 

Applicative equivalent of mreq.

areqMsg #

Arguments

:: forall site msg (m :: Type -> Type) a. (RenderMessage site msg, HandlerSite m ~ site, MonadHandler m) 
=> Field m a

form field

-> FieldSettings site

settings for this field

-> msg

message to use in case value is Nothing

-> Maybe a

optional default value

-> AForm m a 

Same as areq but with your own message to be rendered in case the value is not provided.

This is useful when you have several required fields on the page and you want to differentiate between which fields were left blank. Otherwise the user sees "Value is required" multiple times, which is ambiguous.

Since: yesod-form-1.6.7

aopt :: forall (m :: Type -> Type) a. MonadHandler m => Field m a -> FieldSettings (HandlerSite m) -> Maybe (Maybe a) -> AForm m (Maybe a) #

Applicative equivalent of mopt.

runFormPost :: (RenderMessage (HandlerSite m) FormMessage, MonadResource m, MonadHandler m) => (Markup -> MForm m (FormResult a, xml)) -> m ((FormResult a, xml), Enctype) #

This function is used to both initially render a form and to later extract results from it. Note that, due to CSRF protection and a few other issues, forms submitted via GET and POST are slightly different. As such, be sure to call the relevant function based on how the form will be submitted, not the current request method.

For example, a common case is displaying a form on a GET request and having the form submit to a POST page. In such a case, both the GET and POST handlers should use runFormPost.

generateFormPost :: (RenderMessage (HandlerSite m) FormMessage, MonadHandler m) => (Markup -> MForm m (FormResult a, xml)) -> m (xml, Enctype) #

Similar to runFormPost, except it always ignores the currently available environment. This is necessary in cases like a wizard UI, where a single page will both receive and incoming form and produce a new, blank form. For general usage, you can stick with runFormPost.

runFormGet :: MonadHandler m => (Markup -> MForm m a) -> m (a, Enctype) #

generateFormGet' :: MonadHandler m => (Markup -> MForm m (FormResult a, xml)) -> m (xml, Enctype) #

Since 1.3.11

generateFormGet :: MonadHandler m => (Markup -> MForm m a) -> m (a, Enctype) #

identifyForm #

Arguments

:: forall (m :: Type -> Type) a. Monad m 
=> Text

Form identification string.

-> (Markup -> MForm m (FormResult a, WidgetFor (HandlerSite m) ())) 
-> Markup 
-> MForm m (FormResult a, WidgetFor (HandlerSite m) ()) 

Creates a hidden field on the form that identifies it. This identification is then used to distinguish between missing and wrong form data when a single handler contains more than one form.

For instance, if you have the following code on your handler:

((fooRes, fooWidget), fooEnctype) <- runFormPost fooForm
((barRes, barWidget), barEnctype) <- runFormPost barForm

Then replace it with

((fooRes, fooWidget), fooEnctype) <- runFormPost $ identifyForm "foo" fooForm
((barRes, barWidget), barEnctype) <- runFormPost $ identifyForm "bar" barForm

Note that it's your responsibility to ensure that the identification strings are unique (using the same one twice on a single handler will not generate any errors). This allows you to create a variable number of forms and still have them work even if their number or order change between the HTML generation and the form submission.

renderTable :: forall (m :: Type -> Type) a. Monad m => FormRender m a #

Render a form into a series of tr tags. Note that, in order to allow you to add extra rows to the table, this function does not wrap up the resulting HTML in a table tag; you must do that yourself.

renderDivs :: forall (m :: Type -> Type) a. Monad m => FormRender m a #

render a field inside a div

renderDivsNoLabels :: forall (m :: Type -> Type) a. Monad m => FormRender m a #

render a field inside a div, not displaying any label

renderBootstrap2 :: forall (m :: Type -> Type) a. Monad m => FormRender m a #

Render a form using Bootstrap v2-friendly shamlet syntax. If you're using Bootstrap v3, then you should use the functions from module Yesod.Form.Bootstrap3.

Sample Hamlet:

 <form .form-horizontal method=post action=@{ActionR} enctype=#{formEnctype}>
   <fieldset>
     <legend>_{MsgLegend}
     $case result
       $of FormFailure reasons
         $forall reason <- reasons
           <div .alert .alert-error>#{reason}
       $of _
     ^{formWidget}
     <div .form-actions>
       <input .btn .primary type=submit value=_{MsgSubmit}>

Since 1.3.14

renderBootstrap :: forall (m :: Type -> Type) a. Monad m => FormRender m a #

Deprecated synonym for renderBootstrap2.

checkBool :: forall (m :: Type -> Type) msg a. (Monad m, RenderMessage (HandlerSite m) msg) => (a -> Bool) -> msg -> Field m a -> Field m a #

Return the given error message if the predicate is false.

checkM :: (Monad m, RenderMessage (HandlerSite m) msg) => (a -> m (Either msg a)) -> Field m a -> Field m a #

checkMMap :: (Monad m, RenderMessage (HandlerSite m) msg) => (a -> m (Either msg b)) -> (b -> a) -> Field m a -> Field m b #

Same as checkM, but modifies the datatype.

In order to make this work, you must provide a function to convert back from the new datatype to the old one (the second argument to this function).

Since 1.1.2

customErrorMessage :: forall (m :: Type -> Type) a. Monad m => SomeMessage (HandlerSite m) -> Field m a -> Field m a #

Allows you to overwrite the error message on parse error.

fieldSettingsLabel :: RenderMessage site msg => msg -> FieldSettings site #

Generate a FieldSettings from the given label.

parseHelper :: (Monad m, RenderMessage site FormMessage) => (Text -> Either FormMessage a) -> [Text] -> [FileInfo] -> m (Either (SomeMessage site) (Maybe a)) #

A helper function for creating custom fields.

This is intended to help with the common case where a single input value is required, such as when parsing a text field.

Since 1.1

parseHelperGen :: (Monad m, RenderMessage site msg) => (Text -> Either msg a) -> [Text] -> [FileInfo] -> m (Either (SomeMessage site) (Maybe a)) #

A generalized version of parseHelper, allowing any type for the message indicating a bad parse.

Since 1.3.6

convertField :: forall (m :: Type -> Type) a b. Functor m => (a -> b) -> (b -> a) -> Field m a -> Field m b #

Since a Field cannot be a Functor, it is not obvious how to "reuse" a Field on a newtype or otherwise equivalent type. This function allows you to convert a Field m a to a Field m b assuming you provide a bidirectional conversion between the two, through the first two functions.

A simple example:

import Data.Monoid
sumField :: (Functor m, Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m (Sum Int)
sumField = convertField Sum getSum intField

Another example, not using a newtype, but instead creating a Lazy Text field:

import qualified Data.Text.Lazy as TL
TextField :: (Functor m, Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m TL.Text
lazyTextField = convertField TL.fromStrict TL.toStrict textField

Since 1.3.16

removeClass #

Arguments

:: Text

The class to remove

-> [(Text, Text)]

List of existing fsAttrs

-> [(Text, Text)] 

Removes a CSS class from the fsAttrs in a FieldSettings.

Examples

Expand
>>> removeClass "form-control" [("class","form-control login-form"),("id","home-login")]
[("class","  login-form"),("id","home-login")]

Since: yesod-form-1.6.2

addClass #

Arguments

:: Text

The class to add

-> [(Text, Text)]

List of existing fsAttrs

-> [(Text, Text)] 

Adds a CSS class to the fsAttrs in a FieldSettings.

Examples

Expand
>>> addClass "login-form" [("class", "form-control"), ("id", "home-login")]
[("class","form-control login-form"),("id","home-login")]

Since: yesod-form-1.6.2

intField :: forall (m :: Type -> Type) i. (Monad m, Integral i, RenderMessage (HandlerSite m) FormMessage) => Field m i #

Creates a input with type="number" and step=1.

doubleField :: forall (m :: Type -> Type). (Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m Double #

Creates a input with type="number" and step=any.

dayField :: forall (m :: Type -> Type). (Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m Day #

Creates an input with type="date", validating the input using the parseDate function.

Add the time package and import the Data.Time.Calendar module to use this function.

timeFieldTypeTime :: forall (m :: Type -> Type). (Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m TimeOfDay #

Creates an input with type="time". Browsers not supporting this type will fallback to a text field, and Yesod will parse the time as described in timeFieldTypeText.

Add the time package and import the Data.Time.LocalTime module to use this function.

Since: yesod-form-1.4.2

timeFieldTypeText :: forall (m :: Type -> Type). (Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m TimeOfDay #

Creates an input with type="text", parsing the time from an [H]H:MM[:SS] format, with an optional AM or PM (if not given, AM is assumed for compatibility with the 24 hour clock system).

This function exists for backwards compatibility with the old implementation of timeField, which used to use type="text". Consider using timeField or timeFieldTypeTime for improved UX and validation from the browser.

Add the time package and import the Data.Time.LocalTime module to use this function.

Since: yesod-form-1.4.2

htmlField :: forall (m :: Type -> Type). (Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m Html #

Creates a <textarea> tag whose input is sanitized to prevent XSS attacks and is validated for having balanced tags.

textareaField :: forall (m :: Type -> Type). (Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m Textarea #

Creates a <textarea> tag whose returned value is wrapped in a Textarea; see Textarea for details.

hiddenField :: forall (m :: Type -> Type) p. (Monad m, PathPiece p, RenderMessage (HandlerSite m) FormMessage) => Field m p #

Creates an input with type="hidden"; you can use this to store information in a form that users shouldn't see (for example, Yesod stores CSRF tokens in a hidden field).

textField :: forall (m :: Type -> Type). (Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m Text #

Creates a input with type="text".

passwordField :: forall (m :: Type -> Type). (Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m Text #

Creates an input with type="password".

emailField :: forall (m :: Type -> Type). (Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m Text #

Creates an input with type="email". Yesod will validate the email's correctness according to RFC5322 and canonicalize it by removing comments and whitespace (see Text.Email.Validate).

multiEmailField :: forall (m :: Type -> Type). (Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m [Text] #

Creates an input with type="email" with the multiple attribute; browsers might implement this as taking a comma separated list of emails. Each email address is validated as described in emailField.

Since: yesod-form-1.3.7

searchField :: forall (m :: Type -> Type). (Monad m, RenderMessage (HandlerSite m) FormMessage) => AutoFocus -> Field m Text #

Creates an input with type="search". For browsers without autofocus support, a JS fallback is used if AutoFocus is true.

urlField :: forall (m :: Type -> Type). (Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m Text #

Creates an input with type="url", validating the URL according to RFC3986.

selectFieldList :: (Eq a, RenderMessage site FormMessage, RenderMessage site msg) => [(msg, a)] -> Field (HandlerFor site) a #

Creates a <select> tag for selecting one option. Example usage:

areq (selectFieldList [("Value 1" :: Text, "value1"),("Value 2", "value2")]) "Which value?" Nothing

selectFieldListGrouped :: (Eq a, RenderMessage site FormMessage, RenderMessage site msg) => [(msg, [(msg, a)])] -> Field (HandlerFor site) a #

Creates a <select> tag with <optgroup>s for selecting one option.

Since: yesod-form-1.7.0

selectField :: (Eq a, RenderMessage site FormMessage) => HandlerFor site (OptionList a) -> Field (HandlerFor site) a #

Creates a <select> tag with optional <optgroup>s for selecting one option. Example usage:

areq (selectField $ optionsPairs [(MsgValue1, "value1"),(MsgValue2, "value2")]) "Which value?" Nothing

multiSelectFieldList :: (Eq a, RenderMessage site msg) => [(msg, a)] -> Field (HandlerFor site) [a] #

Creates a <select> tag for selecting multiple options.

multiSelectField :: Eq a => HandlerFor site (OptionList a) -> Field (HandlerFor site) [a] #

Creates a <select> tag for selecting multiple options.

radioFieldList :: (Eq a, RenderMessage site FormMessage, RenderMessage site msg) => [(msg, a)] -> Field (HandlerFor site) a #

Creates an input with type="radio" for selecting one option.

checkboxesFieldList :: (Eq a, RenderMessage site msg) => [(msg, a)] -> Field (HandlerFor site) [a] #

Creates an input with type="checkbox" for selecting multiple options.

checkboxesField :: Eq a => HandlerFor site (OptionList a) -> Field (HandlerFor site) [a] #

Creates an input with type="checkbox" for selecting multiple options.

radioField :: (Eq a, RenderMessage site FormMessage) => HandlerFor site (OptionList a) -> Field (HandlerFor site) a #

Creates an input with type="radio" for selecting one option.

withRadioField #

Arguments

:: (Eq a, RenderMessage site FormMessage) 
=> (Text -> WidgetFor site () -> WidgetFor site ())

nothing case for mopt

-> (Text -> Text -> Bool -> Text -> WidgetFor site () -> WidgetFor site ())

cases for values

-> HandlerFor site (OptionList a) 
-> Field (HandlerFor site) a 

Allows the user to place the option radio widget somewhere in the template. For example: If you want a table of radio options to select. radioField is an example on how to use this function.

Since: yesod-form-1.7.2

boolField :: forall (m :: Type -> Type). (Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m Bool #

Creates a group of radio buttons to answer the question given in the message. Radio buttons are used to allow differentiating between an empty response (Nothing) and a no response (Just False). Consider using the simpler checkBoxField if you don't need to make this distinction.

If this field is optional, the first radio button is labeled "<None>", the second "Yes" and the third "No".

If this field is required, the first radio button is labeled "Yes" and the second "No".

(Exact label titles will depend on localization).

checkBoxField :: forall (m :: Type -> Type). Monad m => Field m Bool #

Creates an input with type="checkbox". While the default boolField implements a radio button so you can differentiate between an empty response (Nothing) and a no response (Just False), this simpler checkbox field returns an empty response as Just False.

Note that this makes the field always optional.

mkOptionList :: [Option a] -> OptionList a #

Creates an OptionList, using a Map to implement the olReadExternal function.

mkOptionListGrouped :: [(Text, [Option a])] -> OptionList a #

Creates an OptionList, using a Map to implement the olReadExternalGrouped function.

Since: yesod-form-1.7.0

optionsPairs :: (MonadHandler m, RenderMessage (HandlerSite m) msg) => [(msg, a)] -> m (OptionList a) #

Creates an OptionList from a list of (display-value, internal value) pairs.

optionsPairsGrouped :: (MonadHandler m, RenderMessage (HandlerSite m) msg) => [(msg, [(msg, a)])] -> m (OptionList a) #

Creates an OptionList from a list of (display-value, internal value) pairs.

Since: yesod-form-1.7.0

optionsEnum :: (MonadHandler m, Show a, Enum a, Bounded a) => m (OptionList a) #

Creates an OptionList from an Enum, using its Show instance for the user-facing value.

optionsPersist :: (YesodPersist site, PersistQueryRead backend, PathPiece (Key a), RenderMessage site msg, YesodPersistBackend site ~ backend, PersistRecordBackend a backend) => [Filter a] -> [SelectOpt a] -> (a -> msg) -> HandlerFor site (OptionList (Entity a)) #

Selects a list of Entitys with the given Filter and SelectOpts. The (a -> msg) function is then used to derive the display value for an OptionList. Example usage:

Country
   name Text
   deriving Eq -- Must derive Eq
data CountryForm = CountryForm
  { country :: Entity Country
  }

countryNameForm :: AForm Handler CountryForm
countryNameForm = CountryForm
        <$> areq (selectField countries) "Which country do you live in?" Nothing
        where
          countries = optionsPersist [] [Asc CountryName] countryName

optionsPersistKey :: (YesodPersist site, PersistQueryRead backend, PathPiece (Key a), RenderMessage site msg, backend ~ YesodPersistBackend site, PersistRecordBackend a backend) => [Filter a] -> [SelectOpt a] -> (a -> msg) -> HandlerFor site (OptionList (Key a)) #

An alternative to optionsPersist which returns just the Key instead of the entire Entity.

Since: yesod-form-1.3.2

selectFieldHelper #

Arguments

:: (Eq a, RenderMessage site FormMessage) 
=> (Text -> Text -> [(Text, Text)] -> WidgetFor site () -> WidgetFor site ())

Outermost part of the field

-> (Text -> Text -> Bool -> WidgetFor site ())

An option for None if the field is optional

-> (Text -> Text -> [(Text, Text)] -> Text -> Bool -> Text -> WidgetFor site ())

Other options

-> Maybe (Text -> WidgetFor site ())

Group headers placed inbetween options

-> HandlerFor site (OptionList a) 
-> Field (HandlerFor site) a 

A helper function for constucting selectFields with optional option groups. You may want to use this when you define your custom selectFields or radioFields.

Since: yesod-form-1.6.2

fileField :: forall (m :: Type -> Type). Monad m => Field m FileInfo #

Creates an input with type="file".

colorField :: forall (m :: Type -> Type). (Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m Text #

Creates an input with type="color". The input value must be provided in hexadecimal format #rrggbb.

Since: yesod-form-1.7.1

datetimeLocalField :: forall (m :: Type -> Type). (Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m LocalTime #

Creates an input with type="datetime-local". The input value must be provided in YYYY-MM-DD(T| )HH:MM[:SS] format.

Since: yesod-form-1.7.6

defaultRunDB :: PersistConfig c => (site -> c) -> (site -> PersistConfigPool c) -> PersistConfigBackend c (HandlerFor site) a -> HandlerFor site a #

Helper for creating runDB.

Since 1.2.0

defaultGetDBRunner :: (IsSqlBackend backend, YesodPersistBackend site ~ backend) => (site -> Pool backend) -> HandlerFor site (DBRunner site, HandlerFor site ()) #

Helper for implementing getDBRunner.

Since 1.2.0

runDBSource :: YesodPersistRunner site => ConduitT () a (YesodDB site) () -> ConduitT () a (HandlerFor site) () #

Like runDB, but transforms a Source. See respondSourceDB for an example, practical use case.

Since 1.2.0

respondSourceDB :: YesodPersistRunner site => ContentType -> ConduitT () (Flush Builder) (YesodDB site) () -> HandlerFor site TypedContent #

Extends respondSource to create a streaming database response body.

get404 :: forall (m :: Type -> Type) backend val. (MonadIO m, PersistStoreRead backend, PersistRecordBackend val backend) => Key val -> ReaderT backend m val #

Get the given entity by ID, or return a 404 not found if it doesn't exist.

getBy404 :: forall backend val (m :: Type -> Type). (PersistUniqueRead backend, PersistRecordBackend val backend, MonadIO m) => Unique val -> ReaderT backend m (Entity val) #

Get the given entity by unique key, or return a 404 not found if it doesn't exist.

insert400 :: forall (m :: Type -> Type) backend val. (MonadIO m, PersistUniqueWrite backend, PersistRecordBackend val backend, SafeToInsert val) => val -> ReaderT backend m (Key val) #

Create a new record in the database, returning an automatically created key, or raise a 400 bad request if a uniqueness constraint is violated.

Since: yesod-persistent-1.4.1

insert400_ :: forall (m :: Type -> Type) backend val. (MonadIO m, PersistUniqueWrite backend, PersistRecordBackend val backend, SafeToInsert val) => val -> ReaderT backend m () #

Same as insert400, but doesn’t return a key.

Since: yesod-persistent-1.4.1

newsFeedText :: MonadHandler m => Feed Text -> m TypedContent #

Same as newsFeed but for 'Feed Text'. Useful for cases where you are generating a feed of external links.

static :: FilePath -> IO Static #

Produce a default value of Static for a given file folder.

Does not have index files or directory listings. The static files' contents must not change, however new files can be added.

staticDevel :: FilePath -> IO Static #

Same as static, but does not assumes that the files do not change and checks their modification time whenever a request is made.

staticFiles :: FilePath -> Q [Dec] #

Template Haskell function that automatically creates routes for all of your static files.

For example, if you used

staticFiles "static/"

and you had files "static/style.css" and "static/js/script.js", then the following top-level definitions would be created:

style_css    = StaticRoute ["style.css"]    []
js_script_js = StaticRoute ["js", "script.js"] []

Note that dots (.), dashes (-) and slashes (/) are replaced by underscores (_) to create valid Haskell identifiers.

staticFilesList :: FilePath -> [FilePath] -> Q [Dec] #

Same as staticFiles, but takes an explicit list of files to create identifiers for. The files path given are relative to the static folder. For example, to create routes for the files "static/js/jquery.js" and "static/css/normalize.css", you would use:

staticFilesList "static" ["js/jquery.js", "css/normalize.css"]

This can be useful when you have a very large number of static files, but only need to refer to a few of them from Haskell.

publicFiles :: FilePath -> Q [Dec] #

Same as staticFiles, but doesn't append an ETag to the query string.

Using publicFiles will speed up the compilation, since there won't be any need for hashing files during compile-time. However, since the ETag ceases to be part of the URL, the Static subsite won't be able to set the expire date too far on the future. Browsers still will be able to cache the contents, however they'll need send a request to the server to see if their copy is up-to-date.

staticFilesMap :: FilePath -> Map FilePath FilePath -> Q [Dec] #

Similar to staticFilesList, but takes a mapping of unmunged names to fingerprinted file names.

Since: yesod-static-1.5.3

staticFilesMergeMap :: FilePath -> Map FilePath FilePath -> Q [Dec] #

Similar to staticFilesMergeMap, but also generates identifiers for all files in the specified directory that don't have a fingerprinted version.

Since: yesod-static-1.5.3

combineStylesheets' #

Arguments

:: Bool

development? if so, perform no combining

-> CombineSettings 
-> Name

Static route constructor name, e.g. 'StaticR

-> [Route Static]

files to combine

-> Q Exp 

Combine multiple CSS files together. Common usage would be:

>>> combineStylesheets' development def 'StaticR [style1_css, style2_css]

Where development is a variable in your site indicated whether you are in development or production mode.

Since 1.2.0

combineScripts' #

Arguments

:: Bool

development? if so, perform no combining

-> CombineSettings 
-> Name

Static route constructor name, e.g. 'StaticR

-> [Route Static]

files to combine

-> Q Exp 

Combine multiple JS files together. Common usage would be:

>>> combineScripts' development def 'StaticR [script1_js, script2_js]

Where development is a variable in your site indicated whether you are in development or production mode.

Since 1.2.0

toSqlKey :: ToBackendKey SqlBackend record => Int64 -> Key record #

fromSqlKey :: ToBackendKey SqlBackend record => Key record -> Int64 #

liftCatch :: Catch e m (Maybe a) -> Catch e (MaybeT m) a #

Lift a catchE operation to the new monad.

hoistMaybe :: forall (m :: Type -> Type) b. Applicative m => Maybe b -> MaybeT m b #

Convert a Maybe computation to MaybeT.

juliusUsedIdentifiers :: String -> [(Deref, VarType)] #

Determine which identifiers are used by the given template, useful for creating systems like yesod devel.

pprint :: (MonadIO m, Show a) => a -> m () Source #

liftListen :: Monad m => Listen w m (Maybe a) -> Listen w (MaybeT m) a #

Lift a listen operation to the new monad.

liftPass :: Monad m => Pass w m (Maybe a) -> Pass w (MaybeT m) a #

Lift a pass operation to the new monad.

mapMaybeT :: (m (Maybe a) -> n (Maybe b)) -> MaybeT m a -> MaybeT n b #

Transform the computation inside a MaybeT.

maybeToExceptT :: forall (m :: Type -> Type) e a. Functor m => e -> MaybeT m a -> ExceptT e m a #

Convert a MaybeT computation to ExceptT, with a default exception value.

exceptToMaybeT :: forall (m :: Type -> Type) e a. Functor m => ExceptT e m a -> MaybeT m a #

Convert a ExceptT computation to MaybeT, discarding the value of any exception.

applyEnvValue #

Arguments

:: Bool

require an environment variable to be present?

-> KeyMap Text 
-> Value 
-> Value 

Override environment variable placeholders in the given Value with values from the environment.

If the first argument is True, then all placeholders _must_ be provided by the actual environment. Otherwise, default values from the Value will be used.

Since: yaml-0.8.16

getCurrentEnv :: IO (KeyMap Text) #

Get the actual environment as a HashMap from Text to Text.

Since: yaml-0.8.16

applyCurrentEnv #

Arguments

:: Bool

require an environment variable to be present?

-> Value 
-> IO Value 

A convenience wrapper around applyEnvValue and getCurrentEnv

Since: yaml-0.8.16

ignoreEnv :: EnvUsage #

Do not use any environment variables, instead relying on defaults values in the config file.

Since: yaml-0.8.16

useEnv :: EnvUsage #

Use environment variables when available, otherwise use defaults.

Since: yaml-0.8.16

requireEnv :: EnvUsage #

Do not use default values from the config file, but instead take all overrides from the environment. If a value is missing, loading the file will throw an exception.

Since: yaml-0.8.16

useCustomEnv :: KeyMap Text -> EnvUsage #

Same as useEnv, but instead of the actual environment, use the provided HashMap as the environment.

Since: yaml-0.8.16

requireCustomEnv :: KeyMap Text -> EnvUsage #

Same as requireEnv, but instead of the actual environment, use the provided HashMap as the environment.

Since: yaml-0.8.16

loadYamlSettings #

Arguments

:: FromJSON settings 
=> [FilePath]

run time config files to use, earlier files have precedence

-> [Value]

any other values to use, usually from compile time config. overridden by files

-> EnvUsage 
-> IO settings 

Load the settings from the following three sources:

  • Run time config files
  • Run time environment variables
  • The default compile time config file

For example, to load up settings from config/foo.yaml and allow overriding from the actual environment, you can use:

loadYamlSettings ["config/foo.yaml"] [] useEnv

Since: yaml-0.8.16

loadYamlSettingsArgs #

Arguments

:: FromJSON settings 
=> [Value]

any other values to use, usually from compile time config. overridden by files

-> EnvUsage

use environment variables

-> IO settings 

Same as loadYamlSettings, but get the list of runtime config files from the command line arguments.

Since: yaml-0.8.17

loadAppSettings #

Arguments

:: FromJSON settings 
=> [FilePath]

run time config files to use, earlier files have precedence

-> [Value]

any other values to use, usually from compile time config. overridden by files

-> EnvUsage 
-> IO settings 

Load the settings from the following three sources:

  • Run time config files
  • Run time environment variables
  • The default compile time config file

loadAppSettingsArgs #

Arguments

:: FromJSON settings 
=> [Value]

any other values to use, usually from compile time config. overridden by files

-> EnvUsage

use environment variables

-> IO settings 

Same as loadAppSettings, but get the list of runtime config files from the command line arguments.

configSettingsYml :: FilePath #

Location of the default config file.

getDevSettings :: Settings -> IO Settings #

Helper for getApplicationDev in the scaffolding. Looks up PORT and DISPLAY_PORT and prints appropriate messages.

develMainHelper :: IO (Settings, Application) -> IO () #

Helper for develMain in the scaffolding.

makeYesodLogger :: LoggerSet -> IO Logger #

Create a Logger value (from yesod-core) out of a LoggerSet (from fast-logger).

getAuth :: a -> Auth #

credsKey :: Text #

Internal session key used to hold the authentication information.

Since: yesod-auth-1.2.3

defaultMaybeAuthId :: (MonadHandler m, HandlerSite m ~ master, YesodAuthPersist master, Typeable (AuthEntity master)) => m (Maybe (AuthId master)) #

Retrieves user credentials from the session, if user is authenticated.

This function does not confirm that the credentials are valid, see maybeAuthIdRaw for more information. The first call in a request does a database request to make sure that the account is still in the database.

Since: yesod-auth-1.1.2

defaultLoginHandler :: MonadAuthHandler master m => m Html #

Default handler to show the login page.

This is the default loginHandler. It concatenates plugin widgets and wraps the result in authLayout. See loginHandler for more details.

Since: yesod-auth-1.4.9

loginErrorMessage :: (MonadHandler m, YesodAuth (HandlerSite m)) => Route (HandlerSite m) -> Text -> m TypedContent #

For HTML, set the message and redirect to the route. For JSON, send the message and a 401 status

provideJsonMessage :: forall (m :: Type -> Type). Monad m => Text -> Writer (Endo [ProvidedRep m]) () #

setCredsRedirect #

Arguments

:: (MonadHandler m, YesodAuth (HandlerSite m)) 
=> Creds (HandlerSite m)

new credentials

-> m TypedContent 

setCreds #

Arguments

:: (MonadHandler m, YesodAuth (HandlerSite m)) 
=> Bool

if HTTP redirects should be done

-> Creds (HandlerSite m)

new credentials

-> m () 

Sets user credentials for the session after checking them with authentication backends.

clearCreds #

Arguments

:: (MonadHandler m, YesodAuth (HandlerSite m)) 
=> Bool

if HTTP, redirect to logoutDest

-> m () 

Clears current user credentials for the session.

Since: yesod-auth-1.1.7

maybeAuth :: (YesodAuthPersist master, val ~ AuthEntity master, Key val ~ AuthId master, PersistEntity val, Typeable val, MonadHandler m, HandlerSite m ~ master) => m (Maybe (Entity val)) #

Similar to maybeAuthId, but additionally look up the value associated with the user's database identifier to get the value in the database. This assumes that you are using a Persistent database.

Since: yesod-auth-1.1.0

maybeAuthPair :: (YesodAuthPersist master, Typeable (AuthEntity master), MonadHandler m, HandlerSite m ~ master) => m (Maybe (AuthId master, AuthEntity master)) #

Similar to maybeAuth, but doesn’t assume that you are using a Persistent database.

Since: yesod-auth-1.4.0

requireAuthId :: (MonadHandler m, YesodAuth (HandlerSite m)) => m (AuthId (HandlerSite m)) #

Similar to maybeAuthId, but redirects to a login page if user is not authenticated or responds with error 401 if this is an API client (expecting JSON).

Since: yesod-auth-1.1.0

requireAuth :: (YesodAuthPersist master, val ~ AuthEntity master, Key val ~ AuthId master, PersistEntity val, Typeable val, MonadHandler m, HandlerSite m ~ master) => m (Entity val) #

Similar to maybeAuth, but redirects to a login page if user is not authenticated or responds with error 401 if this is an API client (expecting JSON).

Since: yesod-auth-1.1.0

requireAuthPair :: (YesodAuthPersist master, Typeable (AuthEntity master), MonadHandler m, HandlerSite m ~ master) => m (AuthId master, AuthEntity master) #

Similar to requireAuth, but not tied to Persistent's Entity type. Instead, the AuthId and AuthEntity are returned in a tuple.

Since: yesod-auth-1.4.0

cpprint :: (MonadIO m, Show a) => a -> m () Source #

compileTimeAppSettings :: AppSettings Source #

A version of AppSettings parsed at compile time from config/settings.yml.

cprint :: (MonadIO m, Show a) => a -> m () Source #

widgetFileSettings :: WidgetFileSettings Source #

Settings for widgetFile, such as which template languages to support and default Hamlet settings.

For more information on modifying behavior, see:

https://github.com/yesodweb/yesod/wiki/Overriding-widgetFile

combineSettings :: CombineSettings Source #

How static files should be combined.

configSettingsYmlBS :: ByteString Source #

Raw bytes at compile time of config/settings.yml

configSettingsYmlValue :: Value Source #

config/settings.yml, parsed to a Value.