[Haskell-cafe] how can one load Prelude into ghci?

2009-04-27 Thread Thomas Hartman
One reason it would be nice to be able to do this, is you could then
get lambdabot :src style listings of prelude function definitions by
using the ghci debugger and :list for prelude functions.

is this possible? so far I have tried

thart...@ubuntu:~/haskellInstalls/ghcInstalls/source/ghc-6.10.1/libraries/basehead
Prelude.hs
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
-

thart...@ubuntu:~/haskellInstalls/ghcInstalls/source/ghc-6.10.1/libraries/baseghci
-i. Prelude.hs
GHCi, version 6.10.1: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer ... linking ... done.
Loading package base ... linking ... done.
command line: module `Prelude' is not loaded

thart...@ubuntu:~/haskellInstalls/ghcInstalls/source/ghc-6.10.1/libraries/baseghci
Prelude.hs
GHCi, version 6.10.1: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer ... linking ... done.
Loading package base ... linking ... done.
command line: module `Prelude' is not loaded
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] how can one load Prelude into ghci?

2009-04-27 Thread Brandon S. Allbery KF8NH

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Apr 27, 2009, at 12:25 , Thomas Hartman wrote:

One reason it would be nice to be able to do this, is you could then
get lambdabot :src style listings of prelude function definitions by
using the ghci debugger and :list for prelude functions.


I think up-to-date binary versions are preferred over source versions  
(thus the debugger is limited in what it can do with the Prelude).   
You would have to copy all the Prelude sources and modify them to make  
them look newer.  You don't need other hackery beyond that, but that's  
plenty enough; GHC's Prelude isn't a single file or even a small  
collection of files.


(It might be possible to borrow the Online Report's Prelude... won't  
be optimum but if you're going to interpret it won't be anyway)


- --
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com
system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu
electrical and computer engineering, carnegie mellon universityKF8NH


-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.10 (Darwin)

iEYEARECAAYFAkn2GccACgkQIn7hlCsL25UOhQCgtaAgs5/bLmIJ0hM+Her7HmN3
aakAnRXKJpelTrPMfuGLf2Ro8obZET+K
=UB0V
-END PGP SIGNATURE-
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe