You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Issue with updating purescript-partial to v0.14.0 #15
I noticed that this library is not included in the list for purescript/purescript#3942 I'm pretty sure it should be since it's part of the purescript org's repos.
Anyway, while working on it, I got this compiler error:
./compile.sh partial
[warn] WARNING: wasn't able to check if your package set import is frozen
[1/2 WarningParsingModule] .spago/partial/v2.0.1/src/Partial.purs:12:1
12 foreign import crashWith :: forall a. Partial => String -> a
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Constraints are deprecated in foreign imports and will be removed in a future release. Omit the constraint instead and update the foreign module accordingly.
[2/2 WarningParsingModule] .spago/partial/v2.0.1/src/Partial/Unsafe.purs:12:1
12 foreign import unsafePartial :: forall a. (Partial => a) -> a
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Constraints are deprecated in foreign imports and will be removed in a future release. Omit the constraint instead and update the foreign module accordingly.
Src Lib All
Warnings 0 2 2
Errors 0 0 0
[info] Build succeeded.
I don't know how else unsafePartial could be written without using a (Partial => a) in the FFI. Thoughts?
We can change it so the implementation is like other FFI situations we have - rename the foreign imports to _crashWith and _unsafePartial and drop the constraint from them, remove them from the exports, and then define exported values like unsafePartial = _unsafePartial, adding the constraint to those.
Activity
garyb commentedon Oct 4, 2020
We can change it so the implementation is like other FFI situations we have - rename the foreign imports to
_crashWithand_unsafePartialand drop the constraint from them, remove them from the exports, and then define exported values likeunsafePartial = _unsafePartial, adding the constraint to those.JordanMartinez commentedon Oct 8, 2020
Closed by #16