File tree Expand file tree Collapse file tree 4 files changed +16
-1
lines changed
plugins/tactics/src/Ide/Plugin/Tactic Expand file tree Collapse file tree 4 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ destructMatches f f2 t jdg = do
38
38
case dcs of
39
39
[] -> throwError $ GoalMismatch " destruct" g
40
40
_ -> for dcs $ \ dc -> do
41
- let args = dataConInstArgTys dc apps
41
+ let args = dataConInstOrigArgTys dc apps
42
42
names <- mkManyGoodNames hy args
43
43
44
44
let pat :: Pat GhcPs
Original file line number Diff line number Diff line change @@ -93,6 +93,7 @@ tests = testGroup
93
93
, goldenTest " GoldenEitherHomomorphic.hs" 2 15 Auto " "
94
94
, goldenTest " GoldenNote.hs" 2 8 Auto " "
95
95
, goldenTest " GoldenPureList.hs" 2 12 Auto " "
96
+ , goldenTest " GoldenGADTDestruct.hs" 7 17 Destruct " gadt"
96
97
]
97
98
98
99
Original file line number Diff line number Diff line change
1
+ {-# LANGUAGE GADTs #-}
2
+ module GoldenGADTDestruct where
3
+ data CtxGADT where
4
+ MkCtxGADT :: (Show a , Eq a ) => a -> CtxGADT
5
+
6
+ ctxGADT :: CtxGADT -> String
7
+ ctxGADT gadt = _decons
Original file line number Diff line number Diff line change
1
+ {-# LANGUAGE GADTs #-}
2
+ module GoldenGADTDestruct where
3
+ data CtxGADT where
4
+ MkCtxGADT :: (Show a, Eq a) => a -> CtxGADT
5
+
6
+ ctxGADT :: CtxGADT -> String
7
+ ctxGADT gadt = (case gadt of { (MkCtxGADT a) -> _ })
You can’t perform that action at this time.
0 commit comments