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
bindIP val k = (unsafeCoerce (MagicIP@name k) ::a->r) val
Using GHC 9.4 or later, however, we can instead implement this using withDict. This is safer to use, results in cleaner Core, and will be future-proof against future changes to "newtype classes" that are being considered here.
Instead of `unsafeCoerce`, we can use the more recent `withDict` primitive
from `GHC.Exts`. Among other benefits, this is more likely to be future-proof
against possible changes to GHC's representation of "newtype classes" in the
future.
Fixes#165.
Instead of `unsafeCoerce`, we can use the more recent `withDict` primitive
from `GHC.Exts`. Among other benefits, this is more likely to be future-proof
against possible changes to GHC's representation of "newtype classes" in the
future.
Fixes#165.
Instead of `unsafeCoerce`, we can use the more recent `withDict` primitive
from `GHC.Exts`. Among other benefits, this is more likely to be future-proof
against possible changes to GHC's representation of "newtype classes" in the
future.
Fixes#165.
Currently,
bindIP
is implemented usingunsafeCoerce
:th-desugar/Language/Haskell/TH/Desugar/Util.hs
Lines 433 to 434 in d87ea56
Using GHC 9.4 or later, however, we can instead implement this using
withDict
. This is safer to use, results in cleaner Core, and will be future-proof against future changes to "newtype classes" that are being considered here.See goldfirere/singletons#490 and ekmett/reflection#44 for related issues.
The text was updated successfully, but these errors were encountered: