Let the exec function output something.
[matthijs/master-project/cλash.git] / VHDL.hs
diff --git a/VHDL.hs b/VHDL.hs
index 1c7eba9ea2e848fbca70c620357e1b0e9fb09f85..37bcd74c461a8f4b2b9b57fe2f2d411257f77dca 100644 (file)
--- a/VHDL.hs
+++ b/VHDL.hs
@@ -326,4 +326,8 @@ vhdl_ty_maybe ty =
 
 -- Shortcut
 mkVHDLId :: String -> AST.VHDLId
-mkVHDLId = AST.unsafeVHDLBasicId
+mkVHDLId s = 
+  AST.unsafeVHDLBasicId s'
+  where
+    -- Strip invalid characters.
+    s' = filter (`elem` ['A'..'Z'] ++ ['a'..'z'] ++ ['0'..'9'] ++ "_.") s