-
Notifications
You must be signed in to change notification settings - Fork 19
Conversation
I like the look of this. Will the eff optimisations fire on this type too? |
src/Control/Monad/Eff/Unrefined.purs
Outdated
|
||
-- | A variant of `Control.Monad.Eff.Eff` without the row of effects. | ||
-- | | ||
-- | `Unrefined.Eff a` is isomorphic to `exists eff. Refined.Eff a`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this say Refined.Eff eff a
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thanks.
derive newtype instance applyEff :: Apply Eff | ||
derive newtype instance applicativeEff :: Applicative Eff | ||
derive newtype instance bindEff :: Bind Eff | ||
derive newtype instance monadEff :: Monad Eff |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we give this type a MonadEff
instance?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, good idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I replaced unrefined
actually.
I'm not sure. Not directly, but if enough newtype wrappers get removed, it's possible. Edit: no, it looks like we need compiler support since the dictionaries aren't getting inlined. |
^ I was going to say, does this need to go in core, since there's already the " |
Well, I'd like to see the dependency inverted and |
I chose not to export constructors so that we can eventually swap around the dependencies (regular
Eff
implemented using unrefinedEff
plus a phantom row) later, if this proves to be useful.