haskell / haskell/c2hs

New line at the end of file is necessary?

Open
#187 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
211
Forks
52
PR merge metrics
No merged PRs in 30d

Description

Hi,

I have encountered a trouble when using c2hs. If the file is end of a `{#fun#}` binding and there's no new line at the end of file, an exception

~~~
c2hs: No match in record selector posRow
~~~

would be thrown. I'm wondering whether it's a bug, or just a feature?

A minimal case can be used to reproduce this bug:

~~~haskell
#include

{#fun variadic printf[const char *] as prints {`String', `String'} -> `()'#}
~~~

When add a new line at the end of file, c2hs would works well.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.