[Haskell-cafe] Program used for debugging

Yves Parès limestrael at gmail.com
Fri Dec 2 16:28:17 CET 2011


> But for internal expressions it can be quite hairy to figure out why what
haskell thinks is the type of something and what I think dont match.

^^ Just give the internal expression a type you know to be wrong, then GHC
will display the infered type and say it doesn't match the one you wrote.

2011/12/2 Rustom Mody <rustom.mody at parsci.com>

> On Thu, Dec 1, 2011 at 7:40 PM, Yves Parès <limestrael at gmail.com> wrote:
>
>> Hey,
>>
>> What do you mostly use for debugging?
>> Simple calls to Debug.Trace.trace? Hpc? Hood?
>>
>
> I also wonder about 'type-debugging'
>
> Using ghci:
> For a top level expression:
>  - if it is not compiling I can put in (or remove) a type decl and see how
> things change.
>  - if it is compiling I can of course ":t it"
>
> But for internal expressions it can be quite hairy to figure out why what
> haskell thinks is the type of something and what I think dont match.
>
> So is there something like type-intellisense for haskell where if one
> hovers the mouse (maybe over a selection) haskell tells what type it finds
> there?
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20111202/1c375bbb/attachment.htm>


More information about the Haskell-Cafe mailing list