hex-0.2.0: Convert strings into hexadecimal and back.
Copyright(c) Taru Karttunen 2009
LicenseBSD-style
Maintainertaruti@taruti.net
Stabilityprovisional
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Hex

Description

Convert strings into hexadecimal and back.

Synopsis
  • class Hex t where
    • hex :: t -> t
    • unhex :: t -> Either String t
    • unhexM :: MonadFail m => t -> m t

Documentation

class Hex t where Source #

Convert strings into hexadecimal and back.

Minimal complete definition

hex, unhex

Methods

hex :: t -> t Source #

Convert string into hexadecimal.

unhex :: t -> Either String t Source #

Convert from hexadecimal and fail on invalid input.

unhexM :: MonadFail m => t -> m t Source #

Convert from hexadecimal and fail on invalud input.

Instances

Instances details
Hex ByteString Source # 
Instance details

Defined in Data.Hex

Methods

hex :: ByteString -> ByteString Source #

unhex :: ByteString -> Either String ByteString Source #

unhexM :: MonadFail m => ByteString -> m ByteString Source #

Hex ByteString Source # 
Instance details

Defined in Data.Hex

Methods

hex :: ByteString -> ByteString Source #

unhex :: ByteString -> Either String ByteString Source #

unhexM :: MonadFail m => ByteString -> m ByteString Source #

Hex String Source # 
Instance details

Defined in Data.Hex

Methods

hex :: String -> String Source #

unhex :: String -> Either String String Source #

unhexM :: MonadFail m => String -> m String Source #