典型的Haddock语法允许写这样的东西
-- Initializes local variables so arrays will get defined
--
-- Defer initialization context inside a compound type.
--
initialize :: Bool -- ^ 1st parameter description
-> Type -- ^ 2nd parameter description
-> [Signal] -- ^ 3rd parameter description
-> Structure -- ^ 4th parameter description
-> Doc -- ^ result value desription
initialize _ (MachineVector 1 Pointer{}) = equals <+> text "NULL"
我想用Java方式编写它,在函数签名之前我有参数描述。我有更复杂的签名,所以这种方法破坏了可读性。有没有这样写的方法?
-- Initializes local variables so arrays will get defined
--
-- Defer initialization context inside a compound type.
--
-- ^ 1st parameter description
-- ^ 2nd parameter description
-- ^ 3rd parameter description
-- ^ 4th parameter description
-- ^ result value desription
initialize :: Bool->Type->[Signal]->Structure->Doc
initialize _ (MachineVector 1 Pointer{}) = equals <+> text "NULL"