Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/b97fe60cdbb21924c25cce7ed90135314021a620

>---------------------------------------------------------------

commit b97fe60cdbb21924c25cce7ed90135314021a620
Author: Simon Peyton Jones <[email protected]>
Date:   Tue Aug 2 10:44:31 2011 +0100

    Comments only

>---------------------------------------------------------------

 compiler/typecheck/TcTyClsDecls.lhs |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/compiler/typecheck/TcTyClsDecls.lhs 
b/compiler/typecheck/TcTyClsDecls.lhs
index 031ffdf..c0998de 100644
--- a/compiler/typecheck/TcTyClsDecls.lhs
+++ b/compiler/typecheck/TcTyClsDecls.lhs
@@ -776,7 +776,14 @@ is working over (say) GHC souce files.
 Note [Recursive unboxing]
 ~~~~~~~~~~~~~~~~~~~~~~~~~
 Be careful not to try to unbox this!
-       data T = MkT !T Int
+       data T = MkT {-# UNPACK #-} !T Int
+Reason: consider
+  data R = MkR {-# UNPACK #-} !S Int
+  data S = MkS {-# UNPACK #-} !Int
+The representation arguments of MkR are the *representation* arguments
+of S (plus Int); the rep args of MkS are Int#.  This is obviously no
+good for T, because then we'd get an infinite number of arguments.
+
 But it's the *argument* type that matters. This is fine:
        data S = MkS S !Int
 because Int is non-recursive.



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to