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.
IO.Primitive.return
pure
1 parent af593fc commit 804bf6fCopy full SHA for 804bf6f
src/IO/Primitive.agda
@@ -23,6 +23,11 @@ postulate
23
pure : ∀ {a} {A : Set a} → A → IO A
24
_>>=_ : ∀ {a b} {A : Set a} {B : Set b} → IO A → (A → IO B) → IO B
25
26
+-- Alias 'return' for backwards compatibility.
27
+
28
+return : ∀ {a} {A : Set a} → A → IO A
29
+return = pure
30
31
{-# COMPILE GHC pure = \_ _ -> return #-}
32
{-# COMPILE GHC _>>=_ = \_ _ _ _ -> (>>=) #-}
33
{-# COMPILE UHC pure = \_ _ x -> UHC.Agda.Builtins.primReturn x #-}
0 commit comments