@@ -50,17 +50,17 @@ unusedName = "_"
51properToIL :: Text -> Text
51properToIL :: Text -> Text
52properToIL name
52properToIL name
53− | nameIsILReserved name || nameIsILBuiltIn name || prefixIsReserved name = name <> "ˉ"
53+ | nameIsILReserved name = "ˉ" <> name
54 | otherwise = T.concatMap identCharToText name
54 | otherwise = T.concatMap identCharToText name
56-- | Attempts to find a human-readable name for a symbol, if none has been specified returns the
56-- | Attempts to find a human-readable name for a symbol, if none has been specified returns the
57-- ordinal value.
57-- ordinal value.
58identCharToText :: Char -> Text
58identCharToText :: Char -> Text
59−identCharToText 'ṩ' = "ᵤṩ"
59+identCharToText 'ṩ' = "_ṩ"
60identCharToText c | isAlphaNum c = T.singleton c
60identCharToText c | isAlphaNum c = T.singleton c
61identCharToText '_' = "_"
61identCharToText '_' = "_"
62−identCharToText '\'' = "ᵖ"
62+identCharToText '\'' = "ꞌ" -- lowercase saltillo
63−identCharToText c = "ᵤ" <> T.pack (show (ord c))
63+identCharToText c = error (show (ord c)) -- TODO: should never occur now(?)
65moduleProperToIL :: Text -> Text
65moduleProperToIL :: Text -> Text
66moduleProperToIL = T.concatMap identCharToText
66moduleProperToIL = T.concatMap identCharToText
@@ -126,16 +126,6 @@ ilKeywords =
129−-- moduleIsReserved :: Text -> Bool
130−-- moduleIsReserved "Main" = False
131−-- moduleIsReserved name = not $ T.isInfixOf "_" name
133−prefixIsReserved :: Text -> Bool
134−prefixIsReserved name =
135− any (`T.isPrefixOf` name)
139ilLiterals :: [Text]
129ilLiterals :: [Text]
140ilLiterals =
130ilLiterals =
@@ -161,7 +151,7 @@ ilLiterals =
163withPrefix :: Text -> Text
153withPrefix :: Text -> Text
164−withPrefix s = "Ꞌ" <> s
154+withPrefix s = "Ꞌ" <> s -- uppercase saltillo
166anyType :: Text
156anyType :: Text
167anyType = "Any"
157anyType = "Any"
@@ -202,4 +192,4 @@ freshName' = do
202 return $ T.replace "$" "ṩ" name
192 return $ T.replace "$" "ṩ" name
204moduleRenamerMarker :: Text
194moduleRenamerMarker :: Text
205−moduleRenamerMarker = "ᴹ"
195+moduleRenamerMarker = "__"