We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
((->) r')
SelectT
1 parent 37cbd92 commit 33c8fc2Copy full SHA for 33c8fc2
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 = SelectT $ \k r' -> f $ \ma -> k ma 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