Safe Haskell | None |
---|---|
Language | Haskell98 |
Naive Free monads suffer from a quadratic complexity, as explained in
- Janis Voigtlander, Asymptotic Improvement of Computations over Free Monads, MPC'08
The solution is to redefine the Free datatype in CPS, similar to what is done in difference lists to solve the problem on quadratic append for lists.
Documentation
C (forall b. (a -> mu b) -> mu b) |