git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Update links to wiki (#2476)
commit612585a161f6ee2c1af10e74899767e66fb8b5b4 authorLiam Goodacre <goodacre.liam@gmail.com> dateSat 17 Dec 2016, 18:30 (10 years ago) parent4248ad1
3 files changed+11−11
src/Language/PureScript/Errors.hs+7−7 src/Language/PureScript/Errors/JSON.hs+1−1 src/Language/PureScript/Interactive/Message.hs+3−3
src/Language/PureScript/Errors.hs+7−7
@@ -289,8 +289,8 @@ onTypesInErrorMessageM f (ErrorMessage hints simple) = ErrorMessage <$> traverse
289289 gTypeSearch (TSBefore env) = pure (TSBefore env)
290290 gTypeSearch (TSAfter result) = TSAfter <$> traverse (traverse f) result
291291
292−wikiUri :: ErrorMessage -> Text
293−wikiUri e = "https://github.com/purescript/purescript/wiki/Error-Code-" <> errorCode e
292+errorDocUri :: ErrorMessage -> Text
293+errorDocUri e = "https://github.com/purescript/documentation/blob/master/errors/" <> errorCode e <> ".md"
294294
295295-- TODO Other possible suggestions:
296296-- WildcardInferredType - source span not small enough
@@ -373,7 +373,7 @@ data PPEOptions = PPEOptions
373373 { ppeCodeColor :: Maybe (ANSI.ColorIntensity, ANSI.Color) -- ^ Color code with this color... or not
374374 , ppeFull :: Bool -- ^ Should write a full error message?
375375 , ppeLevel :: Level -- ^ Should this report an error or a warning?
376− , ppeShowWiki :: Bool -- ^ Should show a link to error message's wiki page?
376+ , ppeShowDocs :: Bool -- ^ Should show a link to error message's doc page?
377377 }
378378
379379-- | Default options for PPEOptions
@@ -382,7 +382,7 @@ defaultPPEOptions = PPEOptions
382382 { ppeCodeColor = Just defaultCodeColor
383383 , ppeFull = False
384384 , ppeLevel = Error
385− , ppeShowWiki = True
385+ , ppeShowDocs = True
386386 }
387387
388388
@@ -390,7 +390,7 @@ defaultPPEOptions = PPEOptions
390390-- Pretty print a single error, simplifying if necessary
391391--
392392prettyPrintSingleError :: PPEOptions -> ErrorMessage -> Box.Box
393−prettyPrintSingleError (PPEOptions codeColor full level showWiki) e = flip evalState defaultUnknownMap $ do
393+prettyPrintSingleError (PPEOptions codeColor full level showDocs) e = flip evalState defaultUnknownMap $ do
394394 em <- onTypesInErrorMessageM replaceUnknowns (if full then e else simplifyErrorMessage e)
395395 um <- get
396396 return (prettyPrintErrorMessage um em)
@@ -405,10 +405,10 @@ prettyPrintSingleError (PPEOptions codeColor full level showWiki) e = flip evalS
405405 ] ++
406406 maybe [] (return . Box.moveDown 1) typeInformation ++
407407 [ Box.moveDown 1 $ paras
408− [ line $ "See " <> wikiUri e <> " for more information, "
408+ [ line $ "See " <> errorDocUri e <> " for more information, "
409409 , line $ "or to contribute content related to this " <> levelText <> "."
410410 ]
411− | showWiki
411+ | showDocs
412412 ]
413413 where
414414 typeInformation :: Maybe Box.Box
src/Language/PureScript/Errors/JSON.hs+1−1
@@ -52,7 +52,7 @@ toJSONError verbose level e =
5252 JSONError (toErrorPosition <$> sspan)
5353 (P.renderBox (P.prettyPrintSingleError (P.PPEOptions Nothing verbose level False) (P.stripModuleAndSpan e)))
5454 (P.errorCode e)
55− (P.wikiUri e)
55+ (P.errorDocUri e)
5656 (P.spanName <$> sspan)
5757 (P.runModuleName <$> P.errorModule e)
5858 (toSuggestion e)
src/Language/PureScript/Interactive/Message.hs+3−3
@@ -27,8 +27,8 @@ helpMessage = "The following commands are available:\n\n " ++
2727 ]
2828
2929 extraHelp =
30− "Further information is available on the PureScript wiki:\n" ++
31− " --> https://github.com/purescript/purescript/wiki/psci"
30+ "Further information is available on the PureScript documentation repository:\n" ++
31+ " --> https://github.com/purescript/documentation/blob/master/PSCi.md"
3232
3333-- | The welcome prologue.
3434prologueMessage :: String
@@ -48,7 +48,7 @@ supportModuleMessage = unlines
4848 , ""
4949 , " psc-package install psci-support"
5050 , ""
51− , "For help getting started, visit http://wiki.purescript.org/PSCi"
51+ , "For help getting started, visit https://github.com/purescript/documentation/blob/master/PSCi.md"
5252 ]
5353
5454-- | The quit message.