| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.Bytes.Formatting.Direction
Description
Provides formatters for Direction.
Since: 0.1
Synopsis
- data DirectionFormat
- _DirectionFormatShort :: Prism' DirectionFormat ()
- _DirectionFormatLong :: Prism' DirectionFormat ()
- data DirectedFormatter = MkDirectedFormatter {}
- formatDirection :: Directed a => DirectedFormatter -> a -> Text
- directedFormatterUnix :: DirectedFormatter
- directedFormatterVerbose :: DirectedFormatter
Documentation
data DirectionFormat Source #
Determines how to format the direction units.
Examples
>>>def @DirectionFormatDirectionFormatLong
Since: 0.1
Constructors
| DirectionFormatShort | Since: 0.1 |
| DirectionFormatLong | Since: 0.1 |
Instances
| Show DirectionFormat Source # | Since: 0.1 |
Defined in Data.Bytes.Formatting.Direction Methods showsPrec :: Int -> DirectionFormat -> ShowS # show :: DirectionFormat -> String # showList :: [DirectionFormat] -> ShowS # | |
| Default DirectionFormat Source # | Since: 0.1 |
Defined in Data.Bytes.Formatting.Direction Methods | |
| Eq DirectionFormat Source # | Since: 0.1 |
Defined in Data.Bytes.Formatting.Direction Methods (==) :: DirectionFormat -> DirectionFormat -> Bool # (/=) :: DirectionFormat -> DirectionFormat -> Bool # | |
_DirectionFormatShort :: Prism' DirectionFormat () Source #
Since: 0.1
_DirectionFormatLong :: Prism' DirectionFormat () Source #
Since: 0.1
data DirectedFormatter Source #
Formats bytes over floating types.
Examples
>>>def @DirectedFormatterMkDirectedFormatter {caseFormat = CaseFormatLower, directionFormat = DirectionFormatLong}
Since: 0.1
Constructors
| MkDirectedFormatter | |
Fields | |
Instances
formatDirection :: Directed a => DirectedFormatter -> a -> Text Source #
Formats a directed value with the given formatter.
Since: 0.1
directedFormatterUnix :: DirectedFormatter Source #
"unix"-style formatter:
- Upper case.
- Short spelling.
For example: 7 U.
Since: 0.1
directedFormatterVerbose :: DirectedFormatter Source #
Verbose formatter:
- Lower case.
- Full spelling.
For example: 7 down.
Since: 0.1