Harvard-PRINCESS / Guppy

A very adaptable fish.
Other
1 stars 3 forks source link

compile annotated fof source and commit into tree. remove tex markup in preparation for modifying fof #59

Open mwookawa opened 7 years ago

mwookawa commented 7 years ago

not done yet; there is a ton of annoying whitespace left by unlit, and i haven't figured out how lhs-boot files are used (seem like stubs. i'm probably missing something stupid).

ghost commented 7 years ago

hs-boot files are ghc's workaround for haskell not being able to cope with mutually dependent modules.

Basically if you have a cycle of .hs files you pick one and copy the minimum amount of stuff necessary to build the next into a corresponding .hs-boot file, and that lets it do initial builds of the subsequent files until it can build the real .hs file for that module.

It's an unsafe mechanism, in the sense that if the .hs-boot file is wrong or goes out of date you'll likely get SIGSEGV from the resulting program.

(a better answer is to refactor the offending files but that can be expensive)

ghost commented 7 years ago

(also, if you don't want .lhs, wouldn't it be better to just exchange the comment and non-comment lines, that is, put -- in front of all the comment lines and remove the > from the code lines, rather than deleting all the comments?)

mwookawa commented 7 years ago

the hs-boot files for fof are actually tiny and safe -- i wasn't sure how to run them through the preprocessor, as fname.lhs-boot they pops out of the ghc unlit preprocessor as fname.hspp, which clobber the preprocessor output of fname.lhs.

ghost commented 7 years ago

ah, unlit them and call them foo.hs-boot and that should do the trick.

mwookawa commented 7 years ago

yep yep! thanks!