views:

78

answers:

1

I have the following function:

-- | Exponential moving average.
ema :: (Fractional a) 
    => a   -- ^ Alpha
    -> [a] -- ^ Input data
    -> [a] -- ^ Output
ema alpha xs = scanl1 (\a b -> a+(alpha*(b-a))) xs

Haddock takes the above and generates the following HTML:

ema
:: Fractional a 
=> a    Input data
-> [a]  Output
-> [a]  
Exponential moving average. 

What happened to "Alpha" ?

+3  A: 

You're probably using haddock 2.6.0. Upgrading to 2.7.2 fixes this issue.

TomMD
Erp. That was it. Thanks :)
qrest
@qrest: so accept TomMD's answer by clicking on that V thing to the left
yairchu
Strangely, I have the same issue with 2.7.2...
jetxee
jetxee: On this exact code or just code like it? If you cabal installed haddock then be sure you're actually running the new haddock and not an older one due to the order of your PATH.
TomMD