Ticket #3916 (closed bug: fixed)
incorrect kind inference in template haskell
It looks like a foldl needs to be changed to a foldr somewhere in the code that translates results from GHC's kind inference to the Template Haskell Kind data type.
Given this data declaration:
data F f a = F (f a a a a)
the kind ascribed to f, as provided in the Info data structure resultant of reifying F, is
(((* -> *) -> *) -> *) -> *