Hacker News new | ask | show | jobs
by wyager 3074 days ago
> see GeneralizedNewtypeDeriving, which is considered unsafe even though it used to be safe

This is wrong. GND plus TypeFamilies or some other extension in that vein used to be unsound when combined. It has since been fixed via the introduction of type roles.

> Composed atomic operations are not atomic.

Incidentally, Haskell also has this figured out via the STM monad.

1 comments

I hadn't heard about the advancement with Roles, but it seems that GND is still prohibited in "Safe Haskell"?
You’re probably reading an old document - this restriction was removed with the introduction of roles. https://downloads.haskell.org/~ghc/7.8.4/docs/html/users_gui...

Roles were introduced in 7.8.something, and GND was added to Safe.