Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't Add Additional sanctuary-def Types To Env #132

Closed
svozza opened this issue Jan 26, 2016 · 2 comments
Closed

Can't Add Additional sanctuary-def Types To Env #132

svozza opened this issue Jan 26, 2016 · 2 comments

Comments

@svozza
Copy link
Member

svozza commented Jan 26, 2016

I started work on the maths functions listed in #127 but have encountered some really strange behaviour. The very act of including $.FiniteNumber in $.env causes a bunch of tests to fail. They all involve functions that have a dependency on type classes in their definition. Here are some of the errors:

TypeError: ‘Either#concat’ requires ‘a’ to implement Semigroup; Number and Integer and FiniteNumber do not

TypeError: ‘xor’ requires ‘a’ to implement Alternative and Monoid; (Either ??? Number) and (Either ??? Integer) and (Either ??? FiniteNumber) do not

TypeError: ‘xor’ requires ‘a’ to implement Alternative and Monoid; Number and Integer and FiniteNumber do not

Etc...

I'm guessing there's something going on with the definition of Sanctuary's Semigroup and Alternative types and is related to sanctuary-js/sanctuary-def/pull/16

@svozza svozza changed the title Can't Add Custom Types To Env Can't Add Additional sanctuary-def Types To Env Jan 26, 2016
@davidchambers
Copy link
Member

Could it simply require updating the expected error messages to mention FiniteNumber?

@svozza
Copy link
Member Author

svozza commented Jan 26, 2016

Ah yes indeed. Although simply updating the error messages required changing 22 tests!

@svozza svozza closed this as completed Jan 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants