News aggregator

[ANN] hsimport 0.5: configurable pretty printing and placing of imports

haskell-cafe - Thu, 07/31/2014 - 8:59pm
Hi all, hsimport[1] is a command line program for extending the import list of a Haskell source file. There's an integration[2] for the vim editor, which can automatically extend the import list for the symbol under the cursor. hsimport 0.5 changes: - configurable[3] pretty printing of imports - configurable placing of new imports - support of multi line imports - better handling of incomplete/invalid Haskell source files Grettings, Daniel [1] https://github.com/dan-t/hsimport [2] https://github.com/dan-t/vim-hsimport [3] https://github.com/dan-t/hsimport/blob/master/README.md
Categories: Offsite Discussion

Seeking comments on proposed fusion rules

libraries list - Thu, 07/31/2014 - 7:38pm
The rules: lpaste.net/108508 The boring explanation: As I mentioned earlier, we currently can't fuse things like foldr (x : build g) The foldr can't see the build. Earlier, I considered a simple cons/build rule that would rewrite x : build g to build (\c n -> x `c` g c n) I wasn't quite satisfied with this approach, largely because it treats foldr c n (x1 : x2 : ... : xn : build g) one way, and foldr c n ([x1, x2, ..., xn) : build g) another way. The former expands out the foldr, while the latter (via various rules involving augment) translates into a foldr over [x1, x2, ..., xn]. I therefore came up with the idea of translating x1:x2:...:xn:build g into [x1:x2:..:xn]++build g, and then letting the current rules do their thing. dolio and carter (in #ghc) were concerned about what would happen if fusion *didn't* occur, in which case the resulting code appears to be *worse*. So then I wrote some rules to fix that up, which actually look likely to be good rules in general. They turn [x1:x2:...:xn
Categories: Offsite Discussion

Bad interaction of inlinePerformIO and mutablevectors

haskell-cafe - Thu, 07/31/2014 - 11:57am
I'm trying to understand why some code isn't behaving as I'd expect, and to determine whether it's a bug or not (and where that bug might be). Here's the simplest version of the code: import Data.ByteString.Internal (inlinePerformIO) import qualified Data.Vector as V import qualified Data.Vector.Mutable as VM main :: IO () main = do vm <- VM.new 1 VM.write vm 0 'A' let x = inlinePerformIO $ VM.write vm 0 'B' x `seq` (V.freeze vm >>= print) A more complete example is available on lpaste[1]. The problem is that I would expect the output to be "B", but in fact "A" is still printed. From the longer paste that I linked to, you can see that: * When using unsafePerformIO and unsafeDupablePerformIO, the semantics work as I would have expected: "B" is printed after forcing evaluation of the result. * If I add a `VM.read vm 0` call after the write, it also works. * Using IORef, the behavior is also as I would have expected: as soon as the result is evaluated, th
Categories: Offsite Discussion

Newtype derivation understanding problem

haskell-cafe - Thu, 07/31/2014 - 11:55am
Excuse me if the question is silly. Thought this MonadCatchIO will be removed in next version of snap, current version has it and I can't understand this derivation: [0] L.Lensed seems like just a newtype wrapper around a function [1], and there is no instance of MonadCatchIO for a function. How is it derived? [0]: https://github.com/snapframework/snap/blob/0.13.2.8/src/Snap/Snaplet/Internal/Types.hs#L260 [1]: https://github.com/snapframework/snap/blob/0.13.2.8/src/Snap/Snaplet/Internal/Lensed.hs#L20 _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Categories: Offsite Discussion

Tor project

haskell-cafe - Thu, 07/31/2014 - 4:42am
Haskell contributions to http://www.torproject.org .. .any thoughts ??
Categories: Offsite Discussion

Haskell Weekly News: Issue 300

haskell-cafe - Thu, 07/31/2014 - 4:40am
Welcome to issue 300 of the HWN, an issue covering crowd-sourced bits of information about Haskell from around the web. This issue covers from July 13 to 26, 2014 Looks like we are chuck-full of goodies this time around! Enjoy! Quotes of the Week * Cale: Functions aren't monads, the type constructor (->) e is a monad * glguy: There's no achievement for using all the operators * benmachine: adoption by lots of people may stunt progress of haskell, but it will probably help the progress of people Top Reddit Stories * Somehow, this happened. Haskell Ryan Gosling. Domain: haskellryangosling.tumblr.com, Score: 144, Comments: 31 Original: [1] http://goo.gl/IQ2f3s On Reddit: [2] http://goo.gl/H24aRa * Papers every haskeller should read Domain: self.haskell, Score: 104, Comments: 35 Original: [3] http://goo.gl/R7uGSB On Reddit: [4] http://goo.gl/R7uGSB * Strict Language Pragma Proposal Domain: ghc.haskell.org, Score: 86, Comments: 95 Origin
Categories: Offsite Discussion

www.galois.com vs Google??

haskell-cafe - Thu, 07/31/2014 - 4:08am
Hello Haskellers(and all FPL people), I just ran across the following effort by Google: http://blogs.techworld.com/war-on-error/2014/07/googles-project-zero-flaw-programme-do-gooding-spin-or-a-much-needed-evolution/index.htm It seems to me that www.galois.com(www.janestreetcapital.com) realizes that the solution to software correctness problems doesn't lie with uncontrolled "mutability" ... Question: does Google concur with www.galois.com or google's effort just "more of the same"?? Vasili
Categories: Offsite Discussion

The ML Family workshop: program and the 2nd call forparticipation

haskell-cafe - Thu, 07/31/2014 - 2:14am
Higher-order, Typed, Inferred, Strict: ACM SIGPLAN ML Family Workshop Thursday September 4, 2014, Gothenburg, Sweden Call For Participation and Program http://okmij.org/ftp/ML/ML14.html Early registration deadline is August 3. Please register at https://regmaster4.com/2014conf/ICFP14/register.php The workshop is conducted in close cooperation with the OCaml Users and Developers Workshop http://ocaml.org/meetings/ocaml/2014/ taking place on September 5. *** Program with short summaries *** (The online version links to the full 2-page abstracts) * Welcome 09:00 * Session 1: Module Systems 09:10 - 10:00 1ML -- core and modules as one (Or: F-ing first-class modules) Andreas Rossberg We propose a redesign of ML in which modules are first-class values. Functions, functors, and even type constructors are one and the same construct. Likewise, no distinction is made between structures, records, or tuples, including tuples over types. Yet, 1ML does not depend on dependent types, and its type
Categories: Offsite Discussion

inits in stream-fusion

libraries list - Wed, 07/30/2014 - 7:33pm
The inits function in the stream-fusion package has the same very bad performance bug as the one in base/Data.List. Presumably a similar fix should work, but some adjustments may be desirable--I don't know enough about the framework to say. David Feuer
Categories: Offsite Discussion

redundant loads and saves in code generated forrecursive functions?

haskell-cafe - Wed, 07/30/2014 - 9:24am
Dear All, I am new to Haskell so please forgive me if I am asking about something already well-understood. I was trying to understand the performance of my Haskell program compiled with the LLVM backend. I used -ddump-llvm to dump the LLVM assembly and then ran llc -O3 on the resulting file to look at the native assembly. One of the generated function starts off with s5BH_info: # < at >s5BH_info # BB#0: subq $208, %rsp movq %r13, 200(%rsp) movq %rbp, 192(%rsp) movq %r12, 184(%rsp) movq %rbx, 176(%rsp) movq %r14, 168(%rsp) movq %rsi, 160(%rsp) movq %rdi, 152(%rsp) movq %r8, 144(%rsp) movq %r9, 136(%rsp) movq %r15, 128(%rsp) movss %xmm1, 124(%rsp) movss %xmm2, 120(%rsp) movss %xmm3, 116(%rsp) movss %xmm4, 112(%rsp) movsd %xmm5, 104(%rsp) movsd %xmm6, 96(%rsp) At some point down the line the function makes
Categories: Offsite Discussion

ETAPS 2015 1st call for papers

General haskell list - Tue, 07/29/2014 - 4:22pm
****************************************************************** CALL FOR PAPERS: ETAPS 2015 18th European Joint Conferences on Theory And Practice of Software London, UK, 11-18 April 2015 http://www.etaps.org/2015 ******************************************************************
Categories: Incoming News

Overlapping and incoherent instances

glasgow-user - Tue, 07/29/2014 - 10:11am
Friends One of GHC's more widely-used features is overlapping (and sometimes incoherent) instances. The user-manual documentation is here<http://www.haskell.org/ghc/docs/latest/html/users_guide/type-class-extensions.html#instance-overlap>. The use of overlapping/incoherent instances is controlled by LANGUAGE pragmas: OverlappingInstances and IncoherentInstances respectively. However the overlap/incoherent-ness is a property of the *instance declaration* itself, and has been for a long time. Using LANGUAGE OverlappingInstances simply sets the "I am an overlapping instance" flag for every instance declaration in that module. This is a Big Hammer. It give no clue about *which* particular instances the programmer is expecting to be overlapped, nor which are doing the overlapping. It brutally applies to every instance in the module. Moreover, when looking at an instance declaration, there is no nearby clue that it might be overlapped. The clue might be in the command line that compiles that module! Iavor
Categories: Offsite Discussion

Deduce issue.

haskell-cafe - Tue, 07/29/2014 - 7:29am
Hi, I have code like follow. And compiling gave me error as the last part. What should I do? ``` class WidgetClass w data Widget = forall a. WidgetClass a => Widget a instance WidgetClass Widget lookupWin :: (WidgetClass w) => WINDOW -> w -> Maybe w lookupWin xwin widget = if widgetWindowId widget == xwin then Just widget else foldl (\a (Widget b) -> maybe (lookupWin xwin b) Just a ) Nothing $ widgetChildren widget ``` --- ``` Graphics/HUI/Widget.hs:15:23: Could not deduce (w ~ a) from the context (WidgetClass w) bound by the type signature for lookupWin :: WidgetClass w => WINDOW -> w -> Maybe w at Graphics/HUI/Widget.hs:10:14-54 or from (WidgetClass a) bound by a pattern with constructor Widget :: forall a. WidgetClass a => a -> Widget, in a lambda abstraction at Graphics/HUI/Widget.hs:14:19-26 ‘w’ is a rigid type variable bound by the type signature for
Categories: Offsite Discussion

How to update a cabal dependency automatically

haskell-cafe - Tue, 07/29/2014 - 6:52am
I have been working on a haskell scotty project recently. I have just added configuration support for the project, which added an extra dependency of Control.Lens. My question is: is there a way update .cabal file automatically, just like cabal init but without recreate .cabal file? Thanks in advance. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Categories: Offsite Discussion

early adopters rejoyce! Haskell Platform 2014.2.0.0Release Candidate 2

haskell-cafe - Tue, 07/29/2014 - 4:31am
The long anticipated Haskell Platform 2014.2 release, including GHC 7.8.3, and numerous updated packages, is almost here! We have created "Release Candidate 2" installers for OS X and Windows, and believe, barring show stopper issues, creepers exploding, or unexpected trips to the nether, these will likely be blessed as the final by the end of the week. If you would like to be an early adopter, please try 'em out... - source tarball: haskell-platform-2014.2.0.0-RC2.tar.gz <http://www.ozonehouse.com/mark/platform/haskell-platform-2014.2.0.0-RC2.tar.gz> - source repo: haskell/haskell-platform at 2014.2.0.0-RC2 <https://github.com/haskell/haskell-platform/tree/2014.2.0.0-RC2> - windows 32bit: hskellPlatform-2014.2.0.0-i386-RC2-setup.exe <http://www.ozonehouse.com/mark/platform/hskellPlatform-2014.2.0.0-i386-RC2-setup.exe> - windows 64bit:hskellPlatform-2014.2.0.0-x86_64-RC2-setup.exe <http://www.ozonehouse.com/mark/platform/hskellPlatform-2014.2.0.0-x86_64-RC2-setup.exe> - os x 64b
Categories: Offsite Discussion

Munich Haskell Meeting

haskell-cafe - Mon, 07/28/2014 - 9:10pm
Dear all, on Wednesday, 30th of July, once again our monthly Haskell Meeting takes place. We meet at 19h30 at Max-Emanuel-Brauerei in Munich. If you plan to join, please go here to find the details and don't forget to click the button: http://www.haskell-munich.de/dates Have a nice evening, Heinrich
Categories: Offsite Discussion

RV 2014: Call for Participation

General haskell list - Mon, 07/28/2014 - 8:16pm
****************************************************************** CALL FOR PARTICIPATION RV 2014: 14th International Conference on Runtime Verification September 22 - September 25, 2014, Toronto, Canada http://rv2014.imag.fr ****************************************************************** ***************** OVERVIEW ***************** Runtime verification is concerned with monitoring and analysis of software and hardware system executions. Runtime verification techniques are important for system correctness, reliability, and robustness; they are complementary to conventional testing, and more practical than exhaustive formal verification. Runtime verification can be used prior to deployment, for testing, verification, and debugging purposes, and after deployment for ensuring reliability, safety, and security and for providing fault containment and recovery as well as online system repair. Topics of interest to the conference include: - specification languages - specification mining - pr
Categories: Incoming News

New gtk2hs 0.12.4 release

gtk2hs - Wed, 11/21/2012 - 12:56pm

Thanks to John Lato and Duncan Coutts for the latest bugfix release! The latest packages should be buildable on GHC 7.6, and the cairo package should behave a bit nicer in ghci on Windows. Thanks to all!

~d

Categories: Incoming News