diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 61ed5d4..4136395 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,5 +1,6 @@ { "recommendations": [ - "rust-lang.rust-analyzer" + "rust-lang.rust-analyzer", + "yzhang.markdown-all-in-one" ] } \ No newline at end of file diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md index a754f25..4ecbca9 100644 --- a/book/src/SUMMARY.md +++ b/book/src/SUMMARY.md @@ -5,3 +5,4 @@ - [Background](./ch01/s00-background.md) - [Implementation](./ch02/s00-implementation.md) - [Usage]() +- [Current Implementation Concerns](./ch04/s00-concerns.md) diff --git a/book/src/ch04/s00-concerns.md b/book/src/ch04/s00-concerns.md new file mode 100644 index 0000000..0fbe150 --- /dev/null +++ b/book/src/ch04/s00-concerns.md @@ -0,0 +1,32 @@ +# Concerns (questions) with the current implementaion + +## Can `WeakFunctor` be an associated type of a `Functor` instead of its supertype? + +## `Clone`-`FnMut` category functors + +## `Copy`-`Fn` category functors + +## `WeakFunctor::F<'a, A>` is not (yet) covariant over the lifetime `'a`. + +### Specific case: `Stackless<'a>` isn't covariant. +Current hypothesis is that this comes from `EvalTree<'a>` being invariant over `'a` +due to `FnOnce` being invariant over its output, +which in turn comes from present typesysten limitations. + +## It might be better to have a per-lifetime trait for `Functor`s. + +Current: +```rust +pub trait WeakFunctor { + type F<'a, A: 'a>: 'a + where + Self: 'a; +} +``` + +Proposed: +```rust +pub trait WeakFunctor<'a>: 'a { + type F: 'a; +} +```