import "Prelude" countDown :: Ref Integer -> Boolean countDown r = if currentValue <= 0 then False else do r := currentValue - 1 True where currentValue = getRef r strangeLoop :: ( Boolean) -> () strangeLoop cond = if cond then strangeLoop cond else () main = do r = ref 100000 :: Ref Integer strangeLoop (countDown r) -- ()