Open
Description
The directional derivative operator du
doesn't seem to handle the simplest case.
$ ghci
GHCi, version 7.6.3: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> :m + Numeric.AD
Prelude Numeric.AD> let f [x0,x1,x2] = [x0*x1^2*x2^3, x0^3*x1^2*x2]
Prelude Numeric.AD> :t f
f :: Num t => [t] -> [t]
Prelude Numeric.AD> :t du f
<interactive>:1:4:
Couldn't match type `[AD
s (Numeric.AD.Internal.Forward.Forward a0)]'
with `AD s (Numeric.AD.Internal.Forward.Forward a0)'
Expected type: [AD s (Numeric.AD.Internal.Forward.Forward a0)]
-> AD s (Numeric.AD.Internal.Forward.Forward a0)
Actual type: [AD s (Numeric.AD.Internal.Forward.Forward a0)]
-> [AD s (Numeric.AD.Internal.Forward.Forward a0)]
In the first argument of `du', namely `f'
In the expression: du f