classP recently deleted from TH.Lib

Gabor Greif ggreif at gmail.com
Mon May 12 14:12:24 UTC 2014


The last two commits from (Apr 9) on

<https://github.com/ghc/packages-template-haskell/commits/master/Language/Haskell/TH/Lib.hs>

removed a helper to construct applied type class constraints (`classP`).

Some packages (notably `llvm-general-pure`) though, depend on it.

Can we add back something like this:

{{{
classP :: Name -> [Q Type] -> Q Pred
classP cla tys
  = do
      tysl <- sequence tys
      return (foldl' AppT (ConT cla) tysl)
}}}

and export it again? Or is there such a helper with a different name already?

Cheers,

    Gabor


More information about the ghc-devs mailing list