Commit 84986cc1 by Zachary Snow

fix errant reordering on cs/ps alias idents

parent 24a79ffe
......@@ -656,12 +656,8 @@ traverseTypeIdentsM identMapper = fullMapper
fullMapper = typeMapper
>=> traverseTypeExprsM (traverseExprIdentsM identMapper)
>=> traverseSinglyNestedTypesM fullMapper
typeMapper (Alias x t) = aliasHelper (Alias ) x t
typeMapper (PSAlias p x t) = aliasHelper (PSAlias p ) x t
typeMapper (CSAlias c p x t) = aliasHelper (CSAlias c p) x t
typeMapper (Alias x t) = identMapper x >>= return . flip Alias t
typeMapper other = return other
aliasHelper constructor x t =
identMapper x >>= \x' -> return $ constructor x' t
-- visits all identifiers in an LHS
traverseLHSIdentsM :: Monad m => MapperM m Identifier -> MapperM m LHS
......
package P;
typedef logic T;
endpackage
package Q;
typedef logic [7:0] U;
endpackage
`define DUMP(x) initial $display(`"x: %0d %b`", $bits(x), x);
module top;
P::T a;
import Q::U;
typedef U T;
U b;
T c;
`DUMP(a)
`DUMP(b)
`DUMP(c)
endmodule
`define DUMP(x) initial $display(`"x: %0d %b`", $bits(x), x);
module top;
wire a;
wire [7:0] b, c;
`DUMP(a)
`DUMP(b)
`DUMP(c)
endmodule
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