
8 Aug
2013
8 Aug
'13
1:36 p.m.
For my pattern-synonyms branch (see prev. email) I had to write the following function, incl. making TcValidity.fvTypes public: tcInstTypes :: [TcType] -> TcM [TcType] tcInstTypes tys = do { let tvs = fvTypes tys ; (_, _, subst) <- tcInstTyVars tvs ; return $ map (substTy subst) tys } I'm surprised I had to write this myself, and this made me wonder if there's a much better way to handle cases where I have some kind of definition which has some inferred type, and then various use sites of that definition must all have types that can be unified with this original inferred type. Is there? Thanks, Gergo