OK, so here's an interesting problem...
I've been coding away all day, but now my program is doing something
slightly weird. For a specific input, it summarily terminates. The
registered exception handler does not fire. There is no output to stdout
or stderr indicating what the problem is. It
On Sat, Jun 20, 2009 at 8:29 AM, Andrew Coppin
andrewcop...@btinternet.com wrote:
OK, so here's an interesting problem...
I've been coding away all day, but now my program is doing something slightly
weird. For a specific input, it summarily terminates. The registered
exception handler
Alexander Dunlap wrote:
On Sat, Jun 20, 2009 at 8:29 AM, Andrew Coppin
andrewcop...@btinternet.com wrote:
OK, so here's an interesting problem...
I've been coding away all day, but now my program is doing something slightly
weird. For a specific input, it summarily terminates. The
Really, without code or more than it just disappears, it's just
conjecture what's happening. Can you post the code, or even better yet
a minimized case that reproduces it?
-Ross
On Jun 20, 2009, at 1:34 PM, Andrew Coppin wrote:
Alexander Dunlap wrote:
On Sat, Jun 20, 2009 at 8:29 AM,
Hello,
I am designing a type inference algorithm for a language with
arbitrary function overloading. For various reasons (beyond the scope
of this email), it's impossible to know the full type of an overloaded
function, so each function is assigned a unique primitive type and the
inference
Moreover, copying is not even meaningful in a functional setting. A data
structure is indistinguishable from a copy of the data structure. In
languages that allow mutation of data, one has to carefully copy data to
avoid accidental mutation by other computations. Disallow data mutation,
and the
I (too) often find myself writing code such as this:
if something
then putStrLn howdy there!
else if somethingElse
then putStrLn howdy ho!
else ...
I recall reading some tutorial about how you can use the Maybe monad
if your code starts looking like this, but as you can
could someone explain sharing?
In the code below, allstrings2 is 6X as fast as allstrings. I assume
because of sharing, but I don't intuitively see a reason why.
can someone give me some pointers, perhaps using debug.trace or other
tools (profiling?) to show where the first version is being
Well, I'm hardly the one knowing GHC internals, but...
In allstrings you continue calling strings with same arguments again
and again. Don't fool yourself, it's not going to automagically
memorize what you were doing before. In fact, I'd expect much more
speed loss. If you increase your
Deniz Dogan wrote:
I (too) often find myself writing code such as this:
if something
then putStrLn howdy there!
else if somethingElse
then putStrLn howdy ho!
else ...
[...]
So how do I make code like this prettier?
If it's a function, you can use guards:
foo
At Sat, 20 Jun 2009 20:45:16 +0200,
Stephan Friedrichs wrote:
If it's a function, you can use guards:
foo :: ...
foo something somethingElse
| something - putStrLn howdy there!
| somethingElse - putStrLn howdy ho!
| otherwise - ...
You can also artificially introduce
On Sat, Jun 20, 2009 at 1:05 PM, Deniz Dogandeniz.a.m.do...@gmail.com wrote:
I (too) often find myself writing code such as this:
if something
then putStrLn howdy there!
else if somethingElse
then putStrLn howdy ho!
else ...
I recall reading some tutorial about how you
On Saturday 20 June 2009, Andrew Coppin wrote:
OK, so here's an interesting problem...
I've been coding away all day, but now my program is doing something
slightly weird. For a specific input, it summarily terminates. The
registered exception handler does not fire. There is no output to
The when and unless functions might come in handy too (both have type
forall (m :: * - *). (Monad m) = Bool - m () - m ())
On Sat, Jun 20, 2009 at 2:05 PM, Deniz Dogandeniz.a.m.do...@gmail.com wrote:
I (too) often find myself writing code such as this:
if something
then putStrLn howdy there!
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
Ok, we now have 3 people with createaccount:
http://haskell.org/haskellwiki/?title=Special%3AListusersgroup=createaccountusername=
myself
byorgey
Magnus
(Neil Mitchell and Don Stewart having not accepted/declined in this thread.)
Does anyone
Antoine Latter wrote:
On Sat, Jun 20, 2009 at 1:05 PM, Deniz Dogandeniz.a.m.do...@gmail.com wrote:
I (too) often find myself writing code such as this:
if something
then putStrLn howdy there!
else if somethingElse
then putStrLn howdy ho!
else ...
I recall reading some
Marcin Kosiba wrote:
On Saturday 20 June 2009, Andrew Coppin wrote:
OK, so here's an interesting problem...
I've been coding away all day, but now my program is doing something
slightly weird. For a specific input, it summarily terminates. The
registered exception handler does not fire.
Use 1. You'll probably need a monad in the type checker soon or later
anyway, e.g., for handling errors.
On Sat, Jun 20, 2009 at 7:57 PM, Geoffrey Irvingirv...@naml.us wrote:
Hello,
I am designing a type inference algorithm for a language with
arbitrary function overloading. For various
Did you try running it in some debugger, like windbg or VS?
2009/6/20 Andrew Coppin andrewcop...@btinternet.com:
Marcin Kosiba wrote:
On Saturday 20 June 2009, Andrew Coppin wrote:
OK, so here's an interesting problem...
I've been coding away all day, but now my program is doing something
On Jun 20, 2009, at 14:05 , Deniz Dogan wrote:
if something
then putStrLn howdy there!
else if somethingElse
then putStrLn howdy ho!
else ...
FWIW, when I see this I generally start looking for a higher order way
to express it. The monoid instance for lists can be a good
I'd like to announce a small library newly on hackage:
haskeline-class
http://hackage.haskell.org/package/haskeline-class
Haskeline is an easy to use library, with a reasonable interface. The
one quirk that got in my way was that its 'InputT' monad transformer
defined its own instance of
Thomas Hartman wrote:
could someone explain sharing?
In the code below, allstrings2 is 6X as fast as allstrings. I assume
because of sharing, but I don't intuitively see a reason why.
can someone give me some pointers, perhaps using debug.trace or other
tools (profiling?) to show where the
Thomas Hartman wrote:
could someone explain sharing?
A good tool for visualising the difference between shared and non-shared
results would be vacuum, using one of its front ends, vacuum-cairo or
vacuum-ubigraph.
http://hackage.haskell.org/package/vacuum
23 matches
Mail list logo