Skip to content

Commit 3a5befe

Browse files
committed
Use unsafePerformEff inside unsafeThrowException
1 parent e75a4c1 commit 3a5befe

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@
2020
"package.json"
2121
],
2222
"dependencies": {
23-
"purescript-eff": "^0.1.0"
23+
"purescript-eff": "^0.1.2"
2424
}
2525
}

src/Control/Monad/Eff/Exception/Unsafe.purs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ import Control.Monad.Eff.Exception
88
-- | Throw an exception in pure code. This function should be used very
99
-- | sparingly, as it can cause unexpected crashes at runtime.
1010
unsafeThrowException :: forall a. Error -> a
11-
unsafeThrowException = unsafeRunEff <<< throwException
12-
where
13-
unsafeRunEff :: forall e b. Eff e b -> b
14-
unsafeRunEff = runPure <<< unsafeInterleaveEff
11+
unsafeThrowException = unsafePerformEff <<< throwException
1512

1613
-- | Defined as `unsafeThrowException <<< error`.
1714
unsafeThrow :: forall a. String -> a

0 commit comments

Comments
 (0)