Closed Drezil closed 8 years ago
note: core-example of the generated code is in the commit-msg of https://github.com/mikeizbicki/subhask/pull/57/commits/619baeeee974b74f59a4fa342e6714b4571aa67a
Nice job getting this to work! I'm very pleased :)
It would be really nice if the test suite could automatically verify things are getting fused, but I have no idea how to make that happen in a reasonable way.
(And sorry for the delay in reviewing this. My sister got married last week so I've been away.)
I added
(!~)
and(%~)
to IxContainer with default-implementation viaimap
.Added streaming/recycling-framework - but GHC only inlines monomorphic functions so there has to be a specialized version of stream/unstream and clone/new with the rules according to the concrete functions.
This is ugly, but works for now.
Addition of
(//)
for setting multiple elements will be in a seperate pull-request and will be implemented via repeated calls to(!~)
for Vectors (O(k) with k <= n) and some kind of sort+imap for the default implementation (O(n)).