git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Merge pull request #986 from hdgarrood/psci-help

Better psci help

commit87ae2b0c0e66b4c492102ffb6f79e7e2bf7a5ba5 authorPhil Freeman <paf31@cantab.net> dateThu 19 Mar 2015, 15:07 (12 years ago) parenta276b996941914
2 files changed+21−14
psci/Directive.hs+4−4 psci/PSCi.hs+17−10
psci/Directive.hs+4−4
@@ -102,12 +102,12 @@ help :: [(Directive, String, String)]
102102help =
103103 [ (Help, "", "Show this help menu")
104104 , (Quit, "", "Quit PSCi")
105− , (Reset, "", "Reset")
106− , (Browse, "<module>", "Browse <module>")
105+ , (Reset, "", "Discard all imported modules and declared bindings")
106+ , (Browse, "<module>", "See all functions in <module>")
107107 , (Load, "<file>", "Load <file> for importing")
108108 , (Type, "<expr>", "Show the type of <expr>")
109109 , (Kind, "<type>", "Show the kind of <type>")
110− , (Show, "import", "Show imported modules")
111− , (Show, "loaded", "Show loaded modules")
110+ , (Show, "import", "Show all imported modules")
111+ , (Show, "loaded", "Show all loaded modules")
112112 ]
113113
psci/PSCi.hs+17−10
@@ -124,17 +124,24 @@ expandTilde p = return p
124124--
125125helpMessage :: String
126126helpMessage = "The following commands are available:\n\n " ++
127− intercalate "\n " (map line D.help)
127+ intercalate "\n " (map line D.help) ++
128+ "\n\n" ++ extraHelp
128129 where
129− line :: (Directive, String, String) -> String
130− line (dir, arg, desc) = intercalate " "
131− [ cmd
132− , replicate (11 - length cmd) ' '
133− , arg
134− , replicate (11 - length arg) ' '
135− , desc
136− ]
137− where cmd = ":" ++ D.stringFor dir
130+ line :: (Directive, String, String) -> String
131+ line (dir, arg, desc) =
132+ let cmd = ':' : D.stringFor dir
133+ in intercalate " "
134+ [ cmd
135+ , replicate (11 - length cmd) ' '
136+ , arg
137+ , replicate (11 - length arg) ' '
138+ , desc
139+ ]
140+
141+ extraHelp =
142+ "Further information is available on the PureScript wiki:\n" ++
143+ " --> https://github.com/purescript/purescript/wiki/psci"
144+
138145
139146-- |
140147-- The welcome prologue.