Skip to content
This repository was archived by the owner on Oct 16, 2022. It is now read-only.

Extract ClassyPrelude #8

Merged
merged 8 commits into from
Jan 21, 2018
Merged

Extract ClassyPrelude #8

merged 8 commits into from
Jan 21, 2018

Conversation

akhra
Copy link
Contributor

@akhra akhra commented Jan 20, 2018

Addressing #7

-- from ClassyPrelude

-- | Originally 'Conc.yield'.
yieldThread :: MonadBase IO m => m ()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is that used? o_0

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(see above)

@@ -38,6 +36,15 @@ import Magicbane.Metrics as X
import Magicbane.Validation as X
import Magicbane.HTTPClient as X
import Magicbane.Util as X
-- replacing ClassyPrelude
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • please don't add the "replacing ClassyPrelude" comment
  • no need to reexport everything that ClassyPrelude offered! only things used in Magicbane itself!!
  • move these imports to the top, they shouldn't be under Magicbane.* imports

(same in other files)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment was just FYI to highlight changes, I expected it to be going away before merge. :)

The only thing I explicitly held on to is the Concurrent/Async stuff, because per your comments on master, there are combinations that don't work with ExceptT. Seemed worth asserting one that does. I guess this could just be clarified in docs, tho... then yieldThread goes away too (Classy renames that to avoid namespace conflict with conduit/pipes, I was just preserving the whole conceptual group as-is).

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

diff itself is a highlight of changes :)

Oh okay I guess that makes sense, maybe keep yieldThread but document why it's there

@@ -1,5 +1,5 @@
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
{-# LANGUAGE NoImplicitPrelude, NoMonomorphismRestriction, OverloadedStrings, UnicodeSyntax, DataKinds, TypeOperators, MultiParamTypeClasses, TypeFamilies, FlexibleContexts, FlexibleInstances, UndecidableInstances, GeneralizedNewtypeDeriving, CPP #-}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't remove OverloadedStrings anywhere. Even if there are no strings in the file, I think it should be enabled everywhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should all be addressed now. I split out the concurrency stuff to Magicbane.Async for clarity of intent, and updated the readme to list lifted-async among the included packages.

@akhra
Copy link
Contributor Author

akhra commented Jan 21, 2018

A couple of new changes, both in package.yaml: I bumped the version to 0.2.0 (because breaking change), and commented out a few dependencies that are unused, to reduce the transient dependency footprint. (Initially removed them entirely, but they look like things you may have plans for.)

@valpackett
Copy link
Owner

things you may have plans for

I don't have any plans, I'm not actively working on Haskell stuff right now :)

@@ -42,19 +47,19 @@ dependencies:
- wai
- wai-middleware-metrics
- wai-cli
- servant
# - servant
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

woah wait what?! servant is like the main thing here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It surprised me too, but servant-server is where the Servant module is actually defined, and it re-exports everything Magicbane directly uses. Granted it depends on servant anyway so this isn't saving any build time.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, right — I didn't even notice the servant-server on the next line. facepalm.

@valpackett
Copy link
Owner

Are you planning on any more changes or should I merge it?

@akhra
Copy link
Contributor Author

akhra commented Jan 21, 2018

Unless you want me to fully delete those commented packages, I'm done! Verified that it works out of the box with RIO now, too.

@valpackett valpackett merged commit e7aa8e4 into valpackett:master Jan 21, 2018
@valpackett
Copy link
Owner

Yeah, cool. Thanks!

@akhra
Copy link
Contributor Author

akhra commented Jan 22, 2018

Not to be a pain, but a Hackage release would be handy!

@valpackett
Copy link
Owner

Sure. Released 0.2.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants