1 {-# LANGUAGE ForeignFunctionInterface #-}
3 module GHC.Environment (getFullArgs) where
10 getFullArgs :: IO [String]
13 alloca $ \ p_argv -> do
14 getFullProgArgv p_argc p_argv
15 p <- fromIntegral `liftM` peek p_argc
17 peekArray (p - 1) (advancePtr argv 1) >>= mapM peekCString
19 foreign import ccall unsafe "getFullProgArgv"
20 getFullProgArgv :: Ptr CInt -> Ptr (Ptr CString) -> IO ()