Skip to content

Error/NonDet and threads #364

Description

@torgeirsh

Consider this contrived example:

withEffToIO (ConcUnlift Ephemeral Unlimited) $ \unliftIO -> forkIO (unliftIO empty)

Since the Error and NonDet effects are implemented with the ErrorWrapper exception, and exceptions aren't automatically propagated to the parent thread in Haskell, the example just prints "Effectful.Error.Static.ErrorWrapper: Effectful.NonDet.ErrorEmpty" along with a call stack, and continues execution. One could argue that it's the user's responsibility to catch and re-throw exceptions, but one could also argue that it's an internal implementation detail in Effectful, especially since the ErrorWrapper type isn't exported. Would it be better if the use of ConcUnlift implied automatic propagation of ErrorWrapper exceptions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions