• Vladislav Zavialov's avatar
    Factor out HsSCC/HsCoreAnn/HsTickPragma into HsPragE · 6985e0fc
    Vladislav Zavialov authored
    This is a refactoring with no user-visible changes (except for GHC API
    users). Consider the HsExpr constructors that correspond to user-written
      HsSCC         representing  {-# SCC ... #-}
      HsCoreAnn     representing  {-# CORE ... #-}
      HsTickPragma  representing  {-# GENERATED ... #-}
    We can factor them out into a separate datatype, HsPragE. It makes the
    code a bit tidier, especially in the parser.
    Before this patch:
      hpc_annot :: { Located ( (([AddAnn],SourceText),(StringLiteral,(Int,Int),(Int,Int))),
                             ) }
    After this patch:
      prag_hpc :: { Located ([AddAnn], HsPragE GhcPs) }
Code owners : Ben Gamari
Expr.hs 109 KB