[Haskell-cafe] Call for discussion: OverloadedLists extension
simonpj at microsoft.com
Tue Sep 25 10:01:06 CEST 2012
| Here at the University of Tübingen, I am co-supervising (together with
| Jeroen Weijers) a student project implementing the OverloadedLists
| extension for GHC. Achim Krause is the student who is working on the
| project. We took into consideration earlier discussions on this topic
| [1,2] before embarking on the project.
| Achim has worked on two approaches.
Your second approach is this:
| singleton x `mappend` singleton y `mappend` singleton z ;
This approach is not good for long literal lists, because you get tons of executable code where the user thought he was just defining a data structure. And long literal lists are an important use-case.
One other possibility is to use a variant of what GHC does for literal strings. Currently
where "foo"# is a statically allocate C string, and the "unpackCString" unpacks it lazily.
Maybe we could make a literal [a,b.c] turn into
is a statically-allocated vector? See http://hackage.haskell.org/trac/ghc/ticket/5218, which is stalled awaiting brain cycles from someone.
I'm maxed out at the moment. I'd be very happy if you guys were able to make progress; I'm happy to advise. Open a ticket, start a wiki page, etc!
More information about the Haskell-Cafe