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

Define a smart constructor for Lam.

This commit is contained in:
Rob Rix 2019-11-04 14:48:59 -05:00
parent ca3bb15353
commit 9822b4eed7
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -4,6 +4,7 @@ module Analysis.Domain
, bool
, string
, record
, lam
, Domain(..)
) where
@ -24,6 +25,9 @@ string = send . String
record :: (Carrier sig m, Member Domain sig) => [(Name, m a)] -> m a
record fs = send (Record fs)
lam :: (Eq a, Carrier sig m, Member Domain sig) => Maybe Name -> a -> m a -> m a
lam u n b = send (Lam u (abstract1 n b))
data Domain f a
= Unit