Re: [Haskell-cafe] IDE?

2007-06-16 Thread Marc Weber
both emacs and vim can pass buffer segments and editing session information to external (haskell) code, working as text or file transformers, and both emacs and vim can be controlled by such external code. This is what shim tries to do. I've added a link to the wiki IDE page. Marc Weber

[Haskell-cafe] Template haskell problem

2007-06-15 Thread Marc Weber
:: Name - Exp und n = AppE (VarE (mkName show)) (SigE (VarE (mkName undefined)) (ForallT [n] [] (VarT n))) should create the (show $ undefined :: a) part. Marc Weber ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org

Re: [Haskell-cafe] IDE?

2007-06-15 Thread Marc Weber
HTH Marc Weber ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] IDE?

2007-06-15 Thread Marc Weber
comprehensive list of editor support on haskell.org. Either it's to late or it is gone. No, it's still there: http://haskell.org/haskellwiki/Applications_and_libraries - Program developement - Editor support Perhaps a link to this should be made on the front page? This is a topic every newcomer

[Haskell-cafe] How to dynamically attach readers to streams?

2007-06-10 Thread Marc Weber
Example: main = readFile /dev/input/mouse = mapM print . streamToEvents That's no easy. Now I want to listen to those events remotely using a network conncetion Data.Network does provide everything I need. Is this done by substituting the print function with something like sent event = do

[Haskell-cafe] Re: HList questions

2007-06-10 Thread Marc Weber
Hi Oleg! On Sun, Jun 10, 2007 at 04:26:43PM -0700, [EMAIL PROTECTED] wrote: [...] A type-indexed Product (TIP, or TIR) is a similar collection of values -- indexed [..] by their type. So its stylistic too. Because you can also just use hOccurs? and product vs record emphasizes that there is

[Haskell-cafe] HList questions

2007-06-06 Thread Marc Weber
Do you know what a type indexed coproduct is ? (TIC.hs from HList) What is the purpose of this module? Why the Proxy type has been introduced? Can you think of a short application? Marc ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] OK, so this VIM thing -- how do I make it actually work?

2007-06-05 Thread Marc Weber
clearly.) The problems I'm seeing are the ugly white-on-red for underlines, the lack of any kind of differentiation for Hi. Sorry for this stupid question but have you tried :set nohlsearch? Or /searchsomethingwhichdoesntexistcr ? You can also put your cursor an those underlines and

[Haskell-cafe] QuickCheck Arbitrary - infinite recursion on recursive GADTs?

2007-06-04 Thread Marc Weber
example: data A = A INt | B [A] instace Arbitrary A where arbitrary = oneof [ liftM A arbitrary , liftM B arbitrary ] But now QuickCheck will propably create a test value A ( B [ A ( B [ A - no end Is there an easy QuickCheck way to prevent

[Haskell-cafe] small hack on hasktags to make it collect class names

2007-05-31 Thread Marc Weber
You can download the modified version from http://mawercer.de/marcweber/hasktags.hs Marc Weber ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] (no subject)

2007-05-24 Thread Marc Weber
On Thu, May 24, 2007 at 02:38:05PM +0800, L.Guo wrote: Thanks for your suggestion, and sorry for the subject. I have read the introduction of Data.ByteString, it is helpful. And also, there is one problem left. When i read a binary file, data is truncated at the charactor EOF. You have

Re: [Haskell-cafe] Re: Editor (OT: keyboard mouse / one device + my 2 cents)

2007-05-22 Thread Marc Weber
I did think about this topic many times. My conclusion: We need some other kind of interface (keyboard and mouse at the same time which would speed up your workflow very often, especially when doing some kind of graphics where you have to enter some text).. One solution I did find is

Re: [Haskell-cafe] Re: IDE support

2007-04-28 Thread Marc Weber
On Fri, Apr 27, 2007 at 08:05:53PM +, Georg Sauthoff wrote: On 2007-04-22, Marc Weber [EMAIL PROTECTED] wrote: Hi, I've written some completion scripts for vim. Don't know wether you can call it an ide. Also tagging source is supported by one command. what tagging program do you

Re: [Haskell-cafe] Is Excel a FP language?

2007-04-25 Thread Marc Weber
Is the cell evaluation engine one? I think not. I do not believe what you can type into those cells does constitute a programming language, or at least not a turing complete one. As far as i know only simple calculations can be performed. For example, is there any way to

Re: [Haskell-cafe] Talking to the serial (RS232) port from Haskell

2007-04-25 Thread Marc Weber
On Wed, Apr 25, 2007 at 09:28:37AM -0700, Dan Piponi wrote: What's the easiest way, from Haskell, to open a serial port (under Windows, say) with the correct baud rate and parity, and send data through it? Is there a serial library for Haskell? Don't know wethere there are some libraries This

Re: [Haskell-cafe] IDE support

2007-04-22 Thread Marc Weber
On Sun, Apr 22, 2007 at 07:34:27PM +0200, Philipp Volgger wrote: What IDE support is available for Haskell (Visuall Haskell, EclipseFP), anything else? Hi Philipp. I've written some completion scripts for vim. Don't know wether you can call it an ide. Also tagging source is supported by one

[Haskell-cafe] 2 HaXml questions

2007-04-19 Thread Marc Weber
a) After filtering the content I want to use how do I extract the text? eg a = xtract html/body/h2/- which should return the text contained in the h2 tag. There is a parser called text which returns the text but I don't know how to use it ? Is there a much simpler way I have missed?

Re: [Haskell-cafe] COM and Haskell

2007-04-19 Thread Marc Weber
On Thu, Apr 19, 2007 at 08:59:17AM -0700, Justin Bailey wrote: All, I'm interested in automating Excel using Haskell. I'm writing a little program for my wife and it'd be nice to fill out an Excel spreadsheet for her (with formatting so I don't think CSV will cut it). A bit of

Re: [Haskell-cafe] COM and Haskell

2007-04-19 Thread Marc Weber
On Thu, Apr 19, 2007 at 06:18:24PM +0100, Neil Mitchell wrote: No, VBA only. I had VBA in mind but typed the wrong name. Thanks Neil for correcting my statement. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] unsafeInerleaveIO and randomIO

2007-04-17 Thread Marc Weber
stefan has pointed me a nice version: = === randomInts :: IO [Int] randomInts = randoms `fmap` newStdGen main = do ints - randomInts print $ take 5 ints ===

Re: [Haskell-cafe] ... - what about introducing LazyIO ?

2007-04-17 Thread Marc Weber
sequence isn't lazy (not in the IO monad at least); it will try to run to completion, returning an infinite list of (as yet unevaluated, due I should have learned that lesson already.. This is the second time I could have needed a lazy IO monad version.. Does something like this already exist?

Re: [Haskell-cafe] Re: [web-devel] A light-weight web framework

2007-04-10 Thread Marc Weber
Right now, you can largely do the same thing, but you have to write the XML representations of your data structures manually. -Alex- I'm not sure but doesn't use HAppS kind of stripped down HaXml ? DrIft can derive HaXml instances automatically. Where is the problem doing using DrIft? Marc

[Haskell-cafe] ReadP - take first succesful parser ?

2007-04-04 Thread Marc Weber
Brief: I want to make the parser choice [string dummy, anystring ] where anystring = many get return the first match. (Thus if dummy matches disregarg all following parsers) ..) details: I want to parse some wmii events. They all look this way ClientFocus 2 ClientFocus 2

Re: [Haskell-cafe] ReadP - take first succesful parser ? -solved

2007-04-04 Thread Marc Weber
I think I've solved the problem. The Text.Read.Lex does contain the missing parts. I had two problems. The one is solved by using ++ ( use the first parser, falback to the second), the second was: parse till EOF. This is solved by using the functions defined in Lex itself. Thanks for listening

[Haskell-cafe] Tracking characters and a timestamp ?

2007-04-04 Thread Marc Weber
those 10 events after having typed the 10th character. Do I need continuation passing style? Would unsafeInterleaveIO help? The final goal is writing a timetracker which sums up the time you've spent on different wmii tags (= you can think of them beeing different screens ) Marc Weber

