acme-safe-0.1.0.0: Safe versions of some infamous haskell functions such as fromJust

Safe HaskellSafe-Inferred
LanguageHaskell2010

Acme.Safe

Synopsis

Documentation

safeFromJust :: Maybe a -> Maybe a Source

Safely extract a value from a Just

safeFromLeft :: Either a b -> Either a b Source

Safely extract a value from a Left

safePerformIO :: IO a -> Maybe (IO ()) Source

Safely doesn't perform IO with the help of acme-dont. Side-effects-free!

safeTrace :: String -> a -> Maybe (IO ()) Source

Doesn't print the provided debug string. But it's 100% safe!

safeCoerce :: a -> Maybe b Source

Safely converts a value from any type to any other type.