On Sun, Dec 5, 2010 at 12:45 PM, Lally Singh <lally.si...@gmail.com> wrote: > Is that how it's intended?
I think that's correct, (it at least fits the pattern for 'with' functions in Haskell). They're idiomatically used with syntax like this: > buildReaderFun :: String -> CodeGenModule (Function (IO ())) > buildReaderFun nm = do > puts <- newNamedFunction ExternalLinkage "puts" :: TFunction (Ptr Word8 -> > IO Word32) > withStringNul nm $ \greetz -> createFunction ExternalLinkage $ do > tmp <- getElementPtr greetz (0 :: Word32,(0 :: Word32, ())) > call puts tmp -- Throw away return value. > ret () _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe