Skip to content

Commit 1f533bd

Browse files
committed
Excludes predicate types at once
1 parent 438f699 commit 1f533bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugins/tactics/src/Ide/Plugin/Tactic/CodeGen.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ destructMatches f f2 t jdg = do
5454
-- | Essentially same as 'dataConInstOrigArgTys' in GHC,
5555
-- but we need some tweaks in GHC >= 8.8.
5656
-- Since old 'dataConInstArgTys' seems working with >= 8.8,
57-
-- we just filter out non-class types in the result.
57+
-- we just filter out class dictionaries anc coercions from the result.
5858
dataConInstOrigArgTys' :: DataCon -> [Type] -> [Type]
5959
dataConInstOrigArgTys' con ty =
6060
let tys0 = dataConInstArgTys con ty
61-
in filter (maybe True (not . isClassTyCon) . tyConAppTyCon_maybe) tys0
61+
in filter (not . isPredTy) tys0
6262

6363
------------------------------------------------------------------------------
6464
-- | Combinator for performing case splitting, and running sub-rules on the

0 commit comments

Comments
 (0)