From 23d1c843426dcdfe945164109c935da9be8463d4 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Mon, 4 Nov 2019 16:03:14 -0500 Subject: [PATCH] Define a RightModule instance for Intro. --- semantic-analysis/src/Analysis/Intro.hs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/semantic-analysis/src/Analysis/Intro.hs b/semantic-analysis/src/Analysis/Intro.hs index 741ba4d5f..5900539bf 100644 --- a/semantic-analysis/src/Analysis/Intro.hs +++ b/semantic-analysis/src/Analysis/Intro.hs @@ -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 }