`(\x -> [x])` has the same polymorphism problem in the context of `OverloadedLists` as `pure`.
`(:[])` is also unsatisfactory. To parse it properly, you need to:
- Know that `:` is only allowed as an operator to prefix data constructors,
- Know that `[]` are not legal operator characters,
- Infer that you're intended to insert a space between the `:` and `[]` to get `(: [])`
- Recognize it as an operator section being used prefix as a normal function
I'm neither an expert nor a lifelong Haskeller, but I have been writing it in some professional capacity for four years now, and the operator section trips me up. I can't imagine less experienced folks find it easy or intuitive. You can't even search for it on hoogle:
https://hoogle.haskell.org/?hoogle=(%3A%5B%5D)
Is `(:[])` a core idiom? I never see it in work code and I've never seen it in Hackage. To check, I grepped my software directory which has all my Haskell code, and got 122 matches of (:[]) over 1,768,231 loc (as given by wc -l **/*.hs).