@@ -5,7 +5,7 @@ module Reporting.Helpers
55 , nameToDoc
66 , args, moreArgs
77 , toSimpleNote, toSimpleHint, toFancyHint
8− , link, reflowLink
8+ , link, reflowLink, makeLink
99 , stack, reflow
1010 , commaSep, capitalize, ordinalize, drawCycle
1111 , findPotentialTypos, findTypoPairs, vetTypos
@@ -88,7 +88,7 @@ link word before fileName after =
8888
8989makeLink :: String -> String
9090makeLink fileName =
91− "<http://elm-lang.org/hints/" <> Pkg.versionToString Compiler.version <> "/" <> fileName <> ".md>"
91+ "<https://elm-lang.org/hints/" <> Pkg.versionToString Compiler.version <> "/" <> fileName <> ">"
9292
9393
9494reflowLink :: String -> String -> String -> Doc
@@ -164,17 +164,10 @@ ordinalize number =
164164drawCycle :: [N.Name] -> Doc
165165drawCycle names =
166166 let
167− topLine =
168− "┌─────┐"
169−
170− nameLine name =
171− "│ " <> dullyellow (textToDoc name)
172−
173− midLine =
174− "│ ↓"
175−
176− bottomLine =
177− "└─────┘"
167+ topLine = "┌─────┐"
168+ nameLine name = "│ " <> dullyellow (nameToDoc name)
169+ midLine = "│ ↓"
170+ bottomLine = "└─────┘"
178171 in
179172 vcat (topLine : List.intersperse midLine (map nameLine names) ++ [ bottomLine ])
180173
@@ -185,7 +178,7 @@ drawCycle names =
185178
186179findPotentialTypos :: [String] -> String -> [String]
187180findPotentialTypos knownNames badName =
188− filter ((==1) . distance badName) knownNames
181+ filter (\name -> distance badName name == 1) knownNames
189182
190183
191184findTypoPairs :: [String] -> [String] -> [(String, String)]