Constraint 1-tuple printed as `Solo` (requires TH)
When I say
{-# LANGUAGE TemplateHaskell #-}
module Bug where
import Language.Haskell.TH
refl :: $( return $ TupleT 1 `AppT` (ConT ''Eq `AppT` VarT ''a) ) => a -> Maybe
refl x = x == x
I get
Bug.hs:7:75: error:
• Expecting one more argument to ‘Maybe’
Expected a type, but ‘Maybe’ has kind ‘* -> *’
• In the type signature: refl :: (Solo Eq a) => a -> Maybe
There are two problems here:
-
Solo Eq a
would not parse into the AST that I built -- it should beSolo (Eq a)
. - What is
Solo
??
Now, I actually know the answer to (2): Solo
is the name of the 1-tuple. But it really shouldn't appear in the output here, as I thought constraint 1-tuples are dropped. My main problem is thus the appearance of Solo
here.