[Haskell-cafe] Existential problem

2005-03-30 Thread Niklas Broberg
I just can't see why the following code will not type check. I have scaled it down as much as possible: - -- IO with an extra level annotation newtype IO' t a = MkIO' (IO a) -- levels data H data L -- Explicitly recursive continuation type data C t a = forall

Re: Dynamic Source Loading

2004-10-26 Thread Niklas Broberg
describing. You can ask Niklas Broberg about this. Indeed, we have a working server that does runtime loading of HSP pages (i.e. Haskell apps) using hs-plugins. We'll be releasing a first version some time really soon, but if you want a preview just send me a mail. =) /Niklas

Re: setCurrentDirectory and lightweight threads

2004-10-24 Thread Niklas Broberg
What I mean is that if one page wants to change directory using setCurrentDirectory, this change affects all other (lightweight) threads as well, which is not how ordinary system threads works. AFAIK, this _is_ how ordinary system threads work. Hmm, I guess was confused (and is still)

setCurrentDirectory and lightweight threads

2004-10-23 Thread Niklas Broberg
Hello fellow Haskelleers, I've come upon a problem that sort of bites me. I'm writing a multithreaded webserver in which pages are dynamically loaded haskell applications. The main server loop listens for incoming requests and distributes these to request handlers, each running in a separate

Re: [Haskell-cafe] Exceptions

2004-10-01 Thread Niklas Broberg
Alastair Reid wrote: 3. Can I define my own exception types? Sadly, no. There is only one 'exception type'. You can use dynamics and encode new kinds of exceptions as Strings but that isn't very satisfactory. But not at all, allowing you to declare your own exception types is *exactly* what

RE: URI Typeable Data

2004-09-16 Thread Niklas Broberg
Could we possibly have derived instances of Typeable and Data for Network.URI.URI in the 6.3 CVS please? I second this request, and also ask for an instance of Typeable for Control.Concurrent.MVar (and the other Control.Concurrent types as well). /Niklas

[Haskell] Announce: HaRP (Haskell Regular Patterns) version 0.2

2004-09-01 Thread Niklas Broberg
We have released a new version of HaRP. Major updates are: * A revised syntax. * Regular patterns are now non-greedy by default. More information and downloads can be found at http://www.dtek.chalmers.se/~d00nibro/harp/ /Niklas Broberg

RE: [Haskell-cafe] Working with Network

2004-05-23 Thread Niklas Broberg
Marco Righele wrote: Ideally each session would work more or less as follows: do(hdl,hn,pn) - accept socket text - hGetContents hdl inputs - parse text replies - sequence $ map reply inputs sequence $ map (hPrint hdl) replies ... Where parse and reply are IO functions

Re: Prelude/main magicks?

2004-05-19 Thread Niklas Broberg
I wrote: Taking Lava, a hardware description language, as my example, I would argue that many users of Lava don't really care if it's embedded in Haskell or whereever it comes from, they would just use it. lavac Main.hs where lavac is could simply be a script alias of ghc

Re: [Haskell] ANNOUNCE: HaRP (Haskell Regular Patterns) version 0.1

2004-05-16 Thread Niklas Broberg
Dylan Thurston wrote: So I guess that in foo [/ a? 2 b /] = (a,b) the type of a is '[Int]', not 'Maybe Int', right? Aye. If you wanted Maybe Int, you would need to do foo [/ [EMAIL PROTECTED] 2 b /] = (a,b) I wrote: I'm starting to think maybe our context dependent approach to implicit bindings

[Haskell] ANNOUNCE: HaRP (Haskell Regular Patterns) version 0.1

2004-05-15 Thread Niklas Broberg
case of regular patterns for it, for instance [s/ Hello a* /] would be equal to [/ 'H' 'e' 'l' 'l' 'o' ' ' a* /], but this is not yet implemented. Any and all comments are welcome and appreciated, Niklas Broberg, d00nibro[at]dtek.chalmers.se Andreas Farre, d00farre[at]dtek.chalmers.se Chalmers

Re: [Haskell] ANNOUNCE: HaRP (Haskell Regular Patterns) version 0.1

2004-05-15 Thread Niklas Broberg
What about foo [/ (/ 2 (/ a _ /)* 3 /)* /] = a ? What is the type of a here? I think it should be [[Int]]. Not quite, the type of a will be [Int]. The only context dependency of variable types is the difference between linear and non-linear contexts. In linear context, variables have the types

RE: Prelude/main magicks?

2004-05-14 Thread Niklas Broberg
I wrote: | Is there some simple way to make GHC treat our own base library in the same | magic way as the Prelude, so that it is always implicitly available? [...] Simon Peyton-Jones wrote: A -fprelude-is flag would certainly be implementable. The questions are a) Would it be desirable? After

Prelude/main magicks?

2004-05-09 Thread Niklas Broberg
to tell GHC what function must have what type with a command line flag, but is there some other way? Any leads are appreciated, even if they only lead into the source code of GHC... /Niklas Broberg [1] Haskell Server Pages: http://www.dtek.chalmers.se/~d00nibro/hsp

Re: Prelude/main magicks?

2004-05-09 Thread Niklas Broberg
I am currently co-developing a language[1] as an extension to Haskell, by means of a preprocessor to GHC. In this language we want to supply the programmer with a number of functions by default, as with the functions in the GHC Prelude. Is there some simple way to make GHC treat our own

Regular Patterns (RE: [Haskell] regular expression syntax)

2004-02-27 Thread Niklas Broberg
scrutiny some time next week, we just need to do some more alpha-testing first... Comment away! regards, Niklas Broberg, d00nibro[at]dtek.chalmers.se Andreas Farre, d00farre[at]dtek.chalmers.se Chalmers University of Technology [1] Feel free to also visit the project that lead to this spin-off

[Haskell-cafe] Syntactic extensions

2004-02-04 Thread Niklas Broberg
/changed syntax? Or even better, is there anyone out there who has already extended the haskell-src bundle with support for any of them? regards, Niklas Broberg (d00nibro[at]dtek.chalmers.se) _ Add photos to your e-mail with MSN 8. Get 2

RE: type classes, superclass of different kind

2003-12-11 Thread Niklas Broberg
it correctly right away... ;) /Niklas Broberg, d00nibro[at]dtek.chalmers.se _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail ___ Haskell

Re: Haskell Server Pages

2003-11-19 Thread Niklas Broberg
I am part of a project working on an implementation of an HSP system, very much inspired by the paper you mention by Eric Meijer and Daan Leijen. It is our goal to make a complete HSP system with a model for HTML in Haskell, a pre-processor, and a runtime system/plugins for various web servers.

<    1   2   3   4