@@ -132,8 +132,15 @@ elabData info syn doc argDocs fc opts (PDatadecl n t_in dcons)
132132 -- them for repeated arguments
133133
134134 findParams :: [Type] -> [Int]
135− findParams ts = let allapps = concatMap getDataApp ts in
136− paramPos allapps
135+ findParams ts = let allapps = map getDataApp ts
136+ -- do each constructor separately, then merge the results (names
137+ -- may change between constructors)
138+ conParams = map paramPos allapps in
139+ inAll conParams
140+
141+ inAll :: [[Int]] -> [Int]
142+ inAll [] = []
143+ inAll (x : xs) = filter (\p -> all (\ps -> p `elem` ps) xs) x
137144
138145 paramPos [] = []
139146 paramPos (args : rest)