Re: [Haskell-cafe] Displaying infered type signature of 'offside' functions

2007-05-02 Thread Jules Bean
Simon Peyton-Jones wrote: | I like the strong static type system of Haskell for various | reasons. One reason is, that it makes easier to understand new | code. I.e. when I read code I type ':t foo' in ghci/hugs from | time to time, to check my own idea of the type signature, if it | is not

Re: [Haskell-cafe] Displaying infered type signature of 'offside' functions

2007-05-02 Thread kahl
Jules Bean [EMAIL PROTECTED] wrote, concerning the problem of getting at the types of local definitions: Simon Peyton-Jones wrote: The principal difficulties here are to do with what do we want rather the implementation challenges. 1. Should the compiler print the type of every

Re: [Haskell-cafe] Displaying infered type signature of 'offside' functions

2007-05-02 Thread David House
On 2 May 2007 16:16:57 -, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: * It would be nice if this worked inside the do-notation, too: do x :: Ordering x - m (This is curently a syntax error.) I think the following works with -fglasgow-exts: do (x :: Ordering) - m -- -David

Re: [Haskell-cafe] Displaying infered type signature of 'offside' functions

2007-05-02 Thread kahl
* It would be nice if this worked inside the do-notation, too: do x :: Ordering x - m (This is curently a syntax error.) I think the following works with -fglasgow-exts: do (x :: Ordering) - m I know, but it is not as nice! ;-) Wolfram

Re: [Haskell-cafe] Displaying infered type signature of 'offside' functions

2007-05-02 Thread Derek Elkins
[EMAIL PROTECTED] wrote: Jules Bean [EMAIL PROTECTED] wrote, concerning the problem of getting at the types of local definitions: Simon Peyton-Jones wrote: The principal difficulties here are to do with what do we want rather the implementation challenges. 1. Should the compiler

Re: [Haskell-cafe] Displaying infered type signature of 'offside' functions

2007-05-02 Thread Stefan O'Rear
On Wed, May 02, 2007 at 04:16:57PM -, [EMAIL PROTECTED] wrote: Now the compiler gives you wonderful error messages ``cannot match type `x y z' against Ordering'' --- so you replace ``Ordering'' with ``x y z''. You could just use a rigid type variable: foo :: a foo = ... (What is the

RE: [Haskell-cafe] Displaying infered type signature of 'offside' functions

2007-05-01 Thread Simon Peyton-Jones
| I like the strong static type system of Haskell for various | reasons. One reason is, that it makes easier to understand new | code. I.e. when I read code I type ':t foo' in ghci/hugs from | time to time, to check my own idea of the type signature, if it | is not included in the source code.

Re: [Haskell-cafe] Displaying infered type signature of 'offside' functions

2007-04-29 Thread David House
On 28/04/07, Georg Sauthoff [EMAIL PROTECTED] wrote: Well, I mention this, because I would like to integrate some lookup feature (for type signatures) into vim (if it doesn't exist yet). It's worth pointing out that Emacs's haskell-mode already has this. For anyone that uses the major mode but

Re: [Haskell-cafe] Displaying infered type signature of 'offside' functions

2007-04-29 Thread David House
On 29/04/07, David House [EMAIL PROTECTED] wrote: It's worth pointing out that Emacs's haskell-mode already has this. For anyone that uses the major mode but hasn't heard of the inf-haskell features: I did forget to mention that this won't help with your 'offside' functions, though. -- -David