diff --git a/cli/Main.hs b/cli/Main.hs index 07ee948..76edc34 100644 --- a/cli/Main.hs +++ b/cli/Main.hs @@ -119,9 +119,9 @@ mainSingle args = do let apiInternal = Map.filterWithKey (\k _ -> isInternal k) api1 - step "Printing Released API" + step "Released API" putStrLn $ prettyAPI elems apiReleased - step "Printing Internal API" + step "Internal API" putStrLn $ prettyAPI elems apiInternal mainDiff :: [String] -> IO () @@ -155,12 +155,11 @@ mainDiff args = do step "API Annotations" putStrLn "[A] : Added" putStrLn "[R] : Removed" - putStrLn "[C] : Signature changed" - putStrLn "[O] : Old signature" - putStrLn "[N] : New signature" + putStrLn "[C] : Changed" + putStrLn "[O] : Old definition" + putStrLn "[N] : New definition" putStrLn "[D] : Deprecated" - step "API diff" let elems = [ ELClasses , ELDataTypes True @@ -180,12 +179,18 @@ mainDiff args = do isDeprecatedInLeft (Tagged (Attach (DBoth anns _) _) _) = isDeprecated anns isDeprecatedInLeft _ = False - let diff = + let diffRel = let filt k v = not (isInternal k) && not (isDeprecatedInBoth v || isDeprecatedInLeft v) in Map.filterWithKey filt (diffAPI api1 api2) - putStrLn $ prettyAPI elems diff + let diffInt = + let filt k _ = isInternal k + in Map.filterWithKey filt (diffAPI api1 api2) + step "API diff" + putStrLn $ prettyAPI elems diffRel + step "Internal API diff" + putStrLn $ prettyAPI elems diffInt main :: IO () main = do