Skip to content

Commit 2be03cc

Browse files
TOTBWFisovectorwz1000
authored
Implement 'Attempt to fill hole' code action (#431)
* [WIP] Start work on 'auto' * Get current binding * Fix currentBindingName for class methods * Proper impl of getDefiningBindings * Forgot to checkin bindsites * [WIP] Update version of refinery * Bind all tyvars if possible * WIP: Instantiate polymorphic functions * Split out fresh type variables when instantiating * Make everything compile * Separate out tactics * oneWayUnifyRule * [WIP] Add 'TacticState' * [WIP] Tweak 'unify' and 'unifyOneWayRule' * [WIP] Start work on skolem tracking * [WIP] Fix 'checkSkolemUnification' * Update judgement type * Add a Context to TacticM * Don't destruct already destructed * Remove the internal lib * Cleanup warnings * Move debug machinery into *.Debug * Rip types out of machinery * Cleanup warnings * Continue splitting Machinery * Rip out GHC and Naming * Get it all compiling * Stop re-exporting from Machinery * Split out codegen/rules * Remove gross/unused tactics * Make newSubgoal derive from an existing judgement * remove newJudgement * Disallow current function from auto * Cleanup auto * Stop using the Judgement ctor * Track pattern value * Better showAstData * Get module-scoped funcs * Split all data constructors * assumption -> assume * Don't destruct if there are zero datacons * Lambda case destruct tactics * Fix the tests * Rip out debug stuff since it fails CI * Tests for lambda case actions * Golden testing machinery * Attempt to fill hole * [WIP] Use 'refinery-0.2.0.0' * [WIP] Update refinery in all stack.yaml files * Bump version in cabal file * Bump cabal index state * Sort goals by heuristic * Naming for unit types * Heuristic for auto * Penalize holes more * Naming for unit types * Give the name "unit" to units * Fallback names for symbols and punctuation * Get "good" name for symbolic names * Update plugins/tactics/src/Ide/Plugin/Tactic/CodeGen.hs Co-authored-by: wz1000 <[email protected]> * Make the TacticState strict * Make the judgement strict * Simplify when we use position mapping * Move bindsites to ghcide Co-authored-by: Sandy Maguire <[email protected]> Co-authored-by: wz1000 <[email protected]>
1 parent 9f13e8f commit 2be03cc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1192
-531
lines changed

cabal.project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ package ghcide
2020

2121
write-ghc-environment-files: never
2222

23-
index-state: 2020-09-23T17:24:43Z
23+
index-state: 2020-09-30T21:52:43Z
2424

2525
allow-newer: data-tree-print:base

ghcide

haskell-language-server.cabal

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ library
8080
executable haskell-language-server
8181
import: agpl, common-deps
8282
main-is: Main.hs
83-
hs-source-dirs: exe plugins/default/src
83+
hs-source-dirs: exe plugins/default/src plugins/tactics/src
8484
other-modules:
8585
Ide.Plugin.Eval
8686
Ide.Plugin.Example
@@ -93,9 +93,17 @@ executable haskell-language-server
9393
Ide.Plugin.Retrie
9494
Ide.Plugin.StylishHaskell
9595
Ide.Plugin.Tactic
96-
Ide.Plugin.Tactic.Types
96+
Ide.Plugin.Tactic.CodeGen
97+
Ide.Plugin.Tactic.Context
98+
Ide.Plugin.Tactic.Debug
99+
Ide.Plugin.Tactic.GHC
100+
Ide.Plugin.Tactic.Judgements
97101
Ide.Plugin.Tactic.Machinery
102+
Ide.Plugin.Tactic.Naming
103+
Ide.Plugin.Tactic.Range
98104
Ide.Plugin.Tactic.Tactics
105+
Ide.Plugin.Tactic.Types
106+
Ide.Plugin.Tactic.TestTypes
99107
Ide.TreeTransform
100108

101109
ghc-options:
@@ -147,8 +155,9 @@ executable haskell-language-server
147155
, transformers
148156
, unordered-containers
149157
, ghc-source-gen
150-
, refinery
158+
, refinery >=0.2.0.0
151159
, ghc-exactprint
160+
, fingertree
152161

153162
if flag(agpl)
154163
build-depends: brittany
@@ -237,7 +246,8 @@ test-suite func-test
237246
, tasty-golden
238247
, tasty-rerun
239248

240-
hs-source-dirs: test/functional plugins/default/src
249+
hs-source-dirs: test/functional plugins/tactics/src
250+
241251
main-is: Main.hs
242252
other-modules:
243253
Command
@@ -258,7 +268,7 @@ test-suite func-test
258268
Symbol
259269
TypeDefinition
260270
Tactic
261-
Ide.Plugin.Tactic.Types
271+
Ide.Plugin.Tactic.TestTypes
262272

263273
ghc-options:
264274
-Wall -Wno-name-shadowing -threaded -rtsopts -with-rtsopts=-N

plugins/default/src/Ide/Plugin/Tactic/Machinery.hs

Lines changed: 0 additions & 264 deletions
This file was deleted.

0 commit comments

Comments
 (0)