I've been away from Haskell for a while, it's great to see interesting things still being done. Wondering what the use of type-level naturals in Haskell is though? I dabbled with Agda a bit where they're used to satisfy the termination checker, is that sort of thing being done in Haskell now?
Also one thing that always gave me pause about Haskell was the record system, and the inability to have fields with the same name in the same module (especially when the fields are generated from a database). Has there been any progress on that front?
Every new GHC release is like a little Christmas morning! The pace of new feature development impresses me.
I'm particularly interested in the new type-level literals (which seem like they will make it much less cumbersome to express certain static constraints) and the convenient new syntax for multi-way if expressions (I've long wanted Lisp's `cond` in Haskell) and case analysis on lambda arguments.
Does anyone know how multiple arguments work with lambda-case[1]? Is the solution just using a tuple and manually currying like so (suggested here[2])?
curry (\case (Nothing,_) -> ...)
(It seems like this would defeat the purpose of lambda-case for lambdas with more than 2 arguments, and it is awkward even for those with exactly 2 arguments.)
Multi-argument lambda case proves quite difficult to handle sanely, because normal non-lambda case doesn't do multiple arguments, just tuples. Having multiple arguments requires separating the pattern for each argument somehow, a problem that doesn't come up for non-lambda cases.
[+] [-] dons|13 years ago|reply
Highlights:
* RTS now supports changing the number of capabilities at runtime
* Dataflow based code gen is on
* Unboxed tuples (register allocated structs) are now first class
* Multi-way if syntax
* Lambda case syntax
* Type level naturals and strings
[+] [-] sixbrx|13 years ago|reply
Also one thing that always gave me pause about Haskell was the record system, and the inability to have fields with the same name in the same module (especially when the fields are generated from a database). Has there been any progress on that front?
[+] [-] igouy|13 years ago|reply
http://shootout.alioth.debian.org/u64q/program.php?test=fann...
http://shootout.alioth.debian.org/u32q/program.php?test=fann...
[+] [-] tmhedberg|13 years ago|reply
I'm particularly interested in the new type-level literals (which seem like they will make it much less cumbersome to express certain static constraints) and the convenient new syntax for multi-way if expressions (I've long wanted Lisp's `cond` in Haskell) and case analysis on lambda arguments.
[+] [-] sadga|13 years ago|reply
Functional `if` and `cond` are here: http://hackage.haskell.org/packages/archive/cond/0.4.0.1/doc...
[+] [-] dbaupp|13 years ago|reply
[1] http://www.haskell.org/ghc/docs/7.6.1/html/users_guide/synta... [2] http://hackage.haskell.org/trac/ghc/wiki/LambdasVsPatternMat...
[+] [-] JoshTriplett|13 years ago|reply
See the discussions at http://hackage.haskell.org/trac/ghc/ticket/4359 and https://unknownparallel.wordpress.com/2012/07/09/the-long-an... for the history of this.
Multi-argument lambda case proves quite difficult to handle sanely, because normal non-lambda case doesn't do multiple arguments, just tuples. Having multiple arguments requires separating the pattern for each argument somehow, a problem that doesn't come up for non-lambda cases.
[+] [-] emillon|13 years ago|reply
[+] [-] aristidb|13 years ago|reply