eddie-0.5.1: eddie.md
% eddie(1)
NAME
====
eddie \- run haskell filters from the command line
SYNOPSYS
========
**eddie** [ *options* ] [ *expr* ] *file* ...
DESCRIPTION
===========
**eddie** evalutes the provided *expression* on either the contents of
*the file* arguments concatenated together, or standard input if no
*file arguments are present.
The **--line**, **--file** and **--list** options can be used to cause
*expression* to be used to process each line, each file, or a list of
files or lines respectively.
The prelude, `Data.List` and `Data.Char` modules are available for building
expressions. Other modules may be added with the **--Modules** and
**--modules** options.
OPTIONS
=======
**--expr**
: The **--expr** *expr* (short form **-e** *expr* ) option
concatenates it's value to the haskell expression being evaluated
with a newline separator. Multiple occurrences can be used to
build up a multi-line expression.
If no **-e** *expr* option is present, the first non-flag argument
will be used for the haskell expression.
**--line**
: The **--line** (short form **-l**) option causes **eddie** to
process input line at a time. The *expr* will be run on each line
and the results concatenated together (using unlines).
The command
```
eddie -l *expr file* ...
```
is equivalent to the command
```
eddie "unlines . map *expr* . lines" *file* ...
```
**--file**
: The **--file** (short form **-f**) causes each file to be processed
individually.
Note that the **-l** and **-f** options cannot be used together.
**--list**
: The **--list** (short form **-L**) option causes **eddie** to pass
the expression a list of lines or files. This requires one of the
**-l** or **-f** options be used.
The command
```
eddie -lL *expr file* ...
```
is equivalent to the command
```
eddie "unlines . *expr* . lines" filei ...
```
**--binary**
: The **--binary** (short form **-b**) option switches the output mode
to binary. It also disables the maybe newline processing.
Normally **eddie** will output a final newline if the last
character of the input is not a newline to place the prompt
properly. If the **-b** option is used, the final newline will
not be output.
**--modules**
: The **--modules** *name* (short form **-m** *name*) option is used
to import module *name* into haskell before evaluating the
expression.
**--Modules**
: The **--Modules** *name*,*as* (short form **-M** *name*,*as*) option
imports the *name* module using a qualified import with an as
clause, with *as* being the value for the as clause.
DIAGNOSTICS
===========
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.
SEE ALSO
========
The wiki at <https://chiselapp.com/user/mwm/repository/eddie/wcontent>
for examples.
BUGS
====
See the issues list at <https://chiselapp.com/user/mwm/repository/eddie/rptview?rn=1>.
AUTHOR
======
Mike Meyer <mwm@mired.org>