git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Update links to wiki (#2476)
612585aLiam Goodacre
src/Language/PureScript/Errors.hs+7−7
@@ -289,8 +289,8 @@ onTypesInErrorMessageM f (ErrorMessage hints simple) = ErrorMessage <$> traverse
289 gTypeSearch (TSBefore env) = pure (TSBefore env)
289 gTypeSearch (TSBefore env) = pure (TSBefore env)
290 gTypeSearch (TSAfter result) = TSAfter <$> traverse (traverse f) result
290 gTypeSearch (TSAfter result) = TSAfter <$> traverse (traverse f) result
291
291
292−wikiUri :: ErrorMessage -> Text
292+errorDocUri :: ErrorMessage -> Text
293−wikiUri e = "https://github.com/purescript/purescript/wiki/Error-Code-" <> errorCode e
293+errorDocUri e = "https://github.com/purescript/documentation/blob/master/errors/" <> errorCode e <> ".md"
294
294
295-- TODO Other possible suggestions:
295-- TODO Other possible suggestions:
296-- WildcardInferredType - source span not small enough
296-- WildcardInferredType - source span not small enough
@@ -373,7 +373,7 @@ data PPEOptions = PPEOptions
373 { ppeCodeColor :: Maybe (ANSI.ColorIntensity, ANSI.Color) -- ^ Color code with this color... or not
373 { ppeCodeColor :: Maybe (ANSI.ColorIntensity, ANSI.Color) -- ^ Color code with this color... or not
374 , ppeFull :: Bool -- ^ Should write a full error message?
374 , ppeFull :: Bool -- ^ Should write a full error message?
375 , ppeLevel :: Level -- ^ Should this report an error or a warning?
375 , 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?
377 }
377 }
378
378
379-- | Default options for PPEOptions
379-- | Default options for PPEOptions
@@ -382,7 +382,7 @@ defaultPPEOptions = PPEOptions
382 { ppeCodeColor = Just defaultCodeColor
382 { ppeCodeColor = Just defaultCodeColor
383 , ppeFull = False
383 , ppeFull = False
384 , ppeLevel = Error
384 , ppeLevel = Error
385− , ppeShowWiki = True
385+ , ppeShowDocs = True
386 }
386 }
387
387
388
388
@@ -390,7 +390,7 @@ defaultPPEOptions = PPEOptions
390-- Pretty print a single error, simplifying if necessary
390-- Pretty print a single error, simplifying if necessary
391--
391--
392prettyPrintSingleError :: PPEOptions -> ErrorMessage -> Box.Box
392prettyPrintSingleError :: 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
394 em <- onTypesInErrorMessageM replaceUnknowns (if full then e else simplifyErrorMessage e)
394 em <- onTypesInErrorMessageM replaceUnknowns (if full then e else simplifyErrorMessage e)
395 um <- get
395 um <- get
396 return (prettyPrintErrorMessage um em)
396 return (prettyPrintErrorMessage um em)
@@ -405,10 +405,10 @@ prettyPrintSingleError (PPEOptions codeColor full level showWiki) e = flip evalS
405 ] ++
405 ] ++
406 maybe [] (return . Box.moveDown 1) typeInformation ++
406 maybe [] (return . Box.moveDown 1) typeInformation ++
407 [ Box.moveDown 1 $ paras
407 [ Box.moveDown 1 $ paras
408− [ line $ "See " <> wikiUri e <> " for more information, "
408+ [ line $ "See " <> errorDocUri e <> " for more information, "
409 , line $ "or to contribute content related to this " <> levelText <> "."
409 , line $ "or to contribute content related to this " <> levelText <> "."
410 ]
410 ]
411− | showWiki
411+ | showDocs
412 ]
412 ]
413 where
413 where
414 typeInformation :: Maybe Box.Box
414 typeInformation :: Maybe Box.Box
src/Language/PureScript/Errors/JSON.hs+1−1
@@ -52,7 +52,7 @@ toJSONError verbose level e =
52 JSONError (toErrorPosition <$> sspan)
52 JSONError (toErrorPosition <$> sspan)
53 (P.renderBox (P.prettyPrintSingleError (P.PPEOptions Nothing verbose level False) (P.stripModuleAndSpan e)))
53 (P.renderBox (P.prettyPrintSingleError (P.PPEOptions Nothing verbose level False) (P.stripModuleAndSpan e)))
54 (P.errorCode e)
54 (P.errorCode e)
55− (P.wikiUri e)
55+ (P.errorDocUri e)
56 (P.spanName <$> sspan)
56 (P.spanName <$> sspan)
57 (P.runModuleName <$> P.errorModule e)
57 (P.runModuleName <$> P.errorModule e)
58 (toSuggestion e)
58 (toSuggestion e)
src/Language/PureScript/Interactive/Message.hs+3−3
@@ -27,8 +27,8 @@ helpMessage = "The following commands are available:\n\n " ++
27 ]
27 ]
28
28
29 extraHelp =
29 extraHelp =
30− "Further information is available on the PureScript wiki:\n" ++
30+ "Further information is available on the PureScript documentation repository:\n" ++
31− " --> https://github.com/purescript/purescript/wiki/psci"
31+ " --> https://github.com/purescript/documentation/blob/master/PSCi.md"
32
32
33-- | The welcome prologue.
33-- | The welcome prologue.
34prologueMessage :: String
34prologueMessage :: String
@@ -48,7 +48,7 @@ supportModuleMessage = unlines
48 , ""
48 , ""
49 , " psc-package install psci-support"
49 , " psc-package install psci-support"
50 , ""
50 , ""
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"
52 ]
52 ]
53
53
54-- | The quit message.
54-- | The quit message.