Re: [Haskell-cafe] A proposals

2009-09-28 Thread Martijn van Steenbergen

Bulat Ziganshin wrote:

in case you not seen this and may be interested:
http://okmij.org/ftp/Haskell/types.html#partial-sigs


Yes, I know there are workarounds (and I use them sometimes). It'd be 
nice if there was direct support for them. :-)


Thanks,

Martijn.

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


RE: [Haskell-cafe] A proposals

2009-09-28 Thread Sittampalam, Ganesh
Martijn van Steenbergen wrote:
> wren ng thornton wrote:
>> Another nice
>> thing this suggests is the ability to use underscore as a pattern for
>> when you know the compiler will infer the type but it's too complex
>> to want to write out (e.g. while experimenting).
> 
> I'd love this!

F# has this and I find it very useful.

Ganesh

=== 
 Please access the attached hyperlink for an important electronic 
communications disclaimer: 
 http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html 
 
=== 
 
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] A proposals

2009-09-28 Thread Martijn van Steenbergen

wren ng thornton wrote:
Another nice 
thing this suggests is the ability to use underscore as a pattern for 
when you know the compiler will infer the type but it's too complex to 
want to write out (e.g. while experimenting).


I'd love this!

M.

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] A proposals

2009-09-27 Thread wren ng thornton

Louis Wasserman wrote:

I'd like to see something resembling as-patterns in type signatures.
Specifically, there are cases where I'm inclined to use
(m ~ pat) in a type context when m isn't otherwise constrained, just so I
can use m as an abbreviation for pat.  To reduce these cases, I'd like to
see the syntax m...@pat allowed for use in type signatures, with m becoming
simply an alias for pat.  Thoughts?

I've added a ticket here .


+1.

I've often wanted this when doing type-level programming. Another nice 
thing this suggests is the ability to use underscore as a pattern for 
when you know the compiler will infer the type but it's too complex to 
want to write out (e.g. while experimenting). With x...@_ you could even 
share the complex type in multiple places, since x will be bound to some 
actual type rather than being universally quantified. (Of course, ISTR 
someone's suggested the underscores in the past and had it rejected. Alas.)


--
Live well,
~wren
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] A proposals

2009-09-27 Thread Brad Larsen
On Sun, Sep 27, 2009 at 5:29 PM, Louis Wasserman
 wrote:
> I'd like to see something resembling as-patterns in type signatures.
> Specifically, there are cases where I'm inclined to use
> (m ~ pat) in a type context when m isn't otherwise constrained, just so I
> can use m as an abbreviation for pat.  To reduce these cases, I'd like to
> see the syntax m...@pat allowed for use in type signatures, with m becoming
> simply an alias for pat.  Thoughts?
>
> I've added a ticket here.
>
> Louis Wasserman
> wasserman.lo...@gmail.com
> http://profiles.google.com/wasserman.louis
>
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe


I was looking for a feature like this just the other day, for more
succinctly defining a type class that made use of several associated
type synonyms.

Sincerely,
Bradford Larsen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe