I added flycheck onto the list `package-selected-packages` and ran `(package-install-selected-packages)` after reopening Emacs:
(setq package-selected-packages
'(use-package
lsp-mode
lsp-ui
lsp-treemacs
dap-mode
company-mode
flycheck
prism
aggressive-indent
haskell-mode
lsp-haskell))
Then, I added this to my init.el (I use use-package):
(use-package flycheck
:init
(global-flycheck-mode))
However, even after doing that, when I open Emacs, I still get this error:
Error (use-package): flycheck/:init: Symbol’s function definition is void: global-flycheck-mode
It's strange, because even though I installed flycheck, the function seems to be undefined. The use-package configuration is what they recommend on their [website](https://www.flycheck.org/en/latest/user/installation.html#package-installation), as well (scroll to find the use-package section), so I don't think the problem is calling `(global-flycheck-mode)`.
Does anyone have tips for what I should do next?