[Haskell-cafe] Using _ on the RHS of an equation?

wren ng thornton wren at freegeek.org
Wed Apr 6 05:13:10 CEST 2011


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.

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.

-- 
Live well,
~wren



More information about the Haskell-Cafe mailing list