Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 16 03:50
    joneshf commented #327
  • Apr 27 16:15
    davidchambers commented #327
  • Apr 27 15:47
    jceb commented #327
  • Apr 27 14:31
    davidchambers commented #327
  • Apr 27 13:57
    CrossEye commented #327
  • Apr 27 13:45
    jceb opened #327
  • Apr 27 08:47
    davidchambers closed #325
  • Apr 26 20:04
    davidchambers commented #326
  • Apr 26 20:00

    davidchambers on master

    Version 5.0.0 (compare)

  • Apr 26 20:00

    davidchambers on v5.0.0

    (compare)

  • Apr 25 10:37
    Avaq edited #317
  • Apr 25 10:34
    Avaq edited #317
  • Apr 25 10:34
    Avaq edited #317
  • Apr 25 10:30
    TheLudd commented #326
  • Apr 19 09:15

    davidchambers on master

    use correct fields for entry po… Merge pull request #326 from Th… (compare)

  • Apr 19 09:15
    davidchambers closed #326
  • Apr 19 09:02
    TheLudd commented #326
  • Apr 19 08:34
    davidchambers commented #326
  • Apr 19 08:21
    Avaq commented #326
  • Apr 19 08:20
    Avaq commented #326
Gustavo Santana
@santanaG
I assume no changes to test folder correct?
David Chambers
@davidchambers
That's the plan. :)
Gustavo Santana
@santanaG
I know I know lol
Gustavo Santana
@santanaG
I give, what am I not understanding. I think I have to make another change. Tried a few places but not sure where.
not ok 7 - toString on value should work
          ---
          found: |-
            List.Cons("a", {"is": function $sum$isUnit(val) {
                  return unit === val || Boolean (val) &&
                    unit[TAG] === val[TAG] &&
                    type (unit) === type (val);
                }})
          wanted: 'List.Cons("a", List.Nil)
David Chambers
@davidchambers
I suggest opening a pull request for discussion, @santanaG, even if one of the tests is failing. It will be easier to collaborate that way.
Gustavo Santana
@santanaG
Understood
Gustavo Santana
@santanaG
done
Gustavo Santana
@santanaG
It seems like show expects List.Nil to have a @@show property…?
I think that is what is up. It does the [Object Object] case and once there the only other option I see is that one.
Gustavo Santana
@santanaG
This on Z.toString uses the $$type of the constructor
  function type(x) {
    return x != null &&
           x.constructor != null &&
           x.constructor.prototype !== x &&
           typeof x.constructor[$$type] === 'string' ?
      x.constructor[$$type] :
      Object.prototype.toString.call(x).slice('[object '.length, -']'.length);
  }
Gustavo Santana
@santanaG
Well, I think I figured it out… might be wrong in some way. All tests pass though.
That was fun. Wish I could do this every day.
Gustavo Santana
@santanaG
Also, is this feature request something too far outside daggy’s scope? fantasyland/daggy#39
David Chambers
@davidchambers
Our Travis CI integration has stopped working. I have spent a couple of hours trying to migrate from travis-ci.org to travis-ci.com. I made some progress, but ultimately failed. Does anyone here have experience with this process?
Gustavo Santana
@santanaG
@davidchambers any chance at checking out the daggy pr today?
David Chambers
@davidchambers
We're blocked by the issue I mentioned above, unfortunately. :\
I will review the pull request tomorrow anyway, but I'm reluctant to merge anything until we fix the Travis CI issue.
Gustavo Santana
@santanaG
Oh! Any way I can help?
I can explore the issue if I know what I am looking for and where to look.
David Chambers
@davidchambers
I just invited you to the repository.
The problem is that travis-ci.org is now in read-only mode, and I was not able to get the project correctly configured at travis-ci.com.
Gustavo Santana
@santanaG
No guides for migrating?
David Chambers
@davidchambers

https://github.com/fantasyland/daggy/compare/master...pull/44

