Code Monkey home page Code Monkey logo

Comments (6)

snoyberg avatar snoyberg commented on June 3, 2024

+1 for CorePrelude.

from basic-prelude.

DanBurton avatar DanBurton commented on June 3, 2024

OK, I've moved BasicPrelude.hs to CorePrelude.hs, and thrown together a quick BasicPrelude that defaults to using Text and FilePath instead of String under the common use cases, and otherwise exports everything that Prelude does (assuming I haven't missed anything), meaning that it has the same List bias for pretty much everything that isn't obviously Text. I wasn't quite sure what to do with interact and getContents, so I arbitrarily decided to use [Char] for the former and LText for the latter.

The import list from Prelude can help guide us to determine which things should be migrated to CorePrelude. After I think about it for a little while I'll open an issue suggesting a few migrations, and once we get those settled we can start thinking about releasing version 0.2.

from basic-prelude.

singpolyma avatar singpolyma commented on June 3, 2024

Instead of grabbing sequence, mapM, and a few others from Prelude, why not re-export all of Control.Monad?

from basic-prelude.

snoyberg avatar snoyberg commented on June 3, 2024

Everything in Control.Monad looks like a good fit to me. I could see an argument for not including functions like liftM and ap, since we should be using <$> and <*> instead, but until we fix the typeclasses themselves, there are times when the monadic versions are necessary.

from basic-prelude.

DanBurton avatar DanBurton commented on June 3, 2024

The question is, how much of it should be in BasicPrelude vs CorePrelude? Of course Basic Prelude can just re-export all of Control.Monad regardless of what CorePrelude exports from it. CorePrelude will have to be more selective, rejecting (for instance) anything with lists in the type signature.

from basic-prelude.

DanBurton avatar DanBurton commented on June 3, 2024

I've added Control.Monad to BasicPrelude's exports, and added a test file that trivially uses all of the things that Prelude exports, as a sort of ad-hoc test for a given module's suitability as a complete Prelude replacement.

from basic-prelude.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.