1
1
mirror of https://github.com/github/semantic.git synced 2025-01-03 21:16:12 +03:00

Handle the Nothing/Nothing case.

This commit is contained in:
Rob Rix 2016-03-31 15:04:33 -04:00
parent b3d202accb
commit 30b58becf1

View File

@ -33,6 +33,7 @@ instance Align Maybe where
align (Just a) (Just b) = Just (These a b)
align Nothing (Just b) = Just (That b)
align (Just a) Nothing = Just (This a)
align _ _ = Nothing
-- | A functor which can be traversed through an `Align`able functor, inverting the nesting of one in the other, given some default value.
-- |