Fixed naming-cons bug in monomorphizer
This commit is contained in:
parent
4aa72beccb
commit
fe25f18eb7
1 changed files with 3 additions and 1 deletions
|
|
@ -196,11 +196,13 @@ appear as expressions in the tree, or as patterns in case-expressions.
|
||||||
-}
|
-}
|
||||||
morphCons :: M.Type -> Ident -> EnvM ()
|
morphCons :: M.Type -> Ident -> EnvM ()
|
||||||
morphCons expectedType ident = do
|
morphCons expectedType ident = do
|
||||||
|
--trace ("Tjofras:" ++ show (newName expectedType ident)) $ return ()
|
||||||
|
let ident' = newName expectedType ident
|
||||||
maybeD <- getInputData ident
|
maybeD <- getInputData ident
|
||||||
case maybeD of
|
case maybeD of
|
||||||
Nothing -> error $ "identifier '" ++ show ident ++ "' not found"
|
Nothing -> error $ "identifier '" ++ show ident ++ "' not found"
|
||||||
Just d -> do
|
Just d -> do
|
||||||
modify (\output -> Map.insert ident (Data expectedType d) output)
|
modify (\output -> Map.insert ident' (Data expectedType d) output)
|
||||||
|
|
||||||
-- | Converts literals from input to output tree.
|
-- | Converts literals from input to output tree.
|
||||||
convertLit :: T.Lit -> M.Lit
|
convertLit :: T.Lit -> M.Lit
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue