Build problems
I'm having trouble building documentalist. I've installed llvm 3.3 through homebrew (keg-only).
Then I ran
cabal install --only-dependencies
cabal configure --extra-include-dirs=/usr/local/opt/lvvm/include --extra-lib-dirs=/usr/local/opt/llvm/lib
cabal build
but I got
Building documentalist-0.1...
Preprocessing library documentalist-0.1...
FFI.hsc:8:10: fatal error: 'clang-c/Index.h' file not found
#include <clang-c/Index.h>
^
1 error generated.
compiling dist/build/Text/Documentalist/SourceParser/Clang/FFI_hsc_make.c failed (exit code 1)
command was: /usr/bin/gcc -c dist/build/Text/Documentalist/SourceParser/Clang/FFI_hsc_make.c -o dist/build/Text/Documentalist/SourceParser/Clang/FFI_hsc_make.o -m64 -fno-stack-protector -m64 -D__GLASGOW_HASKELL__=704 -Ddarwin_BUILD_OS=1 -Dx86_64_BUILD_ARCH=1 -Ddarwin_HOST_OS=1 -Dx86_64_HOST_ARCH=1 -I/usr/lib/llvm-3.4/include -I/opt/boxen/homebrew/include -I/usr/local/include -I/usr/local/opt/lvvm/include -std=c99 -Werror -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -I/Library/Frameworks/GHC.framework/Versions/7.4.2-x86_64/usr/lib/ghc-7.4.2/base-4.5.1.0/include -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -I/Library/Frameworks/GHC.framework/Versions/7.4.2-x86_64/usr/lib/ghc-7.4.2/include -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -I/Library/Frameworks/GHC.framework/Versions/7.4.2-x86_64/usr/lib/ghc-7.4.2/include/
it seems to me that it's not passing the include/lib dir to gcc but I'm not sure how to fix that.
If those are the verbatim commands you ran, you have a typo in the folder name here:
--extra-include-dirs=/usr/local/opt/lvvm/include
Also note that the project currently tries to find LLVM 3.4, though 3.3 might work as well (not sure).
I can confirm 3.3 works for me.
I reinstalled LLVM 3.3 and tried configuring with
cabal configure --extra-include-dirs=/usr/local/Cellar/llvm/3.3/include --extra-lib-dirs=/usr/local/Cellar/llvm/3.3/lib
now I get
$ cabal build
Building documentalist-0.1...
Preprocessing library documentalist-0.1...
dist/build/Text/Documentalist/SourceParser/Clang/FFI.hs:1:1:
File name does not match module name:
Saw: `Main'
Expected: `Text.Documentalist.SourceParser.Clang.FFI'
where dist/build/Text/Documentalist/SourceParser/Clang/FFI.hs is an empty file
I think your system cabal or hsc2hs might be out of date. If so, just update them with cabal install.