packages feed

eddie-1.0.0: eddie.1

.TH "eddie" "1" "" "" ""
.SH NAME
.PP
eddie \- run Haskell filters from the command line
.SH SYNOPSYS
.PP
\f[B]eddie\f[] [ \f[I]options\f[] ] [ \f[I]EXPRESSION\f[] ]
\f[I]FILE\f[] ...
.SH DESCRIPTION
.PP
\f[B]eddie\f[] evalutes the provided \f[I]EXPRESSION\f[] on either the
contents of the \f[I]FILE\f[] arguments concatenated together, or
standard input if no \f[I]FILE\f[] arguments are present.
.PP
The \f[C]\-\-lines\f[], \f[C]\-\-files\f[] and \f[C]\-\-names\f[]
options can be used to cause \f[I]expression\f[] to be used to process
each line, each file, or tuple of \f[C](name,\ content)\f[] for each
file, respectively.
The \f[C]\-\-lists\f[] option can be used with \f[C]\-\-lines\f[],
\f[C]\-\-files\f[] and \f[C]\-\-names\f[] to cause the \f[I]files\f[] to
be processed as a list instead of one element at a time.
.PP
The \f[C]ClassyPrelude\f[] module is used instead of the default
\f[C]Prelude\f[] when building expressions.
The default type for input and output is \f[C]Text\f[], but input or
both can be changed to \f[C]ByteString\f[] with the \f[C]\-\-binary\f[]
and \f[C]\-\-text\f[] options.
.PP
Other modules may be added with the \f[C]\-\-Module\f[] and
\f[C]\-\-module\f[] options.
.SH OPTIONS
.TP
.B \f[B]\-\-expression\f[]
The \f[B]\-\-expression\f[] \f[I]EXPRESSION\f[] (short form \f[B]\-e\f[]
\f[I]EXPRESSION\f[] ) option concatenates it\[aq]s value to the Haskell
expression being evaluated with a newline separator.
Multiple occurrences can be used to build up a multi\-line expression.
.RS
.PP
If no \f[B]\-e\f[] \f[I]EXPRESSION\f[] option is present, the first
non\-flag argument will be used for the Haskell expression.
.RE
.TP
.B \f[B]\-\-lines\f[]
The \f[B]\-\-lines\f[] (short form \f[B]\-l\f[]) option causes
\f[B]eddie\f[] to process the input one line at a time.
The \f[I]EXPRESSION\f[] will be run on each line and the results
concatenated together (using unlines).
.RS
.PP
The command
.IP
.nf
\f[C]
eddie\ \-l\ EXPRESSION\ file\ ...
\f[]
.fi
.PP
is equivalent to the command
.IP
.nf
\f[C]
eddie\ "unlines\ .\ map\ EXPRESSION\ \ .\ lines"\ file\ ...
\f[]
.fi
.PP
Note that the \f[B]\-\-lines\f[], \f[B]\-\-files\f[] and
\f[B]\-\-names\f[] options cannot be used together.
.RE
.TP
.B \f[B]\-\-files\f[]
The \f[B]\-\-files\f[] (short form \f[B]\-f\f[]) causes each file to be
processed individually.
.RS
.PP
Note that the \f[B]\-\-lines\f[], \f[B]\-\-files\f[] and
\f[B]\-\-names\f[] options cannot be used together.
.RE
.TP
.B \f[B]\-\-names\f[]
The \f[B]\-\-names\f[] (short form \f[B]\-n\f[]) causes each file to be
processed individually, as a tuple of \f[C](name,\ content)\f[].
.RS
.PP
Note that the \f[B]\-\-lines\f[], \f[B]\-\-files\f[] and
\f[B]\-\-names\f[] options cannot be used together.
.RE
.TP
.B \f[B]\-\-list\f[]
The \f[B]\-\-list\f[] (short form \f[B]\-L\f[]) option causes
\f[B]eddie\f[] to pass the expression a list of lines or files.
This requires one of the \f[B]\-\-list\f[], \f[B]\-\-files\f[] or
\f[B]\-\-names\f[] options be used.
.RS
.PP
The command
.IP
.nf
\f[C]
eddie\ \-l\ \-L\ EXPRESSION\ file\ ...
\f[]
.fi
.PP
is equivalent to the command
.IP
.nf
\f[C]
eddie\ "EXPRESSION\ .\ lines"\ file\ ...
\f[]
.fi
.RE
.TP
.B \f[B]\-\-binary\f[]
The \f[B]\-\-binary\f[] (short form \f[B]\-b\f[]) option changes the
data from \f[C]Text\f[] to \f[C]ByteString\f[].
This disable all processing of the input and output.
.RS
.RE
.TP
.B \f[B]\-\-lazy\f[]
The \f[B]\-\-lazy\f[] (no short form) option switches the data types to
their \f[I]lazy\f[] versions.
.RS
.PP
Note that using this is \f[B]NOT\f[] recommended unless you know what
you are doing.
It seems to break type checking, cause hangs, or incorrect results when
used.
Even if everything works as expected, using it improperly can
drastically increase memory usage and run time.
.RE
.TP
.B \f[B]\-\-text\f[]
The \f[B]\-\-text\f[] (short form \f[B]\-t\f[]) option switches the
output type back to \f[C]Text\f[] if the \f[B]\-\-binary\f[] or
\f[B]\-\-lazy\f[] option was used.
.RS
.PP
Using \f[B]\-\-text\f[] without \f[B]\-\-binary\f[] or \f[B]\-\-lazy\f[]
is an error.
.RE
.TP
.B \f[B]\-\-input\-encoding\f[]
The \f[B]\-\-input\-encoding\f[] \f[I]ENCODING\f[] (no short form)
option sets the encoding of the input file(s) to \f[I]ENCODING\f[].
.RS
.PP
It is an error to use \f[B]\-\-input\-encoding\f[] with
\f[B]\-\-binary\f[].
.RE
.TP
.B \f[B]\-\-output\-encoding\f[]
The \f[B]\-\-output\-encoding\f[] \f[I]ENCODING\f[] (no short form)
option sets the encoding of the output file to \f[I]ENCODING\f[].
.RS
.PP
It is an error to use \f[B]\-\-output\-encoding\f[] with
\f[B]\-\-binary\f[] unless \f[B]\-\-text\f[] is also specified.
.RE
.TP
.B \f[B]\-\-encoding\f[]
The \f[B]\-\-encoding\f[] \f[I]ENCODING\f[] (no short form) option sets
the encoding of all text files to \f[I]ENCODING\f[], whether for input
or output.
.RS
.PP
It is an error to use \f[B]\-\-encoding\f[] with \f[B]\-\-binary\f[]
unless \f[B]\-\-text\f[] is also specified.
.RE
.TP
.B \f[B]\-\-module\f[]
The \f[B]\-\-module\f[] \f[I]NAME\f[] (short form \f[B]\-m\f[]
\f[I]NAME\f[]) option is used to import module \f[I]NAME\f[] into
Haskell before evaluating the expression.
.RS
.RE
.TP
.B \f[B]\-\-Module\f[]
The \f[B]\-\-Module\f[] \f[I]NAME\f[],\f[I]AS\f[] (short form
\f[B]\-M\f[] \f[I]NAME\f[],\f[I]AS\f[]) option imports the \f[I]NAME\f[]
module using a qualified import with an as clause, with \f[I]AS\f[]
being the value for the as clause.
.RS
.RE
.TP
.B \f[B]\-\-extension\f[]
The \f[B]\-\-extension\f[] \f[I]EXTENSION\f[] (short form \f[B]\-X\f[]
\f[I]EXTENSION\f[]) option is used to enable the named GHC extension
when evaluating the expression.
.RS
.RE
.SH DIAGNOSTICS
.PP
If the command runs with no problems, eddie will exit with a status of
0.
If there are problems with the options, such that the expression is
never evaluated, then eddie will exit with a status of 1.
If Haskell returns an error \- probably a compilation problem \- then
eddie will exit with the status of 2.
.SH SEE ALSO
.PP
The wiki at <https://chiselapp.com/user/mwm/repository/eddie/wcontent>
for examples.
.SH BUGS
.PP
See the issues list at
<https://chiselapp.com/user/mwm/repository/eddie/rptview?rn=1>.
.SH AUTHOR
.PP
Mike Meyer <mwm@mired.org>