on master help sign in
Changes to prelude Maybe.idr file: removing class instances that were already defined, as well as fixing a type error.
1ea1993Dominic Mulligan
lib/prelude/maybe.idr−14
@@ -61,17 +61,3 @@ mapMaybe f (x::xs) =
61 case f x of
61 case f x of
62 Nothing => mapMaybe f xs
62 Nothing => mapMaybe f xs
63 Just j => j :: mapMaybe f xs
63 Just j => j :: mapMaybe f xs
64−
65−--------------------------------------------------------------------------------
66−-- Class instances
67−--------------------------------------------------------------------------------
68−
69−instance Functor Maybe where
70− fmap f Nothing = Nothing
71− fmap f (Just j) = Just (f j)
72−
73−instance Monad Maybe where
74− return = Just
75−
76− (>>=) Nothing m = Nothing
77− (>>=) (Just j) m = m j