[GHC] #7627: Space in nullary unboxed tuples

GHC cvs-ghc at haskell.org
Tue Feb 5 13:36:25 CET 2013


#7627: Space in nullary unboxed tuples
-----------------------------+----------------------------------------------
Reporter:  monoidal          |          Owner:                  
    Type:  bug               |         Status:  new             
Priority:  normal            |      Component:  Compiler        
 Version:  7.6.1             |       Keywords:                  
      Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
 Failure:  None/Unknown      |      Blockedby:                  
Blocking:                    |        Related:                  
-----------------------------+----------------------------------------------

Comment(by parcs):

 What are the consequences of changing the OccName of the unit unboxed
 tuple from (##) to (# #) ? e.g.

 {{{
 diff --git a/compiler/basicTypes/OccName.lhs
 b/compiler/basicTypes/OccName.lhs
 index afdde7c..dc7bf0a 100644
 --- a/compiler/basicTypes/OccName.lhs
 +++ b/compiler/basicTypes/OccName.lhs
 @@ -821,7 +821,7 @@ mkTupleOcc ns sort ar = OccName ns (mkFastString str)
         -- no need to cache these, the caching is done in the caller
         -- (TysWiredIn.mk_tuple)
      str = case sort of
 -               UnboxedTuple    -> '(' : '#' : commas ++ "#)"
 +               UnboxedTuple    -> "(#" ++ (if null commas then " " else
 commas) ++ "#)"
                 BoxedTuple      -> '(' : commas ++ ")"
                  ConstraintTuple -> '(' : commas ++ ")"
                    -- Cute hack: reuse the standard tuple OccNames (and
 hence code)
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7627#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the ghc-tickets mailing list