Re: [Haskell-cafe] partial type annotations

2012-01-20 Thread Paul R
Hi, x :: Integer - instruction1 -- Require ScopedTypeVariables Indeed, that does require ScopedTypeVariables to be enabled, but this basic use case is not clearly covered in the ScopedTypeVariables documentation. Also, it is not clear to me why ScopedTypeVariables is required at all here, as

Re: [Haskell-cafe] partial type annotations

2012-01-20 Thread Jean-Marie Gaillourdet
Hi, On 20.01.2012, at 09:30, Paul R wrote: Hi, x :: Integer - instruction1 -- Require ScopedTypeVariables This is still enabled by the PatternSignatures extensions. Indeed, that does require ScopedTypeVariables to be enabled, but this basic use case is not clearly covered in the

[Haskell-cafe] partial type annotations

2012-01-19 Thread Nicholas Tung
Dear all, I wanted to voice support for a partial type annotations. Here's my usage scenario: I have a monad for an imperative EDSL, which has an associated expression data type, class (Monad m, Expression (ExprTyp m)) = MyDSLMonad m where data ExprTyp m :: * - * and you write

Re: [Haskell-cafe] partial type annotations

2012-01-19 Thread Aleksey Khudyakov
On 20.01.2012 00:37, Nicholas Tung wrote: Dear all, I wanted to voice support for a partial type annotations. Here's my usage scenario: I have a monad for an imperative EDSL, which has an associated expression data type, I wanted such extension more than once. For me it's useful when

Re: [Haskell-cafe] partial type annotations

2012-01-19 Thread Edward Z. Yang
Oleg has described a grody hack which achieves this effect. http://okmij.org/ftp/Haskell/types.html#partial-sigs I agree more first class support for this would be nice. Edward Excerpts from Nicholas Tung's message of Thu Jan 19 15:37:28 -0500 2012: Dear all, I wanted to voice

Re: [Haskell-cafe] partial type annotations

2012-01-19 Thread Nicholas Tung
On Thu, Jan 19, 2012 at 13:16, Aleksey Khudyakov alexey.sklad...@gmail.comwrote: On 20.01.2012 00:37, Nicholas Tung wrote: Dear all, I wanted to voice support for a partial type annotations. Here's my usage scenario: I have a monad for an imperative EDSL, which has an associated

Re: [Haskell-cafe] partial type annotations

2012-01-19 Thread Nicholas Tung
On Thu, Jan 19, 2012 at 15:02, Edward Z. Yang ezy...@mit.edu wrote: Oleg has described a grody hack which achieves this effect. http://okmij.org/ftp/Haskell/types.html#partial-sigs I agree more first class support for this would be nice. Edward That's an amusing hack, but does it

Re: [Haskell-cafe] partial type annotations

2012-01-19 Thread Emil Axelsson
In the spirit of Oleg's hack, but with nicer combinator support, you can use the patch combinators I just uploaded to Hackage (prompted by this thread): http://hackage.haskell.org/package/patch-combinators Your example then becomes: my_code_block = do x - instruction1 -:: tCon