Simon Marlow:
Strictly speaking, you can't "evaluate" a value of type (IO a) and
have it perform some I/O operations. In fact, there's no way to
perform an IO computation in Haskell other than binding it to a
value called 'Main.main',
compiling and running it. (*)
Pablo E. Martinez
Well, I see what you mean, no way, NO means, etc. So, the
program below
in Hugs would not work as it should? Too bad...
-- ===
-- ioio.hs
dump f = readFile f = putStr
gimmeThat = dump "ioio.hs"
-- ===
Well, pedantically speaking
| Why not do what python does?
Thanks for an interesting suggestion, Alex!
However, we are in typo-fixing mode here. In the
interests of helping this discussion converge I'm
going to exercise my dictatorial powers. Though Alex's
suggestion has its attractions, I judge it too big a change
to
I permitted myself to protest (veeery mildly) against some very strict
statements concerning a non-strict language, of S. Marlow and
P.E. Martinez Lopez:
In fact, there's no way to perform an IO computation in Haskell
other than binding it to a value called 'Main.main', compiling
and
I posted this to comp.lang.functional a while ago but (apparently) no one
had an opinion which
I cant believe is the case :-)
Chris
I would be interested to know people's views on adding reflection to Haskell
to get Factory-like behaviour.
I was thinking that other modules could "export"
By reflection I mean the sort of thing Java does in java.lang.reflect
i.e. given the name/type of a function we can retrieve that function and
subsequently use it
in the same way that in java given the name of a class we can create
instances of that class.
i.e. it is quite common to have
Sven Panne wrote:
Just a thought: Some compilers for other languages (e.g. Java and
Eiffel) warn the user about deprecated features, but continue
compilation. Given the current state of flux in the Haskell libraries,
this would be a nice thing in Haskell, too. So my suggestion is a new
Chris Okasaki wrote:
For the people that share this sentiment, can you please
explain why ints that are too big should not similarly
give an error? I can see both being ok, or both being
errors. I just don't see why one should be ok and the
other an error.
IMHO, both should be errors.
On Tue, 25 Jan 2000, Chris Okasaki wrote:
I'm with the option (B): negatives are just outside
the domain of takedrop, and should give you an error
message.
For the people that share this sentiment, can you please
explain why ints that are too big should not similarly
give an error?
On Tue, 25 Jan 2000, D. Tweed wrote:
Oops, fixing two thinko's
f _ [] = []
f a xs =res:f a' zs
(ys,zs)=splitAt 40 xs
(a',res)=doStuff a ys
(My haskell coding is getting worse than my C++, which I didn't believe
possible...)
Chris Angus wrote:
| and values could be requested from it a la...
|
| lookup :: a - Name - Maybe a
|
| Where the initial "a" is needed to make it all typesafe
I don't understand why this extra argument is needed.
| Reflect.lookup (bot::String - IO Image) (makeFnName name)
If it is
Hello everybody,
The concept of reflection can also be taken further than Chris' idea, which
is fairly useful in it's own right, but could possibly be achieved by some
smart FFI-wizard (not sure, this idea just popped into my head).
What I'm getting at is some kind of way to get your hands on
Phil Wadler writes:
| I'm with Jon Fairbairn on this. Negative arguments are an error
| because the domain of take and drop is the naturals. The problem
| is that we use Int to represent naturals. -- P
|
| For the people that share this sentiment, can you please
| explain why ints that are
I'm with Jon Fairbairn on this. Negative arguments are an error
because the domain of take and drop is the naturals. The problem
is that we use Int to represent naturals. -- P
Yep, this is exactly the same argument we had about this
a year or two ago, Phil. My attitude about the "implicit
Chris Angus wrote:
Put simply
What do people think about being able to access functions from other modules
without
importing the module.
i.e. Rather than
---Start-
import Foo
-- call f
callFoof x = f x
--End
We can do
Chris, I admit your argument about symmetry is attractive.
If you could put forward a concrete application, on a par with
the `break into blocks' application given earlier, you would
likely sway me. -- P
As an implementor of eager haskell, I sometimes think it would be nice
if all list functions checked the length of their argument, thus
stamping out infinite lists forever!
In al seriousness, the prelude functions should support a lazy
programming style as far as is possible. I found the "split
Chris Okasaki writes:
| But if the type *says* Int, then it should have reasonable behavior
| for ints. I look at the negative case as being equivalent to
| standard mathematical treatment of ranges such as i..j, where the
| range is considered to be empty if j i. Allowing take/drop to
|
(sorry, can't remember the original author)
| The correct definitions would be:
|
| take -2 -- drops the last 2 elements from the list
| (takes everything except the last 2 elements)
| drop -2 -- grabs the last 2 elements from the list
| (drops everything except
Tue, 25 Jan 2000 12:14:29 -0500 (EST), Chris Okasaki [EMAIL PROTECTED] pisze:
I would have no arguments with either approach, or with any other
approach that makes Nat explicit in the type.
But if the type *says* Int, then it should have reasonable behavior
for ints.
I can't agree with
Tue, 25 Jan 2000 18:12:32 +0100, jwit [EMAIL PROTECTED] pisze:
What I'm getting at is some kind of way to get your
hands on an abstract syntax representation of a Haskell
expression/datatype/module, modifying it, re-typechecking it,
and then transforming it back into a Haskell value.
In
On Wednesday, January 26, 2000 9:12 AM, Joe Fasel [SMTP:[EMAIL PROTECTED]] wrote:
The call some have made for the tightest possible error
checking also has merit, however. That would suggest
these definitions:
takeExactly 0 _ = []
takeExactly (n+1) (x:xs) = x : takeExactly n xs
Hi.
For H98, I prefer option (A). Option (B) gives an arbitrary
dissimilarity with rangeSize and enumFromTo. They currently match the
standard mathematical treatment of ranges such as i..j, which Chris
Okasaki mentioned. I'm not saying that they're sacred, just that a
shift to the style of
Brian Boutel [EMAIL PROTECTED] wrote:
We have seen various proposals about what laws should hold wrt
take and drop. I think there is a reasonable presumption that the
following very simple laws should hold first:
length (take n xs) === n
length (drop n xs) === length xs -n
Does that not
Tom Pledger [EMAIL PROTECTED] wrote:
Craig Dickson writes:
[...]
I don't want a pattern like "(x:xs)" to match the empty list, which
it presumably would if "head []" and "tail []" did not fail (x and
xs would both be bound to []).
I don't think it would. Patterns involve data
On 25-Jan-2000, Marcin 'Qrczak' Kowalczyk [EMAIL PROTECTED] wrote:
Tue, 25 Jan 2000 18:12:32 +0100, jwit [EMAIL PROTECTED] pisze:
What I'm getting at is some kind of way to get your
hands on an abstract syntax representation of a Haskell
expression/datatype/module, modifying it,
Chris Okasaki wrote:
I'm with the option (B): negatives are just outside
the domain of takedrop, and should give you an error
message.
For the people that share this sentiment, can you please
explain why ints that are too big should not similarly
give an error? I can see both being
On 25-Jan-2000, Craig Dickson [EMAIL PROTECTED] wrote:
Brian Boutel [EMAIL PROTECTED] wrote:
We have seen various proposals about what laws should hold wrt
take and drop. I think there is a reasonable presumption that the
following very simple laws should hold first:
length (take n
Take a look at what a hard core game programmer thinks about the
evolution of programming languages. Unreal is a very sucessful
game so maybe people listen to him...
http://www.gamespy.com/articles/devweek_b.shtm
You need to read until about page 5 to get to the part I enjoyed most.
--
This discussion feels like deja-vu all over again!
What is wrong with the various generic programming extensions that have
already been discussed? Derive, PolyP and their progeny?
-Alex-
___
S. Alexander Jacobson
On 25-Jan-2000, S. Alexander Jacobson [EMAIL PROTECTED] wrote:
This discussion feels like deja-vu all over again!
What is wrong with the various generic programming extensions that have
already been discussed? Derive, PolyP and their progeny?
I don't think there's anything fundamentally wrong
On 26-Jan-2000, Brian Boutel [EMAIL PROTECTED] wrote:
On Wednesday, January 26, 2000 1:52 PM, Fergus Henderson
[SMTP:[EMAIL PROTECTED]] wrote:
I agree that it is too big a change for Haskell 98.
But I think it would be too big a change for Haskell 2000 too.
Making a change like that
On Fri, 14 Jan 2000, Arjan van IJzendoorn wrote:
So what are the important differences between Clean Haskell?
Input and output in Haskell is done through the use of monads. In Clean
uniqueness typing is used.
Unique (=linear?) types designed for the modelling of the mutable
states.
Last night's build from CVS failed because of the docs:
[...]
+ cd docs
+ make dvi ps html
db2dvi -d /usr/src/packages/BUILD/fptools/docs/fptools-both.dsl installing.sgml
tex output file name is
jade:/var/lib/sgml/CATALOG.docbk31:24:0:W: DTDDECL catalog entries are not
On Tue, Jan 25, 2000 at 10:33:30 +0100, Sven Panne wrote:
Last night's build from CVS failed because of the docs:
[...]
The `-d' option seems strange:
panne@marutea:/usr/src/packages/SOURCES/fptools db2dvi --version
db2dvi - docbook-tools 0.5
Michael Weber wrote:
[...] IIRC, Sven's version is SuSE home-brewed (and incompatible,
of course) [...]
I've just realized the same, and immediately sent a bug report to
SuSE. :-(
Cheers,
Sven
--
Sven PanneTel.: +49/89/2178-2235
LMU, Institut fuer
I wanted to test ghc-pre-4.06 and had made three attempts
per week to
download
http://research.microsoft.com/~simonmar/ghc/snapshot/
ghc-pre-4.06-2117-src.tar.gz
FYI, pre-release snapshots are now available as
Simon Marlow wrote:
via netscape program.
After 1-2 hours it gets about 50% of the file and than
somewhat breaks,
gets out of downloading to the main menu.
There is much of the free space on the disk.
Earlier, when ghc-4.04 appeared, I downloaded it successfully
by the same
38 matches
Mail list logo