@@ -38,7 +38,7 @@ import Language.PureScript.Sugar.Names.Env
39-- Finds the imports within a module, mapping the imported module name to an optional set of
39-- Finds the imports within a module, mapping the imported module name to an optional set of
40-- explicitly imported declarations.
40-- explicitly imported declarations.
41−findImports :: forall m. (MonadError MultipleErrors m, MonadWriter MultipleErrors m) => [Declaration] -> m (M.Map ModuleName [(Maybe SourceSpan, ImportDeclarationType, Maybe ModuleName)])
41+findImports :: forall m. (Applicative m, MonadError MultipleErrors m, MonadWriter MultipleErrors m) => [Declaration] -> m (M.Map ModuleName [(Maybe SourceSpan, ImportDeclarationType, Maybe ModuleName)])
42findImports = foldM (go Nothing) M.empty
42findImports = foldM (go Nothing) M.empty
44 go pos result (ImportDeclaration mn typ qual) = do
44 go pos result (ImportDeclaration mn typ qual) = do
@@ -59,7 +59,7 @@ findImports = foldM (go Nothing) M.empty
60-- Constructs a set of imports for a module.
60-- Constructs a set of imports for a module.
62−resolveImports :: forall m. (MonadError MultipleErrors m, MonadWriter MultipleErrors m) => Env -> Module -> m Imports
62+resolveImports :: forall m. (Applicative m, MonadError MultipleErrors m, MonadWriter MultipleErrors m) => Env -> Module -> m Imports
63resolveImports env (Module _ _ currentModule decls _) =
63resolveImports env (Module _ _ currentModule decls _) =
64 censor (onErrorMessages (ErrorInModule currentModule)) $ do
64 censor (onErrorMessages (ErrorInModule currentModule)) $ do
65 scope <- M.insert currentModule [(Nothing, Implicit, Nothing)] <$> findImports decls
65 scope <- M.insert currentModule [(Nothing, Implicit, Nothing)] <$> findImports decls