🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.functional
4 messages
4 total messages Started by Antony J. T. Davie Mon, 27 Jul 1992 08:30
Re: programs that are too lazy
#86
Author: Antony J. T. Davie
Date: Mon, 27 Jul 1992 08:30
17 lines
990 bytes
Julian Seward writes
>I believe the Haskell committee should
>consider the provision of two built-in functions:
>
>   hyperstrict, whnf :: Eq a => a -> b -> b
>
>both of which evaluate their first argument (fully or to whnf)
>and return the second.  We can simulate this at the moment using
>Haskell 1.2, but it might be more efficient if compilers could
>regard these as primitive.

Whether or not one agrees with the provision of these fns., why restrict
them to Eq types? Certainly one can only easily simulate them if they
operate on equality types, but that's no reason to restrict primitive
versions of them so.

Tony Davie
Re: programs that are too lazy
#99
Author: Lennart Augustsson
Date: Tue, 28 Jul 1992 19:48
7 lines
624 bytes
	-- Lennart

-- 

	-- Lennart Augustsson
[This signature is intentionally left blank.]
Re: programs that are too lazy
#109
Author: David Lester
Date: Wed, 29 Jul 1992 09:40
16 lines
987 bytes
In article <1992Jul28.194846.7295@cs.chalmers.se>, augustss@cs.chalmers.se (Lennart Augustsson) writes:
|> 
|> 	-- Lennart
|> 
|> -- 
|> 
|> 	-- Lennart Augustsson
|> [This signature is intentionally left blank.]

Doubtless this article, quoted in its entirety, was generated by an LML
program(mer) that was being too lazy.

---
David Lester, Manchester University, UK.

[ ... but a nice meta-comment anyway, Lennart.]
Re: programs that are too lazy
#105
Author: Lennart Augustsson
Date: Wed, 29 Jul 1992 16:49
34 lines
1760 bytes
Sorry about my last posting, the mailer mangled it.
In article <1992Jul27.083020.6061@st-andrews.ac.uk> ajtd@st-andrews.ac.uk (Antony J. T. Davie) writes:
>Julian Seward writes
>>I believe the Haskell committee should
>>consider the provision of two built-in functions:
>>
>>   hyperstrict, whnf :: Eq a => a -> b -> b
>>
>>both of which evaluate their first argument (fully or to whnf)
>>and return the second.  We can simulate this at the moment using
>>Haskell 1.2, but it might be more efficient if compilers could
>>regard these as primitive.
>
>Whether or not one agrees with the provision of these fns., why restrict
>them to Eq types? Certainly one can only easily simulate them if they
>operate on equality types, but that's no reason to restrict primitive
>versions of them so.
>
There should be some suitable restriction on the values that allow
whnf.  E.g.
	whnf :: (WHNFable a) => a -> b -> b
The function with type a->b->b that evaluates its first argument
and return the second is not definable within lambda calculus.
Having it enables you to distinguish between BOT and \x.BOT,
which are usually regarded as equal.  (whnf BOT 0 --> BOT, but
whnf (\x.BOT) 0 --> 0)

	-- Lennart

-- 

	-- Lennart Augustsson
[This signature is intentionally left blank.]
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads