News aggregator

Announcing: stackage-upload

Haskell on Reddit - Mon, 04/27/2015 - 11:08pm
Categories: Incoming News

FP Complete: Announcing: stackage-upload

Planet Haskell - Mon, 04/27/2015 - 10:30pm

I'm happy to announce the first version of stackage-upload. Copied below is the content of the README file; if you see errors please send a pull request to update the content. This tool is pretty simple right now, but can be easily extended. If others are interested in collaborating on this project, please be in touch.

stackage-upload provides a more secure version of the cabal upload command by using HTTPS. When uploading a package to Hackage, cabal upload will perform the upload in plain-text via unencrypted HTTP, using basic authentication, which is vulnerable to both man in the middle (MITM) and eavesdropping attacks (anyone sniffing your packets can get your username and password). This package instead uses secure HTTPS to upload to avoid both of these attacks.

To install, simply run cabal update && cabal install stackage-upload. Usage is quite similar to cabal upload: just call stackage-upload and pass in a list of tarballs to upload. (If you have stackage-cli installed, you can call stk upload instead.) stackage-upload --help will provide full options.

Why not fix cabal?

I'd be happy to add TLS support to cabal-install directly (using Vincent's tls package), but the two last times this topic came up, I have been unable to find a proposal that is acceptable to the Cabal project (mostly around Haskell Platform requirements). I made an open offer to send the pull request myself to move cabal-install over to http-client to get TLS support (either via http-client-tls or http-client-openssl).

Why Stackage?

See the same question and its answer on stackage-update.

Future enhancements
  • Store passwords securely via GPG encryption
  • Upload documentation to Hackage (work around the sometimes-broken doc builder)
  • Perform pre-upload checks, such as running the test suite from the tarball to check for missing files

This tool was something that I (Michael Snoyman) wrote for myself a while back, and decided to rebrand as stackage-upload when the severity of the insecure upload situation became apparent to me, and it became obvious that there was no path forward for getting cabal-install fixed.

I actually consider this situation to be so dangerous that I would like to ask the Hackage Server team to consider turning off insecure uploads to Hackage. The current possibility for corrupted uploads to infect all users of a package is alarmingly high.

Categories: Offsite Blogs

[ Google Summer of Code] 18 Projects Accepted

General haskell list - Mon, 04/27/2015 - 10:17pm
I'd like to thank everyone for helping us to get the largest Google Summer of Code we've ever had for off the ground! We have 18 accepted projects this year, spanning the entire ecosystem. You can find the official list on: The most notable change this year is that in addition to the usual stable full of cabal tweaks (3 projects this year), and other infrastructure and library changes and the odd darcs project here and there (1 project), we also took it upon ourselves to act as an umbrella organization for purescript (2 projects). * I'd like to thank Johan Tibell for helping us get our ideas organized, and the /r/haskell moderators for leaving the brainstorming page "stickied" for the duration. It rather dramatically improved both the quantity and the quality of proposals we received. After I put out a call for additional mentoring help, we had 44 mentors step up to offer to help this time around, showing that we still have capa
Categories: Incoming News

[Job] Intel is hiring: FP/FV oriented folks mostwelcome..

haskell-cafe - Mon, 04/27/2015 - 9:26pm
The group I work for at Intel has an opening for a recent graduate (BS/MS/PhD) of a US institution. We work within the product team responsible for the Xeon Phi many-core processor which is used to build supercomputers. See: Our team focuses mainly on the floating-point arithmetic verification using an internal STE based model checking tool called Forte, which is based on the reFLect language, which itself is a descendant of ML. (With lazy-evaluation default, and a baked-in BDD based equivalence checking engine, which makes it supercool! Imagine Haskell with a built-in symbolic simulation engine.) We also use Haskell for internal purposes as needed. Our group has extensive freedom in the choice of tools we use. We also work on a variety of non-arithmetic verification problems, including cache coherence, ECC (error-detection/correction) algorithms, instruction length decoders, to name a few. As part of our coherence work we developed an open source explicit state di
Categories: Offsite Discussion

ANN: New Committee Members

haskell-cafe - Mon, 04/27/2015 - 6:20pm
Following the self-nomination period and discussion, the committee has selected new members: * Edward Kmett (reappointment) * Ryan Trinkle * John Wiegley As per the rules of the committee, this discussion was held among the current members of the committee, and the outgoing members of the committee who were not seeking reappointment. Thank you to all candidates who submitted a self-nomination. All of the nominations we received were very strong, and we would encourage all those who nominated themselves to consider self-nominating again in the future. We would also like to thank our two outgoing members, Jason Dagit and Brent Yorgey, for their service. Cheers, Gershom _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >
Categories: Offsite Discussion

How to express the type of functions that return a specific type.

Haskell on Reddit - Mon, 04/27/2015 - 4:13pm

I can't write (a->) as a section, but I can write ((->) a) to refer to functions that take an a, with the return type unparametrised, e.g. for writing an instance Functor ((->) r). But how can I write the opposite - a function that returns an a with the domain unparametrised? e.g. a Contrafunctor instance: Contrafunctor (->a).

submitted by peterjoel
[link] [5 comments]
Categories: Incoming News

Question: How to use haskell expressions in quasi quoter?

Haskell on Reddit - Mon, 04/27/2015 - 3:45pm

Posit the backslash-key on my keyboard is broken, but I'd like to keep using haskell. I now would like to build a quasi-quoter that translates, say, [|quoter| LAMDA(x,y,z): x + y + z + c |] to \x y z -> x + y + z + c. The right-hand-side should be any valid haskell expression.

How would I build quoter? I don't want hygiene, e.g. I'd like to capture the variable c from an outer scope. I see two possible solutions to implementing quoter.

