File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
semantic-analysis/src/Analysis/Analysis Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ exceptionsForLine l e = Set.filter (\ ex -> IntSet.member l (exceptionLines ex))
106
106
107
107
printExcSet :: Source. Source -> ExcSet -> IO ()
108
108
printExcSet src e = for_ (zip [0 .. ] (Source. lines src)) $ \ (i, line) -> do
109
- Text. putStr (pass (def (import' (raise ( Text. dropWhileEnd (== ' \n ' ) (Source. toText line))) )))
109
+ Text. putStr (keywords ( Text. dropWhileEnd (== ' \n ' ) (Source. toText line)))
110
110
let es = exceptionsForLine i e
111
111
fvs = freeVariablesForLine i e
112
112
unless (null es && null fvs) $ do
@@ -117,10 +117,7 @@ printExcSet src e = for_ (zip [0..] (Source.lines src)) $ \ (i, line) -> do
117
117
Text. putStrLn mempty
118
118
where
119
119
keyword k s = Text. intercalate (Text. pack " \ESC [34;1m" <> k <> reset) (Text. splitOn k s)
120
- raise = keyword (Text. pack " raise" )
121
- import' = keyword (Text. pack " import" )
122
- def = keyword (Text. pack " def" )
123
- pass = keyword (Text. pack " pass" )
120
+ keywords = keyword (Text. pack " raise" ) . keyword (Text. pack " import" ) . keyword (Text. pack " def" ) . keyword (Text. pack " pass" )
124
121
union = Text. intercalate (Text. pack " , " )
125
122
formatFreeVariables fvs = map (\ fv -> Text. pack " ?" <> formatName (freeVariableName fv)) (Set. toList fvs)
126
123
formatExceptions excs = map (Text. pack . show . formatName . exceptionName) (Set. toList excs)
You can’t perform that action at this time.
0 commit comments