Re: [Haskell-cafe] haskell zlip read position

2011-07-20 Thread rahul
Hi Nathan, | It was purely just for demonstration. I did update the code with a few more | comments, but the enumerator package may not be the easiest thing to grok. | You might try putting up your current code and someone might be able to | recommend a better or easier approach. Thank you very m

Re: [Haskell-cafe] haskell zlip read position

2011-07-20 Thread rahul
Hi Nathan, Thank you very for the solution, since I am somewhat new to haskell, I am taking some time to digest it :). But it seems that you are using header -> streamLength to find the length of a single entry. However this info is not present in the protocol I am parsing (git server pack file

Re: [Haskell-cafe] haskell zlip read position

2011-07-20 Thread rahul
on with TAR, that can be | manipulated from Haskell using the 'tar' package. Unfortunately the binary protocol itself is external, so can't use a different type of compression. rahul -- http://people.oregonstate.edu/~gopinatr/ ___

[Haskell-cafe] haskell zlip read position

2011-07-20 Thread rahul
entry. Is there a way I can get this information out of ZLib? or is there a better approach to doing this? Any pointers would be very much appreciated. Regards, Rahul ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org

Re: [Haskell-cafe] type class constraints headache

2010-03-03 Thread Rahul Kapoor
not care what it's type is but the moment you use it some place the compiler needs to infer it's type which it is unable to do in your case because the "undefined"s can be of any type. HTH Rahul ___ Haskell-Cafe mailing list Has

Re: [Haskell-cafe] type class constraints headache

2010-03-03 Thread Rahul Kapoor
st (methods :: [(String, String)]) or methods :: [(String, SomeEqType)] Rahul ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Using Cabal during development

2010-02-09 Thread Rahul Kapoor
> Then how does the 'Executable' section of your .cabal look like? That's what > I can't get working. Suitably elided. Executable test hs-source-dirs: src, tests other-modules:Text.Yaml.Yay, Text.Yaml.Yay.Syck main-is: Main.hs build-depends:base, HsSyck,

Re: [Haskell-cafe] Using Cabal during development

2010-02-09 Thread Rahul Kapoor
Suite. I also use .ghci set up the correct source paths and to start up with the test module loaded. So recompiles are usually just as simple as :reload. I still run the complete "cabal configure -ftest && cabal configure build && ./dist/..

Re: [Haskell-cafe] Stack ADT?

2010-02-05 Thread Rahul Kapoor
> What's going on here? I'm not even calling function POP. > *Data.Stack> let s2 = pop s1 > *Data.Stack> top s2 > *** Exception: Stack.hs:8:0-28: Non-exhaustive patterns in function pop Haskell being a non strict language, does not evaluate pop s1 when you define let s2 = pop s1. but when you try

Re: [Haskell-cafe] Determining application directory

2010-01-27 Thread Rahul Kapoor
> So, is there a way to get an application > directory path under Windows? I remember that there is a way to do this > using WinAPI, but how to do this Haskell? The System.Directory module has some methods to get specific directory names in an OS agnostic manner. The closest method that matches w

Re: [Haskell-cafe] Windows emulator for testing purposes

2010-01-18 Thread Rahul Kapoor
> Do you have any recommendations for a free/open source solution that would >let me emulate a Windows >environment for testing purposes? Sun's Virtual Box? - http://www.virtualbox.org/ You would still need a Windows license though.

Re: [Haskell-cafe] What's going on here?

2010-01-16 Thread Rahul Kapoor
>>*Main> dropFirst [3 4 5 6] List members are separated by commas. Space in Haskell denotes function application. Hence the error message: Hence t > No instance for (Num (t -> t1 -> t2 -> Int)) > arising from the literal `3' at :1:11-17 > Possible fix: > add an instance declara

Re: [Haskell-cafe] Generating random enums

2009-05-02 Thread Rahul Kapoor
> OK, I think what you're saying is to work with (random) integers and use > fromEnum and toEnum to get corresponding DayOfWeek. But I get this when I > try to use toEnum: > > *Main> toEnum 2 ghci does not know what type of enum you want to create from the number 2. Try: toEnum 2 :: DayOfWeek Tha

Re: [Haskell-cafe] Enum to String, and back?

2009-04-15 Thread Rahul Kapoor
rresponding Color type? > Make it an instance of the Read type class. http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#t%3ARead That will allow you to write - read "Red" :: Color => Red HTH Rahul ___ Haskell-Cafe mail

Re: [Haskell-cafe] Remote control of firefox through Haskell?

2008-07-15 Thread Rahul Kapoor
Selenium (http://selenium.openqa.org/) might do what you want. The bindings were announced on this list a little while ago (http://tinyurl.com/se-bindings) On Tue, Jul 15, 2008 at 3:12 PM, Jefferson Heard <[EMAIL PROTECTED]> wrote: > Is there a library out there that will allow me to remote-contro

Re: [Haskell-cafe] where to put handy functions?

2007-08-09 Thread Rahul Kapoor
. Would it be a good idea to include it in MissingH http://software.complete.org/missingh in the mean time? Cheers, Rahul ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Using HList Records

2007-08-08 Thread Rahul Kapoor
iments --HListPrelude TypeEqBoolGeneric TypeEqGeneric1 TypeCastGeneric1 --FakePrelude So the question is do I need to play around with the cabal file to expose the right stuff? Or has the syntax changed? I get errors running "./setup haddock" (configure, buil

[Haskell-cafe] combinators for a simple grammar

2007-08-06 Thread Rahul Kapoor
remove the precedence rules from the types and move it the part of the code that evaluates the expressions? Rahul ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: Type without a data constructor?

2007-08-06 Thread Rahul Kapoor
>> Constructors and names of data types live in separate namespaces. The above fact was the cause of all my confusion. It just slipped out of my mind. Cheers, Rahul ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/m

[Haskell-cafe] Type without a data constructor?

2007-08-06 Thread Rahul Kapoor
:: SearchCondition sc = Term True is ok, but sc :: SearchCondition sc = Constant True is not (though this is what I intended to capture!). So the question is what are types with no constructors good for? A simple example would be appreciated. Rahul

[Haskell-cafe] problems installing Takusen-0.6

2007-07-28 Thread Rahul Kapoor
any suffix: ["hi"] I only have sqlite3 installed (no Oracle or Postgres). I followed the usual steps for the install ghc --make -o setup Setup.hs ./setup configure ./setup build ./setup install Any Ideas? Rahul ___ Haskell-Cafe mailing lis

[Haskell-cafe] New to Haskell - Question about hugsIORun from old Prelude

2006-12-11 Thread Rahul Naik
Hello, I am trying to rewrite some older (2001) haskell : myReadFile :: String -> String myReadFile f = case hugsIORun (readFile f) of Right s -> s Left _ -> "" Can someone provide me with a up to date version of the above bit of code without using code from th