addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgooglegroupsimageimagesinstagramlinklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1outlookpersonJoin Group on CardStartprice-ribbonImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruseryahoo

Tucson Functional Programmers Message Board › My ghci config file

My ghci config file

A former member
Post #: 1
As requested during tonight's meetup:­

This config file will allow you to query the hoogle database via :h and :doc from within ghci:

>>> :h a -> b -> a
Searching for: a -> b -> a
Prelude const :: a -> b -> a
Data.Function const :: a -> b -> a
Prelude seq :: a -> b -> b

>>> :h const
Searching for: const
Prelude const :: a -> b -> a
Data.Function const :: a -> b -> a

>>> :doc const
Prelude const :: a -> b -> a

Constant function.

From package base
const :: a -> b -> a
Chas L.
user 46202552
San Francisco, CA
Post #: 5
I looked into ghci customization a bit and found this page.

One of the cool bits is it embeds a call to a utility that automates the argument removal process I discussed last night. So it can do things like:
>>> :pl (\x -> (x + 3))
(3 +)
>>> :pl \x -> ((x, "hello"))
flip (,) "hello"
>>> :pl \f x -> ((x, f x))
ap (,)
Which I think is pretty neat and useful.
Powered by mvnForum

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy