Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-03-21 20:17:19 <koz_> Vis-a-vis the PVP, is adding new data constructors to a type a minor or major bump>?
2021-03-21 20:17:30 × joncol quits (~jco@c188-150-101-195.bredband.comhem.se) (Remote host closed the connection)
2021-03-21 20:19:00 <glguy> I'd expect major (looking)
2021-03-21 20:19:26 <glguy> Breaking change. If any entity was removed, or the types of any entities or the definitions of datatypes or classes were changed, or orphan instances were added or any instances were removed, then the new A.B MUST be greater than the previous A.B. Note that modifying imports or depending on a newer version of another package may cause extra orphan instances to be exported and thus force a major version change.
2021-03-21 20:19:41 <koz_> Yep, reads like major.
2021-03-21 20:19:46 <glguy> adding a constructor is changing the datatype definition
2021-03-21 20:20:53 × sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937)
2021-03-21 20:20:57 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
2021-03-21 20:20:58 <hpc> for a reason why, consider a downstream package matching on that data type
2021-03-21 20:21:12 <hpc> and that function has inadvertently become partial
2021-03-21 20:21:29 <koz_> hpc: Yeah, I can understand the reasoning. Just wanted to double-check.
2021-03-21 20:21:43 × ADG1089 quits (~aditya@27.58.165.185) (Read error: Connection reset by peer)
2021-03-21 20:24:50 × ixlun quits (~matthew@109.249.184.133) (Read error: Connection reset by peer)
2021-03-21 20:25:34 × zebrag quits (~inkbottle@aaubervilliers-654-1-109-157.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!)
2021-03-21 20:25:56 zebrag joins (~inkbottle@aaubervilliers-654-1-109-157.w86-212.abo.wanadoo.fr)
2021-03-21 20:28:23 × geekosaur quits (ae68c070@cpe-174-104-192-112.neo.res.rr.com) (Quit: Connection closed)
2021-03-21 20:29:08 <ski> OCaml has "private types" <https://caml.inria.fr/pub/docs/manual-ocaml/privatetypes.html>, where you can export a type so that you can destructure it with pattern-matching, if it's a record type, but not construct it. for a variant type, it's possible only have some constructors known, so that non-partial matching must always have a default case
2021-03-21 20:29:09 tsaka__ joins (~torstein@ppp-2-87-239-227.home.otenet.gr)
2021-03-21 20:30:32 × todda7 quits (~torstein@2a02:587:1b1c:3b00:c1d0:c187:5cec:e77f) (Ping timeout: 240 seconds)
2021-03-21 20:30:33 <Shiranai> what are your thoughts on lambda-case? https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/lambda_case.html
2021-03-21 20:30:49 <jackdk> it's great
2021-03-21 20:30:55 <Shiranai> Hlint just recommended them to me but seems like added notation without much benefit
2021-03-21 20:31:24 mastarija joins (~mastarija@31.217.19.201)
2021-03-21 20:32:39 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2021-03-21 20:32:59 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-21 20:33:13 <jackdk> naming things is hard, and it lets you not
2021-03-21 20:34:28 <c_wraith> I like the idea, but man did they choose the worst possible syntax for it
2021-03-21 20:34:44 <c_wraith> The original proposal was a lot cleaner
2021-03-21 20:38:45 <monochrom> What does the syntax in the original proposal look like?
2021-03-21 20:40:23 × bgamari_ quits (~bgamari@72.65.102.227) (Ping timeout: 260 seconds)
2021-03-21 20:41:34 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2021-03-21 20:41:54 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-21 20:46:16 pfurla_ joins (~pfurla@216.151.180.171)
2021-03-21 20:47:09 × pfurla quits (~pfurla@ool-182ed2e2.dyn.optonline.net) (Ping timeout: 245 seconds)
2021-03-21 20:50:28 aarvar joins (~foewfoiew@2601:602:a080:fa0:75fb:cea1:4d26:9157)
2021-03-21 20:52:08 × juri_ quits (~juri@178.63.35.222) (Ping timeout: 240 seconds)
2021-03-21 20:53:50 codygman__ joins (~user@47.186.207.161)
2021-03-21 20:53:56 × codygman__ quits (~user@47.186.207.161) (Remote host closed the connection)
2021-03-21 20:54:16 codygman__ joins (~user@47.186.207.161)
2021-03-21 20:55:09 × Benzi-Junior quits (~BenziJuni@88-149-67-143.du.xdsl.is) (Ping timeout: 264 seconds)
2021-03-21 20:55:12 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
2021-03-21 20:55:15 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-03-21 20:56:32 × wonko7 quits (~wonko7@45.15.17.60) (Ping timeout: 240 seconds)
2021-03-21 20:58:03 timCF joins (~i.tkachuk@m91-129-99-43.cust.tele2.ee)
2021-03-21 21:01:36 <timCF> Hello! I'm trying to explain functors for non-haskell developers. Is there any generic name for values of the types, which are related to functors, like `Maybe a`, `Either a b`, `List a` but not a functors themselves? Because actual functors are `Maybe`, `Either a` and `List` which can not be represented on value/term level.
2021-03-21 21:01:53 hackage pipes-pulse-simple 0.1.0.0 - Pipes for pulse-simple audio https://hackage.haskell.org/package/pipes-pulse-simple-0.1.0.0 (TristanCacqueray)
2021-03-21 21:02:49 <hpc> are you asking for things of kind * -> * that aren't instances of Functor?
2021-03-21 21:03:21 p8m joins (p8m@gateway/vpn/protonvpn/p8m)
2021-03-21 21:03:47 <monochrom> No. A common name that covers Nothing, Just 4, Left "hi", Right False, ['a', 'b', 'c'].
2021-03-21 21:03:57 <hpc> ah, i don't think there is one
2021-03-21 21:03:59 <timCF> hpc: No, I'm asking about value-level, like `Just 1`, `Left 1`, `[]`
2021-03-21 21:04:20 <hpc> they're just values you can fmap over
2021-03-21 21:04:43 × p8m_ quits (p8m@gateway/vpn/protonvpn/p8m) (Ping timeout: 276 seconds)
2021-03-21 21:05:14 <timCF> I just created property-based test to prove functor laws, which generates values of this "kind", to which `fmap` can be applied. Just thinking about how to name generator for them)
2021-03-21 21:05:38 <ski> timCF : people sometimes use the "collection" analogy, but it needs to be stretched a bit to fit the generality of the concept (even as it applies, just for `Functor' in Haskell)
2021-03-21 21:06:18 <timCF> Name `functors` for generator will be very misleading, because they actually are not a functors
2021-03-21 21:06:19 <ski> (what kind of collections are values of type `State String Bool' ?)
2021-03-21 21:07:01 × matryoshka quits (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Quit: ZNC 1.8.2 - https://znc.in)
2021-03-21 21:07:14 <timCF> I guess, I'll just name generator `fmappable` :)
2021-03-21 21:07:39 <ski> do you mean "generator" in a QuickCheck sense ?
2021-03-21 21:07:48 <ski> hm, i guess you do
2021-03-21 21:08:03 <monochrom> "fmappable" is true of both the type Maybe and the values Nothing, Just 4. This name is not disamguating.
2021-03-21 21:08:12 matryoshka joins (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809)
2021-03-21 21:08:51 olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber)
2021-03-21 21:09:40 <timCF> ski: yes, I'm explaining it for Erlang developers, in Erlang there is library called Proper, very similar to QuickChack
2021-03-21 21:09:41 <monochrom> fmap is said to "preserve structure". So if x :: F X, x contains both structure and data. So, structured data? data structure?
2021-03-21 21:09:47 <timCF> * QuickCheck
2021-03-21 21:10:14 <hpc> name it visitorFactorySingleton :P
2021-03-21 21:11:11 <timCF> monochrom: maybe `shaped` haha
2021-03-21 21:11:17 <ski> % :kind fmap Proxy# Maybe
2021-03-21 21:11:18 <yahb> ski: ; <interactive>:1:1: error: Not in scope: type variable `fmap'
2021-03-21 21:11:35 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2021-03-21 21:11:55 <monochrom> Yeah I think the experts use "shape" where I used "structure".
2021-03-21 21:11:55 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-21 21:12:34 <ski> `F' represents (types) the structure/shape, `X' the contents/data/elements
2021-03-21 21:12:41 × motersen quits (~user@2001-4dd1-d88a-0-5338-d0f4-6eda-2a0f.ipv6dyn.netcologne.de) (Quit: rcirc on GNU Emacs 27.1)
2021-03-21 21:13:29 <ski> timCF : perhaps you could say "functor-collection"
2021-03-21 21:13:51 <timCF> ski: thanks!
2021-03-21 21:14:08 juri_ joins (~juri@178.63.35.222)
2021-03-21 21:14:26 <monochrom> The Louis Vuitton Functor Collection, Collector's Edition
2021-03-21 21:15:09 × codygman__ quits (~user@47.186.207.161) (Ping timeout: 246 seconds)
2021-03-21 21:15:42 ski . o O ( `FMap Proxy# Maybe :: * -> TYPE ('TupleRep '[])' ? )
2021-03-21 21:15:45 <sclv> i'd say a "functor value"
2021-03-21 21:15:52 <monochrom> us$49,999 for a designer-autographed Either String. limited 1000 pieces worldwide.
2021-03-21 21:16:22 <sclv> because if you say "a functor is a type constructor of kind * -> *" then a "functor value" is just the application of that to something of kind * so you get something of kind *
2021-03-21 21:16:50 <ski> timCF : an important part of it is that the user is able to put values of any type in the collection, and is able to `fmap', changing the element type
2021-03-21 21:17:12 <sclv> or you might say "types in the range of a functor"
2021-03-21 21:17:26 <sclv> i.e. think of a functor as a morphism sending types to other types, so it sends `Int` to `Maybe Int` etc
2021-03-21 21:17:34 <ski> sclv : well .. i've been pondering a system in which `m :: Maybe' is a perfectly legal thing to say
2021-03-21 21:17:48 <sclv> so `Maybe Int` is in th range of a functor, but `Int` is not, in particular
2021-03-21 21:17:53 hackage gitlib 3.1.3 - API library for working with Git repositories https://hackage.haskell.org/package/gitlib-3.1.3 (JohnWiegley)
2021-03-21 21:19:11 <ski> timCF : for `Monad', we tend to say "(monadic) action" (there's also some other words floating around, like "computation","recipe","instruction list","context" ..). i think "action" is also used commonly for `Applicative'
2021-03-21 21:19:38 <ski> (i don't really like "context" used in this context, for this purpose)
2021-03-21 21:20:07 elliott_ joins (~elliott_@pool-108-51-101-42.washdc.fios.verizon.net)
2021-03-21 21:21:05 × Lord_of_Life quits (~Lord@unaffiliated/lord-of-life/x-0885362) (Ping timeout: 256 seconds)
2021-03-21 21:21:56 × mastarija quits (~mastarija@31.217.19.201) (Quit: Leaving)
2021-03-21 21:22:20 × _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection)
2021-03-21 21:24:26 <monochrom> IIRC "context" refers to the monad instances such as IO and Maybe.
2021-03-21 21:24:27 × __monty__ quits (~toonn@unaffiliated/toonn) (Quit: leaving)
2021-03-21 21:25:05 lampowner joins (~xblow@broadband-90-154-73-166.ip.moscow.rt.ru)

All times are in UTC.