[Haskell-cafe] announcing new web-devel mailinglist

2007-03-28 Thread Marc Weber
It's done. The mailinglist is called web-devel hosted on haskell.org and can be fond by haskell.org - mailinglists - a comprehensive list of .. To subscribe goto http://www.haskell.org/mailman/listinfo/web-devel If you want to help administrating the list drop me a mail. Marc

[Haskell-cafe] Haskell and a new web developement mailinglist?

2007-03-20 Thread Marc Weber
I've been talking to Chris Eidhof the last days and we'd like to suggest adding another specialized haskell mailinglist: Haskell and web developement. I think the global interest will increase in the feature, libraries are evolving and it would be nice to have a place to discuss them. Any

Re: [Haskell-cafe] Haskell and a new web developement mailinglist?

2007-03-20 Thread Marc Weber
On Tue, Mar 20, 2007 at 04:04:42PM -0400, S. Alexander Jacobson wrote: There is currently a happs mailing list. I see no reason not to broaden the subject matter to haskell web development in general. The URL for the list is http://groups.google.com/group/happs -Alex- Hi Alex The

Re: [Haskell-cafe] Haskell and a new web developement mailinglist?

2007-03-20 Thread Marc Weber
On Tue, Mar 20, 2007 at 02:25:41PM +0100, Marc Weber wrote: I've been talking to Chris Eidhof the last days and we'd like to suggest adding another specialized haskell mailinglist: Haskell and web developement. I've written to John Peterson who replied: I'm sure that will be fine

[Haskell-cafe] haskell and webapplications + a WASH and a WebFunction question

2007-03-13 Thread Marc Weber
Hello, I've noticed that the summer of code tickets contain one item: lightweight web framework. I've dropped out university one year ago. So I can't participate, right? Do you want to explore with me how this might be done propably using HAppS or fastcgi ? I just need another person to talk to

Re: [Haskell-cafe] auto-completion for Vim 7

2007-03-05 Thread Marc Weber
Claus, Stephan: I hope you don't mind me having put a link to your work at the bottom ;) (link below) If someone knows of a simple way to generate a function/type list of the standard modules, I'd love to hear about it. Generating such a list on the fly each time is probably not an option, as

[Haskell-cafe] Re: overlapping instances, selecting if type a does not belong to class?

2007-02-27 Thread Marc Weber
However, it seems that your particular problem can be solved with simpler means: instance (HList a) = HListAppendArbitrary a HNil a where hAppendArbitrary a _ = a instance (HList a, HList b, HList c) = HListAppendArbitrary a (HCons b d) c where hAppendArbitrary a b = hAppend

[Haskell-cafe] overlapping instances, selecting if type a does not belong to class?

2007-02-26 Thread Marc Weber
does not belong to class HList. Of course there is another opportunity by writing (HCons a x) instead of to force the first type beeing a HList... Which is the topic to read from the ghc/ haskell manual ? Marc Weber ___ Haskell-Cafe mailing list

[Haskell-cafe] Re: overlapping instances, selecting if type a does not belong to class?

2007-02-26 Thread Marc Weber
Wow. That said, it is quite possible in Haskell to achieve genuine class-based dispatch, with backtracking if necessary: http://pobox.com/~oleg/ftp/Haskell/poly2.txt Thanks for digging this up. I'll have to reread it tomorrow. I wasn't able to find the definition of AllOf(But): quote

Re: [Haskell-cafe] Illegal .... - solved - style question

2007-02-25 Thread Marc Weber
curious about reading you comments on a) b) ;) Happily Marc Weber = testfile - needs HList and GHC = {-# OPTIONS -fglasgow-exts #-} {-# OPTIONS -fallow-undecidable-instances #-} {-# OPTIONS -fallow-incoherent-instances #-} {-# OPTIONS -fallow-overlapping-instances

Re: [Haskell-cafe] How to build a python module using Haskell?

2007-02-25 Thread Marc Weber
to look up how to do it. If you still get stuck somewhere post again. HTH Marc Weber ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] R wrapper in haskell

