Skip to content

Eq implementation is not tail safe #41

Description

@CGenie

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions