[GHC] #1311: newtypes of unboxed types disallowed - documentation
bug and/or feature request
GHC
trac at galois.com
Sun Apr 29 13:32:19 EDT 2007
#1311: newtypes of unboxed types disallowed - documentation bug and/or feature
request
---------------------------+------------------------------------------------
Reporter: Isaac Dupree | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.6.1
Severity: normal | Keywords:
Difficulty: Unknown | Os: Unknown
Testcase: | Architecture: Unknown
---------------------------+------------------------------------------------
Tested in 6.6.1 and today's 6.7 (which claims to be version 6.7.20070418),
{{{newtype FastBool = FastBool Int#}}}
doesn't work. However this is not documented in the unboxed-types
documentation in the User's Guide that lists similar restrictions
http://www.haskell.org/ghc/docs/latest/html/users_guide/primitives.html
Similarly (maybe), in phantom type arguments, even in GADTs where kind
inference could be at work
{{{data Boo a where Boo :: Int# -> Boo Int#}}}
doesn't work.
I tried {{{newtype ( FastBool :: # ) = ...}}} , and {{{data Boo ( a :: # )
where...}}} , which just confused GHC.
Is there a reason that coercions of unlifted types shouldn't work, or is
it just unimplemented? (inspired by looking at GHC's
compiler/utils/FastTypes.lhs and thinking that using newtypes instead of
type synonyms in places like that would improve type-safety)
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1311>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
-------------- next part --------------
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs at haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
More information about the Glasgow-haskell-bugs
mailing list