1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Module gated by "legacy" feature in src/lib.rs
//! # Legacy Implementations
//!
//! This module contains the older, "classic" implementations of functional
//! programming traits that were used before the HKT (Higher-Kinded Types)
//! refactor. These are provided for backward compatibility or reference
//! and are only compiled if the `legacy` feature is enabled.
//!
//! To use these, enable the `legacy` feature in your `Cargo.toml`:
//! ```toml
//! # Cargo.toml
//! # [dependencies]
//! # monadify = { version = "0.1.0", features = ["legacy"] }
//! ```
//!
//! Then, you can access them via their respective paths, e.g.:
//! `use monadify::legacy::functor::Functor as LegacyFunctor;`
/// Legacy `Applicative` trait and implementations.
/// Legacy `Apply` trait and implementations.
/// Legacy `Functor` trait and implementations.
/// Legacy `Identity` monad implementation.
/// Legacy `Monad` and `Bind` traits and implementations.
/// Legacy monad transformers, e.g., `ReaderT`.
// This will contain the legacy reader module
// Optional: Re-export legacy traits/structs with a `Legacy` prefix
// to avoid name clashes if both HKT (default) and legacy items are in scope.
// Example:
// pub use functor::Functor as LegacyFunctor;
// pub use apply::Apply as LegacyApply;
// pub use applicative::Applicative as LegacyApplicative;
// pub use monad::{Bind as LegacyBind, Monad as LegacyMonad};
// pub use identity::Identity as LegacyIdentity;
// pub use transformers::reader::ReaderT as LegacyReaderT;
// pub use transformers::reader::Reader as LegacyReader;
// pub use transformers::reader::MonadReader as LegacyMonadReader;
// For now, users will access them via full path like `monadify::legacy::functor::Functor`.