Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jul 28 18:07
    julienrf synchronize #2136
  • Jul 28 10:29
    som-snytt commented #12378
  • Jul 28 09:38
    jxnu-liguobin commented #12378
  • Jul 28 09:35
    dwijnand commented #12435
  • Jul 28 09:00
    som-snytt commented #12435
  • Jul 28 08:50
    Jasper-M commented #12435
  • Jul 28 08:46
    dwijnand commented #12435
  • Jul 28 08:46
    dwijnand commented #12435
  • Jul 28 08:43
    dwijnand commented #12435
  • Jul 28 08:30

    julienrf on main

    Inkuire docs Merge pull request #2125 from K… (compare)

  • Jul 28 08:30
    julienrf closed #2125
  • Jul 28 08:12
    KacperFKorban commented #2125
  • Jul 28 08:11
    KacperFKorban synchronize #2125
  • Jul 28 08:11
    KacperFKorban synchronize #2125
  • Jul 28 08:04
    KacperFKorban review_requested #2125
  • Jul 28 08:03
    KacperFKorban synchronize #2125
  • Jul 28 08:01
    KacperFKorban synchronize #2125
  • Jul 28 08:01
    KacperFKorban synchronize #2125
  • Jul 28 08:00
    KacperFKorban synchronize #2125
  • Jul 28 08:00
    KacperFKorban synchronize #2125
Jose C
@jmcardon
you can't have stuff return Just I think
only Maybe
Fabio Labella
@SystemFw
in Scala you have a hierarchy of types/classes
in Haskell you have a type with variants
Just and Nothing are two things
trepidacious
@trepidacious
@SystemFw Ah ok, that makes sense. Even in Scala though None wouldn't be a type constructor because it is just a type?
@SystemFw Whereas Some actually is?
Jose C
@jmcardon
yeah
you can see it in the signature
Fabio Labella
@SystemFw
right, the important distinction here is not between type and type constructor
that doesn't matter
Jose C
@jmcardon
object None extends Option[Nothing]
Fabio Labella
@SystemFw
it's between type constructor and data constructor
the fact that Nothing/None have no arguments is not the point I'm making
let me put it this way
trepidacious
@trepidacious
@SystemFw I get that Nothing is different to a type or type constructor (at least approximately) yup.
Fabio Labella
@SystemFw
same for Just
yeah ok
Jose C
@jmcardon
@trepidacious what do you find weird about grasping re: type constructors?
trepidacious
@trepidacious
@SystemFw Yes. But it's still the case that to have a functor you need a type constructor rather than a type? I get that Just and Nothing fail even BEFORE that by not being a type OR a type constructor :)
Fabio Labella
@SystemFw
(btw, the distinction between type and type constructor is not really useful imho except in conversational talking, they're all types afterall, and we have kinds to talk about them precisely)
a Functor needs to be over a type of kind * -> *
that's what you need
trepidacious
@trepidacious
@SystemFw Is * -> * not the same as a type constructor? I thought they were just different terms for the same thing?
Fabio Labella
@SystemFw
yeah, but type constructor is not as precise
think Either
trepidacious
@trepidacious
@jmcardon I think I'm ok on that, we just ended up talking about two things at once, I didn't know about type constructors versus data constructors though
Fabio Labella
@SystemFw
that's also a type constructor
but can't be a functor
Either a can
Jose C
@jmcardon
b-b-b-b-bifunctor!
trepidacious
@trepidacious
Ah because it has two type paramters
Fabio Labella
@SystemFw
so I'd recommend just talking in terms of kinds
it's way more precise
trepidacious
@trepidacious
Is that * -> * -> * then?
Fabio Labella
@SystemFw
yeah
and in haskell types and "type constructors" have the same representation anyway
trepidacious
@trepidacious
How do I pronounce *->*?
Fabio Labella
@SystemFw
the term "type constructor" is imho only useful when explaining the difference with "data constructors"
star to star
that's how I do it
Rich
@Rich2
Could you implement Option in terms of Either?
type Option[A] = Either[Unit, A]
type Some[A] = Right[Unit, A]
val None = Left[Unit, Nothing](Unit)
Fabio Labella
@SystemFw
you can also say Type to Type but it's more confusing since you are saying type a lot as well
trepidacious
@trepidacious
Makes sense. So that is kind of a single parameter function on types?
Fabio Labella
@SystemFw
yeah, pretty much
with the usual caveats wrt to currying
Jose C
@jmcardon
star to star :P
jk
@Richtype yeah
trepidacious
@trepidacious
I should read up on the data constructor thing, but approximately Just and Nothing are ways of getting a value of type Maybe, but that does not make them types themselves?