Skip to content

Commit 94f64ba

Browse files
committed
Support bump part II
Had to do some tweaking to the AST get unit tests passing again. This required more changes than I'd initially anticipated.
1 parent 4519f6b commit 94f64ba

File tree

8 files changed

+442
-408
lines changed

8 files changed

+442
-408
lines changed

src/Language/Rust/Parser/Internal.y

Lines changed: 42 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -453,15 +453,15 @@ qual_path(segs) :: { Spanned (QSelf Span, Path Span) }
453453
: '<' qual_path_suf(segs) { let Spanned x _ = $2 in Spanned x ($1 # $2) }
454454
| lt_ty_qual_path as ty_path '>' '::' segs {
455455
let Path g segsTy x = $3 in
456-
Spanned (QSelf (unspan $1) (length segsTy), Path g (segsTy <> unspan $6) x) ($1 # $>)
456+
Spanned (QSelf (unspan $1) (length segsTy), Path g (segsTy <> toList $6) x) ($1 # $>)
457457
}
458458
459459
-- Basically a qualified path, but ignoring the very first '<' token
460460
qual_path_suf(segs) :: { Spanned (QSelf Span, Path Span) }
461-
: ty '>' '::' segs { Spanned (QSelf $1 0, Path False (unspan $4) (spanOf $4)) ($1 # $>) }
461+
: ty '>' '::' segs { Spanned (QSelf $1 0, Path False (toList $4) (spanOf $4)) ($1 # $>) }
462462
| ty as ty_path '>' '::' segs {
463463
let Path g segsTy x = $3 in
464-
Spanned (QSelf $1 (length segsTy), Path g (segsTy <> unspan $6) x) ($1 # $>)
464+
Spanned (QSelf $1 (length segsTy), Path g (segsTy <> toList $6) x) ($1 # $>)
465465
}
466466
467467
-- Usually qual_path_suf is for... type paths! This consumes these but with a starting '<<' token.
@@ -494,60 +494,62 @@ binding :: { (Ident, Ty Span) }
494494
-- parse_path(PathStyle::Type)
495495
ty_path :: { Path Span }
496496
: ntPath { $1 }
497-
| path_segments_without_colons { Path False (unspan $1) (spanOf $1) }
498-
| '::' path_segments_without_colons { Path True (unspan $2) ($1 # $2) }
497+
| path_segments_without_colons { Path False $1 (spanOf $1) }
498+
| '::' path_segments_without_colons { Path True $2 ($1 # $2) }
499499

500500
ty_qual_path :: { Spanned (QSelf Span, Path Span) }
501501
: qual_path(path_segments_without_colons) { $1 }
502502

503503
-- parse_path_segments_without_colons()
504-
path_segments_without_colons :: { Spanned (NonEmpty (Ident, PathParameters Span)) }
505-
: sep_by1(path_segment_without_colons, '::') %prec SEG { sequence (toNonEmpty $1) }
504+
path_segments_without_colons :: { [PathSegment Span] }
505+
: sep_by1(path_segment_without_colons, '::') %prec SEG { toList $1 }
506506

507507
-- No corresponding function - see path_segments_without_colons
508-
path_segment_without_colons :: { Spanned (Ident, PathParameters Span) }
509-
: self_or_ident path_parameter1 { Spanned (unspan $1, $2) ($1 # $>) }
508+
path_segment_without_colons :: { PathSegment Span }
509+
: self_or_ident path_parameter { PathSegment (unspan $1) $2 ($1 # $>) }
510510

511-
path_parameter1 :: { PathParameters Span }
512-
: generic_values { let (lts, tys, bds) = unspan $1 in AngleBracketed lts tys bds (spanOf $1) }
513-
| '(' sep_byT(ty,',') ')' { Parenthesized $2 Nothing ($1 # $>) }
514-
| '(' sep_byT(ty,',') ')' '->' ty_no_plus { Parenthesized $2 (Just $>) ($1 # $>) }
515-
| {- empty -} %prec IDENT { NoParameters mempty }
511+
path_parameter :: { Maybe (PathParameters Span) }
512+
: generic_values { let (lts, tys, bds) = unspan $1
513+
in Just (AngleBracketed lts tys bds (spanOf $1)) }
514+
| '(' sep_byT(ty,',') ')' { Just (Parenthesized $2 Nothing ($1 # $>)) }
515+
| '(' sep_byT(ty,',') ')' '->' ty_no_plus { Just (Parenthesized $2 (Just $>) ($1 # $>)) }
516+
| {- empty -} %prec IDENT { Nothing }
516517

517518

518519
-- Expression related:
519520
-- parse_path(PathStyle::Expr)
520521
expr_path :: { Path Span }
521522
: ntPath { $1 }
522-
| path_segments_with_colons { Path False (unspan $1) (spanOf $1) }
523-
| '::' path_segments_with_colons { Path True (unspan $2) ($1 # $2) }
523+
| path_segments_with_colons { Path False (toList $1) (spanOf $1) }
524+
| '::' path_segments_with_colons { Path True (toList $2) ($1 # $2) }
524525

525526
expr_qual_path :: { Spanned (QSelf Span, Path Span) }
526527
: qual_path(path_segments_with_colons) { $1 }
527528

528529
-- parse_path_segments_with_colons()
529-
path_segments_with_colons :: { Spanned (NonEmpty (Ident, PathParameters Span)) }
530+
path_segments_with_colons :: { Reversed NonEmpty (PathSegment Span) }
530531
: self_or_ident
531-
{ Spanned [(unspan $1, NoParameters mempty)] (spanOf $1) }
532+
{ [PathSegment (unspan $1) Nothing (spanOf $1)] }
532533
| path_segments_with_colons '::' self_or_ident
533-
{ Spanned (unspan $1 |> (unspan $3, NoParameters mempty)) ($1 # $>) }
534+
{ $1 <> [PathSegment (unspan $3) Nothing (spanOf $3)] }
534535
| path_segments_with_colons '::' generic_values
535536
{%
536-
case (N.last (unspan $1), unspan $3) of
537-
((i, NoParameters{}), (lts, tys, bds)) -> let seg = (i, AngleBracketed lts tys bds (spanOf $3))
538-
in pure $ Spanned (N.init (unspan $1) |: seg) ($1 # $3)
537+
case (unsnoc $1, unspan $3) of
538+
((rst, PathSegment i Nothing x), (lts, tys, bds)) ->
539+
let seg = PathSegment i (Just (AngleBracketed lts tys bds (spanOf $3))) (x # $3)
540+
in pure $ snoc rst seg
539541
_ -> fail "invalid path segment in expression path"
540542
}
541543

542544
-- Mod related:
543545
-- parse_path(PathStyle::Mod)
544546
mod_path :: { Path Span }
545547
: ntPath { $1 }
546-
| self_or_ident { Path False [(unspan $1, NoParameters mempty)] (spanOf $1) }
547-
| '::' self_or_ident { Path True [(unspan $2, NoParameters mempty)] ($1 # $>) }
548+
| self_or_ident { Path False [PathSegment (unspan $1) Nothing (spanOf $1)] (spanOf $1) }
549+
| '::' self_or_ident { Path True [PathSegment (unspan $2) Nothing (spanOf $2)] ($1 # $>) }
548550
| mod_path '::' self_or_ident {
549551
let Path g segs _ = $1 in
550-
Path g (segs |> (unspan $3, NoParameters mempty)) ($1 # $>)
552+
Path g (segs <> [PathSegment (unspan $3) Nothing (spanOf $3) ]) ($1 # $3)
551553
}
552554

553555
self_or_ident :: { Spanned Ident }
@@ -743,8 +745,8 @@ arg_self_general :: { Arg Span }
743745
| mut self ':' ty { SelfExplicit $4 Mutable ($1 # $>) }
744746
| arg_general {
745747
case $1 of
746-
Arg Nothing (PathTy Nothing (Path False [("self", NoParameters _)] _) _) x -> SelfValue Immutable x
747-
Arg Nothing (Rptr l m (PathTy Nothing (Path False [("self", NoParameters _)] _) _) _) x -> SelfRegion l m x
748+
Arg Nothing (PathTy Nothing (Path False [PathSegment "self" Nothing _] _) _) x -> SelfValue Immutable x
749+
Arg Nothing (Rptr l m (PathTy Nothing (Path False [PathSegment "self" Nothing _] _) _) _) x -> SelfRegion l m x
748750
_ -> $1
749751
}
750752

@@ -789,8 +791,8 @@ pat :: { Pat Span }
789791
| ident '@' pat { IdentP (ByValue Immutable) (unspan $1) (Just $3) ($1 # $>) }
790792
| expr_path {
791793
case $1 of
792-
Path False ((i, NoParameters _) :| []) _ -> IdentP (ByValue Immutable) i Nothing (spanOf $1)
793-
_ -> PathP Nothing $1 (spanOf $1)
794+
Path False [PathSegment i Nothing _] _ -> IdentP (ByValue Immutable) i Nothing (spanOf $1)
795+
_ -> PathP Nothing $1 (spanOf $1)
794796
}
795797
| expr_qual_path { PathP (Just (fst (unspan $1))) (snd (unspan $1)) ($1 # $>) }
796798
| lit_or_path '...' lit_or_path { RangeP $1 $3 ($1 # $>) }
@@ -1205,7 +1207,7 @@ vis_union_nonblock_expr :: { Expr Span }
12051207
12061208
union_expr :: { Expr Span }
12071209
: pub_or_inherited union {%
1208-
noVis $1 (PathExpr [] Nothing (Path False [("union", NoParameters mempty)] (spanOf $1)) (spanOf $1))
1210+
noVis $1 (PathExpr [] Nothing (Path False [PathSegment "union" Nothing (spanOf $2)] (spanOf $1)) (spanOf $1))
12091211
}
12101212
12111213
@@ -1460,8 +1462,10 @@ vis :: { Spanned (Visibility Span) }
14601462
| pub %prec VIS { Spanned PublicV (spanOf $1) }
14611463
| pub '(' crate ')' { Spanned CrateV ($1 # $4) }
14621464
| pub '(' in mod_path ')' { Spanned (RestrictedV $4) ($1 # $5) }
1463-
| pub '(' super ')' { Spanned (RestrictedV (Path False [("super", NoParameters mempty)] (spanOf $3))) ($1 # $4) }
1464-
| pub '(' self ')' { Spanned (RestrictedV (Path False [("self", NoParameters mempty)] (spanOf $3))) ($1 # $4) }
1465+
| pub '(' super ')' { Spanned (RestrictedV (Path False [PathSegment "super" Nothing (spanOf
1466+
$3)] (spanOf $3))) ($1 # $4) }
1467+
| pub '(' self ')' { Spanned (RestrictedV (Path False [PathSegment "self" Nothing (spanOf
1468+
$3)] (spanOf $3))) ($1 # $4) }
14651469
14661470
def :: { Spanned Defaultness }
14671471
: {- empty -} %prec DEF { pure Final }
@@ -1471,8 +1475,11 @@ use_tree :: { UseTree Span }
14711475
: mod_path { UseTreeSimple $1 Nothing (spanOf $1) }
14721476
| mod_path as ident { UseTreeSimple $1 (Just (unspan $3)) ($1 # $3) }
14731477
| mod_path '::' '*' { UseTreeGlob $1 ($1 # $3) }
1474-
| mod_path '::' '{' sep_byT(use_tree,',') '}' { UseTreeNested (Just $1) $4 ($1 # $>) }
1475-
| '{' sep_byT(use_tree,',') '}' { UseTreeNested Nothing $2 ($1 # $>) }
1478+
| '::' '*' { UseTreeGlob (Path True [] (spanOf $1)) ($1 # $2) }
1479+
| '*' { UseTreeGlob (Path False [] mempty) (spanOf $1) }
1480+
| mod_path '::' '{' sep_byT(use_tree,',') '}' { UseTreeNested $1 $4 ($1 # $>) }
1481+
| '::' '{' sep_byT(use_tree,',') '}' { UseTreeNested (Path True [] (spanOf $1)) $3 ($1 # $>) }
1482+
| '{' sep_byT(use_tree,',') '}' { UseTreeNested (Path False [] mempty) $2 ($1 # $>) }
14761483
14771484
-------------------
14781485
-- Macro related --
@@ -1774,7 +1781,7 @@ noSafety _ _ = fail "safety is not allowed here"
17741781

17751782
-- | Make a macro item, which may be a 'MacroDef'
17761783
macroItem :: [Attribute Span] -> (Maybe Ident) -> Mac Span -> Span -> Item Span
1777-
macroItem as (Just i) (Mac (Path False [("macro_rules", NoParameters _)] _) tts _) x = MacroDef as i tts x
1784+
macroItem as (Just i) (Mac (Path False [PathSegment "macro_rules" Nothing _] _) tts _) x = MacroDef as i tts x
17781785
macroItem as i mac x = MacItem as i mac x
17791786

17801787
-- | Add attributes to an expression

src/Language/Rust/Parser/Reversed.hs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ along with the usual class instances.
2020
module Language.Rust.Parser.Reversed (
2121
Reversed(..),
2222
toNonEmpty,
23-
unsnoc
23+
unsnoc,
24+
snoc,
2425
) where
2526

2627
import Language.Rust.Data.Position
@@ -69,3 +70,9 @@ toNonEmpty (Reversed xs) = N.reverse xs
6970
{-# INLINE unsnoc #-}
7071
unsnoc :: Reversed N.NonEmpty a -> (Reversed [] a, a)
7172
unsnoc (Reversed (x N.:| xs)) = (Reversed xs, x)
73+
74+
-- | Add an element to the end of a reversed sequence to produce a non-empty
75+
-- reversed sequence
76+
{-# INLINE snoc #-}
77+
snoc :: Reversed [] a -> a -> Reversed N.NonEmpty a
78+
snoc (Reversed xs) x = Reversed (x N.:| xs)

src/Language/Rust/Pretty/Internal.hs

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,6 @@ import Data.Text.Prettyprint.Doc hiding ( (<+>), hsep, indent, vsep )
107107
import Data.Maybe ( maybeToList, fromMaybe )
108108
import Data.Foldable ( toList )
109109
import Data.List ( unfoldr )
110-
import Data.List.NonEmpty ( NonEmpty(..) )
111-
import qualified Data.List.NonEmpty as N
112110

113111
-- | Print a source file
114112
printSourceFile :: SourceFile a -> Doc a
@@ -738,8 +736,8 @@ printPolarity Positive = mempty
738736
printVis :: Visibility a -> Doc a
739737
printVis PublicV = "pub"
740738
printVis CrateV = "pub(crate)"
741-
printVis (RestrictedV path@(Path False (("super", NoParameters _) :| _) _)) = "pub(" <> printPath path False <> ")"
742-
printVis (RestrictedV path@(Path False (("self", NoParameters _) :| _) _)) = "pub(" <> printPath path False <> ")"
739+
printVis (RestrictedV path@(Path False [PathSegment "super" Nothing _] _)) = "pub(" <> printPath path False <> ")"
740+
printVis (RestrictedV path@(Path False [PathSegment "self" Nothing _] _)) = "pub(" <> printPath path False <> ")"
743741
printVis (RestrictedV path) = "pub(" <> "in" <+> printPath path False <> ")"
744742
printVis InheritedV = mempty
745743

@@ -932,7 +930,6 @@ printTraitRef (TraitRef path) = printPath path False
932930

933931
-- | Print a path parameter and signal whether its generic (if any) should start with a colon (@print_path_parameters@)
934932
printPathParameters :: PathParameters a -> Bool -> Doc a
935-
printPathParameters (NoParameters x) _ = annotate x mempty
936933
printPathParameters (Parenthesized ins out x) colons = annotate x $
937934
when colons "::" <> parens (commas ins printType) <+> perhaps (\t -> "->" <+> printType t) out
938935
printPathParameters (AngleBracketed lts tys bds x) colons = annotate x (when colons "::" <> "<" <> hsep (punctuate "," (lts' ++ tys' ++ bds')) <> ">")
@@ -945,31 +942,35 @@ printPathParameters (AngleBracketed lts tys bds x) colons = annotate x (when col
945942
-- | Print a path, specifiying explicitly whether to include colons (@::@) before generics
946943
-- or not (so expression style or type style generics) (@print_path@)
947944
printPath :: Path a -> Bool -> Doc a
948-
printPath (Path global segs x) colons = annotate x (when global "::" <> hcat (punctuate "::" (printSegment `map` N.toList segs)))
949-
where
950-
printSegment :: (Ident, PathParameters a) -> Doc a
951-
printSegment (ident,parameters) = printIdent ident <> printPathParameters parameters colons
945+
printPath (Path global segs x) colons = annotate x (when global "::" <> hcat (punctuate "::" (map (`printSegment` colons) segs)))
946+
947+
-- | Print a path segment
948+
printSegment :: PathSegment a -> Bool -> Doc a
949+
printSegment (PathSegment i ps x) colons = annotate x (printIdent i <> params)
950+
where params = perhaps (\p -> printPathParameters p colons) ps
951+
952952

953953
-- | Print a qualified path, specifiying explicitly whether to include colons (@::@) before
954954
-- generics or not (so expression style or type style generics) (@print_qpath@)
955955
printQPath :: Path a -> QSelf a -> Bool -> Doc a
956956
printQPath (Path global segs x) (QSelf ty n) colons = hcat [ "<", printType ty <+> aliasedDoc, ">", "::", restDoc ]
957957
where
958-
(aliased, rest) = N.splitAt n segs
958+
(aliased, rest) = splitAt n segs
959959

960960
aliasedDoc = case aliased of
961961
[] -> mempty
962-
(s:ss) -> "as" <+> printPath (Path global (s :| ss) x) False
962+
segs -> "as" <+> printPath (Path global segs x) False
963963

964-
restDoc = printPath (Path False (N.fromList rest) x) colons
964+
restDoc = printPath (Path False rest x) colons
965965

966966
-- | Print a use tree
967967
printUseTree :: UseTree a -> Doc a
968968
printUseTree (UseTreeSimple p Nothing x) = annotate x (printPath p True)
969969
printUseTree (UseTreeSimple p (Just i) x) = annotate x (printPath p True <+> "as" <+> printIdent i)
970+
printUseTree (UseTreeGlob p@(Path _ [] _) x) = annotate x (printPath p True <> "*")
970971
printUseTree (UseTreeGlob p x) = annotate x (printPath p True <> "::*")
971-
printUseTree (UseTreeNested (Just p) n x) = annotate x (printPath p True <> "::{" <> hcat (punctuate ", " (map printUseTree n)) <> "}")
972-
printUseTree (UseTreeNested Nothing n x) = annotate x ("{" <> hcat (punctuate ", " (map printUseTree n)) <> "}")
972+
printUseTree (UseTreeNested p@(Path _ [] _) n x) = annotate x (printPath p True <> "{" <> hcat (punctuate ", " (map printUseTree n)) <> "}")
973+
printUseTree (UseTreeNested p n x) = annotate x (printPath p True <> "::{" <> hcat (punctuate ", " (map printUseTree n)) <> "}")
973974

974975
-- | Print a type parameters (@print_ty_param@)
975976
printTyParam :: TyParam a -> Doc a

src/Language/Rust/Pretty/Resolve.hs

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -303,24 +303,24 @@ instance Show PathType where
303303
-- * it has path parameters of the wrong type
304304
-- * it has identifiers not meant for paths
305305
--
306+
-- TODO: guard against no path segments...
306307
resolvePath :: (Typeable a, Monoid a) => PathType -> Path a -> ResolveM (Path a)
307308
resolvePath t p@(Path g segs x) = scope p $
308-
if all (isParamsForPath t . snd) segs
309+
if null [ () | PathSegment _ (Just a) _ <- segs, not (isParamsForPath t a) ]
309310
then Path g <$> traverse resolveSeg segs <*> pure x
310311
else err p "path parameter is not valid for this type of path"
311312
where
312-
resolveSeg :: (Typeable a, Monoid a) => (Ident, PathParameters a) -> ResolveM (Ident, PathParameters a)
313-
resolveSeg (i, a) = do
313+
resolveSeg :: (Typeable a, Monoid a) => PathSegment a -> ResolveM (PathSegment a)
314+
resolveSeg (PathSegment i a x') = do
314315
i' <- case i of
315316
Ident "self" _ -> pure i
316317
Ident "Self" _ -> pure i
317318
Ident "super" _ -> pure i
318319
_ -> resolveIdent i
319-
a' <- resolvePathParameters a
320-
pure (i',a')
320+
a' <- traverse resolvePathParameters a
321+
pure (PathSegment i' a' x')
321322

322323
isParamsForPath :: PathType -> PathParameters a -> Bool
323-
isParamsForPath t' NoParameters{} = t' `elem` ([TypePath, ExprPath, ModPath] :: [PathType])
324324
isParamsForPath t' AngleBracketed{} = t' `elem` ([TypePath, ExprPath] :: [PathType])
325325
isParamsForPath t' Parenthesized{} = t' `elem` ([TypePath] :: [PathType])
326326

@@ -331,7 +331,6 @@ instance (Typeable a, Monoid a) => Resolve (Path a) where
331331

332332
-- | A path parameter can be invalid if any of its constituent components are invalid
333333
resolvePathParameters :: (Typeable a, Monoid a) => PathParameters a -> ResolveM (PathParameters a)
334-
resolvePathParameters (NoParameters x) = pure (NoParameters x)
335334
resolvePathParameters p@(AngleBracketed lts tys bds x) = scope p $ do
336335
lts' <- traverse resolveLifetime lts
337336
tys' <- traverse (resolveTy AnyType) tys
@@ -500,8 +499,8 @@ resolveArg GeneralArg a@(Arg p t x) = scope a $ do
500499

501500
-- | Check whether an argument is one of the "self"-alike forms
502501
isSelfAlike :: Arg a -> Bool
503-
isSelfAlike (Arg Nothing (PathTy Nothing (Path False [(Ident "self" _, NoParameters _)] _) _) _) = True
504-
isSelfAlike (Arg Nothing (Rptr _ _ (PathTy Nothing (Path False [(Ident "self" _, NoParameters _)] _) _) _) _) = True
502+
isSelfAlike (Arg Nothing (PathTy Nothing (Path False [PathSegment (Ident "self" _) Nothing _] _) _) _) = True
503+
isSelfAlike (Arg Nothing (Rptr _ _ (PathTy Nothing (Path False [PathSegment (Ident "self" _) Nothing _] _) _) _) _) = True
505504
isSelfAlike _ = False
506505

507506
instance (Typeable a, Monoid a) => Resolve (Arg a) where resolveM = resolveArg NamedArg
@@ -552,8 +551,8 @@ resolvePat p@(PathP q@(Just (QSelf _ i)) p'@(Path g s x) x')
552551
| i < 0 || i >= length s = scope p (err p "index given by QSelf is outside the possible range")
553552
| i == 0 = scope p (PathP <$> traverse resolveQSelf q <*> resolvePath ExprPath p' <*> pure x)
554553
| otherwise = scope p $ do
555-
tyP@(Path _ tyPSegs _) <- resolvePath TypePath $ Path g (N.fromList (N.take i s)) mempty
556-
exprP@(Path _ exprPSegs _) <- resolvePath ExprPath $ Path False (N.fromList (N.drop i s)) x
554+
tyP@(Path _ tyPSegs _) <- resolvePath TypePath $ Path g (take i s) mempty
555+
exprP@(Path _ exprPSegs _) <- resolvePath ExprPath $ Path False (drop i s) x
557556
q' <- traverse resolveQSelf q
558557
pure (PathP q' (Path g (tyPSegs <> exprPSegs) x) x')
559558
-- TupleP
@@ -890,8 +889,8 @@ resolveExprP _ _ p@(PathExpr as q@(Just (QSelf _ i)) p'@(Path g s x) x')
890889
pure (PathExpr as' q' p'' x)
891890
| otherwise = scope p $ do
892891
as' <- traverse (resolveAttr OuterAttr) as
893-
tyP@(Path _ tyPSegs _) <- resolvePath TypePath $ Path g (N.fromList (N.take i s)) mempty
894-
exprP@(Path _ exprPSegs _) <- resolvePath ExprPath $ Path False (N.fromList (N.drop i s)) x
892+
tyP@(Path _ tyPSegs _) <- resolvePath TypePath $ Path g (take i s) mempty
893+
exprP@(Path _ exprPSegs _) <- resolvePath ExprPath $ Path False (drop i s) x
895894
q' <- traverse resolveQSelf q
896895
pure (PathExpr as' q' (Path g (tyPSegs <> exprPSegs) x) x')
897896
resolveExprP _ _ i@(Lit as l x) = scope i $ do
@@ -1420,7 +1419,7 @@ resolveUseTree v@(UseTreeGlob p x) = scope v $ do
14201419
p' <- resolvePath ModPath p
14211420
pure (UseTreeGlob p' x)
14221421
resolveUseTree v@(UseTreeNested p ns x) = scope v $ do
1423-
p' <- traverse (resolvePath ModPath) p
1422+
p' <- resolvePath ModPath p
14241423
ns' <- traverse resolveUseTree ns
14251424
pure (UseTreeNested p' ns' x)
14261425

0 commit comments

Comments
 (0)