Skip to content

Commit

Permalink
Fix TypeWildcardProvider for latest GHC
Browse files Browse the repository at this point in the history
- Handle modified error message format generated by GHC 9.6.*
- Use latest GHC in `branch` tests
  • Loading branch information
EduardSergeev committed May 19, 2024
1 parent 15a5e79 commit 8949694
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:

- name: Set up GHC environment
run: |
echo "resolver: ghc-9.4.5" > stack.yaml
echo "packages: []" >> stack.yaml
# echo "resolver: ghc-9.4.5" > stack.yaml
# echo "packages: []" >> stack.yaml
stack setup
- run: npm install
Expand Down
2 changes: 1 addition & 1 deletion src/features/typeWildcardProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default class TypeWildcardProvider implements CodeActionProvider {
}

const line = document.lineAt(diagnostic.range.start);
if(fill === "()") {
if(fill === "()" || fill == "() :: Constraint") {
fill = "";
const wilcardMatch = line.text.match(/_\s*=>\s*/) || line.text.match(/,\s*_\s*/) || line.text.match(/\s*_\s*,/);
if(wilcardMatch) {
Expand Down

0 comments on commit 8949694

Please sign in to comment.