blarney
Copyright(c) Matthew Naylor 2019
(c) Alexandre Joannou 2019
LicenseMIT
Maintainermattfn@gmail.com
Stabilityexperimental
Safe HaskellSafe-Inferred

Blarney.Core.FShow

Description

Blarney's display statement can display values of any types in the FShow class. The FShow class supports generic deriving.

Synopsis

Documentation

data Format Source #

Format for displaying values in simulation

Constructors

Format [FormatItem] 

Instances

Instances details
Monoid Format #

Empty format

Instance details

Defined in Blarney.Core.FShow

Semigroup Format #

Format concatention

Instance details

Defined in Blarney.Core.FShow

Methods

(<>) :: Format -> Format -> Format #

sconcat :: NonEmpty Format -> Format

stimes :: Integral b => b -> Format -> Format

FShow Format # 
Instance details

Defined in Blarney.Core.FShow

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

formatBit :: DisplayArgRadix -> Maybe Int -> Bit n -> Format Source #

Convert bit vector to a format

formatCond :: Bit 1 -> Format -> Format Source #

Conditional format (empty if condition fails)

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

class FShow a where Source #

Minimal complete definition

Nothing

Methods

fshow :: a -> Format Source #

default fshow :: (Generic a, GFShow (Rep a)) => a -> Format Source #

fshowList :: [a] -> Format Source #

Instances

Instances details
FShow Format # 
Instance details

Defined in Blarney.Core.FShow

FShow Integer # 
Instance details

Defined in Blarney.Core.FShow

FShow () # 
Instance details

Defined in Blarney.Core.FShow

Methods

fshow :: () -> Format Source #

fshowList :: [()] -> Format Source #

FShow Char # 
Instance details

Defined in Blarney.Core.FShow

FShow Int # 
Instance details

Defined in Blarney.Core.FShow

FShow (Bit n) # 
Instance details

Defined in Blarney.Core.FShow

Methods

fshow :: Bit n -> Format Source #

fshowList :: [Bit n] -> Format Source #

FShow t => FShow (Option t) # 
Instance details

Defined in Blarney.Option

(IsTaggedUnion (TaggedUnion members), FShowMember members) => FShow (TaggedUnion members) # 
Instance details

Defined in Blarney.TaggedUnion

Methods

fshow :: TaggedUnion members -> Format Source #

fshowList :: [TaggedUnion members] -> Format Source #

FShow a => FShow [a] # 
Instance details

Defined in Blarney.Core.FShow

Methods

fshow :: [a] -> Format Source #

fshowList :: [[a]] -> Format Source #

FShow a => FShow (Vec n a) # 
Instance details

Defined in Blarney.Vector

Methods

fshow :: Vec n a -> Format Source #

fshowList :: [Vec n a] -> Format Source #

(FShow a, FShow b) => FShow (a, b) # 
Instance details

Defined in Blarney.Core.FShow

Methods

fshow :: (a, b) -> Format Source #

fshowList :: [(a, b)] -> Format Source #

(FShow a, FShow b, FShow c) => FShow (a, b, c) # 
Instance details

Defined in Blarney.Core.FShow

Methods

fshow :: (a, b, c) -> Format Source #

fshowList :: [(a, b, c)] -> Format Source #

(FShow a, FShow b, FShow c, FShow d) => FShow (a, b, c, d) # 
Instance details

Defined in Blarney.Core.FShow

Methods

fshow :: (a, b, c, d) -> Format Source #

fshowList :: [(a, b, c, d)] -> Format Source #

(FShow a, FShow b, FShow c, FShow d, FShow e) => FShow (a, b, c, d, e) # 
Instance details

Defined in Blarney.Core.FShow

Methods

fshow :: (a, b, c, d, e) -> Format Source #

fshowList :: [(a, b, c, d, e)] -> Format Source #

(FShow a, FShow b, FShow c, FShow d, FShow e, FShow f) => FShow (a, b, c, d, e, f) # 
Instance details

Defined in Blarney.Core.FShow

Methods

fshow :: (a, b, c, d, e, f) -> Format Source #

fshowList :: [(a, b, c, d, e, f)] -> Format Source #

class GFShow f where Source #

Methods

gfshow :: Bool -> f a -> Format Source #

Instances

Instances details
GFShow (U1 :: k -> Type) # 
Instance details

Defined in Blarney.Core.FShow

Methods

gfshow :: forall (a :: k0). Bool -> U1 a -> Format Source #

(GFShow a, GFShow b) => GFShow (a :*: b :: k -> Type) # 
Instance details

Defined in Blarney.Core.FShow

Methods

gfshow :: forall (a0 :: k0). Bool -> (a :*: b) a0 -> Format Source #

FShow a => GFShow (K1 i a :: k -> Type) # 
Instance details

Defined in Blarney.Core.FShow

Methods

gfshow :: forall (a0 :: k0). Bool -> K1 i a a0 -> Format Source #

(GFShow a, Constructor c) => GFShow (M1 C c a :: k -> Type) # 
Instance details

Defined in Blarney.Core.FShow

Methods

gfshow :: forall (a0 :: k0). Bool -> M1 C c a a0 -> Format Source #

GFShow a => GFShow (M1 D c a :: k -> Type) # 
Instance details

Defined in Blarney.Core.FShow

Methods

gfshow :: forall (a0 :: k0). Bool -> M1 D c a a0 -> Format Source #

(GFShow a, Selector c) => GFShow (M1 S c a :: k -> Type) # 
Instance details

Defined in Blarney.Core.FShow

Methods

gfshow :: forall (a0 :: k0). Bool -> M1 S c a a0 -> Format Source #