bluefin-0.2.6.0: The Bluefin effect system
Safe HaskellNone
LanguageHaskell2010

Bluefin.Compound

Synopsis

Creating your own effects

Wrap a single effect

Because in Bluefin everything happens at the value level, creating your own effects is equivalent to creating your own data types. We just use the techniques we know and love from Haskell! For example, if I want to make a "counter" effect that allows me to increment a counter then I can wrap a State handle in a newtype:

newtype Counter1 e = MkCounter1 (State Int e)

incCounter1 :: (e :> es) => Counter1 e -> Eff es ()
incCounter1 (MkCounter1 st) = modify st (+ 1)

runCounter1 ::
  (forall e. Counter1 e -> Eff (e :& es) r) ->
  Eff es Int
runCounter1 k =
  evalState 0 $ \st -> do
    _ <- k (MkCounter1 st)
    get st

Running the handler tells me the number of times I incremented the counter.

exampleCounter1 :: Int
exampleCounter1 = runPureEff $ runCounter1 $ \c ->
  incCounter1 c
  incCounter1 c
  incCounter1 c
>>> exampleCounter1
3

Wrap multiple effects, first attempt

If we want to wrap multiple effects then we can use the normal approach we use to wrap multiple values into a single value: define a new data type with multiple fields. There's a caveat to this approach, but before we address the caveat let's see the approach in action. Here we define a new handle, Counter2, that contains a State and Exception handle within it. That allows us to increment the counter and throw an exception when we hit a limit.

data Counter2 e1 e2 = MkCounter2 (State Int e1) (Exception () e2)

incCounter2 :: (e1 :> es, e2 :> es) => Counter2 e1 e2 -> Eff es ()
incCounter2 (MkCounter2 st ex) = do
  count <- get st
  when (count >= 10) $
    throw ex ()
  put st (count + 1)

runCounter2 ::
  (forall e1 e2. Counter2 e1 e2 -> Eff (e2 :& e1 :& es) r) ->
  Eff es Int
runCounter2 k =
  evalState 0 $ \st -> do
    _ <- try $ \ex -> do
      k (MkCounter2 st ex)
    get st

We can see that attempting to increment the counter fovever bails out when we reach the limit.

exampleCounter2 :: Int
exampleCounter2 = runPureEff $ runCounter2 $ \c ->
  forever $
    incCounter2 c
>>> exampleCounter2
10

The flaw of this approach is that you expose one effect parameter for each handle in the data type. That's rather cumbersome! We can do better.

Wrap multiple effects, a better approach

We can avoid exposing multiple effect parameters and just expose a single one. To make this work we have to define our handler in a slightly different way. Firstly we apply useImplIn to the effectful operation k and secondly we apply mapHandle to each of the handles out of which we create our compound handle. Everything else remains the same.

data Counter3 e = MkCounter3 (State Int e) (Exception () e)

incCounter3 :: (e :> es) => Counter3 e -> Eff es ()
incCounter3 (MkCounter3 st ex) = do
  count <- get st
  when (count >= 10) $
    throw ex ()
  put st (count + 1)

runCounter3 ::
  (forall e. Counter3 e -> Eff (e :& es) r) ->
  Eff es Int
runCounter3 k =
  evalState 0 $ \st -> do
    _ <- try $ \ex -> do
      useImplIn k (MkCounter3 (mapHandle st) (mapHandle ex))
    get st

The example works as before:

exampleCounter3 :: Int
exampleCounter3 = runPureEff $ runCounter3 $ \c ->
  forever $
    incCounter3 c
>>> exampleCounter3
10

Wrap a single effect, don't handle it

So far our handlers have handled all the effects that are found within our compound effect. We don't have to do that though: we can leave an effect unhandled to be handled by a different handler at a higher level. This must always be the case for IOE, which can only be handled at the top level by runEff_. Let's see what it looks like to wrap IOE and provide an API which allows a subset of IO operations.

newtype Counter3B e = MkCounter3B (IOE e)

incCounter3B :: (e :> es) => Counter3B e -> Eff es ()
incCounter3B (MkCounter3B io) =
  effIO io (putStrLn "You tried to increment the counter")

runCounter3B ::
  (e1 :> es) =>
  IOE e1 ->
  (forall e. Counter3B e -> Eff (e :& es) r) ->
  Eff es r
runCounter3B io k = useImplIn k (MkCounter3B (mapHandle io))
exampleCounter3B :: IO ()
exampleCounter3B = runEff_ $ \io -> runCounter3B io $ \c -> do
  incCounter3B c
  incCounter3B c
  incCounter3B c

This isn't a terribly useful counter! It doesn't actually increment anything, it just prints a message when we try, but the example does demonstrate how to wrap IOE.

-- ghci> exampleCounter3B
-- You tried to increment the counter
-- You tried to increment the counter
-- You tried to increment the counter

Wrap multiple effects, don't handle them all

We can wrap multiple effects, handle some of them and leave the others to be handled later. Let's extend Counter3 with a Stream effect. Whenever we ask to increment the counter, and it is currently an even number, then we yield a message about that. Additionally, there's a new operation getCounter4 which allows us to yield a message whilst returning the value of the counter.

data Counter4 e
  = MkCounter4 (State Int e) (Exception () e) (Stream String e)

incCounter4 :: (e :> es) => Counter4 e -> Eff es ()
incCounter4 (MkCounter4 st ex y) = do
  count <- get st

  when (even count) $
    yield y "Count was even"

  when (count >= 10) $
    throw ex ()

  put st (count + 1)

getCounter4 :: (e :> es) => Counter4 e -> String -> Eff es Int
getCounter4 (MkCounter4 st _ y) msg = do
  yield y msg
  get st

runCounter4 ::
  (e1 :> es) =>
  Stream String e1 ->
  (forall e. Counter4 e -> Eff (e :& es) r) ->
  Eff es Int
runCounter4 y k =
  evalState 0 $ \st -> do
    _ <- try $ \ex -> do
      useImplIn k (MkCounter4 (mapHandle st) (mapHandle ex) (mapHandle y))
    get st
exampleCounter4 :: ([String], Int)
exampleCounter4 = runPureEff $ yieldToList $ \y -> do
  runCounter4 y $ \c -> do
    incCounter4 c
    incCounter4 c
    n <- getCounter4 c "I'm getting the counter"
    when (n == 2) $
      yield y "n was 2, as expected"
