Module { } stdlib/bhc-concurrent/hs/BHC/Control/Concurrent/Scope.hs Scope Types data Scope { } # Scope { scopeId :: !Int, scopeTasks :: ![Task ()] } data Task a { } # Task { taskId :: !Int, taskResult :: !(IORef (Maybe (Either SomeException a))) } A handle to a spawned task. data Cancelled { } # Cancelled Exception thrown when a task is cancelled. Instances instance Exception Cancelled { }