Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jul 31 05:54
    pgrandjean opened #1265
  • Jul 31 05:51
    pgrandjean opened #1264
  • Jul 22 14:26
    joroKr21 commented #1200
  • Jul 22 14:22
    SethTisue commented #1200
  • Jul 22 13:18
    Katrix synchronize #1200
  • Jul 20 09:56

    joroKr21 on main

    Remove refinement from Witness.… Merge branch 'main' into witnes… Merge branch 'main' into witnes… and 2 more (compare)

  • Jul 20 09:56
    joroKr21 closed #1240
  • Jul 20 09:10
    milessabin commented #1240
  • Jul 19 17:41
    joroKr21 commented #1240
  • Jul 19 17:41
    joroKr21 synchronize #1240
  • Jul 14 05:59

    joroKr21 on main

    Update sbt to 1.7.1 Merge pull request #1263 from s… (compare)

  • Jul 14 05:59
    joroKr21 closed #1263
  • Jul 13 23:00
    scala-steward opened #1263
  • Jul 10 12:03

    joroKr21 on main

    Update junit-plugin, junit-runt… Revert commit(s) ca4fe1de Merge branch 'main' into update… and 2 more (compare)

  • Jul 10 12:03
    joroKr21 closed #1262
  • Jul 09 23:27
    scala-steward synchronize #1262
  • Jul 08 08:18

    joroKr21 on main

    Update sbt-scalajs, scalajs-com… Merge branch 'main' into update… Merge pull request #1260 from s… (compare)

  • Jul 08 08:18
    joroKr21 closed #1260
  • Jul 08 08:06
    joroKr21 synchronize #1260
  • Jul 08 08:06

    joroKr21 on main

    Update scala-compiler, scala-li… Merge pull request #1261 from s… (compare)

Andrew Roberts
@aroberts
that spec says to me that when I’m constructing a DerivedMsgpack instance for Family, the derive code isn’t able to reach into the Repr of Family and derive missing Msgpack instances
MsgpackIndexed <: Msgpack
Fabio Labella
@SystemFw
welcome to the beautiful world of mixing implicits and sub typing :)
Andrew Roberts
@aroberts
also, the spec I pasted above wouldn’t compile if I didn’t have coproduct implicits
so I’m confident those are getting found
I think it’s an implicit resolution problem
hah- yeah pretty awesome...
Fabio Labella
@SystemFw
can you the[MsgPack[Int :+: CNil]]
Andrew Roberts
@aroberts
let’s see...
yep
Fabio Labella
@SystemFw
right , at this point I can only help you if you give me a link to the full code I'm afraid
does it work if you put everything in the companion btw?
Andrew Roberts
@aroberts
not sure, give me a minute
Andrew Roberts
@aroberts
it breaks other stuff
Fabio Labella
@SystemFw
Personally, I'd pause and try and get it to work end-to-end without the semiauto machinery
by having everything in the companion
David Hoyt
@davidhoyt
@SystemFw yes, I was starting to go down the flatten path. I need this for labelled generics not basic (generic) products, so I tried to evolve the flatten example without much luck so far.
Fabio Labella
@SystemFw
I was doing it, but I hit an unrelated bug
I got a working version for Generic very quickly
but it didn't work for LabelledGeneric
which is really surprising, so I kept minimising and I think I've hit something that looks like a compiler bug
just posted in the scala room
David Hoyt
@davidhoyt
@SystemFw not surprised in the least. to make matters worse, I am needing it to work w/ shapeless 2.2.5 on scala 2.10 and 2.11 actually.
Fabio Labella
@SystemFw
oh, have fun :)
David Hoyt
@davidhoyt
i need a "miserable" emoji :D
Fabio Labella
@SystemFw
by "not work with LabelledGeneric" I meant they both compiled, but exhibited different behaviour
which it never happened to me with shapeless before, and I would say I'm fairly experienced with it
David Hoyt
@davidhoyt
@SystemFw do you mind pasting what you have in a scala fiddle or elsewhere?
Fabio Labella
@SystemFw
@davidhoyt what do you want exactly? the working version with Generic and the non-working one with LabelledGeneric?
David Hoyt
@davidhoyt
non-working one with labelled generic
Fabio Labella
@SystemFw
ah, I've deleted it, let me see if I can redo it
I had two versions, one with Poly, one with custom typeclasses
let me redo the one with Poly, it's shorter
David Hoyt
@davidhoyt
@SystemFw this may show my ignorance wrt shapeless -- i am trying to auto-derive type class instances. will that work w/ Poly?
Fabio Labella
@SystemFw
I also did versions with auto-derived type classes
same behaviour
David Hoyt
@davidhoyt
@SystemFw i suppose i'm asking if you can use Poly to derive type classes
Fabio Labella
@SystemFw
actually, when doing the typeclass version I got the other possible bug
@davidhoyt The question is a bit unclear to me
Poly exposes type class instances (Case), which you can use in your typeclass derivation
David Hoyt
@davidhoyt
@SystemFw i am saying that i've never used Poly that way -- i'm somewhere between beginner and intermediate level w/ shapeless
Fabio Labella
@SystemFw
similarly, some typeclasses you also use in derivations (e.g.Mapper, FlatMapper), want a Poly
@davidhoyt right, basically if you have something that works with Poly, you can ask for an implicit Case1 of that Poly
just like you would ask for another typeclass instance
(well, Case1, Case2...what have you)
or, you can write your own custom typeclass (which is what I do most of the time), to replace the poly
David Hoyt
@davidhoyt
@SystemFw i was going down that path primarily because i was unaware of alternatives :)
so I have a "wrapper" type class which I derive and can then turn into the actual type class I care about
Fabio Labella
@SystemFw
is there any reason for not deriving the type class you care about directly?
Fabio Labella
@SystemFw

TIL:

No, the subclass rule and the specificity of the type rule are both run and the score is tallied. If they are in opposite directions, it ends up with ambiguity.

So prioritising implicits to encode typelevel pattern matching precedence does not always work...disappointing