foldable flexible bridges (putting foldable+traversable in prelude) Re: Burning bridges

Manuel M T Chakravarty chak at cse.unsw.edu.au
Mon Jun 3 13:59:39 CEST 2013


Simon Marlow <marlowsd at gmail.com>:
> On 28/05/13 02:24, Manuel M T Chakravarty wrote:
>> As far as beginners and teaching goes, why don't we have two Preludes?
>> 
>> (1) The real (and somewhat scary) Prelude
>> (2) A stripped down, less flexible, but easier to comprehend Prelude
>> 
>> The DrRacket (ex DrScheme) people have language levels. We could have library levels.
>> 
>> The idea would be that the "SimplePrelude" would only expose a subset of the classes/types/functions of the "real Prelude" and would in many cases only export type instances of the functions in the "real Prelude". For example, map would just be defined for lists in the SimplePrelude, whereas it would be defined for arbitrary functors in the real Prelude.
> 
> Indeed.  Furthermore, I propose that an import of a module with a "Prelude." prefix automatically turns on NoImplicitPrelude.
> 
> import Prelude.Simple

Very nice idea!

Manuel

>> Henning Thielemann <lemming at henning-thielemann.de>:
>>> On Tue, 21 May 2013, Carter Schonwald wrote:
>>> 
>>>> 2) does the change make learning the language more challenging? No. In fact, i've encountered *many* more
>>>> smart people getting confused as to why the map / fold etc in prelude are all list specific than i've seen
>>>> people struggle with type classes.
>>> 
>>> The Haskell beginners I know, even have problems with 'map' and even more 'fold' being higher order functions.
>> 
>> 
>> _______________________________________________
>> Libraries mailing list
>> Libraries at haskell.org
>> http://www.haskell.org/mailman/listinfo/libraries
>> 
> 
> 
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries




More information about the Libraries mailing list