From 104e1ac3702afebe4c3f215d5c556cc7d48f94b0 Mon Sep 17 00:00:00 2001 From: L0neGamer Date: Sat, 25 Apr 2026 17:44:12 +0100 Subject: [PATCH] correct SelectT instance of Alternative --- Control/Monad/Trans/Select.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Control/Monad/Trans/Select.hs b/Control/Monad/Trans/Select.hs index d24f62d..2ae3d56 100644 --- a/Control/Monad/Trans/Select.hs +++ b/Control/Monad/Trans/Select.hs @@ -109,9 +109,9 @@ instance (Monad m) => Applicative (SelectT r m) where {-# INLINE (*>) #-} instance (Alternative m, Monad m) => Alternative (SelectT r m) where - empty = empty + empty = SelectT (const empty) {-# INLINE empty #-} - (<|>) = (<|>) + (<|>) (SelectT f) (SelectT g) = SelectT $ \k -> f k <|> g k {-# INLINE (<|>) #-} instance (Monad m) => Monad (SelectT r m) where