ve to
insert some check that slows everything down...
At any rate, if I'm right, this bug affects GHC and Hugs. But this code has
surely been around long enough that someone would have found this already?
But there's not a bug in hackage's trac system.
Help!
-- Garrett Mitchener
I'm not familiar with modal logic, but if modalities stack, you might be
able to do something like this.
-- Garrett Mitchener
{-# OPTIONS_GHC -fglasgow-exts #-}
module Test where
data L a
= F | T | Atom Int
| Neg (L a) | And (L a) (L a) | Or (L a) (L a)
| M (L a) -
I run into the problem with test1 all the time: It's accumulating
partially evaluated expressions like this:
1+1+1+1+1+1+...
and filling up memory. Try foldl' instead, and look here:
http://en.wikibooks.org/wiki/Programming:Haskell_List_Processing
Also have a look at this past discussion:
ht
I came up with a system of coloring -- you'll have to view this message as html to see it. You start with the input parameters -- those are green. Anything defined in terms of green is blue. Anything defined in terms of green & blue is purple. Anything defined in terms of green, blue, and purpl
list, as in
let ones = 1:ones
which is perfectly okay. The "loop" in the first example happens
because it starts to evaluate x, and determines that it has to know x
to do the evaluation, but the evalutation of x is already under way.
-- Garrett Mitchener