File tree 4 files changed +6
-2
lines changed
4 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -161,6 +161,7 @@ mostSpecificSpan span z
161
161
162
162
------------------------------------------------------------------------------
163
163
-- | Convert an HsVar back into an HsUnboundVar if it isn't actually in scope.
164
+ -- TODO(sandy): this will throw away the type >:(
164
165
holify :: Bindings -> LHsExpr GhcTc -> LHsExpr GhcTc
165
166
holify (Bindings _ local) v@ (L span (HsVar _ (L _ var))) =
166
167
case M. lookup span local of
Original file line number Diff line number Diff line change @@ -37,11 +37,13 @@ import Ide.LocalBindings
37
37
import qualified Language.Haskell.LSP.Types as J
38
38
import Language.Haskell.LSP.Types
39
39
40
+ import Data.List (intercalate )
40
41
import OccName
41
42
import HsExpr
42
43
import GHC
43
44
import DynFlags
44
45
import Type
46
+ import System.IO
45
47
46
48
47
49
descriptor :: PluginId -> PluginDescriptor
@@ -233,6 +235,7 @@ tacticCmd :: (OccName -> TacticsM ()) -> CommandFunction TacticParams
233
235
tacticCmd tac _lf state (TacticParams uri range var_name)
234
236
| Just nfp <- uriToNormalizedFilePath $ toNormalizedUri uri = do
235
237
(pos, _, jdg) <- judgmentForHole state nfp range
238
+ hPutStrLn stderr $ intercalate " ; " $ fmap (\ (occ, CType ty) -> occNameString occ <> " :: " <> render unsafeGlobalDynFlags ty) $ Map. toList $ jHypothesis jdg
236
239
pure $
237
240
case runTactic
238
241
unsafeGlobalDynFlags
Original file line number Diff line number Diff line change @@ -224,6 +224,6 @@ buildDataCon hy dc apps = do
224
224
(HsVar NoExt $ noLoc $ Unqual $ nameOccName $ dataConName dc)
225
225
$ fmap unLoc sgs
226
226
227
- render :: Outputable ( LHsExpr pass ) => DynFlags -> LHsExpr pass -> String
227
+ render :: Outputable a => DynFlags -> a -> String
228
228
render dflags = showSDoc dflags . ppr
229
229
Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ auto = (intro >> auto)
122
122
123
123
124
124
autoIfPossible :: TacticsM () -> TacticsM ()
125
- autoIfPossible t = t >> ( solve auto <!> pure () )
125
+ autoIfPossible t = ( t >> solve auto) <!> t
126
126
127
127
128
128
one :: TacticsM ()
You can’t perform that action at this time.
0 commit comments