[GHC] #10048: {-# UNPACK #-} support for size-indexed types
GHC
ghc-devs at haskell.org
Fri Jan 30 20:08:15 UTC 2015
#10048: {-# UNPACK #-} support for size-indexed types
-------------------------------------+-------------------------------------
Reporter: dfeuer | Owner:
Type: feature request | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 7.11
Resolution: invalid | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: None/Unknown | Unknown/Multiple
Blocked By: | Test Case:
Related Tickets: | Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
Changes (by dfeuer):
* status: new => closed
* resolution: => invalid
Comment:
Replying to [comment:1 rwbarton]:
> How would we implement
>
> {{{
> hlength :: HList l -> Int
> hlength Nil = 0
> hlength (Cons _ xs) = 1 + hlength xs
> }}}
>
> then? (Bear in mind that we have no access to the type parameter `l` at
runtime.)
>
> I think this sort of thing could only work with a type family rather
than a GADT (and even then I haven't thought about whether it actually
could work).
Ah, you make a very good point.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10048#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list