15 Aug 2012 05:39
#7148: generalized newtype and type families is unsound
GHC <cvs-ghc <at> haskell.org>
2012-08-15 03:39:33 GMT
2012-08-15 03:39:33 GMT
#7148: generalized newtype and type families is unsound
------------------------------+---------------------------------------------
Reporter: carter | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 7.6.1-rc1 | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: None/Unknown | Testcase:
Blockedby: | Blocking:
Related: |
------------------------------+---------------------------------------------
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?
--
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7148>
RSS Feed