From 420a8ced13e3cc16644d3a96260c8fdd3168be67 Mon Sep 17 00:00:00 2001 From: Marc Sunet Date: Thu, 30 Aug 2012 21:00:38 +0200 Subject: assertMaybe returns the value wrapped in the Just --- Spear/Setup.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Spear/Setup.hs b/Spear/Setup.hs index e7917cf..0326c4b 100644 --- a/Spear/Setup.hs +++ b/Spear/Setup.hs @@ -54,6 +54,6 @@ setupIO = MT.lift . MT.lift -- | Throw the given error string if given 'Nothing'. -assertMaybe :: Maybe a -> String -> Setup () +assertMaybe :: Maybe a -> String -> Setup a assertMaybe Nothing err = setupError err -assertMaybe _ _ = return () +assertMaybe (Just x) _ = return x -- cgit v1.2.3