Safe Haskell | None |
---|---|
Language | Haskell2010 |
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 @DirectionFormat
DirectionFormatLong
Since: 0.1
DirectionFormatShort | Since: 0.1 |
DirectionFormatLong | Since: 0.1 |
Instances
Default DirectionFormat Source # | Since: 0.1 |
Defined in Data.Bytes.Formatting.Direction | |
Show DirectionFormat Source # | Since: 0.1 |
Defined in Data.Bytes.Formatting.Direction showsPrec :: Int -> DirectionFormat -> ShowS # show :: DirectionFormat -> String # showList :: [DirectionFormat] -> ShowS # | |
Eq DirectionFormat Source # | Since: 0.1 |
Defined in Data.Bytes.Formatting.Direction (==) :: 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 @DirectedFormatter
MkDirectedFormatter {caseFormat = CaseFormatLower, directionFormat = DirectionFormatLong}
Since: 0.1
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