diff options
| author | Marc Sunet <jeannekamikaze@gmail.com> | 2012-08-30 21:00:38 +0200 |
|---|---|---|
| committer | Marc Sunet <jeannekamikaze@gmail.com> | 2012-08-30 21:00:38 +0200 |
| commit | 420a8ced13e3cc16644d3a96260c8fdd3168be67 (patch) | |
| tree | b48f6d8b6b2215dca80a3f4e60c6ab11ecec551f | |
| parent | 2f1848cb872419628bdf3180d337661de8a6d98e (diff) | |
assertMaybe returns the value wrapped in the Just
| -rw-r--r-- | Spear/Setup.hs | 4 |
1 files 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 | |||
| 54 | 54 | ||
| 55 | 55 | ||
| 56 | -- | Throw the given error string if given 'Nothing'. | 56 | -- | Throw the given error string if given 'Nothing'. |
| 57 | assertMaybe :: Maybe a -> String -> Setup () | 57 | assertMaybe :: Maybe a -> String -> Setup a |
| 58 | assertMaybe Nothing err = setupError err | 58 | assertMaybe Nothing err = setupError err |
| 59 | assertMaybe _ _ = return () | 59 | assertMaybe (Just x) _ = return x |