2007-02-25 Thread Marc Weber
. It depends on what you need and how much time you want to spent on this topic ;) hope this helps Marc Weber ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Illegal polymorphic or qualified type: forall l.

2007-02-23 Thread Marc Weber
how can i fix this? Mmmh I really need some haskell type class traingings ;) = test file == module Main where import HList import HOccurs import Control.Monad.Reader class Get a b where get :: a - b data D1 = D1 Int -- dummy type type

[Haskell-cafe] HList, hOccurs and MonadReader

2007-02-22 Thread Marc Weber
Having the module given below I can't see why using printAndRerun l1 printAndRerun2 l2 but not printAndRerun l1 printAndRerun l2 ? They only differ in their name. Can you point me in the right direction? {-#

Re: Re[2]: [Haskell-cafe] Why do I have to specify (Monad m) here again?

2007-02-19 Thread Marc Weber
Hi David. I see that its useful to add complete type signatures without letting the compiler add stuff magically. This is why I've tried to write the final question down under a new topic wether it would be useful to be able to write down partial type signatures where browsing coders know that

[Haskell-cafe] Why do I have to specify (Monad m) here again?

2007-02-18 Thread Marc Weber
Why do I have to specify (Monad m) here again? class (Monad m) = GetMV m a where ... instance GetMV m c where ... No instance for (Monad m) arising from the superclasses of an instance declaration possible fix: add (Monad m) to the instance declaration superclass context Marc

Re: [Haskell-cafe] Why do I have to specify (Monad m) here again?

2007-02-18 Thread Marc Weber
On Sun, Feb 18, 2007 at 05:06:33PM +0300, Bulat Ziganshin wrote: Hello Marc, Sunday, February 18, 2007, 5:21:36 PM, you wrote: Why do I have to specify (Monad m) here again? class (Monad m) = GetMV m a where instance GetMV m c where because you can find another way to ensure

Re: [Haskell-cafe] Why do I have to specify (Monad m) here again?

2007-02-18 Thread Marc Weber
On Sun, Feb 18, 2007 at 06:59:32PM +0300, Bulat Ziganshin wrote: Hello Marc, Sunday, February 18, 2007, 7:32:54 PM, you wrote: When using your example (Monad IO): class (Monad m) = MonadIO m where liftIO :: IO a - m a it it basically the same, isn't it? This

Re: Re[2]: [Haskell-cafe] Why do I have to specify (Monad m) here again?

2007-02-18 Thread Marc Weber
David: Thanks again for your explanation Because, in general, m isn't an instance of Monad. Talking about my example: class (Monad m) = GetMV m a where ... instance GetMV m c where (2) (2) There are only 2 cases: ghc supposes m does instantiates Monad = success ghc

Re: [Haskell-cafe] Why do I have to specify (Monad m) here again?

2007-02-18 Thread Marc Weber
i mean that it makes error message more obvious - you don't need to remember that this context is implied due to class declaration The error might look like Missing instance (Ord m) araising from use of ... imposed by automatically infered class constraint from context line xy ? ;) Something

[Haskell-cafe] Summarize of Why do I have to specify (Monad m) here again?

2007-02-18 Thread Marc Weber
Thanks for all the feedback. It did help me a lot. Now I know that if there is something left to discuss the topic should be: Would it make sense to specify partial type declarations ? I don't need an answer right now. Marc ___ Haskell-Cafe mailing

Re: [Haskell-cafe] Is there [...] Where to find most haskell libraries I know of

2006-12-28 Thread Marc Weber
* If this and google didn't help you I would ask ;) Marc Weber ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] cabal running multiple preprocessors on one file - suggestion

2006-12-21 Thread Marc Weber
Am I right that the way to do this now is create your own preprocessor run on files havirg your extionsion? What about naming the source files eg Module.hs.cpp.di.gc.chs ? This would mean first run c2hs, then greencard thin DrIft then cpp and put the results in Module.hs.cpp.di.gc.chs 1)

