diff options
| author | hallgren <hallgren@chalmers.se> | 2012-10-16 13:01:03 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2012-10-16 13:01:03 +0000 |
| commit | 4c0c7a994be74b3c9b4d7ae9b2e5b0671e777813 (patch) | |
| tree | 3a8725bec83e1c3f5c25e3d40fdd9e33d52995ec /examples/tutorial | |
| parent | e2817244a26f7197f5106de75493e000e926debd (diff) | |
GF.Command.Command: turn CommandOutput into a newtype
The output from commands is represented as ([Expr],String), where the [Expr] is
used when data is piped between commands and the String is used for the final
output. The String can represent the same list of trees as the [Expr] and/or
contain diagnostic information.
Sometimes the data that is piped between commands is not a list of trees, but
e.g. a string or a list of strings. In those cases, functions like fromStrings
and toStrings are used to encode the data as a [Expr].
This patch introduces a newtype for CommandOutput and collects the functions
dealing with command output in one place to make it clearer what is going on.
It also makes it easier to change to a more direct representation of piped
data, and make pipes more "type safe", if desired.
Diffstat (limited to 'examples/tutorial')
0 files changed, 0 insertions, 0 deletions
