@@ -36,7 +36,7 @@ newtype YamlParser a = YamlParser
36instance Functor YamlParser where
36instance Functor YamlParser where
37 fmap = liftM
37 fmap = liftM
38instance Applicative YamlParser where
38instance Applicative YamlParser where
39− pure = return
39+ pure = YamlParser . const . Right
40 (<*>) = ap
40 (<*>) = ap
41instance Alternative YamlParser where
41instance Alternative YamlParser where
42 empty = fail "empty"
42 empty = fail "empty"
@@ -45,7 +45,7 @@ instance Monoid (YamlParser a) where
45 mempty = fail "mempty"
45 mempty = fail "mempty"
46 mappend = mplus
46 mappend = mplus
47instance Monad YamlParser where
47instance Monad YamlParser where
48− return = YamlParser . const . Right
48+ return = pure
49 YamlParser f >>= g = YamlParser $ \am ->
49 YamlParser f >>= g = YamlParser $ \am ->
50 case f am of
50 case f am of
51 Left t -> Left t
51 Left t -> Left t