> I'm almost sure that "Maybe" doesn't need special Haskell > compiler treatment, a user implemented "Maybe" can achieve > similar performance. Because "Maybe" is such a simple > structure, the compiler can optimize it right away, no > need to special treat it at all.
Apart from such optimizations... why do you want Maybe instead of Partial? (in axllib) https://github.com/pippijn/aldor/blob/master/aldor/lib/axllib/src/al/partial.as (or a bit more extended in the libaldor) https://github.com/pippijn/aldor/blob/master/aldor/lib/aldor/src/base/sal_partial.as Wouldn't that just be a question of naming? I somehow would like failed?(x) better than isNothing(x) or isJust(x). Anyway, I also like Partial/Maybe better than Union(X,"failed"). The Union(X,"failed") stuff is quite common in the FriCAS algebra library. It doesn't mean that one must replace Union(X, "error1", "error2") where two error cases are considered. But introducing Partial/Mabe could produce more readable code and would certainly make translating SPAD code to Aldor easier. Ralf -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/1995c1a1-3bc3-d46d-6ed8-4c70fddad3c2%40hemmecke.org.