>>> exampleCounter4
(["Count was even","I'm getting the counter","n was 2, as expected"],2)

Dynamic effects

So far we've looked at "concrete" compound effects, that is, new effects implemented in terms of specific other effects. We can also define dynamic effects, whose implementation is left abstract, to be defined in the handler. To do that we create a handle that is a record of functions. To run an effectful operation we call one of the functions from the record. We define the record in the handler. Here incCounter5Impl and getCounter5Impl are exactly the same as incCounter4 and getCounter4 were, they're just defined in the handler. In order to be used polymorphically, the actually effectful functions we call, incCounter5 and getCounter5 are derived from the record fields.

data Counter5 e = MkCounter5
  { incCounter5Impl :: Eff e (),
    getCounter5Impl :: String -> Eff e Int
  }
  deriving (Generic)
  deriving (Handle) via OneWayCoercibleHandle Counter5

instance (e :> es) => OneWayCoercible (Counter5 e) (Counter5 es) where
  oneWayCoercibleImpl = gOneWayCoercible

incCounter5 :: (e :> es) => Counter5 e -> Eff es ()
incCounter5 e = incCounter5Impl (mapHandle e)

getCounter5 :: (e :> es) => Counter5 e -> String -> Eff es Int
getCounter5 e msg = getCounter5Impl (mapHandle e) msg

runCounter5 ::
  (e1 :> es) =>
  Stream String e1 ->
  (forall e. Counter5 e -> Eff (e :& es) r) ->
  Eff es Int
runCounter5 y k =
  evalState 0 $ \st -> do
    _ <- try $ \ex -> do
      useImplIn
        k
        ( MkCounter5
            { incCounter5Impl = do
                count <- get st

                when (even count) $
                  yield y "Count was even"

                when (count >= 10) $
                  throw ex ()

                put st (count + 1),
              getCounter5Impl = \msg -> do
                yield y msg
                get st
            }
        )
    get st

The result is exactly the same as before

exampleCounter5 :: ([String], Int)
exampleCounter5 = runPureEff $ yieldToList $ \y -> do
  runCounter5 y $ \c -> do
    incCounter5 c
    incCounter5 c
    n <- getCounter5 c "I'm getting the counter"
    when (n == 2) $
      pyield y "n was 2, as expected"
>>> exampleCounter5
(["Count was even","I'm getting the counter","n was 2, as expected"],2)

Combining concrete and dynamic effects

We can also freely combine concrete and dynamic effects. In the following example, the incCounter6 effect is left dynamic, and defined in the handler, whilst getCounter6 is implemented in terms of concrete State and Stream effects.

data Counter6 e = MkCounter6
  { incCounter6Impl :: Eff e (),
    counter6State :: State Int e,
    counter6Stream :: Stream String e
  }
  deriving (Generic)
  deriving (Handle) via OneWayCoercibleHandle Counter6

instance (e :> es) => OneWayCoercible (Counter6 e) (Counter6 es) where
  oneWayCoercibleImpl = gOneWayCoercible

incCounter6 :: (e :> es) => Counter6 e -> Eff es ()
incCounter6 e = incCounter6Impl (mapHandle e)

getCounter6 :: (e :> es) => Counter6 e -> String -> Eff es Int
getCounter6 (MkCounter6 _ st y) msg = do
  yield y msg
  get st

runCounter6 ::
  (e1 :> es) =>
  Stream String e1 ->
  (forall e. Counter6 e -> Eff (e :& es) r) ->
  Eff es Int
runCounter6 y k =
  evalState 0 $ \st -> do
    _ <- try $ \ex -> do
      useImplIn
        k
        ( MkCounter6
            { incCounter6Impl = do
                count <- get st

                when (even count) $
                  yield y "Count was even"

                when (count >= 10) $
                  throw ex ()

                put st (count + 1),
              counter6State = mapHandle st,
              counter6Stream = mapHandle y
            }
        )
    get st

Naturally, the result is the same.

exampleCounter6 :: ([String], Int)
exampleCounter6 = runPureEff $ yieldToList $ \y -> do
  runCounter6 y $ \c -> do
    incCounter6 c
    incCounter6 c
    n <- getCounter6 c "I'm getting the counter"
    when (n == 2) $
      yield y "n was 2, as expected"
>>> exampleCounter6
(["Count was even","I'm getting the counter","n was 2, as expected"],2)

Dynamic effects with handles as arguments

We can implement dynamic effects that themselves take handles as arguments, by giving all the handle arguments the effect tag e'.

