#3626: Template Haskell silently boxes tuples
-----------------------------+----------------------------------------------
Reporter:  rl                |          Owner:                  
    Type:  bug               |         Status:  new             
Priority:  normal            |      Component:  Template Haskell
 Version:  6.10.4            |       Severity:  normal          
Keywords:                    |       Testcase:                  
      Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
-----------------------------+----------------------------------------------
 Here is a small program:

 {{{
 {-# LANGUAGE TemplateHaskell, UnboxedTuples #-}
 module T where

 $(id [d| f g x = case g x of (# _, _ #) -> x |])
 }}}

 Output of `ghci -ddump-splices`:

 {{{
   f g[aR4] x[aR5] = case g[aR4] x[aR5] of { (_, _) -> x[aR5] }
 }}}

 Note how the tuple has been silently converted to a boxed one. TH
 shouldn't accept this program since it can't deal with unboxed tuples.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3626>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to