uu -is:package

Uuencoding is notoriously badly specified. This implementation aims at being compatible with the GNU Sharutils (http://www.gnu.org/software/sharutils/). Just like Base64 encoding uuencoding expands blocks of 3 bytes into blocks of 4 bytes. There is however no well defined ending to a piece of encoded data, instead uuencoded data is commonly transferred linewise where each line is prepended with the length of the data in the line. This module currently only deals with the encoding. Chopping the encoded data into lines, and unchopping lines into encoded data is left as an exercise to the reader. (Patches are welcome.)
Is the "module" a reexport?
Reason
Unusable unit
Parses the string str and verify if it is a UUID. The function accepts the following syntax:
  • simple forms (e.g. f81d4fae-7dec-11d0-a765-00a0c91e6bf6)
Note that hyphens are required within the UUID string itself, as per the aforementioned RFC. Since: 2.52
Generates a random UUID (RFC 4122 version 4) as a string. It has the same randomness guarantees as Rand, so must not be used for cryptographic purposes such as key generation, nonces, salts or one-time pads. Since: 2.52
Decoder of the UUID values.
Encoder of UUID values.
New path to which the user will be moved.
New name for the user.
Name of the user to be updated.
Generates a bitvector uniformly distributed over the provided range (interpreted as a range of unsigned bitvectors), which is interpreted as inclusive in the lower and upper bound. (See uniformRM).
Be careful: providing Nothing to a field created by optionalTableField updates the field to its default value. Many users have been confused by this because they assume it means that the field is to be left unchanged. For an easier time wrap your update function in updateEasy.
Decoding function for the final block. The final block has to have a size of 0 or 4:
>>> uuDecodeFinal $ Data.ByteString.Char8.pack "9F\\"
Just "fo"

>>> uuDecodeFinal $ Data.ByteString.Char8.pack ""
Just ""

>>> uuDecodeFinal $ Data.ByteString.Char8.pack "9F¬"
Nothing
But it must be the encoding of a block that is less than 3 bytes:
>>> uuDecodeFinal $ encode $ Data.ByteString.Char8.pack "foo"
Nothing
Decoding function. Decode as large a portion of the input as possible. Enough data is allocated for the output to ensure that the remainder is less than 4 bytes in size. Success result in a Right value:
>>> uuDecodePart $ Data.ByteString.Char8.pack "9F]O"
Right ("foo","")

>>> uuDecodePart $ Data.ByteString.Char8.pack "9F]O8F$"
Right ("foo","8F$")
Failures occur on bad input and result in a Left value:
>>> uuDecodePart $ Data.ByteString.Char8.pack "9F 0"
Left ("","9F 0")
Encoding function for the final block. The final block has to have a size less than 3.
>>> uuEncodeFinal $ Data.ByteString.Char8.pack "r"
Just "<@"
Trying to pass in too large a block result in failure:
>>> uuEncodeFinal $ Data.ByteString.Char8.pack "foo"
Nothing
Encoding function. This function encodes as large a portion of the input as possible and returns the encoded part together with the remaining part. Enough space is allocated for the encoding to make sure that the remaining part is less than 3 bytes long, which means it can be passed to uu_encode_final as is.
>>> uuEncodePart $ Data.ByteString.Char8.pack "foo"
("9F]O","")

>>> uuEncodePart $ Data.ByteString.Char8.pack "foob"
("9F]O","b")
UUID.
DataType for UUID columns. The pgCryptoGenRandomUUID function in the PgCrypto extension can be used to generate UUIDs at random.