Re: New type of ($) operator in GHC 8.0 is problematic

Hi there, I'm teaching Haskell to 2nd semester computer science students, and I have been teaching Haskell since 2006. While I certainly do appreciate the constant developement of Haskell, and GHC, I'm becoming more and more concerned about the learning curve involved. For our students it is an entirely new concept that “Application” can be an operator. They are just learning about associativity. `foldl` and `foldr` are *baffling* concepts to them. They have never thought of functions being values. They have never looked at a strict type system. Having `Foldable` pop up last year already was not optimal, and to be honest, this ($) :: forall (w :: Levity) a (b :: TYPE w). (a -> b) -> a -> b is a disaster for teaching — Sorry. Richard, thank you very much for your elaborate statement. The problem I see with a `BeginnersPrelude` is that it will either outdate, or create a bubble escaping from which is so painful that most new Haskell programmers will hesitate to take the step. GHC developement will carry on, more and more things being hidden behind `BeginnersPrelude` automatically. We will end up educating Beginners that will want to stay beginners. I'd personally wish for a `-fdefault-levity` switch, but I do not oversee all the consequences right now. I know it puts load on you, but this actually just tells you that the language you're building became a bit less learnable, maybe it's good to be aware of that. Kind regards Stefan -- http://stefan-klinger.de o/X Send plain text messages only, not exceeding 32kB. /\/ \

On 06 Feb 2016, at 15:30, ghc-devs@stefan-klinger.de wrote:
Richard, thank you very much for your elaborate statement. The problem I see with a `BeginnersPrelude` is that it will either outdate, or create a bubble escaping from which is so painful that most new Haskell programmers will hesitate to take the step. GHC developement will carry on, more and more things being hidden behind `BeginnersPrelude` automatically. We will end up educating Beginners that will want to stay beginners.
I'd personally wish for a `-fdefault-levity` switch, but I do not oversee all the consequences right now. I know it puts load on you, but this actually just tells you that the language you're building became a bit less learnable, maybe it's good to be aware of that.
Kind regards Stefan
I came with maybe silly idea: What if we had a way to re-export the symbol with less-general type: module Prelude.YourCourse ( ($) :: (a -> b) -> a -> b, foldr :: (a -> b -> b) -> b -> [a] -> b, ... ) where {-# LANGUAGE NoExplicitPrelude #-} module Main (main) where import Prelude.YourCourse -- but if people need general foldr, you can: import Prelude (foldr)
participants (2)
-
ghc-devs@stefan-klinger.de
-
Oleg Grenrus