mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-23 08:18:04 +03:00
smart constructors
This commit is contained in:
parent
d764fe0c85
commit
0f32611d3a
@ -195,6 +195,15 @@ app f arg = ABT.tm (App f arg)
|
||||
match :: Ord v => Term v -> [(Pattern, Term v)] -> Term v
|
||||
match scrutinee branches = ABT.tm (Match scrutinee branches)
|
||||
|
||||
handle :: Ord v => Term v -> Term v -> Term v
|
||||
handle h block = ABT.tm (Handle h block)
|
||||
|
||||
and :: Ord v => Term v -> Term v -> Term v
|
||||
and x y = ABT.tm (And x y)
|
||||
|
||||
or :: Ord v => Term v -> Term v -> Term v
|
||||
or x y = ABT.tm (Or x y)
|
||||
|
||||
constructor :: Ord v => Reference -> Int -> Term v
|
||||
constructor ref n = ABT.tm (Constructor ref n)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user