diff options
-rw-r--r-- | Spear.lkshw | 2 | ||||
-rw-r--r-- | Spear/Setup.hs | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/Spear.lkshw b/Spear.lkshw index 2dd5288..f062526 100644 --- a/Spear.lkshw +++ b/Spear.lkshw | |||
@@ -1,7 +1,7 @@ | |||
1 | Version of workspace file format: | 1 | Version of workspace file format: |
2 | 1 | 2 | 1 |
3 | Time of storage: | 3 | Time of storage: |
4 | "Thu Aug 30 20:54:09 CEST 2012" | 4 | "Thu Aug 30 20:57:58 CEST 2012" |
5 | Name of the workspace: | 5 | Name of the workspace: |
6 | "Spear" | 6 | "Spear" |
7 | File paths of contained packages: | 7 | File paths of contained packages: |
diff --git a/Spear/Setup.hs b/Spear/Setup.hs index cfe379c..e7917cf 100644 --- a/Spear/Setup.hs +++ b/Spear/Setup.hs | |||
@@ -8,6 +8,7 @@ module Spear.Setup | |||
8 | , runSetup_ | 8 | , runSetup_ |
9 | , setupError | 9 | , setupError |
10 | , setupIO | 10 | , setupIO |
11 | , assertMaybe | ||
11 | ) | 12 | ) |
12 | where | 13 | where |
13 | 14 | ||
@@ -50,3 +51,9 @@ setupError = MT.lift . throwError | |||
50 | -- | Lift the given IO action into the 'Setup' monad. | 51 | -- | Lift the given IO action into the 'Setup' monad. |
51 | setupIO :: IO a -> Setup a | 52 | setupIO :: IO a -> Setup a |
52 | setupIO = MT.lift . MT.lift | 53 | setupIO = MT.lift . MT.lift |
54 | |||
55 | |||
56 | -- | Throw the given error string if given 'Nothing'. | ||
57 | assertMaybe :: Maybe a -> String -> Setup () | ||
58 | assertMaybe Nothing err = setupError err | ||
59 | assertMaybe _ _ = return () | ||