-
Notifications
You must be signed in to change notification settings - Fork 2
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
Update to v0.14.0-rc3 #7
Conversation
I'm pretty sure this is blocked by |
This is failing because of https://github.com/LiamGoodacre/purescript-naturals |
I think we should try to avoid depending on libraries which are outside of core, web, and possibly also contrib in this org. I think we should consider replacing the uses of Natural with Int. |
I don’t mind switching to Int. |
I think in this context that's fine, though I wonder if it would make
sense to have a core library represent natural numbers in some form,
in the same fashion that we have NonEmptyString, and NonEmptyArray
(iirc).
…On Fri, Dec 11, 2020 at 6:01 PM Thomas Honeyman ***@***.***> wrote:
I don’t mind switching to Int.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
--
Brandon Barker
brandon.barker@gmail.com
|
I think it's sensible for the |
I would prefer that we not move |
Probably getting a bit far afield here, but I will also mention that Idris
has special support for Peano numbers, so that they act like you would
expect a Peano number implementation to act, but under the hood they are
optimized to effectively be the equivalent of BigInts ... at least, I'm
pretty sure I saw that, somewhere. Probably less useful in PureScript to
have Peano numbers anyhow.
…On Fri, Dec 11, 2020 at 7:56 PM Harry Garrood ***@***.***> wrote:
I would prefer that we not move natural into core while it's a wrapper
around Int. I think a natural number type should ideally be backed by
BigInt.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAG7XDQ62MFMI4ZCED3BPZDSUK5VFANCNFSM4UV336RA>
.
--
Brandon Barker
brandon.barker@gmail.com
|
Right, the other reason I'm not particularly keen on Natural is that I think that in most cases the extra safety it gives you is difficult to take advantage of with the type system we have. With Idris having dependent types, I think having Peano numbers built in makes a whole lot more sense, so that you can have good ergonomics for operations like a vector append function for vectors whose length is tracked in the types. You can technically do this in PureScript too but we generally don't; the ergonomics are horrible and you often have to tell the type system "trust me, this is fine" in cases where you wouldn't have to do that in Idris. |
Looks like CI still fails because of the non- |
I don’t think that’s why it’s failing. It’s failing to unify Aff with ReaderT. A missing lift? |
Nope. It was due to hard-coded signatures elsewhere... |
CI now fails with this:
|
Issue seems due to test/node.js file content: const { JSDOM } = require("jsdom");
const { XPathResult, DOMParser } = new JSDOM().window;
Object.assign(global, { XPathResult, DOMParser })
require("../output/Test.Main/index.js").main({ browser: false })(); |
Hm. @kl0tl introduced jsdom to fix this specific error: |
Just FYI. Originally, the tests were never run during CI |
I pushed some commits to address the issue. We cannot run tests with pulp like we usually do because we have to emulate XPathResult and DOMParser with jsdom first, and configure the browser flag to disable the tests that fail with the emulated DOM provided by jsdom. |
Thanks @kl0tl and everyone. |
@@ -29,7 +28,7 @@ import Web.DOM.Element (Element, fromNode, getAttribute) | |||
import Web.DOM.Node (Node, nodeName) | |||
|
|||
unsafeFromRight :: forall l r. Either l r -> r | |||
unsafeFromRight = either (unsafeCrashWith "Value was not Left") identity | |||
unsafeFromRight = fromRight' (\_ -> unsafeCrashWith "Value was not Right") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JordanMartinez hmm, good catch - if you're referring to the "Left" in the message, I think that was probably a typo on my part, but it should have read "Value was not RIght", as it does now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bbarker Not quite. "Value was not Left" would only appear if the value was Left, so it doesn't make sense. "Value was not Right" would only appear if the value was Left, not right. Thus, this message is more accurate. I was saying 'whoops' in regards to what I originally wrote here because it's not correct.
Backlinking to purescript/purescript#3942