This commit is contained in:
@@ -218,6 +218,31 @@ matches ps es = getAp . foldMap Ap $ alignWith f ps es
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
trans_when :: Trans
|
||||||
|
trans_when = MkTrans
|
||||||
|
{ ellipsis = "..."
|
||||||
|
, keywords = []
|
||||||
|
, rules =
|
||||||
|
[ MkRule
|
||||||
|
(PatList
|
||||||
|
[ PatVar "when"
|
||||||
|
, PatVar "test"
|
||||||
|
, PatVar "body" ]
|
||||||
|
(Just [])
|
||||||
|
Nothing)
|
||||||
|
(TemList
|
||||||
|
[ El $ TemVar "if"
|
||||||
|
, El $ TemVar "test"
|
||||||
|
, El $ TemList
|
||||||
|
[ El $ TemVar "begin"
|
||||||
|
, Ellipsis $ TemVar "body"
|
||||||
|
]
|
||||||
|
Nothing
|
||||||
|
]
|
||||||
|
Nothing)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
trans_and :: Trans
|
trans_and :: Trans
|
||||||
trans_and = MkTrans
|
trans_and = MkTrans
|
||||||
{ ellipsis = "..."
|
{ ellipsis = "..."
|
||||||
@@ -229,5 +254,27 @@ trans_and = MkTrans
|
|||||||
Nothing
|
Nothing
|
||||||
Nothing)
|
Nothing)
|
||||||
(TemLit (LitBool True))
|
(TemLit (LitBool True))
|
||||||
|
, MkRule
|
||||||
|
(PatList
|
||||||
|
[PatVar "and", PatVar "x"]
|
||||||
|
Nothing
|
||||||
|
Nothing)
|
||||||
|
(TemVar "x")
|
||||||
|
, MkRule
|
||||||
|
(PatList
|
||||||
|
[PatVar "and", PatVar "x", PatVar "y"]
|
||||||
|
(Just [])
|
||||||
|
Nothing)
|
||||||
|
(TemList
|
||||||
|
[ El (TemVar "if")
|
||||||
|
, El (TemVar "x")
|
||||||
|
, El (TemList
|
||||||
|
[ El (TemVar "and")
|
||||||
|
, Ellipsis (TemVar "y")
|
||||||
|
]
|
||||||
|
Nothing)
|
||||||
|
, El . TemLit . LitBool $ False
|
||||||
|
]
|
||||||
|
Nothing)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user