-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Catch errors thrown from pure computations. -- -- Takes an error-throwing expression and puts it back in the Maybe it -- belongs in. @package spoon @version 0.2 -- | Two functions for catching pureish exceptions in pure values. This -- library considers pureish to be any error call or undefined, failed -- pattern matches, arithmetic exceptions, and array bounds exceptions. module Control.Spoon -- | Evaluate a value to normal form and return Nothing if any exceptions -- are thrown during evaluation. For any error-free value, spoon = -- Just. spoon :: (NFData a) => a -> Maybe a -- | Like spoon, but only evaluates to WHNF. teaspoon :: a -> Maybe a