[GHC] #15247: Use empty types for TTG extension constructors

GHC ghc-devs at haskell.org
Fri Jun 8 21:04:32 UTC 2018


#15247: Use empty types for TTG extension constructors
-------------------------------------+-------------------------------------
        Reporter:  adamgundry        |                Owner:  (none)
            Type:  task              |               Status:  new
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Compiler          |              Version:  8.5
      Resolution:                    |             Keywords:  TTG
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Shayan-Najd):

 Hi Adam,

 Take a look at [wiki:ImplementingTreesThatGrow/TreesThatGrowGuidance],
 there we use the "standard" empty type `Void` and its eliminator `absurd`
 from `Data.Void`.

 Currently, TTG does not fully follow the guidelines as the extension
 constructors are barely used. I will soon have a pass over the current TTG
 implementation and fix it to match the guidelines.

 As we used `NoExt` instead of `()`, we can possibly use a GHC-Specific
 empty datatype instead of `Void`.

 Is there anything else that I may be missing?

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


More information about the ghc-tickets mailing list