
HPath is a command line utility to grab the Haskell source for a given identifier: :; dist/build/hpath/hpath HPath.Path.parse 2>/dev/null parse :: String -> Either ParseError Path parse s = Text.ParserCombinators.Parsec.parse (qualified []) s s This is an alpha release. There are many things HPath can't retrieve -- like constructors -- and there seem to be some complications with the underlying parser/pretty printer (some times you get far too many newlines). There will be another release when the newline issue is resolved. The hope is to release HPath in conjunction with LaTeX macros to allow easy inclusion of Haskell in elaborate documents. -- Jason Dusek

On Tue, Dec 29, 2009 at 11:52 PM, Jason Dusek
HPath is a command line utility to grab the Haskell source for a given identifier:
:; dist/build/hpath/hpath HPath.Path.parse 2>/dev/null parse :: String -> Either ParseError Path parse s = Text.ParserCombinators.Parsec.parse (qualified []) s s
This is an alpha release. There are many things HPath can't retrieve -- like constructors -- and there seem to be some complications with the underlying parser/pretty printer (some times you get far too many newlines).
There will be another release when the newline issue is resolved. The hope is to release HPath in conjunction with LaTeX macros to allow easy inclusion of Haskell in elaborate documents.
-- Jason Dusek _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
The package doesn't build with haskell-src-exts version 1.5.1 (the latest version on Hackage). It would be good to either make it build with HSE 1.5.1 or else put a maximum version of HSE in your .cabal file so that Cabal can select a lower version of HSE if available. Looks like an interesting package; I'm looking forward to trying it out! Alex

Yes, I just saw that. http://hackage.haskell.org/package/HPath-0.0.1 It doesn't handle Haskell needing the C preprocessor and there are some real problems with the output of data/type definitions -- I hope to resolve these shortly. -- Jason Dusek

Here is a bug report for the newlines issue: http://trac.haskell.org/haskell-src-exts/ticket/188 A tentative patch is also included. This is not something I can really fix within HPath, unfortunately. -- Jason Dusek
participants (2)
-
Alexander Dunlap
-
Jason Dusek