[Haskell-cafe] can Haskell do everyting as we want?

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Wed Aug 4 07:13:41 EDT 2010

Marc Weber <marco-oweber at gmx.de> writes:

> Excerpts from Ivan Lazar Miljenovic's message of Wed Aug 04 12:37:29 +0200 2010:
>> functionality in Emacs.
> I know - I patched the py backend for scion. I'm talking about:
>   node.getParent().getParent().<tab>Attributes["value"]
> Or (let's talk about a haskell example):
> pkgVersion $ package $ packageDescription
> It feels unnatural to complete this. How should this be done?
> I know that you can define your own .dot. operator, so that you can
> write it in (let's call it Java style):
> packageDescription .dot. package .dot. pkgVersion

I don't get the point of this ".dot." operator (which isn't even a valid

> Without completion I have to get the type of packageDescription, then
> follow the structure until I find Version. Using tags and Vim that's
> fast. Still completion is a lot faster.

Not really following your example here: you want something to write your
code for you and read your mind to know what that code should be?

My understanding of tab-completion in IDEs for Java, etc. is that it
just displayed every single possible class method for a particular
object value, and then did some kind of matching based upon what you
typed to narrow down the list, not that it was type-based.

> I'm not talking about the universal "put everything in scope" completion
> thing - eg which Vim provides for some languages. I'm talking about
> really helpful context sensitive completion. I know its pretty hard to
> get this hard for Haskell - because type is determined by things you
> use. But the example I gave above is one which could be implemented
> easily.

How is it easy?  How would this mythical completer know which function
to use?

Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com

More information about the Haskell-Cafe mailing list