问题
I started to read about monad transformers and what puzzles me is Control.Monad.CatchIO
's import declaration which I see in many code examples:
import "MonadCatchIO-transformers" Control.Monad.CatchIO (finally)
What does this quoted token mean? I took a look at the Haskell 98 Report's section on import declarations, but this didn't help me understand.
回答1:
Its a package-qualified import, which is a GHC extension. The string is a package name.
See Package-qualified imports, from the ghc docs, for details.
来源:https://stackoverflow.com/questions/4484040/haskell-import-declaration