
tux_rocker:
2008/11/11 Dave Tapley
: So I should clarify I'm not a troll and do "see the Haskell light". But one thing I can never answer when preaching to others is "what does Haskell not do well?"
Let's say something controversial: I think that Haskell's type system gets in your way when you're writing one-shot scripts that don't need to conform to the highest correctness standards. Imagine typing a command at the shell prompt and getting the sort of abstract error message that Haskell compilers give every now and then, like:
whyerror.lhs:36:25: Ambiguous type variable `a' in the constraint: `Arrow a' arising from use of `>>>' at whyerror.lhs:36:25-27 Possible cause: the monomorphism restriction applied to the following: liftA2' :: forall b a1 b1 c. (a1 -> b1 -> c) -> a b a1 -> a b b1 -> a b c (bound at whyerror.lhs:36:1) unsplit' :: forall a1 b c. (a1 -> b -> c) -> a (a1, b) c (bound at whyerror.lhs:34:1) split' :: forall b. a b (b, b) (bound at whyerror.lhs:33:1) Probable fix: give these definition(s) an explicit type signature or use -fno-monomorphism-restriction
You don't want to be bothered by such monstrosities (yes, they are, even though many of you may not see it because of years of conditioning) when you're just hacking up a simple script to make a catalog of your MP3 collection / check for patterns in log files / whatever.
Why are you using Arrows in your one shot scripts? Do you use Arrows in your shell scripts? Seems like a strawman argument.. -- Don