Skip to content
  • Simon Peyton Jones's avatar
    [project @ 2002-01-28 16:52:37 by simonpj] · 0d62bdb2
    Simon Peyton Jones authored
    ----------------------
    	Zero-constructor types
    	----------------------
    
    If we have
    
    	data T
    	data S = MkS !T
    
    we were getting a crash in the compiler because ctrlRetConvAlg
    didn't know what to do for zero-constructor types.
    
    This fix arbitrarily says that they use a non-vectored return,
    which fixes the crash.  (Since they only have bottom values,
    the return never gets exercised, but GC and exception handling
    should work.)
    
    What is still unclear is how we handle data types that are defined
    with zero constructors in an hi-boot file.  I think that Bad Things
    may well happen if you do a 'seq' on them before we get up to the
    definition.  (e.g. as a result of this fix we'll say "unvectored"
    whereas the truth may be "vectored".)  This obviously doesn't happen
    much (because at present we'd get a compiler crash in ctrlRetConvAlg,
    but we should look into it.
    0d62bdb2