Ticket #7148 (new bug)
generalized newtype and type families is unsound
| Reported by: | carter | Owned by: | simonpj |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.8.1 |
| Component: | Compiler (Type checker) | Version: | 7.6.1-rc1 |
| Keywords: | Cc: | ||
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | None/Unknown | Difficulty: | Unknown |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
the code from http://joyoftypes.blogspot.com/2012/08/generalizednewtypederiving-is.html type checks in the release candidate
also see discussion here http://www.reddit.com/r/haskell/comments/y8kca/generalizednewtypederiving_is_very_very_unsafe/
(punch line: the generalized newtype deriving + type families or gadts allows users to write unsafeCoerce etc)
perhaps a simple near term solution is to have any module using generalized new type deriving be inferred to be unsafe by default?
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

