@@ -47,7 +47,6 @@ import Language.PureScript.CodeGen.Optimize
4747--
4848moduleToJs :: Options -> Module -> Environment -> [JS]
4949moduleToJs opts (Module pname@(ProperName name) decls) env =
50− mapMaybe filterRawDecls decls ++
5150 [ JSVariableIntroduction (Ident name) Nothing
5251 , JSApp (JSFunction Nothing [Ident name]
5352 (JSBlock (concat $ mapMaybe (\decl -> fmap (map $ optimize opts) $ declToJs opts (ModuleName pname) decl env) (sortBy typeClassesLast decls))))
@@ -55,8 +54,6 @@ moduleToJs opts (Module pname@(ProperName name) decls) env =
5554 (JSBinary Or (JSVar (Ident name)) (JSObjectLiteral []))]
5655 ]
5756 where
58− filterRawDecls (ExternDeclaration ForeignImport _ (Just js) _) = Just js
59− filterRawDecls _ = Nothing
6057 typeClassesLast (ExternDeclaration TypeClassDictionaryImport _ _ _) (ExternDeclaration TypeClassDictionaryImport _ _ _) = EQ
6158 typeClassesLast (ExternDeclaration TypeClassDictionaryImport _ _ _) _ = GT
6259 typeClassesLast _ (ExternDeclaration TypeClassDictionaryImport _ _ _) = LT
@@ -87,7 +84,7 @@ declToJs _ mp (DataDeclaration _ _ ctors) _ =
8784 in [ ctorJs, setProperty ctor (JSVar (Ident ctor)) mp ]
8885declToJs opts mp (DataBindingGroupDeclaration ds) e =
8986 Just $ concat $ mapMaybe (flip (declToJs opts mp) e) ds
90−declToJs _ mp (ExternDeclaration importTy ident (Just js) _) _ | importTy /= ForeignImport =
87+declToJs _ mp (ExternDeclaration importTy ident (Just js) _) _ =
9188 Just [ js
9289 , setProperty (identToJs ident) (JSVar ident) mp ]
9390declToJs _ _ _ _ = Nothing