This is of course very easy to do manually, but does a command line tool exist for extracting source code from literate Haskell files?
something like: sed -e '/^[^>]/d' -e 's/^>//g' < foo.lhs > foo.hs
the first expression deletes lines not starting with ">". The second expression removes the ">" at the beginning of each line. or if you prefer to keep the comments: sed -e 's/^[^>]/-- /g' -e 's/^>//g' < foo.lhs > foo.hs the first expression puts "-- " at the start of each line without a ">".
Thanks, Peter
Tim Newsham http://www.thenewsh.com/~newsham/ _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
