{-# OPTIONS_GHC -frefinement-level-hole-fits=1 #-}
module HF where
data M = MI Int | MC Char
f :: M
f = _a
And looking at the hole _a will suggest the following code actions:
replace hole `_a` with where id
replace hole `_a` with id (_
replace hole `_a` with where MC
replace hole `_a` with MC (_
replace hole `_a` with where MI
replace hole `_a` with MI (_
replace hole `_a` with f
where the code action on e.g. the third will replace the hole with where MC and on the fourth with where MC (_, which aren't valid (and the braces aren't even closed in the second case!)
I suspect this has to do with the parsing of the hole fits.
Compiling
And looking at the hole
_a
will suggest the following code actions:where the code action on e.g. the third will replace the hole with
where MC
and on the fourth withwhere MC (_
, which aren't valid (and the braces aren't even closed in the second case!)I suspect this has to do with the parsing of the hole fits.