id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,os,architecture,failure,difficulty,testcase,blockedby,blocking,related
4936,Unbox sum types without fields,tibbe,,"In the new I/O manager we use newtyped `Int`s instead of an ADT to squeeze out every drop of performance GHC can give us. It's a bit unfortunate that we have to make a choice between performance and safety here. Using an ADT have many benefits. For example, all possible values are grouped together neatly under the data type and the compiler can make sure we check all possible cases in case statements.

Pointer tagging helps quite a bit here, if you have fewer than 4 (or 8) constructors. If you have more you don't get the benefit.

Given a simple sum type like this:

{{{
data Color = Red | Green | Blue | Yellow
}}}

change its representation to an `Int`, allowing it to be unboxed into data types.
",feature request,closed,normal,,Compiler,7.0.1,duplicate,,johan.tibell@…,Unknown/Multiple,Unknown/Multiple,None/Unknown,,,,,
