mirror of
https://github.com/github/semantic.git
synced 2024-12-27 00:44:57 +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
|
, bool
|
||||||
, string
|
, string
|
||||||
, record
|
, record
|
||||||
|
, lam
|
||||||
, Domain(..)
|
, Domain(..)
|
||||||
) where
|
) where
|
||||||
|
|
||||||
@ -24,6 +25,9 @@ string = send . String
|
|||||||
record :: (Carrier sig m, Member Domain sig) => [(Name, m a)] -> m a
|
record :: (Carrier sig m, Member Domain sig) => [(Name, m a)] -> m a
|
||||||
record fs = send (Record fs)
|
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
|
data Domain f a
|
||||||
= Unit
|
= Unit
|
||||||
|
Loading…
Reference in New Issue
Block a user