Simon Marlow [EMAIL PROTECTED] writes:
For unix, there are couple different tacks one could take. The locale
system is standard, and does work, but is ugly and a pain to work
with. In particular, it's another (set of) global variables. And
what do you do with a character not expressible in
On Mon, 10 Jan 2005 17:12:44 -, Simon Marlow [EMAIL PROTECTED] wrote:
Not a problem. Have you looked at the streams proposal?
I've missed most of the discussion on this, so if someone could just
clarify the reasons for a few things I find peculiar:
* Prefixing function names with their
Hello!
I want to create two data types:
a) Purchase, which represents purchase by a customer (two attributes - amount
of
the purchase and rebate, both Double's)
b) Customer, which represents a customer and his/her purchases. This tuple has
two attributes - customer ID and a list of all
Dmitri Pissarenko [EMAIL PROTECTED] writes:
a) How should I define the types of the attributes correctly?
data Purchase = P Double Double
data Customer = C Int [Purchase]
or, if you want named fields:
data Purchase = P { price, rebate :: Double }
data Customer = C { id :: Int,
On 2005-01-10, Simon Marlow [EMAIL PROTECTED] wrote:
- Can you do String I/O in some encoding of Unicode? No Haskell
compiler has support for this yet, and there are design decisions
to be made. Some progress has been made on an experimental
prototype (see recent discussion on this
On 11 January 2005 06:52, Andre Pang wrote:
Is there a Wiki page or URL with the steram proposal?
There is now:
http://www.haskell.org/hawiki/HaskellStreamIO
Simon
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Ben Rudiak-Gould [EMAIL PROTECTED] writes:
http://www.haskell.org/~simonmar/io/System.IO.html
fileRead :: File - FileOffset - Integer - Buffer - IO ()
This is unimplementable safely if the descriptor is read concurrently
by different processes. The current position is shared.
--
__(
On 10 January 2005 10:26, Sebastian Sylvan wrote:
On Mon, 10 Jan 2005 10:30:46 +0100 (MEZ), Henning Thielemann
[EMAIL PROTECTED] wrote:
What I also would like to see is the Haddock documentation
string of a function printed by :info or some other command.
Now _that_ would be truly
Ketil,
Ketil Malde wrote:
Dimitry Golubovsky [EMAIL PROTECTED] writes:
(Did you intend this for the list?)
Yes, and I re-posted similar message on the list.
I think perhaps the answer is all of the above. The functions could
be defined in multiple modules, so that 'ASCII.isSpace' would match
the
On 11 January 2005 09:00, Sebastian Sylvan wrote:
On Mon, 10 Jan 2005 17:12:44 -, Simon Marlow
[EMAIL PROTECTED] wrote:
Not a problem. Have you looked at the streams proposal?
I've missed most of the discussion on this, so if someone could just
clarify the reasons for a few
On 11 January 2005 11:39, Marcin 'Qrczak' Kowalczyk wrote:
Ben Rudiak-Gould [EMAIL PROTECTED] writes:
http://www.haskell.org/~simonmar/io/System.IO.html
fileRead :: File - FileOffset - Integer - Buffer - IO ()
This is unimplementable safely if the descriptor is read concurrently
by
On 07 January 2005 17:10, Malcolm Wallace wrote:
Simon Marlow [EMAIL PROTECTED] writes:
- Can the Char type hold the full range of Unicode characters?
This has been true in GHC for some time, and is now true in
Hugs. I don't think it's true in nhc98 (please correct me if
I'm wrong).
Marcin 'Qrczak' Kowalczyk wrote:
fileRead :: File - FileOffset - Integer - Buffer - IO ()
This is unimplementable safely if the descriptor is read concurrently
by different processes. The current position is shared.
UNIX98 defines function:
extern ssize_t pread (int __fd, void *__buf,
I think this is most welcome... I have the original printed version and
have found it to be of great inspiration at various times.
#g
--
At 18:04 07/01/05 +, you wrote:
I'm happy to announce that my out-of-print 1987 book,
The Implementation of Functional Programming Languages
is now
Okay, I've taken a look (there seems to be some differences between
the web page and the tgz from the wiki - fileGet seems to have
disappeared). I still don't grok much of it, so just ignore me if I'm
being overly naive.
Anyway. Let's see, I can now open a stream from a file by doing:
f
Simon Marlow wrote:
There's a big lock on File. If you want to do truly concurrent reading,
you can make multiple FileInputStreams, each of which has its own file
descriptor (the Unix implementation uses dup(2)).
Original and descriptor returned by dup or dup2 share file pointer.
--
Gracjan
Hello!
I have a function activityIndicator, which has an argument of class Customer
and should return a numeric value.
The module is defined as follows.
module-definition
data Purchase = Purchase { price, rebate :: Double }
deriving (Show, Eq)
data Customer = Customer { id :: Int,
Dmitri Pissarenko [EMAIL PROTECTED] writes:
When I remove the line
activityIndicator :: Customer - Num
What is wrong in the signature above?
Try ':i activityIndicator'?
-kzm
--
If I haven't seen further, it is by standing in the footprints of giants
On 11 Jan 2005, at 14:49, Dmitri Pissarenko wrote:
activityIndicator :: Customer - Num
activityIndicator (Customer id purchases) = length purchases
/module-definition
When I try to load this module into GHCi, I get this error:
Hint: Don't put signatures on functions, then. Instead, let the
Jules,
Hint: Don't put signatures on functions, then. Instead, let the
compiler infer the type for you! If you want to know what the type is,
ask GHCi with :info. And if you think it is helpful documentation, you
can copy-paste the correct signature from ghci into your source code!
Although in
On Tue, 11 Jan 2005, Jules Bean wrote:
Hint: Don't put signatures on functions, then. Instead, let the
compiler infer the type for you! If you want to know what the type is,
ask GHCi with :info. And if you think it is helpful documentation, you
can copy-paste the correct signature from
On 11 January 2005 14:15, Gracjan Polak wrote:
Simon Marlow wrote:
There's a big lock on File. If you want to do truly concurrent
reading, you can make multiple FileInputStreams, each of which has
its own file descriptor (the Unix implementation uses dup(2)).
Original and
Am Dienstag, 11. Januar 2005 16:45 schrieb Henning Thielemann:
On Tue, 11 Jan 2005, Jules Bean wrote:
Hint: Don't put signatures on functions, then. Instead, let the
compiler infer the type for you! If you want to know what the type is,
ask GHCi with :info. And if you think it is helpful
Daniel Fischer writes:
One might replace type signatures with comments, of course, and so convey
better information, but that is more work, hence we poor ignorants will
settle for signatures.
You mean one might add comments _as well as_ type signatures, of
course. The only thing worse than
On Tue, Jan 11, 2005 at 05:47:39PM +0100, Daniel Fischer wrote:
One might replace type signatures with comments, of course, and so convey
better information, but that is more work, hence we poor ignorants will
settle for signatures.
And thinking pessimistically, the comments would be wrong
Dimitry Golubovsky [EMAIL PROTECTED] writes:
|Sebastien's| Marcin's | Hugs
---+---+--+--
alnum | L* N* | L* N*| L*, M*, N* 1
alpha | L*| L* | L* 1
cntrl | Cc| Cc Zl Zp | Cc
digit | N*| Nd
Thanks all for the help!
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Hello!
When programming in an imperative language like Java, unit tests are a very
important development tool IMHO.
I want to try out unit testing in Haskell and wonder what experienced Haskellers
think about unit testing in Haskell in general and the hUnit testing framework
(see URL below) in
Hello!
When programming in an imperative language like Java, unit tests are a
very
important development tool IMHO.
I want to try out unit testing in Haskell and wonder what experienced
Haskellers
think about unit testing in Haskell in general and the hUnit testing
framework
(see URL
On Tue, Jan 11, 2005 at 12:21:35PM -, Simon Marlow wrote:
On 10 January 2005 10:26, Sebastian Sylvan wrote:
On Mon, 10 Jan 2005 10:30:46 +0100 (MEZ), Henning Thielemann
[EMAIL PROTECTED] wrote:
What I also would like to see is the Haddock documentation
string of a function printed
Hello!
I want to learn to create GUIs with Haskell.
Which GUI frameworks can you recommend?
Thanks
Dmitri Pissarenko
--
Dmitri Pissarenko
Software Engineer
http://dapissarenko.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Marcin 'Qrczak' Kowalczyk wrote:
fileRead :: File - FileOffset - Integer - Buffer - IO ()
This is unimplementable safely if the descriptor is read concurrently
by different processes. The current position is shared.
... which is terrible library design, which we should avoid if at all
possible,
You will find this page useful for finding libraries:
http://www.haskell.org/libraries/
As for GUI stuff, I believe wxHaskell is the most actively maintained
toolkit, and probably your best bet.
Alistair.
Hello!
I want to learn to create GUIs with Haskell.
Which GUI frameworks can you
Here is an answer from a newbie at both Haskell and GUI --
I don't think there is a simple answer. It probably depends on your
experience, your development platform, and where you want to be able to
distribute your application to. I would say that wxHaskell is probably a
good choice. It
Hi,
I can recomment wxHaskell [1]
Georg
[1] http://wxhaskell.sourceforge.net/
On Tue, 11 Jan 2005 21:05:43 +0100, Dmitri Pissarenko [EMAIL PROTECTED] wrote:
Hello!
I want to learn to create GUIs with Haskell.
Which GUI frameworks can you recommend?
Thanks
Dmitri Pissarenko
--
Dmitri Pissarenko
Ben Rudiak-Gould [EMAIL PROTECTED] writes:
fileRead can be implemented in terms of OS primitives,
Only if they already support reading from a fixed offset (like pread).
I'm not sure if we can rely on something like this being always
available, or whether it should be emulated using lseek which
On 2005-01-11, Simon Marlow [EMAIL PROTECTED] wrote:
On 11 January 2005 14:15, Gracjan Polak wrote:
Simon Marlow wrote:
There's a big lock on File. If you want to do truly concurrent
reading, you can make multiple FileInputStreams, each of which has
its own file descriptor (the Unix
On 2005-01-11, Keith Wansbrough [EMAIL PROTECTED] wrote:
Daniel Fischer writes:
One might replace type signatures with comments, of course, and so convey
better information, but that is more work, hence we poor ignorants will
settle for signatures.
You mean one might add comments _as well
Aaron Denney [EMAIL PROTECTED] writes:
Does open(/dev/fd/n) or (/proc/self/fd/n) act as dup() or a fresh
open() to underlying file?)
As a dup(), with a side effect of resetting the file pointer to the
beginning.
It would not help anyway: if it's a terminal or pipe, it *has* to act
as a dup()
Marcin 'Qrczak' Kowalczyk wrote:
Ben Rudiak-Gould [EMAIL PROTECTED] writes:
fileRead can be implemented in terms of OS primitives,
Only if they already support reading from a fixed offset (like pread).
I'm not sure if we can rely on something like this being always
available, or whether it should
On Tue, 2005-01-11 at 21:05 +0100, Dmitri Pissarenko wrote:
Hello!
I want to learn to create GUIs with Haskell.
Which GUI frameworks can you recommend?
wxHaskell is good for building portable GUIs. It has an extensive
selection of widgets and has a good API.
gtk2hs is good for building
Marcin 'Qrczak' Kowalczyk [EMAIL PROTECTED] writes:
Dimitry Golubovsky [EMAIL PROTECTED] writes:
[Proposal: ASCII.isDigit is true for '0'..'9', Unicode.isDigit is true
for whatever Unicode defines as digits]
So there might be a bunch of (perhaps autogenerated, from localedef
files) modules
42 matches
Mail list logo