From raoknz at gmail.com Fri Feb 1 00:06:00 2019 From: raoknz at gmail.com (Richard O'Keefe) Date: Fri, 1 Feb 2019 13:06:00 +1300 Subject: [Haskell-cafe] Patents on Maybe and Tuple In-Reply-To: References: Message-ID: The Australian system ran an experiment about 20-some years ago where they put some pending patents on-line and invited people to tell them about prior art. I did this for an attempt to patent decimal arithmetic... On Fri, 1 Feb 2019 at 11:28, Jack Kelly wrote: > It's great that we know this, but does anyone who knows the patent > system know that we know this? > > -- Jack > > On Fri, Feb 1, 2019 at 12:30 AM Richard O'Keefe wrote: > > > > Haskell's "Maybe t" is essentially the same as ML's "'t option". > > ECMA Eiffel has a distinction between "T" and "T?" types which > > is related. The idea of a compiler system with multiple front- > > ends for dissimilar languages goes back to Burroughs (where > > type checking applied cross-language) and to Univac (where several > > languages used the same back end) and with multiple source languages > sharing a common IR with multiple target-specific > > back ends goes back at least to the Amsterdam Compiler Kit. Back > > in 1984 the idea of retaining code in an intermediate form until > > it was about to be executed with so far from novel that I used it > > in a design. JIT compiling goes back at least to Brown's "throw- > > away compiling" for BASIC (compact IR, bulky native code compiled > > into a smallish buffer at need and periodically thrown away) and > > commercial Smalltalk systems. (And there is at least one Smalltalk > > out there with Lisp and Prolog syntax on offer as well.) Then there > > is the Poplog system, which incrementally compiled ML, Common Lisp > > (CLtL1 vintage), Pop-11, and Prolog, all quite different looking > > (and Pop-11 being arguably OO), into a common IR, with native code > generation for multiple target processors. > > > > There may well be innovative things in Swift, but nothing in this > > thread would have seemed novel 30 years ago. > > > > On Thu, 31 Jan 2019 at 16:54, Saurabh Nanda > wrote: > >> > >> > >>> > >>> Are the patents each not effectively processor-specific? > >> > >> > >> Alfred, if you're saying this because of the following clause in the > independent claim... > >> > >> > compiling the first and second intermediate representations using a > back-end compiler that is specific to a target processor. > >> > >> ...then I'm not so sure, because isn't every backend compiler specific > to an architecture/processor? > >> _______________________________________________ > >> 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 simon at joyful.com Sat Feb 2 02:10:59 2019 From: simon at joyful.com (Simon Michael) Date: Fri, 1 Feb 2019 18:10:59 -0800 Subject: [Haskell-cafe] ANN: hledger-1.13 Message-ID: <9AE05B0D-7B12-47E0-938A-ADAB812380CE@joyful.com> I'm pleased to announce the release of hledger 1.13, the first hledger release of 2019! Thank you release contributors Jakob Schöttl and Dmitry Astapov. hledger is a robust, cross-platform plain text accounting tool, for tracking money, time, stocks, cryptocurrencies or any other commodity, using double-entry accounting, private or shared plain text files, revision control, and command-line, curses or web UIs. Find out more at http://hledger.org and http://plaintextaccounting.org. Release notes (condensed, see http://hledger.org/release-notes): ------------- project-wide changes for 1.13 - packaging: A docker image providing the main hledger tools is now linked on the download page. This is another way to get up-to-date hledger tools without building them yourself (and, a way to run hledger-ui on windows ?) (Dmitry Astapov, Simon Michael) - doc: fixed pandoc typography conversion in web manuals. Eg -- was being rendered as en-dash. (#954). hledger 1.13 - cli: reorganised commands list. Addons now have a + prefix. - cli: the command line help and manual section for all hledger’s commands are now consistent, and generated from the same source. - cli: comprehensive bash completion support is now provided (in shell-completion/). See how-to in the Cookbook. (Jakob Schöttl) - balance –budget: budget amounts now aggregate hierarchically, like account balances. Unbudgeted accounts can be shown with -E/–empty (along with zero-balance accounts), and the –show-budgeted flag has been dropped. (Dmitry Astapov) - balance: new –transpose flag switches the rows and columns of tabular balance reports (in txt and csv output formats). (Dmitry Astapov) - close: generated balance assertions now have exact amounts with all decimal digits, ignoring display precision. Also, balance assertion amounts will no longer contain prices. (#941, #824, #958) - files: now shows up in the commands list - import: be silent when there’s nothing to import - roi: percentages smaller than 0.01% are displayed as zero (Dmitry Astapov) - stats, ui: correct file order is preserved when using –auto (#949) - journal: account directive: the account name can now be followed by a comment on the same line - journal: account directive: account types for the bs/bse/cf/is commands can now be set with a type: tag, whose value is Asset, Liability, Equity, Revenue, Expense, A, L, E, R or X (case-insensitive). The previous syntax (account assets A) is now deprecated. - journal: account directive: account sort codes like account 1000 (introduced in 1.9, deprecated in 1.11) are no longer supported. - journal: transaction modifiers (auto postings) can affect periodic transactions (–auto can add postings to transactions generated with –forecast). (Dmitry Astapov) - journal: balance assertion errors now show exact amounts with all decimal digits. Previously it was possible, in case of a commodity directive limiting the display precision, to have a balance assertion error with asserted and actual amounts looking the same. (#941) - journal: fixed a periodic transaction parsing failure (#942) (Dmitry Astapov) hledger-ui 1.13 - on posix systems, control-z suspends the program - control-l now works everywhere and redraws more reliably - the top status info is clearer Getting started: ---------------- All install methods are described at http://hledger.org/download : windows binaries, system packages, docker, nix, cabal, stack, hledger installer, etc. Some of these might take a few days to become up to date. On systems with bash installed, the hledger installer is a reliable way to get the latest release of hledger: $ curl -s https://raw.githubusercontent.com/simonmichael/hledger/master/hledger-install/hledger-install.sh > hledger-install.sh $ less hledger-install.sh # satisfy yourself that the script is safe $ bash hledger-install.sh Then try: $ hledger # list available commands $ hledger help # list built-in manuals Tutorials and all other docs: http://hledger.org Chat: #hledger on Freenode or Matrix - http://irc.hledger.org or http://riot.hledger.org . New and old users, contributors, all feedback, always welcome! Best, -Simon From magnus at therning.org Sat Feb 2 11:28:32 2019 From: magnus at therning.org (Magnus Therning) Date: Sat, 2 Feb 2019 12:28:32 +0100 Subject: [Haskell-cafe] Implementing `MonadBaseControl IO` for application type Message-ID: Hi, I'm getting stuck on implementing `MonadBaseControl IO` for my application context type. What I have so far (in a minimized example) is ``` data Env = Env {envBalance :: !(TVar Int)} newtype AppM a = AppM { unAppM :: ReaderT Env IO a } deriving (Functor, Applicative, Monad, MonadIO, MonadReader Env) instance MonadBase IO AppM where liftBase = liftIO instance MonadBaseControl IO AppM where type StM AppM a = a liftBaseWith f = undefined restoreM = return ``` I'm so utterly stuck on the definition of `liftBaseWith`... but I'm not 100% sure on the other bits either, though it "feels right". Any tips on how I should go about it? /M -------------- next part -------------- An HTML attachment was scrubbed... URL: From lysxia at gmail.com Sat Feb 2 13:36:40 2019 From: lysxia at gmail.com (Li-yao Xia) Date: Sat, 2 Feb 2019 08:36:40 -0500 Subject: [Haskell-cafe] Implementing `MonadBaseControl IO` for application type In-Reply-To: References: Message-ID: <4432e285-21d9-44d6-0a88-02c21bc1b922@gmail.com> Hi Magnus, You can use GeneralizedNewtypeDeriving: deriving (..., MonadBase IO, MonadBaseControl IO) To do it by hand, since AppM is a newtype around ReaderT, use the fact that is already is an instance of MonadBaseControl. liftBaseWith f = AppM (liftBaseWith (\run -> f (run . unAppM))) To discover that implementation, you can start with the idea that liftBaseWith should basically be the same as the one as for ReaderT, using TypeApplications to make explicit the instance we want to use: liftBaseWith = liftBaseWith @IO @(ReaderT Env IO) And then fix the type errors by inserting AppM and unAppM in the right places, possibly after eta-expanding some things. liftBaseWith f = liftBaseWith @IO @(ReaderT Env IO) f liftBaseWith f = liftBaseWith @IO @(ReaderT Env IO) (\run -> f run) -- The type errors now point exactly to the two locations that need changing. The rest of your implementation looks good. Li-yao On 2/2/19 6:28 AM, Magnus Therning wrote: > Hi, > > I'm getting stuck on implementing `MonadBaseControl IO` for my > application context type. What I have so far (in a minimized example) is > > ``` > data Env = Env {envBalance :: !(TVar Int)} > > newtype AppM a = AppM { unAppM :: ReaderT Env IO a } >   deriving (Functor, Applicative, Monad, MonadIO, MonadReader Env) > > instance MonadBase IO AppM where >   liftBase = liftIO > > instance MonadBaseControl IO AppM where >   type StM AppM a = a >   liftBaseWith f = undefined >   restoreM = return > ``` > > I'm so utterly stuck on the definition of `liftBaseWith`... but I'm not > 100% sure on the other bits either, though it "feels right". > > Any tips on how I should go about it? > > /M > > _______________________________________________ > 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 magnus at therning.org Sat Feb 2 13:52:03 2019 From: magnus at therning.org (Magnus Therning) Date: Sat, 02 Feb 2019 14:52:03 +0100 Subject: [Haskell-cafe] Implementing `MonadBaseControl IO` for application type In-Reply-To: <4432e285-21d9-44d6-0a88-02c21bc1b922@gmail.com> References: <4432e285-21d9-44d6-0a88-02c21bc1b922@gmail.com> Message-ID: <87y36yz4ak.fsf@therning.org> Li-yao Xia writes: > Hi Magnus, > > You can use GeneralizedNewtypeDeriving: > > deriving (..., MonadBase IO, MonadBaseControl IO) I did start out with that, but got this from the compiler: Main.hs 18 26 error error: • The type family application ‘StM (ReaderT Env IO) a’ is no smaller than the instance head ‘StM AppM a’ (Use UndecidableInstances to permit this) • In the instance declaration for ‘MonadBaseControl IO AppM’ Adding `UndecidableInstances` is something I'm not quite comfortable with, since I don't understand what it means. > To do it by hand, since AppM is a newtype around ReaderT, use > the fact that is > already is an instance of MonadBaseControl. > > liftBaseWith f = AppM (liftBaseWith (\run -> f (run . > unAppM))) > > To discover that implementation, you can start with the idea > that liftBaseWith > should basically be the same as the one as for ReaderT, using > TypeApplications > to make explicit the instance we want to use: > > liftBaseWith = liftBaseWith @IO @(ReaderT Env IO) > > And then fix the type errors by inserting AppM and unAppM in the > right places, > possibly after eta-expanding some things. > > liftBaseWith f = liftBaseWith @IO @(ReaderT Env IO) f > liftBaseWith f = liftBaseWith @IO @(ReaderT Env IO) (\run -> > f run) > -- The type errors now point exactly to the two locations > that need > changing. Thanks. That's excellent advise, I'll need to add that extension, `TypeApplications`, to my toolbox right away. > The rest of your implementation looks good. Thanks for your help! /M -- Magnus Therning OpenPGP: 0x927912051716CE39 email: magnus at therning.org twitter: magthe http://magnus.therning.org/ Reality is that which, when you stop believing in it, doesn't go away. — Philip K. Dick -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 832 bytes Desc: not available URL: From jack at jackkelly.name Sat Feb 2 23:03:33 2019 From: jack at jackkelly.name (Jack Kelly) Date: Sun, 03 Feb 2019 10:03:33 +1100 Subject: [Haskell-cafe] Implementing `MonadBaseControl IO` for application type In-Reply-To: <87y36yz4ak.fsf@therning.org> (Magnus Therning's message of "Sat, 02 Feb 2019 14:52:03 +0100") References: <4432e285-21d9-44d6-0a88-02c21bc1b922@gmail.com> <87y36yz4ak.fsf@therning.org> Message-ID: <87r2cpg5dm.fsf@jackkelly.name> Magnus Therning writes: > Li-yao Xia writes: > > Adding `UndecidableInstances` is something I'm not quite comfortable > with, > since I don't understand what it means. UndecideableInstances is not too bad, because the default heuristic in Haskell2010 is very conservative. https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#extension-UndecidableInstances -- Jack From jack at jackkelly.name Sun Feb 3 07:44:30 2019 From: jack at jackkelly.name (Jack Kelly) Date: Sun, 03 Feb 2019 18:44:30 +1100 Subject: [Haskell-cafe] ANN: libtelnet-0.1.0.0 Message-ID: <87zhrds4dd.fsf@jackkelly.name> I've just made an initial release of libtelnet[1], a close binding of the C libtelnet[2]. It allows you to write telnet clients/servers in Haskell, if for some bizarre reason that's something you still want to do in 2019. [1]: https://hackage.haskell.org/package/libtelnet-0.1.0.0 [2]: https://github.com/seanmiddleditch/libtelnet Best, -- Jack From danburton.email at gmail.com Mon Feb 4 16:32:24 2019 From: danburton.email at gmail.com (Dan Burton) Date: Mon, 4 Feb 2019 11:32:24 -0500 Subject: [Haskell-cafe] Let's plan BayHac 2019! In-Reply-To: References: Message-ID: Update: BayHac will be delayed to July or later this year. There will be an announcement of the precise date and location sometime in the next two to three months. Your input on what dates to avoid (so as to not conflict with other FP confs) is appreciated. -- Dan Burton On Sun, Nov 11, 2018 at 11:28 PM Dan Burton wrote: > It's time to start thinking about the next BayHac! > > I am assembling a group of organizers for next year's event. Anyone who > has been involved in organizing past BayHac events will be automatically > accepted. (I have BCCed a number of past organizers; please reach out to > any you know in case I missed anyone.) > > Anyone else who is interested in helping to plan BayHac, please contact > me. Depending on how many past organizers rejoin, we will discuss the > applicants and accept 1 to 3 new organizers. > > BayHac is a weekend of learning, sharing, and hacking on a variety of > projects for the Haskell community. BayHac usually occurs in San Francisco, > California, Mountain View, California, or thereabouts. > > I'd like to aim for April/May 2019, though that is, of course, subject to > change. > > A rough outline, in rough chronological order, of what the BayHac > organizers will be doing: > > 0. Assemble the organizers. > 1. Select date and venue for BayHac 2019. > 2. Secure corporate sponsors to cover costs (mainly, food). > 3. Invite talk proposals and select speakers. > 4. Open online registration and publicize the event. > 5. Plan details like catering, registration desk, recording, and make it > happen! > > If any of that sounds like fun to you, then I'd love to hear from you! > > -- Dan Burton > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Graham.Hutton at nottingham.ac.uk Tue Feb 5 08:54:58 2019 From: Graham.Hutton at nottingham.ac.uk (Graham Hutton) Date: Tue, 5 Feb 2019 08:54:58 +0000 Subject: [Haskell-cafe] Call for Participation: Midlands Graduate School, 14-18 April, Birmingham UK Message-ID: <3BECCE0A-6ABB-407E-ACC1-876BD5624A6F@exmail.nottingham.ac.uk> Dear all, Midlands Graduate School (MGS) registration is now open! Eight courses on property based testing, category theory, univalent type theory, lambda calculus, and more. 14-18 April 2019, Birmingham, UK. Spaces are limited, so register early. Please share! http://events.cs.bham.ac.uk/mgs2019/ Best wishes, Graham Hutton ============================================================ Midlands Graduate School 2019 14-18 April 2019, Birmingham, UK http://events.cs.bham.ac.uk/mgs2019/ BACKGROUND: The Midlands Graduate School (MGS) in the Foundations of Computing Science provides an intensive course of lectures on the mathematical foundations of computing. The MGS has been running since 1999, and is aimed at PhD students in their first or second year of study, but the school is open to everyone, and has increasingly seen participation from industry. We welcome participants from all over the world! COURSES: Eight courses will be given. Participants usually take all the introductory courses and choose additional options from the advanced courses depending on their interests. Invited course - Adventures in Property Based Testing, John Hughes Introductory courses - Lambda Calculus, Venanzio Capretta - Category Theory, Thorsten Altenkirch - Univalent Type Theory in Agda, Martn Escard Advanced courses - Calculating programs, Jennifer Hackett - Type Refinement Systems, Noam Zeilberger - Synthesis of Reactive Systems, Rayna Dimitrova - Monoidal Categories, Higher Categories, Jamie Vicary REGISTRATION: Registration is 220 for student, academic and independent participants, and 420 for industry participants. Accommodation is not included; please see the conference webpage for advice. The registration deadline is ** Sunday, 31 March **. Spaces are limited, so please register early to secure your place. SPONSORSHIP: We offer a range of sponsorship opportunities for industry (bronze, silver, gold and platinum), each with specific benefits. Please see the website for further details. ============================================================ This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. From P.Achten at cs.ru.nl Tue Feb 5 10:11:22 2019 From: P.Achten at cs.ru.nl (Peter Achten) Date: Tue, 5 Feb 2019 11:11:22 +0100 Subject: [Haskell-cafe] [TFP'19] first call for papers: Trends in Functional Programming 2019, 12-14 June 2019, Vancouver, BC, CA Message-ID: <554f6fb3-6b60-1bbc-7e5c-8883b5300599@cs.ru.nl>                  -------------------------------                    C A L L  F O R  P A P E R S                  -------------------------------                       ====== TFP 2019 ======           20th Symposium on Trends in Functional Programming                            12-14 June, 2019                           Vancouver, BC, CA                   https://www.tfp2019.org/index.html == Important Dates == Submission Deadline            Thursday, March 28, 2019 Paper Notification             Thursday, May 2, 2019 TFPIE                          Tuesday, June 11, 2019 Symposium                      Wednesday, June 12, 2019 – Friday, June 14, 2019 Student Paper Feedback         Friday June 21, 2019 Submission for Formal Review   Thursday, August 1, 2019 Notification of Acceptance     Thursday, October 24, 2019 Camera Ready                   Friday, November 29, 2019 The symposium on Trends in Functional Programming (TFP) is an international forum for researchers with interests in all aspects of functional programming, taking a broad view of current and future trends in the area. It aspires to be a lively environment for presenting the latest research results, and other contributions (see below at scope). Please be aware that TFP uses two distinct rounds of submissions (see below at submission details). TFP 2019 will be the main event of a pair of functional programming events. TFP 2019 will be accompanied by the International Workshop on Trends in Functional Programming in Education (TFPIE), which will take place on June 11. == Scope == The symposium recognizes that new trends may arise through various routes. As part of the Symposium's focus on trends we therefore identify the following five article categories. High-quality articles are solicited in any of these categories:     Research Articles:         Leading-edge, previously unpublished research work     Position Articles:         On what new trends should or should not be     Project Articles:         Descriptions of recently started new projects     Evaluation Articles:         What lessons can be drawn from a finished project     Overview Articles:         Summarizing work with respect to a trendy subject Articles must be original and not simultaneously submitted for publication to any other forum. They may consider any aspect of functional programming: theoretical, implementation-oriented, or experience-oriented. Applications of functional programming techniques to other languages are also within the scope of the symposium. Topics suitable for the symposium include, but are not limited to:     Functional programming and multicore/manycore computing     Functional programming in the cloud     High performance functional computing     Extra-functional (behavioural) properties of functional programs     Dependently typed functional programming     Validation and verification of functional programs     Debugging and profiling for functional languages     Functional programming in different application areas:     security, mobility, telecommunications applications, embedded     systems, global computing, grids, etc.     Interoperability with imperative programming languages     Novel memory management techniques     Program analysis and transformation techniques     Empirical performance studies     Abstract/virtual machines and compilers for functional languages     (Embedded) domain specific languages     New implementation strategies     Any new emerging trend in the functional programming area If you are in doubt on whether your article is within the scope of TFP, please contact the TFP 2019 program chairs, William J. Bowman and Ron Garcia. == Best Paper Awards == To reward excellent contributions, TFP awards a prize for the best paper accepted for the formal proceedings. TFP traditionally pays special attention to research students, acknowledging that students are almost by definition part of new subject trends. A student paper is one for which the authors state that the paper is mainly the work of students, the students are listed as first authors, and a student would present the paper. A prize for the best student paper is awarded each year. In both cases, it is the PC of TFP that awards the prize. In case the best paper happens to be a student paper, that paper will then receive both prizes. == Instructions to Author == Papers must be submitted at:     https://easychair.org/conferences/?conf=tfp2019 Authors of papers have the choice of having their contributions formally reviewed either before or after the Symposium. == Pre-symposium formal review == Papers to be formally reviewed before the symposium should be submitted before an early deadline and receive their reviews and notification of acceptance for both presentation and publication before the symposium. A paper that has been rejected in this process may still be accepted for presentation at the symposium, but will not be considered for the post-symposium formal review. == Post-symposium formal review == Draft papers will receive minimal reviews and notification of acceptance for presentation at the symposium. Authors of draft papers will be invited to submit revised papers based on the feedback receive at the symposium. A post-symposium refereeing process will then select a subset of these articles for formal publication. == Paper categories == Draft papers and papers submitted for formal review are submitted as extended abstracts (4 to 10 pages in length) or full papers (20 pages). The submission must clearly indicate which category it belongs to: research, position, project, evaluation, or overview paper. It should also indicate which authors are research students, and whether the main author(s) are students. A draft paper for which all authors are students will receive additional feedback by one of the PC members shortly after the symposium has taken place. == Format == Papers must be written in English, and written using the LNCS style. For more information about formatting please consult the Springer LNCS web site. == Program Committee == Program Co-chairs William J. Bowman          University of British Columbia Ronald Garcia              University of British Columbia Matteo Cimini              University of Massachusetts Lowell Ryan Culpepper             Czech Technical Institute Joshua Dunfield            Queen's University Sam Lindley                University of Edinburgh Assia Mahboubi             INRI Nantes Christine Rizkallah        University of New South Wales Satnam Singh Marco T. Morazán           Seton Hall University John Hughes                Chalmers University and Quviq Nicolas Wu                 University of Bristol Tom Schrijvers             KU Leuven Scott Smith                Johns Hopkins University Stephanie Balzer           Carnegie Mellon University Viktória Zsók              Eötvös Loránd University From godzbanebane at gmail.com Wed Feb 6 13:39:57 2019 From: godzbanebane at gmail.com (Georgi Lyubenov) Date: Wed, 6 Feb 2019 15:39:57 +0200 Subject: [Haskell-cafe] Pointwise Monoid with DerivingVia on n-tuples Message-ID: Hi! I would like to use `DerivingVia` to do something like this: ``` import Data.Semigroup data Four = Four Bool (Maybe Int) Bool Bool deriving (Semigroup, Monoid) via (Any, Option (First Int), Any, Any) ``` This, however, doesn't work, because `(Any, Option (First Int), Any, Any)` is not coercible to `Four`. Even if I do ``` data Four a b c d = Four a b c d type Concrete = Four Bool (Maybe Int) Bool Bool ``` `Concrete` is still not coercible to `(Any, Option (First Int), Any, Any)`. This seems like a very common thing you would want to do (for me at least it pops up often, to want to have a `Monoid` instance that is just a pointwise Monoid over it's arguments (exactly the way an n-tuple is a `Monoid`). But I don't seem to be finding an easy way to do this. I am aware of `generic-deriving` but `DerivingVia` seems like it should be able to handle something like this, with only `Coercible` holding it back (?). Thanks in advance, ======= Georgi -------------- next part -------------- An HTML attachment was scrubbed... URL: From mail at joachim-breitner.de Wed Feb 6 14:25:56 2019 From: mail at joachim-breitner.de (Joachim Breitner) Date: Wed, 06 Feb 2019 15:25:56 +0100 Subject: [Haskell-cafe] Pointwise Monoid with DerivingVia on n-tuples In-Reply-To: References: Message-ID: Hi, Am Mittwoch, den 06.02.2019, 15:39 +0200 schrieb Georgi Lyubenov: > Hi! > > I would like to use `DerivingVia` to do something like this: > ``` > import Data.Semigroup > > data Four = Four Bool (Maybe Int) Bool Bool > deriving (Semigroup, Monoid) via (Any, Option (First Int), Any, Any) > ``` you probably know that, but this works: newtype Four = Four (Bool, Maybe Int, Bool, Bool) deriving (Semigroup, Monoid) via (Any, Option (First Int), Any, Any) and is operationally equivalent to your data type. You can define a pattern synonym to even the the other syntax. Cheers, Joachim -- Joachim Breitner mail at joachim-breitner.de http://www.joachim-breitner.de/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: This is a digitally signed message part URL: From matthewtpickering at gmail.com Wed Feb 6 15:33:34 2019 From: matthewtpickering at gmail.com (Matthew Pickering) Date: Wed, 6 Feb 2019 15:33:34 +0000 Subject: [Haskell-cafe] Pointwise Monoid with DerivingVia on n-tuples In-Reply-To: References: Message-ID: This question is answered in section 4.3 of the paper. https://www.kosmikus.org/DerivingVia/deriving-via-paper.pdf Cheers, Matt On Wed, Feb 6, 2019 at 1:40 PM Georgi Lyubenov wrote: > > Hi! > > I would like to use `DerivingVia` to do something like this: > ``` > import Data.Semigroup > > data Four = Four Bool (Maybe Int) Bool Bool > deriving (Semigroup, Monoid) via (Any, Option (First Int), Any, Any) > ``` > > This, however, doesn't work, because `(Any, Option (First Int), Any, Any)` is not coercible to `Four`. > > Even if I do > ``` > data Four a b c d = Four a b c d > > type Concrete = Four Bool (Maybe Int) Bool Bool > ``` > `Concrete` is still not coercible to `(Any, Option (First Int), Any, Any)`. > > This seems like a very common thing you would want to do (for me at least it pops up often, to want to have a `Monoid` instance that is just a pointwise Monoid over it's arguments (exactly the way an n-tuple is a `Monoid`). But I don't seem to be finding an easy way to do this. I am aware of `generic-deriving` but `DerivingVia` seems like it should be able to handle something like this, with only `Coercible` holding it back (?). > > Thanks in advance, > > ======= > Georgi > _______________________________________________ > 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 evan at evanrutledgeborden.dreamhosters.com Thu Feb 7 01:31:30 2019 From: evan at evanrutledgeborden.dreamhosters.com (Evan Borden) Date: Wed, 6 Feb 2019 19:31:30 -0600 Subject: [Haskell-cafe] ANN: network 3.0.1.0 Message-ID: Announcing the release of network 3.0.1.0 http://hackage.haskell.org/package/network-3.0.1.0 Changelog - Added getSocketType :: Socket -> IO SocketType. #372 - Correcting manual and brushing up test cases #375 - Fixed long standing bug in getContents on mac #375 - Fixing regression: set correct sockaddr length for abstract addresses for Linux. #374 Thanks to network's contributors for bringing expertise to some hairy platform specific issues. -- Evan Borden -------------- next part -------------- An HTML attachment was scrubbed... URL: From lysxia at gmail.com Thu Feb 7 01:45:57 2019 From: lysxia at gmail.com (Li-yao Xia) Date: Wed, 6 Feb 2019 20:45:57 -0500 Subject: [Haskell-cafe] Pointwise Monoid with DerivingVia on n-tuples In-Reply-To: References: Message-ID: On 2/6/19 10:33 AM, Matthew Pickering wrote: > This question is answered in section 4.3 of the paper. > > https://www.kosmikus.org/DerivingVia/deriving-via-paper.pdf > Is there a package containing SameRepAs and other such convenient newtypes on Hackage or Github? Cheers, Li-yao From palotai.robin at gmail.com Thu Feb 7 08:06:06 2019 From: palotai.robin at gmail.com (Robin Palotai) Date: Thu, 7 Feb 2019 09:06:06 +0100 Subject: [Haskell-cafe] Anyone around Edinburgh or Glasgow second half of April? Message-ID: Hello, I'm planning a family trip to Edinburgh late April, thought it would be nice to meet with local Haskellers as well. It would be a plus if could give us a quick tour of the campus. I'm also glad to receive advice on geeky things to see [1] in the area (computer museums, whatever). Thank you! Robin [1] Non-geeky as well, but I expect my spouse to have that area covered. -------------- next part -------------- An HTML attachment was scrubbed... URL: From meng.wang at bristol.ac.uk Thu Feb 7 23:20:10 2019 From: meng.wang at bristol.ac.uk (Meng Wang) Date: Thu, 7 Feb 2019 23:20:10 +0000 Subject: [Haskell-cafe] PhD studentships in FP at Bristol Message-ID: Hi list, The programming language group at the University of Bristol is looking for up to three more PhD students in the broad area of functional programming, verification, and testing to join a very dynamic group of FP researchers. http://www.bristol.ac.uk/engineering/departments/computerscience/people/meng-wang/overview.html http://www.bristol.ac.uk/engineering/departments/computerscience/people/steven-j-ramsay/overview.html http://www.bristol.ac.uk/engineering/departments/computerscience/people/nicolas-wu/overview.html The positions are fully funded, and with additional bursaries for attending conferences. The ideal candidates will have a strong background in functional programming, especially Haskell, and an appetite for cutting-edge research. For enquiries, please email meng.wang at bristol.ac.uk before February 22nd. Best regards, Meng -------------- next part -------------- An HTML attachment was scrubbed... URL: From P.Achten at cs.ru.nl Fri Feb 8 08:38:34 2019 From: P.Achten at cs.ru.nl (Peter Achten) Date: Fri, 8 Feb 2019 09:38:34 +0100 Subject: [Haskell-cafe] [TFP'19] first call for papers: Trends in Functional Programming 2019, 12-14 June 2019, Vancouver, BC, CA (corrected dates and instructions) Message-ID: <6e7b2aaa-8562-0957-b2c9-04a50bba8d3a@cs.ru.nl>                  -------------------------------                    C A L L  F O R  P A P E R S                  -------------------------------                       ====== TFP 2019 ======           20th Symposium on Trends in Functional Programming                            12-14 June, 2019                           Vancouver, BC, CA                   https://www.tfp2019.org/index.html == Important Dates == Submission Deadline for pre-symposium formal review    Thursday, March 28, 2019 Sumbission Deadline for Draft Papers                   Thursday, May 9, 2019 Notification for pre-symposium submissions             Thursday, May 2, 2019 Notification for Draft Papers                          Tuesday, May 14, 1029 TFPIE                                                  Tuesday, June 11, 2019 Symposium Wednesday, June 12, 2019 – Friday, June 14, 2019 Notification of Student Paper Feedback                 Friday June 21, 2019 Submission Deadline for revised Draft Papers (post-symposium formal review)                                                        Thursday, August 1, 2019 Notification for post-symposium submissions            Thursday, October 24, 2019 Camera Ready Deadline (both pre- and post-symposium)   Friday, November 29, 2019 The symposium on Trends in Functional Programming (TFP) is an international forum for researchers with interests in all aspects of functional programming, taking a broad view of current and future trends in the area. It aspires to be a lively environment for presenting the latest research results, and other contributions (see below at scope). Please be aware that TFP uses two distinct rounds of submissions (see below at submission details). TFP 2019 will be the main event of a pair of functional programming events. TFP 2019 will be accompanied by the International Workshop on Trends in Functional Programming in Education (TFPIE), which will take place on June 11. == Scope == The symposium recognizes that new trends may arise through various routes. As part of the Symposium's focus on trends we therefore identify the following five article categories. High-quality articles are solicited in any of these categories:     Research Articles:         Leading-edge, previously unpublished research work     Position Articles:         On what new trends should or should not be     Project Articles:         Descriptions of recently started new projects     Evaluation Articles:         What lessons can be drawn from a finished project     Overview Articles:         Summarizing work with respect to a trendy subject Articles must be original and not simultaneously submitted for publication to any other forum. They may consider any aspect of functional programming: theoretical, implementation-oriented, or experience-oriented. Applications of functional programming techniques to other languages are also within the scope of the symposium. Topics suitable for the symposium include, but are not limited to:     Functional programming and multicore/manycore computing     Functional programming in the cloud     High performance functional computing     Extra-functional (behavioural) properties of functional programs     Dependently typed functional programming     Validation and verification of functional programs     Debugging and profiling for functional languages     Functional programming in different application areas:     security, mobility, telecommunications applications, embedded     systems, global computing, grids, etc.     Interoperability with imperative programming languages     Novel memory management techniques     Program analysis and transformation techniques     Empirical performance studies     Abstract/virtual machines and compilers for functional languages     (Embedded) domain specific languages     New implementation strategies     Any new emerging trend in the functional programming area If you are in doubt on whether your article is within the scope of TFP, please contact the TFP 2019 program chairs, William J. Bowman and Ron Garcia. == Best Paper Awards == To reward excellent contributions, TFP awards a prize for the best paper accepted for the formal proceedings. TFP traditionally pays special attention to research students, acknowledging that students are almost by definition part of new subject trends. A student paper is one for which the authors state that the paper is mainly the work of students, the students are listed as first authors, and a student would present the paper. A prize for the best student paper is awarded each year. In both cases, it is the PC of TFP that awards the prize. In case the best paper happens to be a student paper, that paper will then receive both prizes. == Instructions to Author == Papers must be submitted at:     https://easychair.org/conferences/?conf=tfp2019 Authors of papers have the choice of having their contributions formally reviewed either before or after the Symposium. == Pre-symposium formal review == Papers to be formally reviewed before the symposium should be submitted before an early deadline and receive their reviews and notification of acceptance for both presentation and publication before the symposium. A paper that has been rejected in this process may still be accepted for presentation at the symposium, but will not be considered for the post-symposium formal review. == Post-symposium formal review == Papers submitted for post-symposium review (draft papers) will receive minimal reviews and notification of acceptance for presentation at the symposium. Authors of draft papers will be invited to submit revised papers based on the feedback received at the symposium. A post-symposium refereeing process will then select a subset of these articles for formal publication. == Paper categories == There are two types of submission, each of which can be submitted either for pre-symposium or post-symposium review:     Extended abstracts. Extended abstracts are 4 to 10 pages in length.     Full papers.        Full papers are up to 20 pages in length. Each submission also belongs to a category:     research     position     project     evaluation     overview paper Each submission should clearly indicate to which category it belongs. Additionally, a draft paper submission—of either type (extended abstract or full paper) and any category—can be considered a student paper. A student paper is one for which primary authors are research students and the majority of the work described was carried out by the students. The submission should indicate that it is a student paper. Student papers will receive additional feedback from the PC shortly after the symposium has taken place and before the post-symposium submission deadline. Feedback is only provided for accepted student papers, i.e., papers submitted for presentation and post-symposium formal review that are accepted for presentation. If a student paper is rejected for presentation, then it receives no further feedback and cannot be submitted for post-symposium review. == Format == Papers must be written in English, and written using the LNCS style. For more information about formatting please consult the Springer LNCS web site (http://www.springer.com/lncs). == Program Committee == Program Co-chairs William J. Bowman          University of British Columbia Ronald Garcia              University of British Columbia Matteo Cimini              University of Massachusetts Lowell Ryan Culpepper             Czech Technical Institute Joshua Dunfield            Queen's University Sam Lindley                University of Edinburgh Assia Mahboubi             INRIA Nantes Christine Rizkallah        University of New South Wales Satnam Singh Marco T. Morazán           Seton Hall University John Hughes                Chalmers University and Quviq Nicolas Wu                 University of Bristol Tom Schrijvers             KU Leuven Scott Smith                Johns Hopkins University Stephanie Balzer           Carnegie Mellon University Viktória Zsók              Eötvös Loránd University From magnus at therning.org Sat Feb 9 09:11:06 2019 From: magnus at therning.org (Magnus Therning) Date: Sat, 09 Feb 2019 10:11:06 +0100 Subject: [Haskell-cafe] Amazonka: is it possible to work around deserialisation bug? Message-ID: <87va1t4991.fsf@therning.org> I just created issue #517 on Amazonka [^1] which got me thinking. Is my only option to wait for the bug to be fixed or can I hack my way around it? I looked around in the documentation for Amazonka a bit but failed to find some obvious way to hack together a "send this request but give me the response in JSON". Which is why I'm trying my luck here. I suspect I'm not the first Amazonka user to find myself in this situation, so hopefully someone's got a solution already. /M [^1]: https://github.com/brendanhay/amazonka/issues/517 -- Magnus Therning OpenPGP: 0x927912051716CE39 email: magnus at therning.org twitter: magthe http://magnus.therning.org/ Computers are useless. They can only give you answers. — Pablo Picasso -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 832 bytes Desc: not available URL: From ruben.astud at gmail.com Sun Feb 10 03:24:52 2019 From: ruben.astud at gmail.com (Ruben Astudillo) Date: Sun, 10 Feb 2019 00:24:52 -0300 Subject: [Haskell-cafe] Weird defaulting on newEmptyTMVar Message-ID: <31dac4c0-1689-0d58-32ab-93b6a3218b50@gmail.com> Dear list Playing on ghci I encountered the following type GHCi, version 8.6.3: http://www.haskell.org/ghc/ :? for help Prelude> :m +Control.Concurrent.STM Prelude Control.Concurrent.STM> var1 <- atomically $ newEmptyTMVar Prelude Control.Concurrent.STM> :t var1 var1 :: TMVar GHC.Types.Any Prelude Control.Concurrent.STM> I would think `var1 :: TMVar a` as the documentation says it should. Reading on `GHC.Types` `Any` seems to be a type family related to some laws on `unsafeCoerce`. Can anybody explain me why is this sensible defaulting and how to obtain the expected result? -- -- Ruben -- pgp: 4EE9 28F7 932E F4AD From ietf-dane at dukhovni.org Sun Feb 10 10:07:17 2019 From: ietf-dane at dukhovni.org (Viktor Dukhovni) Date: Sun, 10 Feb 2019 05:07:17 -0500 Subject: [Haskell-cafe] Weird defaulting on newEmptyTMVar In-Reply-To: <31dac4c0-1689-0d58-32ab-93b6a3218b50@gmail.com> References: <31dac4c0-1689-0d58-32ab-93b6a3218b50@gmail.com> Message-ID: <20190210100717.GJ916@straasha.imrryr.org> On Sun, Feb 10, 2019 at 12:24:52AM -0300, Ruben Astudillo wrote: > Playing on ghci I encountered the following type > > GHCi, version 8.6.3: http://www.haskell.org/ghc/ :? for help > Prelude> :m +Control.Concurrent.STM > Prelude Control.Concurrent.STM> var1 <- atomically $ newEmptyTMVar > Prelude Control.Concurrent.STM> :t var1 > var1 :: TMVar GHC.Types.Any > Prelude Control.Concurrent.STM> Much simpler: $ ghci GHCi, version 8.6.3: http://www.haskell.org/ghc/ :? for help Prelude> let v = Nothing Prelude> :t v v :: Maybe a Prelude> v <- return Nothing Prelude> :t v v :: Maybe GHC.Types.Any This looks like let-bound polymorphism in action. But the two types of "Nothing" are representationally equivalent, so you can write: Prelude> :m + Unsafe.Coerce ...> case unsafeCoerce v of { Just 1 -> True; _ -> False } False ...> case unsafeCoerce v of { Just 'a' -> True; _ -> False } False The case of MVars case is more complicated: ...> :m + Control.Concurrent.MVar ...> v <- newEmptyMVar ...> :t v v :: MVar GHC.Types.Any ...> putMVar (unsafeCoerce v) (1 :: Int) ...> x <- readMVar v ...> :t x x :: GHC.Types.Any ...> unsafeCoerce x :: Int 1 The issues become a bit more clear if we replace the "<-" with unsafePerformIO: ...> :m + System.IO.Unsafe ...> let v = unsafePerformIO newEmptyMVar ...> :t v v :: MVar a ...> putMVar v (1 :: Int) ...> let x = unsafePerformIO (readMVar v) ...> :t x x :: a So now we seem to have an "x" that is of any type and yet is not bottom! We secretly know it is an Int: ...> unsafeCoerce x :: Int 1 But how is GHC supposed to type check that? So without opportunities for type inference, and with no applicable annotations, "Any" seems quite right, with the only way to get a value out being "unsafeCoerce". If you want a more friendly empty MVar via the REPL, you need to add a type annotation: ...> v <- newEmptyMVar :: IO (Mvar Int) ...> :t v v :: MVar Int In compiled code the MVar's type can often be inferred from the context in which "v" is used, and the type annotation is then not required. -- Viktor. From ian at zenhack.net Sun Feb 10 19:04:26 2019 From: ian at zenhack.net (Ian Denhardt) Date: Sun, 10 Feb 2019 14:04:26 -0500 Subject: [Haskell-cafe] Weird defaulting on newEmptyTMVar In-Reply-To: <31dac4c0-1689-0d58-32ab-93b6a3218b50@gmail.com> References: <31dac4c0-1689-0d58-32ab-93b6a3218b50@gmail.com> Message-ID: <154982546647.1235.17445613516445444177@localhost.localdomain> Quoting Ruben Astudillo (2019-02-09 22:24:52) > Dear list > > Playing on ghci I encountered the following type > > GHCi, version 8.6.3: http://www.haskell.org/ghc/ :? for help > Prelude> :m +Control.Concurrent.STM > Prelude Control.Concurrent.STM> var1 <- atomically $ newEmptyTMVar > Prelude Control.Concurrent.STM> :t var1 > var1 :: TMVar GHC.Types.Any > Prelude Control.Concurrent.STM> > > I would think `var1 :: TMVar a` as the documentation says it should. > Reading on `GHC.Types` `Any` seems to be a type family related to some > laws on `unsafeCoerce`. Can anybody explain me why is this sensible > defaulting and how to obtain the expected result? There's a fine distinction here: The docs don't specify: `var1 :: forall a. TMVar a` but rather: `newEmptyTMVar :: forall a. STM (TMVar a)`. I've inserted the explicit foralls for clarity. Suppose the behavior was as you expected (I'll use regular MVars just for brevity): var <- newEmptyMVar ghci> :t var var :: forall a. MVar a Then, because the variable is polymorphic, we should be able to do: putMVar var "Hello" and, we should also be able to do: putMVar var 43 But this is clearly unsafe, because we've put values of two different types in the same MVar! In a full program, what would most likely happen is, the first time GHC sees a use of putMVar, it constrains the type variable to match that type. In something like this: do var <- newEmptyMVar putMVar var "hello" ... On the second line, GHC constrains the `a` type variable to be `String`, and so marks that particular use of `newEmptyMVar` as having been used at type `IO (MVar String)`. If we don't actually do anything with the MVar, like: someAction = do var <- newEmptyMVar ... return var then `someAction` is inferred to be of type `forall a. IO (MVar a)`, just like `newEmptyMVar` itself. The constraining will happen wherever the MVar actually ends up getting used. But, in the REPL, we're in this weird state where we have access to the variable and can as what it's type is, but then things can happen *later* that will force GHC to change the answer. -Ian From nikoshaskell at gmail.com Sun Feb 10 19:27:18 2019 From: nikoshaskell at gmail.com (Nikos Karagiannidis) Date: Sun, 10 Feb 2019 21:27:18 +0200 Subject: [Haskell-cafe] ANN:DBFunctor-0.1.1.0 - Functional Data Management / ETL Data Processing in Haskell Message-ID: Dear all, I am pleased to announce the release of *DBFunctor 0.1.1.0* https://hackage.haskell.org/package/DBFunctor-0.1.1.0 DBFunctor is a Haskell library for ETL (Extract Transform and Load) data processing. It comes with an embedded type-level DSL called *Julius* that enables full SQL functionality over tabular data (e.g., CSV files) but also the ability to write a full ETL data processing flow. Currently, DBFunctor can be used for *in-memory data processing* in Haskell, without the need for some external database. The most notable change in this new release is the full support of *DML (Data Manipulation Language) operations*. I.e., Insert (single tuple), Insert-Into-Select, Delete, Update, *Upsert *(Merge) operations have been implemented along with the corresponding Julius clauses. Other changes includes: - Implemented string aggregate function string_agg (listagg in Oracle) and the corresponding Julius clause - Implemented Julius Aggregate clauses: CountDist and CountStar (count(distinct col) clause and count(*)) - Implemented semi-join operation and corresponding Julius clause - Implemented anti-join operation and corresponding Julius clause - Added support for UTCTime values - Solved CSV orphan instances problem - Various other fixes For any issues/problems with the DBFunctor package please open an issue on github. Happy data processing! Thank you. Best Regards, Nikos -------------- next part -------------- An HTML attachment was scrubbed... URL: From akcheung at cs.washington.edu Sun Feb 10 20:43:48 2019 From: akcheung at cs.washington.edu (Alvin Cheung) Date: Sun, 10 Feb 2019 12:43:48 -0800 Subject: [Haskell-cafe] Reminder: Call for papers: DBPL 2019 Message-ID: <492a6c0d-c343-66cf-2ee4-9c6b66bbc9e9@cs.washington.edu> Reminder: deadline approaching soon! ---------------------------------------------------------------------- The 17th International Symposium on Database Programming Languages https://pldi19.sigplan.org/track/dbpl-2019-papers Phoenix, Arizona, USA June 23, 2019 hosted as part of PLDI 2019 Call for Papers For over 25 years, DBPL has established itself as the principal venue for publishing and discussing new ideas at the intersection of databases and programming languages. Many key contributions in query languages for object-oriented data, persistent databases, nested relational data, and semistructured data, as well as fundamental ideas in types for query languages, were first announced at DBPL. Today, this creative research area is broadening into a subfield of data-centric computation, currently scattered among a range of venues. DBPL is an established destination for such new ideas and solicits submissions from researchers in databases, programming languages or any other community interested in the design, implementation or foundations of data-centric computation. Scope ----- DBPL solicits practical and theoretical papers in all topics at the intersection of databases and programming languages. Papers emphasizing new topics or emerging areas are especially welcome. Suggested, but not exclusive, topics of interest for submissions include: - Compiling Query Languages to Modern Hardware - Data-Centric Programming Abstractions, Comprehensions, Monads - Data Integration, Exchange, and Interoperability - Data Synchronization and Bidirectional Transformations - Declarative Data Centers (e.g., distributed query processing, serverless computing platforms, social computing platforms, etc) - Emerging and Nontraditional Data Models - Language-Based Security in Data Management - Language-Integrated Query Mechanisms - Managing Uncertain and Imprecise Information - Metaprogramming and Heterogeneous Staged Computation - Programming Language Support for Data-Centric Programming (e.g., databases, web programming, machine learning, etc) - Query Compilation and In-memory Databases - Query Language Design and Implementation - Query Transformation and Optimization - Schema Mapping and Metadata Management - Semantics and Verification of Database Systems - Stream Data Processing and Query Languages - Type and Effect Systems for Data-Centric Programming Author Guidelines ----------------- Prospective authors are invited to submit full papers in English presenting original research. Submitted papers must be unpublished and not submitted for publication elsewhere. Submissions should be no more than 10 pages long, excluding references, in the two-column ACM proceedings format, following PLDI’s formatting requirements (https://pldi19.sigplan.org/track/pldi-2019-papers#Call-for-Papers). Each submission should begin with a succinct statement of the problem and a summary of the main results. Authors may provide more details to substantiate the main claims of the paper by including a clearly marked appendix at the end of the submission, which is not included in the page limit and is read at the discretion of the committee. At least one author of each accepted paper must attend the symposium to present their work. Short papers of at most 4 pages (same format as long papers) describing work in progress, demos, research challenges or visions are also welcome. Accepted short papers may be included or excluded from the formal proceedings, whichever the author(s) prefer. Full and short papers are both due on the deadline, February 15, 2019. Instructions on how to submit will be posted on the symposium website noted above. Review is single-blind, so authors do not need to anonymize their submissions. PC submissions are allowed, except for the co-chairs. Important Dates --------------- - Paper Submission: February 15, 2019 - Notification: March 29, 2019 - Final versions due: April 16, 2019 - Symposium: June 23, 2019 Proceedings ----------- Accepted papers will appear as part of the PLDI Proceedings for DBPL 2019. Program Committee ----------------- *Program Co-Chairs* Alvin Cheung, University of Washington Kim Nguyễn, Université Paris-Sud *Program Committee* William Cook, University of Texas at Austin Vasiliki Kalavri, ETH Harshad Kasture, Oracle Oleg Kiselyov, University of Tsukuba Sam Lindley, University of Edinburgh Tiark Rompf, Purdue University Stefanie Scherzinger, OTH Regensberg Amir Shaikhha, EPFL / University of Oxford Avi Shinnar, IBM Guido Wachsmuth, Oracle Melanie Wu, Pomona College History ------- The 17th Symposium on Data Base Programming Languages (DBPL 2019) continues the tradition of excellence initiated by its predecessors in Roscoff, Finistere (1987), Salishan, Oregon (1989), Nafplion, Argolida (1991), Manhattan, New York (1993), Gubbio, Umbria (1995), Estes Park, Colorado (1997), Kinloch Rannoch, Scotland (1999), Marino, Rome (2001), Potsdam, Germany (2003), Trondheim, Norway (2005), Vienna, Austria (2007), Lyon, France (2009), Seattle, Washington (2011), Riva del Garda, Italy (2013), Pittsburgh, Pennsylvania (2015), Munich, Germany (2017). DBPL was affiliated with VLDB from 1999-2013 and in 2017. In 2015, it is affiliated with SPLASH for the first time and in 2019, it is affiliated with PLDI for the first time. From mail at nh2.me Mon Feb 11 16:50:57 2019 From: mail at nh2.me (=?UTF-8?Q?Niklas_Hamb=c3=bcchen?=) Date: Mon, 11 Feb 2019 17:50:57 +0100 Subject: [Haskell-cafe] erd package looking for maintainer - beginner friendly Message-ID: <444c263f-450e-7ce8-b847-4c079c7b80d5@nh2.me> `erd` https://github.com/BurntSushi/erd is a Haskell package that creates pretty diagrams from simple textual descriptions. It's made by @BurntSushi (https://github.com/BurntSushi), author of `ripgrep` and several Rust tools and packages. He's looking for help maintaining this older project of his, which many people still find very useful. >From my judgement, the code is fairly beginner friendly, so if you are new-intermediate in Haskell, understand the concepts involved in the package, and want to get into package maintainership, this might be a good start. Details on https://github.com/BurntSushi/erd/issues/42 From lists at utdemir.com Mon Feb 11 20:07:07 2019 From: lists at utdemir.com (Utku Demir) Date: Mon, 11 Feb 2019 15:07:07 -0500 Subject: [Haskell-cafe] =?utf-8?q?Amazonka=3A_is_it_possible_to_work_aroun?= =?utf-8?q?d=09deserialisation_bug=3F?= In-Reply-To: <87va1t4991.fsf@therning.org> References: <87va1t4991.fsf@therning.org> Message-ID: <6a548990-c6a0-47f7-b5ac-c1b9139cfe3a@www.fastmail.com> Hey, I had a similar problem before, my workaround was creating a newtype wrapper around the original request and implementing 'AWSRequest' instance by hand. That let me override the way response is parsed. I dug up the code, the override is here: https://github.com/utdemir/distributed-fork/blob/edadea209e7e1fda77ca1d37011734771f6559de/serverless-execute-aws-lambda/src/Network/AWS/Lambda/Invoke/Fixed.hs And here is how I sent the request: https://github.com/utdemir/distributed-fork/blob/edadea209e7e1fda77ca1d37011734771f6559de/serverless-execute-aws-lambda/src/Network/Serverless/Execute/Lambda/Internal/Invoke.hs#L78 Hope it helps, Utku On Sat, Feb 9, 2019, at 10:11 PM, Magnus Therning wrote: > > I just created issue #517 on Amazonka [^1] which got me thinking. > > Is my only option to wait for the bug to be fixed or can I hack my > way > around it? > > I looked around in the documentation for Amazonka a bit but failed > to > find some obvious way to hack together a "send this request but > give me > the response in JSON". Which is why I'm trying my luck here. I > suspect > I'm not the first Amazonka user to find myself in this situation, > so > hopefully someone's got a solution already. > > /M > > [^1]: https://github.com/brendanhay/amazonka/issues/517 > > -- > Magnus Therning OpenPGP: 0x927912051716CE39 > email: magnus at therning.org > twitter: magthe http://magnus.therning.org/ > > Computers are useless. They can only give you answers. > — Pablo Picasso > > _______________________________________________ > 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. > > *Attachments:* > * signature.asc -------------- next part -------------- An HTML attachment was scrubbed... URL: From olf at aatal-apotheke.de Mon Feb 11 20:48:40 2019 From: olf at aatal-apotheke.de (Olaf Klinke) Date: Mon, 11 Feb 2019 21:48:40 +0100 Subject: [Haskell-cafe] ANN:DBFunctor-0.1.1.0 - Functional Data Management / ETL Data Processing in Haskell Message-ID: Dear Nikos, (not CC'ing the list yet because I don't know whether my remarks miss the design goals of DBFunctor) As a data scientist I have some questions regarding the design of DBFunctor. 1. Why is RTable, or rather RDataType a closed type? Was this forced by compatibility to other databases? There might be RTabular Types whose elements are hard to represent as RDataType, or the conversion deletes some of the data's semantics. What is the essence that makes the operations in the Julius language work? For example, the inner join could have the more general type MonadPlus m => (a -> b -> Bool) -> m a -> m b -> m (a,b) 2. Is there a way of saying that a column may not contain NULL values? 3. What about the efficiency of the operations? I see no complexities stated in the documentation of Etl.Julius. 4. I like the feature of named operations (:=>). But can we bind a sub-operation to a Haskell variable without leaving Julius? After all, takeNamedResult can lead to exceptions because the user may reference a name that has not been defined. With haskell variables, the compiler prevents this. Why not make the Julius language a monad, so that one can use do-notation for building the result? E.g. type JuliusExpr = JuliusLang RTable instance Monad JuliusLang where ... Kind regards, Olaf From danburton.email at gmail.com Mon Feb 11 22:35:04 2019 From: danburton.email at gmail.com (Dan Burton) Date: Mon, 11 Feb 2019 17:35:04 -0500 Subject: [Haskell-cafe] Taking over haskell-src-meta Message-ID: I, Dan Burton, intend to take over maintenance of haskell-src-meta. -- Dan Burton -------------- next part -------------- An HTML attachment was scrubbed... URL: From ietf-dane at dukhovni.org Tue Feb 12 01:42:28 2019 From: ietf-dane at dukhovni.org (Viktor Dukhovni) Date: Mon, 11 Feb 2019 20:42:28 -0500 Subject: [Haskell-cafe] Weird defaulting on newEmptyTMVar In-Reply-To: <20190210100717.GJ916@straasha.imrryr.org> References: <31dac4c0-1689-0d58-32ab-93b6a3218b50@gmail.com> <20190210100717.GJ916@straasha.imrryr.org> Message-ID: > On Feb 10, 2019, at 5:07 AM, Viktor Dukhovni wrote: > > The issues become a bit more clear if we replace the "<-" with > unsafePerformIO: > > ...> :m + System.IO.Unsafe > ...> let v = unsafePerformIO newEmptyMVar > ...> :t v > v :: MVar a > ...> putMVar v (1 :: Int) > ...> let x = unsafePerformIO (readMVar v) > ...> :t x > x :: a Taking it further, one quickly runs into real trouble: --- foo.hs {-# LANGUAGE TypeApplications #-} module Main (main) where import Control.Concurrent.MVar import System.IO.Unsafe main :: IO () main = do let v = unsafePerformIO newEmptyMVar putMVar v (42 :: Int) let x = unsafePerformIO (readMVar v) print $ x + 0 -- OK print $ x + 3.0 -- Weird print $ "oops" ++ x -- Bad readMVar @Int x >>= print -- A bridge too far --- $ ghc foo.hs [1 of 1] Compiling Main ( foo.hs, foo.o ) Linking foo ... $ ./foo 42 3.0 "oops" Segmentation fault (core dumped) So it is interesting to note that "unsafePerformIO" combined with polymorphic MVars, is sufficient to completely escape not only protection from race conditions, but also all type safety. Unsafe code that manages to create, not an "MVar GHC.Types.Any", but rather an "MVar a", opens a Pandora's box of trouble. -- Viktor. From pierre.van.de.laar at philips.com Tue Feb 12 12:48:53 2019 From: pierre.van.de.laar at philips.com (Pierre_van_der_Laar (Functional Account)) Date: Tue, 12 Feb 2019 12:48:53 +0000 Subject: [Haskell-cafe] Extension and parameterized classes Message-ID: Dear Haskell experts, I working on a large Haskell project on Model Based Testing (see https://github.com/TorXakis/TorXakis) and I would like to get feedback on a design issue I have related to extension and parameterized classes. I will describe a small simplified example to illustrate the issue and I appreciate any feedback. I have a class that extends another class as follows: class Base a => Extend a where -- | Constructor from Base fromBase :: Base b => b -> a I can define an instance of Extend that hides the Base implementation as follows: {-# LANGUAGE ExistentialQuantification #-} data BaseHidden = forall a . Base a => BaseHidden { _base :: a , ... -- additional extension info } instance Extend BaseHidden where fromBase b = BaseHidden b ... -- additional extension initialization I can define a parameterized data class of which the parameter is the type of the Base class as follows: data BaseExpose a = BaseExpose { _base :: a , ... -- additional extension info } With this parameterized data class, I can make the following fromBase' function fromBase' :: Base a => a -> BaseExpose a fromBase' a = BaseExpose a ... -- additional extension initialization My question is can I make BaseExpose an instance of Extend? I am aware that the signature of fromBase states that for all 'b' of Base an Extend of type 'a' must be able to be made. Yet, in my case 'a' is a parameterized class 'BaseExpose x' and since the type of Extend is provided (it is a constructor) I think it is acceptable that 'BaseExpose b' is returned as type. I have looked at some extensions, such as InstanceSigs, yet I found no solution. Does anybody on this mailing list have an answer or solution for me? Also experience in a large project related to maintenance for the two alternatives (hiding or exposing types) is appreciated! Thanks in advance, Pierre van de Laar ________________________________ The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mike at barrucadu.co.uk Wed Feb 13 00:13:13 2019 From: mike at barrucadu.co.uk (Michael Walker) Date: Wed, 13 Feb 2019 00:13:13 +0000 Subject: [Haskell-cafe] [ANN] dejafu-2.0.0.0 - a library for unit-testing concurrent programs Message-ID: I'm pleased to announce a new super-major release of [dejafu][1], a library for testing concurrent Haskell programs. While there are breaking changes, common use-cases shouldn't be affected too significantly (or not at all). There is a brief guide to the changes, and how to migrate if necessary, [on the website][2]. What's dejafu? -------------- dejafu is a unit-testing library for concurrent Haskell programs. Tests are deterministic, and work by systematically exploring the possible schedules of your concurrency-using test case, allowing you to confidently check your threaded code. [HUnit][3] and [Tasty][4] bindings are available. dejafu requires your test case to be written against the `MonadConc` typeclass from the [concurrency][5] package. This is a necessity, dejafu cannot peek inside your `IO` or `STM` actions, so it needs to be able to plug in an alternative implementation of the concurrency primitives for testing. There is some guidance for how to switch from `IO` code to `MonadConc` code [on the website][6]. If you really need `IO`, you can use `MonadIO` - but make sure it's deterministic enough to not invalidate your tests! Here's a small example reproducing a deadlock found in an earlier version of the [auto-update][7] library: ``` > :{ autocheck $ do auto <- mkAutoUpdate defaultUpdateSettings auto :} [fail] Successful [deadlock] S0--------S1-----------S0- [fail] Deterministic [deadlock] S0--------S1-----------S0- () S0--------S1--------p0-- ``` dejafu finds the deadlock, and gives a simplified execution trace for each distinct result. More in-depth traces showing exactly what each thread did are also available. This is using a version of auto-update modified to use the `MonadConc` typeclass. The source is in the [dejafu testsuite][8]. What's new? ----------- The highlights for this release are setup actions, teardown actions, and invariants: - **Setup actions** are for things which are not really a part of your test case, but which are needed for it (for example, setting up a test distributed system). As dejafu can run a single test case many times, repeating this work can be a significant overhead. By defining this as a setup action, dejafu can "snapshot" the state at the end of the action, and efficiently reload it in subsequent executions of the same test. - **Teardown actions** are for things you want to run after your test case completes, in all cases, even if the test deadlocks (for example). As dejafu controls the concurrent execution of the test case, inspecting shared state is possible even if the test case fails to complete. - **Invariants** are effect-free atomically-checked conditions over shared state which must always hold. If an invariant throws an exception, the test case is aborted, and any teardown action run. Here is an example of a setup action with an invariant: ``` > :{ autocheck $ let setup = do var <- newEmptyMVar registerInvariant $ do value <- inspectMVar var when (value == Just 1) $ throwM Overflow pure var in withSetup setup $ \var -> do fork $ putMVar var 0 fork $ putMVar var 1 tryReadMVar var :} [fail] Successful [invariant failure] S0--P2- [fail] Deterministic [invariant failure] S0--P2- Nothing S0---- Just 0 S0--P1--S0-- ``` In the `[invariant failure]` case, thread 2 is scheduled, writing the forbidden value "1" to the MVar, which terminates the test. Here is an example of a setup action with a teardown action: ``` > :{ autocheck $ let setup = newMVar () teardown var (Right _) = show <$> tryReadMVar var teardown _ (Left e) = pure (show e) in withSetupAndTeardown setup teardown $ \var -> do fork $ takeMVar var takeMVar var :} [pass] Successful [fail] Deterministic "Nothing" S0--- "Deadlock" S0-P1--S0- ``` The teardown action can perform arbitrary concurrency effects, including inspecting any mutable state returned by the setup action. Setup and teardown actions were previously available in a slightly different form as the `dontCheck` and `subconcurrency` functions, which have been removed (see the migration guide if you used these). [1]: http://hackage.haskell.org/package/dejafu [2]: https://dejafu.readthedocs.io/en/latest/migration_1x_2x.html [3]: http://hackage.haskell.org/package/hunit-dejafu [4]: http://hackage.haskell.org/package/tasty-dejafu [5]: http://hackage.haskell.org/package/concurrency [6]: https://dejafu.readthedocs.io/en/latest/typeclass.html [7]: http://hackage.haskell.org/package/auto-update [8]: https://github.com/barrucadu/dejafu/blob/master/dejafu-tests/lib/Examples/AutoUpdate.hs -- Michael Walker (http://www.barrucadu.co.uk) -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.franksen at online.de Wed Feb 13 11:35:45 2019 From: ben.franksen at online.de (Ben Franksen) Date: Wed, 13 Feb 2019 12:35:45 +0100 Subject: [Haskell-cafe] role constraints In-Reply-To: <760C0D7F-A33D-4548-866D-721976F902FF@cs.brynmawr.edu> References: <760C0D7F-A33D-4548-866D-721976F902FF@cs.brynmawr.edu> Message-ID: Hey Richard Many thanks, yes I think this could work. And sorry I didn't reply sooner. Cheers Ben Am 11.12.18 um 03:04 schrieb Richard Eisenberg: > You can use quantified constraints to get some approximation of the behavior you want. > > For example: > >> foo :: forall a. (forall x y. Coercible (a x) (a y)) => ... a ... > > This means, effectively, that a's parameter's role must be phantom. I've seen some bug reports fly by that talk about situations like these and how the solver sometimes isn't the best in these scenarios, but this approach just might work for you. > > Richard > >> On Dec 10, 2018, at 6:48 PM, Ben Franksen wrote: >> >> I have a question about roles for type variables. I have a number of >> data types that more or less represent partial bijections. They take two >> type parameters that represent domain and range. The phantom type >> parameters are extremely useful: code that shuffles these things around >> will fail to type check if domains and ranges don't match up exactly. >> However, there are some situations where I know more about the semantics >> than the type checker and need to be able to coerce the phantom >> parameters. No problem, that's what coerce is for... >> >> Except, most of the code is polymorphic over the data type, requiring >> only a few class constraints. And this polymorphism forces the type >> checker to assume representational roles for the type parameters. Which >> means I can't use coerce. Instead I have to use unsafeCoerce which I >> would like to avoid. >> >> Is there a way to express, as a constraint, that a certain parameter has >> a phantom role? What I want to say is: you are only allowed to >> instantiate the type variable 'a :: * -> * -> *' with data type 'A' if >> 'x' and 'y' in 'A x y' have both role phantom. And what I get is that I >> can call coerce to modify the parameters 'x' and 'y'. >> >> _______________________________________________ >> 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 icfp.publicity at googlemail.com Wed Feb 13 18:15:02 2019 From: icfp.publicity at googlemail.com (Sam Tobin-Hochstadt) Date: Wed, 13 Feb 2019 13:15:02 -0500 Subject: [Haskell-cafe] Third Call for Papers: PACMPL issue ICFP 2019 Message-ID: <5c645ea6db1bb_1b92abe6f8c25b434654@hermes.mail> PACMPL Volume 3, Issue ICFP 2019 Call for Papers accepted papers to be invited for presentation at The 24th ACM SIGPLAN International Conference on Functional Programming Berlin, Germany http://icfp19.sigplan.org/ ### Important dates Submissions due: 1 March 2019 (Friday) Anywhere on Earth https://icfp19.hotcrp.com Author response: 16 April (Tuesday) - 18 Apri (Friday) 14:00 UTC Notification: 3 May (Friday) Final copy due: 22 June (Saturday) Conference: 18 August (Sunday) - 23 August (Friday) ### About PACMPL Proceedings of the ACM on Programming Languages (PACMPL ) is a Gold Open Access journal publishing research on all aspects of programming languages, from design to implementation and from mathematical formalisms to empirical studies. Each issue of the journal is devoted to a particular subject area within programming languages and will be announced through publicized Calls for Papers, like this one. ### Scope [PACMPL](https://pacmpl.acm.org/) issue ICFP 2019 seeks original papers on the art and science of functional programming. Submissions are invited on all topics from principles to practice, from foundations to features, and from abstraction to application. The scope includes all languages that encourage functional programming, including both purely applicative and imperative languages, as well as languages with objects, concurrency, or parallelism. Topics of interest include (but are not limited to): * *Language Design*: concurrency, parallelism, and distribution; modules; components and composition; metaprogramming; type systems; interoperability; domain-specific languages; and relations to imperative, object-oriented, or logic programming. * *Implementation*: abstract machines; virtual machines; interpretation; compilation; compile-time and run-time optimization; garbage collection and memory management; multi-threading; exploiting parallel hardware; interfaces to foreign functions, services, components, or low-level machine resources. * *Software-Development Techniques*: algorithms and data structures; design patterns; specification; verification; validation; proof assistants; debugging; testing; tracing; profiling. * *Foundations*: formal semantics; lambda calculus; rewriting; type theory; monads; continuations; control; state; effects; program verification; dependent types. * *Analysis and Transformation*: control-flow; data-flow; abstract interpretation; partial evaluation; program calculation. * *Applications*: symbolic computing; formal-methods tools; artificial intelligence; systems programming; distributed-systems and web programming; hardware design; databases; XML processing; scientific and numerical computing; graphical user interfaces; multimedia and 3D graphics programming; scripting; system administration; security. * *Education*: teaching introductory programming; parallel programming; mathematical proof; algebra. Submissions will be evaluated according to their relevance, correctness, significance, originality, and clarity. Each submission should explain its contributions in both general and technical terms, clearly identifying what has been accomplished, explaining why it is significant, and comparing it with previous work. The technical content should be accessible to a broad audience. PACMPL issue ICFP 2019 also welcomes submissions in two separate categories — Functional Pearls and Experience Reports — that must be marked as such at the time of submission and that need not report original research results. Detailed guidelines on both categories are given at the end of this call. Please contact the principal editor if you have questions or are concerned about the appropriateness of a topic. ### Preparation of submissions **Deadline**: The deadline for submissions is **Friday, March 1, 2019**, Anywhere on Earth (). This deadline will be strictly enforced. **Formatting**: Submissions must be in PDF format, printable in black and white on US Letter sized paper, and interpretable by common PDF tools. All submissions must adhere to the "ACM Small" template that is available (in both LaTeX and Word formats) from . For authors using LaTeX, a lighter-weight package, including only the essential files, is available from . There is a limit of **25 pages for a full paper or Functional Pearl** and **12 pages for an Experience Report**; in either case, the bibliography will not be counted against these limits. Submissions that exceed the page limits or, for other reasons, do not meet the requirements for formatting, will be summarily rejected. Supplementary material can and should be **separately** submitted (see below). See also PACMPL's Information and Guidelines for Authors at . **Submission**: Submissions will be accepted at Improved versions of a paper may be submitted at any point before the submission deadline using the same web interface. **Author Response Period**: Authors will have a 72-hour period, starting at 14:00 UTC on **Tuesday, April 16, 2019**, to read reviews and respond to them. **Supplementary Material**: Authors have the option to attach supplementary material to a submission, on the understanding that reviewers may choose not to look at it. This supplementary material should **not** be submitted as part of the main document; instead, it should be uploaded as a **separate** PDF document or tarball. Supplementary material should be uploaded **at submission time**, not by providing a URL in the paper that points to an external repository. Authors are free to upload both anonymized and non-anonymized supplementary material. Anonymized supplementary material will be visible to reviewers immediately; non-anonymized supplementary material will be revealed to reviewers only after they have submitted their review of the paper and learned the identity of the author(s). **Authorship Policies**: All submissions are expected to comply with the ACM Policies for Authorship that are detailed at . **Republication Policies**: Each submission must adhere to SIGPLAN's republication policy, as explained on the web at . **Resubmitted Papers**: Authors who submit a revised version of a paper that has previously been rejected by another conference have the option to attach an annotated copy of the reviews of their previous submission(s), explaining how they have addressed these previous reviews in the present submission. If a reviewer identifies him/herself as a reviewer of this previous submission and wishes to see how his/her comments have been addressed, the principal editor will communicate to this reviewer the annotated copy of his/her previous review. Otherwise, no reviewer will read the annotated copies of the previous reviews. ### Review Process This section outlines the two-stage process with lightweight double-blind reviewing that will be used to select papers for PACMPL issue ICFP 2019. We anticipate that there will be a need to clarify and expand on this process, and we will maintain a list of frequently asked questions and answers on the conference website to address common concerns. **PACMPL issue ICFP 2019 will employ a two-stage review process.** The first stage in the review process will assess submitted papers using the criteria stated above and will allow for feedback and input on initial reviews through the author response period mentioned previously. At the review meeting, a set of papers will be conditionally accepted and all other papers will be rejected. Authors will be notified of these decisions on **May 3, 2019**. Authors of conditionally accepted papers will be provided with committee reviews (just as in previous conferences) along with a set of mandatory revisions. After four weeks (May 31, 2019), the authors will provide a second submission. The second and final reviewing phase assesses whether the mandatory revisions have been adequately addressed by the authors and thereby determines the final accept/reject status of the paper. The intent and expectation is that the mandatory revisions can be addressed within four weeks and hence that conditionally accepted papers will in general be accepted in the second phase. The second submission should clearly identify how the mandatory revisions were addressed. To that end, the second submission must be accompanied by a cover letter mapping each mandatory revision request to specific parts of the paper. The cover letter will facilitate a quick second review, allowing for confirmation of final acceptance within two weeks. Conversely, the absence of a cover letter will be grounds for the paper’s rejection. **PACMPL issue ICFP 2019 will employ a lightweight double-blind reviewing process.** To facilitate this, submitted papers must adhere to two rules: 1. **author names and institutions must be omitted**, and 2. **references to authors' own related work should be in the third person** (e.g., not "We build on our previous work ..." but rather "We build on the work of ..."). The purpose of this process is to help the reviewers come to an initial judgement about the paper without bias, not to make it impossible for them to discover the authors if they were to try. Nothing should be done in the name of anonymity that weakens the submission or makes the job of reviewing the paper more difficult (e.g., important background references should not be omitted or anonymized). In addition, authors should feel free to disseminate their ideas or draft versions of their paper as they normally would. For instance, authors may post drafts of their papers on the web or give talks on their research ideas. ### Information for Authors of Accepted Papers * As a condition of acceptance, final versions of all papers must adhere to the new ACM Small format. The page limit for the final versions of papers will be increased by two pages to help authors respond to reviewer comments and mandatory revisions: **27 pages plus bibliography for a regular paper or Functional Pearl, 14 pages plus bibliography for an Experience Report**. * Authors of accepted submissions will be required to agree to one of the three ACM licensing options: open access on payment of a fee (**recommended**, and SIGPLAN can cover the cost as described next); copyright transfer to ACM; or retaining copyright but granting ACM exclusive publication rights. Further information about ACM author rights is available from . * PACMPL is a Gold Open Access journal. It will be archived in ACM’s Digital Library, but no membership or fee is required for access. Gold Open Access has been made possible by generous funding through ACM SIGPLAN, which will cover all open access costs in the event authors cannot. Authors who can cover the costs may do so by paying an Article Processing Charge (APC). PACMPL, SIGPLAN, and ACM Headquarters are committed to exploring routes to making Gold Open Access publication both affordable and sustainable. * ACM offers authors a range of copyright options, one of which is Creative Commons CC-BY publication; this is the option recommended by the PACMPL editorial board. A reasoned argument in favour of this option can be found in the article [Why CC-BY?](https://oaspa.org/why-cc-by/) published by OASPA, the Open Access Scholarly Publishers Association. * We intend that the papers will be freely available for download from the ACM Digital Library in perpetuity via the OpenTOC mechanism. * ACM Author-Izer is a unique service that enables ACM authors to generate and post links on either their home page or institutional repository for visitors to download the definitive version of their articles from the ACM Digital Library at no charge. Downloads through Author-Izer links are captured in official ACM statistics, improving the accuracy of usage and impact measurements. Consistently linking to the definitive version of an ACM article should reduce user confusion over article versioning. After an article has been published and assigned to the appropriate ACM Author Profile pages, authors should visit to learn how to create links for free downloads from the ACM DL. * At least one author of each accepted submissions will be expected to attend and present their paper at the conference. The schedule for presentations will be determined and shared with authors after the full program has been selected. Presentations will be videotaped and released online if the presenter consents. * The official publication date is the date the papers are made available in the ACM Digital Library. This date may be up to *two weeks prior* to the first day of the conference. The official publication date affects the deadline for any patent filings related to published work. ### Artifact Evaluation Authors of papers that are conditionally accepted in the first phase of the review process will be encouraged (but not required) to submit supporting materials for Artifact Evaluation. These items will then be reviewed by an Artifact Evaluation Committee, separate from the paper Review Committee, whose task is to assess how the artifacts support the work described in the associated paper. Papers that go through the Artifact Evaluation process successfully will receive a seal of approval printed on the papers themselves. Authors of accepted papers will be encouraged to make the supporting materials publicly available upon publication of the papers, for example, by including them as "source materials" in the ACM Digital Library. An additional seal will mark papers whose artifacts are made available, as outlined in the ACM guidelines for artifact badging. Participation in Artifact Evaluation is voluntary and will not influence the final decision regarding paper acceptance. ### Special categories of papers In addition to research papers, PACMPL issue ICFP solicits two kinds of papers that do not require original research contributions: Functional Pearls, which are full papers, and Experience Reports, which are limited to half the length of a full paper. Authors submitting such papers should consider the following guidelines. #### Functional Pearls A Functional Pearl is an elegant essay about something related to functional programming. Examples include, but are not limited to: * a new and thought-provoking way of looking at an old idea * an instructive example of program calculation or proof * a nifty presentation of an old or new data structure * an interesting application of functional programming techniques * a novel use or exposition of functional programming in the classroom While pearls often demonstrate an idea through the development of a short program, there is no requirement or expectation that they do so. Thus, they encompass the notions of theoretical and educational pearls. Functional Pearls are valued as highly and judged as rigorously as ordinary papers, but using somewhat different criteria. In particular, a pearl is not required to report original research, but, it should be concise, instructive, and entertaining. A pearl is likely to be rejected if its readers get bored, if the material gets too complicated, if too much specialized knowledge is needed, or if the writing is inelegant. The key to writing a good pearl is polishing. A submission that is intended to be treated as a pearl must be marked as such on the submission web page, and should contain the words "Functional Pearl" somewhere in its title or subtitle. These steps will alert reviewers to use the appropriate evaluation criteria. Pearls will be combined with ordinary papers, however, for the purpose of computing the conference's acceptance rate. #### Experience Reports The purpose of an Experience Report is to help create a body of published, refereed, citable evidence that functional programming really works — or to describe what obstacles prevent it from working. Possible topics for an Experience Report include, but are not limited to: * insights gained from real-world projects using functional programming * comparison of functional programming with conventional programming in the context of an industrial project or a university curriculum * project-management, business, or legal issues encountered when using functional programming in a real-world project * curricular issues encountered when using functional programming in education * real-world constraints that created special challenges for an implementation of a functional language or for functional programming in general An Experience Report is distinguished from a normal PACMPL issue ICFP paper by its title, by its length, and by the criteria used to evaluate it. * Both in the papers and in any citations, the title of each accepted Experience Report must end with the words "(Experience Report)" in parentheses. The acceptance rate for Experience Reports will be computed and reported separately from the rate for ordinary papers. * Experience Report submissions can be at most 12 pages long, excluding bibliography. * Each accepted Experience Report will be presented at the conference, but depending on the number of Experience Reports and regular papers accepted, authors of Experience reports may be asked to give shorter talks. * Because the purpose of Experience Reports is to enable our community to accumulate a body of evidence about the efficacy of functional programming, an acceptable Experience Report need not add to the body of knowledge of the functional-programming community by presenting novel results or conclusions. It is sufficient if the Report states a clear thesis and provides supporting evidence. The thesis must be relevant to ICFP, but it need not be novel. The review committee will accept or reject Experience Reports based on whether they judge the evidence to be convincing. Anecdotal evidence will be acceptable provided it is well argued and the author explains what efforts were made to gather as much evidence as possible. Typically, more convincing evidence is obtained from papers which show how functional programming was used than from papers which only say that functional programming was used. The most convincing evidence often includes comparisons of situations before and after the introduction or discontinuation of functional programming. Evidence drawn from a single person's experience may be sufficient, but more weight will be given to evidence drawn from the experience of groups of people. An Experience Report should be short and to the point: it should make a claim about how well functional programming worked on a particular project and why, and produce evidence to substantiate this claim. If functional programming worked in this case in the same ways it has worked for others, the paper need only summarize the results — the main part of the paper should discuss how well it worked and in what context. Most readers will not want to know all the details of the project and its implementation, but the paper should characterize the project and its context well enough so that readers can judge to what degree this experience is relevant to their own projects. The paper should take care to highlight any unusual aspects of the project. Specifics about the project are more valuable than generalities about functional programming; for example, it is more valuable to say that the team delivered its software a month ahead of schedule than it is to say that functional programming made the team more productive. If the paper not only describes experience but also presents new technical results, or if the experience refutes cherished beliefs of the functional-programming community, it may be better to submit it as a full paper, which will be judged by the usual criteria of novelty, originality, and relevance. The principal editor will be happy to advise on any concerns about which category to submit to. ### ICFP Organizers General Chair: Derek Dreyer (MPI-SWS, Germany) Artifact Evaluation Co-Chairs: Simon Marlow (Facebook, UK) Industrial Relations Chair: Alan Jeffrey (Mozilla Research, USA) Programming Contest Organiser: Ilya Sergey (Yale-NUS College, Singapore) Publicity and Web Chair: Sam Tobin-Hochstadt (Indiana University, USA) Student Research Competition Chair: William J. Bowman (University of British Columbia, Canada) Workshops Co-Chair: Christophe Scholliers (Universiteit Gent, Belgium) Jennifer Hackett (University of Nottingham, UK) Conference Manager: Annabel Satin (P.C.K.) ### PACMPL Volume 3, Issue ICFP 2019 Principal Editor: François Pottier (Inria, France) Review Committee: Lennart Beringer (Princeton University, United States) Joachim Breitner (DFINITY Foundation, Germany) Laura M. Castro (University of A Coruña, Spain) Ezgi Çiçek (Facebook London, United Kingdom) Pierre-Evariste Dagand (LIP6/CNRS, France) Christos Dimoulas (Northwestern University, United States) Jacques-Henri Jourdan (CNRS, LRI, Université Paris-Sud, France) Andrew Kennedy (Facebook London, United Kingdom) Daan Leijen (Microsoft Research, United States) Kazutaka Matsuda (Tohoku University, Japan) Bruno C. d. S. Oliveira (University of Hong Kong, China) Klaus Ostermann (University of Tübingen, Germany) Jennifer Paykin (Galois, United States) Frank Pfenning (Carnegie Mellon University, USA) Mike Rainey (Indiana University, USA) Chung-chieh Shan (Indiana University, USA) Sam Staton (University of Oxford, UK) Pierre-Yves Strub (Ecole Polytechnique, France) German Vidal (Universitat Politecnica de Valencia, Spain) External Review Committee: Michael D. Adams (University of Utah, USA) Robert Atkey (University of Strathclyde, IK) Sheng Chen (University of Louisiana at Lafayette, USA) James Cheney (University of Edinburgh, UK) Adam Chlipala (Massachusetts Institute of Technology, USA) Evelyne Contejean (LRI, Université Paris-Sud, France) Germán Andrés Delbianco (IRIF, Université Paris Diderot, France) Dominique Devriese (Vrije Universiteit Brussel, Belgium) Richard A. Eisenberg (Bryn Mawr College, USA) Conal Elliott (Target, USA) Sebastian Erdweg (Delft University of Technology, Netherlands) Michael Greenberg (Pomona College, USA) Adrien Guatto (IRIF, Université Paris Diderot, France) Jennifer Hackett (University of Nottingham, UK) Troels Henriksen (University of Copenhagen, Denmark) Chung-Kil Hur (Seoul National University, Republic of Korea) Roberto Ierusalimschy (PUC-Rio, Brazil) Ranjit Jhala (University of California, San Diego, USA) Ralf Jung (MPI-SWS, Germany) Ohad Kammar (University of Oxford, UK) Oleg Kiselyov (Tohoku University, Japan) Hsiang-Shang ‘Josh’ Ko (National Institute of Informatics, Japan) Ondřej Lhoták (University of Waterloo, Canada) Dan Licata (Wesleyan University, USA) Geoffrey Mainland (Drexel University, USA) Simon Marlow (Facebook, UK) Akimasa Morihata (University of Tokyo, Japan) Shin-Cheng Mu (Academia Sinica, Taiwan) Guillaume Munch-Maccagnoni (Inria, France) Kim Nguyễn (University of Paris-Sud, France) Ulf Norell (Gothenburg University, Sweden) Atsushi Ohori (Tohoku University, Japan) Rex Page (University of Oklahoma, USA) Zoe Paraskevopoulou (Princeton University, USA) Nadia Polikarpova (University of California, San Diego, USA) Jonathan Protzenko (Microsoft Research, USA) Tiark Rompf (Purdue University, USA) Andreas Rossberg (Dfinity, Germany) KC Sivaramakrishnan (University of Cambridge, UI) Nicholas Smallbone (Chalmers University of Technology, Sweden) Matthieu Sozeau (Inria, France) Sandro Stucki (Chalmers | University of Gothenburg, Sweden) Don Syme (Microsoft, UK) Zachary Tatlock (University of Washington, USA) Sam Tobin-Hochstadt (Indiana University, USA) Takeshi Tsukada (University of Tokyo, Japan) Tarmo Uustalu (Reykjavik University, Iceland) Benoit Valiron (LRI, CentraleSupelec, Univ. Paris Saclay, France) Daniel Winograd-Cort (University of Pennsylvania, USA) Nicolas Wu (University of Bristol, UK) From olf at aatal-apotheke.de Wed Feb 13 18:18:34 2019 From: olf at aatal-apotheke.de (Olaf Klinke) Date: Wed, 13 Feb 2019 19:18:34 +0100 Subject: [Haskell-cafe] ANN:DBFunctor-0.1.1.0 - Functional Data Management / ETL Data Processing in Haskell Message-ID: <0F8827C1-D994-4719-A2FD-F620E3B7AAEA@aatal-apotheke.de> Apologies Nikos, apparently clicking on the sender in the mail archives replaces the address shown with "haskell-cafe at haskell.org", a behaviour I was unaware of. Olaf > Dear Nikos, > > (not CC'ing the list yet because I don't know whether my remarks miss the design goals of DBFunctor) > > As a data scientist I have some questions regarding the design of DBFunctor. > > 1. > Why is RTable, or rather RDataType a closed type? Was this forced by compatibility to other databases? There might be RTabular Types whose elements are hard to represent as RDataType, or the conversion deletes some of the data's semantics. What is the essence that makes the operations in the Julius language work? For example, the inner join could have the more general type > MonadPlus m => (a -> b -> Bool) -> m a -> m b -> m (a,b) > > 2. > Is there a way of saying that a column may not contain NULL values? > > 3. > What about the efficiency of the operations? I see no complexities stated in the documentation of Etl.Julius. > > 4. > I like the feature of named operations (:=>). But can we bind a sub-operation to a Haskell variable without leaving Julius? After all, takeNamedResult can lead to exceptions because the user may reference a name that has not been defined. With haskell variables, the compiler prevents this. Why not make the Julius language a monad, so that one can use do-notation for building the result? E.g. > > type JuliusExpr = JuliusLang RTable > instance Monad JuliusLang where ... > > Kind regards, > Olaf From icfp.publicity at googlemail.com Wed Feb 13 18:29:23 2019 From: icfp.publicity at googlemail.com (Sam Tobin-Hochstadt) Date: Wed, 13 Feb 2019 13:29:23 -0500 Subject: [Haskell-cafe] Call for Submissions: ICFP Student Research Competition Message-ID: <5c646203cd204_77d2b0585e545c410067f@hermes.mail> ICFP 2019 Student Research Competition Call for Submissions ICFP invites students to participate in the Student Research Competition in order to present their research and get feedback from prominent members of the programming language research community. Please submit your extended abstracts through the submission website. ### Important dates Submissions due: 14 Jun 2019 (Friday) https://icfp19src.hotcrp.com Notification: 28 Jun 2019 (Friday) Conference: 18 August (Sunday) - 23 August (Friday) Each submission (referred to as "abstract" below) should include the student author’s name and e-mail address; institutional affiliation; research advisor’s name; ACM student member number; category (undergraduate or graduate); research title; and an extended abstract addressing the following: * Problem and Motivation: Clearly state the problem being addressed and explain the reasons for seeking a solution to this problem. * Background and Related Work: Describe the specialized (but pertinent) background necessary to appreciate the work in the context of ICFP areas of interest. Include references to the literature where appropriate, and briefly explain where your work departs from that done by others. * Approach and Uniqueness: Describe your approach in addressing the problem and clearly state how your approach is novel. * Results and Contributions: Clearly show how the results of your work contribute to programming language design and implementation in particular and to computer science in general; explain the significance of those results. * Submissions must be original research that is not already published at ICFP or another conference or journal. One of the goals of the SRC is to give students feedback on ongoing, unpublished work. Furthermore, the abstract must be authored solely by the student. If the work is collaborative with others and*or part of a larger group project, the abstract should make clear what the student’s role was and should focus on that portion of the work. * Formatting: Submissions must be in PDF format, printable in black and white on US Letter sized paper, and interpretable by common PDF tools. All submissions must adhere to the "ACM Small" template that is available (in both LaTeX and Word formats) from https://www.acm.org/publications/authors/submissions. For authors using LaTeX, a lighter-weight package, including only the essential files, is available from http://sigplan.org/Resources/Author/#acmart-format. The submission must not exceed 3 pages in PDF format. Reference lists do not count towards the 3-page limit. Further information is available at the ICFP SRC website: https://icfp19.sigplan.org/track/icfp-2019-Student-Research-Competition ICFP Student Research Competition Chair: William J. Bowman (University of British Columbia) From nboldi at elte.hu Thu Feb 14 11:36:49 2019 From: nboldi at elte.hu (=?UTF-8?B?TsOpbWV0aCBCb2xkaXpzw6Fy?=) Date: Thu, 14 Feb 2019 12:36:49 +0100 Subject: [Haskell-cafe] Source code comprehension - Looking for ideas Message-ID: <88f9d65e-833c-c70e-c800-a74ac4c7b7b5@elte.hu> Dear Haskellers, I'm involved in extending the CodeCompass (https://github.com/Ericsson/CodeCompass) source code comprehension tool with a Haskell plugin. I'm looking for ideas on views or searches (both graphical and textual) that can help programmers to understand complex Haskell programs (using compile-time information). The basic examples that I will implement is finding the definition of a name and finding usages of a name. I'm also interested in similar tools or libraries if there is any. BR, Boldizsár From mikolaj at well-typed.com Thu Feb 14 13:14:49 2019 From: mikolaj at well-typed.com (Mikolaj Konarski) Date: Thu, 14 Feb 2019 14:14:49 +0100 Subject: [Haskell-cafe] Extension and parameterized classes In-Reply-To: References: Message-ID: Hi! > I am aware that the signature of fromBase states that for all 'b' of Base > an Extend of type 'a' must be able to be made. > Yet, in my case 'a' is a parameterized class 'BaseExpose x' and > since the type of Extend is provided (it is a constructor) > I think it is acceptable that 'BaseExpose b' is returned as type. I'm afraid I'm agreeing with the compiler here. When you instantiate this class class Base a => Extend a where fromBase :: Base b => b -> a so that `a` is `BaseExpose x`, then you need to implement fromBase :: Base b => b -> BaseExpose x and your fromBase' has a less general type fromBase' :: Base x => x -> BaseExpose x and that's it. It's the same issue as when you try to typecheck `id :: a -> b`. If it type-checked, you could write (pure) crashing type-correct code. I don't have enough data, but I guess you don't need `fromBase` at all. if `a` is `Base`, then it's also `Extend`, as long as you implement any extra operations. You don't need to coerce it to `Extend` with `fromBase`. BTW, as opposed to object oriented programmers, I think most of us doesn't use the class system for encapsulation, but the module system instead (with all its limitations). If the module system is not enough for you and you are ready for the bleeding edge, the Backpack may have what you need. Having said that, I think we usually err on the side of exposing too much, with all the simplicity and testing ease benefits it provides, rather than on the side of hiding too much. The user of a library is free to encapsulate more strongly in his import lists or by defining an interface module. Only the user knows his use case. From dsf at seereason.com Thu Feb 14 14:59:58 2019 From: dsf at seereason.com (David Fox) Date: Thu, 14 Feb 2019 06:59:58 -0800 Subject: [Haskell-cafe] Source code comprehension - Looking for ideas In-Reply-To: <88f9d65e-833c-c70e-c800-a74ac4c7b7b5@elte.hu> References: <88f9d65e-833c-c70e-c800-a74ac4c7b7b5@elte.hu> Message-ID: I would like to see what happens when you pull a symbol declaration out of a module into its own module, or add it into a different module. What other declarations would it have to pull along with it? What does the new import list look like? What happens to the import list of the old module? How do the import lists and code of the modules that use that symbol change? On Thu, Feb 14, 2019 at 3:37 AM Németh Boldizsár wrote: > Dear Haskellers, > > I'm involved in extending the CodeCompass > (https://github.com/Ericsson/CodeCompass) source code comprehension tool > with a Haskell plugin. I'm looking for ideas on views or searches (both > graphical and textual) that can help programmers to understand complex > Haskell programs (using compile-time information). > > The basic examples that I will implement is finding the definition of a > name and finding usages of a name. > > I'm also interested in similar tools or libraries if there is any. > > BR, > Boldizsár > > _______________________________________________ > 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 allbery.b at gmail.com Thu Feb 14 16:50:08 2019 From: allbery.b at gmail.com (Brandon Allbery) Date: Thu, 14 Feb 2019 11:50:08 -0500 Subject: [Haskell-cafe] Extension and parameterized classes In-Reply-To: References: Message-ID: Yes, and a large part of this being that hiding stuff tends to come back and bite you when you need the internals anyway at some point. This leads to .Internals modules and such in the end, sometimes retrofitted when the need is realized. On Thu, Feb 14, 2019 at 8:15 AM Mikolaj Konarski wrote: > Hi! > > > I am aware that the signature of fromBase states that for all 'b' of Base > > an Extend of type 'a' must be able to be made. > > Yet, in my case 'a' is a parameterized class 'BaseExpose x' and > > since the type of Extend is provided (it is a constructor) > > I think it is acceptable that 'BaseExpose b' is returned as type. > > I'm afraid I'm agreeing with the compiler here. When you instantiate this > class > > class Base a => Extend a where > fromBase :: Base b => b -> a > > so that `a` is `BaseExpose x`, then you need to implement > > fromBase :: Base b => b -> BaseExpose x > > and your fromBase' has a less general type > > fromBase' :: Base x => x -> BaseExpose x > > and that's it. It's the same issue as when you try > to typecheck `id :: a -> b`. If it type-checked, you could > write (pure) crashing type-correct code. > > I don't have enough data, but I guess you don't need `fromBase` > at all. if `a` is `Base`, then it's also `Extend`, as long as you > implement any extra operations. You don't need to coerce it > to `Extend` with `fromBase`. > > BTW, as opposed to object oriented programmers, > I think most of us doesn't use the class system > for encapsulation, but the module system instead > (with all its limitations). If the module system is not enough > for you and you are ready for the bleeding edge, > the Backpack may have what you need. Having said that, > I think we usually err on the side of exposing too much, > with all the simplicity and testing ease benefits it provides, > rather than on the side of hiding too much. The user of a library > is free to encapsulate more strongly in his import lists > or by defining an interface module. Only the user knows > his use case. > _______________________________________________ > 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 rae at cs.brynmawr.edu Thu Feb 14 18:24:43 2019 From: rae at cs.brynmawr.edu (Richard Eisenberg) Date: Thu, 14 Feb 2019 13:24:43 -0500 Subject: [Haskell-cafe] CFP: Haskell Symposium 2019 Message-ID: <5C0BED96-4AE1-4DAA-9733-2DE6EF2EF5D0@cs.brynmawr.edu> ================================================================================ ACM SIGPLAN CALL FOR SUBMISSIONS Haskell Symposium 2019 Berlin, Germany 22--23 August, 2019 http://www.haskell.org/haskell-symposium/2019/ ================================================================================ The ACM SIGPLAN Haskell Symposium 2019 will be co-located with the 2019 International Conference on Functional Programming (ICFP). **NEW THIS YEAR**: We will be using a lightweight double-blind reviewing process. See further information below. The Haskell Symposium presents original research on Haskell, discusses practical experience and future development of the language, and promotes other forms of declarative programming. Topics of interest include: * Language design, with a focus on possible extensions and modifications of Haskell as well as critical discussions of the status quo; * Theory, such as formal semantics of the present language or future extensions, type systems, effects, metatheory, and foundations for program analysis and transformation; * Implementations, including program analysis and transformation, static and dynamic compilation for sequential, parallel, and distributed architectures, memory management, as well as foreign function and component interfaces; * Libraries, that demonstrate new ideas or techniques for functional programming in Haskell; * Tools, such as profilers, tracers, debuggers, preprocessors, and testing tools; * Applications, to scientific and symbolic computing, databases, multimedia, telecommunication, the web, and so forth; * Functional Pearls, being elegant and instructive programming examples; * Experience Reports, to document general practice and experience in education, industry, or other contexts; * System Demonstrations, based on running software rather than novel research results. Regular papers should explain their research contributions in both general and technical terms, identifying what has been accomplished, explaining why it is significant, and relating it to previous work, and to other languages where appropriate. Experience reports and functional pearls need not necessarily report original academic research results. For example, they may instead report reusable programming idioms, elegant ways to approach a problem, or practical experience that will be useful to other users, implementers, or researchers. The key criterion for such a paper is that it makes a contribution from which other Haskellers can benefit. It is not enough simply to describe a standard solution to a standard programming problem, or report on experience where you used Haskell in the standard way and achieved the result you were expecting. System demonstrations should summarize the system capabilities that would be demonstrated. The proposals will be judged on whether the ensuing session is likely to be important and interesting to the Haskell community at large, whether on grounds academic or industrial, theoretical or practical, technical, social or artistic. Please contact the program chair with any questions about the relevance of a proposal. Submission Details ================== Early and Regular Track ----------------------- The Haskell Symposium uses a two-track submission process so that some papers can gain early feedback. Strong papers submitted to the early track are accepted outright, and the others will be given their reviews and invited to resubmit to the regular track. Papers accepted via the early and regular tracks are considered of equal value and will not be distinguished in the proceedings. Although all papers may be submitted to the early track, authors of functional pearls and experience reports are particularly encouraged to use this mechanism. The success of these papers depends heavily on the way they are presented, and submitting early will give the program committee a chance to provide feedback and help draw out the key ideas. Formatting ---------- Submitted papers should be in portable document format (PDF), formatted using the ACM SIGPLAN style guidelines. Authors should use the `acmart` format, with the `sigplan` sub-format for ACM proceedings. For details, see: http://www.sigplan.org/Resources/Author/#acmart-format It is recommended to use the `review` option when submitting a paper; this option enables line numbers for easy reference in reviews. Functional pearls, experience reports, and demo proposals should be labelled clearly as such. Lightweight Double-blind Reviewing ---------------------------------- Haskell Symposium 2019 will use a lightweight double-blind reviewing process. To facilitate this, submitted papers must adhere to two rules: 1. Author names and institutions must be omitted, and 2. References to authors’ own related work should be in the third person (e.g., not “We build on our previous work …” but rather “We build on the work of …”). The purpose of this process is to help the reviewers come to an initial judgment about the paper without bias, not to make it impossible for them to discover the authors if they were to try. Nothing should be done in the name of anonymity that weakens the submission or makes the job of reviewing the paper more difficult (e.g., important background references should not be omitted or anonymized). In addition, authors should feel free to disseminate their ideas or draft versions of their paper as they normally would. For instance, authors may post drafts of their papers on the web or give talks on their research ideas. A reviewer will learn the identity of the author(s) of a paper after a review is submitted. Page Limits ----------- The length of submissions should not exceed the following limits: Regular paper: 12 pages Functional pearl: 12 pages Experience report: 6 pages Demo proposal: 2 pages There is no requirement that all pages are used. For example, a functional pearl may be much shorter than 12 pages. In all cases, the list of references is not counted against these page limits. Deadlines --------- Early track: Submission deadline: 15 March 2019 (Fri) Notification: 19 April 2019 (Fri) Regular track and demos: Submission deadline: 10 May 2019 (Fri) Notification: 21 June 2019 (Fri) Camera-ready deadline for accepted papers: 30 June 2019 (Thu) Deadlines are valid anywhere on Earth. Submission ---------- Submissions must adhere to SIGPLAN's republication policy (http://sigplan.org/Resources/Policies/Republication/), and authors should be aware of ACM's policies on plagiarism (https://www.acm.org/publications/policies/plagiarism). The paper submission deadline and length limitations are firm. There will be no extensions, and papers violating the length limitations will be summarily rejected. Papers should be submitted through HotCRP at: https://haskell19.hotcrp.com/ Improved versions of a paper may be submitted at any point before the submission deadline using the same web interface. Supplementary material: Authors have the option to attach supplementary material to a submission, on the understanding that reviewers may choose not to look at it. This supplementary material should not be submitted as part of the main document; instead, it should be uploaded as a separate PDF document or tarball. Supplementary material should be uploaded at submission time, not by providing a URL in the paper that points to an external repository. Authors are free to upload both anonymized and non-anonymized supplementary material. Anonymized supplementary material will be visible to reviewers immediately; non-anonymized supplementary material will be revealed to reviewers only after they have submitted their review of the paper and learned the identity of the author(s). Resubmitted Papers: Authors who submit a revised version of a paper that has previously been rejected by another conference have the option to attach an annotated copy of the reviews of their previous submission(s), explaining how they have addressed these previous reviews in the present submission. If a reviewer identifies him/herself as a reviewer of this previous submission and wishes to see how his/her comments have been addressed, the principal editor will communicate to this reviewer the annotated copy of his/her previous review. Otherwise, no reviewer will read the annotated copies of the previous reviews. Travel Support ============== Student attendees with accepted papers can apply for a SIGPLAN PAC grant to help cover travel expenses. PAC also offers other support, such as for child-care expenses during the meeting or for travel costs for companions of SIGPLAN members with physical disabilities, as well as for travel from locations outside of North America and Europe. For details on the PAC program, see its web page (http://pac.sigplan.org). Proceedings =========== Accepted papers will be included in the ACM Digital Library. Authors must grant ACM publication rights upon acceptance (http://authors.acm.org/main.html). Authors are encouraged to publish auxiliary material with their paper (source code, test data, etc.); they retain copyright of auxiliary material. Accepted proposals for system demonstrations will be posted on the symposium website but not formally published in the proceedings. All accepted papers and proposals will be posted on the conference website one week before the meeting. Publication date: The official publication date of accepted papers is the date the proceedings are made available in the ACM Digital Library. This date may be up to two weeks prior to the first day of the conference. The official publication date affects the deadline for any patent filings related to published work. Program Committee ================= Ki-Yung Ahn Hannam University Christiaan Baaij QBayLogic B.V. José Manuel Calderón Trilla Galois, Inc Benjamin Delaware Purdue University Richard Eisenberg (chair) Bryn Mawr College Jennifer Hackett University of Nottingham Kazutaka Matsuda Tohoku University Trevor McDonnell Utrecht University Ivan Perez NIA / NASA Formal Methods Nadia Polikarpova University of California, San Diego Norman Ramsey Tufts University Christine Rizkallah University of New South Wales Eric Seidel Bloomberg LP Alejandro Serrano Mena Utrecht University John Wiegley Dfinity Foundation Thomas Winant Well-Typed LLP Ningning Xie University of Hong Kong If you have questions, please contact the chair at: rae at cs.brynmawr.edu ================================================================================ From klebinger.andreas at gmx.at Fri Feb 15 13:46:30 2019 From: klebinger.andreas at gmx.at (Andreas Klebinger) Date: Fri, 15 Feb 2019 14:46:30 +0100 Subject: [Haskell-cafe] Updating the dom-lt package Message-ID: <5C66C2B6.4070200@gmx.at> I would like to have a updated version of dom-lt ( http://hackage.haskell.org/package/dom-lt ) on hackage. Matt Morrow uploaded the last version in 2009 and it has since become incompatible with current container versions. I'm posting here to make it known that I plan to take over the package to upload an update if I fail to reach him and he doesn't respond. (Which seems likely since the the domain is expired). Cheers Andreas Klebinger From theindigamer15 at gmail.com Sat Feb 16 00:34:04 2019 From: theindigamer15 at gmail.com (theindigamer) Date: Fri, 15 Feb 2019 19:34:04 -0500 Subject: [Haskell-cafe] Does bytestring need help with maintenance? Message-ID: I noticed that there are bunch of issues and PRs, which have been open for a while without a response. I understand that the maintainers might not have the time to work on review/patches, is there a way in which I can help out? [Not sure if this is on-topic or if I should've posted it to the Libraries list.] -------------- next part -------------- An HTML attachment was scrubbed... URL: From winterland1989 at gmail.com Sat Feb 16 12:23:26 2019 From: winterland1989 at gmail.com (=?UTF-8?B?5a+S5Lic?=) Date: Sat, 16 Feb 2019 20:23:26 +0800 Subject: [Haskell-cafe] [ANN] stdio-0.1.0.0 - A simple and high performance IO toolkit for Haskell Message-ID: Dear Haskellers! We're pleased to announce the first public version of stdio, a simple and high performance IO toolkit for Haskell. This package provides a simple and high performance IO toolkit for Haskell, including packed vectors, unicode texts, socket, file system, timers and more! The Hackage link is http://hackage.haskell.org/package/stdio-0.1.0.0. This project started as an experiment of combining libuv with GHC runtime, the result is recorded in our Haskell 2018 paper A High-Performance Multicore IO Manager Based on libuv (Experience Report) , which is pretty good comparing to the old IO manager in base. The IO manager part is stable and fast now. The package also provides new vector and new text type based on ByteArray# primitive, which is not limited to pinned memory. As GHC 8.6 release have added unaligned access primitives to ByteArray#, We think it's a good to release our work. The new vector and text (internal using UTF-8 encoding)'s performance is comparative to bytestring and text ones, and we strive to provide the similiar API. Some unicode processing such as normalization and casefolding is also provide, based on a C unicode library utf8rewind . To make our package more useful, we rebuild Builder and Parser type from groud, add TCP socket and filesystem support, so that user can start using it to do some simple task, such as parsing a CSV file or starting a TCP server and communicate in protocols. We also provide high performance timer and logger module, which is useful in practical engineering tasks. For installation guide and examples, please see the project's README. As we (I and Tao He) both are not native english speakers, the document quality is not as satisfying as it can be, please help! If you meet issues with installing, bugs, questions, please fill an issue on github: https://github.com/haskell-stdio/stdio. Happy hacking as always! Dong Han, Tao He Feb 16. 2019 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jo at durchholz.org Sat Feb 16 14:30:17 2019 From: jo at durchholz.org (Joachim Durchholz) Date: Sat, 16 Feb 2019 15:30:17 +0100 Subject: [Haskell-cafe] [ANN] stdio-0.1.0.0 - A simple and high performance IO toolkit for Haskell In-Reply-To: References: Message-ID: Am 16.02.19 um 13:23 schrieb 寒东: > Some unicode processing such as normalization and casefolding is also provide, based on a C unicode libraryutf8rewind . FWIW the rest looks fine, but committing to a specific UTF-8 implementation is risky. Unicode is a large and complicated standard, and constantly evolving; I am sceptical that a one-man library like utf8rewind can keep up with that, and I'd wrap a mature Unicode library (such as ICU) rather than place my bet on a one-man show like utf8rewind. In particular, I'd avoid utf8rewind because the author believes that deviating from a standard improves security. (See his comment in https://bitbucket.org/knight666/utf8rewind/issues/8/length-function-should-not-use-strlen .) I do not think that's a well-considered policy, and certainly does not make me think that his code is well-audited. Including such a thing in such a basic library as stdio seems unwise to me. > To make our package more useful, we rebuild Builder and Parser type from groud, add TCP socket and filesystem support, so that user can start using it to do some simple task, such as parsing a CSV file or starting a TCP server and communicate in protocols. We also provide high performance timer and logger module, which is useful in practical engineering tasks. You should split the library, into stuff that does fast byte shoving, and into stuff that does fast byte processing. That way, things can start to improve and evolve independently. > For installation guide and examples, please see the project's README. As we (I and Tao He) both are not native english speakers, the document quality is not as satisfying as it can be, please help! Judging from this message, your English seems pretty good actually :-) Regards, Jo From allbery.b at gmail.com Sat Feb 16 16:36:37 2019 From: allbery.b at gmail.com (Brandon Allbery) Date: Sat, 16 Feb 2019 11:36:37 -0500 Subject: [Haskell-cafe] [ANN] stdio-0.1.0.0 - A simple and high performance IO toolkit for Haskell In-Reply-To: References: Message-ID: I'd like to point out that using unpinned memory for your ByteString alternative means you aren't providing the same API: as most string-using foreign functions expect something more like a bytestring than a Haskell string or text type, ByteString is pinned specifically to support that use case directly and many users of ByteString expect that support. This will include the ByteString variants of various functions in the "posix" package, which are thereby providing "raw" versions of system calls, ensuring the Haskell program can get exactly what the OS provides (POSIX interfaces don't use Unicode, thus various Unicode encodings can be unable to provide the exact OS level representation of e.g. file names). On Sat, Feb 16, 2019 at 9:30 AM Joachim Durchholz wrote: > Am 16.02.19 um 13:23 schrieb 寒东: > > Some unicode processing such as normalization and casefolding is also > provide, based on a C unicode libraryutf8rewind < > https://bitbucket.org/knight666/utf8rewind>. > > FWIW the rest looks fine, but committing to a specific UTF-8 > implementation is risky. Unicode is a large and complicated standard, > and constantly evolving; I am sceptical that a one-man library like > utf8rewind can keep up with that, and I'd wrap a mature Unicode library > (such as ICU) rather than place my bet on a one-man show like utf8rewind. > > In particular, I'd avoid utf8rewind because the author believes that > deviating from a standard improves security. > (See his comment in > > https://bitbucket.org/knight666/utf8rewind/issues/8/length-function-should-not-use-strlen > .) > I do not think that's a well-considered policy, and certainly does not > make me think that his code is well-audited. Including such a thing in > such a basic library as stdio seems unwise to me. > > > To make our package more useful, we rebuild Builder and Parser type from > groud, add TCP socket and filesystem support, so that user can start using > it to do some simple task, such as parsing a CSV file or starting a TCP > server and communicate in protocols. We also provide high performance timer > and logger module, which is useful in practical engineering tasks. > > You should split the library, into stuff that does fast byte shoving, > and into stuff that does fast byte processing. > That way, things can start to improve and evolve independently. > > > For installation guide and examples, please see the project's README. As > we (I and Tao He) both are not native english speakers, the document > quality is not as satisfying as it can be, please help! > > Judging from this message, your English seems pretty good actually :-) > > Regards, > Jo > _______________________________________________ > 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 winterland1989 at gmail.com Sun Feb 17 02:53:33 2019 From: winterland1989 at gmail.com (Dong Han) Date: Sun, 17 Feb 2019 10:53:33 +0800 Subject: [Haskell-cafe] Fwd: [ANN] stdio-0.1.0.0 - A simple and high performance IO toolkit for Haskell In-Reply-To: References: Message-ID: > In particular, I'd avoid utf8rewind because the author believes that deviating from a standard improves security. The length function is indeed problematic, so we roll our own, but the rest part of utf8rewind comply with Unicode 8.0 AFAICT, the code quality seems good too, but like you said, we're not going to commit to a specific UTF-8 implementation. As for now un8rewind seems a pretty good choice. > You should split the library, into stuff that does fast byte shoving, and into stuff that does fast byte processing. That way, things can start to improve and evolve independently. I just haven't got that much energy to do that, if we got lots of users some day, and people think spliting is better, then we can do that of course ; ) Cheers Dong On Sat, Feb 16, 2019 at 10:30 PM Joachim Durchholz wrote: > Am 16.02.19 um 13:23 schrieb 寒东: > > Some unicode processing such as normalization and casefolding is also > provide, based on a C unicode libraryutf8rewind < > https://bitbucket.org/knight666/utf8rewind>. > > FWIW the rest looks fine, but committing to a specific UTF-8 > implementation is risky. Unicode is a large and complicated standard, > and constantly evolving; I am sceptical that a one-man library like > utf8rewind can keep up with that, and I'd wrap a mature Unicode library > (such as ICU) rather than place my bet on a one-man show like utf8rewind. > > In particular, I'd avoid utf8rewind because the author believes that > deviating from a standard improves security. > (See his comment in > > https://bitbucket.org/knight666/utf8rewind/issues/8/length-function-should-not-use-strlen > .) > I do not think that's a well-considered policy, and certainly does not > make me think that his code is well-audited. Including such a thing in > such a basic library as stdio seems unwise to me. > > > To make our package more useful, we rebuild Builder and Parser type from > groud, add TCP socket and filesystem support, so that user can start using > it to do some simple task, such as parsing a CSV file or starting a TCP > server and communicate in protocols. We also provide high performance timer > and logger module, which is useful in practical engineering tasks. > > You should split the library, into stuff that does fast byte shoving, > and into stuff that does fast byte processing. > That way, things can start to improve and evolve independently. > > > For installation guide and examples, please see the project's README. As > we (I and Tao He) both are not native english speakers, the document > quality is not as satisfying as it can be, please help! > > Judging from this message, your English seems pretty good actually :-) > > Regards, > Jo > _______________________________________________ > 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 winterland1989 at gmail.com Sun Feb 17 02:58:14 2019 From: winterland1989 at gmail.com (Dong Han) Date: Sun, 17 Feb 2019 10:58:14 +0800 Subject: [Haskell-cafe] [ANN] stdio-0.1.0.0 - A simple and high performance IO toolkit for Haskell In-Reply-To: References: Message-ID: > I'd like to point out that using unpinned memory for your ByteString alternative means you aren't providing the same API: as most string-using foreign functions expect something more like a bytestring than a Haskell string or text type, ByteString is pinned specifically to support that use case directly and many users of ByteString expect that support. This will include the ByteString variants of various functions in the "posix" package, which are thereby providing "raw" versions of system calls, ensuring the Haskell program can get exactly what the OS provides (POSIX interfaces don't use Unicode, thus various Unicode encodings can be unable to provide the exact OS level representation of e.g. file names). We build a specific CByte module to do that job: A a wrapper for immutable null-terminated string, either a literal Addr#, or a pinned heap ByteArray# . It's not intended to be using any encoding, we just use UTF-8 assumptions in literals and displaying. All file paths in stdio use CBytes instead of Bytes (alias to PrimVector Word8). Cheers~ Dong On Sun, Feb 17, 2019 at 12:37 AM Brandon Allbery wrote: > I'd like to point out that using unpinned memory for your ByteString > alternative means you aren't providing the same API: as most string-using > foreign functions expect something more like a bytestring than a Haskell > string or text type, ByteString is pinned specifically to support that use > case directly and many users of ByteString expect that support. This will > include the ByteString variants of various functions in the "posix" > package, which are thereby providing "raw" versions of system calls, > ensuring the Haskell program can get exactly what the OS provides (POSIX > interfaces don't use Unicode, thus various Unicode encodings can be unable > to provide the exact OS level representation of e.g. file names). > > On Sat, Feb 16, 2019 at 9:30 AM Joachim Durchholz > wrote: > >> Am 16.02.19 um 13:23 schrieb 寒东: >> > Some unicode processing such as normalization and casefolding is also >> provide, based on a C unicode libraryutf8rewind < >> https://bitbucket.org/knight666/utf8rewind>. >> >> FWIW the rest looks fine, but committing to a specific UTF-8 >> implementation is risky. Unicode is a large and complicated standard, >> and constantly evolving; I am sceptical that a one-man library like >> utf8rewind can keep up with that, and I'd wrap a mature Unicode library >> (such as ICU) rather than place my bet on a one-man show like utf8rewind. >> >> In particular, I'd avoid utf8rewind because the author believes that >> deviating from a standard improves security. >> (See his comment in >> >> https://bitbucket.org/knight666/utf8rewind/issues/8/length-function-should-not-use-strlen >> .) >> I do not think that's a well-considered policy, and certainly does not >> make me think that his code is well-audited. Including such a thing in >> such a basic library as stdio seems unwise to me. >> >> > To make our package more useful, we rebuild Builder and Parser type >> from groud, add TCP socket and filesystem support, so that user can start >> using it to do some simple task, such as parsing a CSV file or starting a >> TCP server and communicate in protocols. We also provide high performance >> timer and logger module, which is useful in practical engineering tasks. >> >> You should split the library, into stuff that does fast byte shoving, >> and into stuff that does fast byte processing. >> That way, things can start to improve and evolve independently. >> >> > For installation guide and examples, please see the project's README. >> As we (I and Tao He) both are not native english speakers, the document >> quality is not as satisfying as it can be, please help! >> >> Judging from this message, your English seems pretty good actually :-) >> >> Regards, >> Jo >> _______________________________________________ >> 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 > _______________________________________________ > 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 mightybyte at gmail.com Sun Feb 17 15:07:29 2019 From: mightybyte at gmail.com (MightyByte) Date: Sun, 17 Feb 2019 15:07:29 +0000 Subject: [Haskell-cafe] Call For Presentations: Compose NYC, June 24-25, 2019 Message-ID: Compose is a conference focused specifically on strongly typed functional programming languages. It will be held in New York on Monday and Tuesday, June 24 -25, 2019. Registration will be open shortly. http://www.composeconference.org/201 ( http://www.composeconference.org/2017 ) 9 To get a sense of Compose, you can check out the great talks from past conferences: https://www.youtube.com/channel/UC0pEknZxL7Q1j0Ok8qImWdQ ( https://www.youtube.com/channel/UC0pEknZxL7Q1j0Ok8qImWdQ ) Below is our call for presentations. http://www.composeconference.org/2019/cfp/ ( http://www.composeconference.org/2016/cfp/ ) In past years, we have also hosted an unconference over the weekend adjacent to the conference.  The unconference details this year have not been finalized yet, but if you’re interested you may want to keep that in mind when making travel plans. *** Compose Conference NYC 2019 Call for Presentations June 24 -25, 2019 New York City The audience for Compose is people using Haskell, PureScript, OCaml, F#, SML, and other strongly typed functional programming languages who are looking to increase their skills or learn new technologies and libraries. Presentations should be aimed at teaching or introducing new ideas or tools. We are also interested in presentations aiming at taking complex concepts, such as program derivation, and putting them into productive use. However presentations on anything that you suspect our audience may find interesting are welcome. The following are some of the types of talks we would welcome: *Library/Tool Talks* — Exploring the uses of a powerful toolkit or library, be it for parsing, testing, data access and analysis, or anything else. *Production Systems* — Experience reports on deploying functional techniques in real systems; insights revealed, mistakes made, lessons learned. *Theory made Practical* — Just because it’s locked away in papers doesn’t mean it’s hard! Accessible lectures on classic results and why they matter to us today. Such talks can include simply introducing the principles of a field of research so as to help the audience read up on it in the future; from abstract machines to program derivation to branch-and-bound algorithms, the sky’s the limit. Check out the Compose YouTube channel ( https://www.youtube.com/playlist?list=PLNoHgLVTxtaoolkQo4hLy4ZsA1prUJ51m ) to see videos of talks we've had previously and get an idea of the kinds of topics we usually feature. We also welcome presentations for more formal tutorials. Tutorials should be aimed at a smaller audience of beginner-to-novice understanding, and ideally include hands-on exercises. The due date for submissions is *April 23, 2019*. We will send out notice of acceptance by *April 30th*. We prefer that submissions be via the EasyChair website ( https://easychair.org/conferences/?conf=compose2019 ( https://easychair.org/conferences/?conf=compose2019 ) ). Please suggest a title, and describe the topic you intend to speak on. Talks can be either 30 or 45 minutes, please indicate how much time you would prefer to take. You may submit multiple talks if you have several ideas and are unsure which would be the most likely to be accepted. Accepted talks will be asked to submit slides for review prior to the conference. Feel free to include any additional information on both your expertise and interesting elements of your topic that would be appropriate for inclusion in the public abstract. Furthermore, if your abstract doesn't feel "final"—don't worry! We'll work with you to polish it up. If you want to discuss your presentation(s) before submitting, or to further nail down what you intend to speak on, please feel free to contact us at nyc at composeconference.org ( nyc at composeconference.org ). We're happy to work with you, even if you are a new or inexperienced speaker, to help your talk be great. Diversity We would like to put an emphasis on soliciting a diverse set of speakers - anything you can do to distribute information about this CFP and encourage submissions from under-represented groups would be greatly appreciated. We welcome your contributions and encourage you to apply! Best, Doug Sent via Superhuman ( https://sprh.mn/?vip=mightybyte at gmail.com ) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gale at sefer.org Sun Feb 17 19:40:57 2019 From: gale at sefer.org (Yitzchak Gale) Date: Sun, 17 Feb 2019 21:40:57 +0200 Subject: [Haskell-cafe] Updating the dom-lt package In-Reply-To: <5C66C2B6.4070200@gmx.at> References: <5C66C2B6.4070200@gmx.at> Message-ID: Matt did a lot of really nice stuff, and then suddenly disappeared from the community without a trace, years ago. I don't think anyone knows to this day what really happened. It would be great if you could pick up some of his work that is still unmaintained. On Fri, Feb 15, 2019 at 3:47 PM Andreas Klebinger wrote: > > I would like to have a updated version of dom-lt ( > http://hackage.haskell.org/package/dom-lt ) on hackage. > > Matt Morrow uploaded the last version in 2009 and it has since become > incompatible > with current container versions. > > I'm posting here to make it known that I plan to take over the package > to upload an update if I fail to reach him and he doesn't respond. > (Which seems likely since the the domain is expired). > > Cheers > Andreas Klebinger > _______________________________________________ > 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 ruben.astud at gmail.com Mon Feb 18 00:05:12 2019 From: ruben.astud at gmail.com (Ruben Astudillo) Date: Sun, 17 Feb 2019 21:05:12 -0300 Subject: [Haskell-cafe] Add newtype for Alternative using QuantifiedConstraints in base-4.13 In-Reply-To: References: Message-ID: I wonder if it is useful at all. If `f a` already has a Monoid instance, you can use `(<>)` already instead of (<|>) with pretty much the same laws. Plus you don't have to import `(<>)` as it comes from the Prelude where `(<|>)` doesn't. Does this have an use case or is just for aesthetic completeness? -- -- Ruben -- pgp: 4EE9 28F7 932E F4AD -------------- next part -------------- A non-text attachment was scrubbed... Name: 0x4EE928F7932EF4AD.asc Type: application/pgp-keys Size: 13937 bytes Desc: not available URL: From hilco.wijbenga at gmail.com Mon Feb 18 05:20:21 2019 From: hilco.wijbenga at gmail.com (Hilco Wijbenga) Date: Sun, 17 Feb 2019 21:20:21 -0800 Subject: [Haskell-cafe] Need help understanding a GADT related error Message-ID: Hi all, I created some GADT code (see https://pastebin.com/vkJ3RzNA and below). When compiling this I get these errors: $ stack build parser-0.1.0.0: build (exe) Preprocessing executable 'parser' for parser-0.1.0.0.. Building executable 'parser' for parser-0.1.0.0.. [2 of 2] Compiling Main ( src/Main.hs, .stack-work/dist/x86_64-linux-tinfo6/Cabal-2.2.0.1/build/parser/parser-tmp/Main.o ) /home/hilco/workspaces/haskell/parser/src/Main.hs:30:18: error: • Couldn't match type ‘a’ with ‘E’ ‘a’ is a rigid type variable bound by the type signature for: h :: forall a. H (T a) at src/Main.hs:29:1-12 Expected type: T a Actual type: T E • In the expression: E' (E "E") In the expression: (E' (E "E"), []) In an equation for ‘h’: h [] = (E' (E "E"), []) • Relevant bindings include h :: H (T a) (bound at src/Main.hs:30:1) | 30 | h [] = (E' (E "E"), []) | ^^^^^^^^^^ /home/hilco/workspaces/haskell/parser/src/Main.hs:34:16: error: • Couldn't match type ‘B’ with ‘A’ Expected type: P Char (T A) Actual type: P Char (T B) • In the expression: b In the second argument of ‘tt’, namely ‘[a, b]’ In the expression: tt h [a, b] | 34 | tt' = tt h [a, b] | ^ -- While building custom Setup.hs for package parser-0.1.0.0 using: /home/hilco/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-2.2.0.1 build exe:parser --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always" Process exited with code: ExitFailure 1 Why is "T a" not a more generic version of "T E"? Why doesn't "T E + T A + TB" yield "T a" as a generic type? Cheers, Hilco 1 {-# LANGUAGE GADTs #-} 2 3 module Main where 4 5 data PR t a = PR (Maybe ([t], a)) 6 data P t a = P ([t] -> PR t a) 7 8 a :: P Char (T A) 9 a = undefined 10 11 b :: P Char (T B) 12 b = undefined 13 14 data A = A 15 data B = B 16 data E = E String 17 18 data T a where 19 A' :: T A 20 B' :: T B 21 E' :: E -> T E 22 23 type H t = [Char] -> (t, [Char]) 24 type TT t = [Char] -> [t] 25 26 tt :: H t -> [P Char t] -> TT t 27 tt = undefined 28 29 h :: H (T a) 30 h [] = (E' (E "E"), []) 31 h (head:rest) = (E' (E ("E")), rest) 32 33 tt' :: [Char] -> [T a] 34 tt' = tt h [a, b] 35 36 main :: IO () 37 main = putStrLn "Hello" From allbery.b at gmail.com Mon Feb 18 14:54:41 2019 From: allbery.b at gmail.com (Brandon Allbery) Date: Mon, 18 Feb 2019 09:54:41 -0500 Subject: [Haskell-cafe] Need help understanding a GADT related error In-Reply-To: References: Message-ID: This doesn't look like GADT related, just a common misunderstanding of how types work. "h :: H (T a)" means the *caller* determines what type 'a will be, and "h" will work with that type. But "h" is instead using its own specific 'a. On Mon, Feb 18, 2019 at 12:22 AM Hilco Wijbenga wrote: > Hi all, > > I created some GADT code (see https://pastebin.com/vkJ3RzNA and > below). When compiling this I get these errors: > > $ stack build > parser-0.1.0.0: build (exe) > Preprocessing executable 'parser' for parser-0.1.0.0.. > Building executable 'parser' for parser-0.1.0.0.. > [2 of 2] Compiling Main ( src/Main.hs, > > .stack-work/dist/x86_64-linux-tinfo6/Cabal-2.2.0.1/build/parser/parser-tmp/Main.o > ) > > /home/hilco/workspaces/haskell/parser/src/Main.hs:30:18: error: > • Couldn't match type ‘a’ with ‘E’ > ‘a’ is a rigid type variable bound by > the type signature for: > h :: forall a. H (T a) > at src/Main.hs:29:1-12 > Expected type: T a > Actual type: T E > • In the expression: E' (E "E") > In the expression: (E' (E "E"), []) > In an equation for ‘h’: h [] = (E' (E "E"), []) > • Relevant bindings include > h :: H (T a) (bound at src/Main.hs:30:1) > | > 30 | h [] = (E' (E "E"), []) > | ^^^^^^^^^^ > > /home/hilco/workspaces/haskell/parser/src/Main.hs:34:16: error: > • Couldn't match type ‘B’ with ‘A’ > Expected type: P Char (T A) > Actual type: P Char (T B) > • In the expression: b > In the second argument of ‘tt’, namely ‘[a, b]’ > In the expression: tt h [a, b] > | > 34 | tt' = tt h [a, b] > | ^ > > -- While building custom Setup.hs for package parser-0.1.0.0 using: > > /home/hilco/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 > --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-2.2.0.1 build > exe:parser --ghc-options " -ddump-hi -ddump-to-file > -fdiagnostics-color=always" > Process exited with code: ExitFailure 1 > > Why is "T a" not a more generic version of "T E"? Why doesn't "T E + T > A + TB" yield "T a" as a generic type? > > Cheers, > Hilco > > 1 {-# LANGUAGE GADTs #-} > 2 > 3 module Main where > 4 > 5 data PR t a = PR (Maybe ([t], a)) > 6 data P t a = P ([t] -> PR t a) > 7 > 8 a :: P Char (T A) > 9 a = undefined > 10 > 11 b :: P Char (T B) > 12 b = undefined > 13 > 14 data A = A > 15 data B = B > 16 data E = E String > 17 > 18 data T a where > 19 A' :: T A > 20 B' :: T B > 21 E' :: E -> T E > 22 > 23 type H t = [Char] -> (t, [Char]) > 24 type TT t = [Char] -> [t] > 25 > 26 tt :: H t -> [P Char t] -> TT t > 27 tt = undefined > 28 > 29 h :: H (T a) > 30 h [] = (E' (E "E"), []) > 31 h (head:rest) = (E' (E ("E")), rest) > 32 > 33 tt' :: [Char] -> [T a] > 34 tt' = tt h [a, b] > 35 > 36 main :: IO () > 37 main = putStrLn "Hello" > _______________________________________________ > 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 capn.freako at gmail.com Mon Feb 18 15:53:20 2019 From: capn.freako at gmail.com (David Banas) Date: Mon, 18 Feb 2019 07:53:20 -0800 Subject: [Haskell-cafe] Need help understanding a GADT related error In-Reply-To: References: Message-ID: <2046D7D9-059E-48A2-A0F7-09ED66DEC357@gmail.com> Hilco, Your first error arrises, because you’re offering to the caller of `h` that she may demand any type of `a`, but are “hard-wiring” `a :: T E` in the definition of that function. Reflecting that fact in the function type signature eliminates the error: -- h :: H (T a) h :: H (T E) h [] = (E' (E "E"), []) h (head:rest) = (E' (E ("E")), rest) Your second error is explained (I hope) in the comments I’ve added to your original code: tt' :: [Char] -> [T a] tt' = tt h [a, b] -- tt :: H t -> [P Char t] -> TT t -- :: ([Char] -> (t, [Char])) -> [P Char t] -> [Char] -> [t] -- -- h :: [Char] -> (t, [Char]) ~ H (T E) -- h :: [Char] -> (t, [Char]) ~ [Char] -> (T E, [Char]) -- ==> t ~ T E -- -- [a, b] :: [P Char t] -- a :: P Char (T E) /~ P Char (T A) -- b :: P Char (T E) /~ P Char (T B) -db From sven.bartscher at weltraumschlangen.de Mon Feb 18 13:35:47 2019 From: sven.bartscher at weltraumschlangen.de (Sven Bartscher) Date: Mon, 18 Feb 2019 14:35:47 +0100 Subject: [Haskell-cafe] Need help understanding a GADT related error In-Reply-To: References: Message-ID: Hi Hilco, Am 18.02.19 um 06:20 schrieb Hilco Wijbenga: > Hi all, > > I created some GADT code (see https://pastebin.com/vkJ3RzNA and > below). When compiling this I get these errors: > > $ stack build > parser-0.1.0.0: build (exe) > Preprocessing executable 'parser' for parser-0.1.0.0.. > Building executable 'parser' for parser-0.1.0.0.. > [2 of 2] Compiling Main ( src/Main.hs, > .stack-work/dist/x86_64-linux-tinfo6/Cabal-2.2.0.1/build/parser/parser-tmp/Main.o > ) > > /home/hilco/workspaces/haskell/parser/src/Main.hs:30:18: error: > • Couldn't match type ‘a’ with ‘E’ > ‘a’ is a rigid type variable bound by > the type signature for: > h :: forall a. H (T a) > at src/Main.hs:29:1-12 > Expected type: T a > Actual type: T E > • In the expression: E' (E "E") > In the expression: (E' (E "E"), []) > In an equation for ‘h’: h [] = (E' (E "E"), []) > • Relevant bindings include > h :: H (T a) (bound at src/Main.hs:30:1) > | > 30 | h [] = (E' (E "E"), []) > | ^^^^^^^^^^ > > /home/hilco/workspaces/haskell/parser/src/Main.hs:34:16: error: > • Couldn't match type ‘B’ with ‘A’ > Expected type: P Char (T A) > Actual type: P Char (T B) > • In the expression: b > In the second argument of ‘tt’, namely ‘[a, b]’ > In the expression: tt h [a, b] > | > 34 | tt' = tt h [a, b] > | ^ > > -- While building custom Setup.hs for package parser-0.1.0.0 using: > /home/hilco/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 > --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-2.2.0.1 build > exe:parser --ghc-options " -ddump-hi -ddump-to-file > -fdiagnostics-color=always" > Process exited with code: ExitFailure 1 > > Why is "T a" not a more generic version of "T E"? Why doesn't "T E + T > A + TB" yield "T a" as a generic type? I'm pretty sure I'm using the wrong terminology for this, but I would describe this as a problem of the “direction” of the generality. When you give `h` a type of `[Char] -> (T a, [Char])`, you say that the caller of `h` gets to decide for what type `a` will be. In your implementation the value returned by `h` always has the type `(T E, [Char])`, but your type promises that it is also able to be `(T Char, [Char])`, `(T Int, [Char])` or whatever the caller wants the returned value to be. The actually returned value of type `(T E, [Char])` is thus too special to fulfil the general promise of `(T a, [Char])`. Your second error is similar in concept, but has the added complexity, that you try to put two values of different types (`a :: P Char (T A)` and `b :: P Char (T B)`) into a list. When you put values together into a list of type `[e]`, then that `e` is instantiated to be exactly *one* type and all values in the list have to have exactly that type. When the user of a value of type `a` gets to decide what concrete type that value will have, the type variable `a` is called “universally quantified”. When, as in your case, the supplier of the value gets do decide what concrete type `a` will be, `a` is called “existentially quantified”, but Haskell doesn't generally support existentially quantified type variables. Haskell does have an extension called ExistentialQuantification that allows you to define data types that have type variables “inside” that can not be seen from the outside, which is like having an existentially quantified variable. I think this might be a solution to you problem, though I don't think I understand the design of your code well enough to suggest a definitive course of action here. You can read up on ExistentialQuantification at [1]. Regards Sven [1]: https://wiki.haskell.org/Existential_type > 1 {-# LANGUAGE GADTs #-} > 2 > 3 module Main where > 4 > 5 data PR t a = PR (Maybe ([t], a)) > 6 data P t a = P ([t] -> PR t a) > 7 > 8 a :: P Char (T A) > 9 a = undefined > 10 > 11 b :: P Char (T B) > 12 b = undefined > 13 > 14 data A = A > 15 data B = B > 16 data E = E String > 17 > 18 data T a where > 19 A' :: T A > 20 B' :: T B > 21 E' :: E -> T E > 22 > 23 type H t = [Char] -> (t, [Char]) > 24 type TT t = [Char] -> [t] > 25 > 26 tt :: H t -> [P Char t] -> TT t > 27 tt = undefined > 28 > 29 h :: H (T a) > 30 h [] = (E' (E "E"), []) > 31 h (head:rest) = (E' (E ("E")), rest) > 32 > 33 tt' :: [Char] -> [T a] > 34 tt' = tt h [a, b] > 35 > 36 main :: IO () > 37 main = putStrLn "Hello" > _______________________________________________ > 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 -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From magnus at therning.org Mon Feb 18 20:58:23 2019 From: magnus at therning.org (Magnus Therning) Date: Mon, 18 Feb 2019 21:58:23 +0100 Subject: [Haskell-cafe] Amazonka: is it possible to work around deserialisation bug? In-Reply-To: <6a548990-c6a0-47f7-b5ac-c1b9139cfe3a@www.fastmail.com> References: <87va1t4991.fsf@therning.org> <6a548990-c6a0-47f7-b5ac-c1b9139cfe3a@www.fastmail.com> Message-ID: <87imxgq0eo.fsf@therning.org> Utku Demir writes: > Hey, > > I had a similar problem before, my workaround was creating a > newtype > wrapper around the original request and implementing > 'AWSRequest' > instance by hand. That let me override the way response is > parsed. > > I dug up the code, the override is here: > https://github.com/utdemir/distributed-fork/blob/edadea209e7e1fda77ca1d37011734771f6559de/serverless-execute-aws-lambda/src/Network/AWS/Lambda/Invoke/Fixed.hs > And here is how I sent the request: > https://github.com/utdemir/distributed-fork/blob/edadea209e7e1fda77ca1d37011734771f6559de/serverless-execute-aws-lambda/src/Network/Serverless/Execute/Lambda/Internal/Invoke.hs#L78 That's an arguably nicer way than how I solved it; I just removed the bits causing the error since I didn't need them anyway: https://github.com/magthe/amazonka/commit/1543b65e3a8b692aa9038ada68aaed9967752983 Then I used `stack` to point to my modified version. I wouldn't be surprised if people on the list already know how, but just in case I'll throw in a link to my description of it: http://magnus.therning.org/posts/2019-02-10-000-using-stack-to-get-around-upstream-bugs.html /M -- Magnus Therning OpenPGP: 0x927912051716CE39 email: magnus at therning.org twitter: magthe http://magnus.therning.org/ If you can tell the truth, you don't have to remember anything. — Mark Twain -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 832 bytes Desc: not available URL: From jhenahan at me.com Mon Feb 18 21:23:35 2019 From: jhenahan at me.com (Jack Henahan) Date: Mon, 18 Feb 2019 16:23:35 -0500 Subject: [Haskell-cafe] Amazonka: is it possible to work around deserialisation bug? In-Reply-To: <87imxgq0eo.fsf@therning.org> References: <87va1t4991.fsf@therning.org> <6a548990-c6a0-47f7-b5ac-c1b9139cfe3a@www.fastmail.com> <87imxgq0eo.fsf@therning.org> Message-ID: Newtype would be my plan, too. Also really glad to see this thread, because I’m *also* trying to migrate away from “stringing CLI calls together with bash” to a sensible programming model, and this is great to be aware of before I get too into it. Thanks for reporting it upstream (both to the library and to Amazon)! --- ProofTechnique > On Feb 18, 2019, at 15:58, Magnus Therning wrote: > > > Utku Demir writes: > >> Hey, >> >> I had a similar problem before, my workaround was creating a newtype >> wrapper around the original request and implementing 'AWSRequest' >> instance by hand. That let me override the way response is parsed. >> >> I dug up the code, the override is here: >> https://github.com/utdemir/distributed-fork/blob/edadea209e7e1fda77ca1d37011734771f6559de/serverless-execute-aws-lambda/src/Network/AWS/Lambda/Invoke/Fixed.hs >> And here is how I sent the request: >> https://github.com/utdemir/distributed-fork/blob/edadea209e7e1fda77ca1d37011734771f6559de/serverless-execute-aws-lambda/src/Network/Serverless/Execute/Lambda/Internal/Invoke.hs#L78 > > That's an arguably nicer way than how I solved it; I just removed the > bits causing the error since I didn't need them anyway: > > https://github.com/magthe/amazonka/commit/1543b65e3a8b692aa9038ada68aaed9967752983 > > Then I used `stack` to point to my modified version. I wouldn't be > surprised if people on the list already know how, but just in case I'll > throw in a link to my description of it: http://magnus.therning.org/posts/2019-02-10-000-using-stack-to-get-around-upstream-bugs.html > > /M > > -- > Magnus Therning OpenPGP: 0x927912051716CE39 > email: magnus at therning.org > twitter: magthe http://magnus.therning.org/ > > If you can tell the truth, you don't have to remember anything. > — Mark Twain > _______________________________________________ > 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 javran.c at gmail.com Tue Feb 19 01:00:16 2019 From: javran.c at gmail.com (Javran Cheng) Date: Mon, 18 Feb 2019 17:00:16 -0800 Subject: [Haskell-cafe] Looking for JavaScript(V8)-compilant parser Message-ID: Hi Cafe, tl;dr: I'm wondering if there are existing parsers for parsing any dateString that can be accepted by `Date.parse` of JavaScript(V8). The input looks like "Fri, 08 February 2019 12:34:56 +0900". At first I checked [MDN]( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) and turns out it's very close to [IETF-compliant RFC 2822 timestamps]( https://tools.ietf.org/html/rfc2822#page-14), but not quite: as I then found [hsemail]( http://hackage.haskell.org/package/hsemail-2/docs/Text-Parsec-Rfc2822.html) to be promising, but it rejected "Fri, 08 February 2019 12:34:56 +0900" but accepted "Fri, 08 Feb 2019 12:34:56 +0900" (notice that RFC2822 does not accept full month name). Refering to language spec doesn't help ( http://www.ecma-international.org/ecma-262/5.1/#sec-15.9.4.2), as it doesn't mention RFC2822 at all. So it seems `Data.parse` accepts a superset of RFC2822 and a version of ISO8601 (as described in MDN above) but I'm not sure what exactly is the accepting set of inputs. Before I start working on a quick and dirty solution (it should work patching hsemail to accept full month name) I want to know if there are existing parsers for this purpose? Thanks! -- Javran (Fang) Cheng -------------- next part -------------- An HTML attachment was scrubbed... URL: From haskell at marcelfourne.de Tue Feb 19 14:25:40 2019 From: haskell at marcelfourne.de (Marcel =?UTF-8?B?Rm91cm7DqQ==?=) Date: Tue, 19 Feb 2019 15:25:40 +0100 Subject: [Haskell-cafe] ANNOUNCE: eccrypto 0.1.0, timing attack safe cryptography in Haskell Message-ID: <20190219152540.05bcadb4@deck> Dear Haskell Community! I'd like to introduce some new cryptographic code, containing a verified[*] timing-attack safe pure Haskell[**] implementation of Ed25519 and as of yet unverified implementations of textbook ECDH and ECDSA on the NIST prime curves. Install it by $ cabal install eccrypto or download it from Hackage[0]. Also contained are test vectors, usable by the trusty $ cabal test as well as benchmarking code which you can invoke by $ cabal bench if you want to try my code before using it. Please note that this is a one person project, so there is still much room for optimization. The intended focus groups are implementors of cryptographic protocols as well as other cryptographers and interested third parties. My code uses no[**] embedded C code or assembly to achieve timing attack resistance, only careful Haskell constructions in the internal modules, the obligatory hackers footgun included only in those. ;-) Security sketch: The timing attack safety is built on the constant time criterion, namely, that no branches or memory access indices may be based on the content of the secret key bits. The name of this criterion is from the strict evaluation world of cryptography, but does not prohibit non-strict evaluation semantics per se. The API is only slightly different from contemporary libraries like "ed25519"[1], but the content of the signatures is just the same. The number of dependencies are also in the same ballpark, if you'd like to use the code for infrastructure - but in that case, please talk to me to not use unverified/insecure operations! Best of wishes to a thriving community, Marcel Fourné [*]: paper upcoming but as of now it only exists in my notes; analysis was done "by hand" on assembly generated by GHC 8.4.4, mechanization based on established proofs is planned [**]: using integer-gmp, might change in the future to low-level Haskell [0]: https://hackage.haskell.org/package/eccrypto-0.1.0 [1]: https://hackage.haskell.org/package/ed25519 From akcheung at cs.washington.edu Wed Feb 20 07:45:46 2019 From: akcheung at cs.washington.edu (Alvin Cheung) Date: Tue, 19 Feb 2019 23:45:46 -0800 Subject: [Haskell-cafe] Deadline extension: DBPL 19 Message-ID: <96cd2e26-b269-0dd1-d96b-c542a07d313b@cs.washington.edu> Due to multiple requests, we are extending the deadline for *both* paper tracks to *Monday Feb 25* (anytime on Earth). Please feel free to submit via our hotcrp website. Questions can be directed to dbpl19-pcchairs at cs.washington.edu . ---------------------------------------------------------------------- The 17th International Symposium on Database Programming Languages https://pldi19.sigplan.org/track/dbpl-2019-papers Phoenix, Arizona, USA June 23, 2019 hosted as part of PLDI 2019 Call for Papers For over 25 years, DBPL has established itself as the principal venue for publishing and discussing new ideas at the intersection of databases and programming languages. Many key contributions in query languages for object-oriented data, persistent databases, nested relational data, and semistructured data, as well as fundamental ideas in types for query languages, were first announced at DBPL. Today, this creative research area is broadening into a subfield of data-centric computation, currently scattered among a range of venues. DBPL is an established destination for such new ideas and solicits submissions from researchers in databases, programming languages or any other community interested in the design, implementation or foundations of data-centric computation. Scope ----- DBPL solicits practical and theoretical papers in all topics at the intersection of databases and programming languages. Papers emphasizing new topics or emerging areas are especially welcome. Suggested, but not exclusive, topics of interest for submissions include: - Compiling Query Languages to Modern Hardware - Data-Centric Programming Abstractions, Comprehensions, Monads - Data Integration, Exchange, and Interoperability - Data Synchronization and Bidirectional Transformations - Declarative Data Centers (e.g., distributed query processing, serverless computing platforms, social computing platforms, etc) - Emerging and Nontraditional Data Models - Language-Based Security in Data Management - Language-Integrated Query Mechanisms - Managing Uncertain and Imprecise Information - Metaprogramming and Heterogeneous Staged Computation - Programming Language Support for Data-Centric Programming (e.g., databases, web programming, machine learning, etc) - Query Compilation and In-memory Databases - Query Language Design and Implementation - Query Transformation and Optimization - Schema Mapping and Metadata Management - Semantics and Verification of Database Systems - Stream Data Processing and Query Languages - Type and Effect Systems for Data-Centric Programming Author Guidelines ----------------- Prospective authors are invited to submit full papers in English presenting original research. Submitted papers must be unpublished and not submitted for publication elsewhere. Submissions should be no more than 10 pages long, excluding references, in the two-column ACM proceedings format, following PLDI's formatting requirements (https://pldi19.sigplan.org/track/pldi-2019-papers#Call-for-Papers). Each submission should begin with a succinct statement of the problem and a summary of the main results. Authors may provide more details to substantiate the main claims of the paper by including a clearly marked appendix at the end of the submission, which is not included in the page limit and is read at the discretion of the committee. At least one author of each accepted paper must attend the symposium to present their work. Short papers of at most 4 pages (same format as long papers) describing work in progress, demos, research challenges or visions are also welcome. Accepted short papers may be included or excluded from the formal proceedings, whichever the author(s) prefer. Full and short papers are both due on the deadline, February 25, 2019. Instructions on how to submit will be posted on the symposium website noted above. Review is single-blind, so authors do not need to anonymize their submissions. PC submissions are allowed, except for the co-chairs. Important Dates --------------- - Paper Submission: February 25, 2019 - Notification: March 29, 2019 - Final versions due: April 16, 2019 - Symposium: June 23, 2019 Proceedings ----------- Accepted papers will appear as part of the PLDI Proceedings for DBPL 2019. Program Committee ----------------- *Program Co-Chairs* Alvin Cheung, University of Washington Kim Nguyen, Universite Paris-Sud *Program Committee* William Cook, University of Texas at Austin Vasiliki Kalavri, ETH Harshad Kasture, Oracle Oleg Kiselyov, University of Tsukuba Sam Lindley, University of Edinburgh Tiark Rompf, Purdue University Stefanie Scherzinger, OTH Regensberg Amir Shaikhha, EPFL / University of Oxford Avi Shinnar, IBM Guido Wachsmuth, Oracle Melanie Wu, Pomona College History ------- The 17th Symposium on Data Base Programming Languages (DBPL 2019) continues the tradition of excellence initiated by its predecessors in Roscoff, Finistere (1987), Salishan, Oregon (1989), Nafplion, Argolida (1991), Manhattan, New York (1993), Gubbio, Umbria (1995), Estes Park, Colorado (1997), Kinloch Rannoch, Scotland (1999), Marino, Rome (2001), Potsdam, Germany (2003), Trondheim, Norway (2005), Vienna, Austria (2007), Lyon, France (2009), Seattle, Washington (2011), Riva del Garda, Italy (2013), Pittsburgh, Pennsylvania (2015), Munich, Germany (2017). DBPL was affiliated with VLDB from 1999-2013 and in 2017. In 2015, it is affiliated with SPLASH for the first time and in 2019, it is affiliated with PLDI for the first time. From damien.mattei at gmail.com Wed Feb 20 15:21:35 2019 From: damien.mattei at gmail.com (Damien Mattei) Date: Wed, 20 Feb 2019 16:21:35 +0100 Subject: [Haskell-cafe] ghci segmentation fault Message-ID: when executing this code i have a segmentation fault: printNameAndData :: (String,Float,Float) -> IO () printNameAndData (name,bdSidonie,bdWDS) = do putStrLn $ name ++ " " ++ show bdSidonie ++ " " ++ show bdWDS return () main :: IO () main = do rm <- mapM printNameAndData fltrdNamesBDsApprox *Main> :load UpdateSidonie.hs [1 of 1] Compiling Main ( UpdateSidonie.hs, interpreted ) Ok, one module loaded. *Main> main Segmentation fault (core dumped) if i hat a print statement: putStrLn $ show rm it works: [output cut] ... STT 448 28.4162 28.4162 STT 453 6.493 6.493 STT 487 79.761 79.761 STT 518 7.952 7.952 STT 524 19.3533 19.3533 STT 531 37.878 37.878 STT 534 21.3296 21.3296 VDK 1 26.1293 26.1293 VDK 2 7.4946 7.4946 VOU 42 -16.461 -16.461 WOR 7 71.851 71.851 WOR 12 27.4445 27.4445 WOR 17 -9.956 -9.956 WOR 20 16.2316 16.2316 WOR 24 31.25 31.25 [(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),()] strange? the version is: GHCi, version 8.2.2 Damien -------------- next part -------------- An HTML attachment was scrubbed... URL: From damien.mattei at gmail.com Wed Feb 20 15:25:28 2019 From: damien.mattei at gmail.com (Damien Mattei) Date: Wed, 20 Feb 2019 16:25:28 +0100 Subject: [Haskell-cafe] =?utf-8?q?=28no_subject=29?= Message-ID: in my previous message instead of 'hat' we must read 'add' ... gasp... -------------- next part -------------- An HTML attachment was scrubbed... URL: From vanessa.mchale at iohk.io Wed Feb 20 15:41:20 2019 From: vanessa.mchale at iohk.io (Vanessa McHale) Date: Wed, 20 Feb 2019 09:41:20 -0600 Subject: [Haskell-cafe] ghci segmentation fault In-Reply-To: References: Message-ID: <1d19d25f-56d5-ce96-fdf8-23f011b318b9@iohk.io> Can you reproduce with GHC 8.6.3? On 2/20/19 9:21 AM, Damien Mattei wrote: > when executing this code i have a segmentation fault: > > printNameAndData :: (String,Float,Float) -> IO () > printNameAndData (name,bdSidonie,bdWDS) = >   do >     putStrLn $  name ++ "      " ++ show bdSidonie ++ "   " ++ show bdWDS >     return () > > > main :: IO () > > main = > >   do >        rm <- mapM printNameAndData fltrdNamesBDsApprox > > *Main> :load UpdateSidonie.hs > [1 of 1] Compiling Main             ( UpdateSidonie.hs, interpreted ) > Ok, one module loaded. > *Main> main > Segmentation fault (core dumped) > > if i hat a print statement: > >  putStrLn $ show rm > > it works: > > [output cut] > > ... > STT 448      28.4162   28.4162 > STT 453      6.493   6.493 > STT 487      79.761   79.761 > STT 518      7.952   7.952 > STT 524      19.3533   19.3533 > STT 531      37.878   37.878 > STT 534      21.3296   21.3296 > VDK   1      26.1293   26.1293 > VDK   2      7.4946   7.4946 > VOU  42      -16.461   -16.461 > WOR   7      71.851   71.851 > WOR  12      27.4445   27.4445 > WOR  17      -9.956   -9.956 > WOR  20      16.2316   16.2316 > WOR  24      31.25   31.25 > [(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),()] > > strange? > > the version is: > GHCi, version 8.2.2 > > Damien > > _______________________________________________ > 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 488 bytes Desc: OpenPGP digital signature URL: From a.pelenitsyn at gmail.com Wed Feb 20 16:13:52 2019 From: a.pelenitsyn at gmail.com (Artem Pelenitsyn) Date: Wed, 20 Feb 2019 11:13:52 -0500 Subject: [Haskell-cafe] ghci segmentation fault In-Reply-To: <1d19d25f-56d5-ce96-fdf8-23f011b318b9@iohk.io> References: <1d19d25f-56d5-ce96-fdf8-23f011b318b9@iohk.io> Message-ID: This gives me a normal compile-time error (last statement in do-block is not an expression) under 8.4.3. -- Best, Artem On Wed, 20 Feb 2019 at 10:41 Vanessa McHale wrote: > Can you reproduce with GHC 8.6.3? > On 2/20/19 9:21 AM, Damien Mattei wrote: > > when executing this code i have a segmentation fault: > > printNameAndData :: (String,Float,Float) -> IO () > printNameAndData (name,bdSidonie,bdWDS) = > do > putStrLn $ name ++ " " ++ show bdSidonie ++ " " ++ show bdWDS > return () > > > main :: IO () > > main = > > do > rm <- mapM printNameAndData fltrdNamesBDsApprox > > *Main> :load UpdateSidonie.hs > [1 of 1] Compiling Main ( UpdateSidonie.hs, interpreted ) > Ok, one module loaded. > *Main> main > Segmentation fault (core dumped) > > if i hat a print statement: > > putStrLn $ show rm > > it works: > > [output cut] > > ... > STT 448 28.4162 28.4162 > STT 453 6.493 6.493 > STT 487 79.761 79.761 > STT 518 7.952 7.952 > STT 524 19.3533 19.3533 > STT 531 37.878 37.878 > STT 534 21.3296 21.3296 > VDK 1 26.1293 26.1293 > VDK 2 7.4946 7.4946 > VOU 42 -16.461 -16.461 > WOR 7 71.851 71.851 > WOR 12 27.4445 27.4445 > WOR 17 -9.956 -9.956 > WOR 20 16.2316 16.2316 > WOR 24 31.25 31.25 > > [(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),()] > > strange? > > the version is: > GHCi, version 8.2.2 > > Damien > > _______________________________________________ > 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 damien.mattei at gmail.com Thu Feb 21 09:37:18 2019 From: damien.mattei at gmail.com (Damien Mattei) Date: Thu, 21 Feb 2019 10:37:18 +0100 Subject: [Haskell-cafe] ghci segmentation fault In-Reply-To: References: <1d19d25f-56d5-ce96-fdf8-23f011b318b9@iohk.io> Message-ID: note that it was just a test with mapM, the best way to do what i want is to use : forM_ fltrdNamesBDsApprox $ printNameAndData it was just a test prior developpint the called function printNameAndData that will not only print but also update a database. Regards, Damien On Wed, Feb 20, 2019 at 5:14 PM Artem Pelenitsyn wrote: > This gives me a normal compile-time error (last statement in do-block is > not an expression) under 8.4.3. > > -- > Best, Artem > > On Wed, 20 Feb 2019 at 10:41 Vanessa McHale > wrote: > >> Can you reproduce with GHC 8.6.3? >> On 2/20/19 9:21 AM, Damien Mattei wrote: >> >> when executing this code i have a segmentation fault: >> >> printNameAndData :: (String,Float,Float) -> IO () >> printNameAndData (name,bdSidonie,bdWDS) = >> do >> putStrLn $ name ++ " " ++ show bdSidonie ++ " " ++ show bdWDS >> return () >> >> >> main :: IO () >> >> main = >> >> do >> rm <- mapM printNameAndData fltrdNamesBDsApprox >> >> *Main> :load UpdateSidonie.hs >> [1 of 1] Compiling Main ( UpdateSidonie.hs, interpreted ) >> Ok, one module loaded. >> *Main> main >> Segmentation fault (core dumped) >> >> if i hat a print statement: >> >> putStrLn $ show rm >> >> it works: >> >> [output cut] >> >> ... >> STT 448 28.4162 28.4162 >> STT 453 6.493 6.493 >> STT 487 79.761 79.761 >> STT 518 7.952 7.952 >> STT 524 19.3533 19.3533 >> STT 531 37.878 37.878 >> STT 534 21.3296 21.3296 >> VDK 1 26.1293 26.1293 >> VDK 2 7.4946 7.4946 >> VOU 42 -16.461 -16.461 >> WOR 7 71.851 71.851 >> WOR 12 27.4445 27.4445 >> WOR 17 -9.956 -9.956 >> WOR 20 16.2316 16.2316 >> WOR 24 31.25 31.25 >> >> [(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),()] >> >> strange? >> >> the version is: >> GHCi, version 8.2.2 >> >> Damien >> >> _______________________________________________ >> 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. > > _______________________________________________ > 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 damien.mattei at gmail.com Thu Feb 21 11:22:55 2019 From: damien.mattei at gmail.com (Damien Mattei) Date: Thu, 21 Feb 2019 12:22:55 +0100 Subject: [Haskell-cafe] ghci segmentation fault In-Reply-To: References: <1d19d25f-56d5-ce96-fdf8-23f011b318b9@iohk.io> Message-ID: do you think there could be a problem in my code because i had now a segfault at execution when trying to do a query, even on a little subset of the list , i wrote this: let beginLst = take 10 fltrdNamesBDsApprox resMap <- mapM (\(name,bdSidonie,bdWDS) -> do ad <- getAlphaDelta conn name return (name,bdSidonie,bdWDS,ad)) beginLst putStrLn $ show resMap i have test getAlphaDelta on a single element and it worked: getAlphaDelta :: Connection -> String -> IO (Double,Double) getAlphaDelta conn name = do let qry_head_AlphaDelta_AngularDistance = "select alpha,delta from AngularDistance where Nom = ?" :: Query (alpha_delta_rows :: [(Double,Double)]) <- query conn qry_head_AlphaDelta_AngularDistance (Only (name::String)) putStrLn $ show alpha_delta_rows return (head alpha_delta_rows) the connection is opened like this: main = do conn <- connect defaultConnectInfo { connectHost = "moita", connectUser = "mattei", i also tried other variants all segfault: {- forM_ fltrdNamesBDsApprox $ \tupleNbds -> do res <- printNameAndData tupleNbds conn return res -} {- rm <- mapM (\tupleNbds -> do res <- printNameAndData tupleNbds conn return res) fltrdNamesBDsApprox putStrLn $ show rm -} -- putStrLn $ show fltrdNamesBDsApprox On Wed, Feb 20, 2019 at 5:14 PM Artem Pelenitsyn wrote: > This gives me a normal compile-time error (last statement in do-block is > not an expression) under 8.4.3. > > -- > Best, Artem > > On Wed, 20 Feb 2019 at 10:41 Vanessa McHale > wrote: > >> Can you reproduce with GHC 8.6.3? >> On 2/20/19 9:21 AM, Damien Mattei wrote: >> >> when executing this code i have a segmentation fault: >> >> printNameAndData :: (String,Float,Float) -> IO () >> printNameAndData (name,bdSidonie,bdWDS) = >> do >> putStrLn $ name ++ " " ++ show bdSidonie ++ " " ++ show bdWDS >> return () >> >> >> main :: IO () >> >> main = >> >> do >> rm <- mapM printNameAndData fltrdNamesBDsApprox >> >> *Main> :load UpdateSidonie.hs >> [1 of 1] Compiling Main ( UpdateSidonie.hs, interpreted ) >> Ok, one module loaded. >> *Main> main >> Segmentation fault (core dumped) >> >> if i hat a print statement: >> >> putStrLn $ show rm >> >> it works: >> >> [output cut] >> >> ... >> STT 448 28.4162 28.4162 >> STT 453 6.493 6.493 >> STT 487 79.761 79.761 >> STT 518 7.952 7.952 >> STT 524 19.3533 19.3533 >> STT 531 37.878 37.878 >> STT 534 21.3296 21.3296 >> VDK 1 26.1293 26.1293 >> VDK 2 7.4946 7.4946 >> VOU 42 -16.461 -16.461 >> WOR 7 71.851 71.851 >> WOR 12 27.4445 27.4445 >> WOR 17 -9.956 -9.956 >> WOR 20 16.2316 16.2316 >> WOR 24 31.25 31.25 >> >> [(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),()] >> >> strange? >> >> the version is: >> GHCi, version 8.2.2 >> >> Damien >> >> _______________________________________________ >> 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. > > _______________________________________________ > 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 damien.mattei at gmail.com Thu Feb 21 15:13:46 2019 From: damien.mattei at gmail.com (Damien Mattei) Date: Thu, 21 Feb 2019 16:13:46 +0100 Subject: [Haskell-cafe] segfault depending on code position in source file Message-ID: my code is structured like this , in summary: -- this function will return th N°BD from Sidonie for a given name -- note: names have been standardized between Sidonie and WDS getAlphaDelta :: Connection -> String -> IO (Double,Double) getAlphaDelta conn name = do let qry_head_AlphaDelta_AngularDistance = "select alpha,delta from AngularDistance where Nom = ?" :: Query (alpha_delta_rows :: [(Double,Double)]) <- query conn qry_head_AlphaDelta_AngularDistance (Only (name::String)) -- putStrLn $ show alpha_delta_rows return (head alpha_delta_rows) main = do conn <- connect defaultConnectInfo { connectHost = "moita", connectUser = "mattei", connectPassword = "sidonie2", connectDatabase = "sidonie" } -- check getAlphaDelta works: let name3 = "A 7" putStrLn $ show name3 ad3 <- getAlphaDelta conn name3 putStr "ad3 =" putStrLn $ show ad3 this works i got result such as: "A 7" ad3 =(11297.0,-619.0) if i move the 5 lines of code at the end of file it segfault between the begin and end i have some DB connection and queriung , filtering, mapping... any idea? should i really upgrade the version of GHCI? Damien -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.pelenitsyn at gmail.com Thu Feb 21 16:34:57 2019 From: a.pelenitsyn at gmail.com (Artem Pelenitsyn) Date: Thu, 21 Feb 2019 11:34:57 -0500 Subject: [Haskell-cafe] segfault depending on code position in source file In-Reply-To: References: Message-ID: Damien, It is really hard to tell anything without the ability to reproduce the problem on other systems. Try to come up with some example which is easy to get running AND segfaulting on other computers, so that we could play with it. Maybe post the minimal code in separate github repo and provide the link. -- Best, Artem On Thu, 21 Feb 2019 at 10:14 Damien Mattei wrote: > my code is structured like this , in summary: > > > -- this function will return th N°BD from Sidonie for a given name > -- note: names have been standardized between Sidonie and WDS > getAlphaDelta :: Connection -> String -> IO (Double,Double) > getAlphaDelta conn name = do > let qry_head_AlphaDelta_AngularDistance = "select alpha,delta > from AngularDistance where Nom = ?" :: Query > (alpha_delta_rows :: [(Double,Double)]) <- query conn > qry_head_AlphaDelta_AngularDistance (Only (name::String)) > -- putStrLn $ show alpha_delta_rows > return (head alpha_delta_rows) > > > main = > > do > conn <- connect defaultConnectInfo > { connectHost = "moita", > connectUser = "mattei", > connectPassword = "sidonie2", > connectDatabase = "sidonie" } > > > -- check getAlphaDelta works: > > let name3 = "A 7" > putStrLn $ show name3 > ad3 <- getAlphaDelta conn name3 > putStr "ad3 =" > putStrLn $ show ad3 > > this works i got result such as: > "A 7" > ad3 =(11297.0,-619.0) > > > if i move the 5 lines of code at the end of file it segfault > > between the begin and end i have some DB connection and queriung , > filtering, mapping... > > > any idea? > > should i really upgrade the version of GHCI? > > Damien > _______________________________________________ > 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 vanessa.mchale at iohk.io Thu Feb 21 16:41:14 2019 From: vanessa.mchale at iohk.io (Vanessa McHale) Date: Thu, 21 Feb 2019 10:41:14 -0600 Subject: [Haskell-cafe] segfault depending on code position in source file In-Reply-To: References: Message-ID: <787bcded-ef52-399f-bf0e-a5e553f7b76b@iohk.io> Well, it's kind of difficult to tell if it's a compiler bug without at least trying different GHC versions. As it stands I don't think there's enough information to diagnose the problem. Perhaps provide something reproducible that we could build on our machines? Cheers, Vanessa McHale On 2/21/19 9:13 AM, Damien Mattei wrote: > my code is structured like this , in summary: > > > -- this function will return th N°BD from Sidonie for a given name > -- note: names have been standardized between Sidonie and WDS > getAlphaDelta :: Connection -> String -> IO (Double,Double) > getAlphaDelta conn name = do >             let qry_head_AlphaDelta_AngularDistance = "select > alpha,delta from AngularDistance where Nom = ?" :: Query >             (alpha_delta_rows :: [(Double,Double)]) <- query conn > qry_head_AlphaDelta_AngularDistance (Only (name::String)) > --            putStrLn $ show alpha_delta_rows >             return (head alpha_delta_rows) > > > main = > >   do >     conn <- connect defaultConnectInfo >       { connectHost = "moita", >         connectUser = "mattei", >         connectPassword = "sidonie2", >         connectDatabase = "sidonie" } > > > -- check getAlphaDelta works: >   >     let name3 = "A     7" >     putStrLn $ show name3 >     ad3 <- getAlphaDelta conn name3 >     putStr "ad3 =" >     putStrLn $ show ad3 > > this works i got result such as: > "A     7" > ad3 =(11297.0,-619.0) > > > if i move the 5 lines of code at the end of file it segfault > > between the begin and end i have some DB connection and  queriung , > filtering, mapping... > > > any idea? > > should i really upgrade the version of GHCI? > > Damien > > _______________________________________________ > 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 488 bytes Desc: OpenPGP digital signature URL: From mail at nh2.me Thu Feb 21 17:48:20 2019 From: mail at nh2.me (=?UTF-8?Q?Niklas_Hamb=c3=bcchen?=) Date: Thu, 21 Feb 2019 18:48:20 +0100 Subject: [Haskell-cafe] segfault depending on code position in source file In-Reply-To: References: Message-ID: > should i really upgrade the version of GHCI? I don't follow. Do you get a segfault when interpreting your code in ghci, or when compiling your program to a binary with ghc? And on what platform? If you get a segfault, it is often worth running your program under gdb, and check in the crash backtrace whether it crashed from Haskell code or a C foreign function call. Niklas From mail at nh2.me Thu Feb 21 17:55:20 2019 From: mail at nh2.me (=?UTF-8?Q?Niklas_Hamb=c3=bcchen?=) Date: Thu, 21 Feb 2019 18:55:20 +0100 Subject: [Haskell-cafe] segfault depending on code position in source file In-Reply-To: References: Message-ID: <6768c058-5a38-546f-8cf9-3bbe231f663d@nh2.me> On 21/02/2019 6:48 PM, Niklas Hambüchen wrote: > Do you get a segfault when interpreting your code in ghci, or when compiling your program to a binary with ghc? Ah, I see now that there was another email thread where you said it was in ghci, but you didn't to that one in your email so I missed it. I guess my recommendations stands: Try attach to your ghci with gdb and check whether you get a C location for your crash. From damien.mattei at gmail.com Thu Feb 21 18:21:29 2019 From: damien.mattei at gmail.com (Damien Mattei) Date: Thu, 21 Feb 2019 19:21:29 +0100 Subject: [Haskell-cafe] segfault depending on code position in source file In-Reply-To: References: Message-ID: i had attached the whole file, so anyone can read the whole code, perheaps it could help, saying me if there is compilation error on other ghc versions, with mine no error at compilation. The problem to test is that without the database connection which is behind a firewall of course ,the code can not be executed. Me i have no more idea, i will install tomorrow an earlier version of ghc and continue to test.... if it's really a problem i could output the partial result and continue in another language such as Racket or Python... but i'm not at this point and hope to continue with Haskell... Damien On Thu, Feb 21, 2019 at 5:35 PM Artem Pelenitsyn wrote: > Damien, > > It is really hard to tell anything without the ability to reproduce the > problem on other systems. Try to come up with some example which is easy to > get running AND segfaulting on other computers, so that we could play with > it. Maybe post the minimal code in separate github repo and provide the > link. > > -- > Best, Artem > > On Thu, 21 Feb 2019 at 10:14 Damien Mattei > wrote: > >> my code is structured like this , in summary: >> >> >> -- this function will return th N°BD from Sidonie for a given name >> -- note: names have been standardized between Sidonie and WDS >> getAlphaDelta :: Connection -> String -> IO (Double,Double) >> getAlphaDelta conn name = do >> let qry_head_AlphaDelta_AngularDistance = "select alpha,delta >> from AngularDistance where Nom = ?" :: Query >> (alpha_delta_rows :: [(Double,Double)]) <- query conn >> qry_head_AlphaDelta_AngularDistance (Only (name::String)) >> -- putStrLn $ show alpha_delta_rows >> return (head alpha_delta_rows) >> >> >> main = >> >> do >> conn <- connect defaultConnectInfo >> { connectHost = "moita", >> connectUser = "mattei", >> connectPassword = "sidonie2", >> connectDatabase = "sidonie" } >> >> >> -- check getAlphaDelta works: >> >> let name3 = "A 7" >> putStrLn $ show name3 >> ad3 <- getAlphaDelta conn name3 >> putStr "ad3 =" >> putStrLn $ show ad3 >> >> this works i got result such as: >> "A 7" >> ad3 =(11297.0,-619.0) >> >> >> if i move the 5 lines of code at the end of file it segfault >> >> between the begin and end i have some DB connection and queriung , >> filtering, mapping... >> >> >> any idea? >> >> should i really upgrade the version of GHCI? >> >> Damien >> _______________________________________________ >> 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: UpdateSidonie.hs Type: application/octet-stream Size: 18701 bytes Desc: not available URL: From svenpanne at gmail.com Thu Feb 21 19:15:43 2019 From: svenpanne at gmail.com (Sven Panne) Date: Thu, 21 Feb 2019 20:15:43 +0100 Subject: [Haskell-cafe] segfault depending on code position in source file In-Reply-To: References: Message-ID: Am Do., 21. Feb. 2019 um 19:22 Uhr schrieb Damien Mattei < damien.mattei at gmail.com>: > i had attached the whole file, so anyone can read the whole code, perheaps > it could help, saying me if there is compilation error on other ghc > versions, with mine no error at compilation. > I very much doubt that anyone likes to read >500 lines of Haskell code with lots of external dependencies to help you with your problem. A good hint for Open Source SW in general: If you think you might have found a bug, cut down your example as much as possible, throw out as many external dependencies as you can while still reproducing your problem, then, and only then, post it to other people. You simply can't expect that other people will do that debugging work for you in their spare time. The code you post doesn't really have to make sense, it should just be the minimum amount of code needed to reproduce the problem. In a nutshell: The probability that you get some help is inversely proportional to the size of your example, and even more inversely proportional to the number of external dependencies (libraries etc.). > The problem to test is that without the database connection which is > behind a firewall of course ,the code can not be executed. [...] > Well, that is basically a show stopper for getting help... I don't want to be mean, quite the opposite: I just want to explain why you probably won't receive any help in the current form. This is not special to the Haskell community, the situation would be very much the same if you posted an equivalent problem of similar size to the Racket/Python/... community. I'm quite sure that most maintainer would be happy to have a look e.g. at a program consisting of a dozen lines without external dependencies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sean.chalmers at data61.csiro.au Fri Feb 22 04:59:51 2019 From: sean.chalmers at data61.csiro.au (Sean Chalmers) Date: Fri, 22 Feb 2019 14:59:51 +1000 Subject: [Haskell-cafe] ANNOUNCE: waargonaut-0.6.0.0 (better mousetrap) Message-ID: ## Waargonaut 0.6.0.0 This release of Waargonaut sees several issues fixed and a generous helping of cleanups and refactoring. This is a breaking change as the API has been drastically altered for some parts. Other changes include more granular modules and generalisation. ### Bug fixes - Unicode was not being handled correctly, sometimes. The encoding/decoding to a   `Text` or `String` value wasn't correct due to my own lack of understanding. - Upper-case hexadecimal input was being silently zeroed out during some   conversion steps. Those issues should all be resolved now. In the process of fixing those issues, it tugged on a couple of threads for things I've been wanting to do. So I did them, see below: ### Changes: #### Decoding! Using `parseWith` and the requirement to DIY almost an entire parsing function is a thing of the past. Replaced with the following structure: Functions: - `decodeWith` - `decodeFromText` - `decodeFromString` - `decodeFromByteString` - `decodeWithInput` - as well as their pure variants These functions only require you provide a function from the respective input type and has an implementation of the `CharParsing` interface. The greatly simplifies the process of providing your own parsing function. #### Default Parsing Functions! Waargonaut now provides some default parsing functions using the `attoparsec` package. These are in the `Waargonaut.Attoparsec` module and should make it easier for people to be up and running with the package when requirements of a custom parser aren't important. #### New Optics! The `Waargonaut.Lens` module provides some Prisms for use with the `Json` type. Working in a similar way to the `lens-aeson` package. These optics are law abiding and they have tests to prove it. #### Better Builder To complement the more streamlined parsing functions, the encoder has had its builder internals reworked to support either `Text` or `ByteString`. In the style of "scrap your typeclasses" to keep things simple. Added tests to check their output matches. #### More modules! - Factored out components into more focused submodules:   - UnescapedJChar   - EscapedJChar   - HexDigit4   - Elem   - Elems   - JAssoc   - Decode.Runners   - Builders for all `Json` types now live under `Waargonaut.Encode.Builder` #### Deprecate Traversal decoder The decoder in `Waargonaut.Decode.Traversal` has been marked as deprecated and will be removed in a future release. It is bit rotting somewhat compared to the succinct powered decoder and doesn't operate at anywhere near the same level of speed or memory efficiency. If people care they can open an issue to let me know. #### Test re-structure Tests have been reordered into more granular modules. Some tests have been removed or reworked to be more accurate. More tests have been added to try to protect from regressions. More tests have been added to confirm that various instances or functions are law abiding. As a consequence there have been a few instances and functions that have been removed. From damien.mattei at gmail.com Fri Feb 22 09:55:17 2019 From: damien.mattei at gmail.com (Damien Mattei) Date: Fri, 22 Feb 2019 10:55:17 +0100 Subject: [Haskell-cafe] segfault depending on code position in source file In-Reply-To: References: Message-ID: well i understand the difficulty, i just pos because ,really some times i get incredible help that i coulmdn not even think it possible. i admit the code is and the database connection is a stop help. for the database i cannot do ,for the code i commented a lot and i can resume with this concise code that recreate the problem: it's quite simple i noticed that after one lines (see in code the lines and the upper case comments) the query to DB in getAlphaDelta does not works anymore (as it worked before ) but other functions making queries works that what is strange... {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} import Database.MySQL.Simple import Database.MySQL.Simple.QueryResults import Database.MySQL.Simple.Result import Database.MySQL.Simple.QueryParams import Database.MySQL.Simple.Param import Control.Monad import qualified Data.Text as Tx import Debug.Trace import Data.Maybe as Maybe import Text.Read import Data.Tuple.Extra getAlphaDelta :: Connection -> String -> IO (Double,Double) getAlphaDelta conn name = do let qry_head_AlphaDelta_AngularDistance = "select alpha,delta from AngularDistance where Nom = ?" :: Query (alpha_delta_rows :: [(Double,Double)]) <- query conn qry_head_AlphaDelta_AngularDistance (Only (name::String)) return (head alpha_delta_rows) main :: IO () main = do conn <- connect defaultConnectInfo { connectHost = "moita", connectUser = "mattei", connectPassword = "sidonie2", connectDatabase = "sidonie" } -- check getAlphaDelta works: -- HERE getAlphaDelta WORKS let name = "WOR 7" putStrLn $ show name ad <- getAlphaDelta conn name putStr "ad =" putStrLn $ show ad (names ::[Only Tx.Text])<- query_ conn "SELECT Nom FROM AngularDistance WHERE distance > 0.000278" -- AFTER THE PREVIOUS LINE getAlphaDelta WILL NOT WORKS AND ISSUE A SEGFAULT IN GHCI let name3 = "A 7" putStrLn $ show name3 ad3 <- getAlphaDelta conn name3 putStr "ad3 =" putStrLn $ show ad3 close conn here is the output: [mattei at localhost Haskell]$ ghci GHCi, version 8.2.2: http://www.haskell.org/ghc/ :? for help Prelude> :load UpdateSidonie.hs [1 of 1] Compiling Main ( UpdateSidonie.hs, interpreted ) Ok, one module loaded. *Main> main "WOR 7" ad =(17386.0,7120.0) "A 7" Segmentation fault (core dumped) as you see the first call to getAlphaDelta is ok but the second issue a Segmentation fault. i will try now with ghci 8.4 .... and hiope to give you some news... Damien On Thu, Feb 21, 2019 at 8:15 PM Sven Panne wrote: > Am Do., 21. Feb. 2019 um 19:22 Uhr schrieb Damien Mattei < > damien.mattei at gmail.com>: > >> i had attached the whole file, so anyone can read the whole code, >> perheaps it could help, saying me if there is compilation error on other >> ghc versions, with mine no error at compilation. >> > > I very much doubt that anyone likes to read >500 lines of Haskell code > with lots of external dependencies to help you with your problem. A good > hint for Open Source SW in general: If you think you might have found a > bug, cut down your example as much as possible, throw out as many external > dependencies as you can while still reproducing your problem, then, and > only then, post it to other people. You simply can't expect that other > people will do that debugging work for you in their spare time. The code > you post doesn't really have to make sense, it should just be the minimum > amount of code needed to reproduce the problem. > > In a nutshell: The probability that you get some help is inversely > proportional to the size of your example, and even more inversely > proportional to the number of external dependencies (libraries etc.). > > >> The problem to test is that without the database connection which is >> behind a firewall of course ,the code can not be executed. [...] >> > > Well, that is basically a show stopper for getting help... > > I don't want to be mean, quite the opposite: I just want to explain why > you probably won't receive any help in the current form. This is not > special to the Haskell community, the situation would be very much the same > if you posted an equivalent problem of similar size to the > Racket/Python/... community. I'm quite sure that most maintainer would be > happy to have a look e.g. at a program consisting of a dozen lines without > external dependencies. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damien.mattei at gmail.com Fri Feb 22 10:39:39 2019 From: damien.mattei at gmail.com (Damien Mattei) Date: Fri, 22 Feb 2019 11:39:39 +0100 Subject: [Haskell-cafe] segfault depending on code position in source file In-Reply-To: References: Message-ID: well , good news :-) i tested the same code on a 64 bits Linux Centos 7.2 with GHC 8.4 and it works fine... so the problem is only under 32bits Linux Fedora Core 29 with GHC 8.2 we had a system failure or security issue last month and i had to upgrade the 32 bit CPU 3 weeks ago to latest Linux Fedora Core version but this had the side effect to downgrade the Haskell GHC compiler to 8.2 version and the 8.2 version or 32 bit platform have bugs if i can i will try to test with the 8.4 GHC on the 32 bit platform to see if the problem was with 32bit vs 64bit; possible difference with Fedora and CentOS also, but i think it's the 8.2 compiler that cause the bug... regards, damien On Fri, Feb 22, 2019 at 10:55 AM Damien Mattei wrote: > well i understand the difficulty, i just pos because ,really some times i > get incredible help that i coulmdn not even think it possible. > i admit the code is and the database connection is a stop help. > for the database i cannot do ,for the code i commented a lot and i can > resume with this concise code that recreate the problem: > > it's quite simple i noticed that after one lines (see in code the lines > and the upper case comments) the query to DB in getAlphaDelta does not > works anymore (as it worked before ) but other functions making queries > works that what is strange... > > {-# LANGUAGE OverloadedStrings #-} > {-# LANGUAGE ScopedTypeVariables #-} > {-# LANGUAGE FlexibleInstances #-} > {-# LANGUAGE MultiParamTypeClasses #-} > import Database.MySQL.Simple > import Database.MySQL.Simple.QueryResults > import Database.MySQL.Simple.Result > > import Database.MySQL.Simple.QueryParams > import Database.MySQL.Simple.Param > > > import Control.Monad > import qualified Data.Text as Tx > import Debug.Trace > import Data.Maybe as Maybe > import Text.Read > import Data.Tuple.Extra > > > getAlphaDelta :: Connection -> String -> IO (Double,Double) > getAlphaDelta conn name = do > let qry_head_AlphaDelta_AngularDistance = "select alpha,delta > from AngularDistance where Nom = ?" :: Query > (alpha_delta_rows :: [(Double,Double)]) <- query conn > qry_head_AlphaDelta_AngularDistance (Only (name::String)) > return (head alpha_delta_rows) > > > main :: IO () > > main = > > do > conn <- connect defaultConnectInfo > { connectHost = "moita", > connectUser = "mattei", > connectPassword = "sidonie2", > connectDatabase = "sidonie" } > > > -- check getAlphaDelta works: > -- HERE getAlphaDelta WORKS > let name = "WOR 7" > putStrLn $ show name > ad <- getAlphaDelta conn name > putStr "ad =" > putStrLn $ show ad > > (names ::[Only Tx.Text])<- query_ conn "SELECT Nom FROM > AngularDistance WHERE distance > 0.000278" > > -- AFTER THE PREVIOUS LINE getAlphaDelta WILL NOT WORKS AND ISSUE A > SEGFAULT IN GHCI > let name3 = "A 7" > putStrLn $ show name3 > ad3 <- getAlphaDelta conn name3 > putStr "ad3 =" > putStrLn $ show ad3 > > > close conn > > > here is the output: > > [mattei at localhost Haskell]$ ghci > GHCi, version 8.2.2: http://www.haskell.org/ghc/ :? for help > Prelude> :load UpdateSidonie.hs > [1 of 1] Compiling Main ( UpdateSidonie.hs, interpreted ) > Ok, one module loaded. > *Main> main > "WOR 7" > ad =(17386.0,7120.0) > "A 7" > Segmentation fault (core dumped) > > as you see the first call to getAlphaDelta is ok but the second issue a > Segmentation fault. > > i will try now with ghci 8.4 .... and hiope to give you some news... > > Damien > > On Thu, Feb 21, 2019 at 8:15 PM Sven Panne wrote: > >> Am Do., 21. Feb. 2019 um 19:22 Uhr schrieb Damien Mattei < >> damien.mattei at gmail.com>: >> >>> i had attached the whole file, so anyone can read the whole code, >>> perheaps it could help, saying me if there is compilation error on other >>> ghc versions, with mine no error at compilation. >>> >> >> I very much doubt that anyone likes to read >500 lines of Haskell code >> with lots of external dependencies to help you with your problem. A good >> hint for Open Source SW in general: If you think you might have found a >> bug, cut down your example as much as possible, throw out as many external >> dependencies as you can while still reproducing your problem, then, and >> only then, post it to other people. You simply can't expect that other >> people will do that debugging work for you in their spare time. The code >> you post doesn't really have to make sense, it should just be the minimum >> amount of code needed to reproduce the problem. >> >> In a nutshell: The probability that you get some help is inversely >> proportional to the size of your example, and even more inversely >> proportional to the number of external dependencies (libraries etc.). >> >> >>> The problem to test is that without the database connection which is >>> behind a firewall of course ,the code can not be executed. [...] >>> >> >> Well, that is basically a show stopper for getting help... >> >> I don't want to be mean, quite the opposite: I just want to explain why >> you probably won't receive any help in the current form. This is not >> special to the Haskell community, the situation would be very much the same >> if you posted an equivalent problem of similar size to the >> Racket/Python/... community. I'm quite sure that most maintainer would be >> happy to have a look e.g. at a program consisting of a dozen lines without >> external dependencies. >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From svenpanne at gmail.com Fri Feb 22 11:35:03 2019 From: svenpanne at gmail.com (Sven Panne) Date: Fri, 22 Feb 2019 12:35:03 +0100 Subject: [Haskell-cafe] segfault depending on code position in source file In-Reply-To: References: Message-ID: Am Fr., 22. Feb. 2019 um 11:39 Uhr schrieb Damien Mattei < damien.mattei at gmail.com>: > [...] but i think it's the 8.2 compiler that cause the bug... > After a quick look at your code, I very much doubt that. You use the mysql-simple package, which in turn uses the mysql package, which in turn uses the native mysqlclient library. My (and probably most people's) reaction here is: It is much, much more probable that either a) you use the package/library incorrectly or b) the package/library has a bug than that you have discovered a compiler bug for otherwise farily trivial code. Your best bet is to either rip out the mysql dependencies and still reproduce the bug or issue a bug report at e.g. https://github.com/paul-rouse/mysql-simple/issues. Note that I'm not saying that GHC is bug-free, it is just a question where people will probably like to spend their time on. Given the fact that there are tons of buggy packages/libraries with questionable quality out there, it is basically *your* onus to show that your problem is GHC's fault. Just my 2c... > -------------- next part -------------- An HTML attachment was scrubbed... URL: From m at jaspervdj.be Fri Feb 22 13:27:11 2019 From: m at jaspervdj.be (Jasper Van der Jeugt) Date: Fri, 22 Feb 2019 14:27:11 +0100 Subject: [Haskell-cafe] [ANN] Haskell.Org Discourse Instance Message-ID: <20190222132711.GA10545@kakigori> Hello all, We would like to announce a new discourse-based forum for the Haskell community, at: https://discourse.haskell.org/ This is inspired by the Rust, Nix and Elm discourse instances, where these forums have had a strong positive effect on the community. We will run this as a "beta" for 6 months and then evaluate its usefulness. It is meant as an extra alternative to Haskell-cafe, reddit and Haskell IRC, but it does not replace any of those. Discourse is completely open source and easily accessible using an email client. We would like to thank the Haskell.Org admin team for provisioning a server and Matthew Pickering for suggesting this and doing the hard work setting up the instance. Warm regards, Jasper Van der Jeugt on behalf of the Haskell.Org Committee From S.J.Thompson at kent.ac.uk Fri Feb 22 13:29:18 2019 From: S.J.Thompson at kent.ac.uk (Simon Thompson) Date: Fri, 22 Feb 2019 14:29:18 +0100 Subject: [Haskell-cafe] Advert for: 12 fully-funded 3-year PhD scholarships at Kent References: <00651c1c-539d-a15a-9390-d7698e89b334@kent.ac.uk> Message-ID: <2919037E-4611-43C2-9070-BE2D4417A985@kent.ac.uk> The Programming Languages and Systems (PLAS) group at the University of Kent's School of Computing invites applications for 12 fully-funded 3-year PhD scholarships (for UK/EU students). Applications are due by the 26th April 2019. The PLAS group is one of the largest programming languages research groups in Europe. It is currently ranked 17th worldwide by the independent CSrankings website: http://csrankings.org/#/index?plan&world. We provide a supportive environment for research and we have a vibrant postgraduate population. We encourage our students to engage with the wider research community through attending conferences and taking internships with leading industrial companies. We are located in Canterbury, a lively and cosmopolitan historic town with convenient travel links to London and Europe. You can apply to study for a PhD in any topic that falls within our range of expertise. We have studentships up to a value of £19,945 per annum that are available by competition. Application process: Select a potential supervisor (see below) and send them an informal project proposal as well as a brief CV (preferably by the first week of April 2019). Staff contact details can be found on their web pages. Submit your formal applications through the university admission system by the 26th April 2019. Your application should include a completed online admission form; the name and contact details of two referees; an original document providing confirmation of your degree (or a transcript if the degree is not yet awarded). For non-native English speakers, a certificate of competence in English is required at IELTS 6.5 or higher, with no element less than 6.0 (or equivalent). Programming Languages and Systems Group: https://www.cs.kent.ac.uk/research/groups/plas/index.html Topics suggested by our group https://www.cs.kent.ac.uk/research/groups/plas/pgprojects.html Applications process: https://www.cs.kent.ac.uk/research/studyingforaphd/howtoapply.html For general inquiries about the process, please e-mail: cs-phd-plas at kent.ac.uk. PLAS is a large research group with potential supervisors who work across the breadth of programming languages and systems research. *Dr Mark Batty* (Additional scholarship: https://www.cs.kent.ac.uk/people/staff/mjb211/studentship/studentship.htm) Concurrency; software verification; systems; relaxed memory; programming language semantics; GPU concurrency. *Dr Laura Bocchi* Foundations and engineering of API with complex behaviour, verification of distributed concurrent systems; behavioural types; real-time systems; transactions and transaction protocols. *Dr Olaf Chitil* Tracing, semantics, algorithmic debugging, type error debugging, compilation and functional programming. *Dr Radu Grigore* Program analysis; runtime verification; probabilistic models of computation. *Dr Rogerio de Lemos* Software engineering for self-adaptive systems: assurances and resilience evaluation; architecting resilient systems. *Prof. Richard Jones* Language implementation; memory management; garbage collection; object demographics; program analysis for improved memory management; program visualisation, rigorous performance evaluation. *Dr Stefan Kahrs* Expressiveness of programming languages, type systems, term rewriting, infinitary rewriting. *Dr Stephen Kell* Language implementation, tools, interoperability, runtimes and operating systems. *Prof. Andy King* Abstract interpretation, logic programming, decompilation and reverse engineering *Dr Julien Lange* Process calculi, automata theory, behavioural types, model checking and their application to the implementation and verification of concurrent and distributed systems. *Dr Stefan Marr* Language implementation techniques, concurrency, parallel programming, optimizations, tooling, debugging, virtual machines, interpreters, compilation. *Dr Matteo Migliavacca* On-line data processing, distributed publish-subscribe, and high-performance event processing in large scale and cloud scenarios. *Dr Dominic Orchard* Mathematical structure of programs; logical foundations of programming; categorical semantics; behavioural type theories; programming language design; program verification for computational science. *Dr Scott Owens* Semantics of shared memory concurrency; design of programming languages; formal verification for software and interactive theorem proving, especially for CakeML (https://cakeml.org). *Dr Tomas Petricek* Programming languages and tools, especially for data science, studying interactions of programming, bridging the gap between data and types; foundations of programming in a broad sense, including design and human experience; philosophy and history of computing and programming. *Prof. Simon Thompson* Functional programming in Haskell, Erlang and OCaml; refactoring functional programs: tool building. theory and practice: dependently-typed functional programming; DLT: languages for smart contracts on blockchains, including Marlowe on Cardano. Simon Thompson | Professor of Logic and Computation School of Computing | University of Kent | Canterbury, CT2 7NF, UK s.j.thompson at kent.ac.uk | M +44 7986 085754 | W www.cs.kent.ac.uk/~sjt -------------- next part -------------- An HTML attachment was scrubbed... URL: From damien.mattei at gmail.com Fri Feb 22 14:09:11 2019 From: damien.mattei at gmail.com (Damien Mattei) Date: Fri, 22 Feb 2019 15:09:11 +0100 Subject: [Haskell-cafe] segfault depending on code position in source file In-Reply-To: References: Message-ID: it's not me that say first ghc can have bug. There is a misunderstanding, i first thought that if there was a problem it was not the core ghc interpreter/compiler (note that i never try to compile with ghc, possible the behavior is different in interpreter than in compile mode) but i had a lot of doubt about the stability of the mysql* packages. BUT i just made more test with the same mysql* package (version is the latest,just installed with cabal) on another system this time 32bits: [mattei at asteroide ~]$ uname -a Linux asteroide 3.10.0-862.3.3.el7.x86_64 #1 SMP Fri Jun 15 04:15:27 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux [mattei at asteroide ~]$ cat /etc/redhat-release CentOS Linux release 7.5.1804 (Core) [mattei at asteroide ~]$ ghci GHCi, version 8.4.3: http://www.haskell.org/ghc/ :? for help ghci version 8.4.3 and the program works fine, this does not means that the ghci v8.2 have bugs nor the mysql* packages , just means that there is some incompatibilies between ghc 8.2 and the latest versions of mysql* packages (mysql-simple-0.4.5) i think there is something that can be enhanced in the cabal or the package installion script of mysql* packages to detect those incompatibilities but i do not know how, perheaps if with cabal and ghc 8.2 i had installed an earlier verison of mysql* it could have worked without problem. Damien On Fri, Feb 22, 2019 at 12:35 PM Sven Panne wrote: > Am Fr., 22. Feb. 2019 um 11:39 Uhr schrieb Damien Mattei < > damien.mattei at gmail.com>: > >> [...] but i think it's the 8.2 compiler that cause the bug... >> > > After a quick look at your code, I very much doubt that. You use the > mysql-simple package, which in turn uses the mysql package, which in turn > uses the native mysqlclient library. My (and probably most people's) > reaction here is: It is much, much more probable that either > > a) you use the package/library incorrectly > > or > > b) the package/library has a bug > > than that you have discovered a compiler bug for otherwise farily trivial > code. Your best bet is to either rip out the mysql dependencies and still > reproduce the bug or issue a bug report at e.g. > https://github.com/paul-rouse/mysql-simple/issues. > > Note that I'm not saying that GHC is bug-free, it is just a question where > people will probably like to spend their time on. Given the fact that there > are tons of buggy packages/libraries with questionable quality out there, > it is basically *your* onus to show that your problem is GHC's fault. > > Just my 2c... > >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From erkokl at gmail.com Sun Feb 24 01:23:52 2019 From: erkokl at gmail.com (Levent Erkok) Date: Sat, 23 Feb 2019 17:23:52 -0800 Subject: [Haskell-cafe] Feedback on new warning for MINIMAL pragmas Message-ID: Dear Haskell enthusiasts: I recently came across a scenario where GHC's output confused me regarding MINIMAL pragmas, and filed a "feature request" for GHC: https://github.com/ghc-proposals/ghc-proposals/pull/210 Simon PJ asked me to turn it into a proposal to gather feedback: https://github.com/ghc-proposals/ghc-proposals/pull/210 Alas, it gathered no feedback so far, aside from Simon PJ and myself. It's a very simple change and hopefully one that is also very easy to implement. If you could take a moment to comment on the proposal (or better yet, volunteer to implement it!), it would be much appreciated. I'm always very pleasantly surprised on the thoughtfulness and the technical depth of the comments this community provides, and it would be nice to make sure there are no gotcha scenarios. To keep the traffic on the haskell-cafe low, please comment directly on the proposal itself. Thanks, -Levent. -------------- next part -------------- An HTML attachment was scrubbed... URL: From erkokl at gmail.com Sun Feb 24 01:25:38 2019 From: erkokl at gmail.com (Levent Erkok) Date: Sat, 23 Feb 2019 17:25:38 -0800 Subject: [Haskell-cafe] Feedback on new warning for MINIMAL pragmas In-Reply-To: References: Message-ID: Ah, failed to put in the link to the GHC ticket: https://ghc.haskell.org/trac/ghc/ticket/16314 But commenting directly on the proposal itself would be the most effective way to go about it. Sorry about the noise! -Levent. On Sat, Feb 23, 2019 at 5:23 PM Levent Erkok wrote: > Dear Haskell enthusiasts: > > I recently came across a scenario where GHC's output confused me regarding > MINIMAL pragmas, and filed a "feature request" for GHC: > > https://github.com/ghc-proposals/ghc-proposals/pull/210 > > Simon PJ asked me to turn it into a proposal to gather feedback: > > https://github.com/ghc-proposals/ghc-proposals/pull/210 > > Alas, it gathered no feedback so far, aside from Simon PJ and myself. It's > a very simple change and hopefully one that is also very easy to implement. > If you could take a moment to comment on the proposal (or better yet, > volunteer to implement it!), it would be much appreciated. I'm always very > pleasantly surprised on the thoughtfulness and the technical depth of the > comments this community provides, and it would be nice to make sure there > are no gotcha scenarios. > > To keep the traffic on the haskell-cafe low, please comment directly on > the proposal itself. > > Thanks, > > -Levent. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From leah at vuxu.org Sun Feb 24 18:45:12 2019 From: leah at vuxu.org (Leah Neukirchen) Date: Sun, 24 Feb 2019 19:45:12 +0100 Subject: [Haskell-cafe] Munich Haskell Meeting, 2019-02-26 @ 19:30 Message-ID: <87va19t493.fsf@vuxu.org> Dear all, Next week, our monthly Munich Haskell Meeting will take place again on Tuesday, February 26 at Rumpler 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 can reserve enough seats! It is OK to add yourself to the dudle anonymously or pseudonymously. https://dudle.inf.tu-dresden.de/haskell-munich-feb-2019/ Everybody is welcome! cu, -- Leah Neukirchen http://leah.zone From whosekiteneverfly at gmail.com Mon Feb 25 05:18:42 2019 From: whosekiteneverfly at gmail.com (Yuji Yamamoto) Date: Mon, 25 Feb 2019 14:18:42 +0900 Subject: [Haskell-cafe] Where should I report about https://www.haskell.org/ghc/ Message-ID: Hello Haskellers, I found a typo [in the download page of GHC][1]: the "Current Stable Release" section must be "8.6.3" instead of "8.6.2"! So I want to file an issue for the repository or sending a patch via pull request or merge request. But as long as I looking for https://gitlab.haskell.org/ghc/ghc , I can't get sure of where the download page is managed. Can you tell me where is the right place to report or how to send a patch? Thanks in advance! [1] https://www.haskell.org/ghc/download.html -- 山本悠滋 twitter: https://twitter.com/igrep GitHub: https://github.com/igrep GitLab: https://gitlab.com/igrep Facebook: http://www.facebook.com/igrep -------------- next part -------------- An HTML attachment was scrubbed... URL: From fa-ml at ariis.it Mon Feb 25 05:35:38 2019 From: fa-ml at ariis.it (Francesco Ariis) Date: Mon, 25 Feb 2019 06:35:38 +0100 Subject: [Haskell-cafe] Where should I report about https://www.haskell.org/ghc/ In-Reply-To: References: Message-ID: <20190225053538.d4nnbp3evzq5x65j@x60s.casa> Hello Yuji, On Mon, Feb 25, 2019 at 02:18:42PM +0900, Yuji Yamamoto wrote: > I found a typo [in the download page of GHC][1]: > the "Current Stable Release" section must be "8.6.3" instead of > "8.6.2"! [...] > Can you tell me where is the right place to report or how to send a patch? You can report bugs here https://ghc.haskell.org/trac/ghc/wiki/ReportABug From scooter.phd at gmail.com Mon Feb 25 06:07:23 2019 From: scooter.phd at gmail.com (Scott Michel) Date: Sun, 24 Feb 2019 22:07:23 -0800 Subject: [Haskell-cafe] generics-sop equivalent of everywhere/mkT? Message-ID: Before I cut down my code to a test case, are there any examples of a generics-sop equivalent of syb's everywhere/mkT? What's the way to operate on a product, replace the "I" argument with a compatible argument and walk back through the isomorphism, i.e. "to $ $ from". I'm hacking on a Z80 system emulator (TRS-80 Model I system, more specifically). There are a couple of places where it'd be smoother in the disassembler to transform the disassembled instruction sequence (converting addresses to labels) before output. Consequently, cutting down code to an example is a bit painful -- examples would help. -scooter -------------- next part -------------- An HTML attachment was scrubbed... URL: From godzbanebane at gmail.com Mon Feb 25 14:38:25 2019 From: godzbanebane at gmail.com (Georgi Lyubenov) Date: Mon, 25 Feb 2019 16:38:25 +0200 Subject: [Haskell-cafe] Coercible between data A a b = A a b and (a, b) Message-ID: Greetings! Is there any reason behind/what is the reason behind ``` data A a b = A a b ``` and ``` (a, b) ``` not being coercible? And in general all n-ary constructors not being coercible to one another? Thanks in advance! ======= Georgi -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.pelenitsyn at gmail.com Mon Feb 25 14:58:54 2019 From: a.pelenitsyn at gmail.com (Artem Pelenitsyn) Date: Mon, 25 Feb 2019 09:58:54 -0500 Subject: [Haskell-cafe] Where should I report about https://www.haskell.org/ghc/ In-Reply-To: References: Message-ID: Hello Yuji, I reported this thing a while ago on the ghc-devs mailing list. https://mail.haskell.org/pipermail/ghc-devs/2018-December/016711.html The bug was acknowledged but never addressed. I think, it's Ben who wanted to act on that but he got swamped by the GitLab migration. -- Best, Artem On Mon, 25 Feb 2019, 12:19 am Yuji Yamamoto, wrote: > Hello Haskellers, > > I found a typo [in the download page of GHC][1]: > the "Current Stable Release" section must be "8.6.3" instead of "8.6.2"! > So I want to file an issue for the repository or sending a patch via pull > request or merge request. > But as long as I looking for https://gitlab.haskell.org/ghc/ghc , > I can't get sure of where the download page is managed. > Can you tell me where is the right place to report or how to send a patch? > > Thanks in advance! > > [1] https://www.haskell.org/ghc/download.html > > -- > 山本悠滋 > twitter: https://twitter.com/igrep > GitHub: https://github.com/igrep > GitLab: https://gitlab.com/igrep > Facebook: http://www.facebook.com/igrep > _______________________________________________ > 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 oleg.grenrus at iki.fi Mon Feb 25 15:17:07 2019 From: oleg.grenrus at iki.fi (Oleg Grenrus) Date: Mon, 25 Feb 2019 17:17:07 +0200 Subject: [Haskell-cafe] Coercible between data A a b = A a b and (a, b) In-Reply-To: References: Message-ID: <79ADCC30-CCC9-4FEB-A055-C2C3584016B9@iki.fi> Two data types are `Coercible` (as in Data.Coerce) if their representation in memory is the same: they are representiationally equivalent You ask for looser structural isomorphism, consider e.g. data B b = B {-# UNPACK #-} !Int b and (Int, b) The values of these types have quite different representation/memory layout. - Oleg > On 25 Feb 2019, at 16.38, Georgi Lyubenov wrote: > > Greetings! > > Is there any reason behind/what is the reason behind > ``` > data A a b = A a b > ``` > and > ``` > (a, b) > ``` > > not being coercible? > > And in general all n-ary constructors not being coercible to one another? > > Thanks in advance! > > ======= > Georgi > _______________________________________________ > 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 allbery.b at gmail.com Mon Feb 25 17:22:10 2019 From: allbery.b at gmail.com (Brandon Allbery) Date: Mon, 25 Feb 2019 12:22:10 -0500 Subject: [Haskell-cafe] Coercible between data A a b = A a b and (a, b) In-Reply-To: <79ADCC30-CCC9-4FEB-A055-C2C3584016B9@iki.fi> References: <79ADCC30-CCC9-4FEB-A055-C2C3584016B9@iki.fi> Message-ID: Also worth remembering here is that ghc will often unpack such things if it can determine it can do so (but only with optimization iirc), so there is no guarantee that the two will be representationally equivalent even without pragmas. On Mon, Feb 25, 2019 at 10:17 AM Oleg Grenrus wrote: > Two data types are `Coercible` (as in Data.Coerce) if their representation > in memory is the same: they are representiationally equivalent You ask for > looser structural isomorphism, consider e.g. > > data B b = B {-# UNPACK #-} !Int b > > and > > (Int, b) > > The values of these types have quite different representation/memory > layout. > > - Oleg > > On 25 Feb 2019, at 16.38, Georgi Lyubenov wrote: > > Greetings! > > Is there any reason behind/what is the reason behind > ``` > data A a b = A a b > ``` > and > ``` > (a, b) > ``` > > not being coercible? > > And in general all n-ary constructors not being coercible to one another? > > Thanks in advance! > > ======= > Georgi > > _______________________________________________ > 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. -- brandon s allbery kf8nh allbery.b at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From allbery.b at gmail.com Mon Feb 25 17:23:32 2019 From: allbery.b at gmail.com (Brandon Allbery) Date: Mon, 25 Feb 2019 12:23:32 -0500 Subject: [Haskell-cafe] Where should I report about https://www.haskell.org/ghc/ In-Reply-To: References: Message-ID: Which is still being a bit swampy, so there may be more delay. (Ticket migration still ongoing, for one.) On Mon, Feb 25, 2019 at 9:59 AM Artem Pelenitsyn wrote: > Hello Yuji, > > I reported this thing a while ago on the ghc-devs mailing list. > > https://mail.haskell.org/pipermail/ghc-devs/2018-December/016711.html > > The bug was acknowledged but never addressed. I think, it's Ben who wanted > to act on that but he got swamped by the GitLab migration. > > -- > Best, Artem > > On Mon, 25 Feb 2019, 12:19 am Yuji Yamamoto, > wrote: > >> Hello Haskellers, >> >> I found a typo [in the download page of GHC][1]: >> the "Current Stable Release" section must be "8.6.3" instead of "8.6.2"! >> So I want to file an issue for the repository or sending a patch via pull >> request or merge request. >> But as long as I looking for https://gitlab.haskell.org/ghc/ghc , >> I can't get sure of where the download page is managed. >> Can you tell me where is the right place to report or how to send a patch? >> >> Thanks in advance! >> >> [1] https://www.haskell.org/ghc/download.html >> >> -- >> 山本悠滋 >> twitter: https://twitter.com/igrep >> GitHub: https://github.com/igrep >> GitLab: https://gitlab.com/igrep >> Facebook: http://www.facebook.com/igrep >> _______________________________________________ >> 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. -- brandon s allbery kf8nh allbery.b at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From whosekiteneverfly at gmail.com Mon Feb 25 23:08:07 2019 From: whosekiteneverfly at gmail.com (Yuji Yamamoto) Date: Tue, 26 Feb 2019 08:08:07 +0900 Subject: [Haskell-cafe] Where should I report about https://www.haskell.org/ghc/ In-Reply-To: References: Message-ID: Francesco, Artem, and Brandon, Thanks all! I'll be patiently waiting. 2019年2月26日(火) 2:23 Brandon Allbery : > Which is still being a bit swampy, so there may be more delay. (Ticket > migration still ongoing, for one.) > > On Mon, Feb 25, 2019 at 9:59 AM Artem Pelenitsyn > wrote: > >> Hello Yuji, >> >> I reported this thing a while ago on the ghc-devs mailing list. >> >> https://mail.haskell.org/pipermail/ghc-devs/2018-December/016711.html >> >> The bug was acknowledged but never addressed. I think, it's Ben who >> wanted to act on that but he got swamped by the GitLab migration. >> >> -- >> Best, Artem >> >> On Mon, 25 Feb 2019, 12:19 am Yuji Yamamoto, >> wrote: >> >>> Hello Haskellers, >>> >>> I found a typo [in the download page of GHC][1]: >>> the "Current Stable Release" section must be "8.6.3" instead of "8.6.2"! >>> So I want to file an issue for the repository or sending a patch via >>> pull request or merge request. >>> But as long as I looking for https://gitlab.haskell.org/ghc/ghc , >>> I can't get sure of where the download page is managed. >>> Can you tell me where is the right place to report or how to send a >>> patch? >>> >>> Thanks in advance! >>> >>> [1] https://www.haskell.org/ghc/download.html >>> >>> -- >>> 山本悠滋 >>> twitter: https://twitter.com/igrep >>> GitHub: https://github.com/igrep >>> GitLab: https://gitlab.com/igrep >>> Facebook: http://www.facebook.com/igrep >>> _______________________________________________ >>> 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. > > > > -- > brandon s allbery kf8nh > allbery.b at gmail.com > -- 山本悠滋 twitter: https://twitter.com/igrep GitHub: https://github.com/igrep GitLab: https://gitlab.com/igrep Facebook: http://www.facebook.com/igrep -------------- next part -------------- An HTML attachment was scrubbed... URL: From scooter.phd at gmail.com Tue Feb 26 00:51:58 2019 From: scooter.phd at gmail.com (Scott Michel) Date: Mon, 25 Feb 2019 16:51:58 -0800 Subject: [Haskell-cafe] generics-sop equivalent of everywhere/mkT? In-Reply-To: References: Message-ID: Here's the cut down code. I'd like to replace the "everywhere (mkT fixupSymbol)" in the main with an equivalent Generics.SOP construction, which effectively recurses into the product to replace/transform the AbsAddr with a SymAddr if the hash table lookup succeeds. While I don't object to SYB, it seems awkward to "mix and match" the two generic libraries. V/R -scooter {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE DeriveDataTypeable #-} module Main where import Data.Data import Data.Foldable (foldl) import Data.Int import Data.Word (Word8, Word16) import Data.Text (Text) import qualified Data.Text as T import qualified Data.Text.IO as T import Text.Printf import Generics.SOP import Generics.SOP.TH (deriveGeneric) import Data.Generics.Aliases (mkT) import Data.Generics.Schemes (everywhere) import Data.HashMap.Strict (HashMap) import qualified Data.HashMap.Strict as H import Data.Sequence (Seq, (><), (|>)) import qualified Data.Sequence as Seq type Z80addr = Word16 type Z80word = Word8 class Z80operand x where formatOperand :: x -> Text main :: IO() main = mapM_ T.putStrLn (foldl printIns Seq.empty $ everywhere (mkT fixupSymbol) insnSeq) -- -------------------------------------------------^ Does this have a Generics.SOP equivalent? where printIns accum ins = accum |> T.concat ([mnemonic, gFormatOperands] <*> [ins]) mnemonic (LD _) = "LD " mnemonic (CALL _) = "CALL " -- Generics.SOP: Fairly straightforward gFormatOperands {-elt-} = T.intercalate ", " . hcollapse . hcmap disOperandProxy (mapIK formatOperand) . from {-elt-} where disOperandProxy = Proxy :: Proxy Z80operand -- Translate an absolute address, generally hidden inside an instruction operand, into a symbolic address -- if present in the symbol table. fixupSymbol addr@(AbsAddr absAddr) = maybe addr SymAddr (absAddr `H.lookup` symtab) fixupSymbol other = other insnSeq :: Seq Z80instruction insnSeq = Seq.singleton (LD (Reg8Imm B 0x0)) |> (LD (Reg8Indirect C (AbsAddr 0x1234))) |> (CALL (AbsAddr 0x4567)) symtab :: HashMap Z80addr Text symtab = H.fromList [ (0x1234, "label1"), (0x4567, "label2")] -- | Symbolic and absolute addresses. Absolute addresses can be translated into symbolic -- labels. data SymAbsAddr = AbsAddr Z80addr | SymAddr Text deriving (Eq, Ord, Typeable, Data) data Z80reg8 = A | B | C deriving (Eq, Ord, Typeable, Data) -- | Cut down version of the Z80 instruction set data Z80instruction = LD OperLD | CALL SymAbsAddr deriving (Eq, Ord, Typeable, Data) -- | Load operands data OperLD = Reg8Imm Z80reg8 Z80word | Reg8Indirect Z80reg8 SymAbsAddr deriving (Eq, Ord, Typeable, Data) $(deriveGeneric ''SymAbsAddr) $(deriveGeneric ''Z80reg8) $(deriveGeneric ''Z80instruction) $(deriveGeneric ''OperLD) instance Z80operand Z80word where formatOperand word = T.pack $ printf "0x%04x" word instance Z80operand SymAbsAddr where formatOperand (AbsAddr addr) = T.pack $ printf "0x04x" addr formatOperand (SymAddr label) = label instance Z80operand Z80reg8 where formatOperand A = "A" formatOperand B = "B" formatOperand C = "C" instance Z80operand OperLD where formatOperand (Reg8Imm reg imm) = T.concat [formatOperand reg, ", ", formatOperand imm] formatOperand (Reg8Indirect reg addr) = T.concat [formatOperand reg, ", ", formatOperand addr] On Sun, Feb 24, 2019 at 10:07 PM Scott Michel wrote: > Before I cut down my code to a test case, are there any examples of a > generics-sop equivalent of syb's everywhere/mkT? What's the way to operate > on a product, replace the "I" argument with a compatible argument and walk > back through the isomorphism, i.e. "to $ $ from". > > I'm hacking on a Z80 system emulator (TRS-80 Model I system, more > specifically). There are a couple of places where it'd be smoother in the > disassembler to transform the disassembled instruction sequence (converting > addresses to labels) before output. Consequently, cutting down code to an > example is a bit painful -- examples would help. > > > -scooter > -------------- next part -------------- An HTML attachment was scrubbed... URL: From scooter.phd at gmail.com Tue Feb 26 01:36:34 2019 From: scooter.phd at gmail.com (Scott Michel) Date: Mon, 25 Feb 2019 17:36:34 -0800 Subject: [Haskell-cafe] generics-sop equivalent of everywhere/mkT? In-Reply-To: References: Message-ID: The corresponding gensop.cabal: cabal-version: >= 1.12 name: gensop version: 0.1 build-type: Simple description: No description. license: GPL-3 executable gensop default-language: Haskell2010 main-is: Main.hs build-depends: base, containers, bytestring, generics-sop, syb, text, unordered-containers default-extensions: OverloadedStrings, FlexibleInstances ghc-options: -Wall On Mon, Feb 25, 2019 at 4:51 PM Scott Michel wrote: > Here's the cut down code. I'd like to replace the "everywhere (mkT > fixupSymbol)" in the main with an equivalent Generics.SOP construction, > which effectively recurses into the product to replace/transform the > AbsAddr with a SymAddr if the hash table lookup succeeds. While I don't > object to SYB, it seems awkward to "mix and match" the two generic > libraries. > > > V/R > -scooter > > {-# LANGUAGE DataKinds #-} > {-# LANGUAGE TypeFamilies #-} > {-# LANGUAGE TemplateHaskell #-} > {-# LANGUAGE DeriveDataTypeable #-} > > module Main where > > import Data.Data > import Data.Foldable (foldl) > import Data.Int > import Data.Word (Word8, Word16) > import Data.Text (Text) > import qualified Data.Text as T > import qualified Data.Text.IO as T > import Text.Printf > import Generics.SOP > import Generics.SOP.TH (deriveGeneric) > import Data.Generics.Aliases (mkT) > import Data.Generics.Schemes (everywhere) > import Data.HashMap.Strict (HashMap) > import qualified Data.HashMap.Strict as H > import Data.Sequence (Seq, (><), (|>)) > import qualified Data.Sequence as Seq > > > type Z80addr = Word16 > type Z80word = Word8 > > class Z80operand x where > formatOperand :: x -> Text > > main :: IO() > main = mapM_ T.putStrLn (foldl printIns Seq.empty $ everywhere (mkT > fixupSymbol) insnSeq) > -- -------------------------------------------------^ Does this have a > Generics.SOP equivalent? > where > printIns accum ins = accum |> T.concat ([mnemonic, gFormatOperands] > <*> [ins]) > > mnemonic (LD _) = "LD " > mnemonic (CALL _) = "CALL " > > -- Generics.SOP: Fairly straightforward > gFormatOperands {-elt-} = > T.intercalate ", " . hcollapse . hcmap disOperandProxy (mapIK > formatOperand) . from {-elt-} > where > disOperandProxy = Proxy :: Proxy Z80operand > > -- Translate an absolute address, generally hidden inside an > instruction operand, into a symbolic address > -- if present in the symbol table. > fixupSymbol addr@(AbsAddr absAddr) = maybe addr SymAddr (absAddr > `H.lookup` symtab) > fixupSymbol other = other > > insnSeq :: Seq Z80instruction > insnSeq = Seq.singleton (LD (Reg8Imm B 0x0)) > |> (LD (Reg8Indirect C (AbsAddr 0x1234))) > |> (CALL (AbsAddr 0x4567)) > > symtab :: HashMap Z80addr Text > symtab = H.fromList [ (0x1234, "label1"), (0x4567, "label2")] > > -- | Symbolic and absolute addresses. Absolute addresses can be translated > into symbolic > -- labels. > data SymAbsAddr = AbsAddr Z80addr | SymAddr Text > deriving (Eq, Ord, Typeable, Data) > > data Z80reg8 = A | B | C > deriving (Eq, Ord, Typeable, Data) > > -- | Cut down version of the Z80 instruction set > data Z80instruction = LD OperLD | CALL SymAbsAddr > deriving (Eq, Ord, Typeable, Data) > > -- | Load operands > data OperLD = Reg8Imm Z80reg8 Z80word | Reg8Indirect Z80reg8 SymAbsAddr > deriving (Eq, Ord, Typeable, Data) > > $(deriveGeneric ''SymAbsAddr) > $(deriveGeneric ''Z80reg8) > $(deriveGeneric ''Z80instruction) > $(deriveGeneric ''OperLD) > > instance Z80operand Z80word where > formatOperand word = T.pack $ printf "0x%04x" word > > instance Z80operand SymAbsAddr where > formatOperand (AbsAddr addr) = T.pack $ printf "0x04x" addr > formatOperand (SymAddr label) = label > > instance Z80operand Z80reg8 where > formatOperand A = "A" > formatOperand B = "B" > formatOperand C = "C" > > instance Z80operand OperLD where > formatOperand (Reg8Imm reg imm) = T.concat [formatOperand reg, ", ", > formatOperand imm] > formatOperand (Reg8Indirect reg addr) = T.concat [formatOperand reg, ", > ", formatOperand addr] > > > On Sun, Feb 24, 2019 at 10:07 PM Scott Michel > wrote: > >> Before I cut down my code to a test case, are there any examples of a >> generics-sop equivalent of syb's everywhere/mkT? What's the way to operate >> on a product, replace the "I" argument with a compatible argument and walk >> back through the isomorphism, i.e. "to $ $ from". >> >> I'm hacking on a Z80 system emulator (TRS-80 Model I system, more >> specifically). There are a couple of places where it'd be smoother in the >> disassembler to transform the disassembled instruction sequence (converting >> addresses to labels) before output. Consequently, cutting down code to an >> example is a bit painful -- examples would help. >> >> >> -scooter >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lysxia at gmail.com Tue Feb 26 02:23:41 2019 From: lysxia at gmail.com (Li-yao Xia) Date: Mon, 25 Feb 2019 21:23:41 -0500 Subject: [Haskell-cafe] generics-sop equivalent of everywhere/mkT? In-Reply-To: References: Message-ID: I don't know about generics-sop examples, but the `types` traversal in generic-lens comes close. That could be a source of inspiration if you're considering implementing such deep traversals with SOP. http://hackage.haskell.org/package/generic-lens-1.1.0.0/docs/Data-Generics-Product-Types.html Li-yao On 2/25/19 8:36 PM, Scott Michel wrote: > The corresponding gensop.cabal: > > cabal-version: >= 1.12 > name: gensop > version: 0.1 > build-type: Simple > description: No description. > license: GPL-3 > > executable gensop > default-language: Haskell2010 > main-is: Main.hs > build-depends: > base, > containers, > bytestring, > generics-sop, > syb, > text, > unordered-containers > > default-extensions: > OverloadedStrings, > FlexibleInstances > > ghc-options: -Wall > > > On Mon, Feb 25, 2019 at 4:51 PM Scott Michel wrote: > >> Here's the cut down code. I'd like to replace the "everywhere (mkT >> fixupSymbol)" in the main with an equivalent Generics.SOP construction, >> which effectively recurses into the product to replace/transform the >> AbsAddr with a SymAddr if the hash table lookup succeeds. While I don't >> object to SYB, it seems awkward to "mix and match" the two generic >> libraries. >> >> >> V/R >> -scooter >> >> {-# LANGUAGE DataKinds #-} >> {-# LANGUAGE TypeFamilies #-} >> {-# LANGUAGE TemplateHaskell #-} >> {-# LANGUAGE DeriveDataTypeable #-} >> >> module Main where >> >> import Data.Data >> import Data.Foldable (foldl) >> import Data.Int >> import Data.Word (Word8, Word16) >> import Data.Text (Text) >> import qualified Data.Text as T >> import qualified Data.Text.IO as T >> import Text.Printf >> import Generics.SOP >> import Generics.SOP.TH (deriveGeneric) >> import Data.Generics.Aliases (mkT) >> import Data.Generics.Schemes (everywhere) >> import Data.HashMap.Strict (HashMap) >> import qualified Data.HashMap.Strict as H >> import Data.Sequence (Seq, (><), (|>)) >> import qualified Data.Sequence as Seq >> >> >> type Z80addr = Word16 >> type Z80word = Word8 >> >> class Z80operand x where >> formatOperand :: x -> Text >> >> main :: IO() >> main = mapM_ T.putStrLn (foldl printIns Seq.empty $ everywhere (mkT >> fixupSymbol) insnSeq) >> -- -------------------------------------------------^ Does this have a >> Generics.SOP equivalent? >> where >> printIns accum ins = accum |> T.concat ([mnemonic, gFormatOperands] >> <*> [ins]) >> >> mnemonic (LD _) = "LD " >> mnemonic (CALL _) = "CALL " >> >> -- Generics.SOP: Fairly straightforward >> gFormatOperands {-elt-} = >> T.intercalate ", " . hcollapse . hcmap disOperandProxy (mapIK >> formatOperand) . from {-elt-} >> where >> disOperandProxy = Proxy :: Proxy Z80operand >> >> -- Translate an absolute address, generally hidden inside an >> instruction operand, into a symbolic address >> -- if present in the symbol table. >> fixupSymbol addr@(AbsAddr absAddr) = maybe addr SymAddr (absAddr >> `H.lookup` symtab) >> fixupSymbol other = other >> >> insnSeq :: Seq Z80instruction >> insnSeq = Seq.singleton (LD (Reg8Imm B 0x0)) >> |> (LD (Reg8Indirect C (AbsAddr 0x1234))) >> |> (CALL (AbsAddr 0x4567)) >> >> symtab :: HashMap Z80addr Text >> symtab = H.fromList [ (0x1234, "label1"), (0x4567, "label2")] >> >> -- | Symbolic and absolute addresses. Absolute addresses can be translated >> into symbolic >> -- labels. >> data SymAbsAddr = AbsAddr Z80addr | SymAddr Text >> deriving (Eq, Ord, Typeable, Data) >> >> data Z80reg8 = A | B | C >> deriving (Eq, Ord, Typeable, Data) >> >> -- | Cut down version of the Z80 instruction set >> data Z80instruction = LD OperLD | CALL SymAbsAddr >> deriving (Eq, Ord, Typeable, Data) >> >> -- | Load operands >> data OperLD = Reg8Imm Z80reg8 Z80word | Reg8Indirect Z80reg8 SymAbsAddr >> deriving (Eq, Ord, Typeable, Data) >> >> $(deriveGeneric ''SymAbsAddr) >> $(deriveGeneric ''Z80reg8) >> $(deriveGeneric ''Z80instruction) >> $(deriveGeneric ''OperLD) >> >> instance Z80operand Z80word where >> formatOperand word = T.pack $ printf "0x%04x" word >> >> instance Z80operand SymAbsAddr where >> formatOperand (AbsAddr addr) = T.pack $ printf "0x04x" addr >> formatOperand (SymAddr label) = label >> >> instance Z80operand Z80reg8 where >> formatOperand A = "A" >> formatOperand B = "B" >> formatOperand C = "C" >> >> instance Z80operand OperLD where >> formatOperand (Reg8Imm reg imm) = T.concat [formatOperand reg, ", ", >> formatOperand imm] >> formatOperand (Reg8Indirect reg addr) = T.concat [formatOperand reg, ", >> ", formatOperand addr] >> >> >> On Sun, Feb 24, 2019 at 10:07 PM Scott Michel >> wrote: >> >>> Before I cut down my code to a test case, are there any examples of a >>> generics-sop equivalent of syb's everywhere/mkT? What's the way to operate >>> on a product, replace the "I" argument with a compatible argument and walk >>> back through the isomorphism, i.e. "to $ $ from". >>> >>> I'm hacking on a Z80 system emulator (TRS-80 Model I system, more >>> specifically). There are a couple of places where it'd be smoother in the >>> disassembler to transform the disassembled instruction sequence (converting >>> addresses to labels) before output. Consequently, cutting down code to an >>> example is a bit painful -- examples would help. >>> >>> >>> -scooter >>> >> > > > _______________________________________________ > 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 m at jaspervdj.be Tue Feb 26 20:30:59 2019 From: m at jaspervdj.be (Jasper Van der Jeugt) Date: Tue, 26 Feb 2019 15:30:59 -0500 Subject: [Haskell-cafe] Haskell.Org accepted for GSoC 2019 Message-ID: <20190226203059.GB1129@kakigori> Hi all, We're very excited to announce that Haskell.Org has been accepted [1] into the Google Summer of Code 2019 program [2]. We hope that, like last year, it will lead to a whole range of improvements to the Haskell ecosystem, and to new faces joining our community! We would like to thank everyone who submitted ideas -- this is a key part of being accepted into GSoC. Now, here's the near term timeline: - Today - March 25: Potential student participants discuss application ideas with mentors - March 25 - April 9: Students can submit applications - May 6: Accepted student proposals announced At this point, we're looking for both students and extra mentors. We would like to assign at least two mentors to each project if possible, so the students get the support they deserve. Additional ideas for projects are still welcome! There's a lot of information on our Summer of Haskell page [3]. If there are any students who are not sure where to begin, feel free to reach out to us directly [4]! [1]: https://summerofcode.withgoogle.com/organizations/5556388114202624/ [2]: https://summerofcode.withgoogle.com/ [3]: https://summer.haskell.org/ [4]: https://summer.haskell.org/contact.html Warm regards Jasper Van der Jeugt on behalf of the Haskell.Org Committee From damien.mattei at gmail.com Wed Feb 27 09:56:15 2019 From: damien.mattei at gmail.com (Damien Mattei) Date: Wed, 27 Feb 2019 10:56:15 +0100 Subject: [Haskell-cafe] example of monad from http://learnyouahaskell.com not working Message-ID: i'm trying this example (see code below) from : http://learnyouahaskell.com/for-a-few-monads-more#making-monads when trying to compile this: import Data.Ratio newtype Prob a = Prob { getProb :: [(a,Rational)] } deriving Show instance Functor Prob where fmap f (Prob xs) = Prob $ map (\(x,p) -> (f x,p)) xs thisSituation :: Prob (Prob Char) thisSituation = Prob [( Prob [('a',1%2),('b',1%2)] , 1%4 ) ,( Prob [('c',1%2),('d',1%2)] , 3%4) ] flatten :: Prob (Prob a) -> Prob a flatten (Prob xs) = Prob $ concat $ map multAll xs where multAll (Prob innerxs,p) = map (\(x,r) -> (x,p*r)) innerxs instance Monad Prob where return x = Prob [(x,1%1)] m >>= f = flatten (fmap f m) fail _ = Prob [] l1 = Prob [('a',2%3),('b',1%3)] multAllExt :: (Prob a, Rational) -> [(a, Rational)] multAllExt (Prob innerxs,p) = map (\(x,r) -> (x,p*r)) innerxs --Main> :type multAllExt --multAllExt :: (Prob a, Rational) -> [(a, Rational)] --Main> multAllExt (l1,1 % 4) --[('a',1 % 6),('b',1 % 12)] i get this error: GHCi, version 8.4.3: http://www.haskell.org/ghc/ :? for help Prelude> :load monade.hs [1 of 1] Compiling Main ( monade.hs, interpreted ) monade.hs:21:10: error: • No instance for (Applicative Prob) arising from the superclasses of an instance declaration • In the instance declaration for ‘Monad Prob’ | 21 | instance Monad Prob where | ^^^^^^^^^^ Failed, no modules loaded. it fails when i add the last part of the example: instance Monad Prob where return x = Prob [(x,1%1)] m >>= f = flatten (fmap f m) fail _ = Prob [] seems the Monad needs an instance of the Applicative to be instanciated... what is wrong? regards, Damien -------------- next part -------------- An HTML attachment was scrubbed... URL: From whosekiteneverfly at gmail.com Wed Feb 27 10:09:56 2019 From: whosekiteneverfly at gmail.com (Yuji Yamamoto) Date: Wed, 27 Feb 2019 19:09:56 +0900 Subject: [Haskell-cafe] example of monad from http://learnyouahaskell.com not working In-Reply-To: References: Message-ID: It's the one of the biggest changes of Haskell since LYHG was released. As you guess, now any instance of Monad must be an instance of Applicative. So you have to declare Prob as an instance of Applicative: instance Applicative Prob where pure = ... f <*> x = ... 2019年2月27日(水) 18:56 Damien Mattei : > i'm trying this example (see code below) from : > http://learnyouahaskell.com/for-a-few-monads-more#making-monads > > when trying to compile this: > > import Data.Ratio > > newtype Prob a = Prob { getProb :: [(a,Rational)] } deriving Show > > > instance Functor Prob where > fmap f (Prob xs) = Prob $ map (\(x,p) -> (f x,p)) xs > > > thisSituation :: Prob (Prob Char) > thisSituation = Prob > [( Prob [('a',1%2),('b',1%2)] , 1%4 ) > ,( Prob [('c',1%2),('d',1%2)] , 3%4) > ] > > flatten :: Prob (Prob a) -> Prob a > flatten (Prob xs) = Prob $ concat $ map multAll xs > where multAll (Prob innerxs,p) = map (\(x,r) -> (x,p*r)) innerxs > > > instance Monad Prob where > return x = Prob [(x,1%1)] > m >>= f = flatten (fmap f m) > fail _ = Prob [] > > > > l1 = Prob [('a',2%3),('b',1%3)] > > multAllExt :: (Prob a, Rational) -> [(a, Rational)] > multAllExt (Prob innerxs,p) = map (\(x,r) -> (x,p*r)) innerxs > > --Main> :type multAllExt > --multAllExt :: (Prob a, Rational) -> [(a, Rational)] > > > --Main> multAllExt (l1,1 % 4) > --[('a',1 % 6),('b',1 % 12)] > > > i get this error: > > GHCi, version 8.4.3: http://www.haskell.org/ghc/ :? for help > Prelude> :load monade.hs > [1 of 1] Compiling Main ( monade.hs, interpreted ) > > monade.hs:21:10: error: > • No instance for (Applicative Prob) > arising from the superclasses of an instance declaration > • In the instance declaration for ‘Monad Prob’ > | > 21 | instance Monad Prob where > | ^^^^^^^^^^ > Failed, no modules loaded. > > it fails when i add the last part of the example: > > instance Monad Prob where > return x = Prob [(x,1%1)] > m >>= f = flatten (fmap f m) > fail _ = Prob [] > > > seems the Monad needs an instance of the Applicative to be instanciated... > > what is wrong? > > regards, > Damien > _______________________________________________ > 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. -- 山本悠滋 twitter: https://twitter.com/igrep GitHub: https://github.com/igrep GitLab: https://gitlab.com/igrep Facebook: http://www.facebook.com/igrep -------------- next part -------------- An HTML attachment was scrubbed... URL: From sylvain at haskus.fr Wed Feb 27 10:10:47 2019 From: sylvain at haskus.fr (Sylvain Henry) Date: Wed, 27 Feb 2019 11:10:47 +0100 Subject: [Haskell-cafe] example of monad from http://learnyouahaskell.com not working In-Reply-To: References: Message-ID: <1a1dfb65-94ab-df61-ef55-cf0fae81171e@haskus.fr> That's because Applicative is now a superclass of Monad. See the rationale here: https://wiki.haskell.org/Functor-Applicative-Monad_Proposal On 27/02/2019 10:56, Damien Mattei wrote: > i'm trying this example (see code below) from : > http://learnyouahaskell.com/for-a-few-monads-more#making-monads > > when trying to compile this: > > import Data.Ratio > > newtype Prob a = Prob { getProb :: [(a,Rational)] } deriving Show > > > instance Functor Prob where >     fmap f (Prob xs) = Prob $ map (\(x,p) -> (f x,p)) xs > > > thisSituation :: Prob (Prob Char) > thisSituation = Prob >     [( Prob [('a',1%2),('b',1%2)] , 1%4 ) >     ,( Prob [('c',1%2),('d',1%2)] , 3%4) >     ] > > flatten :: Prob (Prob a) -> Prob a > flatten (Prob xs) = Prob $ concat $ map multAll xs >     where multAll (Prob innerxs,p) = map (\(x,r) -> (x,p*r)) innerxs > > > instance Monad Prob where >   return x = Prob [(x,1%1)] >   m >>= f = flatten (fmap f m) >   fail _ = Prob [] > > > > l1 = Prob [('a',2%3),('b',1%3)] > > multAllExt :: (Prob a, Rational) -> [(a, Rational)] > multAllExt (Prob innerxs,p) = map (\(x,r) -> (x,p*r)) innerxs > > --Main> :type multAllExt > --multAllExt :: (Prob a, Rational) -> [(a, Rational)] > > > --Main> multAllExt (l1,1 % 4) > --[('a',1 % 6),('b',1 % 12)] > > > i get this error: > > GHCi, version 8.4.3: http://www.haskell.org/ghc/ :? for help > Prelude> :load monade.hs > [1 of 1] Compiling Main             ( monade.hs, interpreted ) > > monade.hs:21:10: error: >     • No instance for (Applicative Prob) >         arising from the superclasses of an instance declaration >     • In the instance declaration for ‘Monad Prob’ >    | > 21 | instance Monad Prob where >    |          ^^^^^^^^^^ > Failed, no modules loaded. > > it fails when i add the last part of the example: > > instance Monad Prob where >   return x = Prob [(x,1%1)] >   m >>= f = flatten (fmap f m) >   fail _ = Prob [] > > > seems the Monad needs an instance of the Applicative to be instanciated... > > what is wrong? > > regards, > Damien > > _______________________________________________ > 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 damien.mattei at gmail.com Wed Feb 27 10:53:59 2019 From: damien.mattei at gmail.com (Damien Mattei) Date: Wed, 27 Feb 2019 11:53:59 +0100 Subject: [Haskell-cafe] example of monad from http://learnyouahaskell.com not working In-Reply-To: References: Message-ID: can you give me a complete solution please? i suppose i can set pure = return but have some diffculties with <*> , ap does not works On Wed, Feb 27, 2019 at 11:10 AM Yuji Yamamoto wrote: > It's the one of the biggest changes of Haskell since LYHG was released. > As you guess, now any instance of Monad must be an instance of Applicative. > > So you have to declare Prob as an instance of Applicative: > > instance Applicative Prob where > pure = ... > f <*> x = ... > > > 2019年2月27日(水) 18:56 Damien Mattei : > >> i'm trying this example (see code below) from : >> http://learnyouahaskell.com/for-a-few-monads-more#making-monads >> >> when trying to compile this: >> >> import Data.Ratio >> >> newtype Prob a = Prob { getProb :: [(a,Rational)] } deriving Show >> >> >> instance Functor Prob where >> fmap f (Prob xs) = Prob $ map (\(x,p) -> (f x,p)) xs >> >> >> thisSituation :: Prob (Prob Char) >> thisSituation = Prob >> [( Prob [('a',1%2),('b',1%2)] , 1%4 ) >> ,( Prob [('c',1%2),('d',1%2)] , 3%4) >> ] >> >> flatten :: Prob (Prob a) -> Prob a >> flatten (Prob xs) = Prob $ concat $ map multAll xs >> where multAll (Prob innerxs,p) = map (\(x,r) -> (x,p*r)) innerxs >> >> >> instance Monad Prob where >> return x = Prob [(x,1%1)] >> m >>= f = flatten (fmap f m) >> fail _ = Prob [] >> >> >> >> l1 = Prob [('a',2%3),('b',1%3)] >> >> multAllExt :: (Prob a, Rational) -> [(a, Rational)] >> multAllExt (Prob innerxs,p) = map (\(x,r) -> (x,p*r)) innerxs >> >> --Main> :type multAllExt >> --multAllExt :: (Prob a, Rational) -> [(a, Rational)] >> >> >> --Main> multAllExt (l1,1 % 4) >> --[('a',1 % 6),('b',1 % 12)] >> >> >> i get this error: >> >> GHCi, version 8.4.3: http://www.haskell.org/ghc/ :? for help >> Prelude> :load monade.hs >> [1 of 1] Compiling Main ( monade.hs, interpreted ) >> >> monade.hs:21:10: error: >> • No instance for (Applicative Prob) >> arising from the superclasses of an instance declaration >> • In the instance declaration for ‘Monad Prob’ >> | >> 21 | instance Monad Prob where >> | ^^^^^^^^^^ >> Failed, no modules loaded. >> >> it fails when i add the last part of the example: >> >> instance Monad Prob where >> return x = Prob [(x,1%1)] >> m >>= f = flatten (fmap f m) >> fail _ = Prob [] >> >> >> seems the Monad needs an instance of the Applicative to be instanciated... >> >> what is wrong? >> >> regards, >> Damien >> _______________________________________________ >> 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. > > > > -- > 山本悠滋 > twitter: https://twitter.com/igrep > GitHub: https://github.com/igrep > GitLab: https://gitlab.com/igrep > Facebook: http://www.facebook.com/igrep > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jos.kusiek at tu-dortmund.de Wed Feb 27 10:55:13 2019 From: jos.kusiek at tu-dortmund.de (Jos Kusiek) Date: Wed, 27 Feb 2019 11:55:13 +0100 Subject: [Haskell-cafe] example of monad from http://learnyouahaskell.comnot working In-Reply-To: References: Message-ID: <201902271055.x1RAt42f006676@unimail.uni-dortmund.de> The Monad class has changed, since a few GHC versions. The old class dependency chain was Functor <- Monad, but it is now Functor <- Applicative <- Monad. You can just ignore it and always instanciate it with: instance Applicative M where pure = return (<*>) = ap Where M is a Monad. So in your case replace "M" with "Prob". If you are interested in properly instanciating the Applicative class, then the operator (<*>) is the new thing. The function "pure" should always do exactly the same as "return". The function "ap" should also always do the same as (<*>). The type of both is just a bit stricter and limited on Monads and not just on Applictive functors. If you look at the type it is a bit like fmap but with the function to lift "boxed" in a Functor/Applicative/Monad: (<*>) :: Applicative f => f (a -> b) -> f a -> f b So what you need to do is unwrap the function the same way as you unwrap the parameter, apply the function to the parameter and then wrap it again: instance Applicative Prob where pure a = Prob [(a,1%1)] Prob fs <*> Prob as = Prob [(f a,x*y) | (f,x) <- fs, (a,y) <- as] If you do the Applicative class first you can skip defining return, since it is defaulted with "return = pure": instance Monad Prob where m >>= f = flatten (fmap f m) or instance Monad Prob where Prob as >>= f = Prob [(b,x*y) | (a,x) <- as, let Prob bs = f a, (b,y) <- bs] Also fail from the Monad class is no longer used. It has been moved to the class MonadFail from the Control.Monad.Fail module: import Control.Monad.Fail instance MonadFail Prob where fail _ = Prob [] Von: Damien Mattei Gesendet: Mittwoch, 27. Februar 2019 10:57 An: haskell-cafe Betreff: [Haskell-cafe] example of monad from http://learnyouahaskell.comnot working i'm trying this example (see code below) from : http://learnyouahaskell.com/for-a-few-monads-more#making-monads when trying to compile this: import Data.Ratio newtype Prob a = Prob { getProb :: [(a,Rational)] } deriving Show instance Functor Prob where     fmap f (Prob xs) = Prob $ map (\(x,p) -> (f x,p)) xs     thisSituation :: Prob (Prob Char) thisSituation = Prob     [( Prob [('a',1%2),('b',1%2)] , 1%4 )     ,( Prob [('c',1%2),('d',1%2)] , 3%4)     ] flatten :: Prob (Prob a) -> Prob a flatten (Prob xs) = Prob $ concat $ map multAll xs     where multAll (Prob innerxs,p) = map (\(x,r) -> (x,p*r)) innerxs   instance Monad Prob where   return x = Prob [(x,1%1)]   m >>= f = flatten (fmap f m)   fail _ = Prob [] l1 = Prob [('a',2%3),('b',1%3)] multAllExt :: (Prob a, Rational) -> [(a, Rational)] multAllExt (Prob innerxs,p) = map (\(x,r) -> (x,p*r)) innerxs --Main> :type multAllExt --multAllExt :: (Prob a, Rational) -> [(a, Rational)] --Main> multAllExt (l1,1 % 4) --[('a',1 % 6),('b',1 % 12)] i get this error: GHCi, version 8.4.3: http://www.haskell.org/ghc/  :? for help Prelude> :load monade.hs [1 of 1] Compiling Main             ( monade.hs, interpreted ) monade.hs:21:10: error:     • No instance for (Applicative Prob)         arising from the superclasses of an instance declaration     • In the instance declaration for ‘Monad Prob’    | 21 | instance Monad Prob where    |          ^^^^^^^^^^ Failed, no modules loaded. it fails when i add the last part of the example: instance Monad Prob where   return x = Prob [(x,1%1)]   m >>= f = flatten (fmap f m)   fail _ = Prob [] seems the Monad needs an instance of the Applicative to be instanciated... what is wrong? regards, Damien -------------- next part -------------- An HTML attachment was scrubbed... URL: From jos.kusiek at tu-dortmund.de Wed Feb 27 11:01:24 2019 From: jos.kusiek at tu-dortmund.de (Jos Kusiek) Date: Wed, 27 Feb 2019 12:01:24 +0100 Subject: [Haskell-cafe] example of monad fromhttp://learnyouahaskell.com not working In-Reply-To: References: Message-ID: <201902271101.x1RB1GqO013269@unimail.uni-dortmund.de> That is most likely, because ap is not in Prelude. You need to import Control.Monad. Von: Damien Mattei Gesendet: Mittwoch, 27. Februar 2019 11:54 An: Yuji Yamamoto Cc: haskell-cafe Betreff: Re: [Haskell-cafe] example of monad fromhttp://learnyouahaskell.com not working can you give me a complete solution please? i suppose i can set pure = return but have some diffculties with <*> , ap does not works On Wed, Feb 27, 2019 at 11:10 AM Yuji Yamamoto wrote: It's the one of the biggest changes of Haskell since LYHG was released. As you guess, now any instance of Monad must be an instance of Applicative. So you have to declare Prob as an instance of Applicative: instance Applicative Prob where    pure = ...    f <*> x = ... 2019年2月27日(水) 18:56 Damien Mattei : i'm trying this example (see code below) from : http://learnyouahaskell.com/for-a-few-monads-more#making-monads when trying to compile this: import Data.Ratio newtype Prob a = Prob { getProb :: [(a,Rational)] } deriving Show instance Functor Prob where     fmap f (Prob xs) = Prob $ map (\(x,p) -> (f x,p)) xs     thisSituation :: Prob (Prob Char) thisSituation = Prob     [( Prob [('a',1%2),('b',1%2)] , 1%4 )     ,( Prob [('c',1%2),('d',1%2)] , 3%4)     ] flatten :: Prob (Prob a) -> Prob a flatten (Prob xs) = Prob $ concat $ map multAll xs     where multAll (Prob innerxs,p) = map (\(x,r) -> (x,p*r)) innerxs   instance Monad Prob where   return x = Prob [(x,1%1)]   m >>= f = flatten (fmap f m)   fail _ = Prob [] l1 = Prob [('a',2%3),('b',1%3)] multAllExt :: (Prob a, Rational) -> [(a, Rational)] multAllExt (Prob innerxs,p) = map (\(x,r) -> (x,p*r)) innerxs --Main> :type multAllExt --multAllExt :: (Prob a, Rational) -> [(a, Rational)] --Main> multAllExt (l1,1 % 4) --[('a',1 % 6),('b',1 % 12)] i get this error: GHCi, version 8.4.3: http://www.haskell.org/ghc/  :? for help Prelude> :load monade.hs [1 of 1] Compiling Main             ( monade.hs, interpreted ) monade.hs:21:10: error:     • No instance for (Applicative Prob)         arising from the superclasses of an instance declaration     • In the instance declaration for ‘Monad Prob’    | 21 | instance Monad Prob where    |          ^^^^^^^^^^ Failed, no modules loaded. it fails when i add the last part of the example: instance Monad Prob where   return x = Prob [(x,1%1)]   m >>= f = flatten (fmap f m)   fail _ = Prob [] seems the Monad needs an instance of the Applicative to be instanciated... what is wrong? regards, Damien _______________________________________________ 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. -- 山本悠滋 twitter: https://twitter.com/igrep GitHub: https://github.com/igrep GitLab: https://gitlab.com/igrep Facebook: http://www.facebook.com/igrep -------------- next part -------------- An HTML attachment was scrubbed... URL: From mpeddie at gmail.com Wed Feb 27 22:41:43 2019 From: mpeddie at gmail.com (Matt Peddie) Date: Thu, 28 Feb 2019 08:41:43 +1000 Subject: [Haskell-cafe] rounding and undefined behavior Message-ID: Hi cafe, It's been my general impression that when neither Haskell nor C defines behavior in a particular situation, the behavior nonetheless matches. I was surprised to observe Prelude Data.Int> round (4294967295 :: Double) :: Int16 -1 when #include #include int main(void) { double d = 4294967295; int16_t r = (int16_t) d; printf("%"PRId16"\n", r); return 0; } yields 0 when compiled and run. As far as I can tell, neither language defines what this result should be, so neither is doing anything wrong here. But I was surprised that they differ; does anyone know why Haskell's rounding operation behaves the way it does (maybe there is some historical reason)? Or can someone perhaps point me to a standards document I missed that states how the language must round out-of-bounds inputs? Regards Matt Peddie From damien.mattei at gmail.com Wed Feb 27 23:05:44 2019 From: damien.mattei at gmail.com (Damien Mattei) Date: Thu, 28 Feb 2019 00:05:44 +0100 Subject: [Haskell-cafe] example of monad fromhttp://learnyouahaskell.com not working In-Reply-To: <201902271101.x1RB1GqO013269@unimail.uni-dortmund.de> References: <201902271101.x1RB1GqO013269@unimail.uni-dortmund.de> Message-ID: thanks for your code, pretty example, i understand well flatten and all the function but at last i cannot figure out how the result come.... in the example: flipThree :: Prob Bool flipThree = do a <- coin b <- coin c <- loadedCoin return (all (==Tails) [a,b,c]) the strange thing is if i add more variables as : d <- coin it oes not change the probability but the output yes! example: Prob {getProb = [(True,1 % 80),(True,1 % 80),(True,9 % 80),(True,9 % 80),(True,1 % 80),(True,1 % 80),(True,9 % 80),(True,9 % 80),(True,1 % 80),(True,1 % 80),(True,9 % 80),(True,9 % 80),(True,1 % 80),(True,1 % 80),(True,9 % 80),(True,9 % 80)]} On Wed, Feb 27, 2019 at 12:01 PM Jos Kusiek wrote: > That is most likely, because ap is not in Prelude. You need to import > Control.Monad. > > > > *Von: *Damien Mattei > *Gesendet: *Mittwoch, 27. Februar 2019 11:54 > *An: *Yuji Yamamoto > *Cc: *haskell-cafe > *Betreff: *Re: [Haskell-cafe] example of monad fromhttp:// > learnyouahaskell.com not working > > > > can you give me a complete solution please? > > i suppose i can set pure = return > > but have some diffculties with <*> , ap does not works > > > > On Wed, Feb 27, 2019 at 11:10 AM Yuji Yamamoto < > whosekiteneverfly at gmail.com> wrote: > > It's the one of the biggest changes of Haskell since LYHG was released. > > As you guess, now any instance of Monad must be an instance of Applicative. > > > > So you have to declare Prob as an instance of Applicative: > > > > instance Applicative Prob where > > pure = ... > > f <*> x = ... > > > > > > 2019年2月27日(水) 18:56 Damien Mattei : > > i'm trying this example (see code below) from : > > http://learnyouahaskell.com/for-a-few-monads-more#making-monads > > > > when trying to compile this: > > > > import Data.Ratio > > newtype Prob a = Prob { getProb :: [(a,Rational)] } deriving Show > > > instance Functor Prob where > fmap f (Prob xs) = Prob $ map (\(x,p) -> (f x,p)) xs > > > thisSituation :: Prob (Prob Char) > thisSituation = Prob > [( Prob [('a',1%2),('b',1%2)] , 1%4 ) > ,( Prob [('c',1%2),('d',1%2)] , 3%4) > ] > > flatten :: Prob (Prob a) -> Prob a > flatten (Prob xs) = Prob $ concat $ map multAll xs > where multAll (Prob innerxs,p) = map (\(x,r) -> (x,p*r)) innerxs > > > instance Monad Prob where > return x = Prob [(x,1%1)] > m >>= f = flatten (fmap f m) > fail _ = Prob [] > > > > l1 = Prob [('a',2%3),('b',1%3)] > > multAllExt :: (Prob a, Rational) -> [(a, Rational)] > multAllExt (Prob innerxs,p) = map (\(x,r) -> (x,p*r)) innerxs > > --Main> :type multAllExt > --multAllExt :: (Prob a, Rational) -> [(a, Rational)] > > > --Main> multAllExt (l1,1 % 4) > --[('a',1 % 6),('b',1 % 12)] > > > > > > i get this error: > > > > GHCi, version 8.4.3: http://www.haskell.org/ghc/ :? for help > Prelude> :load monade.hs > [1 of 1] Compiling Main ( monade.hs, interpreted ) > > monade.hs:21:10: error: > • No instance for (Applicative Prob) > arising from the superclasses of an instance declaration > • In the instance declaration for ‘Monad Prob’ > | > 21 | instance Monad Prob where > | ^^^^^^^^^^ > Failed, no modules loaded. > > > > it fails when i add the last part of the example: > > > > instance Monad Prob where > return x = Prob [(x,1%1)] > m >>= f = flatten (fmap f m) > fail _ = Prob [] > > > > > > seems the Monad needs an instance of the Applicative to be instanciated... > > > > what is wrong? > > > > regards, > > Damien > > _______________________________________________ > 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. > > > > -- > > 山本悠滋 > twitter: https://twitter.com/igrep > GitHub: https://github.com/igrep > > GitLab: https://gitlab.com/igrep > Facebook: http://www.facebook.com/igrep > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ian at zenhack.net Wed Feb 27 23:06:53 2019 From: ian at zenhack.net (Ian Denhardt) Date: Wed, 27 Feb 2019 18:06:53 -0500 Subject: [Haskell-cafe] rounding and undefined behavior In-Reply-To: References: Message-ID: <155130881366.12822.6600583172428010848@localhost.localdomain> The relevant bit of the Haskell report: > 18.1 Signed integer types > > This module provides signed integer types of unspecified width (Int) > and fixed widths (Int8, Int16, Int32 and Int64). All arithmetic is > performed modulo 2^n, where n is the number of bits in the type. Link: https://www.haskell.org/onlinereport/haskell2010/haskellch18.html#x26-22300018 The module 2^n bit is ambiguous to me, but it seems it's just doing 2's complement, which is what the underlying machine does: (maxBound :: Int8) + 1 -128 The C standard, by contrast, states that the behavior of signed-arithmetic overflow is *undefined*, which is to say there are absolutely *NO* constraints on what the compiler can do. Modern compilers use this fact to assume this will never happen when optimizing. I actually get different numbers with your C example depending on what optimization flags I pass to the compiler. Worth noting, this is a huge source of security vulnerabilities in C & C++. -Ian Quoting Matt Peddie (2019-02-27 17:41:43) > Hi cafe, > > It's been my general impression that when neither Haskell nor C > defines behavior in a particular situation, the behavior nonetheless > matches. I was surprised to observe > > Prelude Data.Int> round (4294967295 :: Double) :: Int16 > -1 > > when > > #include > #include > int main(void) { > double d = 4294967295; > int16_t r = (int16_t) d; > printf("%"PRId16"\n", r); > return 0; > } > > yields 0 when compiled and run. > > As far as I can tell, neither language defines what this result should > be, so neither is doing anything wrong here. But I was surprised that > they differ; does anyone know why Haskell's rounding operation behaves > the way it does (maybe there is some historical reason)? Or can > someone perhaps point me to a standards document I missed that states > how the language must round out-of-bounds inputs? > > Regards > > Matt Peddie > _______________________________________________ > 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 damien.mattei at gmail.com Wed Feb 27 23:10:49 2019 From: damien.mattei at gmail.com (Damien Mattei) Date: Thu, 28 Feb 2019 00:10:49 +0100 Subject: [Haskell-cafe] example of monad fromhttp://learnyouahaskell.com not working In-Reply-To: References: <201902271101.x1RB1GqO013269@unimail.uni-dortmund.de> Message-ID: i mean if y had: a <- coin b <- coin c <- loadedCoin but only compute return (all (==Tails) [a] what i really does ot understand is how the probability is normalised , yes monad again keeps an air of mystery for me.... On Thu, Feb 28, 2019 at 12:05 AM Damien Mattei wrote: > thanks for your code, pretty example, i understand well flatten and all > the function but at last i cannot figure out how the result come.... > in the example: > flipThree :: Prob Bool > flipThree = do > a <- coin > b <- coin > c <- loadedCoin > return (all (==Tails) [a,b,c]) > > the strange thing is if i add more > variables as : > d <- coin > it oes not change the probability but the output yes! > example: > Prob {getProb = [(True,1 % 80),(True,1 % 80),(True,9 % 80),(True,9 % > 80),(True,1 % 80),(True,1 % 80),(True,9 % 80),(True,9 % 80),(True,1 % > 80),(True,1 % 80),(True,9 % 80),(True,9 % 80),(True,1 % 80),(True,1 % > 80),(True,9 % 80),(True,9 % 80)]} > > On Wed, Feb 27, 2019 at 12:01 PM Jos Kusiek > wrote: > >> That is most likely, because ap is not in Prelude. You need to import >> Control.Monad. >> >> >> >> *Von: *Damien Mattei >> *Gesendet: *Mittwoch, 27. Februar 2019 11:54 >> *An: *Yuji Yamamoto >> *Cc: *haskell-cafe >> *Betreff: *Re: [Haskell-cafe] example of monad fromhttp:// >> learnyouahaskell.com not working >> >> >> >> can you give me a complete solution please? >> >> i suppose i can set pure = return >> >> but have some diffculties with <*> , ap does not works >> >> >> >> On Wed, Feb 27, 2019 at 11:10 AM Yuji Yamamoto < >> whosekiteneverfly at gmail.com> wrote: >> >> It's the one of the biggest changes of Haskell since LYHG was released. >> >> As you guess, now any instance of Monad must be an instance of >> Applicative. >> >> >> >> So you have to declare Prob as an instance of Applicative: >> >> >> >> instance Applicative Prob where >> >> pure = ... >> >> f <*> x = ... >> >> >> >> >> >> 2019年2月27日(水) 18:56 Damien Mattei : >> >> i'm trying this example (see code below) from : >> >> http://learnyouahaskell.com/for-a-few-monads-more#making-monads >> >> >> >> when trying to compile this: >> >> >> >> import Data.Ratio >> >> newtype Prob a = Prob { getProb :: [(a,Rational)] } deriving Show >> >> >> instance Functor Prob where >> fmap f (Prob xs) = Prob $ map (\(x,p) -> (f x,p)) xs >> >> >> thisSituation :: Prob (Prob Char) >> thisSituation = Prob >> [( Prob [('a',1%2),('b',1%2)] , 1%4 ) >> ,( Prob [('c',1%2),('d',1%2)] , 3%4) >> ] >> >> flatten :: Prob (Prob a) -> Prob a >> flatten (Prob xs) = Prob $ concat $ map multAll xs >> where multAll (Prob innerxs,p) = map (\(x,r) -> (x,p*r)) innerxs >> >> >> instance Monad Prob where >> return x = Prob [(x,1%1)] >> m >>= f = flatten (fmap f m) >> fail _ = Prob [] >> >> >> >> l1 = Prob [('a',2%3),('b',1%3)] >> >> multAllExt :: (Prob a, Rational) -> [(a, Rational)] >> multAllExt (Prob innerxs,p) = map (\(x,r) -> (x,p*r)) innerxs >> >> --Main> :type multAllExt >> --multAllExt :: (Prob a, Rational) -> [(a, Rational)] >> >> >> --Main> multAllExt (l1,1 % 4) >> --[('a',1 % 6),('b',1 % 12)] >> >> >> >> >> >> i get this error: >> >> >> >> GHCi, version 8.4.3: http://www.haskell.org/ghc/ :? for help >> Prelude> :load monade.hs >> [1 of 1] Compiling Main ( monade.hs, interpreted ) >> >> monade.hs:21:10: error: >> • No instance for (Applicative Prob) >> arising from the superclasses of an instance declaration >> • In the instance declaration for ‘Monad Prob’ >> | >> 21 | instance Monad Prob where >> | ^^^^^^^^^^ >> Failed, no modules loaded. >> >> >> >> it fails when i add the last part of the example: >> >> >> >> instance Monad Prob where >> return x = Prob [(x,1%1)] >> m >>= f = flatten (fmap f m) >> fail _ = Prob [] >> >> >> >> >> >> seems the Monad needs an instance of the Applicative to be instanciated... >> >> >> >> what is wrong? >> >> >> >> regards, >> >> Damien >> >> _______________________________________________ >> 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. >> >> >> >> -- >> >> 山本悠滋 >> twitter: https://twitter.com/igrep >> GitHub: https://github.com/igrep >> >> GitLab: https://gitlab.com/igrep >> Facebook: http://www.facebook.com/igrep >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From neil_mayhew at users.sourceforge.net Wed Feb 27 23:18:59 2019 From: neil_mayhew at users.sourceforge.net (Neil Mayhew) Date: Wed, 27 Feb 2019 16:18:59 -0700 Subject: [Haskell-cafe] rounding and undefined behavior In-Reply-To: References: Message-ID: <3c0bf14a-e7c1-b56b-c855-211c4124915c@users.sourceforge.net> On my machine, your program outputs 32767 with GCC (7.4.0) and 0 with Clang (5.0.2). -------------- next part -------------- An HTML attachment was scrubbed... URL: From mpeddie at gmail.com Wed Feb 27 23:31:45 2019 From: mpeddie at gmail.com (Matt Peddie) Date: Thu, 28 Feb 2019 09:31:45 +1000 Subject: [Haskell-cafe] rounding and undefined behavior In-Reply-To: <3c0bf14a-e7c1-b56b-c855-211c4124915c@users.sourceforge.net> References: <3c0bf14a-e7c1-b56b-c855-211c4124915c@users.sourceforge.net> Message-ID: Hi Neil, Did you call GCC with optimizations enabled? For me it returns 32767 if I enable optimizations and 0 if I don't. Clang returns 0 independent of any flag changes I tried. Bummer! Regards Matt On Thu, Feb 28, 2019 at 9:19 AM Neil Mayhew wrote: > > On my machine, your program outputs 32767 with GCC (7.4.0) and 0 with Clang (5.0.2). > _______________________________________________ > 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 neil_mayhew at users.sourceforge.net Thu Feb 28 01:06:05 2019 From: neil_mayhew at users.sourceforge.net (Neil Mayhew) Date: Wed, 27 Feb 2019 18:06:05 -0700 Subject: [Haskell-cafe] rounding and undefined behavior In-Reply-To: References: <3c0bf14a-e7c1-b56b-c855-211c4124915c@users.sourceforge.net> Message-ID: Hi Matt, On 2019-02-27 4:31 PM, Matt Peddie wrote: > For me [gcc] returns 32767 if I enable optimizations and 0 if I don't. Yes, I get 0 without optimizations. Looking at the generated assembly (with gcc -S) I can see that the non-optimized code is converting the double to a 32-bit integer using a hardware instruction (cvttsd2si) but in the optimized case it's using a precomputed value. It's strange that the precomputed value doesn't match, but as Ian said, all bets are off anyway. According to one authority , the conversion produces the 32-bit value 0x80000000. When truncated to int16_t this is 0. > Clang returns 0 independent of any flag changes I tried. Clang's code uses a precomputed value even without optimization. Looking at GHC's generated core, it converts the Double to an Int and then narrows down to Int16 after that. —Neil -------------- next part -------------- An HTML attachment was scrubbed... URL: From dth.tss at gmail.com Thu Feb 28 08:21:21 2019 From: dth.tss at gmail.com (David Harley) Date: Thu, 28 Feb 2019 08:21:21 +0000 Subject: [Haskell-cafe] qtHaskell Message-ID: <454fbffa-d953-cf78-2799-8f81497b73b3@googlemail.com> I've made a new version of qtHaskell - version 1.1.10.1 available at the following site: http://www.isptech.co.uk/qtHaskell/download.html It comprises bindings to about 50 Qt modules and includes a version of Asteroids which uses functional reactive programming and some code running in a non-IO based monad, plus a Qt based version of Threadscope (qts). The installation of a code set of this sort can be tricky, it builds using a combination of cabal, qmake and make controled from perl. I wish it were simpler, but in most cases: ./build lite -jx will build all modules required for the demos and examples. It has currently only been tested on Linux hence, the build script which used to work on Windows will probably not work without some modification. I'll get around to that if there's any interest. It has also only been tested against regular builds of Qt 5.11/5.12 build from the qt-everywhere-src-5.11/12.x codesets. Good luck with any building and testing of qtHaskell-1.1.10.1, and I'd be delighted to get any feedback David Harley From damien.mattei at gmail.com Thu Feb 28 10:00:18 2019 From: damien.mattei at gmail.com (Damien Mattei) Date: Thu, 28 Feb 2019 11:00:18 +0100 Subject: [Haskell-cafe] show in monad Message-ID: just for tracing the monad i have this : import Control.Monad import Data.Ratio import Data.List (all) import Debug.Trace newtype Prob a = Prob { getProb :: [(a,Rational)] } deriving Show instance Functor Prob where fmap f (Prob xs) = trace " Functor Prob " Prob $ map (\(x,p) -> (f x,p)) xs t flatten :: Prob (Prob a) -> Prob a flatten (Prob xs) = trace (" flatten " ++ show xs) Prob $ concat $ map multAll xs where multAll (Prob innerxs,p) = trace " multAll " map (\(x,r) -> (x,p*r)) innerxs instance Applicative Prob where pure = trace " Applicative Prob return " return (<*>) = trace " Applicative Prob ap " ap instance Monad Prob where return x = trace " Monad Prob return " Prob [(x,1%1)] m >>= f = trace " Monad Prob >>= " flatten (fmap f m) fail _ = trace " Monad Prob fail " Prob [] {- instance Applicative Prob where pure a = Prob [(a,1%1)] Prob fs <*> Prob as = Prob [(f a,x*y) | (f,x) <- fs, (a,y) <- as] instance Monad Prob where Prob as >>= f = Prob [(b,x*y) | (a,x) <- as, let Prob bs = f a, (b,y) <- bs] -} in this : flatten :: Prob (Prob a) -> Prob a flatten (Prob xs) = trace (" flatten " ++ show xs) Prob $ concat $ map multAll xs where multAll (Prob innerxs,p) = trace " multAll " map (\(x,r) -> (x,p*r)) innerxs i have this error: [1 of 1] Compiling Main ( monade.hs, interpreted ) monade.hs:22:43: error: • No instance for (Show a) arising from a use of ‘show’ Possible fix: add (Show a) to the context of the type signature for: flatten :: forall a. Prob (Prob a) -> Prob a • In the second argument of ‘(++)’, namely ‘show xs’ In the first argument of ‘trace’, namely ‘(" flatten " ++ show xs)’ In the expression: trace (" flatten " ++ show xs) Prob | 22 | flatten (Prob xs) = trace (" flatten " ++ show xs) | ^^^^^^^ Failed, no modules loaded. how can i implement a show for xs ? regards, damien -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexander.kjeldaas at gmail.com Thu Feb 28 10:01:51 2019 From: alexander.kjeldaas at gmail.com (Alexander Kjeldaas) Date: Thu, 28 Feb 2019 11:01:51 +0100 Subject: [Haskell-cafe] qtHaskell In-Reply-To: <454fbffa-d953-cf78-2799-8f81497b73b3@googlemail.com> References: <454fbffa-d953-cf78-2799-8f81497b73b3@googlemail.com> Message-ID: Interesting! Could this be made available through Hackage? Alexander On Thu, Feb 28, 2019 at 9:21 AM David Harley wrote: > I've made a new version of qtHaskell - version 1.1.10.1 available at the > following site: > > http://www.isptech.co.uk/qtHaskell/download.html > > It comprises bindings to about 50 Qt modules and includes a version of > Asteroids which uses functional reactive programming and some code > running in a non-IO based monad, plus a Qt based version of Threadscope > (qts). > > The installation of a code set of this sort can be tricky, it builds > using a combination of cabal, qmake and make controled from perl. I wish > it were simpler, but in most cases: > > ./build lite -jx > > will build all modules required for the demos and examples. > > It has currently only been tested on Linux hence, the build script which > used to work on Windows will probably not work without some > modification. I'll get around to that if there's any interest. > > It has also only been tested against regular builds of Qt 5.11/5.12 > build from the qt-everywhere-src-5.11/12.x codesets. > > Good luck with any building and testing of qtHaskell-1.1.10.1, and I'd > be delighted to get any feedback > > David Harley > > _______________________________________________ > 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 jos.kusiek at tu-dortmund.de Thu Feb 28 11:57:23 2019 From: jos.kusiek at tu-dortmund.de (Jos Kusiek) Date: Thu, 28 Feb 2019 12:57:23 +0100 Subject: [Haskell-cafe] show in monad In-Reply-To: References: Message-ID: <56c5af80-4b6f-c288-f8ea-ea8adeb5019e@tu-dortmund.de> You simply cannot do that. To be more precise, you cannot use show inside the bind operator on Prob (but you could use it in flatten). Deriving Show creates a Show instance which looks something like that: instance Show a => Show (Prob a) where ... This instance needs "a" to instanciate Show, so you can only use show with Prob types, where "a" is an instance of Show itself, e. g. Prob Int. Your flatten function does not guarantee that "a" is an instance of Show. The type says, any type for "a" will do it. You can easily restrict that with a class constraint: flatten :: Show a => Prob (Prob a) -> Prob a But now you have a problem with the bind operator. You can no longer use flatten here. The bind operator for Prob has the following type: (>>=) :: Prob a -> (a -> Prob b) -> Prob b There are no constraints here and you cannot add any constraints. The type is predefined by the Monad class. So it is not guaranteed, that this Prob type has a show function and you cannot guarantee it in any way. So you cannot use show on your first parameter type (Prob a) or your result type (Prob b) inside the bind or any function that is called by bind. On 28.02.19 11:00, Damien Mattei wrote: > just for tracing the monad i have this : > > import Control.Monad > > import Data.Ratio > import Data.List (all) > import Debug.Trace > > newtype Prob a = Prob { getProb :: [(a,Rational)] } deriving Show > > instance Functor Prob where >     fmap f (Prob xs) = trace " Functor Prob " >                        Prob $ map (\(x,p) -> (f x,p)) xs > > > t > > > flatten :: Prob (Prob a) -> Prob a > flatten (Prob xs) = trace (" flatten " ++ show xs) >                     Prob $ concat $ map multAll xs >   where multAll (Prob innerxs,p) = trace " multAll " >                                    map (\(x,r) -> (x,p*r)) innerxs > > > instance Applicative Prob where >    pure = trace " Applicative Prob return " return >    (<*>) = trace " Applicative Prob ap " ap > > instance Monad Prob where >   return x = trace " Monad Prob return " >              Prob [(x,1%1)] >   m >>= f = trace " Monad Prob >>= " >             flatten (fmap f m) >   fail _ = trace " Monad Prob fail " >            Prob [] > > > {- > instance Applicative Prob where > >   pure a = Prob [(a,1%1)] > >   Prob fs <*> Prob as = Prob [(f a,x*y) | (f,x) <- fs, (a,y) <- as] > > > instance Monad Prob where > >   Prob as >>= f = Prob [(b,x*y) | (a,x) <- as, let Prob bs = f a, > (b,y) <- bs] > > -} > > > > in this : > > flatten :: Prob (Prob a) -> Prob a > flatten (Prob xs) = trace (" flatten " ++ show xs) >                     Prob $ concat $ map multAll xs >   where multAll (Prob innerxs,p) = trace " multAll " >                                    map (\(x,r) -> (x,p*r)) innerxs > > > i have this error: > > [1 of 1] Compiling Main             ( monade.hs, interpreted ) > > monade.hs:22:43: error: >     • No instance for (Show a) arising from a use of ‘show’ >       Possible fix: >         add (Show a) to the context of >           the type signature for: >             flatten :: forall a. Prob (Prob a) -> Prob a >     • In the second argument of ‘(++)’, namely ‘show xs’ >       In the first argument of ‘trace’, namely ‘(" flatten " ++ show xs)’ >       In the expression: trace (" flatten " ++ show xs) Prob >    | > 22 | flatten (Prob xs) = trace (" flatten " ++ show xs) >    |                                           ^^^^^^^ > Failed, no modules loaded. > > how can i implement a show for xs ? > regards, > damien > > _______________________________________________ > 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. -- Dipl.-Inf. Jos Kusiek Technische Universität Dortmund Fakultät 4 - Informatik / Lehrstuhl 1 - Logik in der Informatik Otto-Hahn-Straße 12, Raum 3.020 44227 Dortmund Tel.: +49 231-755 7523 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jaro.reinders at gmail.com Thu Feb 28 12:36:08 2019 From: jaro.reinders at gmail.com (Jaro Reinders) Date: Thu, 28 Feb 2019 13:36:08 +0100 Subject: [Haskell-cafe] qtHaskell In-Reply-To: References: <454fbffa-d953-cf78-2799-8f81497b73b3@googlemail.com> Message-ID: <3cf0691b-ddc5-c01f-0619-1078530afce0@gmail.com> That is not possible, the code is not open source and hackage requires an open source license. Source: http://hackage.haskell.org/upload and http://www.isptech.co.uk/qtHaskell/doc/userguide/license.html On 2/28/19 11:01 AM, Alexander Kjeldaas wrote: > Interesting!  Could this be made available through Hackage? > > Alexander > > On Thu, Feb 28, 2019 at 9:21 AM David Harley > wrote: > > I've made a new version of qtHaskell - version 1.1.10.1 available > at the > following site: > > http://www.isptech.co.uk/qtHaskell/download.html > > It comprises bindings to about 50 Qt modules and includes a > version of > Asteroids which uses functional reactive programming and some code > running in a non-IO based monad, plus a Qt based version of > Threadscope > (qts). > > The installation of a code set of this sort can be tricky, it builds > using a combination of cabal, qmake and make controled from perl. > I wish > it were simpler, but in most cases: > > ./build lite -jx > > will build all modules required for the demos and examples. > > It has currently only been tested on Linux hence, the build script > which > used to work on Windows will probably not work without some > modification. I'll get around to that if there's any interest. > > It has also only been tested against regular builds of Qt 5.11/5.12 > build from the qt-everywhere-src-5.11/12.x codesets. > > Good luck with any building and testing of qtHaskell-1.1.10.1, and > I'd > be delighted to get any feedback > > David Harley > > _______________________________________________ > 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 damien.mattei at gmail.com Thu Feb 28 14:30:58 2019 From: damien.mattei at gmail.com (Damien Mattei) Date: Thu, 28 Feb 2019 15:30:58 +0100 Subject: [Haskell-cafe] show in monad In-Reply-To: <56c5af80-4b6f-c288-f8ea-ea8adeb5019e@tu-dortmund.de> References: <56c5af80-4b6f-c288-f8ea-ea8adeb5019e@tu-dortmund.de> Message-ID: even with a definition of show i can not use it in flatten: import Control.Monad import Data.Ratio import Data.List (all) import Debug.Trace newtype Prob a = Prob { getProb :: [(a,Rational)] }-- deriving Show instance Show a => Show (Prob a) where show (Prob [(x,r)]) = ((show x) ++ " _ " ++ (show r)) instance Functor Prob where fmap f (Prob xs) = trace " Functor Prob " Prob $ map (\(x,p) -> (f x,p)) xs flatten :: Prob (Prob a) -> Prob a flatten (Prob xs) = trace (" flatten " ++ (show xs)) Prob $ concat $ map multAll xs where multAll (Prob innerxs,p) = trace (" multAll p= " ++ (show p) ++ " ") map (\(x,r) -> (x,p*r)) innerxs monade.hs:23:44: error: • No instance for (Show a) arising from a use of ‘show’ Possible fix: add (Show a) to the context of the type signature for: flatten :: forall a. Prob (Prob a) -> Prob a • In the second argument of ‘(++)’, namely ‘(show xs)’ In the first argument of ‘trace’, namely ‘(" flatten " ++ (show xs))’ In the expression: trace (" flatten " ++ (show xs)) Prob | 23 | flatten (Prob xs) = trace (" flatten " ++ (show xs)) | ^^^^^^^ Failed, no modules loaded. it seems show i defined is not in the context of flatten??? damien On Thu, Feb 28, 2019 at 12:57 PM Jos Kusiek wrote: > You simply cannot do that. To be more precise, you cannot use show inside > the bind operator on Prob (but you could use it in flatten). Deriving Show > creates a Show instance which looks something like that: > > instance Show a => Show (Prob a) where ... > > This instance needs "a" to instanciate Show, so you can only use show with > Prob types, where "a" is an instance of Show itself, e. g. Prob Int. Your > flatten function does not guarantee that "a" is an instance of Show. The > type says, any type for "a" will do it. You can easily restrict that with a > class constraint: > > flatten :: Show a => Prob (Prob a) -> Prob a > > But now you have a problem with the bind operator. You can no longer use > flatten here. The bind operator for Prob has the following type: > > (>>=) :: Prob a -> (a -> Prob b) -> Prob b > > There are no constraints here and you cannot add any constraints. The type > is predefined by the Monad class. So it is not guaranteed, that this Prob > type has a show function and you cannot guarantee it in any way. So you > cannot use show on your first parameter type (Prob a) or your result type > (Prob b) inside the bind or any function that is called by bind. > > On 28.02.19 11:00, Damien Mattei wrote: > > just for tracing the monad i have this : > > import Control.Monad > > import Data.Ratio > import Data.List (all) > import Debug.Trace > > newtype Prob a = Prob { getProb :: [(a,Rational)] } deriving Show > > instance Functor Prob where > fmap f (Prob xs) = trace " Functor Prob " > Prob $ map (\(x,p) -> (f x,p)) xs > > > t > > > flatten :: Prob (Prob a) -> Prob a > flatten (Prob xs) = trace (" flatten " ++ show xs) > Prob $ concat $ map multAll xs > where multAll (Prob innerxs,p) = trace " multAll " > map (\(x,r) -> (x,p*r)) innerxs > > > instance Applicative Prob where > pure = trace " Applicative Prob return " return > (<*>) = trace " Applicative Prob ap " ap > > instance Monad Prob where > return x = trace " Monad Prob return " > Prob [(x,1%1)] > m >>= f = trace " Monad Prob >>= " > flatten (fmap f m) > fail _ = trace " Monad Prob fail " > Prob [] > > > {- > instance Applicative Prob where > > pure a = Prob [(a,1%1)] > > Prob fs <*> Prob as = Prob [(f a,x*y) | (f,x) <- fs, (a,y) <- as] > > > instance Monad Prob where > > Prob as >>= f = Prob [(b,x*y) | (a,x) <- as, let Prob bs = f a, (b,y) <- > bs] > > -} > > > > in this : > > flatten :: Prob (Prob a) -> Prob a > flatten (Prob xs) = trace (" flatten " ++ show xs) > Prob $ concat $ map multAll xs > where multAll (Prob innerxs,p) = trace " multAll " > map (\(x,r) -> (x,p*r)) innerxs > > > i have this error: > > [1 of 1] Compiling Main ( monade.hs, interpreted ) > > monade.hs:22:43: error: > • No instance for (Show a) arising from a use of ‘show’ > Possible fix: > add (Show a) to the context of > the type signature for: > flatten :: forall a. Prob (Prob a) -> Prob a > • In the second argument of ‘(++)’, namely ‘show xs’ > In the first argument of ‘trace’, namely ‘(" flatten " ++ show xs)’ > In the expression: trace (" flatten " ++ show xs) Prob > | > 22 | flatten (Prob xs) = trace (" flatten " ++ show xs) > | ^^^^^^^ > Failed, no modules loaded. > > how can i implement a show for xs ? > regards, > damien > > _______________________________________________ > 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. > > > -- > Dipl.-Inf. Jos Kusiek > > Technische Universität Dortmund > Fakultät 4 - Informatik / Lehrstuhl 1 - Logik in der Informatik > Otto-Hahn-Straße 12, Raum 3.020 > 44227 Dortmund > > Tel.: +49 231-755 7523 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jos.kusiek at tu-dortmund.de Thu Feb 28 15:58:37 2019 From: jos.kusiek at tu-dortmund.de (Jos Kusiek) Date: Thu, 28 Feb 2019 16:58:37 +0100 Subject: [Haskell-cafe] show in monad In-Reply-To: References: <56c5af80-4b6f-c288-f8ea-ea8adeb5019e@tu-dortmund.de> Message-ID: <0ac89f99-b922-04b5-9736-34568864f900@tu-dortmund.de> You do not need to change the Show instance. The one generated by deriving Show is fine. As I said, you need to change the type of flatten and add the constraint. flatten :: Show a => Prob (Prob a) -> Prob a On 28.02.19 15:30, Damien Mattei wrote: > even with a definition of show i can not use it in flatten: > import Control.Monad > > import Data.Ratio > import Data.List (all) > import Debug.Trace > > newtype Prob a = Prob { getProb :: [(a,Rational)] }-- deriving Show > > > > instance Show a => Show (Prob a) where >   show (Prob [(x,r)]) = ((show x) ++ " _ " ++ (show r)) > > > instance Functor Prob where >     fmap f (Prob xs) = trace " Functor Prob " >                        Prob $ map (\(x,p) -> (f x,p)) xs > > > > > flatten :: Prob (Prob a) -> Prob a > flatten (Prob xs) = trace (" flatten " ++ (show xs)) >                     Prob $ concat $ map multAll xs >   where multAll (Prob innerxs,p) = trace (" multAll p= " ++ (show p) > ++ " ") >                                    map (\(x,r) -> (x,p*r)) innerxs > > monade.hs:23:44: error: >     • No instance for (Show a) arising from a use of ‘show’ >       Possible fix: >         add (Show a) to the context of >           the type signature for: >             flatten :: forall a. Prob (Prob a) -> Prob a >     • In the second argument of ‘(++)’, namely ‘(show xs)’ >       In the first argument of ‘trace’, namely >         ‘(" flatten " ++ (show xs))’ >       In the expression: trace (" flatten " ++ (show xs)) Prob >    | > 23 | flatten (Prob xs) = trace (" flatten " ++ (show xs)) >    |                                            ^^^^^^^ > Failed, no modules loaded. > > it seems show i defined is not in the context of flatten??? > > damien > > > > On Thu, Feb 28, 2019 at 12:57 PM Jos Kusiek > wrote: > > You simply cannot do that. To be more precise, you cannot use show > inside the bind operator on Prob (but you could use it in > flatten). Deriving Show creates a Show instance which looks > something like that: > > instance Show a => Show (Prob a) where ... > > This instance needs "a" to instanciate Show, so you can only use > show with Prob types, where "a" is an instance of Show itself, e. > g. Prob Int. Your flatten function does not guarantee that "a" is > an instance of Show. The type says, any type for "a" will do it. > You can easily restrict that with a class constraint: > > flatten :: Show a => Prob (Prob a) -> Prob a > > But now you have a problem with the bind operator. You can no > longer use flatten here. The bind operator for Prob has the > following type: > > (>>=) :: Prob a -> (a -> Prob b) -> Prob b > > There are no constraints here and you cannot add any constraints. > The type is predefined by the Monad class. So it is not > guaranteed, that this Prob type has a show function and you cannot > guarantee it in any way. So you cannot use show on your first > parameter type (Prob a) or your result type (Prob b) inside the > bind or any function that is called by bind. > > On 28.02.19 11:00, Damien Mattei wrote: >> just for tracing the monad i have this : >> >> import Control.Monad >> >> import Data.Ratio >> import Data.List (all) >> import Debug.Trace >> >> newtype Prob a = Prob { getProb :: [(a,Rational)] } deriving Show >> >> instance Functor Prob where >>     fmap f (Prob xs) = trace " Functor Prob " >>                        Prob $ map (\(x,p) -> (f x,p)) xs >> >> >> t >> >> >> flatten :: Prob (Prob a) -> Prob a >> flatten (Prob xs) = trace (" flatten " ++ show xs) >>                     Prob $ concat $ map multAll xs >>   where multAll (Prob innerxs,p) = trace " multAll " >>                                    map (\(x,r) -> (x,p*r)) innerxs >> >> >> instance Applicative Prob where >>    pure = trace " Applicative Prob return " return >>    (<*>) = trace " Applicative Prob ap " ap >> >> instance Monad Prob where >>   return x = trace " Monad Prob return " >>              Prob [(x,1%1)] >>   m >>= f = trace " Monad Prob >>= " >>             flatten (fmap f m) >>   fail _ = trace " Monad Prob fail " >>            Prob [] >> >> >> {- >> instance Applicative Prob where >> >>   pure a = Prob [(a,1%1)] >> >>   Prob fs <*> Prob as = Prob [(f a,x*y) | (f,x) <- fs, (a,y) <- as] >> >> >> instance Monad Prob where >> >>   Prob as >>= f = Prob [(b,x*y) | (a,x) <- as, let Prob bs = f a, >> (b,y) <- bs] >> >> -} >> >> >> >> in this : >> >> flatten :: Prob (Prob a) -> Prob a >> flatten (Prob xs) = trace (" flatten " ++ show xs) >>                     Prob $ concat $ map multAll xs >>   where multAll (Prob innerxs,p) = trace " multAll " >>                                    map (\(x,r) -> (x,p*r)) innerxs >> >> >> i have this error: >> >> [1 of 1] Compiling Main             ( monade.hs, interpreted ) >> >> monade.hs:22:43: error: >>     • No instance for (Show a) arising from a use of ‘show’ >>       Possible fix: >>         add (Show a) to the context of >>           the type signature for: >>             flatten :: forall a. Prob (Prob a) -> Prob a >>     • In the second argument of ‘(++)’, namely ‘show xs’ >>       In the first argument of ‘trace’, namely ‘(" flatten " ++ >> show xs)’ >>       In the expression: trace (" flatten " ++ show xs) Prob >>    | >> 22 | flatten (Prob xs) = trace (" flatten " ++ show xs) >>    | ^^^^^^^ >> Failed, no modules loaded. >> >> how can i implement a show for xs ? >> regards, >> damien >> >> _______________________________________________ >> 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. > > -- > Dipl.-Inf. Jos Kusiek > > Technische Universität Dortmund > Fakultät 4 - Informatik / Lehrstuhl 1 - Logik in der Informatik > Otto-Hahn-Straße 12, Raum 3.020 > 44227 Dortmund > > Tel.: +49 231-755 7523 > -- Dipl.-Inf. Jos Kusiek Technische Universität Dortmund Fakultät 4 - Informatik / Lehrstuhl 1 - Logik in der Informatik Otto-Hahn-Straße 12, Raum 3.020 44227 Dortmund Tel.: +49 231-755 7523 -------------- next part -------------- An HTML attachment was scrubbed... URL: