Template Haskell silently boxes tuples
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.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.10.4 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Template Haskell |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |