on master help sign in
Applicative instance for IO.
8a9fed6startling
lib/Prelude.idr+5
@@ -83,6 +83,11 @@ instance Functor List where
83
83
84---- Applicative instances
84---- Applicative instances
85
85
86+instance Applicative IO where
87+ pure = io_return
88+
89+ am <$> bm = io_bind am (\f => io_bind bm (io_return . f))
90+
86instance Applicative Maybe where
91instance Applicative Maybe where
87 pure = Just
92 pure = Just
88
93