clash-compiler
clash-compiler copied to clipboard
Malformed haddock in `clash-prelude`
The API documentation for head
and tail
for the current stable version of Clash is slightly malformed, resulting in the documentation being rendered badly. I see:
Looking at the source, the functions causing problems attempt to use the preprocessor to change what is displayed:
{- | Extract the first element of a vector
>>> head (1:>2:>3:>Nil)
1
#if __GLASGOW_HASKELL__ >= 900
>>> head Nil
<BLANKLINE>
<interactive>:...
• Couldn't match type ‘1’ with ‘0’
Expected: Vec (0 + 1) a
Actual: Vec 0 a
• In the first argument of ‘head’, namely ‘Nil’
In the expression: head Nil
In an equation for ‘it’: it = head Nil
#else
>>> head Nil
<BLANKLINE>
<interactive>:...
• Couldn't match type ‘1’ with ‘0’
Expected type: Vec (0 + 1) a
Actual type: Vec 0 a
• In the first argument of ‘head’, namely ‘Nil’
In the expression: head Nil
In an equation for ‘it’: it = head Nil
#endif
-}
That is caused by https://github.com/haskell/haddock/issues/1382