mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-24 00:39:58 +03:00
Properly handle boolean patterns in the new runtime
This commit is contained in:
parent
beec380cd2
commit
e5d98a2b76
@ -145,6 +145,10 @@ decomposePattern
|
||||
:: Var v
|
||||
=> Reference -> Int -> Int -> P.Pattern v
|
||||
-> [[P.Pattern v]]
|
||||
decomposePattern rf0 t _ (P.Boolean _ b)
|
||||
| rf0 == Rf.booleanRef
|
||||
, t == if b then 1 else 0
|
||||
= [[]]
|
||||
decomposePattern rf0 t nfields p@(P.Constructor _ rf u ps)
|
||||
| t == u
|
||||
, rf0 == rf
|
||||
|
Loading…
Reference in New Issue
Block a user