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
3838 case dcs of
3939 [] -> throwError $ GoalMismatch " destruct" g
4040 _ -> for dcs $ \ dc -> do
41- let args = dataConInstArgTys dc apps
41+ let args = dataConInstOrigArgTys dc apps
4242 names <- mkManyGoodNames hy args
4343
4444 let pat :: Pat GhcPs
Original file line number Diff line number Diff line change @@ -93,6 +93,7 @@ tests = testGroup
9393 , goldenTest " GoldenEitherHomomorphic.hs" 2 15 Auto " "
9494 , goldenTest " GoldenNote.hs" 2 8 Auto " "
9595 , goldenTest " GoldenPureList.hs" 2 12 Auto " "
96+ , goldenTest " GoldenGADTDestruct.hs" 7 17 Destruct " gadt"
9697 ]
9798
9899
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