hasura / eff

🚧 a work in progress effect system for Haskell 🚧
ISC License
551 stars 18 forks source link

Definition of 'interpret' in document is incorrect #18

Open ENvironmentSet opened 1 year ago

ENvironmentSet commented 1 year ago

Definition of interpret is given as following in the 'Simple effect handlers' section:

interpret f = handle (liftH . f)

However, this must not have type checked since handle requires term of type (a -> Eff effs r) before term of type (forall effs' b. eff :< effs' => eff (Eff effs') b -> Handle eff effs a r effs' b) (which is liftH . f). Therefore I checked definition of interpret in codebase and it was interpret f = handle pure (liftH . f). I think it would be better to remedy this.