data Counter7 e = MkCounter7
  { incCounter7Impl :: forall e'. Exception () e' -> Eff (e' :& e) (),
    counter7State :: State Int e,
    counter7Stream :: Stream String e
  }

instance Handle Counter7 where
  handleImpl = handleMapHandle $ \c ->
    MkCounter7
      { incCounter7Impl = \ex -> useImplUnder (incCounter7Impl c ex),
        counter7State = mapHandle (counter7State c),
        counter7Stream = mapHandle (counter7Stream c)
      }

incCounter7 ::
  (e :> es, e1 :> es) => Counter7 e -> Exception () e1 -> Eff es ()
incCounter7 e ex = makeOp (incCounter7Impl (mapHandle e) (mapHandle ex))

getCounter7 :: (e :> es) => Counter7 e -> String -> Eff es Int
getCounter7 (MkCounter7 _ st y) msg = do
  yield y msg
  get st

runCounter7 ::
  (e1 :> es) =>
  Stream String e1 ->
  (forall e. Counter7 e -> Eff (e :& es) r) ->
  Eff es Int
runCounter7 y k =
  evalState 0 $ \st -> do
    _ <-
      useImplIn
        k
        ( MkCounter7
            { incCounter7Impl = \ex -> do
                count <- get st

                when (even count) $
                  yield y "Count was even"

                when (count >= 10) $
                  throw ex ()

                put st (count + 1),
              counter7State = mapHandle st,
              counter7Stream = mapHandle y
            }
        )
    get st

The result is the same as before ...

exampleCounter7A :: ([String], Int)
'exampleCounter7A = runPureEff $ yieldToList $ \y -> do
  handle (\() -> pure (-42)) $ \ex ->
    runCounter7 y $ \c -> do
      incCounter7 c ex
      incCounter7 c ex
      n <- getCounter7 c "I'm getting the counter"
      when (n == 2) $
        yield y "n was 2, as expected"

-- > exampleCounter7A
-- (["Count was even","I'm getting the counter","n was 2, as expected"],2)

... unless we run incCounter too many times, in which case it throws an exception.

exampleCounter7B :: ([String], Int)
exampleCounter7B = runPureEff $ yieldToList $ \y -> do
  handle (\() -> pure (-42)) $ \ex ->
    runCounter7 y $ \c -> do
      forever (incCounter7 c ex)

-- > exampleCounter7B
-- (["Count was even","Count was even","Count was even","Count was even","Count was even","Count was even"],-42)

Dynamic effects with effectful operations as arguments

We can also implement dynamic effects that themselves take effectful operations as arguments, by giving the effectful operation the effect tag e'. Here's an example of a dynamic reader effect, and one handler for the effect, which runs it in terms of the existing Reader effect.

data DynamicReader r e = DynamicReader
  { askLRImpl :: Eff e r,
    localLRImpl :: forall e' a. (r -> r) -> Eff e' a -> Eff (e' :& e) a
  }

instance Handle (DynamicReader r) where
  mapHandle h =
    DynamicReader
      { askLRImpl = useImpl (askLRImpl h),
        localLRImpl = \f k -> useImplUnder (localLRImpl h f k)
      }

askLR ::
  (e :> es) =>
  DynamicReader r e ->
  Eff es r
askLR c = makeOp (askLRImpl (mapHandle c))

localLR ::
  (e :> es) =>
  DynamicReader r e ->
  (r -> r) ->
  Eff es a ->
  Eff es a
localLR c f m = makeOp (localLRImpl (mapHandle c) f m)

runDynamicReader ::
  r ->
  (forall e. DynamicReader r e -> Eff (e :& es) a) ->
  Eff es a
runDynamicReader r k =
  runReader r $ \h -> do
    useImplIn
      k
      DynamicReader
        { askLRImpl = ask h,
          localLRImpl = \f k' -> makeOp (local h f (useImpl k'))
        }

A dynamic file system effect

The effectful library has an example of a dynamic effect for basic file system access. This is what it looks like in Bluefin. We start by defining a record of effectful operations.

data FileSystem es = MkFileSystem
  { readFileImpl :: FilePath -> Eff es String,
    writeFileImpl :: FilePath -> String -> Eff es ()
  }
  deriving (Generic)
  deriving (Handle) via OneWayCoercibleHandle FileSystem

instance (e :> es) => OneWayCoercible (FileSystem e) (FileSystem es) where
  oneWayCoercibleImpl = gOneWayCoercible

readFile :: (e :> es) => FileSystem e -> FilePath -> Eff es String
readFile fs filepath = readFileImpl (mapHandle fs) filepath

writeFile :: (e :> es) => FileSystem e -> FilePath -> String -> Eff es ()
writeFile fs filepath contents =
  writeFileImpl (mapHandle fs) filepath contents

We can make a pure handler that simulates reading and writing to a file system by storing file contents in an association list.

runFileSystemPure ::
  (e1 :> es) =>
  Exception String e1 ->
  [(FilePath, String)] ->
  (forall e2. FileSystem e2 -> Eff (e2 :& es) r) ->
  Eff es r
runFileSystemPure ex fs0 k =
  evalState fs0 $ \fs ->
    useImplIn
      k
      MkFileSystem
        { readFileImpl = \filepath -> do
            fs' <- get fs
            case lookup filepath fs' of
              Nothing ->
                throw ex ("File not found: " <> filepath)
              Just s -> pure s,
          writeFileImpl = \filepath contents ->
            modify fs ((filepath, contents) :)
        }

Or we can make a handler that actually performs IO operations against a real file system.

runFileSystemIO ::
  forall e1 e2 es r.
  (e1 :> es, e2 :> es) =>
  Exception String e1 ->
  IOE e2 ->
  (forall e. FileSystem e -> Eff (e :& es) r) ->
  Eff es r
runFileSystemIO ex io k =
  useImplIn
    k
    MkFileSystem
      { readFileImpl =
          adapt . Prelude.readFile,
        writeFileImpl =
          \filepath -> adapt . Prelude.writeFile filepath
      }
  where
    adapt :: (e1 :> ess, e2 :> ess) => IO a -> Eff ess a
    adapt m =
      effIO io (Control.Exception.try @IOException m) >>= \case
        Left e -> throw ex (show e)
        Right r -> pure r

We can use the FileSystem effect to define an action which does some file system operations.

action :: (e :> es) => FileSystem e -> Eff es String
action fs = do
  file <- readFile fs "/dev/null"
  when (length file == 0) $ do
    writeFile fs "/tmp/bluefin" "Hello!"
  readFile fs "/tmp/doesn't exist"

and we can run it purely, against a simulated file system

exampleRunFileSystemPure :: Either String String
exampleRunFileSystemPure = runPureEff $ try $ \ex ->
  runFileSystemPure ex [("/dev/null", "")] action
>>> exampleRunFileSystemPure
Left "File not found: /tmp/doesn't exist"

or against the real file system.

exampleRunFileSystemIO :: IO (Either String String)
exampleRunFileSystemIO = runEff_ $ \io -> try $ \ex ->
  runFileSystemIO ex io action
>>> exampleRunFileSystemIO
Left "/tmp/doesn't exist: openFile: does not exist (No such file or directory)"
$ cat /tmp/bluefin
Hello!

Functions for making compound effects

Handle

class Handle (h :: Effects -> Type) where #

Every Bluefin handle should have an instance of class Handle. Built-in handles, such as Exception, State and IOE, come with Handle instances.

You should define a Handle instance for each handle that you define yourself. As an example, an "application" handle with a dynamic effect for database queries, a concrete effect for application state and a concrete effect for a logging effect might look like this:

data Application e = MkApplication
  { queryDatabase :: String -> Int -> Eff e [String],
    applicationState :: State (Int, Bool) e,
    logger :: Stream String e
  }
  deriving (Generic)
  deriving (Handle) via OneWayCoercibleHandle Application

instance (e :> es) => OneWayCoercible (Application e) (Application es) where
  oneWayCoercibleImpl = gOneWayCoercible

Minimal complete definition

handleImpl | mapHandle

Methods

handleImpl :: HandleD h #

Define handleImpl using handleMapHandle.

mapHandle :: forall (e :: Effects) (es :: Effects). e :> es => h e -> h es #

