Frege / try-frege

Frege online REPL
8 stars 4 forks source link

:browse should do better #12

Closed Ingo60 closed 10 years ago

Ingo60 commented 10 years ago

Here is a sample session:

frege> import Data.Bits
frege> :browse Bits
frege> :browse Data.Bits
frege> :browse frege.data.Bits
(works)
frege> :browse BitSet
frege> :browse Bits.BitSet
frege> import Data.Monoid as M
frege> :browse M
frege> :browse M.Monoid
frege>

It would be great if :browse would do:

Background: try to find out in the REPL which functions are defined in the type BitSet. Because :help BitSet shows only the data constructor (which is not well documented, but hey, this is life ...), this is almost impossible. The only possibility is this:

> type WTF = BitSet
> :help WTF

and this then contains a link to the data type BitSet documentation.

mmhelloworld commented 10 years ago

Thanks for the great explanation. I just followed the steps and it fixed the issue. I have deployed a new version of online REPL with this fix.

Ingo60 commented 10 years ago

Works perfectly!