Re: [Haskell-cafe] API for reading a big binary file

2006-12-21 Thread Marc Weber
On Thu, Dec 21, 2006 at 01:47:48PM -0800, Ranjan Bagchi wrote: Is there a fast way to do this using ghc? I can extract fields by using a ByteString, but I may not be using it fast enough: I've had to write my own routines to extract ints, longs and doubles. The other option is to write

[Haskell-cafe] howto c2hs marshall in out argument by reference

2006-12-19 Thread Marc Weber
The function takes a pointer to an integer, prints its value and returns the increment. void cl_inc(int *i){ printf(changing int from %d to %d, *i, (++i)); } I've managed it by using this code: {#fun pure cl_inc {alloca `CInt' peek*}

[Haskell-cafe] greencard and cabal, how to do it right?

2006-12-17 Thread Marc Weber
I want to have a look at fruit which is using GCJNI, greencard, ... That's why I want to learn how to use greencard with cabal. If this is only a RTFM problem, can you point me to the docs? When using the cabal builtin preprocessor I get the error that --libdir has to be specified. So I tried

Re: [Haskell-cafe] greencard and cabal, how to do it right?

2006-12-17 Thread Marc Weber
suggests that it wants --libdir=../c_lib instead of --libdir ../c_lib. Could this be the case? I'd like to think it would parse them pretty much the same way but you can never be sure... Hi Dougal. Thanks for your suggestion. This might be the case. But is not here. (I could have bet that my

Re: [Haskell-cafe] greencard and cabal, how to do it right?

2006-12-17 Thread Marc Weber
Anyway, how to set the options using cabal ? the preprocessor is there so there must be a working way without my modifications I don't know about. And Greencard.hs isn't just empty? No, Greencard.*gc* looks like: module Main where import

[Haskell-cafe] haskell vim / my coding aids

2006-10-05 Thread Marc Weber
I've been busy for some days writing this humbled helper scripts for vim: Goto vim - by Marc Weber http://www.haskell.org/haskellwiki/Libraries_and_tools/Program_development#Vim If you find it useful and drop me a line I'll be glad to read your feedback. Marc

[Haskell-cafe] One thought: Num to 0 as ? to list?

2006-08-13 Thread Marc Weber
Is there somethinig corresponding to Num concering lists? I mean there is + - /.. defined. + - are not type specific (Int, Double) neither is : [1,2] notation to Elements.. But what about different implementatins of lists? (linked lists? hash lists? array with index? In other words: why not

[Haskell-cafe] rand* why not of type State g a

2006-08-13 Thread Marc Weber
the rand* function are examples for a typical state usage, arent' they? Is there any reasoon why they are not defined RandomGen g = State g a rather than RandomGen g = (a,a) - g - (a,g) ? Marc ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] cabal specify a tested version, ghci target?

2006-08-11 Thread Marc Weber
1.) I know I can use Build-Depends: lib == version, lib2 version, lib3 = version and so on. Do you think it would be useful to introducue some notation to indicate a tested with ? Reason, purpose: I think its sometimes the case that a

Re: [Haskell-cafe] [Haskell] AJAX applications in Haskell

2006-08-10 Thread Marc Weber
OTOH I do not feel like I have a lot of time to dedicate to this, so if someone else is working on this, could we team up (possibly for a different (if shown better) approach because one I chose is still I would join and try to help where /as much as I can Marc Weber

[Haskell-cafe] IO Monad/ haskelldb strange error?

2006-08-08 Thread Marc Weber
line 39 works fine line 56 doesn't. Why? Isn't both a IO monad (because of the print statements) After commenting out 56 it compiles fine Any suggestion appreciated.. I'm struggling for some hours now.. module Modules.ObjectTree where import Debug.Trace import Data.FunctorM import DBUtils

[Haskell-cafe] creating tree with level subnodes and incrementing number?

2006-08-08 Thread Marc Weber
Hi I've tried as an exercise to learn how to use the state monad to create a tree this way: module Main where import Control.Monad.State import Data.Tree import Random createTree :: Int - Int - (Tree Int, Int) createTree 4 = runState $ State $ \s - (Node s [] , s+1) -- stop at level 4

Re: [Haskell-cafe] creating tree with level subnodes and incrementing number?

2006-08-08 Thread Marc Weber
Thanks to you all! I think I've learned a lot. Marc ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] commandline parsing?

2006-07-29 Thread Marc Weber
I've been using pesco_cmdline for a while now. But I did notice that it doesn't fit my needs.. And it took me quite a while to get to know why I was getting strange typeable errors when specifying the wrong default value or reading the wrong type.. (these errors occur at runtime thus they

Re: [Haskell-cafe] scripting in haskell

2006-07-25 Thread Marc Weber
.. But there might be much better solutions. Marc Weber ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Why Haskell?

2006-07-24 Thread Marc Weber
2) Recompiling binaries (necessary in order to link in foreign object code into GHCi) is slow using GHC. Moreover I have to restart GHCi if I want to reload a changed DLL (unless there is a way to unload a DLL in GHCi). It also requires jumping around between several console windows to

[Haskell-cafe] hquickfile first prototype ..

2006-07-04 Thread Marc Weber
the leading @ so /ea is equal to /@ea would it be useful if small letters would also match capital letters but not the other way round? The Eclipse Plugin GotoFile (written by Max Uermann) does it this way written by Marc Weber Credits to any other

Re: [Haskell-cafe] Packages and modules

2006-06-28 Thread Marc Weber
I'm not sure on which mail of this thread I should append MHO. What happens if two programmers happen to choose the same package name? (Prepend the location on the filesystem? ;-) If something like a package name is introduced I would prefer not separating package and module name with a .

Re: [Haskell-cafe] parsec, how to feed single tokens?

2006-06-25 Thread Marc Weber
Have I missed a function or isn't parsec meant to be used this way? Would you recommend writing your own small parser for this? I'm parsing everything from the beginning now.. The other way I had to to rewrite parts of parsec.. Marc ___

[Haskell-cafe] parsec, how to feed single tokens?

2006-06-23 Thread Marc Weber
Hi. I want to write a haskellquickfind app to get a list of files using human readable hash values (eg the first character of directory/filenames) Eg hquickfind vtl should print /var/tmp/local My implementation should look like this: Every folder/file is token and I want to run a parser. to

[Haskell-cafe] Is there any url lib?

2006-06-03 Thread Marc Weber
Hi. Did anyone implement something like pythons urllib yet? I wont to retrieve some files via http (I could use wget -O - for that ) and send some form information (post/get).. In other words: Something like expect but for downloading some documents from a website.. ;) Perhaps I should have

Re: [Haskell-cafe] Eclipse and Haskell

2006-06-03 Thread Marc Weber
Everytime I try one of these tools I end up going back to Vim for editing plus whatever debug tools I can scrape together. Me is using vim, too.. And fortunately there is eclim on sourceforge It does neither try to reimplement vim nor eclipse but tries to make them work together.. But it's java

Re: [Haskell-cafe] calling haskell from C++

2006-05-23 Thread Marc Weber
On Tue, May 23, 2006 at 10:31:17AM +0100, Vladimir Portnykh wrote: Hello ALL, I am very new to Haskell and my question might appear very basic sorry about it in advance. I have a C++ application and I would like to be able to launch Haskell interpreter (lets say GHC) supplying the Haskell

Re: [Haskell-cafe] develop new Haskell shell?

2006-05-13 Thread Marc Weber
Wow.. quite many responses.. I'll have to rearead them thoroughly.. ;) I think GHCI would be great (expect it's start up time compared to bash ;) I wouldn't use hs-plugins because it needs quite a lot of time to compile pieces of code.. I got the idea to use something like Don Libes

Re: [Haskell-cafe] develop new Haskell shell?

2006-05-13 Thread Marc Weber
task in a new, type-safe fashion. fromVideo of cause would itself call something like mplayer or transcode. Marc Weber ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] develop new Haskell shell?

2006-05-09 Thread Marc Weber
do you think? Marc Weber ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] NewBinary/ BinMem and IO monad

