Skip to content

Commit

Permalink
Port Aff explanation to file that explains it somewhat; update ReadMe
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanMartinez committed Sep 11, 2018
1 parent 84a7ca2 commit c4dac60
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Effect, Eff, and Aff

## Some History

Before the `0.12.0` release, the `Effect` monad used to be called `Eff`.

In short, the decision was made to drop `Eff`'s "extensible effects". Presumably, to prevent code breakage, `Eff` and package location in imports was unchanged. Rather, it can now be found in the [purescript-eff](https://pursuit.purescript.org/packages/purescript-eff/3.2.1) package. Its replacement was called `Effect`.

(You can read more about the decision making process [here](https://purescript-resources.readthedocs.io/en/latest/eff-to-effect.html). If one is curious about `Eff`, read through [the related section](https://leanpub.com/purescript/read#leanpub-auto-the-eff-monad-1) in the "Purescript by Example" book as it won't be covered here.)

The `Aff` monad was introduced and in use before this decision was made. Thus, history explains the naming behind `Aff`: if `Eff` was for synchronous **eff**ects, then `Aff` is for **a**sychronous e**ff**ects.

`Aff` is more powerful than `Effect`, but why that is won't be explained now.
14 changes: 0 additions & 14 deletions 21-Hello-World/0x-Games/06-Effect-Eff-and-Aff/ReadMe.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
# Effect, Eff, and Aff

## Some History

Before the `0.12.0` release, the `Effect` monad used to be called `Eff`.

In short, the decision was made to drop `Eff`'s "extensible effects". Presumably, to prevent code breakage, `Eff` and package location in imports was unchanged. Rather, it can now be found in the [purescript-eff](https://pursuit.purescript.org/packages/purescript-eff/3.2.1) package. Its replacement was called `Effect`.

(You can read more about the decision making process [here](https://purescript-resources.readthedocs.io/en/latest/eff-to-effect.html).)

The `Aff` monad was introduced and in use before this decision was made. Thus, history explains the naming behind `Aff`: if `Eff` was for synchronous **eff**ects, then `Aff` is for **a**sychronous e**ff**ects.

## Scope of This Folder

If one is curious about `Eff`, read through [the related section](https://leanpub.com/purescript/read#leanpub-auto-the-eff-monad-1) in the "Purescript by Example" book as it won't be covered here.

Since `Effect` has already been explained, our focus will be on `Aff` and its relation and usage with `Effect`. In this folder, we'll peel back the covers of `Node.ReadLine.CleanerInterface` and cover more of `Aff`.

However, `Aff` will not be covered in its full complexity.
4 changes: 2 additions & 2 deletions 21-Hello-World/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This folder will document everything necessary to create a simple console-based
- The difference between Local Mutable State vs Global Mutable State
- How to test code
- How to benchmark / profile code
- How to structure an FP application
- How to structure an FP application
- A few console-based games written in Purescript (putting it all together)

In pursuing these goals, it will overview the following libraries:
Expand Down Expand Up @@ -42,7 +42,7 @@ Besides this repo, we have a few choices in terms of understanding functional pr

### Purescript

- [Purescript By Example](https://leanpub.com/purescript/read#) - Outdated since it covers Purescript `0.11.7` and not `0.12.0`, but still a helpful resource. Be wary of any references to these [deprecated packages](https://github.com/purescript-deprecated) and read through the ReadMe in `Console-Lessons/Effect-Eff-and-Aff` to understand how to translate the no-longer-used `Eff` type to `Effect` type.
- [Purescript By Example](https://leanpub.com/purescript/read#) - Outdated since it covers Purescript `0.11.7` and not `0.12.0`, but still a helpful resource. Be wary of any references to these [deprecated packages](https://github.com/purescript-deprecated) and read through `Hello-World-and-Effects/Effect-Eff-and-Aff.md` to understand how to translate the no-longer-used `Eff` type to `Effect` type.
- [Purescript Resources](https://purescript-resources.readthedocs.io/en/latest/index.html) - Justin Woo's Read the Docs (RTD) work

### Haskell
Expand Down

0 comments on commit c4dac60

Please sign in to comment.