News aggregator

ParallelListComp strange behavior

haskell-cafe - Wed, 01/14/2015 - 1:04am
I am trying to use ParallelListComp and have code that compiles but only produces one value, but I am not clear why. The code is something like: gen :: (a -> b) -> [MyType] gen f = [MyType (Just []) (Just c) (Just d) Nothing | c <- f | d <- [1,2,3,4] When the gen function is used with take or any other function, only one value is returned. Is there something here that can’t desugar properly to mzip that will still compile? Note I did not test this specific code, I am just writing it here to represent the different pieces of a larger piece of real code which is below. Mike ———— Real Code ———— data Config = Config { onOffControl::Maybe [DEVICE_ON_OFF_CONTROL_BITS] , seqUpPos::[Maybe ([DEVICE_SEQ_UP_POSITION_BITS], Word16)] , seqDownPos::[Maybe ([DEVICE_SEQ_DOWN_POSITION_BITS], Word16)] , tonTimers::[Maybe ([DEVICE_TON_TIMERS_BITS], Word16)]
Categories: Offsite Discussion

Future of the boxes package--call for ideas

glasgow-user - Wed, 01/14/2015 - 1:02am
I've just taken over maintainership of the boxes package, and will be making a maintenance release shortly (as soon as I figure out how and get added to the maintainers group). The package, however, currently suffers from a paucity of bug reports (no problem) and feature requests (not so great). To keep things lively, I need a bit of help from two groups of people. If you use the package but wish it could do something more for you, I want to know about it. If you considered using the package but rejected it because it couldn't quite handle your job, I want to know about that too. I'd prefer if people would open issues and pull requests at https://github.com/treeowl/boxes/issues but I will also accept requests by email. Thanks, David _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users< at >haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Categories: Offsite Discussion

Difference types

Haskell on Reddit - Tue, 01/13/2015 - 8:42pm

Humor me here, I have no idea what I'm doing.

The simple algebraic types Either, (,), -> correspond to the functions +, *, ^. Is it possible to construct types that correspond to - or /?

For example suppose we wanted to find a type that corresponds to 1 - a:

D(a) = 1 - a D(a) + a = 1 D(a) * D(a) + a * D(a) = D(a) type D a = Either (D a, D a) (a, D a)

This seems to correspond to some sort of tree structure. Does this have relevance or meaning?

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

Magnus Therning: Thought on JavaScript

Planet Haskell - Tue, 01/13/2015 - 6:00pm

Over the holidays I’ve been reading Douglas Crockford’s excellent book JavaScript: The Good Parts. About halfway through I came to the conclusion that JavaScript is an “anti-LISP”. There are many reasons to learn LISP, but none of them is “LISP is widely used in industry.” As Eric Raymond is famous words claim, knowing LISP will make you a better programmer. On the other hand there seems to be almost no reasons to learn JavaScript. It sure doesn’t seem to teach anything that’ll make you a better programmer. The only reason I can come up with is “JavaScript is widely used in industry.”

Categories: Offsite Blogs

FP Complete is hiring: Software engineer

haskell-cafe - Tue, 01/13/2015 - 4:31pm
Hi list, FP Complete is expanding yet again! We are looking to hire for several new engineers to join our Haskell development team, both to build great new core products and in partnership with our clients to apply Haskell at a large scale. Some of our recently announced core products include the Integrated Analysis Platform, Stackage and LTS Haskell, with much more to come. If you’d like to be part of our team and shape the future of Haskell, please send a resume or CV to jobs+dev< at >fpcomplete.com. Any existing work - either a running website or an open source codebase - which you can include as links be greatly appreciated as well. We will want you to start right away. Depending on your current jurisdiction, this will either be a full-time contractor position, or an employee position. This is a telecommute position: you can work from home or wherever you choose, with little or no travel. Location in North America preferred; but you will work with colleagues who are both on North American and European hou
Categories: Offsite Discussion

ANNOUNCE: picoparsec-0.1

haskell-cafe - Tue, 01/13/2015 - 3:30pm
The newly released package picoparsec [1] is a fork of attoparsec that works with a much wider variety of input types than just ByteString and Text. Parsers written with Picoparsec will generally perform a bit slower than Attoparsec on strict ByteString and Text, somewhat faster than Attoparsec on lazy Text, and much faster than Parsec on any of the mutually-supported input types. That being said, the main point of the library is to enable the writing of generic parsers that are not constrained to any single input type. Depending on the parser primitives used, Picoparsec will take any input whose type is an instance of either NullMonoid, LeftGCDMonoid, FactorialMonoid, or TextualMonoid. These are some of the subclasses of Monoid defined in the monoid-subclasses package [2]. Some of the input types that are fully supported out of the box would be: - Text - String - Seq Char - Vector Char - ByteStringUTF8, a thin newtype wrapper around ByteString - Stateful (Map String a) Text, if you need to parse T
Categories: Offsite Discussion

www.cse.unsw.edu.au

del.icio.us/haskell - Tue, 01/13/2015 - 2:53pm
Categories: Offsite Blogs

working my way through Data.Type.Equality...my headhurts...

haskell-cafe - Tue, 01/13/2015 - 2:39pm
Full code here… https://github.com/goldfirere/nyc-hug-oct2014/blob/master/Equality.hs Lets start at the beginning… Ø data a :~: b where Ø Refl :: a :~: a Looks reasonable….” a :~: b” is inhabited by 1 value…of type “a :~: a” Ø sym :: (a :~: b) -> (b :~: a) Ø sym Refl = Refl hmmm… (a :~: b) implies that a is b so (b :~: a) brilliant Ø -- | Transitivity of equality Ø trans :: (a :~: b) -> (b :~: c) -> (a :~: c) Ø trans Refl Refl = Refl Ø -- | Type-safe cast, using propositional equality Ø castWith :: (a :~: b) -> a -> b Ø castWith Refl x = x fine…. But…. Ø -- | Generalized form of type-safe cast using propositional equality Ø gcastWith :: (a :~: b) -> ((a ~ b) => r) -> r Ø gcastWith Refl x = x I don’t even understand the signature What does “~” mean…(it’s something that comes out in error messages when my types are all messed up)….and then there’s a “=>” going on…in the
Categories: Offsite Discussion

--disable-{executable-}profilingcabal-install-1.22.0.0 with ghc-7.6.3

haskell-cafe - Tue, 01/13/2015 - 2:28pm
A recent change in cabal-install's command line interface seems not to be compatible with ghc-7.6.3. cabal-install-1.22.0.0 doesn't like --disable-executable-profiling as a command line option any more. (I could only find this related to this change: https://github.com/haskell/cabal/pull/2286) $ cabal install --disable-executable-profiling cabal: unrecognized 'install' option `--disable-executable-profiling' I try --disable-profiling instead. $ cabal install transformers --disable-profiling -j3 Resolving dependencies... Notice: installing into a sandbox located at [snip] Configuring transformers-0.4.2.0... Failed to install transformers-0.4.2.0 Build log [snip]: unrecognized 'configure' option `--disable-profiling' cabal: Error: some packages failed to install: transformers-0.4.2.0 failed during the configure step. The exception was: ExitFailure 1 Using the following versions of cabal and ghc. $ cabal -V cabal-install version 1.22.0.0 using version 1.22.0.0 of the Cabal library $ ghc -V The Glorious Gl
Categories: Offsite Discussion

conflicting multi-parameter family instance declarations

glasgow-user - Tue, 01/13/2015 - 2:08pm
Dear all, The following compiles with ghc 7.6 but fails with ghc 7.8: ----- {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} module Test where class M t s where type T t s data I t = I t instance M t t where type (T t t) = () instance M t (I t) where type (T t (I t)) = () ----- The error I get with ghc 7.8.3 and 7.8.4 is: Test.hs:12:10: Conflicting family instance declarations: T t t -- Defined at Test.hs:12:10 T t (I t) -- Defined at Test.hs:15:10 I am curious if this change is an improvement or a bug. I would be grateful for help as this issue affects a fairly large library I develop. Best regards, Michal
Categories: Offsite Discussion

What are the benefits of learning Category Theory for a Haskeller?

Haskell on Reddit - Tue, 01/13/2015 - 1:15pm

I have been on the fence about learning Category Theory more than once. On the one hand the promise of a generalized view on many concepts in mathematics seems attractive and I have hopes that it would help me see connections which I would otherwise miss. On the other hand it does seem fairly abstract (duh) and I am not sure what insights related to programming / designing abstractions would result from it.

  1. What benefits have you reaped from learning CT?

  2. I am thinking about working through Awodey's book. What would you suggest (in addition / instead) to maximize the value of CT for a Haskell programmer?

EDIT: I'd like to thank everyone for the answers... certainly some interesting points! I am not fully convinced either way, but in some way I think I'll have to learn it at some point to figure out my answer...

EDIT2: So I've now watched the video recommended by /u/slacket and must say this was quite helpful in answering the question. In the talk Prof. Gibbons hints at how concepts from CT help one to understand folds, unfolds and bifunctors. If this is a preview of things one might be able to understand thanks to CT, then I want to know it! Thanks!

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