refactoring

This commit is contained in:
krangelov
2021-12-19 14:18:19 +01:00
parent f6789fdfbf
commit ef84adf107

View File

@@ -182,9 +182,9 @@ inferLType gr g trm = case trm of
K s ->
let trm' = case words s of
[] -> Empty
[w] -> K w
ws -> foldr C Empty (map K ws)
[] -> Empty
[w] -> K w
(w:ws) -> foldl (\t -> C t . K) (K w) ws
in return (trm', typeStr)
EInt i -> return (trm, typeInt)