Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
ghc-geode
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Projet GEODE
ghc-geode
Commits
a5c32cfa
Commit
a5c32cfa
authored
1 year ago
by
Alice Brenon
Browse files
Options
Downloads
Patches
Plain Diff
Expose the xmlOutput parser separately
parent
9802e63c
Branches
output-options
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/GEODE/Options.hs
+16
-11
16 additions, 11 deletions
lib/GEODE/Options.hs
with
16 additions
and
11 deletions
lib/GEODE/Options.hs
+
16
−
11
View file @
a5c32cfa
...
...
@@ -5,7 +5,8 @@ module GEODE.Options
,
Output
(
..
)
,
input
,
ioConfig
,
output
)
where
,
output
,
xmlOutput
)
where
import
Control.Applicative
((
<|>
))
import
Data.List.NonEmpty
(
NonEmpty
(
..
))
...
...
@@ -21,24 +22,28 @@ input stdinSemantics =
argument
(
File
<$>
str
)
(
value
StdIn
<>
metavar
"INPUT_FILE"
<>
help
(
printf
"path of the file to process (%s)"
stdinSemantics
)
)
<>
metavar
"INPUT_FILE"
<>
help
(
printf
"path of the file to process (%s)"
stdinSemantics
)
)
data
Output
=
Metadata
|
TextRoot
FilePath
|
XMLRoot
FilePath
xmlOutput
::
Parser
FilePath
xmlOutput
=
strOption
(
long
"xml-root"
<>
metavar
"DIRECTORY"
<>
short
'x'
<>
help
"Root path where to output XML files"
)
output
::
Parser
Output
output
=
flag'
Metadata
(
long
"metadata"
<>
short
'm'
<>
help
"Print metadata for splitted files on stdout"
)
<>
short
'm'
<>
help
"Print metadata for splitted files on stdout"
)
<|>
(
TextRoot
<$>
strOption
(
long
"text-root"
<>
short
't'
<>
help
"Root path where to output text files"
))
<|>
(
XMLRoot
<$>
strOption
(
long
"xml-root"
<>
short
'x'
<>
help
"Root path where to output XML files"
))
<>
metavar
"DIRECTORY"
<>
short
't'
<>
help
"Root path where to output text files"
))
<|>
(
XMLRoot
<$>
xmlOutput
)
data
IOConfig
=
IOConfig
{
from
::
Input
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment