Closed
Description
Bug imported from C2HS Trac
Trac ticket created: 2009-03-14T17:47:58-0700
Example:
Foo.chs (exactly one newline in the file, at the end):
#include "foo.h"
foo.h is empty. Run "c2hs Foo.chs". Foo.hs will contain this as the last line:
{-# LINE 1 "Foo.chs" #-}#include "foo.h"
Upon compilation, ghc chokes with:
Foo.chs" #-}#include "foo.h:0:30: lexical error at character '\n'
Problem is fixed by adding one extra newline before the include, or moving the include to some other place than at the very beginning of the file. Unexpected behavior anyway. c2hs version 0.16.0 on x86 Linux. I think it was present in older versions also, though.