mirror of https://github.com/zachjs/sv2v.git
minor output cleanup
This commit is contained in:
parent
4cbfd8fa1a
commit
a5ebb1e822
|
|
@ -67,10 +67,13 @@ traverseType :: Type -> Writer Enums Type
|
|||
traverseType (Enum t v rs) = do
|
||||
let baseType = toBaseType t
|
||||
let (tf, r) = typeRanges baseType
|
||||
() <- tell $ Set.singleton (r, v)
|
||||
() <- tell $ Set.singleton (map simplifyRange r, v)
|
||||
return $ tf (r ++ rs)
|
||||
traverseType other = return other
|
||||
|
||||
simplifyRange :: Range -> Range
|
||||
simplifyRange (a, b) = (simplify a, simplify b)
|
||||
|
||||
-- drop any enum type casts in favor of implicit conversion from the
|
||||
-- converted type
|
||||
traverseExpr :: Expr -> Expr
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ data Type
|
|||
instance Show Type where
|
||||
show (Alias xx rs) = printf "%s%s" xx (showRanges rs)
|
||||
show (Net kw rs) = printf "%s%s" (show kw) (showRanges rs)
|
||||
show (Implicit sg rs) = printf "%s%s" (show sg) (showRanges rs)
|
||||
show (Implicit sg rs) = printf "%s%s" (showPad sg) (dropWhile (== ' ') $ showRanges rs)
|
||||
show (IntegerVector kw sg rs) = printf "%s%s%s" (show kw) (showPadBefore sg) (showRanges rs)
|
||||
show (IntegerAtom kw sg ) = printf "%s%s" (show kw) (showPadBefore sg)
|
||||
show (NonInteger kw ) = printf "%s" (show kw)
|
||||
|
|
|
|||
Loading…
Reference in New Issue