0
我找不到這事:{ - 再出口 - }在Haskell
module MyModule
(method1
, method2
{- Re-Export -} -- what's this?
, method3(..)
) where
什麼{- Re-Export -}
?
我找不到這事:{ - 再出口 - }在Haskell
module MyModule
(method1
, method2
{- Re-Export -} -- what's this?
, method3(..)
) where
什麼{- Re-Export -}
?
這只是一條評論。它沒有特別的意義。 Haskell使用--
開始單行註釋並使用{- -}
圍繞多行註釋。 GHC有pragmas爲編譯器提供特殊指令,但它們的格式爲{-# word ... #-}
(注意#
)。
順便說一句,導入模塊可以重新導出:
module Foo
(foo
, module Bar
) where
import Bar
foo = "foo"
將同時導出foo
和Bar
內容。
但他們不能再出口合格,正確嗎? –
正確,你不能規定消費模塊是如何限定事物的。 –