[GHC] #10716: Metadata in GHC.Generic should give access to strictness annotation

GHC ghc-devs at haskell.org
Fri Jul 31 08:09:07 UTC 2015


#10716: Metadata in GHC.Generic should give access to strictness annotation
-------------------------------------+-------------------------------------
              Reporter:  StefanWehr  |             Owner:
                  Type:  feature     |            Status:  new
  request                            |
              Priority:  normal      |         Milestone:
             Component:  Compiler    |           Version:  7.10.2
              Keywords:              |  Operating System:  Unknown/Multiple
          Architecture:              |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
             Test Case:              |        Blocked By:
              Blocking:              |   Related Tickets:
Differential Revisions:              |
-------------------------------------+-------------------------------------
 Currently, the metadata in the GHC.Generics module do not give access to
 the strictness annotations attached to a field of a datatype. It would be
 great if this piece of information could be added.

 Background: we are using a class FullyStrict for ensuring that a datatype
 is fully strict (in the sense that all fields have bang patterns and the
 types of all fields are also fully strict). Currently we are using
 TemplateHaskell to derive the instances automatically. The TemplateHaskell
 function also checks that all fields have bang patterns.

 To improve compilation speed, I would like to derive the instances with
 DeriveGeneric. But this is not possible because then I cannot implement
 the check whether all fields have bang patterns.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10716>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list