question about fclabels - libnova port project

15 Jul
2010
15 Jul
'10
11:28 p.m.
I'm porting libnova http://libnova.sourceforge.net/ to haskell, and another question has arisen. I'm starting with header files, ln_types.h to begin with. I'm turning C structs into fclabels. struct lnh_lnlat_posn { struct ln_dms lng; /*!< longitude. Object longitude.*/ struct ln_dms lat; /*!< latitude. Object latitude */ }; becomes data LNH_lnlat_posn = LHN_lnlat_posn { _lng :: LN_dms ,_lat :: LN_dms } $(mkLabels [''LNH_lnlat_posn]) lng :: LNH_lnlat_posn :-> LN_dms lat :: LNH_lnlat_posn :-> LN_dms I have many, many structs to change. What would it take to write an abstraction that encompassed all steps? Michael
5422
Age (days ago)
5422
Last active (days ago)
0 comments
1 participants
participants (1)
-
Michael Litchard