Skip to content

Commit 804bf6f

Browse files
committed
Fix #2124: IO.Primitive.return (alias for pure) for backwards compat
1 parent af593fc commit 804bf6f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/IO/Primitive.agda

+5
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ postulate
2323
pure : {a} {A : Set a} A IO A
2424
_>>=_ : {a b} {A : Set a} {B : Set b} IO A (A IO B) IO B
2525

26+
-- Alias 'return' for backwards compatibility.
27+
28+
return : {a} {A : Set a} A IO A
29+
return = pure
30+
2631
{-# COMPILE GHC pure = \_ _ -> return #-}
2732
{-# COMPILE GHC _>>=_ = \_ _ _ _ -> (>>=) #-}
2833
{-# COMPILE UHC pure = \_ _ x -> UHC.Agda.Builtins.primReturn x #-}

0 commit comments

Comments
 (0)