[Haskell-cafe] Diving into the records swamp (possible GSoC project)

Aleksandar Dimitrov aleks.dimitrov at gmail.com
Fri Apr 26 17:49:07 CEST 2013


Slightly, off-topic, but just because I've been spending my last couple of days
trying to shoehorn an inheritance-based subytping type system into Haskell
(without full OO-power, so no methods or mutable state.)

> Oleg/Ralf's HList paper covers all the ground for first-class records. It 
> depends heavily on overlaps, which is why the NewAxioms stuff would work 
> in really well.

I've been kicking around the idea of re-implementing HList on the basis of the
new DataKinds [1] extension. I don't know if there'd be much of a need for that,
though. More generally, I'm wondering what can be done on extensible records and
inheritance-based type systems with FC-pro under one's belt…

Here's one thing I don't like about the "current" way HList-based extensible
record are represented (and used in OOHaskell [2]): the access time is linear in
the number of records a certain type has. Somehow just the thought of "reorder
the records in your constructors to make your program go faster" makes me cringe
a little. Oleg and Ralf do hint at implementing some binary search tree based
technique to alleviate the problem, but I have no idea how to go about it,
except extending the compiler.

~ A.

References

[1] Yorgey, Brent A., et al. "Giving Haskell a promotion." Proceedings of the
8th ACM SIGPLAN workshop on Types in language design and implementation. ACM,
2012.
[2] Kiselyov, Oleg, and Ralf Lämmel. "Haskell's overlooked object system." arXiv
preprint cs/0509027 (2005).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130426/3b564e65/attachment.pgp>


More information about the Haskell-Cafe mailing list