2006-05-05 Thread Marc Weber
just add unsafePerformIO: great idea! In my case I can also use unsafeInterleaveIO or lazyness, can't I? Marc ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] NewBinary/ BinMem and IO monad

2006-05-05 Thread Marc Weber
On Sat, May 06, 2006 at 12:39:46AM +0200, Marc Weber wrote: just add unsafePerformIO: great idea! In my case I can also use unsafeInterleaveIO or lazyness, can't I? Of cause I can't. unsafePerformIO is of type IO a - IO a. Sorry for posting before thinking ;) Marc

[Haskell-cafe] NewBinary/ BinMem and IO monad

2006-05-03 Thread Marc Weber
I'm trying to write some true type library (implementing only the tables I need at the moment). When loading a font file it doesn't make sense to parse every table which isn't needed. So lazyness of haskell would perfectly meet requirements here. My problem: NewBinary supports memory buffers.

Re: [Haskell-cafe] C++ parser in Haskell?

2006-04-20 Thread Marc Weber
On Wed, Apr 19, 2006 at 11:01:03PM +0200, Christophe Poucet wrote: For the parsing and lexing I used happy and alex. Jake Luck wrote: I would be very interested in this as well. I have looked myself but haven't found anything else. I wrote one myself in Haskell but for a subset of C++

resolved Re: [Haskell-cafe] hs-plugins/ haskelldb/ ELF zlib incompatibility.

2006-03-20 Thread Marc Weber
Thanks to Bj?rn Bringert. The solution was to remove the z lib dependency when compiling MySQL (from HSQL library) after runhaskell Setup.lhs configure. Marc ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] hs-plugins/ haskelldb/ ELF zlib incompatibility.

2006-03-18 Thread Marc Weber
I get this error: calhost db=store uid=marc pwd= DB/Direct: Daan Leijen (c) 1999, HWT (c) 2003-2004, Bjorn Bringert (c) 2005 Connecting to database... DBDirect: user error (loadShared: couldn't load `/usr/lib/libz.so' because /usr/lib/libz.so: invalid

Re: [Haskell-cafe] Code completion? (IDE)?

2006-02-17 Thread Marc Weber
On Thu, Feb 16, 2006 at 09:50:51AM -0300, Thiago Arrais wrote: On 2/16/06, Thiago Arrais [EMAIL PROTECTED] wrote: Just take a look at the latest integration build that you are able to find at http://eclipsefp.sourceforge.net/download There is also a screenshot at

Re: [Haskell-cafe] (Newbie Question) How to get the value of an IO String Monad?

2006-02-17 Thread Marc Weber
You can access IO values only from within do blocks (see any tutorial, previous posts or google). It looks like this then: do= myvalue - functionwhichreturnsIOValue dosomethingwith myvalue Due to monads you don't have to leave the IO monad this way. Oh. Have to go now. do is translated into

Re: [Haskell-cafe] Haskell as scripting language?

2006-02-16 Thread Marc Weber
Wow, that easy? Just eval ...? Can't believe it.. Will have look at those examples.. Marc ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Haskell as scripting language?

2006-02-15 Thread Marc Weber
Is there a way to use haskell as scripting language in a) your own project? b) other projects such as vim (beeing written in C)? At the moment I'm interested, I don't have any real project.. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] Code completion? (IDE)?

2006-02-15 Thread Marc Weber
vim7 has introduced omni-completion... So I'm interested wether there are any projects which support any kind of completion.? I've read the thread about Eclipse IDE haskell plugin. Would you recommend picking up code from a haskell compiler and adapt it for this purpose? I'm interested but

[Haskell-cafe] building ghc on win with gcc of cygwin, without cygwin1.dll (-mno-cygwin flag) ?

2006-02-11 Thread Marc Weber
Hi.. I've found the nice documentation about building ghc on haskell.org/ghc - documentation. There is one chapter (#1) about C compilers and environments to use: Either MSYS or cywin and gcc of MinGW because gcc of cygwin will link to cygwin1.dll by default which may change and therefore can

