Essentially, the list syntax is magic and inline. When Haskell was created, lists were considered so versatile and so useful that they deserved special square-bracket syntax to make them easier to use. Therefore, you cannot define your own list type with the same syntax as the built-in [a] , nor can you hide the [] syntax any more than you can hide keywords such as if or where . This does not stop you from defining your own list type by defining conversion functions to and from the type of the built-in list. As others have pointed out, defining list functions for you is not very complicated and quite educational.
Of course, you can also define your own Monad class with an identical signature, and then use it.
source share