constraints icon indicating copy to clipboard operation
constraints copied to clipboard

Expose ComposeC

Open Ericson2314 opened this issue 5 years ago • 7 comments

Fixes #83

Ericson2314 avatar Jan 29 '19 15:01 Ericson2314

Looks sensible to me. It looks like the build is failing on older GHCs due to UndecidableInstances not being enabled—can you add that?

Also, would you mind mentioning this in the CHANGELOG.md? Thanks!

RyanGlScott avatar Jan 29 '19 19:01 RyanGlScott

Yeah busy day, but I'll get to those two things.

Ericson2314 avatar Jan 29 '19 19:01 Ericson2314

Related to this, I also have use for a FlipC: https://github.com/obsidiansystems/constraints-extras/pull/4/files#diff-5ed8f2541b375e8ecca027c7d55495bbR38 Mind if I add that too? And if so, what module?

Ericson2314 avatar Jan 29 '19 19:01 Ericson2314

Related to this, I also have use for a FlipC: https://github.com/obsidiansystems/constraints-extras/pull/4/files#diff-5ed8f2541b375e8ecca027c7d55495bbR38 Mind if I add that too? And if so, what module?

I'm not technically the maintainer of this library (@ekmett is), so I can't really speak as to whether constraints is an appropriate place for FlipC or not. Adding ComposeC seems like a no-brainer, since we're just exposing functionality that's already there, but FlipC is a different beast entirely. (I'm only acting conservatively here since @ekmett has expressed reservations in the past about adding generic Constraint type combinators, such as in https://github.com/ekmett/constraints/issues/47#issuecomment-292767861).

Regardless, it might be best to leave that for a separate PR.

RyanGlScott avatar Jan 29 '19 19:01 RyanGlScott

Makes sense; no problem.

Ericson2314 avatar Jan 29 '19 19:01 Ericson2314

Oh but the second think proposed in the thread you linked is Compose exactly; and it also falls under the "avoid higher kinds" dictum.

Ericson2314 avatar Jan 29 '19 19:01 Ericson2314

I discovered recently that sop-core also exposes a Compose class here.

RyanGlScott avatar May 31 '20 10:05 RyanGlScott