Skip to content
  • Simon Peyton Jones's avatar
    Refactor TcExpr.tcSeq · aab3c6d1
    Simon Peyton Jones authored
    The function TcExpr.tcSeq seemed much longer that is really
    justifiable; and was set to get worse with the fix to Trac #15242.
    
    This patch refactors the special cases for function applications,
    so that the special case for 'seq' can use the regular tcFunApp,
    which makes the code both clearer and shorter.  And smooths the
    way for #15242.
    
    The special case for 'tagToEnum#' is even more weird and ad-hoc,
    so I refrained from meddling iwth it for now.
    
    I also combined HsUtils.mkHsAppType and mkHsAppTypeOut, so that
    I could have a single 'wrapHsArgs' function, thereby fixing a
    ToDo from Alan Zimmerman.  That means tha tmkHsAppType now has
    an equality predicate, but I guess that's fair enough.
    aab3c6d1