[Haskell-cafe] Location Of Prelude.hs

Tikhon Jelvis tikhon at jelv.is
Wed Aug 12 17:15:56 UTC 2015


A useful trick is that you can access the source of a function or type
directly by clicking the 'source' link to the right of the name in the
documentation[1]. This will take you to the module where the identifier was
defined rather than where it was imported from. (For example, Maybe is
defined in Data.Maybe[2].)

[1]: https://hackage.haskell.org/package/base-4.5.0.0/docs/Prelude.html

[2]:
https://hackage.haskell.org/package/base-4.5.0.0/docs/src/Data-Maybe.html#Maybe

On Wed, Aug 12, 2015 at 10:03 AM, Brandon Allbery <allbery.b at gmail.com>
wrote:

> On Wed, Aug 12, 2015 at 12:54 PM, <debdutk at gnulinuxed.tk> wrote:
>
>> I was reading the book "The Haskell Road to Logic, Math and Programming"
>> and it refers to /usr/lib/hugs/libraries/Hugs/ as the probable location for
>> Prelude.hs. I am currently using Elementary OS Luna (based of Ubuntu 12.04)
>> and could not file the file at the specified location. Can anyone please
>> tell me where to find it?
>>
> Hugs is obsolete and unmaintained, so you are unlikely to find that
> anywhere.
>
> ghc compiles, where Hugs is an interpreter, so it does not come with
> Prelude source.
>
> The API documentation gives me a link to
> http://lambda.haskell.org/platform/doc/current/ghc-doc/libraries/haskell2010-1.1.1.0/src/Prelude.html
> (syntax-highlighted source). Beyond that you'd need to get the source to
> ghc; note that there will be three different Prelude sources (haskell98
> standard, haskell2010 standard, and ghc's default behavior) and that all
> three are largely built from parts imported from elsewhere.
>
> --
> brandon s allbery kf8nh                               sine nomine
> associates
> allbery.b at gmail.com
> ballbery at sinenomine.net
> unix, openafs, kerberos, infrastructure, xmonad
> http://sinenomine.net
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20150812/288bd6ba/attachment.html>


More information about the Haskell-Cafe mailing list