Skip to content
  • Simon Peyton Jones's avatar
    Template Haskell: allow type splices · 389cca21
    Simon Peyton Jones authored
    At last!  Trac #1476 and #3177
    
    This patch extends Template Haskell by allowing splices in
    types.  For example
    
      f :: Int -> $(burble 3)
    
    A type splice should work anywhere a type is expected.  This feature
    has been long requested, and quite a while ago I'd re-engineered the
    type checker to make it easier, but had never got around to finishing
    the job.  With luck, this does it.
    
    There's a ToDo in the HsSpliceTy case of RnTypes.rnHsType, where I
    am not dealing properly with the used variables; but that's awaiting
    the refactoring of the way we report unused names.
    
    
    389cca21