Taral [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in
gmane.comp.lang.haskell.cafe:
On Sat, Feb 23, 2008 at 1:05 AM, [EMAIL PROTECTED] wrote:
reset ((\x - x + x) (shift f f))
This one doesn't typecheck, since you can't unify the types (a - r) and r.
Some type systems for
On Fri, 2008-02-22 at 14:27 -0800, Taral wrote:
On 2/22/08, Taral [EMAIL PROTECTED] wrote:
reset :: (Prompt r - r) - r
shift :: Prompt r - ((a - _) - r) - a
The point of the question is about shift/reset with *these types*. I
know there are implementations with other types.
Nothing
On 2/22/08, Taral [EMAIL PROTECTED] wrote:
reset :: (Prompt r - r) - r
shift :: Prompt r - ((a - _) - r) - a
The point of the question is about shift/reset with *these types*. I
know there are implementations with other types.
--
Taral [EMAIL PROTECTED]
Please let me know if there's any
On 2/22/08, Derek Elkins [EMAIL PROTECTED] wrote:
Nothing but sanity is stopping you. If you make a new language, you can
do whatever you like. However, with shift and reset you can represent
any effect, so you would utterly lose purity.
Can you give an example of an impure function
On Fri, 2008-02-22 at 15:13 -0800, Taral wrote:
On 2/22/08, Derek Elkins [EMAIL PROTECTED] wrote:
Nothing but sanity is stopping you. If you make a new language, you can
do whatever you like. However, with shift and reset you can represent
any effect, so you would utterly lose purity.
On 2/22/08, Derek Elkins [EMAIL PROTECTED] wrote:
shift and reset
I was under the impression that reset was a pure function. What side
effects does it have?
--
Taral [EMAIL PROTECTED]
Please let me know if there's any further trouble I can give you.
-- Unknown
On Fri, 2008-02-22 at 19:04 -0800, Taral wrote:
On 2/22/08, Derek Elkins [EMAIL PROTECTED] wrote:
shift and reset
I was under the impression that reset was a pure function. What side
effects does it have?
It depends on how you define pure function. It's not particularly
relevant and I
On 2/22/08, Taral [EMAIL PROTECTED] wrote:
shift :: Prompt r - ((a - _) - r) - a
(Where _ is either r or forall b. b)
It occurs to me that _ has to be r, otherwise the subcontinuation can escape.
--
Taral [EMAIL PROTECTED]
Please let me know if there's any further trouble I can give you.