
Hi, I have some code that just says <<loop>> when it's run. I found a FAQ that says something about finalizers, but I'm not using those (at least not consciously). Here is my main: import qualified Data.ByteString.Lazy.Char8 as L main = do ls <- liftM L.lines $ L.readFile "output.txt" mapM_ (print . score . readUArray . L.words) ls ... and the types of some other pieces (I'm not sure how much you care to see) score :: (IArray a Double) => a Int Double -> Double readUArray :: [Data.ByteString.Lazy.ByteString] -> UArray Int Double Is this a bug, or am I doing something wrong? Thanks! -- Chad Scherrer "Time flies like an arrow; fruit flies like a banana" -- Groucho Marx

Hi,
I have some code that just says <<loop>>
This behaviour is also caused by black holes, for example: main = let x = x + 5 in print x gives this same error. Note that the value of x depends on the value of x. Hence you get a circular problem, which would non-terminate, but the compiler can spot this self-dependance and says <<loop>> instead. Maybe one of your two other functions have this problem? Thanks Neil

Yep, it was buried in the matrix inversion. Thanks!
On 7/20/06, Neil Mitchell
Hi,
I have some code that just says <<loop>>
This behaviour is also caused by black holes, for example:
main = let x = x + 5 in print x
gives this same error. Note that the value of x depends on the value of x. Hence you get a circular problem, which would non-terminate, but the compiler can spot this self-dependance and says <<loop>> instead.
Maybe one of your two other functions have this problem?
Thanks
Neil
-- Chad Scherrer "Time flies like an arrow; fruit flies like a banana" -- Groucho Marx
participants (2)
-
Chad Scherrer
-
Neil Mitchell