2
votes

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" ?

1

1 Answers

4
votes

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