Skip to content
  • Simon Peyton Jones's avatar
    Allow ($) to return an unlifted type (Trac #8739) · 5dd1cbbf
    Simon Peyton Jones authored
    Since ($) simply returns its result, via a tail call, it can
    perfectly well have an unlifted result type; e.g.
        foo $ True    where  foo :: Bool -> Int#
    should be perfectly fine.
    
    This used to work in GHC 7.2, but caused a Lint failure.  This patch
    makes it work again (which involved removing code in TcExpr), but fixing
    the Lint failure meant I had to make ($) into a wired-in Id.  Which
    is not hard to do (in MkId).
    5dd1cbbf