Copyright | (c) Matthew Naylor 2019 (c) Alexandre Joannou 2019 |
---|---|
License | MIT |
Maintainer | mattfn@gmail.com |
Stability | experimental |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
Blarney.Core.FShow
Description
Synopsis
- data Format = Format [FormatItem]
- type FormatItem = (DisplayArg, Maybe BV)
- formatString :: String -> Format
- formatBit :: DisplayArgRadix -> Maybe Int -> Bit n -> Format
- formatCond :: Bit 1 -> Format -> Format
- formatBin :: Int -> Bit n -> Format
- formatDec :: Int -> Bit n -> Format
- formatHex :: Int -> Bit n -> Format
- class FShow a where
- class GFShow f where
Documentation
Format for displaying values in simulation
Constructors
Format [FormatItem] |
type FormatItem = (DisplayArg, Maybe BV) Source #
A format item is a display arg, tagged with a bit vector
formatString :: String -> Format Source #
Convert a string to a format
formatBin :: Int -> Bit n -> Format Source #
Format bit vector in binary with given amount of zero padding
formatDec :: Int -> Bit n -> Format Source #
Format bit vector in decimal with given amount of zero padding
formatHex :: Int -> Bit n -> Format Source #
Format bit vector in hex with given amount of zero padding
Minimal complete definition
Nothing
Methods
Instances
FShow Format # | |
FShow Integer # | |
FShow () # | |
FShow Char # | |
FShow Int # | |
FShow (Bit n) # | |
FShow t => FShow (Option t) # | |
(IsTaggedUnion (TaggedUnion members), FShowMember members) => FShow (TaggedUnion members) # | |
Defined in Blarney.TaggedUnion Methods fshow :: TaggedUnion members -> Format Source # fshowList :: [TaggedUnion members] -> Format Source # | |
FShow a => FShow [a] # | |
FShow a => FShow (Vec n a) # | |
(FShow a, FShow b) => FShow (a, b) # | |
(FShow a, FShow b, FShow c) => FShow (a, b, c) # | |
(FShow a, FShow b, FShow c, FShow d) => FShow (a, b, c, d) # | |
(FShow a, FShow b, FShow c, FShow d, FShow e) => FShow (a, b, c, d, e) # | |
(FShow a, FShow b, FShow c, FShow d, FShow e, FShow f) => FShow (a, b, c, d, e, f) # | |