Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

changed checkName, still that function has to be reworked

  • Loading branch information...
commit 5e3a30a93a745611c9993a68c864c91592b2498f 1 parent 67a454b
Sebastian Niller authored
Showing with 3 additions and 4 deletions.
  1. +3 −4 Language/Atom/Elaboration.hs
View
7 Language/Atom/Elaboration.hs
@@ -367,12 +367,11 @@ addName name = do
put (st, (g, atom { atomNames = name : atomNames atom }))
return $ atomName atom ++ "." ++ name
--- still accepts some misformed names
+-- still accepts some misformed names, like "_.." or "_]["
checkName :: Name -> Atom ()
checkName name =
- if (\ x -> isAlpha x || x == '_') (head name) &&
- and (map (\ x -> isAlphaNum x || x `elem` "._-[]") (tail name)) &&
- and (map isAscii name)
+ if (\ x -> isAlpha x || x == '_') (head name) &&
+ and (map (\ x -> isAlphaNum x || x `elem` "._[]") (tail name))
then return ()
else error $ "ERROR: Name \"" ++ name ++ "\" is not a valid identifier."
Please sign in to comment.
Something went wrong with that request. Please try again.