1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 08:25:19 +03:00

Define a RightModule instance for Intro.

This commit is contained in:
Rob Rix 2019-11-04 16:03:14 -05:00
parent 20591377da
commit 23d1c84342
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -57,6 +57,13 @@ deriving instance (Show a, forall a . Show a => Show (f a)) => Show (In
instance HFunctor Intro
instance RightModule Intro where
Unit >>=* _ = Unit
Bool b >>=* _ = Bool b
String s >>=* _ = String s
Record fs >>=* f = Record (map (fmap (>>= f)) fs)
Lam n b >>=* f = Lam n (b >>=* f)
-- | User-specified and -relevant names.
newtype Name = Name { unName :: Text }