On Friday, 2003-06-13, 22:06, CEST, Hal Daume III wrote:
> [...]
> Personally, I think this is stupid and that you should be able to compile
> any module with a 'main :: IO a' function as an executable without having to
> call it Main.
> [...]
I would even say that you should be able to use a "m
Keith Wansbrough <[EMAIL PROTECTED]> writes:
> > In article <[EMAIL PROTECTED]>,
> > [EMAIL PROTECTED] (Carl R. Witty) wrote:
> >
> > > Here's a hand-waving argument that you need either Typeable (or
> > > something else that has a run-time concrete representation of types)
> > > or ST/STRef (or
Yes, but there's a problem with this solution. Namely, if Foo.hs takes a
long time to compile, then you can't leverage having already created Foo.o
and Foo.hi when making the Main.
The solution I use is a script that you call like:
ghcmake File
which creates MainXXX.hs (where XXX is a random
Graham Klyne wrote:
> GHC seems to require a 'main' module in a file in order to generate an exe
> file. This makes it awkward to create unit test programs, because I
> generally create one (to run stand-alone) for each major module. Now I
> want to create a "master test" module that runs all th
GHC seems to require a 'main' module in a file in order to generate an exe
file. This makes it awkward to create unit test programs, because I
generally create one (to run stand-alone) for each major module. Now I
want to create a "master test" module that runs all the individual module
test
Keith Wansbrough wrote (snip)
No, because update should not return a new key, it should update the
value of the same key. In other words,
let (m1,k) = insert empty "A"
m2 = update m1 k "B"
in
lookup m2 k
should give "B", not "A", just like with MRefs.
So what does the function
insert2 val
Presumably you need a call to yield or threadDelay or something like that.
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths." | www.isi.edu/~hdaume
On Fri, 13 Jun 2003, Filip wrote:
> Hi,
>
> I have function
> f:: a -> b
>
>
Hi,
I have function
f:: a -> b
and I need something like this:
myaccept:: Socket -> IO ()
myaccept g = do a <- accept g
t <- forkIO (f a)
myaccept g
What to do to have two threads working at the same time. When I am using myaccept,
program is
> Keith wrote (snipped)
> > But George Russell's implementation relied on looking up something in
> > one map with a key obtained from another map. I thought type-safe
> > MRefs should disallow this.
>
> However if you disallow lookup up in one map with a key from another,
> then Ralf Hinze's
On Fri, Jun 13, 2003 at 10:57:21AM -0400, Dean Herington wrote:
> Tomasz Zielonka wrote:
>
> > One can also use Strategies module that comes with GHC (in package
> > concurrent), for example:
>
> Could you tell me more specifically where to find the Strategies module in
> GHC? I couldn't find it
Am Freitag, 13. Juni 2003 17:12 schrieb George Russell:
> Keith wrote (snipped)
>
> > But George Russell's implementation relied on looking up something in
> > one map with a key obtained from another map. I thought type-safe
> > MRefs should disallow this.
>
> However if you disallow lookup up
Keith wrote (snipped)
> But George Russell's implementation relied on looking up something in
> one map with a key obtained from another map. I thought type-safe
> MRefs should disallow this.
However if you disallow lookup up in one map with a key from another,
then Ralf Hinze's solution of puttin
On Fri, Jun 13, 2003 at 10:34:53AM -0400, Dean Herington wrote:
>
> `seq` guarantees only enough evaluation to determine whether its first
> argument is bottom. That's why your commented code reads only the first
> character. You need to evaluate the entire string. As someone else
> suggested,
Niels Reyngoud wrote:
> Hello all,
>
> Thanks for your replies on our previous posts. To avoid the lazy
> behaviour, we tried to write our own IO module "IOExts2" which basically
> redifnes
> readFile, writeFile and appendFile to make sure they use binary-mode and
> strict behaviour. The libary is
On Friday 13 June 2003 3:02 am, John Meacham wrote:
> so, I have been wanting to implement serialize to database functionality
> for haskell in a certain way which may or may not be possible..
>
> what would be nice is if I could dump an entire complex haskell data
> structure (perhaps cyclic, but
On Friday, 2003-06-13, 10:33, CEST, Niels Reyngoud wrote:
> [...]
> To avoid the lazy behaviour, we tried to write our own IO module "IOExts2"
> which basically redifnes readFile, writeFile and appendFile to make sure
> they use binary-mode and strict behaviour. The libary is as follows:
>
> [...]
o~o~o~o~o~o
john, with no particular reference to haskell,
but just generically speaking, this sounds
vaguely similar to what i worked on all
through the 80's in lisp and pascal,
when ut-lisp used to pull a hal 9k
about cyclic d-structures so i had
to start
2003年06月13日(金)の17時53分に Jens Petersen 曰く:
> The latest package is named
> ghc6.0-6.0-1 and there is also a ghc5.04.3-5.04.3-2 package[...] The
> ghc5.04.3 and ghc6.0 can be installed in parallel without conflicts,
Thinking about it more, I realised that of course what is really being
numbered here
> (moderator, can you please include this mail at the bottom of my
> previous mail?)
>
> PS: I think the next example shows pretty well what goes wrong when
> you're not closing the read-handle:
>
> ---
> test = do writeFile' "123.txt" "blaat"
>
> appendFile' "123.txt" " 1"
> z
Post-doctoral Fellowships at Chalmers University
We are seeking one or two postdoctoral research fellows to work at the
Department of Computing Science on the CoVer project (COmbining
VERification methods), a collaboration between the functional
pr
(moderator, can you please include this mail at the bottom of my
previous mail?)
PS: I think the next example shows pretty well what goes wrong when
you're not closing the read-handle:
---
test = do writeFile' "123.txt" "blaat"
appendFile' "123.txt" " 1"
z <- readFile' "123.txt"
Hello all,
Thanks for your replies on our previous posts. To avoid the lazy
behaviour, we tried to write our own IO module "IOExts2" which basically
redifnes
readFile, writeFile and appendFile to make sure they use binary-mode and
strict behaviour. The libary is as follows:
--
module I
> In article <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED] (Carl R. Witty) wrote:
>
> > Here's a hand-waving argument that you need either Typeable (or
> > something else that has a run-time concrete representation of types)
> > or ST/STRef (or something else, probably monadic, that can track
> > uniq
> now. I am pretty sure I can do the demand loading bit with some
> goddawful code (inspired by HOODs internals) using unsafePerformIO and
> Weak pointers in truly nefarious ways. The dumping to the database bit
> is straightforward when working with trees. but I can't figure out a way
> to do it f
Hello,
Recently I have made some further small packaging improvements to the
ghc-6.0 rpms announced earlier. The latest package is named
ghc6.0-6.0-1 and there is also a ghc5.04.3-5.04.3-2 package (using the
same patch as the ghc-5.04.3-1 package for RHL9 made by Andy Moran). The
ghc5.04.3 and gh
25 matches
Mail list logo