[Agda] Agda and GHC 7.8

Andreas Abel abela at chalmers.se
Thu Sep 25 23:46:08 CEST 2014


 > One thing I don't understand here is that the call mentions Lexer.hs, 
but the error mentions
 > Lexer.x.

That seems to be the miracle workings of LINE pragmas in the generated 
Lexer.hs.

{-# LANGUAGE CPP #-}
{-# LINE 1 "Parser/Lexer.x" #-}

What does the position Lexer.x:0:2 mean?  Is it the line before the LINE 
1 pragma?

On 25.09.2014 17:32, Jan Stolarek wrote:
> I've got some help from #ghc. It seems that this might have something to do with CPP
> preprocessing. Calling `cabal install -v3` gives a lot more information. I see lots of calls to
> cpphs and the last one calls cpphs on Lexer.hs (sorry for weird line breaks):
>
> *** C pre-processor:
> cpphs -include
> dist/dist-sandbox-1828dee6/build/autogen/cabal_macros.h --cpp -Werror -Idist/dist-sandbox-1828dee6/build -I
> dist/dist-sandbox-1828dee6/build -I
> dist/dist-sandbox-1828dee6/build/autogen -Idist/dist-sandbox-1828dee6/build -I /dane/sandboxes/ghc/7.8.3//lib/g
> hc-7.8.3/process-1.2.0.0/include -I /dane/sandboxes/ghc/7.8.3//lib/ghc-7.8.3/old-time-1.1.0.2/include -I /dane/download/agda/.cabal-sand
> box/lib/x86_64-linux-ghc-7.8.3/vector-0.10.11.0/include -I /dane/sandboxes/ghc/7.8.3//lib/ghc-7.8.3/directory-1.2.1.0/include -I /dane/s
> andboxes/ghc/7.8.3//lib/ghc-7.8.3/unix-2.7.0.1/include -I /dane/sandboxes/ghc/7.8.3//lib/ghc-7.8.3/bytestring-0.10.4.0/include -I /dane/
> download/agda/.cabal-sandbox/lib/x86_64-linux-ghc-7.8.3/primitive-0.5.3.0/include -I /dane/sandboxes/ghc/7.8.3//lib/ghc-7.8.3/time-1.4.2
> /include -I /dane/sandboxes/ghc/7.8.3//lib/ghc-7.8.3/base-4.7.0.1/include -I /dane/sandboxes/ghc/7.8.3//lib/ghc-7.8.3/integer-gmp-0.5.1.
> 0/include -I /dane/sandboxes/ghc/7.8.3//lib/ghc-7.8.3/include '-D__GLASGOW_HASKELL__=708' '-Dlinux_BUILD_OS=1' '-Dx86_64_BUILD_ARCH=1' '
> -Dlinux_HOST_OS=1' '-Dx86_64_HOST_ARCH=1' '-D__SSE__=1' '-D__SSE2__=1' -x assembler-with-cpp
> dist/dist-sandbox-1828dee6/build/Agda/Syntax/Parser/Lexer.hs -o /tmp/ghc656_0/ghc656_51.hscpp
> Warning: trailing characters after #if directive in
> file /dane/sandboxes/ghc/7.8.3//lib/ghc-7.8.3/include/ghcautoconf.h  at line 383 col
>   1:  AC_APPLE_UNIVERSAL_BUILD
>
> src/full/Agda/Syntax/Parser/Lexer.x:0:2:
>      lexical error at character '\n'
> *** Deleting temp files:
>
> One thing I don't understand here is that the call mentions Lexer.hs, but the error mentions
> Lexer.x.
>
> Janek
>


-- 
Andreas Abel  <><      Du bist der geliebte Mensch.

Department of Computer Science and Engineering
Chalmers and Gothenburg University, Sweden

andreas.abel at gu.se
http://www2.tcs.ifi.lmu.de/~abel/


More information about the Agda mailing list