Commit a5ebb1e8 by Zachary Snow

minor output cleanup

parent 4cbfd8fa
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment