cons
Constant function.
Representation of constructors. Note that equality on constructors with different types may not work -- i.e. the constructors for False and Nothing may compare equal.
Gets the field labels of a constructor. The list of labels is returned in the same order as they were given in the original constructor declaration.
Gets the fixity of a constructor
Gets the index of a constructor (algebraic datatypes only)
Public representation of constructors
Gets the public presentation of constructors
Gets the datatype of a constructor
O(1) cons is analogous to '(:)' for lists.
O(n) cons is analogous to (:) for lists, but of different complexity, as it requires a memcpy.
O(n) Adds a character to the front of a Text. This function is more costly than its List counterpart because it requires copying a new array. Subject to fusion.
O(n) Adds a character to the front of a Text. This function is more costly than its List counterpart because it requires copying a new array. Subject to fusion. Performs replacement on invalid scalar values.
O(1) cons is analogous to '(:)' for lists.
O(n) cons is analogous to (:) for lists, but of different complexity, as it requires a memcpy.
O(1) Unlike cons, 'cons\'' is strict in the ByteString that we are consing onto. More precisely, it forces the head and the first chunk. It does this because, for space efficiency, it may coalesce the new byte onto the first 'chunk' rather than starting a new 'chunk'.
So that means you can't use a lazy recursive contruction like this:
> let xs = cons\' c xs in xs
You can however use cons, as well as repeat and cycle, to build infinite lazy ByteStrings.
O(1) Unlike cons, 'cons\'' is strict in the ByteString that we are consing onto. More precisely, it forces the head and the first chunk. It does this because, for space efficiency, it may coalesce the new byte onto the first 'chunk' rather than starting a new 'chunk'.
So that means you can't use a lazy recursive contruction like this:
> let xs = cons\' c xs in xs
You can however use cons, as well as repeat and cycle, to build infinite lazy ByteStrings.
This library provides an infrastructure to build command line programs. It provides the following features:
* declare any number of "actions" (commands, or modes of operation, of the program);
* declare options of the program;
* collect options and actions from a configuration file and the command line, and execute the proper action.
It provides functionality similar to the "cmdargs" package. Main differences:
* console-program does not use unsafePerformIO, and tries to give a more haskellish, referentially transparent interface;
* it allows a full tree of "modes", instead of a list, so a command can have subcommands;
* it parses a configuration file, in addition to the command line arguments.
Version 0.2.0.1
Show more results