[Add documentation and appropriate warnings to Jhc.Hole
John Meacham <john@repetae.net>**20060218130217] hunk ./lib/Jhc/Hole.hs 1
+-- | this module provides a once-updatable value that may be used in pure code.
+-- it is an _unchecked_ error to read a hole before it has been filled in.
+-- filling in a hole has the effect of 'seq'ing its value immediatly so lift it in
+-- a datatype if this is an issue.
+--
+-- this module should not be used unless you really know what you are doing.
+-- incorrect usage may result in memory corruption.
hunk ./lib/Jhc/Hole.hs 9
-module Jhc.Hole(Hole,newHole,fillHole,readHole) where
+module Jhc.Hole(Hole(),newHole,fillHole,readHole) where
hunk ./lib/Jhc/Hole.hs 15
-
-
hunk ./lib/Jhc/Hole.hs 19
-
-
-foreign import primitive newHole__  :: World__ -> (World__,Hole a)
-foreign import primitive fillHole__ :: Hole a -> a -> World__ ->World__
-
+-- | create a new hole containing a garbage value. must not be read until it has been filled.
hunk ./lib/Jhc/Hole.hs 24
+-- | it is an unchecked error to fill in the same hole more than once.
hunk ./lib/Jhc/Hole.hs 29
+foreign import primitive newHole__  :: World__ -> (World__,Hole a)
+foreign import primitive fillHole__ :: Hole a -> a -> World__ ->World__
+