oldk1331 wrote:
>
> A small problem to think about:
>
> Maybe Maybe Integer
>
> Should 't1 := wrap(failed()$Maybe Integer)' equal to
> 't2 := failed()$Maybe Maybe Integer'
>
> Logically speaking, 'failed?(t1)' is false because t1 is
> a Maybe(Integer) valued being wrapped. And 'failed?(t2)'
> is true so they are not equal.
>
> Current implementation of Maybe and Union("failed",...)
> both think 't1=t2' is true.
>
> Again, I think this is a small problem, because
> 1. there's no point of using Maybe(Maybe(XXX)).
> 2. thinking "failed" as a universal thing is understandable.
There is a big problem:
1) Union(X, "failed") may be used as representation for type
that from outside does not look like Union. Such type
may be used in another Union. When you convert to Maybe
you end up with Maybe(Maybe(...)) as representation.
ATM Union(X, "failed") is probably not used in any existing
domain, but OnePointCompletion uses Union(R, "infinity")
as representation. Arguably you should be able to
replace Union(R, "infinity") by Maybe(R).
2) For correctness we need to distinguish between inner domain
and outer domain.
--
Waldek Hebisch
--
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.