stackless is now covariant
This commit is contained in:
parent
3ff695d815
commit
f6e04d75ba
@ -1,21 +1,27 @@
|
|||||||
# Concerns (questions) with the current implementaion
|
# Concerns (questions) with the current implementaion
|
||||||
|
|
||||||
## There exist alternative `Functor` implementations
|
## There exist alternative `Functor` implementations
|
||||||
|
|
||||||
See the [relevant subchapter](./s01-alternatives.md)
|
See the [relevant subchapter](./s01-alternatives.md)
|
||||||
|
|
||||||
## ~~It might be better to have a per-lifetime trait for `Functor`s~~ done
|
## ~~It might be better to have a per-lifetime trait for `Functor`s~~ done
|
||||||
|
|
||||||
See the [relevant subchapter](./s02-lifetimes.md)
|
See the [relevant subchapter](./s02-lifetimes.md)
|
||||||
|
|
||||||
## `Stackless` is kind of bad
|
## `Stackless` is kind of bad
|
||||||
|
|
||||||
See the [relevant subchapter](./s03-stackless.md)
|
See the [relevant subchapter](./s03-stackless.md)
|
||||||
|
|
||||||
## `WeakFunctor<'a>` is not (yet) covariant over the lifetime `'a`
|
## `WeakFunctor<'a>` is not (yet) covariant over the lifetime `'a`
|
||||||
|
|
||||||
See the [relevant subchapter](./s04-covariance.md)
|
See the [relevant subchapter](./s04-covariance.md)
|
||||||
|
|
||||||
## `Fail`/`FailMonad`/etc. have unclear semantics
|
## `Fail`/`FailMonad`/etc. have unclear semantics
|
||||||
|
|
||||||
See the [relevant subchapter](./s05-fail.md)
|
See the [relevant subchapter](./s05-fail.md)
|
||||||
|
|
||||||
## Is `FutureInstance` actually feasible?
|
## Is `FutureInstance` actually feasible?
|
||||||
|
|
||||||
Todo: measure `futures::join` performance.
|
Todo: measure `futures::join` performance.
|
||||||
|
|
||||||
## Can `WeakFunctor` be an associated type of a `Functor` instead of its supertype?
|
## Can `WeakFunctor` be an associated type of a `Functor` instead of its supertype?
|
||||||
|
@ -44,6 +44,7 @@ fn fmap<'a, T: Functor<'a>, A: 'a + Clone, B: 'a + Clone>(
|
|||||||
## `Clone`-`FnMut` category functors
|
## `Clone`-`FnMut` category functors
|
||||||
|
|
||||||
We view use of `FnMut` for category's morphisms as somewhat controversial[^e].
|
We view use of `FnMut` for category's morphisms as somewhat controversial[^e].
|
||||||
|
|
||||||
* Use of direct/indirect mutable references is, arguably, counter-functional[^e].
|
* Use of direct/indirect mutable references is, arguably, counter-functional[^e].
|
||||||
* `Clone+FnMut` is, generally, nonsensical[^e].
|
* `Clone+FnMut` is, generally, nonsensical[^e].
|
||||||
* Due to that, morphisms category isn't a subcategory, so can't be wrapped.
|
* Due to that, morphisms category isn't a subcategory, so can't be wrapped.
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
# Making lifetimes a parameter of a trait instead of that of the GAT
|
# Making lifetimes a parameter of a trait instead of that of the GAT
|
||||||
|
|
||||||
Current:
|
Current:
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
pub trait WeakFunctorAny {
|
pub trait WeakFunctorAny {
|
||||||
type F<'a, A: 'a>: 'a
|
type F<'a, A: 'a>: 'a
|
||||||
|
@ -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`
|
Current hypothesis is that this comes from `EvalTree<'a>` being invariant over `'a`
|
||||||
due to `FnOnce` being invariant over its output,
|
due to `FnOnce` being invariant over its output,
|
||||||
|
@ -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)~~
|
||||||
|
Loading…
Reference in New Issue
Block a user