[jhc] confusion on library source
John Meacham
john at repetae.net
Sun Aug 30 20:09:29 EDT 2009
On Sun, Aug 30, 2009 at 09:56:38AM -0400, David Roundy wrote:
> On Sat, Aug 29, 2009 at 6:58 PM, John Meacham<john at repetae.net> wrote:
> >> $ cat lib/haskell98/System.hs
> >> module System (
> >> ExitCode(ExitSuccess,ExitFailure),
> >> getArgs, getProgName, getEnv, system, exitWith, exitFailure
> >> ) where
> >>
> >> import System.Exit
> >> import System.Environment
> >> import System.Cmd
> >>
> >> So it looks like System.Exit should exist somewhere. But I can't for
> >> the life of me (or the grep of me...) figure out where. :( I had
> >> been thinking that adding System.Exit would be an easy way to
> >> contribute a bit towards jhc, and at the same time learn a bit about
> >> how jhc works. Is System.Exit defined somewhere? If so, how can I
> >> convince jhc to use it in my code? I am very puzzled.
> >
> > Ah, that is because the haskell98 package is the one pulled straight
> > from the darcs repo that ghc uses. In jhc, System is provided by base,
> > so is in lib/base/System.hs, the System provided by haskell98 is
> > ignored.
>
> Would it be feasible/desirable for me to split lib/base/System.hs into
> System.Exit, System.Environment and System.Cmd? It would make a few
> more of my programs more easily usable, and then we could use the
> System.hs from the haskell98 package. Thanks!
That would be quite useful. In general, the libraries need a lot of
work. Compatibility with GHC where it makes sense is a useful thing. I
am busy working on the back end and memory use of the generated code at
the moment, but if someone out there wanted to help improve the
libraries that would be great.
Porting documentation to the jhc libs from the ghc repo would also be
pretty straightforward and useful.
John
--
John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/
More information about the jhc
mailing list