News aggregator

Proposal: Add Foldable helper to Control.DeepSeq

libraries list - Thu, 07/14/2016 - 4:16am
As I describe in https://github.com/haskell/deepseq/issues/17 it is possible to implement an NFData instance for any Foldable type, and we can offer a function to help do that: data Unit = Unit instance Monoid Unit where mempty = Unit Unit `mappend` Unit = Unit -- strict in both arguments, unlike () rnfFoldable :: (Foldable f, NFData a) => f a -> () rnfFoldable xs = foldMap (\x -> rnf x `seq` Unit) xs `seq` () This could be used like so: instance NFData a => NFData (F a) where rnf = rnfFoldable This version forces from left to right. It would be possible to offer another version that forces from right to left: data Unit2 = Unit2 instance Monoid Unit2 where mempty = Unit2 x `mappend` Unit2 = x `seq` Unit2 rnfFoldableRTL :: (Foldable f, NFData a) => f a -> () rnfFoldableRTL xs = foldMap (\x -> rnf x `seq` Unit2) xs `seq` () _______________________________________________ Libraries mailing list Libraries< at >haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Categories: Offsite Discussion

How to support multiple string types in Haskell?

haskell-cafe - Thu, 07/14/2016 - 1:40am
Hi all, There are multiple string types in Haskell – String, lazy/strict ByteString, lazy/strict Text to name a few. So to make a string handling function maximally reusable, it needs to support multiple string types. One approach used by TagSoup library is to make a type class StringLike which represents the polymorphic string type and uses it where a String type is normally needed. For example, parseTags :: StringLike str => str -> [Tag str] Here parseTags takes a StringLike type instead of a fixed string type. Users of TagSoup can pick any of String, lazy/strict ByteString, lazy/strict Text because they are all instances of StringLike type class. It seems StringLike type class is quite generic but it is used only in the TagSoup package. This makes me wonder what is the idiomatic way to support multiple string types in Haskell. What other approaches do we have? Thanks, Kwang Yul Seo _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view ar
Categories: Offsite Discussion

Use GHC API in standalone executable?

haskell-cafe - Wed, 07/13/2016 - 9:54pm
Hi, I'd like to compile an executable that internally uses the GHC API, but otherwise does not require users to have GHC installed on their machine. Is this possible? As far as I can tell, lots of functions in the GHC API read package databases per $GHC_PACKAGE_PATH and things of that nature. Thanks, Mitchell _______________________________________________ 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.
Categories: Offsite Discussion

Can't log into to GHC trac

haskell-cafe - Wed, 07/13/2016 - 2:57pm
Hi, embarrassingly I've forgotten my password (and username) to the GHC trac, and there's no automatic way to reset any of it: - When I try to register an account it says my email address is already in use - To reset my password I need to give both my username and password, but I don't know my username Who can I contact to help resolve the issue? _______________________________________________ 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.
Categories: Offsite Discussion

Christopher Strachey centenary announcement

General haskell list - Wed, 07/13/2016 - 9:48am
Dear all, This November marks 100 years since the birth of Christopher Strachey. We are holding a symposium to celebrate his life and research in Oxford on Saturday 19th November. There will also be an exhibition of material from the Strachey archive on Friday 18th November, followed by a banquet dinner at Hertford College on the evening of Friday 18th November. For more information and to register for attendance, please go to http://www.cs.ox.ac.uk/strachey100/. ------------------------------- Christopher Strachey (1916–1975) was a pioneering computer scientist and the founder of the Programming Research Group, now part of the Department of Computer Science at Oxford University. Although Strachey was keenly interested in the practical aspects of computing, it is in the theoretical side that he most indelibly left his mark, notably by creating with Dana Scott the denotational (or as he called it, ‘mathematical’) approach to defining the semantics of programming languages—undoubtedly influ
Categories: Incoming News

ANN: tagsoup-megaparsec-0.1.0.0

haskell-cafe - Tue, 07/12/2016 - 1:23pm
Hello all, I'm pleased to announce the first release of tagsoup-megaparsec, a Tag token parser library. This library helps you build a megaparsec parser using TagSoup's Tags as tokens. https://hackage.haskell.org/package/tagsoup-megaparsec https://github.com/kseo/tagsoup-megaparsec Regards, Kwang Yul Seo _______________________________________________ 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.
Categories: Offsite Discussion

network package and SIGVTALRM

