aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorAndreas Grois <andi@grois.info>2023-04-02 22:30:39 +0200
committerAndreas Grois <andi@grois.info>2023-04-02 22:30:39 +0200
commit073c5319f4f2bfddd2bb4070b9f4ce346c407a2e (patch)
treeb32c342aaa9fa905be2290319852a253a8e33ee4 /README.md
parentcebdd3be32d50be379663e92d4428e6bba19ba51 (diff)
Minor changes to documentation.
Diffstat (limited to 'README.md')
-rw-r--r--README.md7
1 files changed, 5 insertions, 2 deletions
diff --git a/README.md b/README.md
index fefe68d..a24e6a8 100644
--- a/README.md
+++ b/README.md
@@ -3,8 +3,8 @@ This is a proof-of-concept. Please do not use this for production code, unless y
There probably are tons of bugs. Pull requests are more than welcome.
# Description
-This is a simple (and possibly wrong) port of Haskell's [Control.Monad.Free](https://hackage.haskell.org/package/free/docs/Control-Monad-Free.html) package to Rust, using the traits from [higher](https://crates.io/crates/higher).
-This crate uses macros to generate a unique Free Monad type for each Functor.
+This is a simple port of Haskell's [Control.Monad.Free](https://hackage.haskell.org/package/free/docs/Control-Monad-Free.html) package to Rust, using the traits from [higher](https://crates.io/crates/higher).
+This crate uses macros to generate a unique Free Monad type for each user-supplied Functor.
# Usage
The usage is rather straightforward. First, you create your Functor type, then call the `free!` macro to create the actual Free Monad type based on it. For example:
@@ -148,5 +148,8 @@ fn main() {
}
```
+## An even more involved example
+The "examples/text-adventure" folder in the source repo contains a (very) short text-adventure to illustrate the usage of a Free Monads as an embedded Domain Specific Language. It also shows some potential show-stoppers one should be aware of when creating a Free Monad based eDSL.
+
# A note about the origin of this code
The work on this project started at stillalive studios. The original goal was to learn about potential applications of Free Monads in game development, but this project has meanwhile outgrown that original plan, and has become a full proof-of-concept implementation for Free Monads in Rust. \ No newline at end of file