Skip to content

Commit

Permalink
Add coercion to normal error
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanMartinez committed Jul 20, 2023
1 parent f78d827 commit c1b8e37
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Node/Errors/SystemError.purs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module Node.Errors.SystemError
( SystemError
, toError
, address
, code
, dest
Expand All @@ -17,11 +18,15 @@ import Prelude
import Data.Function.Uncurried (Fn2, runFn2)
import Data.Maybe (Maybe)
import Data.Nullable (Nullable, toMaybe)
import Effect.Exception (Error)
import Foreign (Foreign)
import Unsafe.Coerce (unsafeCoerce)

foreign import data SystemError :: Type

toError :: SystemError -> Error
toError = unsafeCoerce

instance Show SystemError where
show = unsafeCoerce

Expand Down

0 comments on commit c1b8e37

Please sign in to comment.