Can one of you arrange things so repository directory listings can be seen? Ie, it would be nice if http://sneezy.cs.nott.ac.uk/epigram/current/src/ showed a list of files – it makes it easier to wander around. Thanks.
Can one of you arrange things so repository directory listings can be seen? Ie, it would be nice if http://sneezy.cs.nott.ac.uk/epigram/current/src/ showed a list of files – it makes it easier to wander around. Thanks.
I agree that this would be good. In any case, I have been trying to keep http://sneezy.cs.nott.ac.uk/epigram/current/doc/ in sync with the actual files. A clumsier way to travel, I accept, although hopefully at some stage we’ll have a more hotlinked documented thing.
Done
I’ve just had a go at making the Programatica front end eat the story so far. You can see how I got on here. I had to drop some infix type constructors (no great loss, I suppose) and some pattern guards (more of an issue with me), but it’s better than a poke in the eye. Thanks Thomas!
Can this produce interface-only output? (I’d find it useful)
Else, shall I add a makefile which generates Haddock output to some convenient place?
Not that I’m aware of. Haddock provides a useful complement. Does this mean I need to switch to using .hs files instead of .lhs? I’ve never got Haddock to work with the latter.
Take a look at the old Makefile, under the “html” target. That uses ghc to de-lit the .lhs and pass it safely through haddock.
So, no change needed.
So ghc spits out the illiterate files for haddock? That’s handy. What I still don’t get is how haddock’s special comment formats go in a .lhs file. I suppose I’m not so very attached to .lhs that I couldn’t just switch. Maybe we could start a top-level src directory with .hs files, no infix type constructors, no pattern guards. How terribly responsible.
Using “ghc -E”, the simplest way to embed haddock info is to write comments with — and prefix them with >. Such comments survive de-litting.
Rather than remove infix type constrs etc, it isn’t impossible to get a Ph^H^Hvolunteer to extend the relevant tools (or moan to the authors) about the missing syntax. Haddock objects to (n+1) patterns! Failing that, a perl script might be able to rewrite the
offending symbols.
Frankly, for pretty much ephemeral things like infix type constructors, I don’t think its worth any of our efforts fiddling with the tools. By the way, does anyone have a script which prepends a given path to every relative link in an html file? I’m just thinking about how we might process chunks of programatica output to make something bloggable. Also search and replace, so \ becomes λ, -> becomes → and idiom brackets don’t look totally stupid: I guess that’s a no- brainer.
This does the job for http urls (only partially tested)
Put this all on one line, or change it into a shell script
perl -pe ‘BEGIN {$l=shift;$/=”nn”;} s/]+)>//gis’ “http://sneezy.cs.nott.ac.uk/” file1 file2 …
It does update in place, putting sneezy etc before links which don’t have a http:// prefix.
A quick hack for the tools is just to extend the syntax so it recognises infix tycons, but stores them as conventional tycons.
oh cr*p – the regexp has been severely edited
mail me if you want the uncensored version