Send Beginners mailing list submissions to beginners@haskell.org To subscribe or unsubscribe via the World Wide Web, visit http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners or, via email, send a message with subject or body 'help' to beginners-requ...@haskell.org
You can reach the person managing the list at beginners-ow...@haskell.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Beginners digest..." Today's Topics: 1. Re: Easy to use XML parser (Tony Morris) 2. Re: Why do i need to take out the list for this to work (Kim-Ee Yeoh) ---------------------------------------------------------------------- Message: 1 Date: Wed, 17 Jun 2020 22:29:05 +1000 From: Tony Morris <tonymor...@gmail.com> To: beginners@haskell.org Subject: Re: [Haskell-beginners] Easy to use XML parser Message-ID: <ea720e4b-35b8-5a1f-ca64-1ff63f43a...@gmail.com> Content-Type: text/plain; charset="utf-8" hackage.haskell.org/package/tagsoup hackage.haskell.org/package/tagsoup-navigate hackage.haskell.org/package/sv On 6/17/20 8:13 PM, Alexander Chen wrote: > Hi, > > For eductional/testing purposes I am looking for an .xml parser which > can output strictly .csv. The pipeline goes from .xml -> *.csv -> SQL > table. *The fat ones are already written in another language. > > Can you recommend a parser that can achieve this, has understandable > documentation and is easy to use? > > thanks in advance. > > p.s. It would be great if you have personal experience with the library. > > best, > > > > > _______________________________________________ > Beginners mailing list > Beginners@haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 488 bytes Desc: OpenPGP digital signature URL: <http://mail.haskell.org/pipermail/beginners/attachments/20200617/14623dec/attachment-0001.sig> ------------------------------ Message: 2 Date: Thu, 18 Jun 2020 02:48:10 +0700 From: Kim-Ee Yeoh <k...@atamo.com> To: Alexander Chen <alexan...@chenjia.nl>, The Haskell-Beginners Mailing List - Discussion of primarily beginner-level topics related to Haskell <beginners@haskell.org> Subject: Re: [Haskell-beginners] Why do i need to take out the list for this to work Message-ID: <CAPY+ZdRmQF+u86F_KWG0tEiH13LK=zg1zd0feah30ig51vf...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" On Thu, Jun 11, 2020 at 1:42 AM Alexander Chen <alexan...@chenjia.nl> wrote: > hi, > > assigment: make your own element function with the any function. > > --elem with any > myElemAny :: Eq a => a -> [a] -> Bool > myElemAny a = any (== a) > > --elem with any > myElemAny' :: Eq a => a -> [a] -> Bool > myElemAny' a [x]= any (== a) [x] > > >From a beginners perspective, the second function looks perfectly cromulent. After all, how should one indicate a list if not by enclosing it with square brackets like this, [x]? An x might or might not be a list, but [x] surely has to be one, yes? But consider all the things that could be a list. Specifically, look at the following: 1. An empty list—which haskell denotes using []—is a list 2. [1,2,3] is a list 3. [1,1,1,…] is a list In each of the cases above, what is the value of x in [x]? Recall that haskell is a value-oriented language. Every identifier at the term-level evaluates to something that has a well-defined type. > myElemAny' compiles but throws an error because it has a non-exhaustive > pattern. Could somebody tell me why the list gives the function grieveness? > > thanks, > > _______________________________________________ > Beginners mailing list > Beginners@haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners > -- -- Kim-Ee -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.haskell.org/pipermail/beginners/attachments/20200618/5449afed/attachment-0001.html> ------------------------------ Subject: Digest Footer _______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners ------------------------------ End of Beginners Digest, Vol 144, Issue 4 *****************************************