library directory

View: New views
4 Messages — Rating Filter:   Alert me  

library directory

by Ian Zimmerman-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Is it possible to somehow determine mechanically what the standard
library directory of a running Hugs interpreter is?

The output of :set gives the load path, but that hides the library
directory as {Hugs}.

Some other (unnamed, grin) tools provide similar information in
their --version output, or have a special option that outputs only
this.

Thanks.

--
This line is completely ham.
_______________________________________________
Hugs-Users mailing list
Hugs-Users@...
http://www.haskell.org/mailman/listinfo/hugs-users

Re: library directory

by Ross Paterson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Jun 08, 2007 at 09:35:58AM -0400, Ian Zimmerman wrote:
> Is it possible to somehow determine mechanically what the standard
> library directory of a running Hugs interpreter is?

hugs -q </dev/null | sed -n '11s@.*"\(.*\)/packages/base/Prelude.hs":@\1@p'
_______________________________________________
Hugs-Users mailing list
Hugs-Users@...
http://www.haskell.org/mailman/listinfo/hugs-users

Re: library directory

by Ian Zimmerman-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Ross> hugs -q </dev/null |
Ross> sed -n '11s@.*"\(.*\)/packages/base/Prelude.hs":@\1@p'

What does the -q do?  It is not mentioned either in the manpage or in
the manual.

--
This line is completely ham.
_______________________________________________
Hugs-Users mailing list
Hugs-Users@...
http://www.haskell.org/mailman/listinfo/hugs-users

Re: library directory

by Ross Paterson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, Jun 10, 2007 at 09:49:00AM -0400, Ian Zimmerman wrote:
> Ross> hugs -q </dev/null |
> Ross> sed -n '11s@.*"\(.*\)/packages/base/Prelude.hs":@\1@p'
>
> What does the -q do?  It is not mentioned either in the manpage or in
> the manual.

It is in the manpage and section 3.1.2 of the User's Guide, but
you have to remember that Hugs toggle options come in +/- pairs:
+q (the default) loads modules quietly; -q doesn't.
_______________________________________________
Hugs-Users mailing list
Hugs-Users@...
http://www.haskell.org/mailman/listinfo/hugs-users
LightInTheBox - Buy quality products at wholesale price