Better HN
topnewbestaskshowjobs
Log inSign up

pictureotf

2 karma · joined Dec 30, 2009 (16y ago) · 1 submissions

Submissions

comment 16y ago · link · parent

This says more about your understanding of Haskell than anything else, really.

The GP's example is not a _global_ variable, by the way. Global variables are not really available in Haskell, except if you use unsafePerformIO:

  import System.IO.Unsafe
  {-# NOINLINE global #-}
  global :: IORef Int
  global = unsafePerformIO $ newIORef 0