After installing the Haskell extension for VSCode in Windows 10, I kept getting an error message that included the text:
user specified .o/.so/.DLL could not be loaded (addDLL: pthread or dependencies not loaded. (Win32 error 5)) Whilst trying to load: (dynamic) pthread
This StackOverflow question gave me the correct answer.
I found C:\Windows\System32\pthread.dll and changed its permissions to allow my user read and execute access. By default it was only available to administrators for some reason, and completely blocked for everyone else.
After changing this, the Haskell extension started working perfectly.