haxl-2.1.2.0: A Haskell library for efficient, concurrent, and concise data access.

Safe HaskellNone
LanguageHaskell2010

Haxl.Core.Run

Description

Defines runHaxl. Most users should import Haxl.Core instead.

Synopsis

Documentation

runHaxl :: forall u w a. Env u w -> GenHaxl u w a -> IO a Source #

Runs a Haxl computation in the given Env.

Note: to make multiple concurrent calls to runHaxl, each one must have a separate Env. A single Env must not be shared between multiple concurrent calls to runHaxl, otherwise deadlocks or worse will likely ensue.

However, multiple Envs may share a single StateStore, and thereby use the same set of datasources.

runHaxlWithWrites :: forall u w a. Env u w -> GenHaxl u w a -> IO (a, [w]) Source #