Applicative instance for IO.
(Still needs a Functor instance)
commit8a9fed66283fa0220c3b896e1f435adb84c5b163
authorstartling <tdixon51793@gmail.com>
dateMon 19 Nov 2012, 11:22 (14 years ago)
parent934e096
lib/Prelude.idr+5
@@ -83,6 +83,11 @@ instance Functor List where
8383
8484---- Applicative instances
8585
86+instance Applicative IO where
87+ pure = io_return
88+
89+ am <$> bm = io_bind am (\f => io_bind bm (io_return . f))
90+
8691instance Applicative Maybe where
8792 pure = Just
8893