src on web

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.

11 Responses to “src on web”

  1. Conor says:

    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.

  2. Conor says:

    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!

  3. pcc says:

    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?

  4. Conor says:

    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.

  5. pcc says:

    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.

  6. Conor says:

    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.

  7. pcc says:

    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.

  8. Conor says:

    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.

  9. pcc says:

    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/