RosettaCodeData/Task/Assertions/Haskell/assertions.hs

6 lines
184 B
Haskell
Raw Permalink Normal View History

2013-04-09 00:46:50 -07:00
import Control.Exception
main = let a = someValue in
assert (a == 42) -- throws AssertionFailed when a is not 42
somethingElse -- what to return when a is 42