projects
/
matthijs
/
master-project
/
cλash.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Let the exec function output something.
[matthijs/master-project/cλash.git]
/
VHDL.hs
diff --git
a/VHDL.hs
b/VHDL.hs
index b85d6ff0be288e7db0ec57ca886fae79cbc6ec09..37bcd74c461a8f4b2b9b57fe2f2d411257f77dca 100644
(file)
--- a/
VHDL.hs
+++ b/
VHDL.hs
@@
-320,10
+320,14
@@
vhdl_ty_maybe ty =
let name = TyCon.tyConName tycon in
-- TODO: Do something more robust than string matching
case Name.getOccString name of
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
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'] ++ ['a'..'z'] ++ ['0'..'9'] ++ "_.") s