minor output cleanup

This commit is contained in:
Zachary Snow 2019-04-18 23:32:49 -04:00
parent 4cbfd8fa1a
commit a5ebb1e822
2 changed files with 5 additions and 2 deletions

View File

@ -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

View File

@ -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)