Used to create compound effects, i.e. handles that contain other handles.

You should not define this method in your type classes. Instead define handleImpl. In a future version of Bluefin, mapHandle will no longer be a method. If you previously had a definition of mapHandle, for example like this:

instance Handle MyHandle where
  mapHandle h = <definition>

you should change it to

data MyHandle e = ...
  deriving (Generic)
  deriving (Handle) via OneWayCoercibleHandle MyHandle

instance (e :> es) => OneWayCoercible (MyHandle e) (MyHandle es) where
  oneWayCoercibleImpl = gOneWayCoercible

If that doesn't work for any reason you can always reuse your old definition of mapHandle as follows. However, handleMapHandle will be removed at some point in the future, so you can open a new issue on Bluefin to ask for advice.

instance Handle MyHandle where
  handleImpl = handleMapHandle $ \h -> <definition>

Instances

Instances details
Handle IOE 
Instance details

Defined in Bluefin.Internal

Methods

handleImpl :: HandleD IOE #

mapHandle :: forall (e :: Effects) (es :: Effects). e :> es => IOE e -> IOE es #

Handle Application 
Instance details

Defined in Bluefin.Internal.Examples

Methods

handleImpl :: HandleD Application #

mapHandle :: forall (e :: Effects) (es :: Effects). e :> es => Application e -> Application es #

Handle Counter5 
Instance details

Defined in Bluefin.Internal.Examples

Methods

handleImpl :: HandleD Counter5 #

mapHandle :: forall (e :: Effects) (es :: Effects). e :> es => Counter5 e -> Counter5 es #

Handle Counter6 
Instance details

Defined in Bluefin.Internal.Examples

Methods

handleImpl :: HandleD Counter6 #

mapHandle :: forall (e :: Effects) (es :: Effects). e :> es => Counter6 e -> Counter6 es #

Handle Counter7 
Instance details

Defined in Bluefin.Internal.Examples

Methods

handleImpl :: HandleD Counter7 #

mapHandle :: forall (e :: Effects) (es :: Effects). e :> es => Counter7 e -> Counter7 es #

Handle FileSystem 
Instance details

Defined in Bluefin.Internal.Examples

Methods

handleImpl :: HandleD FileSystem #

mapHandle :: forall (e :: Effects) (es :: Effects). e :> es => FileSystem e -> FileSystem es #

Handle Handle 
Instance details

Defined in Bluefin.Internal.System.IO

Methods

handleImpl :: HandleD Handle #

mapHandle :: forall (e :: Effects) (es :: Effects). e :> es => Handle e -> Handle es #

Handle (ConstEffect r) 
Instance details

Defined in Bluefin.Internal

Methods

handleImpl :: HandleD (ConstEffect r) #

mapHandle :: forall (e :: Effects) (es :: Effects). e :> es => ConstEffect r e -> ConstEffect r es #

Handle (Exception exn) 
Instance details

Defined in Bluefin.Internal

Methods

handleImpl :: HandleD (Exception exn) #

mapHandle :: forall (e :: Effects) (es :: Effects). e :> es => Exception exn e -> Exception exn es #

Handle h => Handle (HandleReader h) 
Instance details

Defined in Bluefin.Internal

Methods

handleImpl :: HandleD (HandleReader h) #

mapHandle :: forall (e :: Effects) (es :: Effects). e :> es => HandleReader h e -> HandleReader h es #

Handle (Reader r) 
Instance details

Defined in Bluefin.Internal

Methods

handleImpl :: HandleD (Reader r) #

mapHandle :: forall (e :: Effects) (es :: Effects). e :> es => Reader r e -> Reader r es #

Handle (State s) 
Instance details

Defined in Bluefin.Internal

Methods

handleImpl :: HandleD (State s) #

mapHandle :: forall (e :: Effects) (es :: Effects). e :> es => State s e -> State s es #

Handle (Writer w) 
Instance details

Defined in Bluefin.Internal

Methods

handleImpl :: HandleD (Writer w) #

mapHandle :: forall (e :: Effects) (es :: Effects). e :> es => Writer w e -> Writer w es #

Handle (DynamicReader r) 
Instance details

Defined in Bluefin.Internal.Examples

Methods

handleImpl :: HandleD (DynamicReader r) #

mapHandle :: forall (e :: Effects) (es :: Effects). e :> es => DynamicReader r e -> DynamicReader r es #

Handle h => Handle (Rec1 h) 
Instance details

Defined in Bluefin.Internal

Methods

handleImpl :: HandleD (Rec1 h) #

mapHandle :: forall (e :: Effects) (es :: Effects). e :> es => Rec1 h e -> Rec1 h es #

Handle (Coroutine a b) 
Instance details

Defined in Bluefin.Internal

Methods

handleImpl :: HandleD (Coroutine a b) #

mapHandle :: forall (e :: Effects) (es :: Effects). e :> es => Coroutine a b e -> Coroutine a b es #

(forall (e' :: Effects) (es' :: Effects). e' :> es' => OneWayCoercible (OneWayCoercibleHandle h e') (OneWayCoercibleHandle h es')) => Handle (OneWayCoercibleHandle h) 
Instance details

Defined in Bluefin.Internal

(Handle h1, Handle h2) => Handle (h1 :~> h2) 
Instance details

Defined in Bluefin.Internal.CloneableHandle

Methods

handleImpl :: HandleD (h1 :~> h2) #

mapHandle :: forall (e :: Effects) (es :: Effects). e :> es => (h1 :~> h2) e -> (h1 :~> h2) es #

Handle h => Handle (GenericCloneableHandle h) 
Instance details

Defined in Bluefin.Internal.CloneableHandle

(Handle h1, Handle h2) => Handle (HandleCloner h1 h2) 
Instance details

Defined in Bluefin.Internal.CloneableHandle

Methods

handleImpl :: HandleD (HandleCloner h1 h2) #

mapHandle :: forall (e :: Effects) (es :: Effects). e :> es => HandleCloner h1 h2 e -> HandleCloner h1 h2 es #

(Handle h1, Handle h2) => Handle (h1 :*: h2) 
Instance details

Defined in Bluefin.Internal

Methods

handleImpl :: HandleD (h1 :*: h2) #

mapHandle :: forall (e :: Effects) (es :: Effects). e :> es => (h1 :*: h2) e -> (h1 :*: h2) es #

