As far as referential transparency is concerned, you'd need to keep
your reference levels straight, which can seem confusing if you can
only communicate via representations(*:-)
That came out more confusing than it needs to be, so let me try that
again, from scratch:
Reduction systems take
Subject: Re: [Haskell-cafe] Overriding a Prelude function?
To: michael rice nowg...@yahoo.com
Cc: Ross Mellgren rmm-hask...@z.odi.ac, Dan Weston
weston...@imageworks.com, haskell-cafe@haskell.org
haskell-cafe@haskell.org
Date: Wednesday, April 22, 2009, 5:02 PM
On Wed
*Main :t rollDie ~ (rollDie ~ rollDie)
rollDie ~ (rollDie ~ rollDie) :: Seed - (Int, Seed)
This is a function. How exactly do you want ghci to show it? When you
figure that out, feel free to make an instance of Show for it.
Just because user programs can't show function internals (they can
On 23 Apr 2009, at 23:07, Claus Reinke wrote:
*Main :t rollDie ~ (rollDie ~ rollDie)
rollDie ~ (rollDie ~ rollDie) :: Seed - (Int, Seed)
This is a function. How exactly do you want ghci to show it? When
you figure that out, feel free to make an instance of Show for it.
Just because user
On Thu, Apr 23, 2009 at 1:34 PM, Miguel Mitrofanov miguelim...@yandex.ruwrote:
Well, than, what would you expect from this:
let {f x = g x;
g 0 = 0;
g n = f (n-1)}
in show f
Well, not show, because any show instance for functions breaks r.t. But the
interactive interpreter, if
Well, than, what would you expect from this:
let {f x = g x;
g 0 = 0;
g n = f (n-1)}
in show f
Well, not show, because any show instance for functions breaks r.t. But the
interactive interpreter, if it is not subject to r.t., might show:
let { f x = g x;
g 0 = 0;
g n = f
I've been working through this example from:
http://en.wikibooks.org/wiki/Haskell/Understanding_monads
I understand what they're doing all the way up to the definition of (), which
duplicates Prelude function (). To continue following the example, I need to
know how to override the Prelude ()
I think
import Prelude hiding (())
does that.
-Ross
On Apr 22, 2009, at 11:44 AM, michael rice wrote:
I've been working through this example from:
http://en.wikibooks.org/wiki/Haskell/Understanding_monads
I understand what they're doing all the way up to the definition of
(), which
You can try at the top
Import Prelude hiding ()
On Wed, Apr 22, 2009 at 10:44 AM, michael rice nowg...@yahoo.com wrote:
I've been working through this example from:
http://en.wikibooks.org/wiki/Haskell/Understanding_monads
I understand what they're doing all the way up to the definition of
Be aware that the do unsugars to (Prelude.), not your (), even if
you hide (Prelude.):
import Prelude hiding (())
m f = error Call me!
main = putStrLn . show $ do [3,4]
[5]
The desugaring of the do { [3,4]; [5] } is (Prelude.) [3,4] [5] =
[5,5], whereas you might
True enough -- if you really want to redefine the monadic operator,
you have to use
{-# LANGUAGE NoImplicitPrelude #-}
import Prelude hiding ((), (=), return)
or something like it, although Michael's example didn't appear to be
going quite that far.
-Ross
On Apr 22, 2009, at 12:37 PM,
You can hide () from the implicit import of Prelude using:
import Prelude hiding (())
Kind regards,
Thomas
michael rice wrote:
I've been working through this example from:
http://en.wikibooks.org/wiki/Haskell/Understanding_monads
I understand what they're doing all the way up to the
is unsugar?
Thanks in advance for your patience.
Michael
--- On Wed, 4/22/09, Dan Weston weston...@imageworks.com wrote:
From: Dan Weston weston...@imageworks.com
Subject: Re: [Haskell-cafe] Overriding a Prelude function?
To: Ross Mellgren rmm-hask...@z.odi.ac
Cc: michael rice nowg...@yahoo.com
--- On *Wed, 4/22/09, Dan Weston weston...@imageworks.com* wrote:
From: Dan Weston weston...@imageworks.com
Subject: Re: [Haskell-cafe] Overriding a Prelude function?
To: Ross Mellgren rmm-hask...@z.odi.ac
Cc: michael rice nowg...@yahoo.com, haskell-cafe@haskell.org
haskell-cafe@haskell.org
Date
declaration for (Show (Seed - (Int, Seed)))
In a stmt of a 'do' expression: print it
*Main
Michael
--- On Wed, 4/22/09, Luke Palmer lrpal...@gmail.com wrote:
From: Luke Palmer lrpal...@gmail.com
Subject: Re: [Haskell-cafe] Overriding a Prelude function?
To: michael rice nowg...@yahoo.com
Cc
15 matches
Mail list logo