[Haskell-cafe] multiple defentions of .. fst defined here errors.

2006-02-10 Thread Marc Weber
Why do these error occur? After hiding the packages com (beeing in comlib) and hdirect (beeing in lib) and adding -package com -package hdirect it works fine. I haven't tried without hiding but adding -package options yet. ghc --make -H16m -O -fglasgow-exts -syslib com -fno-warn-missing-methods

[Haskell-cafe] Emulating bash pipe/ process lib

2006-02-08 Thread Marc Weber Marc Weber
Hi. I want to write a little haskell program executing about 4 programs passing data via pipes. As my python script seems to be slower than a bash script I want to try a ghc executable now. It should invoke different parts of a text to speech chain. This way I have one interface then. Talar und

[Haskell-cafe] Compiling hdirect on windows with COM support

2006-02-05 Thread Marc Weber
time as expected ;-) Just install cygwin, and run this script. It will download parts of fptools via cvs (so you need cvs and GNU make from cygwin) Greetings, Marc compilehdirect.sh --- #!/bin/sh # author: Marc Weber # [EMAIL PROTECTED] # configure fptools WORKDIR

Re: [Haskell-cafe] Haskell to call Microsoft COM (Dispatch)

2006-02-02 Thread Marc Weber
On Mon, Jan 30, 2006 at 08:40:43PM +0100, Gracjan Polak wrote: Hi all, Is there any library to make Haskell call Microsoft COM functions using Dispatch? E.g I don't need the full COM binary functionality, scripting is enough. Google didn't seem to find anything interesting...

[Haskell-cafe] Does anybody have a simple example of using continuation Monad?

2006-01-12 Thread Marc Weber
I'm struggling with this example: http://www.nomaware.com/monads/html/contmonad.html#example After looking at it for the fourth time I got much more.. but still not enough.. because there are so much new things (when beeing translated into some kind of condition ? thentodo : elsetodo which is

Re: [Haskell-cafe] do {x-[1,2,3]; True - return (odd x); return x}.. why? (do notation, monads, guards)

2006-01-08 Thread Marc Weber
On Sun, Jan 08, 2006 at 12:19:40PM +0300, Bulat Ziganshin wrote: Hello Marc, Sunday, January 08, 2006, 3:19:56 AM, you wrote: MW list2=do { x - [1,2,3]; guard (odd x); return x} -- - provided by xerox list3 = [ x | x - [1,2,3], odd x] list4= take 2 $ [2*x+1,x-[0..]] ;-) Hi Bulat.. Thanks

Re: [Haskell-cafe] Is there a notion for identity?

2006-01-08 Thread Marc Weber
On Sun, Jan 08, 2006 at 12:43:31PM +0100, Tim Walkenhorst wrote: {- Disclaimer: I'm rather new to Haskell and completely new to this board. I may not use the correct terminology in all cases, but I hope my intention becomes clear when you have a look at the code-snippets. -} Hey

[Haskell-cafe] do {x-[1,2,3]; True - return (odd x); return x}.. why? (do notation, monads, guards)

2006-01-07 Thread Marc Weber
Here is a simple program implementing the above function in 4 different ways.. See my comments to get to know where I have problems: -- begin test.hs -- module Main where import IO import Control.Monad.List {- list1,2 are both implementations of the same function f=[1,3] ;-)

[Haskell-cafe] expanding do notation / StateMonad example from tutorial all about monads

2005-12-31 Thread Marc Weber
Hi.. I'm still struggling with monads ;-) In the tutorial All about monads there is the function getOne used: getOne:: (Random a) = (a,a) - State StdGen a getOne bound = do g -get (x,g')= return $ randomR bounds g put g' return x In the

[Haskell-cafe] newbe/ hdirect/ windows/ com how to compile?

2005-10-13 Thread Marc Weber
Hi. I now get the errror that the module NativeInfo is in the project hdirect and in the library lang of ghc. Removing the files from the hdirect project resulted in a ld error Main_16 not found (don't remember exactly).. If you use hdirect on win succesfully, can you tell me which ghc/ hdirect

<    1   2   3