on master help sign in
Functor instance for IO.
commit694bf20643bc7d85aa46ae3cbf7eb1732c2182f3 authorstartling <tdixon51793@gmail.com> dateMon 19 Nov 2012, 11:59 (14 years ago) parent8a9fed6
1 file changed+3
lib/Prelude.idr+3
lib/Prelude.idr+3
@@ -70,6 +70,9 @@ instance Show a => Show (Maybe a) where
7070
7171---- Functor instances
7272
73+instance Functor IO where
74+ fmap f io = io_bind io (io_return . f)
75+
7376instance Functor Maybe where
7477 fmap f (Just x) = Just (f x)
7578 fmap f Nothing = Nothing