forked from haskell/haskell-language-server
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wingman: Ensure homomorphic destruct covers all constructors in the d…
…omain (haskell#1968) * Ensure homomorphism covers the entire codomain * Add tests * Add the same logic to lambda case homomorphism Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information
Showing
6 changed files
with
148 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
plugins/hls-tactics-plugin/test/golden/ProviderHomomorphism.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{-# LANGUAGE GADTs #-} | ||
{-# LANGUAGE LambdaCase #-} | ||
|
||
data GADT a where | ||
B1 :: GADT Bool | ||
B2 :: GADT Bool | ||
Int :: GADT Int | ||
Var :: GADT a | ||
|
||
|
||
hasHomo :: GADT Bool -> GADT a | ||
hasHomo g = _ | ||
|
||
cantHomo :: GADT a -> GADT Int | ||
cantHomo g = _ | ||
|
||
hasHomoLam :: GADT Bool -> GADT a | ||
hasHomoLam = _ | ||
|
||
cantHomoLam :: GADT a -> GADT Int | ||
cantHomoLam = _ | ||
|