Print source definition
Module Main where import System.Random gen = (random (mkStdGen 0)) :: (Bool, StdGen) myadd :: Int -> Int myadd x = 2 * x main = do print "finished"
Then I can get information on myadd and random but I cannot print the source. Here is what I can do in ghci (with lambdabot) :
*Main GOA> :src foldr foldr f z = z foldr f z (x:xs) = f x (foldr f z xs) *Main GOA> :i myadd myadd :: Int -> Int - Defined at test.hs:7:1 *Main GOA> :src myadd Source not found. I don't think I can be your friend on Facebook anymore. *Main GOA> :i random class Random a where ... random :: RandomGen g => g -> (a, g) ... - Defined in ‘System.Random’ *Main GOA> :src random Source not found. Listen, broccoli brains, I don't have time to listen to this trash.
lambdabot seems to be able to print the definitions of foldr but not functions defined in the project (myadd) or functions in the cabal depedencies (random).
Is it possible for me to print out the definitions of things like myadd and random, using some feature of lambdabot? I know you can use Hoogle for random but I want to specifically know if there is any way to use ghci or lambdabot to print out the source definitions.
Dictionary of Quotations from Ancient and Modern, English and Foreign Sources: Including Phrases, Mottoes, Maxims, Proverbs, Definitions, Aphorisms, ... Speculation, Science, Art, Religion, an Book (Nabu Press) |
WAWO Samsung Galaxy S6 Case, PU Leather Wallet Flip Cover Case with Credit Card ID/Pocket Money Slot for Samsung Galaxy S6 - Black Wireless (WAWO)
|
URPOWER® 10000mAh High Capacity Dual-Port USB Charger Power Bank Backup External Portable Mobile Battery Pocket Extensive Charger for iPhone 6 Plus,iPhone 6, iPhone 5s, 5c, 5, 4s, 4, 3gs, iPad 4, iPad Air, the New iPad, iPad Mini; Samsung Galaxy S5, S4, S3, S2, Note 4, Note 3, Note 2; HTC One, Evo, Droid Dna, Motorola Atrix, Droid, Google Glass, Nexus 4, LG Optimus,smart Watch,bluetooth Speakers or Headsets and Other Usb-charged Device (Apple Lightning Adapter NOT included) Toy (URPOWER)
|
|
TaoTronics Humidifier Home Ultasonic Cool Mist (with Constant Humidity Mode, Mist Level Control, Timing Settings, Built-in Water Purifier, LED Nightlight, Zero Noise) Health and Beauty (Humidifier)
|
|
RAVPower Luster Mini 3000mAh Portable Charger Lipstick-Sized External Battery Pack Power Bank Charger,Fast Charging (Ultra Bright Flashlight with High/Low/Strobe Modes, 5V/1A Output) for iPhone 6,6 plus, 5S, 5C, 5, 4S, 4, iPod(Lightning Cable not Provided); Samsung Galaxy S5, S4, S3, S2, Note 2; Nexus 5, Nexus 4, HTC Sensation, One X V One X V S, EVO 4G, Thunderbolt; Nokia Lumia 1020, 920 900 N9; Motorola Razr; LG Google Nexu 4 and other Android & Apple Device, Smart Phones, Tablets (Gold) Wireless (RAVPower)
|