Handle h => Handle (HandlerUnwrapped r a h) 
Instance details

Defined in Bluefin.Internal.Exception

Methods

handleImpl :: HandleD (HandlerUnwrapped r a h) #

mapHandle :: forall (e :: Effects) (es :: Effects). e :> es => HandlerUnwrapped r a h e -> HandlerUnwrapped r a h es #

Handle h => Handle (MakeExceptions r a h) 
Instance details

Defined in Bluefin.Internal.Exception

Methods

handleImpl :: HandleD (MakeExceptions r a h) #

mapHandle :: forall (e :: Effects) (es :: Effects). e :> es => MakeExceptions r a h e -> MakeExceptions r a h es #

Handle h => Handle (M1 i t h) 
Instance details

Defined in Bluefin.Internal

Methods

handleImpl :: HandleD (M1 i t h) #

mapHandle :: forall (e :: Effects) (es :: Effects). e :> es => M1 i t h e -> M1 i t h es #

data HandleD (h :: Effects -> Type) #

The type of the handleImpl method of the Handle class. Create a HandleD using handleMapHandle.

handleMapHandle #

Arguments

:: (forall (e :: Effects) (es :: Effects). e :> es => h e -> h es) 
-> HandleD h

͘

For defining the handleImpl method of the Handle class.

OneWayCoercible

The documentation for Handle shows how to use OneWayCoercible to define Handle instances.

class OneWayCoercible (a :: k) (b :: k) where #

Instances

Instances details
OneWayCoercible () () 
Instance details

Defined in Bluefin.Internal.OneWayCoercible

OneWayCoercible (s :: k) (s :: k) 
Instance details

Defined in Bluefin.Internal.OneWayCoercible

e :> es => OneWayCoercible (IOE e :: Type) (IOE es :: Type) 
Instance details

Defined in Bluefin.Internal

e :> es => OneWayCoercible (Application e :: Type) (Application es :: Type) 
Instance details

Defined in Bluefin.Internal.Examples

e :> es => OneWayCoercible (Counter5 e :: Type) (Counter5 es :: Type) 
Instance details

Defined in Bluefin.Internal.Examples

e :> es => OneWayCoercible (Counter6 e :: Type) (Counter6 es :: Type) 
Instance details

Defined in Bluefin.Internal.Examples

e :> es => OneWayCoercible (FileSystem e :: Type) (FileSystem es :: Type) 
Instance details

Defined in Bluefin.Internal.Examples

OneWayCoercible a1 a2 => OneWayCoercible (Maybe a1 :: Type) (Maybe a2 :: Type) 
Instance details

Defined in Bluefin.Internal.OneWayCoercible

(OneWayCoercible a1 a2, OneWayCoercible b1 b2) => OneWayCoercible (Either a1 b1 :: Type) (Either a2 b2 :: Type) 
Instance details

Defined in Bluefin.Internal.OneWayCoercible

e :> es => OneWayCoercible (ConstEffect r e :: Type) (ConstEffect r es :: Type) 
Instance details

Defined in Bluefin.Internal

e :> es => OneWayCoercible (Eff e r :: Type) (Eff es r :: Type) 
Instance details

Defined in Bluefin.Internal

e :> es => OneWayCoercible (Exception ex e :: Type) (Exception ex es :: Type) 
Instance details

Defined in Bluefin.Internal

e :> es => OneWayCoercible (Reader r e :: Type) (Reader r es :: Type) 
Instance details

Defined in Bluefin.Internal

e :> es => OneWayCoercible (State s e :: Type) (State s es :: Type) 
Instance details

Defined in Bluefin.Internal

e :> es => OneWayCoercible (Writer w e :: Type) (Writer w es :: Type) 
Instance details

Defined in Bluefin.Internal

(OneWayCoercible a1 a2, OneWayCoercible b1 b2) => OneWayCoercible ((a1, b1) :: Type) ((a2, b2) :: Type)

Other sizes of tuples follow this pattern. We will add them when someone needs them.

Instance details

Defined in Bluefin.Internal.OneWayCoercible

Methods

oneWayCoercibleImpl :: OneWayCoercibleD (a1, b1) (a2, b2) #

(OneWayCoercible a a', OneWayCoercible b b') => OneWayCoercible (a' -> b :: Type) (a -> b' :: Type) 
Instance details

Defined in Bluefin.Internal.OneWayCoercible

Methods

oneWayCoercibleImpl :: OneWayCoercibleD (a' -> b) (a -> b') #

e :> es => OneWayCoercible (Coroutine a b e :: Type) (Coroutine a b es :: Type) 
Instance details

Defined in Bluefin.Internal

OneWayCoercible (h e) (h es) => OneWayCoercible (OneWayCoercibleHandle h e :: Type) (OneWayCoercibleHandle h es :: Type) 
Instance details

Defined in Bluefin.Internal

(Handle h1, Handle h2) => OneWayCoercible ((h1 :~> h2) e :: Type) ((h1 :~> h2) es :: Type) 
Instance details

Defined in Bluefin.Internal.CloneableHandle

Methods

oneWayCoercibleImpl :: OneWayCoercibleD ((h1 :~> h2) e) ((h1 :~> h2) es) #

(Handle h1, Handle h2) => OneWayCoercible (HandleCloner h1 h2 e :: Type) (HandleCloner h1 h2 es :: Type) 
Instance details

Defined in Bluefin.Internal.CloneableHandle

e :> es => OneWayCoercible (DslBuilderEffects h e r :: Type) (DslBuilderEffects h es r :: Type) 
Instance details

Defined in Bluefin.Internal.DslBuilderEffects

e :> es => OneWayCoercible (BracketBase bodyRes r a e :: Type) (BracketBase bodyRes r a es :: Type) 
Instance details

Defined in Bluefin.Internal.Exception

Methods

oneWayCoercibleImpl :: OneWayCoercibleD (BracketBase bodyRes r a e) (BracketBase bodyRes r a es) #

(Handle h, e :> es) => OneWayCoercible (HandlerUnwrapped r a h e :: Type) (HandlerUnwrapped r a h es :: Type) 
Instance details

Defined in Bluefin.Internal.Exception

(Handle h, e :> es) => OneWayCoercible (MakeExceptions r a h e :: Type) (MakeExceptions r a h es :: Type) 
Instance details

Defined in Bluefin.Internal.Exception

