News aggregator

ItaloHaskell, the Italian community

General haskell list - Tue, 06/09/2015 - 8:15am
ItaloHaskell is a project to form a community of Haskell programmers who live in Italy or speak Italian.The way I'd like to proceed is to form a critical mass online and then start meetups and conferences. There's a maling list here:https://groups.google.com/forum/#!forum/italohaskell A facebook group here:https://www.facebook.com/groups/ItaloHaskell/ A twitter account here:https://twitter.com/italo_haskell Please tell everyone who may be interested. Vitalij_______________________________________________ Haskell mailing list Haskell< at >haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell
Categories: Incoming News

FP Complete: ANNOUNCING: first public beta of stack

Planet Haskell - Tue, 06/09/2015 - 2:00am

stack is a new, complete, cross-platform development tool aimed at both new and experienced Haskell developers alike, for installing and setting up the compiler, installing packages needed, and building, testing or benchmarking one or more packages in a project at a time. It's the whole stack.

We developed it in collaboration with the Commercial Haskell Group, with two deliberate goals in mind:

  1. Newbie friendliness, ease of setup and doing the right thing by default. Just get people running with Haskell as conveniently as possible.
  2. Catering to the finer points of serious commercial Haskell development. Supporting the modern use-cases of working on large Haskell projects.

In short, it's a program that you run in a directory with a stack configuration file in it (stack.yaml—automatically created if one doesn't exist). That directory may contain one or many packages inside it to be built. Then there are commands to build, test, install dependencies, run GHC, etc.

