Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
ghc-mod
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
Daniel Gröber
ghc-mod
Commits
96c2207f
Commit
96c2207f
authored
Jun 09, 2017
by
Huw Campbell
Committed by
Daniel Gröber
Oct 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better optparse error for unknown commands
parent
8e4cef7f
Pipeline
#34378627
failed with stage
in 35 minutes and 36 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
ghc-mod.cabal
ghc-mod.cabal
+2
-2
Options.hs
src/GhcMod/Exe/Options.hs
+4
-4
No files found.
ghc-mod.cabal
View file @
96c2207f
...
...
@@ -145,7 +145,7 @@ Library
, hlint < 2.1 && >= 2.0.8
, monad-control < 1.1 && >= 1
, monad-journal < 0.8 && >= 0.4
, optparse-applicative < 0.1
4 && >= 0.13.0.0
, optparse-applicative < 0.1
5 && >= 0.14
, pipes < 4.4 && >= 4.1
, safe < 0.4 && >= 0.3.9
, semigroups < 0.19 && >= 0.10.0
...
...
@@ -184,7 +184,7 @@ Executable ghc-mod
, base < 4.11 && >= 4.6.0.1
, fclabels < 2.1 && >= 2.0
, monad-control < 1.1 && >= 1
, optparse-applicative < 0.1
4 && >= 0.13.0.0
, optparse-applicative < 0.1
5 && >= 0.14
, semigroups < 0.19 && >= 0.10.0
, split < 0.3 && >= 0.2.2
...
...
src/GhcMod/Exe/Options.hs
View file @
96c2207f
...
...
@@ -63,10 +63,10 @@ helpVersion =
r
::
ReadM
(
a
->
a
)
r
=
do
v
<-
readerAsk
case
v
of
"help"
->
readerAbort
ShowHelpText
"version"
->
readerAbort
$
InfoMsg
ghcModVersion
_
->
return
id
readerAbort
$
case
v
of
"help"
->
ShowHelpText
"version"
->
InfoMsg
ghcModVersion
_
->
UnexpectedError
v
(
SomeParser
argAndCmdSpec
)
argAndCmdSpec
::
Parser
(
Options
,
GhcModCommands
)
argAndCmdSpec
=
(,)
<$>
globalArgSpec
<*>
commandsSpec
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment