We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
((->) r')
SelectT
1 parent 37cbd92 commit b7d8848Copy full SHA for b7d8848
Control/Monad/Select.hs
@@ -125,6 +125,9 @@ class (Monad m) => MonadSelect r m | m -> r where
125
instance MonadSelect r (SelectT r Identity) where
126
select = Select.select
127
128
+instance MonadSelect r (SelectT r ((->) r')) where
129
+ select f = Select.SelectT $ \k r' -> f $ \a -> k a r'
130
+
131
-- | \'Extends\' the possibilities considered by @m@ to include 'Nothing'; this
132
-- means that 'Nothing' gains a \'rank\' (namely, a value of @r@), and the
133
-- potential result could also be 'Nothing'.
0 commit comments