导入模块的特定成员

Haskell 支持从模块导入项的子集。

import qualified Data.Stream (map) as D

只会从 Data.Stream 导入 map,调用此函数需要 D.:

D.map odd [1..]

否则编译器会尝试使用 Prelude 的 map 函数。