News aggregator

How should I indent my code in Emacs?

Haskell on Reddit - Sat, 02/14/2015 - 3:59pm

I've been struggling with this ever since I started, and the more I try to configure my Emacs config, the worse it gets.

I've tried using hident, but out of the three available styles only the gibiansky one seems to work for the kind of code I write (the others split expressions way too much), but it still kills all the whitespace I've intentionally added, so I only rarely use it.

Out of the three indentation modes in Emacs, haskell-indent-mode, haskell-indentation-mode and haskell-simple-indent-mode, I can't find one that would just work. Most of the time I stick with haskell-indentation-mode, but recently it seems as if it went crazy and started indenting things differently.

Now I understand that it is really difficult to get indentation right in a language like Haskell, but I'm not looking for something to re-format my code, I only want proper indentation.

What do you guys use for indenting your Haskell code?

submitted by progfu
[link] [14 comments]
Categories: Incoming News

Changes to Haskell Weekly News: In with the Old,In with the New

haskell-cafe - Sat, 02/14/2015 - 3:56pm
Dear Reader, A few days ago Daniel Santa Cruz stepped down from the helm of Haskell Weekly News. With others that read HWN regularly, I thank him for his long service and wish him and his family godspeed. Did you know John Goerzen started HWN in August 2, 2005? Now a week from today, February 21, 2015, Simon and Simon shall close your window of opportunity to opine on drastic changes to the prelude. By sheer coincidence, the very first issue of HWN links to a thread on Updating the Haskell Standard. John himself started the thread. Today the talk is about the Foldable and Traversable type classes. Back then it was about Overlapping and Undecidable instances, the FFI, and a Hierarchical namespace. But these are all features we take for granted today. What sweeping changes took hold over the last ten years. There was no hackage. Only in September 2005 did Isaac Jones and David Himmelstrup announce beta-testing of a cabal prototype. Imagine life without hackage. Today there are 7664 packages all ready to
Categories: Offsite Discussion

ANN: ZuriHac 2015

Haskell on Reddit - Sat, 02/14/2015 - 2:43pm
Categories: Incoming News

type checker plugin does not affect inferred type signatures

glasgow-user - Sat, 02/14/2015 - 12:31pm
Hello, Using ghc-7.10 rc1, I am trying to write a type checker plugin that adds wanted constraint which helps ghc to infer more types. However, it seems that the wanted constraints I add don't get added to the inferred type of the declaration, so that I get a type error like: a.hs:1:1: Warning: Could not deduce (SameLength y x) arising from an application from the context (HLength x ~ HLength y) bound by the inferred type of p :: (HLength x ~ HLength y) => Proxy '(y, x) at a.hs:11:1-69 I think ghc should be able to figure out p :: (SameLength x y, HLength x ~ HLength y) => Proxy '(x,y). The code is self-contained: git clone https://github.com/aavogt/HListPlugin cd HListPlugin/ex make Is this approach supposed to be possible, or am I supposed to rewrite things such that I only produce CtGivenS from the plugin? Regards, Adam
Categories: Offsite Discussion

Any recommendations on what GUI library I should use?

Haskell on Reddit - Sat, 02/14/2015 - 10:45am

Looking to make a basic GUI and was wondering what library would be best for this. It would be preferable if it ran on multiple operating systems :)

submitted by Apterygiformes
[link] [39 comments]
Categories: Incoming News

ANN: rasterific-svg & asciidiagram

Haskell on Reddit - Sat, 02/14/2015 - 7:39am

Single reddit submition for two new hackage packages:

submitted by heafiheihfaeiefh
[link] [1 comment]
Categories: Incoming News

GLUT + VSync?

Haskell on Reddit - Sat, 02/14/2015 - 7:23am

I am trying to make my first game in Haskell, a top-down space-craft shooter (how original!). Making good progress so far, but there is some horrible flickering going on as my background (a white grid so far) moves. I have already enabled Double Buffering, which stopped my ship from flickering, but the background issue is persistent. "Hmm", I thought to myself, "probably VSync". Some quick googling confirmed my thesis, but even after quite some more googling, I did not find a satisfying answer on how to enable VSync in GLUT. There was one comment stating it "needed to be hacked in", but didn't specify how. All the other solutions had nothing to do with the Haskell GLUT library. Can anyone please help me?

submitted by WSBoonami
[link] [10 comments]
Categories: Incoming News

HaskBoard?

haskell-cafe - Sat, 02/14/2015 - 6:55am
I asked about running GHCI on something like the Arduino due, and was told that there wasn't enough CPU on it for that. How about getting it running on something like a PyBoard? http://www.adafruit.com/products/2390 _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Categories: Offsite Discussion

Is there a cross platform CA certificate bundlesolution for HsOpenSSL?

