1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 23:42:31 +03:00

Use the smart constructor when binding.

This commit is contained in:
Rob Rix 2019-06-27 12:34:34 -04:00
parent 901e0172df
commit 383342bf9c
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -90,7 +90,7 @@ instance Applicative Core where
(<*>) = ap
instance Monad Core where
a >>= f = gfold id (Core . Let) (fmap Core . (:>>)) (Core . Lam) (fmap Core . (:$)) (Core Unit) (Core . Bool) (\ c t e -> Core (If c t e)) (Core . String) (Core . Load) (fmap Core . Edge) (Core Frame) (fmap Core . (:.)) (fmap Core . (:=)) (fmap Core . Ann) pure (f <$> a)
a >>= f = gfold id let' (>>>) (Core . Lam) ($$) unit bool if' string load edge frame (...) (.=) (fmap Core . Ann) pure (f <$> a)
let' :: Name -> Core a