[Haskell] LumiGuide is hiring

2016-04-13 Thread Bas van Dijk
ects, things that you made that you're proud of, etc.). Best Regards, Bas van Dijk CTO LumiGuide ___ Haskell mailing list Haskell@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell

Re: ANNOUNCE: GHC 7.10.1 Release Candidate 3

2015-03-17 Thread Bas van Dijk
On 16 March 2015 at 21:30, Austin Seipp aus...@well-typed.com wrote: We are pleased to announce the third release candidate for GHC 7.10.1: https://downloads.haskell.org/~ghc/7.10.1-rc3 https://downloads.haskell.org/~ghc/7.10.1-rc3/docs/html/ I noticed that the Haddock docs return

Re: Thread behavior in 7.8.3

2015-01-21 Thread Bas van Dijk
Hi Michael, Are you already using usb-1.3.0.0? If not, could you upgrade and test again? That release fixed the deadlock that Ben and Carter where talking about. Good luck, Bas ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org

Re: Proving properties of type-level natural numbers obtained from user input

2014-11-25 Thread Bas van Dijk
- return $ f2 p _ - error Input if larger than 255 On 25 November 2014 at 10:51, Bas van Dijk v.dijk@gmail.com wrote: Hi, I have another type-level programming related question: {-# LANGUAGE GADTs #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE ScopedTypeVariables

Re: Proving properties of type-level natural numbers obtained from user input

2014-11-25 Thread Bas van Dijk
On 25 November 2014 at 19:34, Richard Eisenberg e...@cis.upenn.edu wrote: If I were you, I would just write `g` using unsafeCoerce in the right spot, instead of bothering with all the singletons, which would have to use unsafety anyway. Thanks, I hadn't considered this yet. Cheers, Bas

Proving properties of type-level natural numbers obtained from user input

2014-11-24 Thread Bas van Dijk
Hi, I have another type-level programming related question: {-# LANGUAGE GADTs #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE KindSignatures #-} import GHC.TypeLits Say I have a Proxy p of some type-level natural number: p :: forall (n :: Nat).

Caching intermediate powers in GHC.Float

2014-05-16 Thread Bas van Dijk
Does the following make sense: https://ghc.haskell.org/trac/ghc/ticket/9120 Bas ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

[Haskell] ZuriHac 2014 - Updates

2014-04-17 Thread Bas van Dijk
Dear (potential) ZuriHac 2014 attendees, I would like to make a few announcements regarding ZuriHac 2014, a Haskell hackathon taking place in Zurich from Friday 6 June 2014 to Sunday 8 June 2014. Besides hacking on Haskell projects with core members of the community you will hear talks by Simon

[Haskell] ANN: Simon Marlow Edward Kmett @ ZuriHac 2014

2014-02-14 Thread Bas van Dijk
Dear Haskellers and ZuriHac 2014 attendees, On this lovely day (pun intended), I'm excited to announce that Simon Marlow and Edward Kmett will be giving talks at ZuriHac 2014. When: Friday 6 June 2014 - Sunday 8 June 2014 Where: Erudify offices, Zurich, Switzerland ZuriHac is an international

[Haskell] ANN: ZuriHac 2014

2014-01-22 Thread Bas van Dijk
Dear Haskellers, After a very successful ZuriHac 2013 we are delighted to announce ZuriHac 2014! When: Friday 6 June 2014 - Sunday 8 June 2014 Where: Erudify offices, Zurich, Switzerland ZuriHac is an international Haskell hackathon: a grassroots, collaborative coding festival with a simple

Re: [Haskell-cafe] Proposal: new function for lifting

2013-09-29 Thread Bas van Dijk
On 27 September 2013 21:51, Thiago Negri evoh...@gmail.com wrote: Stop lifting, start using shinny operators like this one: (^$) :: Monad m = m a - (a - b - c) - m b - m c (^$) = flip liftM2 Note that something like this is already provided by the InfixApplicative library:

Re: [Haskell-cafe] reifying typeclasses (resend)

2013-09-15 Thread Bas van Dijk
You can indeed use GADTs to solve this: {-# LANGUAGE GADTs #-} data Universe a where UInt :: Int - Universe Int UChar :: Char - Universe Char class Universal a where universe :: a - Universe a instance Universal Int where universe = UInt instance Universal Char where

[Haskell] ANN: Google co-sponsoring ZuriHac 2013

2013-08-21 Thread Bas van Dijk
Dear Haskellers, I would like to remind you that the Zurich FP Afternoon (with a keynote by Simon Marlow) is taking place next week (13:00, Thursday, 29 August) and is directly followed by the ZuriHac 2013 Haskell Hackathon [1]. There are still some places available at both events -- you're

[Haskell-cafe] ANN: Google co-sponsoring ZuriHac 2013

2013-08-21 Thread Bas van Dijk
Dear Haskellers, I would like to remind you that the Zurich FP Afternoon (with a keynote by Simon Marlow) is taking place next week (13:00, Thursday, 29 August) and is directly followed by the ZuriHac 2013 Haskell Hackathon [1]. There are still some places available at both events -- you're

Re: Private classes

2013-08-17 Thread Bas van Dijk
Hi Joachim, I used the following in the past: module M (PublicClass(..)) where class HiddenClass a class HiddenClass a = PublicClass a where ... instance HiddenClass SomeType instance PublicClass SomeType where ... Now users of M can't declare instances of PublicClass because they don't

Re: [Haskell-cafe] Array, Vector, Bytestring

2013-07-10 Thread Bas van Dijk
On 10 July 2013 08:57, Alfredo Di Napoli alfredo.dinap...@gmail.com wrote: To make the transition easier I have an experimental library which defines a ByteString as a type synonym of a Storable.Vector of Word8 and provides the same interface as the bytestring package:

Re: [Haskell-cafe] Examples of MVars usage

2013-06-12 Thread Bas van Dijk
On 12 June 2013 21:29, Francisco M. Soares Nt. xfrancisco.soa...@gmail.com wrote: I am looking for packages on hackage which use MVars extensively. Those which create plenty of MVars Hi Francisco, Also take a look at Control.Concurrent.Chan in the base library:

Re: [Haskell-cafe] [Hackathon] ANN: ZuriHac 2013 FP Afternoon with keynote by Simon Marlow

2013-06-10 Thread Bas van Dijk
On 10 June 2013 19:38, Roman Cheplyaka r...@ro-che.info wrote: Hi Bas, When: Thursday 30 August - Friday 1 September Where: Erudify offices, Zurich, Switzerland Is this a mistake? 30 August is Friday, 1 September is Sunday. Oops! You're right, that's embarrassing :-) Thanks, Bas

Re: [Haskell-cafe] Array, Vector, Bytestring

2013-06-05 Thread Bas van Dijk
On 5 June 2013 11:50, Peter Simons sim...@cryp.to wrote: I meant to say that there is redundancy in *both*. The libraries mentioned in this thread re-implement the same type internally and expose APIs to the user that are largely identical. I agree. I hope that ByteStrings will be replaced by

Re: [Haskell-cafe] ANNOUNCE: new bridge! (prelude-prime)

2013-05-23 Thread Bas van Dijk
On 23 May 2013 11:26, Joachim Breitner m...@joachim-breitner.de wrote: So you can get what you want by not depending on base, but rather have prelude-prime re-export all modules from base plus its own Preldue. How would you re-export all base's modules from the prelude-prime package? I didn't

Re: [Haskell-cafe] ANNOUNCE: new bridge! (prelude-prime)

2013-05-23 Thread Bas van Dijk
On 23 May 2013 11:54, Joachim Breitner m...@joachim-breitner.de wrote: Hi, Am Donnerstag, den 23.05.2013, 11:52 +0200 schrieb Bas van Dijk: On 23 May 2013 11:26, Joachim Breitner m...@joachim-breitner.de wrote: So you can get what you want by not depending on base, but rather have prelude

Re: [Haskell] ANN: strict-base-types-0.1

2013-05-08 Thread Bas van Dijk
Good stuff Simon! It would be great if either strict-base-types, strict or a merger of the two will find its way into the Haskell Platform. Even better if it also merged with strict-concurrency and strict-io so that we have one go-to package for strict types and operations. Cheers, Bas On 8

Re: [Haskell-cafe] Streaming bytes and performance

2013-03-20 Thread Bas van Dijk
On 20 March 2013 11:41, Konstantin Litvinenko to.darkan...@gmail.com wrote: On 03/20/2013 11:17 AM, Branimir Maksimovic wrote: Are you sure? I use ghc 7.6.2 Huh, I use 7.4.2, and if 7.6.2 can handle this I will try to switch. Not sure how to do that on ubuntu 12.10... I always install ghcs

Re: [Haskell-cafe] Optimizing performance problems with Aeson rendering large Text arrays

2013-02-01 Thread Bas van Dijk
On Feb 1, 2013 1:15 PM, Oliver Charles ol...@ocharles.org.uk wrote: Urgh, the formatting got totally destroyed in sending, I think. If so, here's a paste of my email as I intended it to be sent: http://hpaste.org/81648 Sorry about that! - Ocharles

Re: [Haskell-cafe] aeson-0.6.1.0 deriveJSON error

2013-01-26 Thread Bas van Dijk
On 26 January 2013 14:47, j...@stuttard.org wrote: ghc doesn't seem to be unifying deriveJSON (String-String) parameter with id :: a - a. It seems you're using aeson HEAD. Note that the deriveJSON from the released aeson-0.6.1.0 as the type: deriveJSON :: (String - String) - Name - Q [Dec]

Re: [Haskell-cafe] aeson-0.6.1.0 deriveJSON error

2013-01-26 Thread Bas van Dijk
On 26 January 2013 15:20, Bas van Dijk v.dijk@gmail.com wrote: But in aeson-HEAD it has the following type: deriveJSON :: Options - Name - Q [Dec] Note that I'm currently working on extending the encoding Options record: * I added a constructorNameModifier :: String - String which

Re: [Haskell-cafe] How can I avoid buffered reads?

2012-12-09 Thread Bas van Dijk
On 9 December 2012 10:29, Leon Smith leon.p.sm...@gmail.com wrote: On Thu, Dec 6, 2012 at 5:23 PM, Brandon Allbery allber...@gmail.com wro\ Both should be cdevs, not files, so they do not go through the normal filesystem I/O pathway in the kernel and should support select()/poll(). (ls -l,

Re: [Haskell-cafe] Portability of Safe Haskell packages

2012-11-23 Thread Bas van Dijk
On 23 November 2012 15:47, Roman Cheplyaka r...@ro-che.info wrote: Should it be advised to surround safe annotations with CPP #ifs? Or does anyone see a better way out of this contradiction? I think that would be good advice. Note that even if you're only using GHC then you still want to use

Re: [Haskell-cafe] I killed performance of my code with Eval and Strategies

2012-11-14 Thread Bas van Dijk
On Nov 14, 2012 10:44 PM, Janek S. fremenz...@poczta.onet.pl wrote: calculateSeq :: [Double] - [Double] calculateSeq [] = [] calculateSeq (x:xs) = (sin . sqrt $ x) : xs Do you really mean to calculate the 'sin . sqrt' of just the head of the list, or do you mean: calculateSeq = map (sin .

Re: [Haskell-cafe] mtl-2.1 severly broken, cabal needs blacklisting

2012-11-13 Thread Bas van Dijk
On 13 November 2012 17:27, Andreas Abel andreas.a...@ifi.lmu.de wrote: This calls for a means of blacklisting broken or malicious packages. cabal update should also pull a blacklist of packages that will never be selected by cabal install (except maybe by explicit user safety overriding).

Re: [Haskell-cafe] Strange behavior with listArray

2012-11-12 Thread Bas van Dijk
On 12 November 2012 14:52, Daniel Fischer daniel.is.fisc...@googlemail.com wrote: I see no loop in that, and ghci doesn't either: Oops you're right of course. Bas ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Taking over ghc-core

2012-11-11 Thread Bas van Dijk
Great! On 10 November 2012 16:17, Shachaf Ben-Kiki shac...@gmail.com wrote: With Don Stewart's blessing (https://twitter.com/donsbot/status/267060717843279872), I'll be taking over maintainership of ghc-core, which hasn't been updated since 2010. I'll release a version with support for GHC

Re: [Haskell-cafe] Strange behavior with listArray

2012-11-11 Thread Bas van Dijk
On 12 November 2012 04:50, Alex Stangl a...@stangl.us wrote: I'm stymied trying to figure out why the program below blows up with loop when I use f 0 If you replace the a!0 in f by its value 0, f is equivalent to: f k = if k 0 then f 0 else

Re: [Haskell-cafe] Motion to unify all the string data types

2012-11-11 Thread Bas van Dijk
On 10 November 2012 17:57, Johan Tibell johan.tib...@gmail.com wrote: It better communicates intent. A e.g. lazy byte string can be used for two separate things: * to model a stream of bytes, or * to avoid costs due to concatenating strings. By using a strict byte string you make it clear

Re: [Haskell] ANNOUNCE: GHC version 7.6.1

2012-09-07 Thread Bas van Dijk
On 6 September 2012 18:05, Ian Lynagh i...@well-typed.com wrote: The GHC Team is pleased to announce a new major release of GHC, 7.6.1. Great! * It is now possible to defer type errors until runtime using the -fdefer-type-errors flag. In section 7.13.1 it says: ...given the following

Re: [Haskell] ANNOUNCE: GHC version 7.6.1

2012-09-07 Thread Bas van Dijk
On 6 September 2012 18:05, Ian Lynagh i...@well-typed.com wrote: The GHC Team is pleased to announce a new major release of GHC, 7.6.1. Great! * It is now possible to defer type errors until runtime using the -fdefer-type-errors flag. In section 7.13.1 it says: ...given the following

Re: New INLINE pragma syntax idea, and some questions

2012-08-07 Thread Bas van Dijk
On 4 August 2012 15:53, Brandon Simmons brandon.m.simm...@gmail.com wrote: The only thing that bothers me about this foldl is the presence of z0 xs0, which I think are only there on the LHS to indicate to GHC where it should inline. Are these really needed? Since GHC only inlines functions

Re: Type error when deriving Generic for an associated data type

2012-07-13 Thread Bas van Dijk
On 12 July 2012 12:33, Andres Löh and...@well-typed.com wrote: Your example compiles for me with HEAD (but fails with 7.4.1 and 7.4.2, yes). I've not tested if it also works. Great, I will wait for a new release then. Bas ___ Glasgow-haskell-users

Type error when deriving Generic for an associated data type

2012-07-12 Thread Bas van Dijk
Hi, I'm hitting on an issue when deriving Generic for an associated data type: {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DeriveGeneric #-} import GHC.Generics class Foo a where data T a :: * instance Foo Int where data T Int = Bla deriving Generic Couldn't match type `Rep (T Int)'

Re: [Haskell-cafe] lazy boxed array and builder?

2012-07-12 Thread Bas van Dijk
On 12 July 2012 15:35, Yves Parès yves.pa...@gmail.com wrote: I remember this discussion, lazy vectors would also enable an implementation of bytestring and (maybe) text only with unboxed vectors, unifying it all: type ByteString = Vector Word8 Yes, I would like to add a lazy storable vector

Re: Segmentation fault/access violation in generated code

2012-06-23 Thread Bas van Dijk
On 23 June 2012 02:40, Ian Lynagh ig...@earth.li wrote: Hi Bas, On Sun, Jun 17, 2012 at 05:11:35PM +0200, Bas van Dijk wrote: module Main where import Foreign import qualified Foreign.Concurrent as FC import Control.Concurrent import Bindings.Libusb.InitializationDeinitialization main

Re: Segmentation fault/access violation in generated code

2012-06-19 Thread Bas van Dijk
I just tried building the following program with the new GHC win64_alpha1 and apart from warnings from using the unsupported stdcall calling convention running the program doesn't give a segmentation fault as it does when building the program with GHC-7.4.2: {-# LANGUAGE ForeignFunctionInterface

Segmentation fault/access violation in generated code

2012-06-17 Thread Bas van Dijk
Hello, I'm trying to solve #5254 (http://hackage.haskell.org/trac/ghc/ticket/5254). The issue can be isolated to the following short program which only uses bindings-libusb

[Haskell-cafe] Extending constraints

2012-06-05 Thread Bas van Dijk
Hello, I have the following program: -- {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE ScopedTypeVariables #-} import Data.Proxy (Proxy) import Data.Typeable (Typeable, TypeRep,

Re: [Haskell-cafe] Extending constraints

2012-06-05 Thread Bas van Dijk
On 5 June 2012 17:52, Andres Löh and...@well-typed.com wrote: Hi Bas. I haven't thought about this for long, but ... data ProxyWrapper constraint =    forall a. constraint a = ProxyWrapper (Proxy a) I'm assuming adding Typable a in ProxyWrapper is not an option for you? No, I would rather

Re: [Haskell-cafe] Extending constraints

2012-06-05 Thread Bas van Dijk
On 5 June 2012 17:57, Bas van Dijk v.dijk@gmail.com wrote: It works. It turns out it doesn't work exactly as I want. Say I have this ProxyWrapper of Nums: p :: ProxyWrapper Num p = ProxyWrapper (Proxy :: Proxy Int) then the following would give a type error: oops :: TypeRep oops

Re: [Haskell-cafe] Extending constraints

2012-06-05 Thread Bas van Dijk
On 5 June 2012 18:46, Gábor Lehel illiss...@gmail.com wrote: I must be missing something, but this seems a bit useless to me. You have a phantom type parameter on Proxy, and then you're hiding it. So when you pattern match on ProxyWrapper you recover the fact that there was a type which

Re: Weird behavior of the NonTermination exception

2012-05-04 Thread Bas van Dijk
On 4 May 2012 14:12, Simon Marlow marlo...@gmail.com wrote: The forked thread is deadlocked, so the MVar is considered unreachable and the main thread is also unreachable.  Hence both threads get sent the exception. The RTS does this analysis using the GC, tracing the reachable objects

Weird behavior of the NonTermination exception

2012-05-03 Thread Bas van Dijk
Hello, Before I turn the following into a ticket I want to ask if I miss something obvious: When I run the following program: - import Prelude hiding (catch) import Control.Exception import Control.Concurrent main :: IO () main = do mv -

Re: Weird behavior of the NonTermination exception

2012-05-03 Thread Bas van Dijk
On 3 May 2012 17:31, Edward Z. Yang ezy...@mit.edu wrote: Excerpts from Bas van Dijk's message of Thu May 03 11:10:38 -0400 2012: As can be seen, the putMVar is executed successfully. So why do I get the message: thread blocked indefinitely in an MVar operation? GHC will send

Re: Weird behavior of the NonTermination exception

2012-05-03 Thread Bas van Dijk
On 3 May 2012 18:14, Bas van Dijk v.dijk@gmail.com wrote: Now it seems the thread is killed while delaying. But why is it killed? Oh I realise the forked thread is killed because the main thread terminates because it received a BlockedIndefinitelyOnMVar exception and then all daemonic

Re: default instance for IsString

2012-04-23 Thread Bas van Dijk
On 23 April 2012 20:34, J. Garrett Morris jgmor...@cs.pdx.edu wrote: On Mon, Apr 23, 2012 at 9:58 AM, Yitzchak Gale g...@sefer.org wrote: In addition, OverloadedStrings is unsound. No.  OverloadedStrings treats string literals as applications of fromString to character list constants.  

[Haskell-cafe] Parameterize constraints of existentially quantified types

2012-04-21 Thread Bas van Dijk
Hi, I just found out that with the new ConstraintKinds extension we can parameterize the constraint of an existentially quantified type: {-# LANGUAGE KindSignatures, ConstraintKinds, ExistentialQuantification #-} import GHC.Exts data Some (c :: * - Constraint) = forall a. c a = Some a This

Re: [Haskell-cafe] Arguments against an hypothetical Data.ByteString.Generic?

2012-03-27 Thread Bas van Dijk
On 27 March 2012 11:00, Yves Parès yves.pa...@gmail.com wrote: Hello, As vector provides a class generalizing all flavours (Data.Vector.Generic.Vector), it occurs to me that the same could be done for ByteString. Then, packages based on it would have the choice between hardcoded and generic,

Re: [Haskell-cafe] Arguments against an hypothetical Data.ByteString.Generic?

2012-03-27 Thread Bas van Dijk
On 27 March 2012 21:46, Yves Parès yves.pa...@gmail.com wrote: Yes, thank you to remind me of that, I remember now having seen the project. Strict ByteStrings being an alias to Vector Word8 is a good idea (are bytestrings are already implemented exactly like Data.Vector.Storable.Vector). But

Re: [Haskell-cafe] ANN: generic-deepseq 1.0.0.0

2012-02-23 Thread Bas van Dijk
On 23 February 2012 22:09, Maxime Henrion mhenr...@gmail.com wrote: On Sun, 2012-02-19 at 21:06 +0100, Bas van Dijk wrote: On 19 February 2012 18:11, Maxime Henrion mhenr...@gmail.com wrote: I'm guilty of not having preserved the rnf :: a - () function as the class function though, it's

Re: [Haskell-cafe] ANN: generic-deepseq 1.0.0.0

2012-02-19 Thread Bas van Dijk
On 19 February 2012 13:12, Maxime Henrion mhenr...@gmail.com wrote: Any suggestions are welcome. Nice work but it would be nice to have this functionality directly in the deepseq package as in: #ifdef GENERICS {-# LANGUAGE DefaultSignatures, TypeOperators, FlexibleContexts #-} #endif class

Re: [Haskell-cafe] ANN: generic-deepseq 1.0.0.0

2012-02-19 Thread Bas van Dijk
On 19 February 2012 18:11, Maxime Henrion mhenr...@gmail.com wrote: If you're not dealing with an abstract datatype, you _shouldn't_ have an explicit instance, because it would be possible to write an incorrect one, while that is impossible if you just derive a generic implementation (as long

GHCi-7.4.1: Importing a non existing module succeeds

2012-02-09 Thread Bas van Dijk
Should I file a bug for this: GHCi 7.2.2: import I.Do.Not.Exist no location info: Could not find module `I.Do.Not.Exist' Use -v to see a list of the files searched for. GHCi 7.4.1: import I.Do.Not.Exist (and for the record: I.Do.Not.Exist does not exist) Bas

Error when deriving Typeable for associated type

2012-01-30 Thread Bas van Dijk
Hello, Given the following program: --- {-# LANGUAGE DeriveDataTypeable, TypeFamilies #-} import Data.Typeable class C a where data T a :: * data MyType1 = MyType1 deriving Typeable data MyType2 = MyType2 deriving Typeable instance

Error when building cabal package with template haskell configured for profiling

2012-01-27 Thread Bas van Dijk
Hello, I would like to profile a cabal package that contains template haskell code. However I get the following error: $ cabal configure --ghc-options=-O2 -prof -auto-all -caf-all ... $ cabal build ... Dynamic linking required, but this is a non-standard build (eg. prof). You need to build

Re: Error when building cabal package with template haskell configured for profiling

2012-01-27 Thread Bas van Dijk
On 27 January 2012 15:14, Felipe Almeida Lessa felipe.le...@gmail.com wrote: On Fri, Jan 27, 2012 at 12:06 PM, Bas van Dijk v.dijk@gmail.com wrote: $ cabal configure --ghc-options=-O2 -prof -auto-all -caf-all Why aren't you using the specific options for profiling? $ cabal configure

Re: [Haskell-cafe] Serializing UTCTimes

2012-01-21 Thread Bas van Dijk
Thanks Ertugrul and Yitzchak. I failed to notice the Real and Fractional instances for DiffTime. Thanks very much for pointing me to it. I dropped the dependency on datetime and implemented your suggestions. Bas On 21 January 2012 22:29, Yitzchak Gale g...@sefer.org wrote: Bas van Dijk wrote

[Haskell-cafe] Serializing UTCTimes

2012-01-20 Thread Bas van Dijk
Hello, What's the recommended way for serializing (with the cereal package) an UTCTime? It's easy to give Serialize instances for UTCTime and Day: instance Serialize UTCTime where get = liftM2 UTCTime get get put (UTCTime day time) = put day put time instance Serialize Day where

Re: [Haskell-cafe] Serializing UTCTimes

2012-01-20 Thread Bas van Dijk
On 20 January 2012 15:03, Bas van Dijk v.dijk@gmail.com wrote: What's the recommended way for serializing (with the cereal package) an UTCTime? I'm now using the datetime package so I can do: import Data.DateTime (fromSeconds, toSeconds) instance Serialize UTCTime where get

Re: [Haskell-cafe] hackage trac broken

2012-01-15 Thread Bas van Dijk
On 15 January 2012 12:01, Joachim Breitner nome...@debian.org wrote: Is this known and will it be fixed? It was shut down because of massive spamming: http://www.haskell.org/pipermail/cabal-devel/2012-January/008427.html I have no idea who's working on it and when it will be up again. Cheers,

Re: ConstraintKinds and default associated empty constraints

2012-01-08 Thread Bas van Dijk
On 23 December 2011 17:44, Simon Peyton-Jones simo...@microsoft.com wrote: My attempt at forming a new understanding was driven by your example. class Functor f where    type C f :: * - Constraint    type C f = () sorry -- that was simply type incorrect.  () does not have kind *  -

Re: ConstraintKinds and default associated empty constraints

2012-01-08 Thread Bas van Dijk
be replaced by a _. Bas On Jan 9, 2012 6:22 AM, wren ng thornton w...@freegeek.org wrote: On 1/8/12 8:32 AM, Bas van Dijk wrote: On 23 December 2011 17:44, Simon Peyton-Jonessimonpj@**microsoft.comsimo...@microsoft.com wrote: My attempt at forming a new understanding was driven by your example

Re: [Haskell-cafe] GHC 7.4: Expected behavior or bug?

2011-12-27 Thread Bas van Dijk
On 27 December 2011 17:38, Michael Snoyman mich...@snoyman.com wrote: Thanks to Mark Wright for pointing this out[1]. We have the equivalent of the following code in persistent: {-# LANGUAGE MultiParamTypeClasses #-} data Key backend entity = Key class Monad (b m) = Foo b m where    func

Re: [Haskell-cafe] GHC 7.4: Expected behavior or bug?

2011-12-27 Thread Bas van Dijk
On 27 December 2011 17:47, Bas van Dijk v.dijk@gmail.com wrote: I fixed a similar breakage in the hmatrix library: https://github.com/AlbertoRuiz/hmatrix/commit/a4f38eb196209436f72b938f6355f6e28474bef3 GHC-7.4.1-rc1 also reported another type error in code that was accepted by GHC = 7.2.2

Re: [Haskell-cafe] Haskell Platform and Windows - where's 2011.4?

2011-12-27 Thread Bas van Dijk
On 27 December 2011 19:13, Steve Horne sh006d3...@blueyonder.co.uk wrote: On haskell.org, the 2011.4.0.0 version is shown as the current stable release - but the most recent download link is for the 2011.2.0.0 version. What download link are you referring to? I see that:

Re: ConstraintKinds and default associated empty constraints

2011-12-22 Thread Bas van Dijk
On 22 December 2011 01:58, wagne...@seas.upenn.edu wrote: Quoting Bas van Dijk v.dijk@gmail.com: I'm playing a bit with the new ConstraintKinds feature in GHC 7.4.1-rc1. I'm trying to give the Functor class an associated constraint so that we can make Set an instance of Functor

Re: ConstraintKinds and default associated empty constraints

2011-12-22 Thread Bas van Dijk
On 22 December 2011 09:31, Simon Peyton-Jones simo...@microsoft.com wrote: What about class Functor f where    type C f :: * - Constraint    type C f = () After all, just as (Ord a, Show a) is a contraint, so is (). But there's a kind mis-match there. `C f` should have kind `* -

Re: ANNOUNCE: GHC 7.4.1 Release Candidate 1

2011-12-21 Thread Bas van Dijk
On 21 December 2011 19:29, Ian Lynagh ig...@earth.li wrote:  * There is a new feature constraint kinds (-XConstraintKinds):       http://www.haskell.org/ghc/dist/stable/docs/html/users_guide/constraint-kind.html I'm trying to run the ConstraintKinds example from the documentation: {-#

Re: ANNOUNCE: GHC 7.4.1 Release Candidate 1

2011-12-21 Thread Bas van Dijk
On 22 December 2011 00:10, José Pedro Magalhães j...@cs.uu.nl wrote: Hi Bas, On Wed, Dec 21, 2011 at 23:02, Bas van Dijk v.dijk@gmail.com wrote: On 21 December 2011 19:29, Ian Lynagh ig...@earth.li wrote:  * There is a new feature constraint kinds (-XConstraintKinds):  http

ConstraintKinds and default associated empty constraints

2011-12-21 Thread Bas van Dijk
I'm playing a bit with the new ConstraintKinds feature in GHC 7.4.1-rc1. I'm trying to give the Functor class an associated constraint so that we can make Set an instance of Functor. The following code works but I wonder if the trick with: class Empty a; instance Empty a, is the recommended way to

Re: [Haskell-cafe] Alternative versus Monoid

2011-12-21 Thread Bas van Dijk
On 16 December 2011 16:26, Yves Parès limestr...@gmail.com wrote: 1) What about the First type? Do we {-# DEPRECATE #-} it? Personnaly, I'm in favor of following the same logic than Int: Int itself is not a monoid. You have to be specific: it's either Sum or Mult. It should be the same for

Re: [Haskell-cafe] Interruptible threads with IO loops

2011-12-21 Thread Bas van Dijk
On 21 December 2011 09:52, Fedor Gogolev k...@knsd.net wrote: I'm trying to get some threads that I can stop and get last values that was computed (and that values are IO values, in fact). I'm not sure it's what you need but you might want to look at:

Re: [Haskell-cafe] Adding state to a library

2011-12-18 Thread Bas van Dijk
On 18 December 2011 22:26, Kevin Jardine kevinjard...@gmail.com wrote: I have a library of functions that all take a config parameter (and usually others) and return results in the IO monad. It is sometimes useful to drop the config parameter by using a state-like monad.. If you're not

Re: [Haskell-cafe] Alternative versus Monoid

2011-12-16 Thread Bas van Dijk
On 16 December 2011 05:26, Brent Yorgey byor...@seas.upenn.edu wrote: I, for one, would be quite in favor of changing the current Monoid (Maybe a) instance to correspond to the failure-and-prioritized-choice semantics So lets do this. Some questions: 1) What about the First type? Do we {-#

Re: [Haskell-cafe] Alternative versus Monoid

2011-12-16 Thread Bas van Dijk
Attached is a git patch for base which makes the proposed changes. From 824bdca994b3fcceff21fcb68e1b18f1d4f03bd5 Mon Sep 17 00:00:00 2001 From: Bas van Dijk v.dijk@gmail.com Date: Fri, 16 Dec 2011 15:16:14 +0100 Subject: [PATCH] Give the Maybe Monoid the expected failure-and-prioritized

Re: [Haskell-cafe] DB vs read/show for persisting large data

2011-12-14 Thread Bas van Dijk
On 14 December 2011 15:22, Claude Heiland-Allen cla...@goto10.org wrote: I ran into this very nightmare in one project, and was recommend safecopy [0] by someone on the #haskell IRC channel.  I've not (yet) used it but it looks very nice! [0] http://hackage.haskell.org/package/safecopy Or

Re: [Haskell-cafe] Haskell functions caller-callee details

2011-12-09 Thread Bas van Dijk
On 9 December 2011 16:41, Shakthi Kannan shakthim...@gmail.com wrote: Given a Haskell package is there a way I can get each functions' caller-callee details? Are there any existing tools/libraries that can help me get this data from the source? Check out SourceGraph:

GHC HEAD build error

2011-12-07 Thread Bas van Dijk
Hello, I'm trying to build GHC HEAD but get the following error: inplace/bin/ghc-stage1 -H64m -O0 -fasm -Iincludes -Irts -Irts/dist/build -DCOMPILING_RTS -package-name rts -dcmm-lint -i -irts -irts/dist/build -irts/dist/build/autogen -Irts/dist/build -Irts/dist/build/autogen

Re: [Haskell-cafe] ANNOUNCE: monad-control-0.3

2011-12-06 Thread Bas van Dijk
On 6 December 2011 04:03, Joey Hess j...@kitenet.net wrote: I'm trying to convert from 0.2 to 0.3, but in way over my head. {-# LANGUAGE GeneralizedNewtypeDeriving #-} newtype Annex a = Annex { runAnnex :: StateT AnnexState IO a }        deriving (                Monad,                

Re: [Haskell-cafe] ANNOUNCE: monad-control-0.3

2011-12-06 Thread Bas van Dijk
On 6 December 2011 09:12, Bas van Dijk v.dijk@gmail.com wrote: instance MonadBaseControl IO Annex where    newtype StM Annex a = StAnnex (StM (StateT AnnexState IO) a)    liftBaseWith f = Annex $ liftBaseWith $ \runInIO -                       f $ liftM StAnnex . runInIO . runAnnex Oops

Re: [Haskell-cafe] ANNOUNCE: monad-control-0.3

2011-12-06 Thread Bas van Dijk
On 6 December 2011 05:06, Michael Snoyman mich...@snoyman.com wrote: Maybe this will help[1]. It's using RWST instead of StateT, but it's the same idea. [1] https://github.com/yesodweb/yesod/commit/7619e4e9dd88c152d1e00b6fea073c3d52dc797f#L0R105 Hi Michael, Note that you can just reuse the

Re: [Haskell-cafe] ANNOUNCE: monad-control-0.3

2011-12-06 Thread Bas van Dijk
On 6 December 2011 12:59, Michael Snoyman mich...@snoyman.com wrote: On Tue, Dec 6, 2011 at 11:49 AM, Bas van Dijk v.dijk@gmail.com wrote: On 6 December 2011 05:06, Michael Snoyman mich...@snoyman.com wrote: Maybe this will help[1]. It's using RWST instead of StateT, but it's the same idea

Re: [Haskell-cafe] ANNOUNCE: monad-control-0.3

2011-12-03 Thread Bas van Dijk
On 3 December 2011 10:18, Herbert Valerio Riedel h...@gnu.org wrote: btw, how did you manage to get measurements from 2 different versions of the same library (monad-control 0.3 and 0.2.0.3) into a single report? By renaming the old package to monad-control2 and using the PackageImports

Re: [Haskell-cafe] ANNOUNCE: monad-control-0.3

2011-12-03 Thread Bas van Dijk
On 3 December 2011 00:45, Bas van Dijk v.dijk@gmail.com wrote: Note that Peter Simons just discovered that these packages don't build with GHC-7.0.4 (https://github.com/basvandijk/monad-control/issues/3). I just committed some fixes which enable them to be build on GHC = 6.12.3. Hopefully

Re: [Haskell-cafe] Weird interaction between literate haskell, ghci and OverloadedStrings

2011-12-03 Thread Bas van Dijk
On 3 December 2011 11:19, Erik de Castro Lopo mle...@mega-nerd.com wrote: Joachim Breitner wrote: it does not seem to be related to literate haskell, if I copy the code from your file into a .hs without the , ghci still does not activate the OverloadedStrings extension when loading the file.

[Haskell-cafe] ANNOUNCE: monad-control-0.3

2011-12-02 Thread Bas van Dijk
Hello, I just released monad-control-0.3. The package for lifting control operations (like catch, bracket, mask, alloca, timeout, forkIO, modifyMVar, etc.) through monad transformers: http://hackage.haskell.org/package/monad-control-0.3 It has a new and improved API which is: * easier to

Re: [Haskell-cafe] ANNOUNCE: monad-control-0.3

2011-12-02 Thread Bas van Dijk
On 3 December 2011 00:45, Bas van Dijk v.dijk@gmail.com wrote: * 60 times faster than the previous release! Here are some benchmark results that compare the original monad-peel, the previous monad-control-0.2.0.3 and the new monad-control-0.3: http://basvandijk.github.com/monad-control.html

Re: Why no multiple default method implementations?

2011-11-24 Thread Bas van Dijk
On 24 November 2011 16:46, José Pedro Magalhães j...@cs.uu.nl wrote: Hi Bas, On Thu, Nov 24, 2011 at 09:23, Bas van Dijk v.dijk@gmail.com wrote: Hello, Now that we have DefaultSignatures, why is it not allowed to have multiple default method implementations, as in: {-# LANGUAGE

Re: [Haskell-cafe] Documenting strictness properties for Data.Map.Strict

2011-11-18 Thread Bas van Dijk
On 18 November 2011 06:44, Johan Tibell johan.tib...@gmail.com wrote: Here are some examples:    insertWith (+) k undefined m  ==  undefined    delete undefined m  ==  undefined    map (\ v - undefined)  ==  undefined    mapKeys (\ k - undefined)  ==  undefined Any ideas for further

Re: [Haskell-cafe] A Mascot

2011-11-16 Thread Bas van Dijk
On 16 November 2011 05:18, John Meacham j...@repetae.net wrote: Not nearly enough attention is paid to the other striking feature, the laziness. The 'bottom' symbol _|_ should feature prominently. The two most defining features of haskell are that it is purely functional and _|_ inhabits

Re: [Haskell-cafe] A Mascot

2011-11-16 Thread Bas van Dijk
On 16 November 2011 11:05, MigMit miguelim...@yandex.ru wrote: Maybe it's just me, but I've thought that being non-strict just means that it's possible for a function to produce some value even if it's argument doesn't; in other words, that it's possible to have f (_|_) ≠ (_|_). If there

Re: [Haskell-cafe] deepseq-1.2.0.1 missing Data.Map instance

2011-11-15 Thread Bas van Dijk
On 15 November 2011 23:50, Daniel Fischer daniel.is.fisc...@googlemail.com wrote: The change is already in the latest released deepseq version, but will only be in the containers version to be released with ghc-7.4. The change is already in the released containers-0.4.2.0. So the only thing

Re: [Haskell-cafe] Monad-control rant

2011-11-13 Thread Bas van Dijk
://hackage.haskell.org/packages/archive/MonadCatchIO-transformers/0.2.2.3/doc/html/Control-Monad-CatchIO.html Regards, Bas On 12 November 2011 13:55, Mikhail Vorozhtsov mikhail.vorozht...@gmail.com wrote: On 11/12/2011 07:34 AM, Bas van Dijk wrote: Are you going to release a new version of monad-control

Re: ANNOUNCE: GHC version 7.2.2

2011-11-11 Thread Bas van Dijk
On 11 November 2011 22:03, Ian Lynagh ig...@earth.li wrote: The GHC Team is pleased to announce a new bugfix release of GHC, 7.2.2. Yay! These GHC releases always feel like little presents... I noticed the links to modules in base in the latest docs point to the previous base library causing

  1   2   3   4   5   6   >