Hi all, I'm writing a tool that needs to figure out if a type parameter declared on the type constructor (i.e. tcdTyVars DataDecl) is referenced by any of the fields (in the tcdDataDefn). I only care about ConDeclH98 things.
Is there a canonical way to do this that doesn't involve me having to traverse the HsType ? In an ideal world I want this signature: HsType -> [HsTyVarBndr GhcPs] -> Bool PS: I think this is probably done in the DeriveFunctor (etc) derivation rules, because they need to figure out which fields to touch, e.g. in gen_Functor_binds, but I don't see where this check would be done. Best regards, Tseen She
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs