on master help sign in
Fix issue #241
commit5f7fcaa92dc7412ff5bbca18749ffacd6be247ae authorEvan Czaplicki <info@elm-lang.org> dateSun 8 Sep 2013, 12:26 (13 years ago) parente9a626d
1 file changed+10−1
compiler/Transform/Canonicalize.hs+10−1
compiler/Transform/Canonicalize.hs+10−1
@@ -56,10 +56,19 @@ metadataModule ifaces modul =
5656 program' <- rename initialEnv (program modul)
5757 aliases' <- mapM (third renameType') (aliases modul)
5858 datatypes' <- mapM (third (mapM (second (mapM renameType')))) (datatypes modul)
59− return $ modul { program = program', aliases = aliases', datatypes = datatypes' }
59+ exports' <- mapM (third renameType') (foreignExports modul)
60+ imports' <- mapM (twoAndFour (rename initialEnv) renameType') (foreignImports modul)
61+ return $ modul { program = program'
62+ , aliases = aliases'
63+ , datatypes = datatypes'
64+ , foreignExports = exports'
65+ , foreignImports = imports' }
6066 where
6167 second f (a,b) = (,) a `fmap` f b
6268 third f (a,b,c) = (,,) a b `fmap` f c
69+ twoAndFour f g (a,b,c,d) = do b' <- f b
70+ d' <- g d
71+ return (a,b',c,d')
6372 renameType' =
6473 Either.either (\err -> Left [P.text err]) return . renameType (replace "type" initialEnv)
6574