1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 06:41:45 +03:00
semantic/src/Patch.hs

13 lines
208 B
Haskell
Raw Normal View History

2015-11-18 05:21:51 +03:00
module Patch where
2015-11-18 05:23:53 +03:00
2015-11-18 05:44:55 +03:00
data Patch a =
Replace a a
| Insert a
| Delete a
2015-11-18 05:51:36 +03:00
deriving (Functor, Show, Eq)
2015-11-20 02:26:40 +03:00
after :: Patch a -> Maybe a
after (Replace _ a) = Just a
after (Insert a) = Just a
after _ = Nothing