Skip to content

bug in regEnumKeys (System.Win32.Registry)

The following code throws a segmentation fault:

module Main where

import System.Win32.Registry

listRegistry p = do
    putStrLn $ "HKLM\\" ++ p
    hkey <- regOpenKey hKEY_LOCAL_MACHINE p
    sub_paths <- regEnumKeys hkey
    let full_subs = map ((p ++ "\\") ++) sub_paths
    mapM_ listRegistry full_subs
    
main = do
    mapM_ listRegistry ["SOFTWARE\\JavaSoft"]
Edited by Ian Lynagh -
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information