haskell - "requested module differs from name found in the interface file" -



haskell - "requested module differs from name found in the interface file" -

what want is: cabal build modules; make build 1 script.

the script links objective-c (see https://github.com/mchakravarty/language-c-inline/tree/master/tests/objc/marshal-array). when build script, fails on import:

$ create main.hs:1:1: bad interface file: dist/build/commands/osx/events.hi amiss; requested module main:commands.osx.events differs name found in interface file commands-0.0.0:commands.osx.events

here file contents:

$ cat makefile packages = -package template-haskell -package language-c-quote -package language-c-inline -package commands frameworks = -framework carbon -framework cocoa -framework foundation ldflags = $(packages) $(frameworks) main: main.o cabal exec -- ghc -o main main.o $(ldflags) main.o: cabal build cabal exec -- ghc -c main.hs -idist/build/ -v ... $ cat commands.cabal exposed-modules: commands.osx.events hs-source-dirs: sources ... $ ghc --show-iface dist/build/commands/osx/events.hi interface commands-0.0.0:commands.osx.events 7083 ... $ cat sources/commands/osx/events.hs module commands.osx.events ... $ cat main.hs import commands.osx.events ...

the cabal build successful, , executable compiles , runs successfully, if set in same directory, , ignore cabal.

can tell ghc module part of package?

can create cabal executable, these external dependencies?

any other solutions?

explicitly naming modules bundle worked:

ghc -package-name commands-0.0.0

http://www.haskell.org/ghc/docs/7.2.1/html/users_guide/packages.html

haskell ghc cabal

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -