News aggregator

NFM 2015 - deadline extension: Nov 18

General haskell list - Mon, 11/03/2014 - 8:37pm
CALL FOR PAPERS *** Deadline extension: Nov 18, 2014 *** The 7th NASA Formal Methods Symposium http://www.NASAFormalMethods.org/nfm2015 <http://www.nasaformalmethods.org/nfm2015> 27 – 29 April 2015 Pasadena, California, USA THEME The widespread use and increasing complexity of mission- and safety-critical systems require advanced techniques that address their specification, verification, validation, and certification. The NASA Formal Methods Symposium is a forum for theoreticians and practitioners from academia, industry, and government, with the goals of identifying challenges and providing solutions to achieving assurance in mission- and safety-critical systems. Within NASA such systems include for example autonomous robots, separation assurance algorithms for aircraft, Next Generation Air Transportation (NextGen), and autonomous rendezvous and docking for spacecraft. Moreover, emerging paradigms such as property-based design, code generation, and safety cases are bringing with them new chall
Categories: Incoming News

New Functional Programming Job Opportunities

haskell-cafe - Mon, 11/03/2014 - 7:00pm
Here are some functional programming job opportunities that were posted recently: Senior Software Engineer at Soda Software Labs http://functionaljobs.com/jobs/8758-senior-software-engineer-at-soda-software-labs Cheers, Sean Murphy FunctionalJobs.com
Categories: Offsite Discussion

[ANN]json-autotype: Tool generating JSON parsers and type declarations from example documents...

haskell-cafe - Mon, 11/03/2014 - 6:59pm
Dear Fellow Haskellers, I've just published a beta version of a tool facilitating generation of Haskell type declarations from example JSON documents. It is supposed to simplify implementing large JSON-based interfaces, without necessity of writing any boilerplate code. USAGE: ====== After installing with `cabal install json-autotype`, you might generate stub code for the parser: $ json-autotype input.json -o MyFormat.hs Then you might test the parser by running it on an input file: $ runghc MyFormat.hs input.json If everything is correct, then feel free to inspect the data structure generated automatically for you! The goal of this program is to make it easy for users of big JSON APIs to generate entries from example data. Occasionally you might find a valid JSON for which `json-autotype` doesn't generate a correct parser. You may either edit the resulting file _and_ send it to the author as a test case for future release. HOW IT WORKS: ============== The program uses union type unification to tr
Categories: Offsite Discussion

Proposal: strictify foldl'

libraries list - Mon, 11/03/2014 - 6:51pm
As Duncan Coutts explains toward the end of http://www.well-typed.com/blog/90/ (which proposes something else I personally *don't* endorse), foldl', the strict foldl, isn't actually strict enough. In particular, it's only conditionally strict in the initial value for the accumulator: foldl' (\_ x -> x) undefined [3] = 3 Why does this matter? Strictness analysis needs to look at (and be able to look at) the function passed to foldl' to determine whether the expression is strict in the initial value. foldl'-as-foldr tends to complicate this sort of analysis already. Proposal: make foldl' unconditionally strict in the initial accumulator value, both in GHC.List and in (the default definition in) Data.Foldable, and make foldr' in Data.Foldable unconditionally strict in the initial value of its accumulator. Specifically, foldl' k z0 xs = foldr (\v fn z -> z `seq` fn (k z v)) id xs z0 would change to foldl' k !z0 xs = foldr (\v fn z -> z `seq` fn (k z v)) id xs z0 ______________________________________
Categories: Offsite Discussion

add Storable a => Storable (Ratio a) and Storable a => Storable (Complex a) to base

libraries list - Mon, 11/03/2014 - 6:07pm
Getting those two into base for 7.10 would be quite nice. I think this will mostly impact folks who maintain numerical computing libraries, such as myself, and even then, I think this would be a change well worth having! discussion period 1 week (because I'd like to get it OK'd with plenty of time before the merge window for 7.10 finally closes) _______________________________________________ Libraries mailing list Libraries< at >haskell.org http://www.haskell.org/mailman/listinfo/libraries
Categories: Offsite Discussion

Travis builds failing with spurious errors

haskell-cafe - Mon, 11/03/2014 - 5:29pm
Hi all, Apologies if this is not the right space to ask this question. We set up CI for Agda with Travis: <https://travis-ci.org/agda/agda>. The problem is that we're having trouble with older versions of GHC. For example, with GHC 7.4.2, the build complains that ScopedTypeVariables is not enabled, even if it is. You can check the build failure here: <https://travis-ci.org/agda/agda/jobs/39834738#L795>, and the relevant file here: <https://github.com/agda/agda/blob/9a82afaf7657a97e85e7e31ea23f6386f99acd35/src/full/Agda/TypeChecking/Serialise.hs>. As you can see from the pragmas ScopedTypeVariables is enabled, and in fact when building locally I have no problems. We also got some spurious messages regarding syntax. Has anybody encountered similar problems? I don't know if it's something depending on Travis or some configuration mistakes, but I'm a bit at loss on how to research this. Moving the OPTIONS_GHC pragma after the LANGUAGE pragmas seems to fix the issue but I'd like to know what's going on.
Categories: Offsite Discussion

Help with Data.Map (new to haskell ..)

Haskell on Reddit - Mon, 11/03/2014 - 4:57pm

Hey guys,

I've been looking on the web on how haskell works, but even with google's help I can't figure out what's wrong with my code:

import qualified Data.Map as Map data Env = EmptyEnv | BasicEnv Map.Map String Val | ExtendEnv String Val | GetEnv Env String Val deriving (Show, Eq)

The error is this:

Expecting two more arguments to `Map' Expected a type, but `Map' has kind `* -> * -> *' In the type `Map' In the definition of data constructor `BasicEnv' In the data declaration for `Env' Failed, modules loaded: none.

Val is another type I deffined.

Until now this tutorial has been helpfull, but now I'm stuck..

Edit: Mistake in the title, I wanted to say that I'm "new to haskell" :)

Solved:

BasicEnv (Map.Map String Val)

Works!

Thanks for the help guys!

submitted by husky11
[link] [4 comments]
Categories: Incoming News

ANN: Released new version of Haskell plugin forIntelliJ

haskell-cafe - Mon, 11/03/2014 - 10:57am
Hi everyone, I'm glad to announce version 0.2. It's available in Jetbrains plugin repository. Besides improvements and minor changes, version 0.2 has support for HLint inspection and quick fixes based on HLint suggestions. For more information, see change notes. Complete feature list is now: - Syntax highlighting (which can be customized); - Error/warning highlighting; - Find Usages of identifiers; - Resolving references of identifiers (also to library code if library source code is added to project and resolves inside import declaration); - Code completion by resolving references; - Renaming variables (which first shows preview so refactoring scope can be adjusted); - View type info from (selected) expression; - View expression info; - View quick documentation; - View quick definition; - Structure view; - Navigate to declaration (called `Class` in IntelliJ menu); - Navigate to identifier (called `Symbol` in IntelliJ menu); - Code completion by looking to import declarations; - Simple form of code for
Categories: Offsite Discussion

Pattern variables in Template Haskell

haskell-cafe - Mon, 11/03/2014 - 10:07am
Dear Haskell-cafe, I'm trying to use Template Haskell to generate patterns in Haskell code, but after a couple of days of trying, I have not come with a solution. I hope somebody could help me. My problem is basically that I want something like: example :: Maybe a -> a example $(j "x") = x to work correctly. The idea of this simple quoter is to generate code similar to: example :: Maybe a -> a example (Just x_123) = x_123 that is, to create the "Just" pattern, and to make "x" bind to the same element. Right now my code reads: j :: String -> Q Pat j s = return (ConP 'Just [VarP (mkName s)]) which generated a new variable "x" each time, thus unable to match with the "x" in the RHS. I have also tried with lookupValueName. Note that my problem is a bit more complicated, with variable names coming from a different source. However, I think that if I solve this problem where I can make variables in a pattern and in an expression match, I should be able to use them in my complete solution. Thanks in advance
Categories: Offsite Discussion

Douglas M. Auclair (geophf): October 2014 1HaskellADay Problems and Solutions

Planet Haskell - Mon, 11/03/2014 - 6:18am

October, 2014
  • October 1st, 2014, Wednesday: Pathways into Darkness http://lpaste.net/111444 Because Daerkness is the new Pink. Today's #haskell problem. ...AAAAAND we went there: Dark, Darkest, Darko! http://lpaste.net/111919 A solution to the #haskell grid-pathing problem using Data.Graph. FUN!
  • October 2nd, 2014, Thursday: Tweet, tweet! Summer Factorial! http://lpaste.net/111947 a #haskell 'sum'mer exercise for the Fall. From "Power set, HO!" to "Power Sets? NO!" http://lpaste.net/111982 A solution to today's longest factors-sum #haskell problem.
  • October 3rd, 2014, Friday: In which I get WHACKED by the Missus for today's #haskell problem http://lpaste.net/112005 (I've printed out the word-ladders in long form so you can give them to your Missus, thus to avoid enWHACKification! http://lpaste.net/112009) GROSS ('Get Rid Of Stupid wordS') club and goal-directed searches using Levenstein distances give us today's solution http://lpaste.net/112064
  • BONUS! puzzles for today: YOU get RICK ROLLED! http://lpaste.net/112006 Oh, yeah! I went there!
<object class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="https://ytimg.googleusercontent.com/vi/dQw4w9WgXcQ/0.jpg" height="266" width="320"><param name="movie" value="https://youtube.googleapis.com/v/dQw4w9WgXcQ&amp;source=uds"/><param name="bgcolor" value="#FFFFFF"/><param name="allowFullScreen" value="true"/><embed allowfullscreen="true" height="266" src="https://youtube.googleapis.com/v/dQw4w9WgXcQ&amp;source=uds" type="application/x-shockwave-flash" width="320"></embed></object>
  • You can't kill the metal, unless you're Rick Rolled; solution to #haskell bonus problem at http://lpaste.net/112127
<object class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="https://ytimg.googleusercontent.com/vi/MmpnBGtoG0M/0.jpg" height="266" width="320"><param name="movie" value="https://youtube.googleapis.com/v/MmpnBGtoG0M&amp;source=uds"/><param name="bgcolor" value="#FFFFFF"/><param name="allowFullScreen" value="true"/><embed allowfullscreen="true" height="266" src="https://youtube.googleapis.com/v/MmpnBGtoG0M&amp;source=uds" type="application/x-shockwave-flash" width="320"></embed></object>

  • October 4th, 2014: Dear Dad, SEND + MORE = MONEY http://lpaste.net/112160 Today's #haskell problem. Problem SOLVED! (naively) ... for a small processing fee, ... ;) http://lpaste.net/112175
  • October 7th, 2014: An American Family http://lpaste.net/112220 Today's #haskell problem gives us the #Twilight lexicon... in a 'VERY' 'BRIEF' synopsis. #ontology 8 of 21 questions are answered against the #Twilight (extended) family tree http://lpaste.net/112307  My enthusiasm overcame my reasonableness.
  • BONUS #haskell problem for today! http://lpaste.net/112229 Renesmee's (doting) Aunts because EVERYONE dotes on Renesmee. By law. Do-it-to-it! "And Bella Swan lived Happily Ever After" ... and that's the whole point of the 4-book #twilight series. http://lpaste.net/112339 #ontology
  • October 8th, 2014: "A more clever approach than brute force is desirable" for today's #haskell problem http://lpaste.net/112310 (Me? Brute Force, All the WAY!) (Not so) Brutish pathing through triangular sums ... Commited Choice FTW! http://lpaste.net/112355 A solution to today's #haskell problem.
  • October 9th, 2014: Sugar and spice and everything nice (http://lpaste.net/111904): that's what today's #haskell problem from a logic puzzle from 1957 is made of. A long path to a solution to this day's engagement announcements #haskell problem, involving monoidal Frege logic. http://lpaste.net/112446
  • October 10th, 2014: "Oh, it's 4:42. No, it isn't, ... zzzz" Those kinds of conversations come up all the time in today's #haskell problem http://lpaste.net/112404 And the poor little matchstick boy went back to sleep in his warm, comfy bed, hot chocolate by his bedside http://lpaste.net/112461 a solution
  • BONUS! Okay, so you're saying liars ALWAYS lie and TruthTellers ALWAYS tell the truth. http://lpaste.net/112405 Wait ... even in Vegas? #Bonus In which we may learn about your sense of humo(u)r http://lpaste.net/112508 a solution using logic, meta-logic, and coercive logic. #ontology 
  • October 13th, 2014: In which we discover Columbus is Big in Japan ... no, wait: that's #ekmett. http://lpaste.net/112511 Today's #haskell problem. We solve this problem by WAY overusing the State Monad! http://lpaste.net/112537 ... Letter to a Young Haskell Enthusiast should have added: "Don't overused the State Monad!" I hear and obey the advice of ekmett!
<object class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="https://ytimg.googleusercontent.com/vi/tl6u2NASUzU/0.jpg" height="266" width="320"><param name="movie" value="https://youtube.googleapis.com/v/tl6u2NASUzU&amp;source=uds"/><param name="bgcolor" value="#FFFFFF"/><param name="allowFullScreen" value="true"/><embed allowfullscreen="true" height="266" src="https://youtube.googleapis.com/v/tl6u2NASUzU&amp;source=uds" type="application/x-shockwave-flash" width="320"></embed></object>

  • What time is it? π-time? No. (But you were close ...) It's BONUS #haskell problem time! http://lpaste.net/112515 Go discover the New World! And, we discover, solving this bonus problem, that the New World was India (and not the ink), no matter what anyone else says, eh, Columbus? http://lpaste.net/112533
  • October 14th, 2014: We look at reciprocally-cycled decimal values of fractions in today's #haskell problem http://lpaste.net/112565 In which we discover that @geophf must read the problem statement carefully. A solution to today's #haskell problem http://lpaste.net/112592
  • October 15th, 2014: Today's #haskell problem: grid placement http://lpaste.net/112606. Or as Neo says: "Whoa."
<object class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="https://ytimg.googleusercontent.com/vi/WFNEgdwjEhs/0.jpg" height="266" width="320"><param name="movie" value="https://youtube.googleapis.com/v/WFNEgdwjEhs&amp;source=uds"/><param name="bgcolor" value="#FFFFFF"/><param name="allowFullScreen" value="true"/><embed allowfullscreen="true" height="266" src="https://youtube.googleapis.com/v/WFNEgdwjEhs&amp;source=uds" type="application/x-shockwave-flash" width="320"></embed></object>


  • October 16th, 2014: An ... 'intelligence' test http://lpaste.net/112694 for today's #haskell problem. Intelligence test: answered. http://lpaste.net/112759 I had to melt my brain to answer it, however, so that happened.
  • October 17th, 2014: Friedman day was yesterday, http://lpaste.net/112707 but it's today's #haskell problem. Bonus: Friedman proofsno less! http://lpaste.net/112709 ... using Frege's logic ... but only if you want to ... The solution (including the bonus solution) for the Friedman-day problem posted at http://lpaste.net/112735  WITH FOR-LOOPS!
  • October 20th, 2014: O! Little Town of Milford! http://lpaste.net/112921 has a butcher, baker, and candlestick maker, but who is who? Today's #haskell problem. Okay, gag me with the sequence operator! BLEH! (I really should have gone relational calculus here! :/) A solution at http://lpaste.net/112954
  • October 21st, 2014: Se7en Little numbers ... okay, well, four of them, anyway, for today's #haskell problem http://lpaste.net/112972 Quantum nodes of scintillating thought http://lpaste.net/112996  A solution to today's #Haskell problem.
<object class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="https://ytimg.googleusercontent.com/vi/zsyjS_vJfkw/0.jpg" height="266" width="320"><param name="movie" value="https://youtube.googleapis.com/v/zsyjS_vJfkw&amp;source=uds"/><param name="bgcolor" value="#FFFFFF"/><param name="allowFullScreen" value="true"/><embed allowfullscreen="true" height="266" src="https://youtube.googleapis.com/v/zsyjS_vJfkw&amp;source=uds" type="application/x-shockwave-flash" width="320"></embed></object>
  • October 22nd, 2014: Word Numb3rs is today's #haskell puzzle (thanks to @BenVitale) 'AND' in your language of choice as you so choose. http://lpaste.net/113018 Hinglish-Vinglish is our response to this exercise.  http://lpaste.net/113045 "Fruitful." Yeah. Well, at least we got Data.Numeral.English http://lpaste.net/113037 out of it. SWEET!
  • October 23rd, 2014: Today's #haskell problem comes from http://projecteuler.net and is about ... well: Euler, himself! http://lpaste.net/113069 Well, if you wanted list of writer monads, you could've just asked for a list of writer monads http://lpaste.net/113084 
  • October 24th, 2014: Even odds is our #haskell problem today, thanks to @BenVitale http://lpaste.net/113141 A solution (actually two defined solutions) to @BenVitale even odds problem posted for today's #haskell problem http://lpaste.net/113167
I dub this coming week 'Kakuro week' for the theme of #haskell problems to solve (puzzle rendered using #haskell)
  • October 27th, 2014: #kakuro-week: the empty slate is our step one for our #haskell problem(s) to solve today http://lpaste.net/113255


  • Then we have the...'filled'-slate as a solution to 'today's #haskell problems for #kakuro-week http://lpaste.net/113314 
  • October 28th, 2014: «On y va!» declaims Sgt. Johnson as he charges headlong into solving today's #haskell problem http://lpaste.net/113316 
  • And that's how a 'partial' cookie crumbles. Partially. A partial solution to yesterday's #haskell #kakuro problem http://lpaste.net/113397
  • October 29th, 2014: A magnificent clue for today's #haskell problem in this #kakuro-puzzle-themed week http://lpaste.net/113399
  • October 30th, 2014: So, what does the 'Su' mean? http://lpaste.net/113451 Today's #haskell puzzler is a sudoku-solver. That you wrote. DoIt-ToIt!
  • October 31st, 2014: Merry Christmas! No. Heurieusement anniversaire! Nope. TRICK OR TREAT! Ya, that's the stuff! http://lpaste.net/113524 Today's #haskell problem
Categories: Offsite Blogs

Nomyx (Beta 7): win 10000 Blings!

haskell-cafe - Mon, 11/03/2014 - 12:12am
Join us on Nomyx: www.nomyx.net It's a unique game where you can change the rules of the game, while playing it. Log in, and you'll understand better what the title means (check rule 44 proposed by me in the game)! Cheers, Corentin _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Categories: Offsite Discussion

Presumably easy question regarding types

Haskell on Reddit - Sun, 11/02/2014 - 7:19pm

Hello! Could someone please explain the following? Given this function... (Edited for a typo - thanks guys!)

flip :: (a -> b -> c) -> b -> a -> c flip f x y = f y x

Why is this true?

x :: b

I thought x would be a? Isn't f :: a -> b -> c? So x is a function which takes a as an argument and returns a function fx which takes b as an argument and returns c? I am so confused and it's being a huge impediment to my getting further into this cool language!

Thanks very much for your help. Sorry this is a very elementary question.

submitted by Orakar
[link] [32 comments]
Categories: Incoming News

Help with nix and ghc-mod ?

Haskell on Reddit - Sun, 11/02/2014 - 5:12pm

I was not sure if I should rather post this here or over at /r/nixos but I think quite a few of you are using nix and/or nixos anyhow. This weekend I tried to get started with using nix on my ubuntu laptop and thanks to some friendy guys in #nixos and some blog posts I did get some basic setup running. The problem I am facing right now is with ghc-mod. I cannot get it to work and the errors are absolutely cryptic to me:

[nix-shell : ~/Development/haskell/hoobuddy]$ ghc-mod /tmp/gilligan/ghc-mod-gilligan-Development-haskell-hoobuddy27622/package.cache: getFileStatus: does not exist No Such file or directory)

This is my default.nix for this project, the hoobuddy.cabal file was created using cabal2nix. Googling around I did not find much apart from this and I am not sure if this is actually related. Has anyone else here had similar problems or could give me a tip what I need to do to fix this? Any help would be appreciated ;)

Thanks.

submitted by __gilligan
[link] [12 comments]
Categories: Incoming News

Neil Mitchell: November talks

Planet Haskell - Sun, 11/02/2014 - 3:31pm

Summary: I'll be talking at CodeMesh 2014 on 5th November and FP Days on 20th November.

I am giving two talks in London this month:

CodeMesh 2014 - Gluing Things Together with Haskell, 5th Nov

I'll be talking about how you can use Haskell as the glue language in a project, instead of something like Bash. In particular, I'll cover Shake, NSIS and Bake. The abstract reads:

A large software project is more than just the code that goes into a release, in particular you need lots of glue code to put everything together - including build systems, test harnesses, installer generators etc. While the choice of language for the project is often a carefully considered decision, more often than not the glue code consists of shell scripts and Makefiles. But just as functional programming provides a better way to write the project, it also provides a better way to write the glue code. This talk covers some of the technologies and approaches we use at Standard Chartered to glue together the quant library. In particular, we'll focus on the build system where we replaced 10,000 lines of Makefiles with 1,000 lines of Haskell which builds the project twice as fast. We'll also look at how to test programs using Haskell, how to replace ancillary shell scripts with Haskell, and how to use Haskell to generate installers.