1) Doing a purely syntactic translation, basically search-and-replacing LAMBDA(...): to \... -> and splicing this back as text into my program, like a c-preprocessor would.

2) Using a quoter for haskell expressions. Basically if I had the functionality of [|...|], but as a unhygienic function quoteExp :: String -> ExpQ that was fine with free variables occurring in the expression. I could then generate something like [|\x y z -> $(quoteExp expAsString)|].

I've been unable to figure out how to implement either approach. I'd prefer something along the lines of 2) if possible, but I'd prefer not writing a String -> ExpQ parser myself. I assume there are also some problems involving e.g. fixity/precedence of custom operators.


submitted by ueberbobo
[link] [2 comments]
Categories: Incoming News

WebSocket on Haskell?

haskell-cafe - Mon, 04/27/2015 - 1:43pm
Dear cafe, Would you tell me reference sources for WebSocket(or on Haskell? Once I wrote a toy program with WebSocket[1]: Node.js(backend) + JavaScript(frontend) + WebSocket(communication) I want to port it to Haskell backend for my exercise: Haskell(backend) + JavaScript(frontend) + WebSocket(communication) I'm glad if there are such references: * broadcast to multi-client by WebSocket(or * serve a simple top HTML page * deploy to Heroku or public server [1] Thank you :-), Takenobu _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >
Categories: Offsite Discussion


Haskell on Reddit - Mon, 04/27/2015 - 1:11pm
Categories: Incoming News

Prime ``sieve'' and Haskell demo

haskell-cafe - Mon, 04/27/2015 - 1:06pm
Ertugrul So:ylemez wrote: Is it really so difficult to reproduce in a strict language? Here is that Haskell example in OCaml let primes = let rec trialDiv (Cons (p,xs)) = Cons (p, lazy (trialDiv < at >< at > filter (fun x -> x mod p <> 0) < at >< at > Lazy.force xs)) in trialDiv < at >< at > iota 2 roughly the same number of lines, and mainly, exactly the same method. Some people prefer to write it as let primes = let rec trialDiv (Cons (p,xs)) = Cons (p, lazy (Lazy.force xs |> filter (fun x -> x mod p <> 0) |> trialDiv)) in iota 2 |> trialDiv The algorithm is the same, it is just as clearly stated. Now it becomes clearer when what is evaluated. OCaml has its own streams (and even a special syntax for them, via a syntactic extension), but it is not difficult to introduce them from scratch type 'a stream = Cons of 'a * 'a stream Lazy.t let rec iota n = Cons (n,lazy (iota (n+1))) let rec filter pred (Cons (p,xs)) = if pred p then Cons (p,lazy (filter pred (Lazy.force xs))) else filter pred (Lazy.force xs) le
Categories: Offsite Discussion

working through "Part I: Dependent Types in Haskell"

haskell-cafe - Mon, 04/27/2015 - 12:52pm
Hello, working through but a bit stuck...with an error... I assume a bit like tail but take n - 1 elements from the front....but... gives...(I could do with working out what haskell is tryign to tell me). Could not deduce (n1 ~ 'S n0) from the context ('S n ~ 'S n1) bound by a pattern with constructor :- :: forall a (n :: Nat). a -> Vector a n -> Vector a ('S n), in an equation for 'init'' at cafe.lhs:13:10-16 'n1' is a rigid type variable bound by a pattern with constructor :- :: forall a (n :: Nat). a -> Vector a n -> Vector a ('S n), in an equation for 'init'' at cafe.lhs:13:10 Expected type: Vector a n Actual type: Vector a ('S n0) Relevant bindings include xs :: Vector a n1 (bound at cafe.lhs:13:15) In the expression: x :- (init' xs) In an equation for 'init''
Categories: Offsite Discussion


General haskell list - Mon, 04/27/2015 - 12:02pm
FLOPS 2016: 13th International Symposium on Functional and Logic Programming March 3-6, 2016, Kochi, Japan Call For Papers Writing down detailed computational steps is not the only way of programming. The alternative, being used increasingly in practice, is to start by writing down the desired properties of the result. The computational steps are then (semi-)automatically derived from these higher-level specifications. Examples of this declarative style include functional and logic programming, program transformation and re-writing, and extracting programs from proofs of their correctness. FLOPS aims to bring together practitioners, researchers and implementors of the declarative programming, to discuss mutually interesting results and common problems: theoretical advances, their implementations in language systems and tools, and applications of these systems in practice. The scope includes all aspects of the design, semantics, theory, applications,
Categories: Incoming News

Munich Haskell Meeting, 2015-04-30 < at > 19:30

haskell-cafe - Mon, 04/27/2015 - 11:55am
Dear all, This week, our monthly Munich Haskell Meeting will take place again on Thursday, April 30 at Cafe Puck at 19h30. For details see here: If you plan to join, please add yourself to this dudle so we can reserve enough seats! It is OK to add yourself to the dudle anonymously or pseudonymously. Everybody is welcome! cu,
Categories: Offsite Discussion

Final CFP: Workshop on Generic Programming 2015 -Deadline May 15

General haskell list - Mon, 04/27/2015 - 10:21am
====================================================================== CALL FOR PAPERS WGP 2015 11th ACM SIGPLAN Workshop on Generic Programming Vancouver, Canada Sunday, August 30, 2015 Co-located with the International Conference on Functional Programming (ICFP 2015) ====================================================================== Goals of the workshop --------------------- Generic programming is about making programs more adaptable by making them more general. Generic programs often embody non-traditional kinds of polymorphism; ordinary programs are obtained from them by suitably instantiating their parameters. In contrast with normal programs, the parameters of a generic program are often quite rich in structure; for example they may be other programs, types or type constructors, class hierarchies, or even programming paradi
Categories: Incoming News