Ticket #73 (closed defect: notenoughinfo)

Opened 6 years ago

Last modified 5 months ago

file name does not match module name `Main'

Reported by: anonymous Owned by:
Priority: trivial Milestone:
Version: 2.4.1 Keywords:
Cc:

Description

At least an orthografical error: dependency graph.

Furthermore, i don't understand the error: why haddock has to create a dependency graph?

Change History

in reply to: ↑ description   Changed 6 years ago by waern

Replying to anonymous:

At least an orthografical error: dependency graph. Furthermore, i don't understand the error: why haddock has to create a dependency graph?

Could you please provide a little bit more information?

Haddock has to create a dependency graph since it typechecks all modules using the GHC API. Actually, it is the GHC that creates the dependency graph.

follow-up: ↓ 3   Changed 6 years ago by Martin

Ok, I'm sorry, I will put a little bit more information. I tried

haddock --html \
	 -o doc  \
         --optghc=-cpp \
	 Main.hs

and got the following error-message:

Effects/ILCUtils.hs:1:0:
    file name does not match module name `Main'
haddock: Failed to create dependecy graph

For the file in the error messages I didn't want to generate documentation, furthermore the program compiles with ghc, so i don't understand the error.

I couldn't isolate the error, sorry. Of course to change "dependecy" to "dependency" is trivial, the error I reported now maybe not.

Greetings, Martin

in reply to: ↑ 2   Changed 6 years ago by anonymous

Replying to Martin:

Ok, I'm sorry, I will put a little bit more information. I tried {{{ haddock --html \ -o doc \ --optghc=-cpp \ Main.hs }}} and got the following error-message: {{{ Effects/ILCUtils.hs:1:0: file name does not match module name `Main' haddock: Failed to create dependecy graph }}} For the file in the error messages I didn't want to generate documentation, furthermore the program compiles with ghc, so i don't understand the error.

Seems like Main.hs is dependent of the module ILCUtils.hs, so Haddock is trying to include it in the dependency graph. And it seems like ILCUtils.hs defines the module Main. So I'm a little bit confused. Do you have two Main modules?

To tell Haddock which module is the Main module, you can use --optghc=-main-is --optghc=module.

When you compiled using GHC, what command line flags did you use exactly?

I couldn't isolate the error, sorry. Of course to change "dependecy" to "dependency" is trivial, the error I reported now maybe not.

Ah, I will correct this spelling error. Thanks.

  Changed 6 years ago by waern

  • version set to 2.4.1
  • summary changed from haddock: Failed to create dependecy graph to file name does not match module name `Main'

  Changed 6 years ago by alistair@…

This is what fails for me (in Test/Fail.hs):

{- # LANGUAGE CPP #-}
module Test.Fail

  Changed 2 years ago by anonymous

  • milestone 2.5.0 deleted

Milestone 2.5.0 deleted

  Changed 5 months ago by Fūzetsu

  • status changed from new to closed
  • resolution set to notenoughinfo
Note: See TracTickets for help on using tickets.