haskell-cafe - Tue, 07/12/2016 - 11:35am
Hi all I am doing a DCC subsystem on a irc client. After all the handshakes are done I just connect to the server and start `recv`. The code I use for this is: getPackets :: MVar Int -> FilePath -- ^ Name media -> Int -- ^ File size -> AddrInfo -> ExceptT DCCError IO () getPackets mvar name totalSize addr = do receivedSize <- lift $ bracket acquire release receive let delta = (totalSize - receivedSize) if delta > 0 then throwE (NotFullRecv delta) else return () where bufferSize = 16384 acquire :: IO (IO.Handle,Socket) acquire = (,) <$> (IO.openFile name IO.WriteMode) <*> newSocket addr release :: (IO.Handle,Socket) -> IO () release (hdl, sock) = IO.hClose hdl >> close sock receive :: (IO.Handle,Socket) -> IO Int receive (hdl, sock) = flip execStateT 0 . fix $ \loop -> do mediaData <- lift (B.re
Categories: Offsite Discussion

SPLASH'16: 3rd Combined Call for Contributions toCollocated Events

General haskell list - Mon, 07/11/2016 - 9:40pm
################################################# ACM Conference on Systems, Programming, Languages, and Applications: Software for Humanity (SPLASH'16) ################################################# Amsterdam, The Netherlands Sun 30th October - Fri 4th November , 2016 http://2016.splashcon.org https://twitter.com/splashcon https://www.facebook.com/SPLASHCon/ NEWS! Benjamin Pierce and Andy Ko have agreed to be keynotes for SPLASH'16! Sponsored by ACM SIGPLAN Combined Call for Contributions to Collocated Events: - SPLASH-I, SPLASH-E, Student Research Competition, Programming Languages Mentoring Workshop - Scala Symposium - Workshops: AGERE, DSLDI, DSM, FOSD, ITSLE, LWC< at >SLE, META, MOBILE!, NOOL, PLATEAU, Parsing< at >SLE, REBLS, RUMPLE, SA-MDE, SEPS, VMIL, WODA The ACM SIGPLAN conference on Systems, Programming, Languages and Applications: Software for Humanity (SPLASH) embraces all aspects of software construction, to make it the premier conference at the intersection of programming, languages, systems,
Categories: Incoming News

2016 Autumn School on Computational Logic

General haskell list - Mon, 07/11/2016 - 10:46am
(Apologies if you receive multiple copies of this email. Please distribute to interested parties.) The 2016 Autumn School on Computational Logic will be held on October 16-17, 2016, in New York, affiliated to the 32nd International Conference on Logic Programming (ICLP'16). Researchers and PhD students are encouraged to attend. Student scholarships are available (Deadline for application: July 20) Association for Logic Programming 2016 Autumn School on Computational Logic http://iclp16school.webs.upv.es/ October 16-17, New York, USA (Affiliated to ICLP'16) Researchers interested in research in computational logic are invited to attend the 2016 Autumn School. The 2-day school is suited for those who wish to learn advanced topics in computational logic and logic programming. It will consist of four half-day tutorials on the following topics: 1. Constraint Logic Programming Lecturer: Roman Bartak, Charles Unive
Categories: Incoming News

Cannot install any packages after upgrading to GHC8.0.1

haskell-cafe - Mon, 07/11/2016 - 8:49am
Hi, I update my GHC to 8.0.1 and failed to install any packages since then. If I use cabal, I got 'installed package info from too old version of Cabal (key field does not match id field)' for every package. If I use Setup.hs, I got 'Configuring Cabal-1.24.0.0... Setup.hs: ghc-pkg dump failed'. What should I do? Googling did not get me an answer. _______________________________________________ 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.
Categories: Offsite Discussion

ANN: enchant-0.1.0.0

General haskell list - Mon, 07/11/2016 - 4:35am
Hello, I'm happy to announce the first release of enchant, binding for the Enchant library. https://hackage.haskell.org/package/enchant-0.1.0.0 https://github.com/kseo/enchant What is Enchant? (from http://www.abisource.com/projects/enchant/) On the surface, Enchant appears to be a generic spell checking library. You Thanks, Kwang Yul Seo _______________________________________________ Haskell mailing list Haskell< at >haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell
Categories: Incoming News

ANN: qtah-0.1.0

General haskell list - Mon, 07/11/2016 - 3:55am
Hello all, I'm happy to announce the first Hackage-ready release of Qtah, Qt bindings for Haskell. I announced Qtah earlier this year, but a lot of work was needed to get it to the point where you can just "cabal install" it. That work has now been done, so I invite you to install qtah-qt5 or qtah-examples[1] (currently just the Qt notepad example), and check out: http://khumba.net/projects/qtah https://gitlab.com/khumba/qtah As a small demonstration, I have a good portion of Goatee ported (board rendering clearly missing): http://khumba.net/tmp/20160710-goatee-qt.png However, there is still lots of the Qt API left to cover. Thanks to ezyang for help working with some Cabal internals. Cheers, Bryan [1] cabal install --enable-executable-dynamic qtah-examples _______________________________________________ Haskell mailing list Haskell< at >haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell
Categories: Incoming News

ArgumentDo proposal updated

glasgow-user - Mon, 07/11/2016 - 3:24am
Hi glasgow-haskell-users, Thank you for all the feedback to the ArgumentDo proposal. Following the discussion, I made changes to the proposal and updated the wiki page [0]. Now the proposed grammar is greatly simplified: it doesn't add a new non-terminal anymore, indeed it removes one instead. The proposed set of accepted programs remains unchanged. I hope the this update addresses one major concern that was raised in the previous discussion. Any feedback is appreciated. Regards, Takano Akio [0]: https://ghc.haskell.org/trac/ghc/wiki/ArgumentDo _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users< at >haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users
Categories: Offsite Discussion

Practical use of Stream's monad instance?

haskell-cafe - Sun, 07/10/2016 - 9:27pm
Hi, we've been debating the usefulness of Monad instances for Stream [2] or homogeneous tuples (fixed-length vectors). The Applicative implementation for them is simply zipping, very useful indeed. The "join" of their Monad instances takes the diagonal of a 2-dimensional plane (finite for tuples, infinite for Stream). (See also [1].) The question is, are such monad instances used in the wild? Are they actually useful or interesting for anything? [1] https://mail.haskell.org/pipermail/haskell-cafe/2009-April/thread.html#59079 [2] https://hackage.haskell.org/package/Stream-0.4.7.2/docs/Data-Stream.html Thanks Petr _______________________________________________ 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.
Categories: Offsite Discussion

Is the #functional programming paradigm antithetical to efficient strings? #Haskell

haskell-cafe - Sun, 07/10/2016 - 7:44pm
Is the #functional programming paradigm antithetical to efficient strings? #Haskell -- -- Sent from an expensive device which will be obsolete in a few months! :D Casey _______________________________________________ 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.
Categories: Offsite Discussion

Links on https://hackage.haskell.org/package/Cabal-1.24.0.0/docs/Language-Haskell-Extension.html are broken. How can I help?

haskell-cafe - Sun, 07/10/2016 - 5:22pm
Links to documentation are broken. I would be happy to fix. But how? https://hackage.haskell.org/package/Cabal-1.24.0.0/docs/Language-Haskell-Extension.html _______________________________________________ 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.
Categories: Offsite Discussion

Memory Management and Lists

haskell-cafe - Sun, 07/10/2016 - 4:41pm
Hi, short version of the question: when elements are 'drop'ped from a list, when is the memory for those elements released? And is there some way to control that? Longer version: I have this situation where I've got a State monad carrying a Data.Matrix, and I... 1) generate in infinite list of monadic operations with (repeat mf) where mf is a monadic function. 2) 'sequence' (from Control.Monad) to get a monad containing the infinite list of all states (i.e., a list of Matrices). 3) evalState(T) to extract the list 4) extract the nth state with (head (drop (n-1))) I like this approach. However, there seems to be a memory management issue: a Matrix itself should only be, I'm guessing, somewhere around 100KB. But instead I'm maxing out the 3GB of RAM on my old T60 laptop. Maybe I'm generating list elements (Matrices) a lot faster than memory management is releasing them...?
Categories: Offsite Discussion

What's wrong in my Data.Generic.Zipper code?

haskell-cafe - Sun, 07/10/2016 - 10:55am
Hello all, I do not understand why this simple piece of code returns Nothing instead of [1,2,3]. Can anybody help? {-# LANGUAGE BangPatterns,NoMonomorphismRestriction, DeriveDataTypeable #-} import Data.Typeable import Data.Data import Data.Generics.Zipper ex_list1 :: [Int] ex_list1 = [1,2,3] t1 = toZipper ex_list1
Categories: Offsite Discussion

Proposal and discussion: Deprecate Data.Set.mapMonotonic and Data.Map.mapKeysMonotonic; add correctly named functions

libraries list - Fri, 07/08/2016 - 6:49pm
We currently have a function mapMonotonic in Data.Set and one called mapKeysMonotonic in Data.Map. These names are confusing for two reasons: 1. In some mathematical contexts, a function is considered monotonic if it's *either* increasing or decreasing. 2. Even where monotonic specifically means *increasing*, it generally does *not* specifically mean *strictly increasing*. The functions in question work when, and only when, the given function is strictly increasing on the elements/keys in the set/map. I'd like to DEPRECATE these functions, and add new ones: Data.Set: mapStrictlyIncreasing and mapStrictlyDecreasing Data.Map: mapKeysStrictlyIncreasing and mapKeysStrictlyDecreasing Data.Map presents another possibility, however. We could make the replacements more general, giving them types Ord k => (k -> v -> (k', v')) -> Map k v -> Map k' v' and allowing the user to map over both keys and values in one pass. David Feuer _______________________________________________ Libraries mailing list Libraries< at >
Categories: Offsite Discussion

Position as lab docent Software Engineering at the University of Amsterdam

General haskell list - Fri, 07/08/2016 - 2:41pm
Dear all, I would like to draw your attention to the following job opening at the University of Amsterdam: <http://www.uva.nl/en/about-the-uva/working-at-the-uva/vacancies/item/16-267-lecturer-software-engineering.html>http://www.uva.nl/en/about-the-uva/working-at-the-uva/vacancies/item/16-267-lecturer-software-engineering.html This is a full-time teaching position in our MSc Software Engineering programme that is rated among the best ICT Master programmes in the Netherlands: http://www.uva.nl/en/education/master-s/master-s-programmes/item/software-engineering.html We partially take a rather formal approach to software engineering and use Haskell in at least one of our courses. So the position might indeed be of interest to subscribers of this mailing list. After some local hickups the definitive and firm deadline for application is Monday July 11 any time Amsterdam time. If you have any questions, do not hesitate to contact me. Best regards, Clemens Grelck
Categories: Incoming News