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:
parent
ca3bb15353
commit
9822b4eed7
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user