You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is mostly satisfactory — but has the disadvantage of not producing a compiler error. If defining several new functions at once, it is easy to forget to go back and fill it in.
Describe the solution you'd like
It would be nice to have the option to define the function as a typed hole — so something like:
= [ ("Define " <> sig
, [TextEdit (Range nextLineP nextLineP) (T.unlines ["", sig, name <> " = error \"not implemented\""])]
+ )+ , ("Define " <> sig <> " as typed hole"+ , [TextEdit (Range nextLineP nextLineP) (T.unlines ["", sig, name <> " = _"])]
)]
This would provide an easy way to reduce the number of code errors. It also provides a better UX: in my editor (Emacs), for instance, it would let me jump to and from the new function using flycheck-next-error etc.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
At the moment, the ‘Define <function>’ code action is hardcoded to produce
name <> " = error \"not implemented\""
as the body of the function:haskell-language-server/ghcide/src/Development/IDE/Plugin/CodeAction.hs
Lines 683 to 685 in 65a8512
This is mostly satisfactory — but has the disadvantage of not producing a compiler error. If defining several new functions at once, it is easy to forget to go back and fill it in.
Describe the solution you'd like
It would be nice to have the option to define the function as a typed hole — so something like:
This would provide an easy way to reduce the number of code errors. It also provides a better UX: in my editor (Emacs), for instance, it would let me jump to and from the new function using
flycheck-next-error
etc.The text was updated successfully, but these errors were encountered: