Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I use Haddock with c2hs?

I am using c2hs to write some haskell bindings, and I would like to use Haddock to document automatically generated constructors and function parameters. However, c2hs ignores the comments;

{#enum define WinPos
  {
   CA as HA -- ^ This comment is not shown in the .hs file
  ,CB as HB -- ^ Neither this one
  } 
  deriving (Eq,Ord,Show)#}

How can I get Haddock documentation for these fields without writing too much FFI code?

like image 773
HaskellElephant Avatar asked Mar 07 '14 16:03

HaskellElephant


1 Answers

This feature is now supported in the latest version of c2hs.

like image 57
HaskellElephant Avatar answered Oct 05 '22 13:10

HaskellElephant