Wildcards in HsTypes

Alan & Kim Zimmerman alan.zimm at gmail.com
Sat Oct 21 15:59:54 UTC 2017

It seems to me that HsWildCardInfo is unnecessary.

It is defined as

newtype HsWildCardInfo pass      -- See Note [The wildcard story for types]
    = AnonWildCard (PostRn pass (Located Name))
      -- A anonymous wild card ('_'). A fresh Name is generated for
      -- each individual anonymous wildcard during renaming

And only ever used in

data HsType pass
  | HsWildCardTy (HsWildCardInfo pass)

Why not just do

  | HsWildCardTy  (PostRn pass (Located Name))


Am I missing something?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20171021/e340823f/attachment.html>

More information about the ghc-devs mailing list