We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a0ff5eb commit 3009f11Copy full SHA for 3009f11
src/Data/Maybe/Unsafe.js
@@ -0,0 +1,8 @@
1
+/* global exports */
2
+"use strict";
3
+
4
+// module Data.Maybe.Unsafe
5
6
+exports.unsafeThrow = function (msg) {
7
+ throw new Error(msg);
8
+};
src/Data/Maybe/Unsafe.purs
@@ -9,3 +9,6 @@ import Data.Maybe
9
-- | runtime.
10
fromJust :: forall a. Maybe a -> a
11
fromJust (Just x) = x
12
+fromJust Nothing = unsafeThrow "Data.Maybe.Unsafe.fromJust called on Nothing"
13
14
+foreign import unsafeThrow :: forall a. String -> a
0 commit comments