Successfully reported this slideshow.

The Eff monad, one monad to rule them all

14

Share

Upcoming SlideShare
The many faces of modularity
The many faces of modularity
Loading in …3
×
1 of 97
1 of 97

The Eff monad, one monad to rule them all

14

Share

Download to read offline

The Eff monad is an alternative to monad transformers. It is implemented as a library in https://github.com/atnos-org/eff-cats and https://github.com/atnos-org/eff-scalaz

The Eff monad is an alternative to monad transformers. It is implemented as a library in https://github.com/atnos-org/eff-cats and https://github.com/atnos-org/eff-scalaz

More Related Content

Related Books

Free with a 14 day trial from Scribd

See all

The Eff monad, one monad to rule them all

  1. 1. Eric Torreborre The Eff monad One monad to rule them all!
  2. 2. It must be evident how multifarious and how mutually complicated are the considerations which the working of such an engine involve. There are frequently several distinct sets of effects going on simultaneously; all in a manner independent of each other, and yet to a greater or less degree exercising a mutual influence. Ada Lovelace, 1842
  3. 3. You could have invented monads!
  4. 4. Exceptions?
  5. 5. Exceptions?
  6. 6. State?
  7. 7. State?
  8. 8. Genius!
  9. 9. Can we have both state and error?
  10. 10. First idea: stack them!
  11. 11. 1996!
  12. 12. Which order?
  13. 13. DOES NOT WORK!
  14. 14. THIS ONE WORKS!
  15. 15. DIFFERENCE?
  16. 16. DIFFERENCE?
  17. 17. DIFFERENCE?
  18. 18. ORDER IS IMPORTANT!
  19. 19. GENERALISE
  20. 20. STACKING HAS A COST!
  21. 21. SIMILAR EFFECTS?
  22. 22. IN PRACTICE
  23. 23. Specialized stacks
  24. 24. Specialized functions
  25. 25. WHAT IF? We need to use both Hadoop and S3?
  26. 26. WHAT ELSE?
  27. 27. WHAT ELSE?
  28. 28. Type- level effects Eff monad Value- level effects Continuatio nsInterpreters Member typeclass
  29. 29. Effect
  30. 30. Type-level effects Value-level effects
  31. 31. Value-level effect Continuations
  32. 32. Option Interpreter State Interpreter Continuation1 Continuation2 Option Interpreter Continuation3 + State Interpreter
  33. 33. OPTION RELOADED
  34. 34. KLEISLI
  35. 35. OPTION AS EFFECT
  36. 36. EFF
  37. 37. ERROR AS EFFECT
  38. 38. NEVER RE-IMPLEMENT flatMap EVER AGAIN!
  39. 39. EFFECTS UNITE!
  40. 40. Type-level effects
  41. 41. Value-level effects
  42. 42. Value-level effects
  43. 43. Member typeclass
  44. 44. LIBRARY
  45. 45. scalaz.Future
  46. 46. STACKOVERFLOW :-(
  47. 47. STACK SAFE
  48. 48. TRANSFORM EFFECTS
  49. 49. SO, SILVER BULLET?
  50. 50. SORRY NO
  51. 51. Implicits
  52. 52. Implicits Use it in prod' Renamings Check laws Missing functions Benchmarking, Scalajs...
  53. 53. CREDITS
  54. 54. LINKS Monads for functional programming Monad transformers and modular interpreters Extensible effects Reflection without remorse Freer monad, more extensible effects
  55. 55. THANKS!
  56. 56. Matchers
  57. 57. Matchers
  58. 58. Matchers
  59. 59. Matchers
  60. 60. MORE TROUBLE
  61. 61. List(5, 7, 1)
  62. 62. TOO BIG?
  63. 63. ONE MORE ERROR LAYER!

Editor's Notes

  • M denotes the effect that goes with A
  • ×