[Haskell-cafe] Cabal --enable-tests

2013-09-09 Thread satvik chauhan
Hi cafe, I wanted to ask this as I couldn't find this in cabal documentation. Is there any CCP macro set when a package is configured with --enable-testing? If not is there a way to do that? -Satvik ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Applicative is like an Arrow

2013-08-16 Thread satvik chauhan
Whenever I am confused I refer to this article http://www.haskell.org/haskellwiki/Typeclassopedia#Arrow -Satvik On Fri, Aug 16, 2013 at 7:34 PM, Thiago Negri evoh...@gmail.com wrote: I just stumbled upon the Applicative term. Arrows are quite difficult for me to understand at the moment. I

[Haskell-cafe] ForeignPtr and Garbage Collection

2013-07-30 Thread satvik chauhan
Hi Cafe, Is it guaranteed that the value of `ForeignPtr` will not be changed (for example due to compaction etc) by haskell garbage collector until it goes out of scope and finalizer is run. -Satvik ___ Haskell-Cafe mailing list

[Haskell-cafe] GHC API wiki update

2013-02-26 Thread satvik chauhan
I was playing with the GHC api and found that examples on the GHC wiki don't seem to work with GHC 7.6.1. Does anybody have the updated examples of the same? Regards, Satvik ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Need urgent help with Network.tls

2013-02-23 Thread satvik chauhan
You can use HaskellNet http://hackage.haskell.org/package/HaskellNet or imapget http://hackage.haskell.org/package/imapget directly or look into their source code for connecting to imap manually. -Satvik On Sat, Feb 23, 2013 at 8:58 PM, C K Kashyap ckkash...@gmail.com wrote: Hi, I am trying

Re: [Haskell-cafe] Generating random arguments for a function

2013-01-13 Thread satvik chauhan
I have a working code of this but for that I have to reimplement Arbitrary and Testable typeclasses which I don't want to do. I thought it might be possible to use parts of quickcheck without actually changing its code but still I am unable to find a suitable solution. -Satvik On Sun, Jan 13,

[Haskell-cafe] Generating random arguments for a function

2013-01-12 Thread satvik chauhan
I am trying to use quickcheck to generate random arguments of a given function (assuming all its types have Arbitrary instance and Show instance) along with the evaluation of the function at those arguments. Suppose I have a function add :: Int - Int - Int add a b = a+b Then I assume a

Re: [Haskell-cafe] Proving programs

2013-01-03 Thread satvik chauhan
Which book does that chapter belongs to? -Satvik On Thu, Jan 3, 2013 at 11:44 AM, Andrés Sicard-Ramírez andres.sicard.rami...@gmail.com wrote: On Wed, Jan 2, 2013 at 12:22 PM, Simon Thompson s.j.thomp...@kent.ac.uk wrote: Christopher, there's an introduction to proof for functional

Re: [Haskell-cafe] Non polymorphic numerals option -- avoiding type classes

2012-12-27 Thread satvik chauhan
I don't know about the RebindableSyntax extension. But Prelude :t [[1,2],3] [[1,2],3] :: (Num [t], Num t) = [[t]] The above only says that is is possible to have a list like [[1,2],3] if you have for a Num t, [t] is also an instance of Num. But it doesn't guarantee the existence of such an

Re: [Haskell-cafe] Template Haskell Splicing

2012-12-15 Thread satvik chauhan
On Sat, Dec 15, 2012 at 1:30 PM, Michael Sloan mgsl...@gmail.com wrote: I don't think that there is a particular reason for not supporting quasi-quotes in where clauses.. It should be added! The reason for /splices/ to not be supported in here statements is that they are run during type

[Haskell-cafe] Template Haskell Splicing

2012-12-14 Thread satvik chauhan
Is there any way to splice declarations inside where? If not, then what is the reason for not supporting this? -Satvik ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] How Type inference work in presence of Functional Dependencies

2012-09-13 Thread satvik chauhan
Consider the code below : {-# LANGUAGE MultiParamTypeClasses,FlexibleInstances,FunctionalDependencies,UndecidableInstances,FlexibleContexts #-} class Foo a c | a - c instance Foo Int Float f :: (Foo Int a) = Int - a f = undefined Now when I see the inferred type of f in ghci :t f f :: Int -

Re: [Haskell-cafe] OpenShift a free PaaS from RedHat

2012-07-05 Thread satvik chauhan
OpenShift gives access to Linux virtual machines on the cloud. However, we do not have root access so we cannot install any new package. I was trying to get my haskell code compiled into native on my local linux box and taking it to those machines. That does not seem to work because of two

[Haskell-cafe] Testing Concurrent Programs

2012-04-05 Thread satvik chauhan
How do you test concurrent programs in which you actually have to test over all possible interleaving schedules by the scheduler . Is this possible to do with quickcheck . Thanks , Satvik ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org