2

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

qrest
  • 3,083
  • 3
  • 25
  • 26

1 Answers1

4

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

Thomas M. DuBuisson
  • 64,245
  • 7
  • 109
  • 166
  • 1
    @qrest: so accept TomMD's answer by clicking on that V thing to the left – yairchu Jul 26 '10 at 23:32
  • 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. – Thomas M. DuBuisson Aug 03 '10 at 14:56