[Haskell-cafe] What features should an (fictitious) IDE for Haskell have?

Malte Brandy haskell-mail at maralorn.de
Tue Dec 8 00:34:05 UTC 2020


Dear André,

On 20-12-07 18:22, André Popovitch wrote:
> One feature I've always wanted would be able to "manually inline" a
> function. For example, if I have
> 
>     foo a = a + a
>     bar = foo 3
> 
> I'd like to be able to right-click on the invocation of `foo` and select
> some option to inline it, rewriting the file to read
> 
>     foo a = a + a
>     bar = 3 + 3
> 
> I think this would make it simple to dive into an abstraction to see what's
> really going on. For example, imagine a new user is confused by this
> expression:
> 
>    Just 3 >> Just 4
> 
> They could right-click on `>>` to see that it is identical to:
> 
>     case Just 3 of
>         Just _ -> Just 4
>         Nothing -> Nothing
> 
> 
> Which would allow them to easily see that this expression will always
> evaluate to "Just 4" (and hopefully simplify it). Enlightened, they could
> then hit ctrl-z to revert the code to its original state.
> 
> Haskell's purity and laziness makes it one of the only mainstream languages
> where equational reasoning is really possible, so this feature would play
> on Haskell's strengths and provide a feature that couldn't be replicated in
> other languages' IDEs. It would also allow new users to more easily dive in
> and understand certain abstractions (although how it would work in many
> cases would be hard to determine).

I guess it's worth pointing out, that haskell-language-server (via using
retrie) has this feature since a few months. (At least in principle. I
personally haven‘t tested it much. But it hasn‘t failed me yet.)
The same also holds true for quite a number of the other wishes voiced
here.

Regards,
maralorn
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20201208/682afb02/attachment.sig>


More information about the Haskell-Cafe mailing list