Why is the bracket function called bracket?
I assume it has to do with the type signature syntax; brackets are used in the type signature to denote a function. Lets see the type signature of function map:
map :: (a -> b) -> [a] -> [b]
The first parameter of map is a function.
Now, let's have a look at bracket on Hackage.
bracket:: IO a -> (a -> IO b) -> (a -> IO c) -> IO c
Bracket: https://hackage.haskell.org/package/base-4.16.0.0/docs/Control-Exception.html#v:bracket
Okay I get it, the parameters of bracket are functions with IO actions.
Examples on Hackage use bracket like this:
bracket
(openFile "filename" ReadMode)
(hClose)
(\fileHandle -> do { ... })
After contemplating for a while I considered the name "bracket" not favorable.
I would say "performResourceSafely" would be a better fit.
So I ask again: Why is the bracket function called bracket?