library directory

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

library directory

Ian Zimmerman-4

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
[hidden email]
http://www.haskell.org/mailman/listinfo/hugs-users
Reply | Threaded
Open this post in threaded view
|

Re: library directory

Ross Paterson
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
[hidden email]
http://www.haskell.org/mailman/listinfo/hugs-users
Reply | Threaded
Open this post in threaded view
|

Re: library directory

Ian Zimmerman-4

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
[hidden email]
http://www.haskell.org/mailman/listinfo/hugs-users
Reply | Threaded
Open this post in threaded view
|

Re: library directory

Ross Paterson
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
[hidden email]
http://www.haskell.org/mailman/listinfo/hugs-users