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

Eq implementation is not tail safe #41

Open
CGenie opened this issue Nov 19, 2022 · 1 comment
Open

Eq implementation is not tail safe #41

CGenie opened this issue Nov 19, 2022 · 1 comment

Comments

@CGenie
Copy link

CGenie commented Nov 19, 2022

Hello,

This simple code throws an error:

import Prelude
import Data.Array as A
import Data.Sequence as Seq

s = Seq.fromFoldable $ A.range 0 10000
s == s
.psci_modules/Data.FingerTree/index.js:576
var snoc = function (dictMonoid) {
                    ^

RangeError: Maximum call stack size exceeded
    at snoc (.psci_modules/Data.FingerTree/index.js:576:21)
    at snocAll (.psci_modules/Data.FingerTree/index.js:606:17)
    at toFingerTree (.psci_modules/Data.FingerTree/index.js:615:20)
    at deepL (.psci_modules/Data.FingerTree/index.js:646:25)
    at .psci_modules/Data.FingerTree/index.js:637:28
    at .psci_modules/Data.Lazy/foreign.js:6:9
    at Module.force (.psci_modules/Data.Lazy/foreign.js:13:10)
    at .psci_modules/Data.FingerTree/index.js:658:76
    at .psci_modules/Data.FingerTree/index.js:637:112
    at .psci_modules/Data.Lazy/foreign.js:6:9
@CGenie
Copy link
Author

CGenie commented Nov 19, 2022

Hm, OK, I ran this on bare purescript-sequences and don't get the error, I guess this is somewhere in my project, don't know why though...

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

1 participant