lexi-lambda / freer-simple

A friendly effect system for Haskell
https://hackage.haskell.org/package/freer-simple
BSD 3-Clause "New" or "Revised" License
227 stars 19 forks source link

Inline simple effect primitives #31

Open ilyakooo0 opened 3 years ago

ilyakooo0 commented 3 years ago

I am wondering if it might make sense to mark the simple effect primitives of the form foo ... = send $ Effect ... like put from State with INLINE pragmas?

https://github.com/lexi-lambda/freer-simple/blob/e5ef0fec4a79585f99c0df8bc9e2e67cc0c0fb4a/src/Control/Monad/Freer/State.hs#L57-L58

Is there a reason this has not already been done? Functions like these seem like prime targets for human-directed inling.