e :> es => OneWayCoercible (Eff e :: Type -> Type) (Eff es :: Type -> Type) 
Instance details

Defined in Bluefin.Internal

newtype OneWayCoercibleHandle (a :: k -> Type) (es :: k) #

OneWayCoercibleHandle is used to derive Handle instances using DerivingVia

Constructors

MkOneWayCoercibleHandle (a es) 

Instances

Instances details
OneWayCoercible (h e) (h es) => OneWayCoercible (OneWayCoercibleHandle h e :: Type) (OneWayCoercibleHandle h es :: Type) 
Instance details

Defined in Bluefin.Internal

(forall (e' :: Effects) (es' :: Effects). e' :> es' => OneWayCoercible (OneWayCoercibleHandle h e') (OneWayCoercibleHandle h es')) => Handle (OneWayCoercibleHandle h) 
Instance details

Defined in Bluefin.Internal

Generic (OneWayCoercibleHandle a es) 
Instance details

Defined in Bluefin.Internal

Associated Types

type Rep (OneWayCoercibleHandle a es) 
Instance details

Defined in Bluefin.Internal

type Rep (OneWayCoercibleHandle a es) = D1 ('MetaData "OneWayCoercibleHandle" "Bluefin.Internal" "bluefin-internal-0.3.4.0-9GrTj2GQiLd7ycEThQMiPM" 'True) (C1 ('MetaCons "MkOneWayCoercibleHandle" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (a es))))
type Rep (OneWayCoercibleHandle a es) 
Instance details

Defined in Bluefin.Internal

type Rep (OneWayCoercibleHandle a es) = D1 ('MetaData "OneWayCoercibleHandle" "Bluefin.Internal" "bluefin-internal-0.3.4.0-9GrTj2GQiLd7ycEThQMiPM" 'True) (C1 ('MetaCons "MkOneWayCoercibleHandle" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (a es))))

gOneWayCoercible #

Arguments

:: forall {k} h (e :: k) (es :: k). GOneWayCoercible (Rep (h e)) (Rep (h es)) 
=> OneWayCoercibleD (h e) (h es)

͘

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

Defined in GHC.Generics

Associated Types

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)

Methods

from :: Void -> Rep Void x #

to :: Rep Void x -> Void #

Generic Fingerprint 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Fingerprint

Since: base-4.15.0.0

Instance details

Defined in GHC.Generics

type Rep Fingerprint = D1 ('MetaData "Fingerprint" "GHC.Fingerprint.Type" "base" 'False) (C1 ('MetaCons "Fingerprint" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedUnpack) (Rec0 Word64) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedUnpack) (Rec0 Word64)))
Generic Associativity 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Associativity

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

type Rep Associativity = D1 ('MetaData "Associativity" "GHC.Generics" "base" 'False) (C1 ('MetaCons "LeftAssociative" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "RightAssociative" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NotAssociative" 'PrefixI 'False) (U1 :: Type -> Type)))
Generic DecidedStrictness 
Instance details

Defined in GHC.Generics

Associated Types

type Rep DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep DecidedStrictness = D1 ('MetaData "DecidedStrictness" "GHC.Generics" "base" 'False) (C1 ('MetaCons "DecidedLazy" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "DecidedStrict" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DecidedUnpack" 'PrefixI 'False) (U1 :: Type -> Type)))
Generic Fixity 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Fixity

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

from :: Fixity -> Rep Fixity x #

to :: Rep Fixity x -> Fixity #

Generic SourceStrictness 
Instance details

Defined in GHC.Generics

Associated Types

type Rep SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep SourceStrictness = D1 ('MetaData "SourceStrictness" "GHC.Generics" "base" 'False) (C1 ('MetaCons "NoSourceStrictness" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SourceLazy" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SourceStrict" 'PrefixI 'False) (U1 :: Type -> Type)))
Generic SourceUnpackedness 
Instance details

Defined in GHC.Generics

Associated Types

type Rep SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep SourceUnpackedness = D1 ('MetaData "SourceUnpackedness" "GHC.Generics" "base" 'False) (C1 ('MetaCons "NoSourceUnpackedness" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SourceNoUnpack" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SourceUnpack" 'PrefixI 'False) (U1 :: Type -> Type)))
Generic SrcLoc 
Instance details

Defined in GHC.Generics

Associated Types

type Rep SrcLoc

Since: base-4.15.0.0

Instance details

Defined in GHC.Generics

Methods

from :: SrcLoc -> Rep SrcLoc x #

to :: Rep SrcLoc x -> SrcLoc #

Generic GeneralCategory 
Instance details

Defined in GHC.Generics

Associated Types

type Rep GeneralCategory

Since: base-4.15.0.0

Instance details

Defined in GHC.Generics

type Rep GeneralCategory = D1 ('MetaData "GeneralCategory" "GHC.Unicode" "base" 'False) ((((C1 ('MetaCons "UppercaseLetter" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "LowercaseLetter" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TitlecaseLetter" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ModifierLetter" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "OtherLetter" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "NonSpacingMark" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SpacingCombiningMark" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "EnclosingMark" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DecimalNumber" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "LetterNumber" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "OtherNumber" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ConnectorPunctuation" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DashPunctuation" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "OpenPunctuation" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ClosePunctuation" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "InitialQuote" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "FinalQuote" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "OtherPunctuation" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "MathSymbol" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CurrencySymbol" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ModifierSymbol" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "OtherSymbol" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "Space" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LineSeparator" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ParagraphSeparator" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Control" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Format" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Surrogate" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PrivateUse" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NotAssigned" 'PrefixI 'False) (U1 :: Type -> Type))))))
Generic Ordering 
Instance details

Defined in GHC.Generics

Associated Types

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)))

Methods

from :: Ordering -> Rep Ordering x #

to :: Rep Ordering x -> Ordering #

Generic () 
Instance details

Defined in GHC.Generics

Associated Types

type Rep ()

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

type Rep () = D1 ('MetaData "Unit" "GHC.Tuple.Prim" "ghc-prim" 'False) (C1 ('MetaCons "()" 'PrefixI 'False) (U1 :: Type -> Type))

Methods

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

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

Generic Bool 
Instance details

Defined in GHC.Generics

Associated Types

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))

Methods

from :: Bool -> Rep Bool x #

to :: Rep Bool x -> Bool #

Generic (Down a) 
Instance details

Defined in GHC.Generics

Associated Types

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)))

Methods

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

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

Generic (NonEmpty a) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (NonEmpty a)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

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)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

type Rep (Par1 p) = D1 ('MetaData "Par1" "GHC.Generics" "base" 'True) (C1 ('MetaCons "Par1" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPar1") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 p)))

Methods

from :: Par1 p -> Rep (Par1 p) x #

to :: Rep (Par1 p) x -> Par1 p #

Generic (Application e) 
Instance details

Defined in Bluefin.Internal.Examples

Associated Types

type Rep (Application e) 
Instance details

Defined in Bluefin.Internal.Examples

type Rep (Application e) = D1 ('MetaData "Application" "Bluefin.Internal.Examples" "bluefin-internal-0.3.4.0-9GrTj2GQiLd7ycEThQMiPM" 'False) (C1 ('MetaCons "MkApplication" 'PrefixI 'True) (S1 ('MetaSel ('Just "queryDatabase") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (String -> Int -> Eff e [String])) :*: (S1 ('MetaSel ('Just "applicationState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (State (Int, Bool) e)) :*: S1 ('MetaSel ('Just "logger") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Stream String e)))))

Methods

from :: Application e -> Rep (Application e) x #

to :: Rep (Application e) x -> Application e #

Generic (Counter5 e) 
Instance details

Defined in Bluefin.Internal.Examples

Associated Types

type Rep (Counter5 e) 
Instance details

Defined in Bluefin.Internal.Examples

type Rep (Counter5 e) = D1 ('MetaData "Counter5" "Bluefin.Internal.Examples" "bluefin-internal-0.3.4.0-9GrTj2GQiLd7ycEThQMiPM" 'False) (C1 ('MetaCons "MkCounter5" 'PrefixI 'True) (S1 ('MetaSel ('Just "incCounter5Impl") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Eff e ())) :*: S1 ('MetaSel ('Just "getCounter5Impl") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (String -> Eff e Int))))

Methods

from :: Counter5 e -> Rep (Counter5 e) x #

to :: Rep (Counter5 e) x -> Counter5 e #

Generic (Counter6 e) 
Instance details

Defined in Bluefin.Internal.Examples

Associated Types

type Rep (Counter6 e) 
Instance details

Defined in Bluefin.Internal.Examples

type Rep (Counter6 e) = D1 ('MetaData "Counter6" "Bluefin.Internal.Examples" "bluefin-internal-0.3.4.0-9GrTj2GQiLd7ycEThQMiPM" 'False) (C1 ('MetaCons "MkCounter6" 'PrefixI 'True) (S1 ('MetaSel ('Just "incCounter6Impl") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Eff e ())) :*: (S1 ('MetaSel ('Just "counter6State") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (State Int e)) :*: S1 ('MetaSel ('Just "counter6Stream") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Stream String e)))))

Methods

from :: Counter6 e -> Rep (Counter6 e) x #

to :: Rep (Counter6 e) x -> Counter6 e #

Generic (FileSystem es) 
Instance details

Defined in Bluefin.Internal.Examples

Associated Types

type Rep (FileSystem es) 
Instance details

Defined in Bluefin.Internal.Examples

type Rep (FileSystem es) = D1 ('MetaData "FileSystem" "Bluefin.Internal.Examples" "bluefin-internal-0.3.4.0-9GrTj2GQiLd7ycEThQMiPM" 'False) (C1 ('MetaCons "MkFileSystem" 'PrefixI 'True) (S1 ('MetaSel ('Just "readFileImpl") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (FilePath -> Eff es String)) :*: S1 ('MetaSel ('Just "writeFileImpl") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (FilePath -> String -> Eff es ()))))

Methods

from :: FileSystem es -> Rep (FileSystem es) x #

to :: Rep (FileSystem es) x -> FileSystem es #

Generic (Maybe a) 
Instance details

Defined in GHC.Generics

Associated Types

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)))

Methods

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

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

Generic (Solo a) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Solo a)

Since: base-4.15

Instance details

Defined in GHC.Generics

type Rep (Solo a) = D1 ('MetaData "Solo" "GHC.Tuple.Prim" "ghc-prim" 'False) (C1 ('MetaCons "MkSolo" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

Methods

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

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

Generic [a] 
Instance details

Defined in GHC.Generics

Associated Types

type Rep [a]

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Methods

from :: [a] -> Rep [a] x #

to :: Rep [a] x -> [a] #

Generic (Either a b) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Either a b)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

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)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

type Rep (Proxy t) = D1 ('MetaData "Proxy" "Data.Proxy" "base" 'False) (C1 ('MetaCons "Proxy" 'PrefixI 'False) (U1 :: Type -> Type))

Methods

from :: Proxy t -> Rep (Proxy t) x #

to :: Rep (Proxy t) x -> Proxy t #

Generic (U1 p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (U1 p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

type Rep (U1 p) = D1 ('MetaData "U1" "GHC.Generics" "base" 'False) (C1 ('MetaCons "U1" 'PrefixI 'False) (U1 :: 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)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep (V1 p) = D1 ('MetaData "V1" "GHC.Generics" "base" 'False) (V1 :: Type -> Type)

Methods

from :: V1 p -> Rep (V1 p) x #

to :: Rep (V1 p) x -> V1 p #

Generic (a, b) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Methods

from :: (a, b) -> Rep (a, b) x #

to :: Rep (a, b) x -> (a, b) #

Generic (Rec1 f p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Rec1 f p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

type Rep (Rec1 f p) = D1 ('MetaData "Rec1" "GHC.Generics" "base" 'True) (C1 ('MetaCons "Rec1" 'PrefixI 'True) (S1 ('MetaSel ('Just "unRec1") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f p))))

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)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep (URec (Ptr ()) p) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UAddr" 'PrefixI 'True) (S1 ('MetaSel ('Just "uAddr#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UAddr :: 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)

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)))

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)

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)))

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) 
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)))

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)

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)))

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)

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)))

Methods

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

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

Generic (OneWayCoercibleHandle a es) 
Instance details

Defined in Bluefin.Internal

Associated Types

type Rep (OneWayCoercibleHandle a es) 
Instance details

Defined in Bluefin.Internal

type Rep (OneWayCoercibleHandle a es) = D1 ('MetaData "OneWayCoercibleHandle" "Bluefin.Internal" "bluefin-internal-0.3.4.0-9GrTj2GQiLd7ycEThQMiPM" 'True) (C1 ('MetaCons "MkOneWayCoercibleHandle" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (a es))))
Generic (a, b, c) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Methods

from :: (a, b, c) -> Rep (a, b, c) x #

to :: Rep (a, b, c) x -> (a, b, c) #

Generic ((f :*: g) p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep ((f :*: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

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)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

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)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

type Rep (K1 i c p) = D1 ('MetaData "K1" "GHC.Generics" "base" 'True) (C1 ('MetaCons "K1" 'PrefixI 'True) (S1 ('MetaSel ('Just "unK1") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 c)))

Methods

from :: K1 i c p -> Rep (K1 i c p) x #

to :: Rep (K1 i c p) x -> K1 i c p #

Generic (BracketBase bodyRes r a es) 
Instance details

Defined in Bluefin.Internal.Exception

Associated Types

type Rep (BracketBase bodyRes r a es) 
Instance details

Defined in Bluefin.Internal.Exception

type Rep (BracketBase bodyRes r a es) = D1 ('MetaData "BracketBase" "Bluefin.Internal.Exception" "bluefin-internal-0.3.4.0-9GrTj2GQiLd7ycEThQMiPM" 'False) (C1 ('MetaCons "MkBracketBase" 'PrefixI 'True) ((S1 ('MetaSel ('Just "acquire") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Eff es r)) :*: S1 ('MetaSel ('Just "normalRelease") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (r -> bodyRes -> Eff es a))) :*: (S1 ('MetaSel ('Just "unknownExceptionRelease") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (r -> Eff es ())) :*: S1 ('MetaSel ('Just "body") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (r -> Eff es bodyRes)))))

Methods

from :: BracketBase bodyRes r a es -> Rep (BracketBase bodyRes r a es) x #

to :: Rep (BracketBase bodyRes r a es) x -> BracketBase bodyRes r a es #

Generic (a, b, c, d) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Methods

from :: (a, b, c, d) -> Rep (a, b, c, d) x #

to :: Rep (a, b, c, d) x -> (a, b, c, d) #

Generic ((f :.: g) p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep ((f :.: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

type Rep ((f :.: g) p) = D1 ('MetaData ":.:" "GHC.Generics" "base" 'True) (C1 ('MetaCons "Comp1" 'PrefixI 'True) (S1 ('MetaSel ('Just "unComp1") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f (g p)))))

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)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

type Rep (M1 i c f p) = D1 ('MetaData "M1" "GHC.Generics" "base" 'True) (C1 ('MetaCons "M1" 'PrefixI 'True) (S1 ('MetaSel ('Just "unM1") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f p))))

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 (a, b, c, d, e) 
Instance details

Defined in GHC.Generics

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 (a, b, c, d, e, f) 
Instance details

Defined in GHC.Generics

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 (a, b, c, d, e, f, g) 
Instance details

Defined in GHC.Generics

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

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 (a, b, c, d, e, f, g, h, i) 
Instance details

Defined in GHC.Generics

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

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

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)

Since: base-4.16.0.0

Instance details

Defined in GHC.Generics

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)

Since: base-4.16.0.0

Instance details

Defined in GHC.Generics

type Rep (a, b, c, d, e, f, g, h, i, j, k, l, m) = D1 ('MetaData "Tuple13" "GHC.Tuple.Prim" "ghc-prim" 'False) (C1 ('MetaCons "(,,,,,,,,,,,,)" 'PrefixI 'False) (((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 c))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 d) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 e) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 f)))) :*: ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 g) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 h) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 i))) :*: ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 j) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 k)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 l) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 m))))))

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)

Since: base-4.16.0.0

Instance details

Defined in GHC.Generics

type Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n) = D1 ('MetaData "Tuple14" "GHC.Tuple.Prim" "ghc-prim" 'False) (C1 ('MetaCons "(,,,,,,,,,,,,,)" 'PrefixI 'False) (((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 c))) :*: ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 d) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 e)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 f) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 g)))) :*: ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 h) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 i) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 j))) :*: ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 k) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 l)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 m) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 n))))))

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)

Since: base-4.16.0.0

Instance details

Defined in GHC.Generics

type Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) = D1 ('MetaData "Tuple15" "GHC.Tuple.Prim" "ghc-prim" 'False) (C1 ('MetaCons "(,,,,,,,,,,,,,,)" 'PrefixI 'False) (((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 c))) :*: ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 d) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 e)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 f) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 g)))) :*: (((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 h) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 i)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 j) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 k))) :*: ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 l) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 m)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 n) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 o))))))

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

Other functions for compound effects

makeOp :: forall (e :: Effects) r. Eff (e :& e) r -> Eff e r #

Used to define dynamic effects.

useImpl :: forall (e :: Effects) (es :: Effects) r. e :> es => Eff e r -> Eff es r #

Used to define dynamic effects.

useImplUnder #

Arguments

:: forall (e :: Effects) (es :: Effects) (e1 :: Effects) r. e :> es 
=> Eff (e1 :& e) r 
-> Eff (e1 :& es) r

͘

Like useImpl

useImplIn #

Arguments

:: forall (e :: Effects) (es :: Effects) t r. e :> es 
=> (t -> Eff (es :& e) r) 
-> t 
-> Eff es r

͘

Used to define handlers of compound effects.

Deprecated

Do not use. Will be removed in a future version.

data Compound (e1 :: Effects -> Type) (e2 :: Effects -> Type) (ss :: Effects) #

runCompound #

Arguments

:: forall e1 (s1 :: Effects) e2 (s2 :: Effects) (es :: Effects) r. e1 s1 
-> e2 s2

͘

-> (forall (es' :: Effects). Compound e1 e2 es' -> Eff (es' :& es) r) 
-> Eff (s1 :& (s2 :& es)) r 

withCompound #

Arguments

:: forall h1 h2 (e :: Effects) (es :: Effects) r. e :> es 
=> Compound h1 h2 e 
-> (forall (e1 :: Effects) (e2 :: Effects). (e1 :> es, e2 :> es) => h1 e1 -> h2 e2 -> Eff es r)

͘

-> Eff es r 

useImplWithin #

Arguments

:: forall (e :: Effects) (es :: Effects) t (e1 :: Effects) r. e :> es 
=> (t -> Eff (e1 :& e) r) 
-> t 
-> Eff (e1 :& es) r

͘

Deprecated. Use useImplUnder instead.