• Ryan Scott's avatar
    Make unboxedTuple{Type,Data}Name support 0- and 1-tuples · 9550b8d8
    Ryan Scott authored
    Previously, these functions were hardcoded so as to always `error`
    whenever given an argument of 0 or 1. This restriction can be lifted
    pretty easily, however.
    
    This requires a slight tweak to `isBuiltInOcc_maybe` in `TysWiredIn` to
    allow it to recognize `Unit#` (which is the hard-wired `OccName` for
    unboxed 1-tuples).
    
    Fixes #12977.
    
    Test Plan: make test TEST=12977
    
    Reviewers: austin, goldfire, bgamari
    
    Reviewed By: bgamari
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2847
    
    GHC Trac Issues: #12977
    9550b8d8
all.T 18.3 KB