Skip to content

Fix the duplicate/redefined module error - #2327

Merged
garyb merged 1 commit into
purescript:masterfrom
garyb:duplicate-module-error
Sep 24, 2016
Merged

Fix the duplicate/redefined module error#2327
garyb merged 1 commit into
purescript:masterfrom
garyb:duplicate-module-error

Conversation

@garyb

@garyb garyb commented Sep 24, 2016

Copy link
Copy Markdown
Member

Resolves #1828

updateEnv :: ([Module], Env) -> Module -> m ([Module], Env)
updateEnv (ms, env) m@(Module ss _ mn _ refs) =
case mn `M.lookup` env of
Just m' -> throwError . errorMessage $ RedefinedModule mn [envModuleSourceSpan m', ss]

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to check if a module already exists in the name environment anymore since it will be caught during Make and the error raised there.

@garyb

garyb commented Sep 24, 2016

Copy link
Copy Markdown
Member Author

Any ideas on why that test would fail on some platforms/configs? 😕

@garyb

garyb commented Sep 24, 2016

Copy link
Copy Markdown
Member Author

Hmm, weird, still failing.

@garyb
garyb force-pushed the duplicate-module-error branch from b351cc3 to 6fd459e Compare September 24, 2016 20:49
@garyb

garyb commented Sep 24, 2016

Copy link
Copy Markdown
Member Author

Ok, we're good now, it was due to missing files in the cabal file. The coverage build is failing due to a dependency issue though... the same is true of master.

@paf31

paf31 commented Sep 24, 2016

Copy link
Copy Markdown
Contributor

👍

@garyb
garyb merged commit f5aa076 into purescript:master Sep 24, 2016
@garyb
garyb deleted the duplicate-module-error branch September 24, 2016 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants