From haskell-cafe at chrisdone.com Wed Jun 1 10:54:29 2022 From: haskell-cafe at chrisdone.com (chris done) Date: Wed, 01 Jun 2022 11:54:29 +0100 Subject: [Haskell-cafe] Keith Hanna Message-ID: <08370dc6-34ce-46d2-86f8-8635c42f3945@www.fastmail.com> Hi all, Does anyone know whether Keith Hanna is still active in the Haskell community? He's apparently no longer at the University of Kent (I called and asked) and has no discernible web presence besides research papers that refer to his Kent email address. He was mentioned in the community activities report in 2004 for his work on Vital, which I'd like to get in touch with him about. Cheers, Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: From joshchia at gmail.com Wed Jun 1 11:21:57 2022 From: joshchia at gmail.com (=?UTF-8?B?4piCSm9zaCBDaGlhICjorJ3ku7vkuK0p?=) Date: Wed, 1 Jun 2022 19:21:57 +0800 Subject: [Haskell-cafe] 403 trying to upload hackage package candidate Message-ID: Hi, After running 'cabal sdist', I tried to upload a package candidate for direct-sqlite and got an inexplicable error. Any idea how I should proceed? You can see that I am one of the maintainers here: https://hackage.haskell.org/package/direct-sqlite/maintainers/ $ cabal upload -u jchia -P 'cat /tmp/pw' /home/jchia/gh/direct-sqlite/dist-newstyle/sdist/direct-sqlite-2.3.27.tar.gz Uploading /home/jchia/gh/direct-sqlite/dist-newstyle/sdist/direct-sqlite-2.3.27.tar.gz... Error uploading /home/jchia/gh/direct-sqlite/dist-newstyle/sdist/direct-sqlite-2.3.27.tar.gz: http code 403 Error: Forbidden No access for this resource. -------------- next part -------------- An HTML attachment was scrubbed... URL: From allbery.b at gmail.com Wed Jun 1 11:33:25 2022 From: allbery.b at gmail.com (Brandon Allbery) Date: Wed, 1 Jun 2022 07:33:25 -0400 Subject: [Haskell-cafe] 403 trying to upload hackage package candidate In-Reply-To: References: Message-ID: On Wed, Jun 1, 2022 at 7:22 AM ☂Josh Chia (謝任中) wrote: > $ cabal upload -u jchia -P 'cat /tmp/pw' /home/jchia/gh/direct-sqlite/dist-newstyle/sdist/direct-sqlite-2.3.27.tar.gz I think the single quotes (') there are intended to be backquotes (`). -- brandon s allbery kf8nh allbery.b at gmail.com From joshchia at gmail.com Wed Jun 1 11:37:54 2022 From: joshchia at gmail.com (=?UTF-8?B?4piCSm9zaCBDaGlhICjorJ3ku7vkuK0p?=) Date: Wed, 1 Jun 2022 19:37:54 +0800 Subject: [Haskell-cafe] 403 trying to upload hackage package candidate In-Reply-To: References: Message-ID: I think the -P usage is correct. The error is 403, not 401. But I think the problem is that I'm somehow not in the "package uploaders" group. $ cabal upload --help Uploads source packages or documentation to Hackage. ... -p, --password=PASSWORD Hackage password. -P, --password-command=PASSWORD Command to get Hackage password. On Wed, Jun 1, 2022 at 7:33 PM Brandon Allbery wrote: > On Wed, Jun 1, 2022 at 7:22 AM ☂Josh Chia (謝任中) > wrote: > > $ cabal upload -u jchia -P 'cat /tmp/pw' > /home/jchia/gh/direct-sqlite/dist-newstyle/sdist/direct-sqlite-2.3.27.tar.gz > > I think the single quotes (') there are intended to be backquotes (`). > > -- > brandon s allbery kf8nh > allbery.b at gmail.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From olf at aatal-apotheke.de Wed Jun 1 18:49:18 2022 From: olf at aatal-apotheke.de (Olaf Klinke) Date: Wed, 01 Jun 2022 20:49:18 +0200 Subject: [Haskell-cafe] Should there be a haskell template for inclusion polymorphism in Haskell? In-Reply-To: References: <7cb8a98c781da0546bcf7df1f858733ab2018d7a.camel@aatal-apotheke.de> Message-ID: <930d66cb05efc8b834b5b8d8758873f57237c89a.camel@aatal-apotheke.de> On Wed, 2022-06-01 at 02:54 +0300, Miao ZhiCheng wrote: > it also makes me think how the C language style of > "implicit casting" is working under the hood. Ooh, good question! I am not a C expert. Can anyone more experienced share some details, please? In Kernighan & Ritchie I found this wonderful sentence at the beginning of Section 2.7: "In general, the only conversions that happen automatically are those that make sense, ..." And further: "Implicit arithmetic conversions work much as expected. In general, if an operator like + or * which takes two operands (a 'binary operator') has operands of different types, the 'lower' type is promoted to the 'higher' type before the operation proceeds." This suggests that C, too, maintains a directed hierarchy [1] of (numeric) types in which implicit conversions are performed. Attempt to perform an explicit conversion not of this hierarchy (e.g. a struct) is a compile-time error. Except, the hierarchy is not really directed, because implicitly casting "down" or "across" the hierarchy is also allowed. The following is accepted by gcc 8.3.0. unsigned long l = 3000; double d = -3.4; long x = l + d; // which is higher: long or double? double y = l + d; K & R mention that implicit casting can lose information, e.g. by rounding. I suppose a sane implementation in Haskell would want to avoid that. Olaf [1] https://www.guru99.com/images/1/020819_0641_TypeCasting2.png From allbery.b at gmail.com Wed Jun 1 19:01:26 2022 From: allbery.b at gmail.com (Brandon Allbery) Date: Wed, 1 Jun 2022 15:01:26 -0400 Subject: [Haskell-cafe] Should there be a haskell template for inclusion polymorphism in Haskell? In-Reply-To: <930d66cb05efc8b834b5b8d8758873f57237c89a.camel@aatal-apotheke.de> References: <7cb8a98c781da0546bcf7df1f858733ab2018d7a.camel@aatal-apotheke.de> <930d66cb05efc8b834b5b8d8758873f57237c89a.camel@aatal-apotheke.de> Message-ID: The first gcc example upcasts l to `double` before the addition, then casts the result of the addition down to `long` which loses information by truncation and possibly range (which can be triggered by either the `unsigned long` or the `double`; but neither one triggers that in this particular example). `long` and `unsigned long` are below both `float` and `double` in the hierarchy because the exponent can easily push a value out of their range. I'll also note that currently `fromIntegral` in Haskell doesn't verify range, so one can argue that a casting implementation has prior art to refer to. On Wed, Jun 1, 2022 at 2:52 PM Olaf Klinke wrote: > > On Wed, 2022-06-01 at 02:54 +0300, Miao ZhiCheng wrote: > > it also makes me think how the C language style of > > "implicit casting" is working under the hood. > > Ooh, good question! I am not a C expert. Can anyone more experienced > share some details, please? In Kernighan & Ritchie I found this > wonderful sentence at the beginning of Section 2.7: > "In general, the only conversions that happen automatically are those > that make sense, ..." > And further: > > "Implicit arithmetic conversions work much as expected. In general, if > an operator like + or * which takes two operands (a 'binary operator') > has operands of different types, the 'lower' type is promoted to the > 'higher' type before the operation proceeds." > > This suggests that C, too, maintains a directed hierarchy [1] of > (numeric) types in which implicit conversions are performed. Attempt to > perform an explicit conversion not of this hierarchy (e.g. a struct) is > a compile-time error. > Except, the hierarchy is not really directed, because implicitly > casting "down" or "across" the hierarchy is also allowed. The following > is accepted by gcc 8.3.0. > unsigned long l = 3000; > double d = -3.4; > long x = l + d; // which is higher: long or double? > double y = l + d; > K & R mention that implicit casting can lose information, e.g. by > rounding. I suppose a sane implementation in Haskell would want to > avoid that. > > Olaf > > [1] https://www.guru99.com/images/1/020819_0641_TypeCasting2.png > > _______________________________________________ > Haskell-Cafe mailing list > To (un)subscribe, modify options or view archives go to: > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > Only members subscribed via the mailman list are allowed to post. -- brandon s allbery kf8nh allbery.b at gmail.com From kindaro at gmail.com Thu Jun 2 14:09:36 2022 From: kindaro at gmail.com (Ignat Insarov) Date: Thu, 2 Jun 2022 18:09:36 +0400 Subject: [Haskell-cafe] Hiding type variables from the signature? In-Reply-To: References: Message-ID: Alright, I found a nice example of how things fail. See this addition to the previous code: ```Haskell -- | This is the right tensorial strength of a functor with respect to tupling. deasil :: Functor functor => (functor left, right) -> functor (left, right) deasil (functor, value) = fmap (, value) functor deasilsA :: forall peels seed value. ( Squeezy seed (Dress seed peels) peels , ForAll peels Functor ) => (Dress seed peels, value) -> Squeezed peels (seed, value) deasilsA = deasil . first squeeze deasilsB :: forall peels seed value. ( Squeezy (seed , value) (Dress (seed, value) peels) peels ) => Squeezed peels (seed, value) -> Dress (seed, value) peels deasilsB = stretch deasils :: _ => (Dress seed peels, value) -> Dress (seed, value) peels deasils = deasilsB . deasilsA ``` What is the type of `deasils`? ``` % ghci-9.2.2 Squeeze.hs GHCi, version 9.2.2: https://www.haskell.org/ghc/ :? for help Loaded GHCi configuration from /home/kindaro/code/dotfiles/ghci.conf [1 of 1] Compiling Main ( Squeeze.hs, interpreted ) Ok, one module loaded. λ :type deasilsB . deasilsA deasilsB . deasilsA :: (ForAll peels Functor, Squeezy' seed (Dress seed peels) peels (Strip seed (Dress seed peels) == '[]), Squeezy' (seed, value) (Dress (seed, value) peels) peels (Strip (seed, value) (Dress (seed, value) peels) == '[])) => (Dress seed peels, value) -> Dress (seed, value) peels ``` Looks good, but… ``` λ f = deasilsB . deasilsA :2:1: error: • Could not deduce: Dress seed0 peels0 ~ Dress seed peels ``` What is going on? How can I have my `deasils`? I tried attaching all kinds of type annotations, but nothing works so far. I do not even understand the problem. How is it that an expression can be typed, but cannot be assigned to a name? You can see the complete code at the gist [1]. [1]: https://gist.github.com/kindaro/6056f753bcf356ced96b817fee72533c/2823ec2792f089de65abfb0a0bf677f96432fff4 From olf at aatal-apotheke.de Fri Jun 3 04:58:17 2022 From: olf at aatal-apotheke.de (Olaf Klinke) Date: Fri, 03 Jun 2022 06:58:17 +0200 Subject: [Haskell-cafe] Hiding type variables from the signature? Message-ID: <719ca32a8756bba7c8f78eaf6998e8c1491123f9.camel@aatal-apotheke.de> > λ f = deasilsB . deasilsA > > :2:1: error: > • Could not deduce: Dress seed0 peels0 ~ Dress seed peels > ``` > > What is going on? How can I have my `deasils`? > > I tried attaching all kinds of type annotations, but nothing works so far. I do > not even understand the problem. How is it that an expression can be typed, but > cannot be assigned to a name? > > You can see the complete code at the gist [1]. > > [1]: https://gist.github.com/kindaro/6056f753bcf356ced96b817fee72533c/2823ec2792f089de65abfb0a0bf677f96432fff4 The given type annotation for desilsA uses forall, which suggests you want to use ScopedTypeVariables here. But for that feature to kick in, you need to actually mention the scoped type variables in the function body, which you don't. :t deasil . first squeeze deasil . first squeeze :: (ForAll peels Functor, Squeezy' left a peels (Strip left a == '[])) => (a, right) -> Squeezed peels (left, right) You must use ScopedTypeVariables to constrain the type variable `a' to the intended (Dress seed peels). Olaf From mikolaj at well-typed.com Fri Jun 3 09:07:47 2022 From: mikolaj at well-typed.com (Mikolaj Konarski) Date: Fri, 3 Jun 2022 11:07:47 +0200 Subject: [Haskell-cafe] cabal 3.8 pre-released! Message-ID: Hello! The first 3.8 series cabal release candidate is available. Install via ghcup config add-release-channel \ https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml; ghcup install cabal 3.8.0.20220526 or manually from https://downloads.haskell.org/cabal/cabal-install-3.8.1.0-rc1/. We, the cabal team, are completely dependent on our invaluable contributors and collaborators, thanks to whom this pre-release is possible. Therefore, please test extensively and if anything critical is missing or broken that you'd like to see fixed in 3.8.1.0-final, let us know on the bug tracker. There is still a narrow window to change things and the cabal team will try to guide you along and help you implement them. The dynamic list of known grave bugs that could plausibly be solved for 3.8 is at https://github.com/haskell/cabal/issues?q=is%3Aopen+is%3Aissue+label%3A%22priority%3A+high+%3Afire%3A%22+milestone%3A%22Considered+for+3.8%22 At the time of writing none of the bugs on the list is blocking the final 3.8 release. Changelogs are at https://github.com/haskell/cabal/blob/Cabal-v3.8.1.0-rc1/release-notes/Cabal-3.8.0.20220526.md https://github.com/haskell/cabal/blob/cabal-install-v3.8.1.0-rc1/release-notes/cabal-install-3.8.0.20220526.md The list of all authors of cabal is the git commit log. You are great. Happy hacking, Mikolaj From lemming at henning-thielemann.de Fri Jun 3 09:16:53 2022 From: lemming at henning-thielemann.de (Henning Thielemann) Date: Fri, 3 Jun 2022 11:16:53 +0200 (CEST) Subject: [Haskell-cafe] cabal 3.8 pre-released! In-Reply-To: References: Message-ID: <837ef720-21f2-be1c-e5e5-709a5d7f684c@henning-thielemann.de> On Fri, 3 Jun 2022, Mikolaj Konarski wrote: > Hello! The first 3.8 series cabal release candidate is available. Install via > > ghcup config add-release-channel \ > https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml; > ghcup install cabal 3.8.0.20220526 > > or manually from > > https://downloads.haskell.org/cabal/cabal-install-3.8.1.0-rc1/. What about an upload as package candidate at Hackage? From mikolaj at well-typed.com Fri Jun 3 09:27:08 2022 From: mikolaj at well-typed.com (Mikolaj Konarski) Date: Fri, 3 Jun 2022 11:27:08 +0200 Subject: [Haskell-cafe] cabal 3.8 pre-released! In-Reply-To: <837ef720-21f2-be1c-e5e5-709a5d7f684c@henning-thielemann.de> References: <837ef720-21f2-be1c-e5e5-709a5d7f684c@henning-thielemann.de> Message-ID: Hi Henning, > What about an upload as package candidate at Hackage? Here you go (but note that package candidates are transient so these are going to vanish at some point): https://hackage.haskell.org/package/cabal-install-3.8.0.20220526/candidate https://hackage.haskell.org/package/cabal-install-solver-3.8.0.20220526/candidate https://hackage.haskell.org/package/Cabal-3.8.0.20220526/candidate https://hackage.haskell.org/package/Cabal-syntax-3.8.0.20220526/candidate Let me know if they don't work. Cheers, Mikolaj From carter.schonwald at gmail.com Fri Jun 3 17:14:45 2022 From: carter.schonwald at gmail.com (Carter Schonwald) Date: Fri, 3 Jun 2022 13:14:45 -0400 Subject: [Haskell-cafe] cabal 3.8 pre-released! In-Reply-To: References: <837ef720-21f2-be1c-e5e5-709a5d7f684c@henning-thielemann.de> Message-ID: This looks great! Is the solver being factored out as its own package a new architecture change ? On Fri, Jun 3, 2022 at 5:27 AM Mikolaj Konarski wrote: > Hi Henning, > > > What about an upload as package candidate at Hackage? > > Here you go (but note that package candidates are transient > so these are going to vanish at some point): > > https://hackage.haskell.org/package/cabal-install-3.8.0.20220526/candidate > > https://hackage.haskell.org/package/cabal-install-solver-3.8.0.20220526/candidate > https://hackage.haskell.org/package/Cabal-3.8.0.20220526/candidate > https://hackage.haskell.org/package/Cabal-syntax-3.8.0.20220526/candidate > > Let me know if they don't work. > > Cheers, > Mikolaj > _______________________________________________ > cabal-devel mailing list > cabal-devel at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/cabal-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mikolaj at well-typed.com Fri Jun 3 18:56:02 2022 From: mikolaj at well-typed.com (Mikolaj Konarski) Date: Fri, 3 Jun 2022 20:56:02 +0200 Subject: [Haskell-cafe] cabal 3.8 pre-released! In-Reply-To: References: <837ef720-21f2-be1c-e5e5-709a5d7f684c@henning-thielemann.de> Message-ID: > This looks great! Thank you. :O) > Is the solver being factored out as its own package a new architecture change ? It's a new old change, many years in the brewing by generations of cabal developers and now finally (to be) released. We are equally proud of the separation of Cabal-syntax package, again a collaborative effort, started with a mega-commit by Patrick Dougherty. A warning though: the APIs of the new packages are not mature yet, because not enough people use them and give feedback, because they are not mature yet. So expect lots of breakage, guarded by major version bumps. E.g., we re-export too much stuff from Cabal-syntax to limit the breakage of Cabal, to give users a sporting chance to transition to the split API before it's the only one available. All the best, Mikolaj From simon at joyful.com Sat Jun 4 23:16:24 2022 From: simon at joyful.com (Simon Michael) Date: Sun, 5 Jun 2022 00:16:24 +0100 Subject: [Haskell-cafe] ANN: hledger-1.26 Message-ID: <0DC152C9-284E-4F4C-9602-C726FDA4DD9B@joyful.com> Aloha! I am pleased to announce hledger 1.26: https://github.com/simonmichael/hledger/releases/1.26 https://hledger.org/install https://hledger.org/release-notes.html#hledger-1-26 1.26 is a modest maintenance release; highlights include faster register reports and clearer error messages. Thank you to core contributor Stephen Morgan. What is hledger ? - free, high quality Plain Text Accounting[1] software: - a fast and robust multicurrency double-entry accounting system - built around human-readable, version-controllable plain text files - inspired by and partly compatible with Ledger CLI[2] - convertible to and from Beancount[3] - written in Haskell for correctness and longevity - easy to install on unix, mac and windows. For help getting started, or more info, see https://hledger.org, and join our chat via Matrix or IRC: https://hledger.org/support. Newcomers, experts, contributors, sponsors, feedback are always welcome! Best wishes, -Simon [1] https://plaintextaccounting.org [2] https://ledger-cli.org [3] https://beancount.github.io From simon at joyful.com Sun Jun 5 01:04:07 2022 From: simon at joyful.com (Simon Michael) Date: Sun, 5 Jun 2022 02:04:07 +0100 Subject: [Haskell-cafe] ANN: hledger-1.26 In-Reply-To: <0DC152C9-284E-4F4C-9602-C726FDA4DD9B@joyful.com> References: <0DC152C9-284E-4F4C-9602-C726FDA4DD9B@joyful.com> Message-ID: On Jun 5, 2022, at 00:16, Simon Michael wrote: > Thank you to core contributor Stephen Morgan. And also to Jakob Schöttl and Patrik Keller ! Sorry about that. -------------- next part -------------- An HTML attachment was scrubbed... URL: From carter.schonwald at gmail.com Sun Jun 5 18:07:45 2022 From: carter.schonwald at gmail.com (Carter Schonwald) Date: Sun, 5 Jun 2022 14:07:45 -0400 Subject: [Haskell-cafe] cabal 3.8 pre-released! In-Reply-To: References: <837ef720-21f2-be1c-e5e5-709a5d7f684c@henning-thielemann.de> Message-ID: doing those two pieces is *amazing* and jailbreaks a lot of amazing tooling/experiments being possible in userspace! props to all who were involved On Fri, Jun 3, 2022 at 2:56 PM Mikolaj Konarski wrote: > > This looks great! > > Thank you. :O) > > > Is the solver being factored out as its own package a new architecture > change ? > > It's a new old change, many years in the brewing by generations > of cabal developers and now finally (to be) released. We are equally > proud of the separation of Cabal-syntax package, again a collaborative > effort, started with a mega-commit by Patrick Dougherty. > > A warning though: the APIs of the new packages are not mature yet, > because not enough people use them and give feedback, because > they are not mature yet. So expect lots of breakage, guarded by major > version bumps. E.g., we re-export too much stuff from Cabal-syntax > to limit the breakage of Cabal, to give users a sporting chance > to transition to the split API before it's the only one available. > > All the best, > Mikolaj > -------------- next part -------------- An HTML attachment was scrubbed... URL: From miao at decentral.ee Sun Jun 5 21:06:54 2022 From: miao at decentral.ee (Miao ZhiCheng) Date: Mon, 6 Jun 2022 00:06:54 +0300 Subject: [Haskell-cafe] Should there be a haskell template for inclusion polymorphism in Haskell? In-Reply-To: References: <7cb8a98c781da0546bcf7df1f858733ab2018d7a.camel@aatal-apotheke.de> <930d66cb05efc8b834b5b8d8758873f57237c89a.camel@aatal-apotheke.de> Message-ID: Not to mention the horror and hilarity of endless JS surprises: ```js > "4"+2 '42' > "4"-2 2 > +"4"+2 6 > "5"*true 5 > "5"+true '5true' > "5"/false Infinity // and so on and so on... ``` To end this thread, actually I finally found out that most of the discussion we had so far could be summarized perfectly well in * Cardelli, Luca, and Peter Wegner. "On understanding types, data abstraction, and polymorphism." * The question if Haskell should have inclusion polymorphism still does not have a satisfying answer to me, but I found that https://discourse.haskell.org/search?q=oop seem to have some good threads to read more on. Cheers everyone. On Wed, Jun 1, 2022 at 10:01 PM Brandon Allbery wrote: > The first gcc example upcasts l to `double` before the addition, then > casts the result of the addition down to `long` which loses > information by truncation and possibly range (which can be triggered > by either the `unsigned long` or the `double`; but neither one > triggers that in this particular example). `long` and `unsigned long` > are below both `float` and `double` in the hierarchy because the > exponent can easily push a value out of their range. > > I'll also note that currently `fromIntegral` in Haskell doesn't verify > range, so one can argue that a casting implementation has prior art to > refer to. > > On Wed, Jun 1, 2022 at 2:52 PM Olaf Klinke wrote: > > > > On Wed, 2022-06-01 at 02:54 +0300, Miao ZhiCheng wrote: > > > it also makes me think how the C language style of > > > "implicit casting" is working under the hood. > > > > Ooh, good question! I am not a C expert. Can anyone more experienced > > share some details, please? In Kernighan & Ritchie I found this > > wonderful sentence at the beginning of Section 2.7: > > "In general, the only conversions that happen automatically are those > > that make sense, ..." > > And further: > > > > "Implicit arithmetic conversions work much as expected. In general, if > > an operator like + or * which takes two operands (a 'binary operator') > > has operands of different types, the 'lower' type is promoted to the > > 'higher' type before the operation proceeds." > > > > This suggests that C, too, maintains a directed hierarchy [1] of > > (numeric) types in which implicit conversions are performed. Attempt to > > perform an explicit conversion not of this hierarchy (e.g. a struct) is > > a compile-time error. > > Except, the hierarchy is not really directed, because implicitly > > casting "down" or "across" the hierarchy is also allowed. The following > > is accepted by gcc 8.3.0. > > unsigned long l = 3000; > > double d = -3.4; > > long x = l + d; // which is higher: long or double? > > double y = l + d; > > K & R mention that implicit casting can lose information, e.g. by > > rounding. I suppose a sane implementation in Haskell would want to > > avoid that. > > > > Olaf > > > > [1] https://www.guru99.com/images/1/020819_0641_TypeCasting2.png > > > > _______________________________________________ > > Haskell-Cafe mailing list > > To (un)subscribe, modify options or view archives go to: > > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > Only members subscribed via the mailman list are allowed to post. > > > > -- > brandon s allbery kf8nh > allbery.b at gmail.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ant.pichugin at gmail.com Mon Jun 6 08:06:18 2022 From: ant.pichugin at gmail.com (Anton Pichugin) Date: Mon, 6 Jun 2022 11:06:18 +0300 Subject: [Haskell-cafe] Dashboard Message-ID: Hello everyone in the Haskell cafe! Such a nice place! My name is Anton. A month ago I started learning Haskell. I want to make a dashboard about the language. What data should I analyze and add to it? I see this project as a page where you can see charts and diagrams that change in real time. As of now I only have Google Trends (search Interest over time) + number of commits on GitHub. What else can I visualize? Which one could be helpful to the community? Kind regards, Anton Pichugin -------------- next part -------------- An HTML attachment was scrubbed... URL: From cdvasconcellos at hotmail.com Tue Jun 7 04:03:25 2022 From: cdvasconcellos at hotmail.com (Cristiano D. Vasconcellos) Date: Tue, 7 Jun 2022 04:03:25 +0000 Subject: [Haskell-cafe] Deadline Extended: 26th Brazilian Symposium on Programming Languages (SBLP 2022) Message-ID: SBLP 2022 is the 26th edition of the Brazilian Symposium on Programming Languages. It is promoted by the Brazilian Computer Society (SBC) and constitutes a forum for researchers, students, and professionals to present and discuss ideas and innovations in the design, definition, analysis, implementation, and practical use of programming languages. SBLP's first edition was in 1996. Since 2010, it has been part of CBSoft, the Brazilian Conference on Software: Theory and Practice. The Conference is planned to be held on October 3-7, 2022, fully online. Submission Guidelines Papers can be written in Portuguese or English. Submissions in English are encouraged considering that only accepted papers written in English will appear in the proceedings, usually indexed in the ACM Digital Library (to be confirmed). The acceptance of a paper implies the registration of at least one author in the symposium to present it. Papers must be original and not simultaneously submitted to another journal or conference. No-show of scheduled papers will result in excluding them from the proceedings. SBLP 2022 will use a lightweight double-blind review process. The manuscripts should be submitted for review anonymously (i.e., without listing the author’s names on the paper) and references to own work should be made in the third person. Papers must be submitted electronically (in PDF format) via the EasyChair System. The following paper categories are welcome (page limits include figures, references, and appendices): • Full papers: up to 8 pages long in ACM 2-column conference format. Full papers can be further specialized, at submission time, as student papers (i.e., as papers describing research conducted mainly by a student at any level). student papers will be subject to the exact same reviewing process and criteria but may be entitled for an award (see below). • Short papers: up to 3 pages in the same format. Short papers can discuss new ideas which are at an early stage of development or can report partial results of on-going dissertations or theses. Each paper can have a maximum of one extra page for references. Active graduate and undergraduate students seeking feedback are invited to submit short papers of their original unpublished and in-progress research work. A set of selected papers, which did not get accepted as full papers, may be accepted as short papers. Awards: Two best paper awards will be attributed, distinguishing full paper submissions of the best: • student paper; • non-student paper. List of Topics (related but not limited to the following): • Programming paradigms and styles, scripting and domain-specific languages and support for real-time, service-oriented, multi-threaded, parallel, distributed, and quantum programming; • Program generation and transformation; • Formal semantics and theoretical foundations: denotational, operational, algebraic, and categorical; • Program analysis and verification, type systems, static analysis, and abstract interpretation; • Programming language design and implementation, programming, language environments, compilation, and interpretation techniques; • Programming languages for the blockchain technology: design and implementation of Smart Contract languages, implementation of consensus protocols, language-based security, and cryptographic primitives. A selection of the best papers appearing in the last editions of SBLP have been invited to be extended and considered for publication in a special issue of the Journal of Computer Languages (COLA), by Elsevier. We will approach COLA for a similar special issue regarding the 2022 edition of SBLP. Important dates: • Abstract submission: 20 June, 2022. • Paper submission: 20 June, 2022. • Author notification: 16 Aug, 2022. • Camera ready deadline: 29 Aug, 2022. Program Committee Program Committee Chair: Cristiano Vasconcellos, UDESC Program Committee Alberto Pardo, Universidad de la República Alcides Fonseca, Universidade de Lisboa Alejandro Díaz-Caro, Universidad Nacional de Quilmes & Universidad de Buenos Aires Alex Kavvos, University of Bristol Anderson Faustino, UEM Andrei Paskevich, Université Paris-Sud, LRI Andre Maidl, Elastic Dalvan Griebler, PUCRS/SETREM Emmanuel Chailloux, University Pierre and Marie Curie Fernando Castor, UFPE & Utrecht University Fernando Pereira, UFMG Francisco Sant'anna, UERJ Karina Roggia, UDESC Leonardo dos Santos, UFJF Liam O'Connor, University of Edinburgh Marcos Viera, Universidad de la República Mário Pereira, Universidade NOVA de Lisboa Mariza Bigonha, UFMG Nuno Macedo, INESC TEC & University of Porto Paul Leger, Universidad Católica del Norte Roberto Bigonha, UFMG Roberto Ierusalimschy PUC-Rio Rodrigo Ribeiro, UFOP Samuel Feitosa, UFFS Sérgio Medeiros, UFRN Simão Sousa, Universidade da Beira Interior Stefania Dumbrava, ENSIIE Paris-Evry Contact: All questions about submissions should be emailed to cristiano.vasconcellos at udesc.br -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivanperezdominguez at gmail.com Wed Jun 8 01:03:47 2022 From: ivanperezdominguez at gmail.com (Ivan Perez) Date: Tue, 7 Jun 2022 21:03:47 -0400 Subject: [Haskell-cafe] [ANN] Yampa 0.13.5 Message-ID: Dear all, I'm happy to announce the release of Yampa 0.13.5! Yampa is a fast, elegant FRP library that enforces a separation between effects (e.g., user input, rendering) and FRP signal function specifications.Yampa prides itself in being a long-standing community project. It's now been around for almost 20 years!!! In all this time, it has enjoyed abundant use in research, in open source, and in industry. * Summary of changes - Tests in the yampa-test library have now been reorganized to follow the same structure of Yampa. This change will make it easier to identify what tests are missing. A summary has been produced as part of an issue [1]. - A less-known feature of Yampa is that applicative style is also supported, and renders programs reminiscent of classic FRP. To make Yampa more inviting to users who prefer such style, the descriptions in the package, README and main module have been adapted so that they do not suggest that arrows syntax or the arrow-based interface is the only available or even preferred style. - Tabs will now produce a compilation error. - Multiple maintenance fixes (fix broken links in documentation, remove unnecessary imports, style fixes, etc.). As always, Yampa and yampa-test are released in sync. The CHANGELOGs are available at: https://github.com/ivanperez-keera/Yampa/blob/develop/yampa/CHANGELOG https://github.com/ivanperez-keera/Yampa/blob/develop/yampa-test/CHANGELOG * Releases You can explore the current versions at: https://hackage.haskell.org/package/Yampa https://hackage.haskell.org/package/yampa-test * Code The github repo is located at: https://github.com/ivanperez-keera/Yampa * Upcoming changes We are discussing an upcoming change that may affect users. We are interested in knowing if/how this would affect you (if at all). - Addition of new constraint to integral/derivative: The VectorSpace implementation we are using imposes the Eq and Floating constraints on vector spaces, but they have turned out not to be necessary. An alternative implementation is being proposed [2], which removes those constraints, and gives default implementations for some functions that meet some type constraints. This change would require adapting the code of integral, derivative and some related functions to impose an additional type constraint. We expect most user code to be compatible, but the change is, technically, API-breaking. This topic is open to discussion, we invite interested users to come forward. * Other notes: We have a plan for the upcoming releases. Check out the project issues or message me if you are interested in participating. https://github.com/ivanperez-keera/Yampa/issues All the best, Ivan [1] https://github.com/ivanperez-keera/Yampa/issues/217 [2] https://github.com/ivanperez-keera/simple-affine-space/tree/develop-no-constraint -------------- next part -------------- An HTML attachment was scrubbed... URL: From raoknz at gmail.com Wed Jun 8 08:46:49 2022 From: raoknz at gmail.com (Richard O'Keefe) Date: Wed, 8 Jun 2022 20:46:49 +1200 Subject: [Haskell-cafe] Dashboard In-Reply-To: References: Message-ID: Number of commits is one thing. Number of maintained packages is another and more interesting measure. Activity in the mailing list and StackOverflow and #haskell might be of use too. Is it possible to collect information about sales of Haskell books? Visits to http://learnyouahaskell.com/ ? On Mon, 6 Jun 2022 at 20:07, Anton Pichugin wrote: > Hello everyone in the Haskell cafe! Such a nice place! > > My name is Anton. A month ago I started learning Haskell. I want to make a > dashboard about the language. What data should I analyze and add to it? > > I see this project as a page where you can see charts and diagrams that > change in real time. As of now I only have Google Trends (search Interest > over time) + number of commits on GitHub. What else can I visualize? Which > one could be helpful to the community? > > Kind regards, > > Anton Pichugin > _______________________________________________ > Haskell-Cafe mailing list > To (un)subscribe, modify options or view archives go to: > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > Only members subscribed via the mailman list are allowed to post. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tozkanli2023 at gmail.com Wed Jun 8 08:52:04 2022 From: tozkanli2023 at gmail.com (=?UTF-8?Q?Tarik_=C3=96ZKANLI?=) Date: Wed, 8 Jun 2022 11:52:04 +0300 Subject: [Haskell-cafe] Dashboard In-Reply-To: References: Message-ID: Hi, Number of github projects whose main language is Haskell (compared to other languages) would be another cool metric. Kind regards. Tarık Özkanlı On Wed, 8 Jun 2022 at 11:48, Richard O'Keefe wrote: > Number of commits is one thing. > Number of maintained packages is another > and more interesting measure. > Activity in the mailing list and StackOverflow > and #haskell might be of use too. > Is it possible to collect information about sales > of Haskell books? > Visits to http://learnyouahaskell.com/ ? > > > On Mon, 6 Jun 2022 at 20:07, Anton Pichugin > wrote: > >> Hello everyone in the Haskell cafe! Such a nice place! >> >> My name is Anton. A month ago I started learning Haskell. I want to make >> a dashboard about the language. What data should I analyze and add to it? >> >> I see this project as a page where you can see charts and diagrams that >> change in real time. As of now I only have Google Trends (search Interest >> over time) + number of commits on GitHub. What else can I visualize? Which >> one could be helpful to the community? >> >> Kind regards, >> >> Anton Pichugin >> _______________________________________________ >> Haskell-Cafe mailing list >> To (un)subscribe, modify options or view archives go to: >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >> Only members subscribed via the mailman list are allowed to post. > > _______________________________________________ > Haskell-Cafe mailing list > To (un)subscribe, modify options or view archives go to: > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > Only members subscribed via the mailman list are allowed to post. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mlang at blind.guru Wed Jun 8 19:17:08 2022 From: mlang at blind.guru (Mario Lang) Date: Wed, 08 Jun 2022 21:17:08 +0200 Subject: [Haskell-cafe] Phase correction? Message-ID: <87edzz2cej.fsf@blind.guru> Hi. This is more a math question then a Haskell specific thing. However, Haskell fits nicely to write down the problem as executable "pseudo" code, so here I am, knowing that you all can read this and actually grasp the problem at hand (which I obviously dont). I stumbled across this while naively playing with C++ infinite ranges, starting with std::ranges::views::iota. So there I was, happily playing with signal generation, until I went stuck here: Modulating oscillation frequency while trying to stay stateless. But code says more then a foreign language, so: #!/usr/bin/env stack -- stack --resolver lts-19.8 runghc import Data.Ratio n = [0 ..] d = 10 -- EXAMPLE, usually 48000 t = (% d) <$> n sine f = (\x -> sin $ 2*pi * fromRational x * f x) <$> t sine1 = sine $ const 1 -- OK -- Lets devise a method to specify a value changing over time data I = No | Lin | Exp erp No a _ _ = a erp Lin a b mu = (1 - mu) * a + mu * b erp Exp a b mu = a * ((b / a) ** mu) data Curve a = Curve a [(I, Double, a)] at (Curve p1 []) _ = p1 at (Curve p1 ((i, d, p2):xs)) t = go 0 d p1 p2 i d xs where go t1 t2 p1 p2 i d xs | t < t2 = erp i p1 p2 $ (t - t1) / d | null xs = p1 | (i', d', p2') <- head xs = go t2 (t2 + d') p2 p2' i' d' $ tail xs -- Frequency modulation? c = Curve 1 [(Exp, 1.0, 2), (Exp, 1.0, 1)] sine2 = sine $ at c . fromRational -- WRONG!🙅 -- Whenever a change occurs, phase is incorrect -- because current step doesn't know about the past main = do print $ take 10 $ sine1 print $ at c 0.5 == at c 1.5 print $ take 10 $ sine2 -- The naive question of an experimenting non-math coder person is: -- Can a version of `at` be written which compensates for the phase -- differences which runs in O(n) where n is the number of curve points? -- Intuitively this should be possible given `d` (denominator). at' :: Curve a -> Ratio b -> a at' c t = undefined -- CYa, ⡍⠁⠗⠊⠕ From lemming at henning-thielemann.de Wed Jun 8 19:35:25 2022 From: lemming at henning-thielemann.de (Henning Thielemann) Date: Wed, 8 Jun 2022 21:35:25 +0200 (CEST) Subject: [Haskell-cafe] Phase correction? In-Reply-To: <87edzz2cej.fsf@blind.guru> References: <87edzz2cej.fsf@blind.guru> Message-ID: On Wed, 8 Jun 2022, Mario Lang wrote: > -- The naive question of an experimenting non-math coder person is: > -- Can a version of `at` be written which compensates for the phase > -- differences which runs in O(n) where n is the number of curve points? > -- Intuitively this should be possible given `d` (denominator). > at' :: Curve a -> Ratio b -> a > at' c t = undefined Information that is lost, is lost. You could add the cosine as imaginary part to the sine, in order to form a complex number that stores the phase in its argument (Complex.phase). But I would not do that. It only works for a plain sine wave. For other waveforms like saw tooth, square, etc. you need to maintain the phase (which is the integral of the modulation curve). That's the safe way to go. From mlang at blind.guru Wed Jun 8 20:02:55 2022 From: mlang at blind.guru (Mario Lang) Date: Wed, 08 Jun 2022 22:02:55 +0200 Subject: [Haskell-cafe] Phase correction? In-Reply-To: (Henning Thielemann's message of "Wed, 8 Jun 2022 21:35:25 +0200 (CEST)") References: <87edzz2cej.fsf@blind.guru> Message-ID: <875yla3ouo.fsf@blind.guru> Henning Thielemann writes: > On Wed, 8 Jun 2022, Mario Lang wrote: > >> -- The naive question of an experimenting non-math coder person is: >> -- Can a version of `at` be written which compensates for the phase >> -- differences which runs in O(n) where n is the number of curve points? >> -- Intuitively this should be possible given `d` (denominator). >> at' :: Curve a -> Ratio b -> a >> at' c t = undefined > > Information that is lost, is lost. But is it really "lost", given that a Curve knows about all the phase changes in the past? I guess the simplest case would be No interpolation. Thats a single phase change. My math is too bad, but I guess given the denominator (sample rate) and the from and to value of the change, the phase difference should be somehow computable? If so, the next question would be if the linear interpolation case could also be compensated for? Ideally, every interpolation formula would have a phase compensation function. If that is so, how computationally intensive would they be? -- CYa, ⡍⠁⠗⠊⠕ From frederic-emmanuel.picca at synchrotron-soleil.fr Mon Jun 13 08:06:22 2022 From: frederic-emmanuel.picca at synchrotron-soleil.fr (PICCA Frederic-Emmanuel) Date: Mon, 13 Jun 2022 10:06:22 +0200 (CEST) Subject: [Haskell-cafe] pipes Producer combination Message-ID: <32669350.8772445.1655107582930.JavaMail.zimbra@synchrotron-soleil.fr> Hello, I would like to combine Producers in order to create a Producer of another type whcih combine these values I want a Producer of the 'A' type data A :: A a b by I have a Producer of 'a' values and another on of 'b' values. what is the best way to create from thoses two producers a Producer of 'A' ? Is ther a Generic way to automatically generate these combine Producers. In my programmes, I will have plenty of these combine Producers. thanks for considering. Cheers Frederic From ben.franksen at online.de Mon Jun 13 12:24:04 2022 From: ben.franksen at online.de (Ben Franksen) Date: Mon, 13 Jun 2022 14:24:04 +0200 Subject: [Haskell-cafe] pipes Producer combination In-Reply-To: <32669350.8772445.1655107582930.JavaMail.zimbra@synchrotron-soleil.fr> References: <32669350.8772445.1655107582930.JavaMail.zimbra@synchrotron-soleil.fr> Message-ID: On 6/13/22 10:06, PICCA Frederic-Emmanuel wrote: > I would like to combine Producers in order to create a Producer of another type whcih combine these values > > I want a Producer of the 'A' type > > data A :: A a b > > by I have a Producer of 'a' values and another on of 'b' values. > what is the best way to create from thoses two producers a Producer of 'A' ? > Is ther a Generic way to automatically generate these combine Producers. > In my programmes, I will have plenty of these combine Producers. The intuitive thing I would try is to use Applicative i.e. A <$> a_producer <*> b_producer but I haven't tested if it works with pipes. Cheers Ben -- I would rather have questions that cannot be answered, than answers that cannot be questioned. -- Richard Feynman From daniel.huebleitner at gmail.com Mon Jun 13 17:11:01 2022 From: daniel.huebleitner at gmail.com (danon) Date: Mon, 13 Jun 2022 19:11:01 +0200 Subject: [Haskell-cafe] State Monad Tutorial Message-ID: Saw the discussion on the https://wiki.haskell.org/Talk:State_Monad I don´t have an account on the wiki. If anyone is interested in a small practical example of how to State Monad. I may have 1 or 2. Kind Regards dhj -------------- next part -------------- A non-text attachment was scrubbed... Name: RockPaperScissors.zip Type: application/zip Size: 10007 bytes Desc: not available URL: From ben.franksen at online.de Mon Jun 13 17:58:38 2022 From: ben.franksen at online.de (Ben Franksen) Date: Mon, 13 Jun 2022 19:58:38 +0200 Subject: [Haskell-cafe] pipes Producer combination In-Reply-To: References: <32669350.8772445.1655107582930.JavaMail.zimbra@synchrotron-soleil.fr> Message-ID: On 6/13/22 14:24, Ben Franksen wrote: > On 6/13/22 10:06, PICCA Frederic-Emmanuel wrote: >> I would like to combine Producers in order to create a Producer of >> another type whcih combine these values >> >> I want a Producer of the 'A' type >> >> data A :: A a b >> >> by I have a Producer of  'a' values and another on of  'b' values. >> what is the best way to create from thoses two producers  a Producer >> of 'A' ? >> Is ther a Generic way to automatically generate these combine Producers. >> In my programmes, I will have plenty of these combine Producers. > > The intuitive thing I would try is to use Applicative i.e. > > A <$> a_producer <*> b_producer > > but I haven't tested if it works with pipes. There is also pipes' zipWith operator: https://hackage.haskell.org/package/pipes-4.3.16/docs/Pipes-Prelude.html#g:6 -- I would rather have questions that cannot be answered, than answers that cannot be questioned. -- Richard Feynman From ifl21.publicity at gmail.com Mon Jun 13 20:25:06 2022 From: ifl21.publicity at gmail.com (Pieter Koopman) Date: Mon, 13 Jun 2022 13:25:06 -0700 Subject: [Haskell-cafe] CALL FOR PAPERS - IFL22 - The 34th Symposium on Implementation and Application of Functional Languages Message-ID: *CALL FOR PAPERS - The 34th Symposium on Implementation and Application of Functional Languages* *Important dates* Draft paper submission: 7th of August 2022 Draft paper notification: 9th of August 2022 Registration deadline: 12th of August 2022 Symposium: 31th of August to 2nd of September *Scope* The goal of the IFL symposia is to bring together researchers actively engaged in the implementation and application of functional and function-based programming languages. IFL 2022 will be a venue for researchers to present and discuss new ideas and concepts, work in progress, and publication-ripe results related to the implementation and application of functional languages and function-based programming. Topics of interest to IFL include, but are not limited to: * language concepts * type systems, type checking, type inferencing * compilation techniques * staged compilation * run-time function specialization * run-time code generation * partial evaluation * abstract interpretation * metaprogramming * generic programming * automatic program generation * array processing * concurrent/parallel programming * concurrent/parallel program execution * embedded systems * web applications * embedded domain specific languages * security * novel memory management techniques * run-time profiling performance measurements * debugging and tracing * virtual/abstract machine architectures * validation, verification of functional programs * tools and programming techniques * industrial applications *Submissions and peer-review* Following IFL tradition, IFL 2022 will use a post-symposium review process to produce the formal proceedings. Before the symposium authors submit draft papers. These draft papers will be screened by the program chair to make sure that they are within the scope of IFL. The draft papers will be made available to all participants at the symposium. Each draft paper is presented by one of the authors at the symposium. After the symposium, a formal review process will take place, conducted by the program committee. Reviewing is single blind. There will be at least 3 reviews per paper. The reviewers have 6 weeks to write their reviews. For the camera-ready version the authors can make minor revisions which are accepted without further reviewing. *Where* IFL 2022 will be held physically in Copenhagen, Denmark, arranged by DIKU at the University of Copenhagen. See the IFL 2022 website at https://ifl22.github.io/ for more information. [image: beacon] -------------- next part -------------- An HTML attachment was scrubbed... URL: From ycp at gnu.org Tue Jun 14 00:50:05 2022 From: ycp at gnu.org (Yuchen Pei) Date: Tue, 14 Jun 2022 10:50:05 +1000 Subject: [Haskell-cafe] State Monad Tutorial In-Reply-To: (danon's message of "Mon, 13 Jun 2022 19:11:01 +0200") References: Message-ID: <87k09kvzk2.fsf@gnu.org> On Mon 2022-06-13 19:11:01 +0200, danon wrote: > Saw the discussion on the https://wiki.haskell.org/Talk:State_Monad > > I don´t have an account on the wiki. > > If anyone is interested in a small practical example of how to State > Monad. I may have 1 or 2. Superficially I think one obstacle with understanding the state monad is the overloaded term "state" that used for both the monad (State / StateT) and the first param s. > > Kind Regards > > dhj > > > _______________________________________________ > Haskell-Cafe mailing list > To (un)subscribe, modify options or view archives go to: > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > Only members subscribed via the mailman list are allowed to post. > Best, Yuchen -- PGP Key: 47F9 D050 1E11 8879 9040 4941 2126 7E93 EF86 DFD0 From joshchia at gmail.com Tue Jun 14 15:33:48 2022 From: joshchia at gmail.com (=?UTF-8?B?4piCSm9zaCBDaGlhICjorJ3ku7vkuK0p?=) Date: Tue, 14 Jun 2022 23:33:48 +0800 Subject: [Haskell-cafe] How to override binary package Message-ID: Hi, Given that binary is one of the packages that comes with GHC, it seems that it can't be overridden with my own version using the standard ways (e.g. extra-deps in stack.yaml), at least not easily. On GHC 9.2.3, using stack, I would like to use my own version from my github repo. I've tried extra-deps referencing the github repo commit and it did not work; judging by the behavior of some functions, I was still getting the standard binary package instead of my own version. Is there a way to override? Josh -------------- next part -------------- An HTML attachment was scrubbed... URL: From ruben.astud at gmail.com Tue Jun 14 15:42:38 2022 From: ruben.astud at gmail.com (Ruben Astudillo) Date: Tue, 14 Jun 2022 11:42:38 -0400 Subject: [Haskell-cafe] How to override binary package In-Reply-To: References: Message-ID: <7f94588f-8cf6-f27d-f49e-8d233002e61b@gmail.com> Hi Josh On 14-06-22 11:33, ☂Josh Chia (謝任中) wrote: > Given that binary is one of the packages that comes with GHC, it seems that > it can't be overridden with my own version using the standard ways (e.g. > extra-deps in stack.yaml), at least not easily. > > On GHC 9.2.3, using stack, I would like to use my own version from my > github repo. I've tried extra-deps referencing the github repo commit and > it did not work; judging by the behavior of some functions, I was still > getting the standard binary package instead of my own version. Is there a > way to override? Given that stack generates a .cabal file while trying to build your project, you could bypass stack after the initial run, modify the .cabal file directly (possibly with `cabal v2-freeze` and then use cabal directly. -- Rubén. (pgp: 1E88 3AC4 89EB FA22) From joshchia at gmail.com Tue Jun 14 16:01:46 2022 From: joshchia at gmail.com (=?UTF-8?B?4piCSm9zaCBDaGlhICjorJ3ku7vkuK0p?=) Date: Wed, 15 Jun 2022 00:01:46 +0800 Subject: [Haskell-cafe] How to override binary package In-Reply-To: <7f94588f-8cf6-f27d-f49e-8d233002e61b@gmail.com> References: <7f94588f-8cf6-f27d-f49e-8d233002e61b@gmail.com> Message-ID: I tried something similar using source-repository-package in a cabal.project file and was able to override the binary package with my own version. The problem seems to be a limitation with stack. On Tue, Jun 14, 2022 at 11:42 PM Ruben Astudillo wrote: > Hi Josh > > On 14-06-22 11:33, ☂Josh Chia (謝任中) wrote: > > Given that binary is one of the packages that comes with GHC, it seems > that > > it can't be overridden with my own version using the standard ways (e.g. > > extra-deps in stack.yaml), at least not easily. > > > > On GHC 9.2.3, using stack, I would like to use my own version from my > > github repo. I've tried extra-deps referencing the github repo commit and > > it did not work; judging by the behavior of some functions, I was still > > getting the standard binary package instead of my own version. Is there a > > way to override? > > Given that stack generates a .cabal file while trying to build your > project, > you could bypass stack after the initial run, modify the .cabal file > directly (possibly with `cabal v2-freeze` and then use cabal directly. > > -- > Rubén. (pgp: 1E88 3AC4 89EB FA22) > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cmb21 at st-andrews.ac.uk Fri Jun 17 08:43:09 2022 From: cmb21 at st-andrews.ac.uk (Christopher Brown) Date: Fri, 17 Jun 2022 08:43:09 +0000 Subject: [Haskell-cafe] Post Doc Vacancy at St Andrews Message-ID: The Programming Languages Group at the University of St Andrews seeks a post-doctoral research fellow for a fixed 12-month position. Details of the position can be found here: https://www.vacancies.st-andrews.ac.uk/Vacancies/W/4238/0/352367/889/research-fellow-ar2699gb Vacancy Description School of Computer Science Salary: £34,304 per annum Start date: 1 October 2022 or as soon as possible thereafter Fixed-term: 12 months Applications are sought for a committed Post-doctoral Research Fellow to work with Dr Chris Brown conducting research for a EPSRC funded project entitled Energise: Refactorings and Skeletons for Energy-Aware Applications on High-Performance Embedded Systems. The primary duties will be to implementing refactorings for target languages such as C; proving general soundness of the refactorings using e.g. dependent types; developing new programming abstractions (skeletons) for abstracting common energy-reducing programming patterns; running experiments; writing proofs of correctness. The successful applicant will have (or be near to completion of) a PhD in Programming Languages with expertise in formal semantics of programming languages, compilers, program transformation, lightweight formal methods (including, e.g. dependent types) and/or knowledge of parallelism and non-functional properties, including energy. The post is available on a fixed-term basis for 12 months starting 1st October or as soon as possible thereafter. Further details of the project can be found by contacting Dr Christopher Brown (cmb21 at st-andrews.ac.uk). Applications are particularly welcome from women, people from the Black, Asian and Minority Ethnic (BAME) community, and other protected characteristics who are under-represented in research posts at the University. Equality, diversity and inclusion are at the heart of the St Andrews experience. We strive to create a fair and inclusive culture demonstrated through our commitment to diversity awards (Athena Swan, Carer Positive, LGBT Charter, Race Charters and Stonewall). We celebrate diversity by promoting profiles of BAME, LGBTIQ+ staff and supporting networks including the Staff BAME Network; Staff with Disabilities Network; Staff LGBTIQ+ Network; and the Staff Parents & Carers Network. Full details available online: https://www.st-andrews.ac.uk/hr/edi/ Closing Date: 29 July 2022 Interview Date: 23 August 2022 Please quote ref:AR2699GB School of Computer Science Salary: £34,304 per annum Start date: 1 October 2022 or as soon as possible thereafter Fixed-term: 12 months -------------- next part -------------- An HTML attachment was scrubbed... URL: From rippletc at gmail.com Fri Jun 17 10:52:24 2022 From: rippletc at gmail.com (rippletc at gmail.com) Date: Fri, 17 Jun 2022 10:52:24 +0000 Subject: [Haskell-cafe] =?utf-8?b?6YKA6K+377yaIERlYWRsaW5lIEV4dGVuZGVkOiAy?= =?utf-8?b?NnRoIEJyYXppbGlhbiBTeW1wb3NpdS4uLiBAIDIwMjLlubQ25pyIMTc=?= =?utf-8?b?5pelICjlkajkupQpIOS4i+WNiDY6MzAgLSDkuIvljYg3OjMwIChDU1Qp?= =?utf-8?q?_=28haskell-cafe=40haskell=2Eorg=29?= Message-ID: <000000000000a8e59405e1a28cb4@google.com> [Haskell-cafe] Deadline Extended: 26th Brazilian Symposium on Programming Languages (SBLP 2022) 2022年6月17日 (星期五) ⋅ 下午6:30 – 下午7:30 台北标准时间 通过 Google Meet 加入视频会议 https://meet.google.com/wvx-gvgo-mmj?hs=224 SBLP 2022 is the 26th edition of the Brazilian Symposium on Programming Languages. It is promoted by the Brazilian Computer Society (SBC) and constitutes a forum for researchers, students, and professionals to present and discuss ideas and innovations in the design, definition, analysis, implementation, and practical use of programming languages. SBLP's first edition was in 1996. Since 2010, it has been part of CBSoft, the Brazilian Conference on Software: Theory and Practice. The Conference is planned to be held on October 3-7, 2022, fully online. Submission Guidelines Papers can be written in Portuguese or English. Submissions in English are encouraged considering that only accepted papers written in English will appear in the proceedings, usually indexed in the ACM Digital Library (to be confirmed). The acceptance of a paper implies the registration of at lea... 组织者 rippletc at gmail.com rippletc at gmail.com 邀请对象 rippletc at gmail.com- 组织者 cdvasconcellos at hotmail.com haskell-cafe at haskell.org 查看所有邀请对象信息 https://calendar.google.com/calendar/event?action=VIEW&eid=M3RxajQ0a2pkamF2anRtdm85MTVzMmg5b3UgaGFza2VsbC1jYWZlQGhhc2tlbGwub3Jn&tok=MTgjcmlwcGxldGNAZ21haWwuY29tOGZkYmIwZGQ1M2MyMTA4ZmQyZDViYTU1N2I4NzhhNzBiN2FiNDA2ZQ&ctz=Asia%2FTaipei&hl=zh_CN&es=0 回复 haskell-cafe at haskell.org 的邀请并查看更多详细信息 https://calendar.google.com/calendar/event?action=VIEW&eid=M3RxajQ0a2pkamF2anRtdm85MTVzMmg5b3UgaGFza2VsbC1jYWZlQGhhc2tlbGwub3Jn&tok=MTgjcmlwcGxldGNAZ21haWwuY29tOGZkYmIwZGQ1M2MyMTA4ZmQyZDViYTU1N2I4NzhhNzBiN2FiNDA2ZQ&ctz=Asia%2FTaipei&hl=zh_CN&es=0 您可以选择是否参加。 ~~//~~ 来自 Google 日历的邀请:https://calendar.google.com/calendar/ 您之所以收到这封电子邮件,是因为您是活动的参加者。如要停止接收有关此活动的后 续更新,请拒绝此活动。 转发此邀请后,任何收件人都可以向组织者发送回复,也可以被添加到邀请对象列 表;无论其邀请状态为何,他们都可以邀请其他人;他们还可以修改您的回复。 了解详情https://support.google.com/calendar/answer/37135#forwarding -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/calendar Size: 2620 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: invite.ics Type: application/ics Size: 2670 bytes Desc: not available URL: From olf at aatal-apotheke.de Fri Jun 17 15:01:55 2022 From: olf at aatal-apotheke.de (Olaf Klinke) Date: Fri, 17 Jun 2022 17:01:55 +0200 Subject: [Haskell-cafe] traversal with an arrow Message-ID: <11906a0c79fbceb0a3c0caefe488569252090ca7.camel@aatal-apotheke.de> Dear Café, Is there prior art to the following generalisation? A Hoogle search for the type signatures did not turn up anything. import Control.Arrow import Control.Monad (foldM) -- | Categories which every Traversable is a functor in. -- For Traversable t, the instance should satisfy -- -- @ -- foldMapArrow f = foldMapArrow id . traverseArrow f -- @ class Arrow a => ArrowTraverse a where traverseArrow :: Traversable t => a x y -> a (t x) (t y) foldArrow :: Foldable t => a (y,x) y -> a (y,t x) y instance ArrowTraverse (->) where traverseArrow = fmap foldArrow f = uncurry ((foldl.curry) f) instance Monad m => ArrowTraverse (Kleisli m) where traverseArrow (Kleisli k) = Kleisli (mapM k) foldArrow (Kleisli k) = (Kleisli . uncurry) (foldM (curry k)) -- | Generalizes foldMap. -- For Kleisli m, this function is also known as foldMapM. foldMapArrow :: (ArrowTraverse a, Foldable f, Monoid y) => a x y -> a (f x) y foldMapArrow f = (arr (const mempty) &&& id) >>> foldArrow ((id *** f) >>> arr (uncurry mappend)) The thing is that there are more instances for this class, for example by using Ross Paterson's arrow transformers [1]. I found myself implementing an arrow that is a Kleisli arrow with a reader context. Neither the standard arrow machinery nor the arrows package seem to grant me the power to write a traverseArrow for it. Either it can't be done, or my arrow-fu is not strong enough. Olaf [1] https://hackage.haskell.org/package/arrows From haskellcafe at dandart.co.uk Fri Jun 17 15:19:56 2022 From: haskellcafe at dandart.co.uk (Dan Dart) Date: Fri, 17 Jun 2022 16:19:56 +0100 Subject: [Haskell-cafe] traversal with an arrow In-Reply-To: <11906a0c79fbceb0a3c0caefe488569252090ca7.camel@aatal-apotheke.de> References: <11906a0c79fbceb0a3c0caefe488569252090ca7.camel@aatal-apotheke.de> Message-ID: > Is there prior art to the following generalisation? Hello, that reminds me of a Profunctor - you could manipulate via Profunctor, since all arrows are Profunctors via a WrappedArrow newtype. Maybe Strong too? I forget which way round those go. Cheers From tom-lists-haskell-cafe-2017 at jaguarpaw.co.uk Fri Jun 17 15:27:12 2022 From: tom-lists-haskell-cafe-2017 at jaguarpaw.co.uk (Tom Ellis) Date: Fri, 17 Jun 2022 16:27:12 +0100 Subject: [Haskell-cafe] traversal with an arrow In-Reply-To: <11906a0c79fbceb0a3c0caefe488569252090ca7.camel@aatal-apotheke.de> References: <11906a0c79fbceb0a3c0caefe488569252090ca7.camel@aatal-apotheke.de> Message-ID: On Fri, Jun 17, 2022 at 05:01:55PM +0200, Olaf Klinke wrote: > Is there prior art to the following generalisation? > traverseArrow :: Traversable t => a x y -> a (t x) (t y) Perhaps you are looking for this: https://github.com/tomjaguarpaw/Arrows2/issues/3#issuecomment-561973678 From ivanperezdominguez at gmail.com Fri Jun 17 17:27:37 2022 From: ivanperezdominguez at gmail.com (Ivan Perez) Date: Fri, 17 Jun 2022 13:27:37 -0400 Subject: [Haskell-cafe] traversal with an arrow In-Reply-To: References: <11906a0c79fbceb0a3c0caefe488569252090ca7.camel@aatal-apotheke.de> Message-ID: There are some constructs like this in Dunai and Yampa (but not generalized). The first one indeed uses ArrowChoice: https://hackage.haskell.org/package/dunai-0.8.2/docs/src/Data.MonadicStreamFunction.Util.html#mapMaybeS The other two seem to be implementing some similar (ad hoc) choice, but it can be hard to tell sometimes: https://hackage.haskell.org/package/dunai-0.8.2/docs/src/Control.Monad.Trans.MSF.List.html#mapMSF https://hackage.haskell.org/package/Yampa-0.13.5/docs/src/FRP.Yampa.Switches.html#parC Ivan On Fri, 17 Jun 2022 at 11:29, Tom Ellis < tom-lists-haskell-cafe-2017 at jaguarpaw.co.uk> wrote: > On Fri, Jun 17, 2022 at 05:01:55PM +0200, Olaf Klinke wrote: > > Is there prior art to the following generalisation? > > > traverseArrow :: Traversable t => a x y -> a (t x) (t y) > > Perhaps you are looking for this: > > > https://github.com/tomjaguarpaw/Arrows2/issues/3#issuecomment-561973678 > _______________________________________________ > Haskell-Cafe mailing list > To (un)subscribe, modify options or view archives go to: > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > Only members subscribed via the mailman list are allowed to post. -------------- next part -------------- An HTML attachment was scrubbed... URL: From olf at aatal-apotheke.de Fri Jun 17 22:07:25 2022 From: olf at aatal-apotheke.de (Olaf Klinke) Date: Sat, 18 Jun 2022 00:07:25 +0200 Subject: [Haskell-cafe] traversal with an arrow In-Reply-To: References: <11906a0c79fbceb0a3c0caefe488569252090ca7.camel@aatal-apotheke.de> Message-ID: On Fri, 2022-06-17 at 16:19 +0100, Dan Dart wrote: > > Is there prior art to the following generalisation? > > Hello, that reminds me of a Profunctor - you could manipulate via > Profunctor, since all arrows are Profunctors via a WrappedArrow > newtype. Maybe Strong too? I forget which way round those go. > > Cheers Aha - profunctors weren't on my map, thanks for pointing me to it. So the desired arrows r -> a -> m b could be expressed as Cayley ((->) r) (Kleisli m) a b with module Data.Profunctor.Traversing defining the desired traversal. Further the implementation seems considerably simpler than the arrow implementation, as the latter uses currying, flipping etc. The only downside is that profunctors has heavier dependencies than arrows. Hooray Haskell Café! Olaf From kindaro at gmail.com Sat Jun 18 19:55:47 2022 From: kindaro at gmail.com (Ignat Insarov) Date: Sat, 18 Jun 2022 23:55:47 +0400 Subject: [Haskell-cafe] A pattern does not admit a type signature. Message-ID: Hello Café! I cannot understand why the following code does not compile. ```Haskell {-# LANGUAGE UnicodeSyntax #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE PatternSynonyms #-} module Arity where import GHC.TypeNats data Vektor length value where Sektor ∷ value → Vektor length value → Vektor (1 + length) value Mektor ∷ Vektor 0 value pattern (:>) ∷ value → Vektor length value → Vektor (1 + length) value pattern value :> values = Sektor value values infixr 5 :> ``` The error: ``` • Could not deduce: length1 ~ length from the context: (1 + length) ~ (1 + length1) bound by a pattern with constructor: Sector :: forall value (length :: Natural). value -> Vector length value -> Vector (1 + length) value, in a pattern synonym declaration at Arity.hs:16:27-45 Expected: Vector length value Actual: Vector length1 value ‘length1’ is a rigid type variable bound by a pattern with constructor: Sector :: forall value (length :: Natural). value -> Vector length value -> Vector (1 + length) value, in a pattern synonym declaration at Arity.hs:16:27-45 ‘length’ is a rigid type variable bound by the signature for pattern synonym ‘:>’ at Arity.hs:15:16-70 • In the declaration for pattern synonym ‘:>’ • Relevant bindings include values :: Vector length1 value (bound at Arity.hs:16:40) | 16 | pattern value :> values = Sector value values | ^^^^^^ ``` If I omit the pattern's type signature, the code compiles. What is going on? From oleg.grenrus at iki.fi Sat Jun 18 20:18:31 2022 From: oleg.grenrus at iki.fi (Oleg Grenrus) Date: Sat, 18 Jun 2022 23:18:31 +0300 Subject: [Haskell-cafe] A pattern does not admit a type signature. In-Reply-To: References: Message-ID: <59985687-770c-d047-2845-1def7fd447ca@iki.fi> I assume you want to have a complete pattern synonym for non-zero Vektors? The problem is the same as if you would try to write a matching function: match :: Vektor (1 + length) value -> (value, Vektor length value) match (Sektor x xs) = (x, xs) It fails similarly Foo.hs:22:27: error:     • Could not deduce: length1 ~ length       from the context: (1 + length) ~ (1 + length1)         bound by a pattern with constructor:                    Sektor :: forall value (length :: Natural).                              value -> Vektor length value -> Vektor (1 + length) value,                  in an equation for ‘match’         at Foo.hs:22:8-18       Expected: Vektor length value         Actual: Vektor length1 value       ‘length1’ is a rigid type variable bound by         a pattern with constructor:           Sektor :: forall value (length :: Natural).                     value -> Vektor length value -> Vektor (1 + length) value,         in an equation for ‘match’         at Foo.hs:22:8-18       ‘length’ is a rigid type variable bound by         the type signature for:           match :: forall (length :: Natural) value.                    Vektor (1 + length) value -> (value, Vektor length value)         at Foo.hs:21:1-66     • In the expression: xs       In the expression: (x, xs)       In an equation for ‘match’: match (Sektor x xs) = (x, xs)     • Relevant bindings include         xs :: Vektor length1 value (bound at Foo.hs:22:17)         match :: Vektor (1 + length) value -> (value, Vektor length value)           (bound at Foo.hs:22:1) And the reason is that GHC doesn't know that partially applied `+` is injective. It's type family (m :: Nat) + (n :: Nat) :: Nat not type family (m :: Nat) + (n :: Nat) = (p :: Nat) | p m -> n, p n -> m https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/type_families.html#injective-type-families But maybe it could, as it's a magic type-family after all. - Oleg On 18.6.2022 22.55, Ignat Insarov wrote: > Hello Café! > > I cannot understand why the following code does not compile. > > ```Haskell > {-# LANGUAGE UnicodeSyntax #-} > {-# LANGUAGE TypeOperators #-} > {-# LANGUAGE DataKinds #-} > {-# LANGUAGE GADTs #-} > {-# LANGUAGE PatternSynonyms #-} > > module Arity where > > import GHC.TypeNats > > data Vektor length value where > Sektor ∷ value → Vektor length value → Vektor (1 + length) value > Mektor ∷ Vektor 0 value > > pattern (:>) ∷ value → Vektor length value → Vektor (1 + length) value > pattern value :> values = Sektor value values > infixr 5 :> > ``` > > The error: > > ``` > • Could not deduce: length1 ~ length > from the context: (1 + length) ~ (1 + length1) > bound by a pattern with constructor: > Sector :: forall value (length :: Natural). > value -> Vector length value -> Vector (1 > + length) value, > in a pattern synonym declaration > at Arity.hs:16:27-45 > Expected: Vector length value > Actual: Vector length1 value > ‘length1’ is a rigid type variable bound by > a pattern with constructor: > Sector :: forall value (length :: Natural). > value -> Vector length value -> Vector (1 + length) value, > in a pattern synonym declaration > at Arity.hs:16:27-45 > ‘length’ is a rigid type variable bound by > the signature for pattern synonym ‘:>’ > at Arity.hs:15:16-70 > • In the declaration for pattern synonym ‘:>’ > • Relevant bindings include > values :: Vector length1 value (bound at Arity.hs:16:40) > | > 16 | pattern value :> values = Sector value values > | ^^^^^^ > ``` > > If I omit the pattern's type signature, the code compiles. What is going on? > _______________________________________________ > Haskell-Cafe mailing list > To (un)subscribe, modify options or view archives go to: > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > Only members subscribed via the mailman list are allowed to post. From haskellcafe at dandart.co.uk Sat Jun 18 20:43:53 2022 From: haskellcafe at dandart.co.uk (Dan Dart) Date: Sat, 18 Jun 2022 21:43:53 +0100 Subject: [Haskell-cafe] A pattern does not admit a type signature. In-Reply-To: <59985687-770c-d047-2845-1def7fd447ca@iki.fi> References: <59985687-770c-d047-2845-1def7fd447ca@iki.fi> Message-ID: When I'm implementing something like this, I'd typically use Peano numbers so it is easier to be well typed without extra symbols: https://wiki.haskell.org/Peano_numbers#Peano_number_types From allbery.b at gmail.com Sat Jun 18 20:59:12 2022 From: allbery.b at gmail.com (Brandon Allbery) Date: Sat, 18 Jun 2022 16:59:12 -0400 Subject: [Haskell-cafe] A pattern does not admit a type signature. In-Reply-To: References: <59985687-770c-d047-2845-1def7fd447ca@iki.fi> Message-ID: Isn't there a plugin for this kind of thing? (natnormalize?) On Sat, Jun 18, 2022 at 4:49 PM Dan Dart wrote: > > When I'm implementing something like this, I'd typically use Peano > numbers so it is easier to be well typed without extra symbols: > https://wiki.haskell.org/Peano_numbers#Peano_number_types > _______________________________________________ > Haskell-Cafe mailing list > To (un)subscribe, modify options or view archives go to: > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > Only members subscribed via the mailman list are allowed to post. -- brandon s allbery kf8nh allbery.b at gmail.com From olf at aatal-apotheke.de Sat Jun 18 23:28:14 2022 From: olf at aatal-apotheke.de (Olaf Klinke) Date: Sun, 19 Jun 2022 01:28:14 +0200 Subject: [Haskell-cafe] traversal with an arrow Message-ID: <769743c01dc8eca1265bbbf986ec2f61d6c87d58.camel@aatal-apotheke.de> > On Fri, Jun 17, 2022 at 05:01:55PM +0200, Olaf Klinke wrote: > > Is there prior art to the following generalisation? > > > traverseArrow :: Traversable t => a x y -> a (t x) (t y) > > Perhaps you are looking for this: > > https://github.com/tomjaguarpaw/Arrows2/issues/3#issuecomment-561973678 > Thanks Tom, can you explain what's behind this implementation, for those unfamiliar with arrow syntax? I guess [*] that the Traversal type used is a manifestation of the fact that one can transform any traversable structure (t a) into ([a],t ()) and sort the contents of the linked list back into their original places? This way, arbitrary traversals can be reduced to traversals over linked lists. Then the ArrowChoice is needed to pattern match on the list constructors? E. Kmett's profunctor implementation wanderA, linked to from the end of the discussion, seems to be missing from the current Data.Profunctor.Traversing module. Olaf [*] Structurally, Traversal a r b ~ Free (Const a :*: ((->) r)) b and also their Applicative instances seem to match on first glance. In particular, Traversal a () b ~ ([a],b) whence traversal :: Traversable t => t a -> Traversal a b (t b) can be specialized to traversal :: Traversable t => t a -> ([a],t ()) From tom-lists-haskell-cafe-2017 at jaguarpaw.co.uk Sun Jun 19 08:15:09 2022 From: tom-lists-haskell-cafe-2017 at jaguarpaw.co.uk (Tom Ellis) Date: Sun, 19 Jun 2022 09:15:09 +0100 Subject: [Haskell-cafe] traversal with an arrow In-Reply-To: <769743c01dc8eca1265bbbf986ec2f61d6c87d58.camel@aatal-apotheke.de> References: <769743c01dc8eca1265bbbf986ec2f61d6c87d58.camel@aatal-apotheke.de> Message-ID: On Sun, Jun 19, 2022 at 01:28:14AM +0200, Olaf Klinke wrote: > > On Fri, Jun 17, 2022 at 05:01:55PM +0200, Olaf Klinke wrote: > > > Is there prior art to the following generalisation? > > > > > traverseArrow :: Traversable t => a x y -> a (t x) (t y) > > > > Perhaps you are looking for this: > > > > https://github.com/tomjaguarpaw/Arrows2/issues/3#issuecomment-561973678 > > Thanks Tom, can you explain what's behind this implementation, for > those unfamiliar with arrow syntax? I guess [*] that the Traversal type > used is a manifestation of the fact that one can transform any > traversable structure (t a) into ([a],t ()) and sort the contents of > the linked list back into their original places? This way, arbitrary > traversals can be reduced to traversals over linked lists. Then the > ArrowChoice is needed to pattern match on the list constructors? Yes, that's about right, or perhaps more precisely: "A 'Traversal a r b' is a structure that you can extract 'a's from, at the same time replacing them with 'r's. The final result is a 'b'." So, for example, if 'Traversable t' then 't a' is such a structure (where b ~ t r). That's why there's a function traversal :: Traversable t => t a -> Traversal a r (t r) Hope that helps, Tom From hecate at glitchbra.in Mon Jun 20 08:38:46 2022 From: hecate at glitchbra.in (=?UTF-8?Q?H=c3=a9cate?=) Date: Mon, 20 Jun 2022 10:38:46 +0200 Subject: [Haskell-cafe] =?utf-8?q?Where_does_=CE=B7-equivalence_stop=3F?= Message-ID: <8c90a2af-560b-2355-d1af-cf9bf4903d7d@glitchbra.in> Hi Café! I was wondering if anyone knew of a centralised list of occurrences where GHC Haskell stops upholding η-equivalence. I am interested in both type changes and operational semantics. So far I've collected the following things: * Rank-2 types * Monomorphism restriction * The presence of seq * Non-pedantic bottoms One source is the GHC Manual¹, and Neil Mitchell pointed me to the list of bugs and limitations of HLint². If you have other examples, or explanations of the mechanisms at play here, I would be very interested, and intend to upstream those in the GHC manual. Cheers, Hécate [¹] https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/bugs.html#expressions-and-patterns [²] https://github.com/ndmitchell/hlint#bugs-and-limitations -- Hécate ✨ 🐦: @TechnoEmpress IRC: Hecate WWW: https://glitchbra.in RUN: BSD From andreeac at comp.nus.edu.sg Tue Jun 21 09:25:43 2022 From: andreeac at comp.nus.edu.sg (Andreea Costea) Date: Tue, 21 Jun 2022 12:25:43 +0300 Subject: [Haskell-cafe] Onward! Papers 2022 - CfP Message-ID: <80bc9e49d42f89277162c792ab0eeb4a@comp.nus.edu.sg> *** Onward! Papers 2022 Call for Papers *** Onward! is a premier multidisciplinary conference focused on everything to do with programming and software: including processes, methods, languages, communities and applications. Onward! is more radical, more visionary and more open than other conferences to ideas that are well-argued but not yet proven. We welcome different ways of thinking about, approaching and reporting on programming language and software engineering research. Onward! Papers is looking for grand visions and new paradigms that could make a big difference in how we will one day build software. But it is not looking for research-as-usual papers—conferences like OOPSLA are the place for that. Those conferences require rigorous validation such as theorems or empirical experiments, which are necessary for scientific progress, but which typically preclude discussion of early-stage ideas. Onward! papers must also supply some degree of validation because mere speculation is not a good basis for progress. However, Onward! accepts less rigorous methods of validation such as compelling arguments, exploratory implementations, and substantial examples. The use of worked-out examples to support new ideas is strongly encouraged. https://2022.splashcon.org/track/splash-2022-Onward-papers The submission deadline is July 10th, 2022 AOE. From kindaro at gmail.com Thu Jun 23 21:01:48 2022 From: kindaro at gmail.com (Ignat Insarov) Date: Fri, 24 Jun 2022 01:01:48 +0400 Subject: [Haskell-cafe] A pattern does not admit a type signature. In-Reply-To: <59985687-770c-d047-2845-1def7fd447ca@iki.fi> References: <59985687-770c-d047-2845-1def7fd447ca@iki.fi> Message-ID: Thank you Oleg. This makes sense. It did not occur to me that I can study the builder and the matcher of the pattern synonym separately. From ben at well-typed.com Fri Jun 24 20:56:33 2022 From: ben at well-typed.com (Ben Gamari) Date: Fri, 24 Jun 2022 16:56:33 -0400 Subject: [Haskell-cafe] GHC 9.4.1-alpha3 now available Message-ID: <878rpl3hn7.fsf@smart-cactus.org> The GHC developers are happy to announce the availability of the third alpha release of the GHC 9.4 series. Binary distributions, source distributions, and documentation are available at [downloads.haskell.org](https://downloads.haskell.org/ghc/9.4.1-alpha3). This major release will include: - A new profiling mode, `-fprof-late`, which adds automatic cost-center annotations to all top-level functions *after* Core optimisation has run. This incurs significantly less performance cost while still providing informative profiles. - A variety of plugin improvements including the introduction of a new plugin type, *defaulting plugins*, and the ability for typechecking plugins to rewrite type-families. - An improved constructed product result analysis, allowing unboxing of nested structures, and a new boxity analysis, leading to less reboxing. - Introduction of a tag-check elision optimisation, bringing significant performance improvements in strict programs. - Generalisation of a variety of primitive types to be levity polymorphic. Consequently, the `ArrayArray#` type can at long last be retired, replaced by standard `Array#`. - Introduction of the `\cases` syntax from [GHC proposal 0302] - A complete overhaul of GHC's Windows support. This includes a migration to a fully Clang-based C toolchain, a deep refactoring of the linker, and many fixes in WinIO. - Support for multiple home packages, significantly improving support in IDEs and other tools for multi-package projects. - A refactoring of GHC's error message infrastructure, allowing GHC to provide diagnostic information to downstream consumers as structured data, greatly easing IDE support. - Significant compile-time improvements to runtime and memory consumption. - On overhaul of our packaging infrastructure, allowing full traceability of release artifacts and more reliable binary distributions. - ... and much more. See the [release notes] for a full accounting. Note that, as 9.4.1 is the first release for which the released artifacts will all be generated by our Hadrian build system, it's possible that there will be packaging issues. If you enounter trouble while using a binary distribution, please open a [ticket]. Likewise, if you are a downstream packager, do consider migrating to [Hadrian] to run your build; the Hadrian build system can be built using `cabal-install`, `stack`, or the in-tree [bootstrap script]. We would like to thank Microsoft Azure, GitHub, IOG, the Zw3rk stake pool, Tweag I/O, Serokell, Equinix, SimSpace, and other anonymous contributors whose on-going financial and in-kind support has facilitated GHC maintenance and release management over the years. Finally, this release would not have been possible without the hundreds of open-source contributors whose work comprise this release. As always, do give this release a try and open a [ticket] if you see anything amiss. Happy testing, - Ben [GHC proposal 0302]: https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0302-cases.rst [ticket]: https://gitlab.haskell.org/ghc/ghc/-/issues/new [bootstrap script]: https://gitlab.haskell.org/ghc/ghc/-/blob/e2520df3fffa0cf22fb19c5fb872832d11c07d35/hadrian/bootstrap/README.md [Hadrian]: https://gitlab.haskell.org/ghc/ghc/-/blob/e2520df3fffa0cf22fb19c5fb872832d11c07d35/hadrian [release notes]: https://downloads.haskell.org/~ghc/9.4.1-alpha3/docs/users_guide/9.4.1-notes.html -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 487 bytes Desc: not available URL: From leah at vuxu.org Sun Jun 26 13:51:53 2022 From: leah at vuxu.org (Leah Neukirchen) Date: Sun, 26 Jun 2022 15:51:53 +0200 Subject: [Haskell-cafe] Munich Haskell Meeting, 2022-06-28 @ 19:30 Message-ID: <87zghz8rd2.fsf@vuxu.org> Dear all, Next week, our monthly Munich Haskell Meeting will take place again on Tuesday, June 28 at Hirschgarten (Biergarten, self-service area) at 19h30. For details see here: http://muenchen.haskell.bayern/dates.html If you plan to join, please add yourself to this dudle so we'll look out for you. It is OK to add yourself to the dudle anonymously or pseudonymously. https://dudle.inf.tu-dresden.de/haskell-munich-jun-2022/ Everybody is welcome! cu, -- Leah Neukirchen https://leahneukirchen.org/ From lists at richarde.dev Tue Jun 28 18:57:14 2022 From: lists at richarde.dev (Richard Eisenberg) Date: Tue, 28 Jun 2022 18:57:14 +0000 Subject: [Haskell-cafe] =?utf-8?q?Where_does_=CE=B7-equivalence_stop=3F?= In-Reply-To: <8c90a2af-560b-2355-d1af-cf9bf4903d7d@glitchbra.in> References: <8c90a2af-560b-2355-d1af-cf9bf4903d7d@glitchbra.in> Message-ID: <010f0181abacbff3-95096a45-8c9b-4c2b-b0ac-ae37bccd8373-000000@us-east-2.amazonses.com> My best understanding is that eta-equivalence holds only in total languages, and even there without regard to performance. So you can hunt for eta-equivalence trouble anywhere that non-totality or performance comes into play. For example, compare (A) `f (slowFunction 1000)` and (B) `\x -> f (slowFunction 1000) x`. If we map (A) over a list, then `slowFunction 1000` is computed once. If we map (B) over a list, then `slowFunction 1000` is computed for each element of the list. Note that this example is very bare-bones: no extensions, no parametricity-busting `seq`, no compiler flags. All it relies on is a non-strict functional language. I do think compiling this examples is a nice service -- thanks! Richard > On Jun 20, 2022, at 4:38 AM, Hécate wrote: > > Hi Café! > > I was wondering if anyone knew of a centralised list of occurrences where GHC Haskell stops upholding η-equivalence. I am interested in both type changes and operational semantics. > So far I've collected the following things: > > * Rank-2 types > > * Monomorphism restriction > > * The presence of seq > > * Non-pedantic bottoms > > One source is the GHC Manual¹, and Neil Mitchell pointed me to the list of bugs and limitations of HLint². > > If you have other examples, or explanations of the mechanisms at play here, I would be very interested, and intend to upstream those in the GHC manual. > > Cheers, > Hécate > > > [¹] https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/bugs.html#expressions-and-patterns > > [²] https://github.com/ndmitchell/hlint#bugs-and-limitations > > -- > Hécate ✨ > 🐦: @TechnoEmpress > IRC: Hecate > WWW: https://glitchbra.in > RUN: BSD > > _______________________________________________ > Haskell-Cafe mailing list > To (un)subscribe, modify options or view archives go to: > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > Only members subscribed via the mailman list are allowed to post. From jaro.reinders at gmail.com Tue Jun 28 19:16:33 2022 From: jaro.reinders at gmail.com (J. Reinders) Date: Tue, 28 Jun 2022 12:16:33 -0700 Subject: [Haskell-cafe] =?utf-8?q?Where_does_=CE=B7-equivalence_stop=3F?= In-Reply-To: <010f0181abacbff3-95096a45-8c9b-4c2b-b0ac-ae37bccd8373-000000@us-east-2.amazonses.com> References: <8c90a2af-560b-2355-d1af-cf9bf4903d7d@glitchbra.in> <010f0181abacbff3-95096a45-8c9b-4c2b-b0ac-ae37bccd8373-000000@us-east-2.amazonses.com> Message-ID: <7530C413-D4C1-4024-BAE0-81D7459A0EDC@gmail.com> If you add a let binding: let x = slowFunction 1000 in f x \y -> let x = slowFunction 1000 in f x y I believe GHC may optimise both functions to only compute the `slowFunction 1000` once due to the full laziness/let floating optimisation. So then the eta-equivalence holds again. Maybe the full laziness optimisation should be disabled by default to make performance more predictable and to make it even more obvious that eta-equivalence doesn’t hold. See https://gitlab.haskell.org/ghc/ghc/-/issues/8457 Cheers, Jaro > On 28 Jun 2022, at 11:57, Richard Eisenberg wrote: > > My best understanding is that eta-equivalence holds only in total languages, and even there without regard to performance. So you can hunt for eta-equivalence trouble anywhere that non-totality or performance comes into play. > > For example, compare (A) `f (slowFunction 1000)` and (B) `\x -> f (slowFunction 1000) x`. If we map (A) over a list, then `slowFunction 1000` is computed once. If we map (B) over a list, then `slowFunction 1000` is computed for each element of the list. > > Note that this example is very bare-bones: no extensions, no parametricity-busting `seq`, no compiler flags. All it relies on is a non-strict functional language. > > I do think compiling this examples is a nice service -- thanks! > Richard > >> On Jun 20, 2022, at 4:38 AM, Hécate wrote: >> >> Hi Café! >> >> I was wondering if anyone knew of a centralised list of occurrences where GHC Haskell stops upholding η-equivalence. I am interested in both type changes and operational semantics. >> So far I've collected the following things: >> >> * Rank-2 types >> >> * Monomorphism restriction >> >> * The presence of seq >> >> * Non-pedantic bottoms >> >> One source is the GHC Manual¹, and Neil Mitchell pointed me to the list of bugs and limitations of HLint². >> >> If you have other examples, or explanations of the mechanisms at play here, I would be very interested, and intend to upstream those in the GHC manual. >> >> Cheers, >> Hécate >> >> >> [¹] https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/bugs.html#expressions-and-patterns >> >> [²] https://github.com/ndmitchell/hlint#bugs-and-limitations >> >> -- >> Hécate ✨ >> 🐦: @TechnoEmpress >> IRC: Hecate >> WWW: https://glitchbra.in >> RUN: BSD >> >> _______________________________________________ >> Haskell-Cafe mailing list >> To (un)subscribe, modify options or view archives go to: >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >> Only members subscribed via the mailman list are allowed to post. > > _______________________________________________ > Haskell-Cafe mailing list > To (un)subscribe, modify options or view archives go to: > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > Only members subscribed via the mailman list are allowed to post. From tom-lists-haskell-cafe-2017 at jaguarpaw.co.uk Wed Jun 29 07:02:01 2022 From: tom-lists-haskell-cafe-2017 at jaguarpaw.co.uk (Tom Ellis) Date: Wed, 29 Jun 2022 08:02:01 +0100 Subject: [Haskell-cafe] =?utf-8?q?Where_does_=CE=B7-equivalence_stop=3F?= In-Reply-To: <010f0181abacbff3-95096a45-8c9b-4c2b-b0ac-ae37bccd8373-000000@us-east-2.amazonses.com> References: <8c90a2af-560b-2355-d1af-cf9bf4903d7d@glitchbra.in> <010f0181abacbff3-95096a45-8c9b-4c2b-b0ac-ae37bccd8373-000000@us-east-2.amazonses.com> Message-ID: It seems to me the same difference would hold in a strict language too. Am I missing something? (A difference between strict and lazy here would be that in a lazy language `slowFunction 1000` would not be computed at all if the list is empty.) Tom On Tue, Jun 28, 2022 at 06:57:14PM +0000, Richard Eisenberg wrote: > My best understanding is that eta-equivalence holds only in total languages, and even there without regard to performance. So you can hunt for eta-equivalence trouble anywhere that non-totality or performance comes into play. > > For example, compare (A) `f (slowFunction 1000)` and (B) `\x -> f (slowFunction 1000) x`. If we map (A) over a list, then `slowFunction 1000` is computed once. If we map (B) over a list, then `slowFunction 1000` is computed for each element of the list. > > Note that this example is very bare-bones: no extensions, no parametricity-busting `seq`, no compiler flags. All it relies on is a non-strict functional language. From lists at richarde.dev Thu Jun 30 03:50:54 2022 From: lists at richarde.dev (Richard Eisenberg) Date: Thu, 30 Jun 2022 03:50:54 +0000 Subject: [Haskell-cafe] =?utf-8?q?Where_does_=CE=B7-equivalence_stop=3F?= In-Reply-To: References: <8c90a2af-560b-2355-d1af-cf9bf4903d7d@glitchbra.in> <010f0181abacbff3-95096a45-8c9b-4c2b-b0ac-ae37bccd8373-000000@us-east-2.amazonses.com> Message-ID: <010f0181b2bbb1da-2e459803-d69d-4f5f-9f67-2369b81ea28e-000000@us-east-2.amazonses.com> No, you're right. My comment about "lazy" was more relevant to a second example that I removed (because it sneakily relied on `seq` and is thus redundant with other mention of `seq`). Thanks for correcting. Richard > On Jun 29, 2022, at 3:02 AM, Tom Ellis wrote: > > It seems to me the same difference would hold in a strict language > too. Am I missing something? (A difference between strict and lazy > here would be that in a lazy language `slowFunction 1000` would not be > computed at all if the list is empty.) > > Tom > > On Tue, Jun 28, 2022 at 06:57:14PM +0000, Richard Eisenberg wrote: >> My best understanding is that eta-equivalence holds only in total languages, and even there without regard to performance. So you can hunt for eta-equivalence trouble anywhere that non-totality or performance comes into play. >> >> For example, compare (A) `f (slowFunction 1000)` and (B) `\x -> f (slowFunction 1000) x`. If we map (A) over a list, then `slowFunction 1000` is computed once. If we map (B) over a list, then `slowFunction 1000` is computed for each element of the list. >> >> Note that this example is very bare-bones: no extensions, no parametricity-busting `seq`, no compiler flags. All it relies on is a non-strict functional language. > _______________________________________________ > Haskell-Cafe mailing list > To (un)subscribe, modify options or view archives go to: > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > Only members subscribed via the mailman list are allowed to post.