Hoogle Search

Within LTS Haskell 8.12 (ghc-8.0.2)

  1. package Workflow

    Workflow patterns over a monad for thread state logging & recovery Transparent support for interruptible computations. A workflow can be seen as a persistent thread that executes a monadic computation. Therefore, it can be used in very time consuming computations such are CPU intensive calculations or procedures that are most of the time waiting for the action of a process or an user, that are prone to communication failures, timeouts or shutdowns. It also can be used if you like to restart your program at the point where the user left it last time . . The computation can be restarted at the interrupted point thanks to its logged state in permanent storage. The thread state is located in files by default. It can be moved and continued in another computer. Besides that, the package also provides other higher level services associated to workflows: Workflow patterns, and a general configuration utility, workflow observation events and references to the internal state. The state can be stored maintaining memory references (using the RefSerialize package), so that it is possible to track the modifications of a big structure (for example a document) along the workflow execution. See Control.Workflow for details In this release: * Adaptation for MonadMask instance introduced in the package exceptions-0.6

  2. module Control.Workflow

    A workflow can be seen as a persistent thread. The workflow monad writes a log that permit to restore the thread at the interrupted point. step is the (partial) monad transformer for the Workflow monad. A workflow is defined by its name and, optionally by the key of the single parameter passed. There primitives for starting workflows also restart the interrupted workflow when it has been in execution previously. A small example that print the sequence of integers in te console if you interrupt the progam, when restarted again, it will start from the last printed number

    module Main where
    import Control.Workflow
    import Control.Concurrent(threadDelay)
    import System.IO (hFlush,stdout)
    
    mcount n= do step $  do
    putStr (show n ++ " ")
    hFlush stdout
    threadDelay 1000000
    mcount (n+1)
    return () -- to disambiguate the return type
    
    main= exec1  "count"  $ mcount (0 :: Int)
    
    >>> runghc demos\sequence.hs
    >0 1 2 3
    >CTRL-C Pressed
    
    >>> runghc demos\sequence.hs
    >3 4 5 6 7
    >CTRL-C Pressed
    
    >>> runghc demos\sequence.hs
    >7 8 9 10 11
    ...
    
    The program restart at the last saved step. As you can see, some side effect can be re-executed after recovery if the log is not complete. This may happen after an unexpected shutdown (in this case) or due to an asynchronous log writing policy. (see syncWrite) When the step results are big and complex, use the Data.RefSerialize package to define the (de)serialization instances The log size will be reduced. showHistory` method will print the structure changes in each step. If instead of RefSerialize, you use read and show instances, there will be no reduction. but still it will work, and the log will be readable for debugging purposes. The RefSerialize istance is automatically derived from Read, Show instances. Data.Binary instances are also fine for serialization. To use Binary, just define a binary instance of your data by using showpBinary and readpBinary. Within the RefSerialize instance of a structure, you can freely mix Show,Read RefSerialize and Data Binary instances. Control.Workflow.Patterns contains higher level workflow patterns for handling multiple workflows Control.Workflow.Configuration permits the use of workflows for configuration purposes

  3. type Workflow m = WF Stat m

    Workflow Control.Workflow

    No documentation available.

  4. type WorkflowList m a b = Map String (a -> Workflow m b)

    Workflow Control.Workflow

    No documentation available.

  5. data WorkflowExecution

    amazonka-swf Network.AWS.SWF

    Represents a workflow execution. See: workflowExecution smart constructor.

  6. WorkflowExecutionCancelRequested :: EventType

    amazonka-swf Network.AWS.SWF

    No documentation available.

  7. data WorkflowExecutionCancelRequestedCause

    amazonka-swf Network.AWS.SWF

    No documentation available.

  8. data WorkflowExecutionCancelRequestedEventAttributes

    amazonka-swf Network.AWS.SWF

    Provides details of the WorkflowExecutionCancelRequested event. See: workflowExecutionCancelRequestedEventAttributes smart constructor.

  9. WorkflowExecutionCanceled :: EventType

    amazonka-swf Network.AWS.SWF

    No documentation available.

  10. data WorkflowExecutionCanceledEventAttributes

    amazonka-swf Network.AWS.SWF

    Provides details of the WorkflowExecutionCanceled event. See: workflowExecutionCanceledEventAttributes smart constructor.

Page 1 of many | Next