forked from haskell/haskell-language-server
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathAuto.hs
28 lines (24 loc) · 748 Bytes
/
Auto.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
module Wingman.Auto where
import Control.Monad.State (gets)
import Refinery.Tactic
import Wingman.Context
import Wingman.Judgements
import Wingman.KnownStrategies
import Wingman.Machinery (tracing)
import Wingman.Tactics
import Wingman.Types
------------------------------------------------------------------------------
-- | Automatically solve a goal.
auto :: TacticsM ()
auto = do
jdg <- goal
skolems <- gets ts_skolems
current <- getCurrentDefinitions
traceMX "goal" jdg
traceMX "ctx" current
traceMX "skolems" skolems
commit knownStrategies
. tracing "auto"
. localTactic (auto' 4)
. disallowing RecursiveCall
$ fmap fst current