#5499: Tagging constructors with record/product phantom type
--------------------------------+-------------------------------------------
  Reporter:  basvandijk         |          Owner:                  
      Type:  feature request    |         Status:  closed          
  Priority:  normal             |      Milestone:                  
 Component:  libraries (other)  |        Version:  7.2.1           
Resolution:  wontfix            |       Keywords:                  
  Testcase:                     |      Blockedby:                  
Difficulty:                     |             Os:  Unknown/Multiple
  Blocking:                     |   Architecture:  Unknown/Multiple
   Failure:  None/Unknown       |  
--------------------------------+-------------------------------------------
Changes (by basvandijk):

  * status:  new => closed
  * resolution:  => wontfix


Comment:

 I
 
[https://github.com/basvandijk/aeson/commit/4ee946745573ad4a6da2416e612cd4b94929d36c
 solved it] using both Pedro's `IsRecord` type-level predicate and the
 technique from Simon and Oleg for
 [http://www.haskell.org/haskellwiki/GHC/AdvancedOverlap choosing an
 instance based on a context].

 Although the solution requires some advanced techniques and some extra
 language extensions, I'm happy about it. I also managed to keep the change
 local (only the instance for constructors has changed).

 A tag on [http://www.haskell.org/ghc/docs/latest/html/libraries/ghc-
 prim-0.2.0.0/GHC-Generics.html#t:C C] would make all of this a lot easier
 and doesn't require as much type-level computation. But it would mean
 changing GHC which may not be worth it. So I'm closing the ticket as
 `wontfix`.

 Pedro and Simon, much thanks for your help!

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5499#comment:9>
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