Case in point: one company ported a 43k line Groovy app to 8200 lines of Haskell [1]. The resulting Haskell app also was at least 64x faster and eliminated a number of major bugs with the Groovy system. If that's not "really cool and useful to the average programmer", then I don't know what is.
But this is just the tip of the iceberg. Haskell has an awesome library called diagrams [2] for the construction of declarative graphics. It can construct some impressively complex images with a remarkably small amount of code [3]. The pandoc universal document converter [4] is written in Haskell. There's also the classic paper comparing Haskell, Ada, C++, and Awk [5]. I'm sure there are other really cool and useful things that I'm forgetting.
[1] https://www.youtube.com/watch?v=BveDrw9CwEg#t=1207
[2] https://www.youtube.com/watch?v=5_fCUSOn7m0
[3] http://projects.haskell.org/diagrams/gallery.html
[5] http://haskell.cs.yale.edu/wp-content/uploads/2011/03/Haskel...
https://code.facebook.com/posts/302060973291128/open-sourcin...
More here: https://www.fpcomplete.com/business/haskell-industry/ https://medium.com/@folsen/haskell-in-production-bdellium-1d...
> I would simply not bother using because no one uses it and deploying it would be a headache.
It's just a binary you can run on a server? There is also Halcyon:
Have you tried Reflex (also there is a try-reflex[1])?
Purescript generates really concise javascript code, have you checked out Thermite[2]?
0: https://github.com/ryantrinkle/reflex 1: https://github.com/ryantrinkle/try-reflex 2: https://github.com/paf31/purescript-thermite
Haskell-based Bicycle Parking Guidance System in Utrecht: http://www.reddit.com/r/haskell/comments/3959r0/haskellbased...
* QuickCheck!
Imagine you implement some function. As a trivial example, let's say you wrote a plus operator (spelled as (+) when not being applied). One of the properties it should have is associativity.
To check whether it is associative, you can write (in the GHCI repl):
> import Test.QuickCheck
> let associative op x y z = (x `op` y) `op` z == x `op` (y `op` z)
> quickCheck $ associative (+)
+++ OK, passed 100 tests.
QuickCheck just applied our "associative" function with 100 various random triplets and made sure that (+) behaved associatively in all the examples.Now, the (-) operator is of course not associative, so let's see what QuickCheck says about that:
> quickCheck $ associative (-)
*** Failed! Falsifiable (after 2 tests and 1 shrink):
0
0
1
QuickCheck now spells out a simple example triplet (x,y,z = 0,0,1) which breaks the associativity claim.This kind of testing is called "property testing" and is an awesome way to test pure functions that finds bugs far more easily (and more thoroughly) than traditional UTs.
For more "real-worldy" examples, consider QuickChecking that your URL parse function is reversible (build back a URL from the parsed components). Ditto with any kind of parser/builder or [de-]serializer.
Most pure functions are expected to obey various laws, and QuickCheck is a great way to verify they do.
* Parallelism annotations!
Sprinkling `par` annotations on your code (or replacing `map` with `parMap`) is guaranteed not to change the semantics of your program. It may speed up (due to extra parallelism) or slow down (due to extra overhead), but it is safe to throw it around.
* Type safety
No null dereference errors (though this is finally getting to some mainstream language). Exhaustive handling of all inputs can easily be verified by the compiler. Data types that describe your data precisely and yet more concisely declared than imprecise data types in other languages. Advanced features allowing to use the type checker to get more compile-time assurances (e.g: Red Black Tree respects all the RB invariants).
* Expressiveness
The kind of abstraction power Haskell gives you is quite unique.
A nice example of this is shown in:
http://www.haskellforall.com/2013/05/program-imperatively-us...
fireBreath target = do
lift $ putStrLn "*rawr*"
units.traversed.(around target 1.0).health -= 3
This updates the game state by traversing all the units whose distance from target <= 1.0, and subtracts 3 from their health. This kind of expressive power is based on library-level abstractions (here, the lens library) with no language support or even macros.