Comments (6)
+1 for CorePrelude.
from basic-prelude.
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.
Instead of grabbing sequence, mapM, and a few others from Prelude, why not re-export all of Control.Monad?
from basic-prelude.
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.
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.
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)
- Export Arrow combinators HOT 7
- empty clashes with Control.Applicative HOT 5
- Export `printf` for `Text`
- Export `Data.Text.Encoding` HOT 4
- Export IOError in CorePrelude HOT 1
- Restrict to packages portable across GHCs?
- CorePrelude doesn't export any instances for LText and LByteString HOT 3
- Extended Kleisli combinators HOT 3
- Better exception handling HOT 8
- Export IsList HOT 2
- Lazy versions don’t export instances HOT 2
- Export Foldable and Traversable HOT 10
- Text version of error? HOT 10
- `asum` missing HOT 7
- ‘show’ is not a (visible) method of class ‘Show’ HOT 4
- Provided ``sum`` is not general enough HOT 4
- Export `for`, `for_`, `traverse_` and `sequenceA_` HOT 1
- Generalize `concat`, `concatMap` and `intercalate`? HOT 5
- Strict `minimum`, `maximum`, `minimumBy` and `maximumBy`? HOT 2
- `MonadIO` for all read*, get* and put*? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from basic-prelude.