haskell-cafe - Sat, 02/14/2015 - 2:31am
If I want to use HsOpenSSL for a tls client application that verifies the server certificate I have to manually specify a CA certificate bundle containing the trusted roots. For example, in a linux system, I would do the following mkTlsContext :: IO Context mkTlsContext = do ctx <- context contextSetVerificationMode ctx (VerifyPeer True False Nothing) contextSetCADirectory ctx "/etc/ssl/certs" return ctx The problem is that the above solution only works for linux. Is there a cross-platform way to find a reasonable CA bundle and use it with HsOpenSSL? Note that the tls package has x509-system [1] that does exactly that. So I am basically asking if anybody has written something similar for HsOpenSSL. [1] https://hackage.haskell.org/package/x509-system
Categories: Offsite Discussion

Why doesn't TH expose its parser?

haskell-cafe - Fri, 02/13/2015 - 11:32pm
What's the reason that there isn't a parseExp :: String -> Q Exp, parseDecl, etc.? It's a pretty common use case to write some syntactic extension that merely extends regular Haskell. We end up with the haskell-src-meta package which doesn't support full GHC Haskell and doesn't know how to parse infix applications. It doesn't give a strong story for quasi-quotes to be useful for extensions to Haskell's syntax itself, as opposed to just mini-DSLs. Here's a case in point: idiom brackets. You'd like to implement them like this: [i|foo bar mu|] → foo <$> bar <*> mu You want it to be full Haskell inside, so foo could easilly be a case or a let, etc., so a trivial way to do that would be to just parse the string "foo bar mu" with parseExp and then do the above simple transformation. Job done. In practice, we can't do this. Our best option is HSE, but it's not ideal. Another way to do this is: $(idiom [|foo bar mu|]) And because [|…|] produces a Q Exp, you can just go ahead and do the rewrite on the resu
Categories: Offsite Discussion

ETAPS 2015 call for participation

General haskell list - Fri, 02/13/2015 - 10:13pm
****************************************************************** CALL FOR PARTICIPATION ETAPS 2015 18th European Joint Conferences on Theory And Practice of Software London, UK, 11-18 April 2015 http://www.etaps.org/ ******************************************************************
Categories: Incoming News

Wrote a lib for JSON Schema v4

Haskell on Reddit - Fri, 02/13/2015 - 8:59pm
Categories: Incoming News

TYPES 2015 2nd call for contributions

General haskell list - Fri, 02/13/2015 - 7:42pm
Reminder: Abstracts (2 pp easychair.cls) due by 13 March 2015 News: Tutorials by Joachim Kock and Peter LeFanu Lumsdaine. Post-proceedings volume in LIPIcs confirmed. CALL FOR CONTRIBUTIONS 21st International Conference on Types for Proofs and Programs, TYPES 2015 Tallinn, Estonia, 18-21 May 2015 http://cs.ioc.ee/types15/ Background The TYPES meetings are a forum to present new and on-going work in all aspects of type theory and its applications, especially in formalized and computer assisted reasoning and computer programming. The meetings from 1990 to 2008 were annual workshops of a sequence of five EU funded networking projects. Since 2009, TYPES has been run as an independent conference series. Previous TYPES meetings were held in Antibes (1990), Edinburgh (1991), Båstad (1992), Nijmegen (1993), Båstad (1994), Torino (1995), Aussois (1996), Kloster Irsee (1998), Lökeberg (1999), Durham (2000), Berg e
Categories: Incoming News

ICFP 2015: Final Call for Papers

haskell-cafe - Fri, 02/13/2015 - 6:28pm
===================================================================== 20th ACM SIGPLAN International Conference on Functional Programming ICFP 2015 Vancouver, Canada, August 31 - September 2, 2015 http://www.icfpconference.org/icfp2015 ===================================================================== Important Dates ~~~~~~~~~~~~~~~ Submissions due: Friday, February 27 2015, 23:59 UTC-11 https://icfp15.hotcrp.com/ Author response: Tuesday, April 21, 2015 through Thursday, 23 April, 2015 Notification: Friday, May 1, 2015 Final copy due: Friday, June 12, 2015 Scope ~~~~~ ICFP 2015 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 language
Categories: Offsite Discussion

ICFP 2015: Final Call for Papers

General haskell list - Fri, 02/13/2015 - 6:28pm
===================================================================== 20th ACM SIGPLAN International Conference on Functional Programming ICFP 2015 Vancouver, Canada, August 31 - September 2, 2015 http://www.icfpconference.org/icfp2015 ===================================================================== Important Dates ~~~~~~~~~~~~~~~ Submissions due: Friday, February 27 2015, 23:59 UTC-11 https://icfp15.hotcrp.com/ Author response: Tuesday, April 21, 2015 through Thursday, 23 April, 2015 Notification: Friday, May 1, 2015 Final copy due: Friday, June 12, 2015 Scope ~~~~~ ICFP 2015 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 language
Categories: Incoming News