ekmett / bytes

Serialization primitives that work with both cereal and binary.
http://hackage.haskell.org/package/bytes
Other
22 stars 13 forks source link

allow derivingVia using quantified constraints to be expressible! #49

Closed cartazio closed 4 years ago

cartazio commented 4 years ago

https://gitlab.haskell.org/ghc/ghc/issues/17767#note_251123 for how this came about

and

newtype MyDouble = MYD Double

type MGetCoerT m = (forall p q. (MonadGet m, Coercible p q) => Coercible (m p) (m q) :: Constraint)
deriving via Double instance MGetCoerT m => Serial MyDouble
cartazio commented 4 years ago

so that folks can see how to write stuff

cartazio commented 4 years ago

@RyanGlScott @ekmett would this be a minor or Major bump? and also a friend of ours would like it on hackage so he can use it ;)

ekmett commented 4 years ago

I'd probably major bump it to be safe.

cartazio commented 4 years ago

yeah, that extra constraint might impact someone somehwere

cartazio commented 4 years ago

@RyanGlScott :)

cartazio commented 4 years ago

true, i suppose that would better, the bound would be 8 6?

On Fri, Jan 31, 2020 at 6:27 PM Oleg Grenrus notifications@github.com wrote:

@phadej commented on this pull request.

In src/Data/Bytes/Get.hs https://github.com/ekmett/bytes/pull/49#discussion_r373728669:

@@ -3,6 +3,10 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE Trustworthy #-} +#if MIN_VERSION_base(4,12,0)

this should be on __GLASGOW_HASKELL__, quantified constraints isn't base feature.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ekmett/bytes/pull/49?email_source=notifications&email_token=AAABBQQBCPBSZBZKNVOVZBLRASXUZA5CNFSM4KON7SQ2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCT4IVVI#pullrequestreview-351832789, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAABBQUHSX5KZUSSX2N345TRASXUZANCNFSM4KON7SQQ .

cartazio commented 4 years ago

the magical future where ghc and base versions aren't coupled :)

On Fri, Jan 31, 2020 at 7:06 PM Carter Schonwald carter.schonwald@gmail.com wrote:

true, i suppose that would better, the bound would be 8 6?

On Fri, Jan 31, 2020 at 6:27 PM Oleg Grenrus notifications@github.com wrote:

@phadej commented on this pull request.

In src/Data/Bytes/Get.hs https://github.com/ekmett/bytes/pull/49#discussion_r373728669:

@@ -3,6 +3,10 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE Trustworthy #-} +#if MIN_VERSION_base(4,12,0)

this should be on __GLASGOW_HASKELL__, quantified constraints isn't base feature.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ekmett/bytes/pull/49?email_source=notifications&email_token=AAABBQQBCPBSZBZKNVOVZBLRASXUZA5CNFSM4KON7SQ2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCT4IVVI#pullrequestreview-351832789, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAABBQUHSX5KZUSSX2N345TRASXUZANCNFSM4KON7SQQ .

RyanGlScott commented 4 years ago

I'll plan to make a new Hackage release of bytes sometime next week alongside other @ekmett libraries that need major version bumps (namely, ad, constraints, lens, and linear).

RyanGlScott commented 4 years ago

I've released bytes-0.17 to Hackage with these changes.

cartazio commented 4 years ago

Yay and thank you!

On Mon, Feb 3, 2020 at 7:58 AM Ryan Scott notifications@github.com wrote:

I've released bytes-0.17 http://hackage.haskell.org/package/bytes-0.17 to Hackage with these changes.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ekmett/bytes/pull/49?email_source=notifications&email_token=AAABBQX45TVYOXVD3J7TZLTRBAIF3A5CNFSM4KON7SQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKTXYMI#issuecomment-581401649, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAABBQUULFU7HLK7VR7Q4WDRBAIF3ANCNFSM4KON7SQQ .