:point_up: I hoped this commit would trigger Travis CI.

https://www.travis-ci.com/github/fantasyland/daggy/branches

:point_up: It looks as though the migration succeeded.

Gustavo Santana
@santanaG
But nothing recent that has succeeded
David Chambers
@davidchambers

https://www.travis-ci.com/github/fantasyland/daggy/requests:

Could not authorize build request for fantasyland/daggy.

Aha! It's working now. I had to select a plan. 🤪
David Chambers
@davidchambers
Could you squash your three commits, @santanaG?
Gustavo Santana
@santanaG
sure
Gustavo Santana
@santanaG
Do I pr again?
I feel I did something wrong..
Gustavo Santana
@santanaG
Got it. I had to force a push, but it fixed it at least.
David Chambers
@davidchambers
Nice one!
David Chambers
@davidchambers
Z.toString is used in the test suite as well. You should update those references too.
Gustavo Santana
@santanaG
done
Gustavo Santana
@santanaG
done, and then thought about something else…
David Chambers
@davidchambers
:thumbsup:
Gustavo Santana
@santanaG
How come show(List.Cons) should be left undefined? If that is not too hairy a subject of course.
David Chambers
@davidchambers
How do you think show(List.Cons) should evaluate?
Gustavo Santana
@santanaG
The same way that `List.Cons.toString’ does?
David Chambers
@davidchambers
How is that?
Here is the Haskell behaviour:
$ ghci
GHCi, version 8.0.2: http://www.haskell.org/ghc/  :? for help
Prelude> data List a = Nil | Cons a (List a) deriving Show
Prelude> show Nil
"Nil"
Prelude> show Cons

<interactive>:3:1: error:
    • No instance for (Show (a0 -> List a0 -> List a0))
        arising from a use of ‘show’
        (maybe you haven't applied a function to enough arguments?)
    • In the expression: show Cons
      In an equation for ‘it’: it = show Cons
Gustavo Santana
@santanaG
Well if it is being modeled after Haskell’s show I guess that it makes sense. I was looking at the parallels with toString and assumed that there should be behavior there. It makes more sense to me now why it should NOT do anything. With that being said, is there any instance where that would be useful? That could have been a better question to ask.
David Chambers
@davidchambers
I leave it up to you.
Gustavo Santana
@santanaG
Thought to be fair. It does not return undefined right now.
// show(List)
{"@@tags": ["Cons", "Nil"], "@@type": "List", "Cons": List.Cons, "Nil":
            List.Nil, "is": function $isType(val) {
                  return typeName === type (val);
                }, "prototype": {"@@show": function sum$toString() {
                return this.constructor[TYPE] + '.' +
                       this[TAG] + arrToString (this[VALUES]);
              }, "cata": function sum$cata(fs) {
                var tags = this.constructor[TAGS];
                var tag;
                for (var idx = 0; idx < tags.length; idx += 1) {
                  tag = tags[idx];
                  if (!fs[tag]) {
                    throw new TypeError (
                      "Constructors given to cata didn't include: " + tag
                    );
                  }
                }
                return fs[this[TAG]].apply (fs, this[VALUES]);
              }, "constructor": <Circular>, "foo": "foo", "toString": function sum$toString() {
                return this.constructor[TYPE] + '.' +
                       this[TAG] + arrToString (this[VALUES]);
              }}, "toString": function typeRepToString() {
                return this[TYPE];
              }}
That is List not List.Nil
Sorry!
Gustavo Santana
@santanaG
show(List.Nil) === 'List.Nil' already behaved as expected
Gustavo Santana
@santanaG
'sets show(typeRep) to work bringing in line with toString, adds show tests for Tuple, List, List.Cons, List.Nil'
David Chambers
@davidchambers

https://github.com/fantasyland/daggy/releases/tag/v1.5.0

:point_up: Here you go, @santanaG. :)