1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 10:15:55 +03:00

auto-derive Functor and everything else

This commit is contained in:
Ayman Nadeem 2020-04-27 17:42:16 -04:00
parent fae94854fd
commit 0af40b260a

View File

@ -17,6 +17,3 @@ import GHC.Generics (Generic, Generic1)
data Err fail succeed = parseL (fail :: String) | parseR (succeed :: Symbol)
deriving (Eq, Foldable, Functor, Generic, Generic1, Ord, Show, Traversable)
instance Functor (Err a) where
fmap f (parseL x) = parseL x
fmap f (parseR y) = parseR (f y)