[Haskell-cafe] Using _ on the RHS of an equation?
Ivan Lazar Miljenovic
ivan.miljenovic at gmail.com
Wed Apr 6 05:22:39 CEST 2011
On 6 April 2011 13:13, wren ng thornton <wren at freegeek.org> wrote:
> On 4/4/11 4:42 PM, Jason Dagit wrote:
>>
>> Is this something people would be interested in having as an extension in
>> GHC? Or is it just too fluffy for anyone to really care?
>
> I'd much rather have _ on the RHS of equations be a way of specifying terms
> that the compiler should infer. This is pretty standard for dependently
> typed languages, and more closely mimics the behavior of _ on the LHS as a
> gensym-named pattern variable.
Can you provide an example of this behaviour?
> For Haskell we could perhaps use Djinn to infer the term and have
> compilation fail if there isn't a unique total function/value that can be
> inferred for the missing term.
Doesn't Djinn also return a function in cases where there is more than
one possible value?
--
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
IvanMiljenovic.wordpress.com
More information about the Haskell-Cafe
mailing list