case expr of
(EqLit id lit) ->
(mkIdExpr sigs id) AST.:=: (AST.PrimLit lit)
+ (Literal lit) ->
+ AST.PrimLit lit
+ (Eq a b) ->
+ (mkIdExpr sigs a) AST.:=: (mkIdExpr sigs b)
mkConcSm sigs (CondDef cond true false dst) = do
let cond_expr = mkIdExpr sigs cond
let name = TyCon.tyConName tycon in
-- TODO: Do something more robust than string matching
case Name.getOccString name of
- "Bit" -> Just bit_ty
+ "Bit" -> Just std_logic_ty
otherwise -> Nothing
otherwise -> Nothing
-- Shortcut
mkVHDLId :: String -> AST.VHDLId
-mkVHDLId = AST.unsafeVHDLBasicId
+mkVHDLId s =
+ AST.unsafeVHDLBasicId s'
+ where
+ -- Strip invalid characters.
+ s' = filter (`elem` ['a'..'z'] ++ ['0'..'9'] ++ ['_']) s