stackless is now covariant

This commit is contained in:
AF 2023-09-25 00:40:37 +00:00
parent 3ff695d815
commit f6e04d75ba
5 changed files with 12 additions and 4 deletions

View File

@ -1,21 +1,27 @@
# Concerns (questions) with the current implementaion
## There exist alternative `Functor` implementations
See the [relevant subchapter](./s01-alternatives.md)
## ~~It might be better to have a per-lifetime trait for `Functor`s~~ done
See the [relevant subchapter](./s02-lifetimes.md)
## `Stackless` is kind of bad
See the [relevant subchapter](./s03-stackless.md)
## `WeakFunctor<'a>` is not (yet) covariant over the lifetime `'a`
See the [relevant subchapter](./s04-covariance.md)
## `Fail`/`FailMonad`/etc. have unclear semantics
See the [relevant subchapter](./s05-fail.md)
## Is `FutureInstance` actually feasible?
Todo: measure `futures::join` performance.
## Can `WeakFunctor` be an associated type of a `Functor` instead of its supertype?

View File

@ -44,6 +44,7 @@ fn fmap<'a, T: Functor<'a>, A: 'a + Clone, B: 'a + Clone>(
## `Clone`-`FnMut` category functors
We view use of `FnMut` for category's morphisms as somewhat controversial[^e].
* Use of direct/indirect mutable references is, arguably, counter-functional[^e].
* `Clone+FnMut` is, generally, nonsensical[^e].
* Due to that, morphisms category isn't a subcategory, so can't be wrapped.

View File

@ -1,6 +1,7 @@
# Making lifetimes a parameter of a trait instead of that of the GAT
Current:
```rust
pub trait WeakFunctorAny {
type F<'a, A: 'a>: 'a

View File

@ -1,4 +1,4 @@
# `Stackless<'a>` isn't covariant
# ~~`Stackless<'a>` isn't covariant~~ Fixed
Current hypothesis is that this comes from `EvalTree<'a>` being invariant over `'a`
due to `FnOnce` being invariant over its output,

View File

@ -1,5 +1,5 @@
**`CovariantFunctor` was deleted.**
# **`CovariantFunctor` was deleted**
## Specific case: `Stackless<'a>` isn't covariant
## ~~Specific case: `Stackless<'a>` isn't covariant~~
See the [relevant subchapter](s03-stackless.md)
~~See the [relevant subchapter](s03-stackless.md)~~