File tree Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -662,10 +662,10 @@ ekey _ _ f e = fromMaybe e <$> f Nothing
662662stripPositionInfo :: NExpr -> NExpr
663663stripPositionInfo = transport phi
664664 where
665- transport f (Fix x) = Fix $ fmap ( transport f) ( f x)
665+ transport f (Fix x) = Fix $ transport f <$> f x
666666
667- phi (NSet recur binds) = NSet recur $ fmap go binds
668- phi (NLet binds body) = NLet (fmap go binds) body
667+ phi (NSet recur binds) = NSet recur $ go <$> binds
668+ phi (NLet binds body) = NLet (go <$> binds) body
669669 phi x = x
670670
671671 go (NamedVar path r _pos) = NamedVar path r nullPos
Original file line number Diff line number Diff line change @@ -557,23 +557,23 @@ type Parser = ParsecT Void Text (State SourcePos)
557557type Result a = Either (Doc Void ) a
558558
559559parseFromFileEx :: MonadFile m => Parser a -> FilePath -> m (Result a )
560- parseFromFileEx p path =
560+ parseFromFileEx parser file =
561561 do
562- txt <- decodeUtf8 <$> readFile path
562+ input <- decodeUtf8 <$> readFile file
563563
564564 pure $
565565 either
566566 (Left . pretty . errorBundlePretty)
567- Right
568- $ (`evalState` initialPos path ) $ runParserT p path txt
567+ pure
568+ $ (`evalState` initialPos file ) $ runParserT parser file input
569569
570570parseFromText :: Parser a -> Text -> Result a
571- parseFromText p txt =
572- let file = " <string>" in
571+ parseFromText parser input =
572+ let stub = " <string>" in
573573 either
574574 (Left . pretty . errorBundlePretty)
575- Right
576- $ (`evalState` initialPos file ) $ (`runParserT` file) p txt
575+ pure
576+ $ (`evalState` initialPos stub ) $ (`runParserT` stub) parser input
577577
578578{- Parser.Operators -}
579579
You can’t perform that action at this time.
0 commit comments