FP Days 2014 - Building stuff with Shake, 20th Nov

I'll be giving a tutorial on building stuff with Shake. It's going to be less sales pitch, more how you structure a build system, and how you use Shake effectively. The abstract reads:

Build systems are a key part of any large software project, relied upon by both developers and release processes. It's important that the build system is understandable, reliable and fast. This talk introduces the Shake build system which is intended to help meet those goals. Users of Shake write a Haskell program which makes heavy use of the Shake library, while still allowing the full power of Haskell to be used. The Shake library provides powerful dependency features along with useful extras (profiling, debugging, command line handling). This tutorial aims to help you learn how to think about writing build systems, and how to make those thoughts concrete in Shake.

Categories: Offsite Blogs

Nomyx: win 10000 Blings!

Haskell on Reddit - Sun, 11/02/2014 - 1:43pm

Join us on Nomyx: www.nomyx.net
It's a unique game where you can change the rules of the game, while playing it.
Log in, and you'll understand better what the title means (check rule 44 proposed by me in the game)!

submitted by kaukau
[link] [8 comments]
Categories: Incoming News

Discussion: Arities of <*> and *> for Monad instances

libraries list - Sun, 11/02/2014 - 11:29am
http://hackage.haskell.org/package/base-4.7.0.1/docs/Control-Applicative.html says that The other methods have the following default definitions, which may be overridden with equivalent specialized implementations: u *> v = pure (const id) <*> u <*> v and If f is also a Monad, it should satisfy ... (<*>) = ap The (potential) trouble is that these have higher arities than is always natural. For example, it would seem reasonable to say (<*>) Just f = fmap f (<*>) Nothing = const Nothing and to replace the default definition of (*>) like so: (*>) a1 = (<*>) (id <$ a1) but these are not strictly equivalent because they have arity 1 instead of arity 2. Would such definitions be be better in some cases? If so, should we weaken the rules a bit? _______________________________________________ Libraries mailing list Libraries< at >haskell.org http://www.haskell.org/mailman/listinfo/libraries
Categories: Offsite Discussion