Here's a rundown of the advantages stack brings to the table. For both newbies and experienced Haskellers:

  • It's really easy to get going with Haskell. You can just run stack build in a package directory and it will automatically download and install GHC, the standard Haskell compiler, for you, download the package index and install packages that are needed.
  • It also caters to newbies reading books who just want to run ghc on a file. You can run stack ghc X.hs and it will download GHC if necessary, etc. until it can run GHC on that file. The same is true for stack ghci, etc.
  • It automatically assumes (and does some figuring out if there's a project Cabal file) the latest LTS Haskell release as its source of packages, or otherwise a nightly release. This means you can just use packages without worrying about what versions match up and trying to think like a package manager thinks.

For experienced Haskellers, there is support for typical use-cases and subtleties of larger projects:

  • This also means you can just put the snapshot release in your version control, via the stack.yaml file, which is important for reliable collaboration.
  • Serious commercial or large scale users of Haskell can build so-called "mega-repos", by adding to the list of packages in your stack.yaml, you can build/test/bench multiple projects at once. stack build will just build everything. stack build this will build this package and rebuild anything that depends on it, and also any of its dependencies that changed.
  • You can enable profiling in the configuration and this will automatically rebuild all packages with profiling turned on for you.
  • Packages are installed into isolated package databases by default. There is a layering of three package databases: The global database, the snapshot database, and your personal project's database. Many projects can share the same global database (base, bytestring, etc.) and the snapshot database (e.g. text, haskell-src-exts, etc.)—which means no unnecessary rebuilding of packages—and yet each project has its own package database, so they are isolated from each other and cannot break each other.
  • Binary installs of your personal projects are also isolated into that directory.
  • In this "local" database, you can also specify newer upstream versions than are available in the snapshot. In fact, the snapshot is optional, you can be based on plain Hackage. This is not the default behaviour and is a configuration option.
  • It also supports docker integration for truly sandboxed environments. By enabling docker in the configuration, running stack build will download the image if necessary and then run the build inside the docker image. There is an array of options available for the docker integration.

We first arrived at this tool based on feedback from our clients at FP Complete and have been using this tool in-house ourselves for around a year, in several iterations. This final iteration has had particular focus on ease of use. We were also motivated by the results of the recent Haskell survey.

Feedback from members of the Commercial Haskell Group has been very helpful in shaping the direction of the tool in a positive way and we now open it up, open source, in beta and for the Haskell community as a whole and welcome your contributions, ideas and feedback!

stack is available on Hackage (cabal install stack), as well as binary downloads for Windows, Mac, and Linux, with Ubuntu and Arch packages. Please note that this is a beta release: we anticipate bugs, and will work to quickly resolve them. Please be sure to report issues on the Github issue tracker.

Categories: Offsite Blogs

ItaloHaskell, the Italian community

Haskell on Reddit - Tue, 06/09/2015 - 1:20am

Haskell_ITA is a project to form a community of Haskell programmers who live in Italy or speak Italian. The way I'd like to proceed is to form a critical mass online and then start meetups and conferences.

There is a subreddit here:

/r/Haskell_ITA

There's a maling list here:

https://groups.google.com/d/forum/haskell_ita

A facebook group here:

https://www.facebook.com/groups/ItaloHaskell/

A twitter account here:

https://twitter.com/Haskell_ITA

Please tell everyone who may be interested.

submitted by vitalijzad
[link] [15 comments]
Categories: Incoming News

deepseq:NFData1 class

libraries list - Mon, 06/08/2015 - 7:18pm
I have the type data NonEmpty f a = NonEmpty a (f a) and want to declare an NFData instance in Haskell 98. With the existing NFData class this is not possible because it requires a (NFData (f a)) constraint which needs FlexibleContexts. A solution would be an NFData1 class analogously to the classes in transformers:Data.Functor.Classes: class NFData1 f where rnf1 :: NFData a => f a -> () instance NFData1 [] where rnf1 = rnf instance (NFData1 f) => NFData1 (NonEmpty f) where rnf1 (NonEmpty x xs) = rnf (x, rnf1 xs) instance (NFData1 f, NFData a) => NFData (NonEmpty f a) where rnf = rnf1
Categories: Offsite Discussion

Magnus Therning: `mapAccum` in monad

Planet Haskell - Mon, 06/08/2015 - 6:00pm

I recently had two functions of very similar shape, only difference was that one was pure and the other need some I/O. The former was easily written using mapAccumL. I failed to find a function like mapAccumL that runs in a monad, so I wrote up the following:

mapAccumM :: (Monad m, Traversable t) => (a -> b -> m (a, c)) -> a -> t b -> m (a, t c) mapAccumM f a l = swap <$> runStateT (mapM go l) a where go i = do s <- get (s', r) <- lift $ f s i put s' return r

Bring on the comments/suggestions/improvements/etc!

Categories: Offsite Blogs

Are there any small Yesod webapps I can reference?

Haskell on Reddit - Mon, 06/08/2015 - 11:12am

The Yesod Book is pretty good, but a toy example would be nice as well. A casual search on github surfaces this: https://github.com/josuf107/Fizzckle,

but something even simpler would be great!

submitted by chibro2
[link] [6 comments]
Categories: Incoming News

How to Program It

Haskell on Reddit - Mon, 06/08/2015 - 9:54am
Categories: Incoming News

AVoCS 2015: Extended Paper Deadline

General haskell list - Mon, 06/08/2015 - 9:44am
====================================================================== ---------------|*** AVoCS 2015: Deadline Extension ***|--------------- ====================================================================== *NEW* Submission of abstract (full papers): 15th June 2015 *NEW* Submission of full papers: 19th June 2015 ====================================================================== The 15th International Workshop on Automated Verification of Critical Systems 1-4 September 2015, Edinburgh, UK https://sites.google.com/site/avocs15/ avocs2015< at >easychair.org -----------------------|*** HIGHLIGHTS ***|---------------------------- + Invited talks by Colin O'Halloran (D-RisQ/Oxford) Don Sannella (Contemplate/Edinburgh) + AI4FM workshop including invited talk by J Strother Moore (Univerity of Texas at Austin) + Student support from FME/SICSA sponsorships + Proceedings to be published
Categories: Incoming News

Unable to install GHC and Haskell plathorm on Ubuntu 14 properly

Haskell on Reddit - Mon, 06/08/2015 - 5:25am

I installed ghc 7.10.1 (replace 7.6.3 with 7.10.1):

$ wget https://www.haskell.org/ghc/dist/7.6.3/ghc-7.6.3-x86_64-unknown-linux.tar.bz2 $ tar xvf ghc-7.6.3-x86_64-unknown-linux.tar.bz2 $ cd ghc-7.6.3 $ ./configure --prefix=/usr/local/haskell/ghc-7.10.1 $ make $ sudo make install

And then unziped Haskell Platform 2014.2.0.0 for Linux, 64bit from https://www.haskell.org/platform/linux.html

cd / sudo tar xvf ...downloaded-tarfile... sudo /usr/local/haskell/ghc-7.8.3-x86-64/bin/activate-hs

And then I got an error:

Couldn't deduce location of ghc root. activate-hs [-q | -v] [-n] [-p dir] [ghc-root] -q | --quiet supress informational output -v | --verbose print actions as they are taken -n | --dryrun don't actually do anything (implies -v) -p | --prefix tree to sym-link executables, man pages, etc (defaults to /usr/local) ghc-root directory containing ghc tree

What should I do?

Also I initially installed ghc without "--prefix" so I have this:

$ type ghc ghc is hashed (/usr/local/bin/ghc)

And I also have it installed in /usr/local/haskell/ghc-7.10.1

And the worst thing - I don't know how to upgrade Cabal:

$ cabal --version cabal-install version 1.16.0.2 using version 1.16.0 of the Cabal library $ type cabal cabal is hashed (/usr/bin/cabal) submitted by gilded_honour
[link] [9 comments]
Categories: Incoming News

Is there a notion of "linear" applicatives?

Haskell on Reddit - Mon, 06/08/2015 - 5:04am

By which i mean (a subset of) applicatives for which

f <$> p x1 <*> p x2 <*> ...

is the same as

p (f <$> x1 <*> x2 <*> ...)

For functions p :: (forall a. f a -> g a)?

submitted by apsod
[link] [11 comments]
Categories: Incoming News

Build connection with HaskellDB.HDBC.Odbc

Haskell on Reddit - Mon, 06/08/2015 - 4:32am

I'm new to Haskell. I've read most of LYAH and RWH and have also done some small programms. No I would like to use Haskell with an Oracle DB. I would like to use HaskellDB with HDBC.ODBC. Can anybody give me an example, how to connect via HaskellDB und HDBC with ODBC?

I was able to connect to the DB via HDBC and run a query. But I don't know how to connect via HaskellDB and ODBC. I can't find an example.

submitted by marido73
[link] [3 comments]
Categories: Incoming News

[Haddock] Alphabetize record accessors

haskell-cafe - Mon, 06/08/2015 - 4:23am
How would people feel about Haddock alphabetizing record accessors by default? For example: data T { b :: ..., c :: ... , a :: ... } displays as: data T { a :: ..., b :: ... , c :: ... } Seems as though projects that have large records like Cabal & Parsec would benefit from this. Thanks! -deech _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Categories: Offsite Discussion