File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
parser-typechecker/src/Unison/Syntax Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ module Unison.Syntax.TermParser
14
14
where
15
15
16
16
import Control.Comonad.Trans.Cofree (CofreeF ((:<) ))
17
- import Control.Lens (_2 )
17
+ import Control.Lens (mapped , _2 )
18
18
import Control.Monad.Reader (asks , local )
19
19
import Control.Monad.Trans.Writer
20
20
import Data.Bitraversable (bitraverse )
@@ -1365,11 +1365,8 @@ destructuringBind = do
1365
1365
-- (Some 42)
1366
1366
-- vs
1367
1367
-- (Some 42) = List.head elems
1368
- (p, boundVars) <- P. try do
1369
- (p, boundVars) <- parsePattern
1370
- let boundVars' = snd <$> boundVars
1371
- _ <- P. lookAhead (openBlockWith " =" )
1372
- pure (p, boundVars')
1368
+ pat <- P. try (parsePattern2 <* P. lookAhead (openBlockWith " =" ))
1369
+ (p, boundVars) <- over (_2 . mapped) snd <$> bindConstructorsInPattern pat
1373
1370
(_spanAnn, scrute) <- layoutBlock " =" -- Dwight K. Scrute ("The People's Scrutinee")
1374
1371
let guard = Nothing
1375
1372
let absChain vs t = foldr (\ v t -> ABT. abs' (ann t) v t) t vs
You can’t perform that action at this time.
0 commit comments