I have taken a look on these papers at

    http://www.cl.cam.ac.uk/~ajk13/
    http://ftp.cs.chalmers.se/users/pub/rittri/dimpolyrec.ps.Z


But I discovered, that there is one important difference to the C++ example
I posted. The type system is extended to allow inference of deimensions. The
C++ version does not need extensions specific to dimensions. The language
features already present (templates) allow this without extending the
language.

I think there is no way to add compile time dimension checking (and many
other similar things) in Haskell. May be Haskell 2 should contain an
extended type system, that allows that. I am not firm with depended types.
Perhaps that's the way do such things.

Cheers,
Herbert


Reply via email to