Skip to content

Commit

Permalink
Merge pull request #17 from zudov/master
Browse files Browse the repository at this point in the history
Remove explicit type annotations for `id`
  • Loading branch information
garyb committed Nov 15, 2015
2 parents 1e65d7c + 31e140c commit 6182e6b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Data/Maybe.purs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ maybe' _ f (Just a) = f a
-- | fromMaybe x (Just y) == y
-- | ```
fromMaybe :: forall a. a -> Maybe a -> a
fromMaybe a = maybe a (id :: forall a. a -> a)
fromMaybe a = maybe a id

-- | Similar to `fromMaybe` but for use in cases where the default value may be
-- | expensive to compute. As PureScript is not lazy, the standard `fromMaybe`
Expand All @@ -61,7 +61,7 @@ fromMaybe a = maybe a (id :: forall a. a -> a)
-- | fromMaybe' (\_ -> x) (Just y) == y
-- | ```
fromMaybe' :: forall a. (Unit -> a) -> Maybe a -> a
fromMaybe' a = maybe' a (id :: forall a. a -> a)
fromMaybe' a = maybe' a id

-- | Returns `true` when the `Maybe` value was constructed with `Just`.
isJust :: forall a. Maybe a -> Boolean
Expand Down

0 comments on commit 6182e6b

Please sign in to comment.