
mapM conT :: [Name] -> Q [Type] :: [Name] -> Q [Pred] :: [Name] -> CxtQ Those `Name`s are Class names, which are Type constructors, hence `conT` Christiaan On 04/12/2016 10:17 AM, Erik de Castro Lopo wrote:
Erik Hesselink wrote:
That function does exist for me in rc2:
cxt :: [PredQ] -> CxtQ
Ah, there is it is!
But I'm trying to write code that works with ghc-7.10 *and* ghc-8.0 (yes, I'm using CPP in all its ugly glory), but if I've got code that works with ghc-7.10 (the first type signature below):
- dataD :: CxtQ -> Name -> [TyVarBndr] -> [ConQ] -> [Name] -> DecQ + dataD :: CxtQ -> Name -> [TyVarBndr] -> Maybe Kind -> [ConQ] -> CxtQ -> DecQ
how do I convert it to the second? Adding a `Nothing` for the `Maybe Kind` argument is easy, but if the old code has `[Name]`, how do I convert it to a `CxtQ`. The `cxt` function won't do it.
Erik