hsc2hs parses incorrectly c99 style ("/// ...") comments in '--cross-compile' mode
The code is simplified version of something from Win32 package (https://github.com/haskell/win32/blob/master/Graphics/Win32/GDI/Pen.hsc#L59):
-- a.hsc
#{enum Int , // "hi" there!
, a = sizeof(int)
}
$ hsc2hs a.hsc -o a.hs-cross --cross-compile
$ hsc2hs a.hsc -o a.hs-native
--- a.hs-cross 2017-04-26 21:56:56.157323964 +0100
+++ a.hs-native 2017-04-26 21:57:00.753311717 +0100
@@ -2,3 +2,3 @@
a :: Int
-a = // "hi" there! 4
+a = 4
I'm not sure if it's a valid .hsc but having at least the same (valid or invalid) result in both modes would be nice.
Trac metadata
Trac field | Value |
---|---|
Version | 8.0.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | hsc2hs |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | Phyx-, hvr |
Operating system | |
Architecture |