graninas / Hydra

Hydra is a full-fledged framework for building web services, multithreaded and concurrent applications with SQL and KV DB support.
BSD 3-Clause "New" or "Revised" License
193 stars 13 forks source link

Add "EvalSafely" method #16

Open graninas opened 4 years ago

graninas commented 4 years ago

Implement EvalSafely method.

The method should allow to run a scenario safely. If the scenario throws exception (using throwException or error), the method's interpreter should catch the exception and return the control flow into the scenario.

data LangF next where
  EvalSafely :: LangL a -> (Either Error a -> next) -> LangF next