@@ -5,7 +5,7 @@ module Reporting.Helpers
5 , nameToDoc
5 , nameToDoc
6 , args, moreArgs
6 , args, moreArgs
7 , toSimpleNote, toSimpleHint, toFancyHint
7 , toSimpleNote, toSimpleHint, toFancyHint
8− , link, reflowLink
8+ , link, reflowLink, makeLink
9 , stack, reflow
9 , stack, reflow
10 , commaSep, capitalize, ordinalize, drawCycle
10 , commaSep, capitalize, ordinalize, drawCycle
11 , findPotentialTypos, findTypoPairs, vetTypos
11 , findPotentialTypos, findTypoPairs, vetTypos
@@ -88,7 +88,7 @@ link word before fileName after =
89makeLink :: String -> String
89makeLink :: String -> String
90makeLink fileName =
90makeLink fileName =
91− "<http://elm-lang.org/hints/" <> Pkg.versionToString Compiler.version <> "/" <> fileName <> ".md>"
91+ "<https://elm-lang.org/hints/" <> Pkg.versionToString Compiler.version <> "/" <> fileName <> ">"
94reflowLink :: String -> String -> String -> Doc
94reflowLink :: String -> String -> String -> Doc
@@ -164,17 +164,10 @@ ordinalize number =
164drawCycle :: [N.Name] -> Doc
164drawCycle :: [N.Name] -> Doc
165drawCycle names =
165drawCycle names =
167− topLine =
167+ topLine = "┌─────┐"
170− nameLine name =
168+ nameLine name = "│ " <> dullyellow (nameToDoc name)
171− "│ " <> dullyellow (textToDoc name)
173− midLine =
169+ midLine = "│ ↓"
176− bottomLine =
170+ bottomLine = "└─────┘"
179 vcat (topLine : List.intersperse midLine (map nameLine names) ++ [ bottomLine ])
172 vcat (topLine : List.intersperse midLine (map nameLine names) ++ [ bottomLine ])
@@ -185,7 +178,7 @@ drawCycle names =
186findPotentialTypos :: [String] -> String -> [String]
179findPotentialTypos :: [String] -> String -> [String]
187findPotentialTypos knownNames badName =
180findPotentialTypos knownNames badName =
188− filter ((==1) . distance badName) knownNames
181+ filter (\name -> distance badName name == 1) knownNames
191findTypoPairs :: [String] -> [String] -> [(String, String)]
184findTypoPairs :: [String] -> [String] -> [(String, String)]