Copyright | (C) 2012-2016 University of Twente 2016 Myrtle Software Ltd 2021 QBayLogic B.V. |
---|---|
License | BSD2 (see the file LICENSE) |
Maintainer | QBayLogic B.V. <devops@qbaylogic.com> |
Safe Haskell | None |
Language | Haskell2010 |
PrettyPrec printing class and instances for CoreHW
Synopsis
- class PrettyPrec p where
- data PrettyOptions = PrettyOptions {}
- type ClashDoc = Doc ClashAnnotation
- data ClashAnnotation
- data SyntaxElement
- ppr :: PrettyPrec p => p -> ClashDoc
- ppr' :: PrettyPrec p => PrettyOptions -> p -> ClashDoc
- showPpr :: PrettyPrec p => p -> String
- showPpr' :: PrettyPrec p => PrettyOptions -> p -> String
- tracePprId :: PrettyPrec p => p -> p
- tracePpr :: PrettyPrec p => p -> a -> a
- fromPpr :: PrettyPrec a => a -> Doc ()
Documentation
class PrettyPrec p where Source #
PrettyPrec printing Show-like typeclass
pprPrec :: Monad m => Rational -> p -> m ClashDoc Source #
pprPrec' :: Monad m => PrettyOptions -> Rational -> p -> m ClashDoc Source #
Instances
data PrettyOptions Source #
Options for the pretty-printer, controlling which elements to hide.
PrettyOptions | |
|
Instances
Default PrettyOptions Source # | |
Defined in Clash.Core.Pretty def :: PrettyOptions # |
type ClashDoc = Doc ClashAnnotation Source #
Clash's specialized Doc
type holds metadata of type ClashAnnotation
.
data ClashAnnotation Source #
Annotations carried on pretty-printed code.
AnnContext CoreContext | marking navigation to a different context |
AnnSyntax SyntaxElement | marking a specific sort of syntax |
Instances
Eq ClashAnnotation Source # | |
Defined in Clash.Core.Pretty (==) :: ClashAnnotation -> ClashAnnotation -> Bool # (/=) :: ClashAnnotation -> ClashAnnotation -> Bool # |
data SyntaxElement Source #
Specific places in the program syntax.
Instances
Eq SyntaxElement Source # | |
Defined in Clash.Core.Pretty (==) :: SyntaxElement -> SyntaxElement -> Bool # (/=) :: SyntaxElement -> SyntaxElement -> Bool # | |
Show SyntaxElement Source # | |
Defined in Clash.Core.Pretty showsPrec :: Int -> SyntaxElement -> ShowS # show :: SyntaxElement -> String # showList :: [SyntaxElement] -> ShowS # |
ppr :: PrettyPrec p => p -> ClashDoc Source #
ppr' :: PrettyPrec p => PrettyOptions -> p -> ClashDoc Source #
showPpr :: PrettyPrec p => p -> String Source #
Print a PrettyPrec thing to a String
showPpr' :: PrettyPrec p => PrettyOptions -> p -> String Source #
tracePprId :: PrettyPrec p => p -> p Source #
tracePpr :: PrettyPrec p => p -> a -> a Source #
fromPpr :: PrettyPrec a => a -> Doc () Source #
Orphan instances
Pretty LitTy Source # | |
ClashPretty Type Source # | |
clashPretty :: Type -> Doc () Source # | |
ClashPretty Term Source # | |
clashPretty :: Term -> Doc () Source # | |
ClashPretty (Name a) Source # | |
clashPretty :: Name a -> Doc () Source # | |
ClashPretty (Var a) Source # | |
clashPretty :: Var a -> Doc () Source # |