never executed always true always false
1 -- GENERATED by C->Haskell Compiler, version 0.28.8 Switcheroo, 25 November 2017 (Haskell)
2 -- Edit the ORIGNAL .chs file instead!
3
4
5 module QuantLib.Index.Equity
6 (
7 EquityIndex
8
9 , equityIndex
10 ) where
11 import qualified Foreign.C.String as C2HSImp
12 import qualified Foreign.C.Types as C2HSImp
13 import qualified Foreign.ForeignPtr as C2HSImp
14 import qualified Foreign.Ptr as C2HSImp
15
16
17 import QuantLib.Internal
18 import QuantLib.Internal.Type
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39 -- |A named equity total-return index, forecasting future fixings from an
40 -- optional risk-free interest rate curve and dividend curve, and an optional
41 -- spot 'QuantLib.Quote.Quote' -- today's fixing is used when no spot is given.
42 -- Historical fixings are added via 'QuantLib.Index.addFixing'. No inspector is bound for
43 -- currency\/interest curve\/dividend curve\/spot: each is a plain, never-mutated echo of this
44 -- constructor's own argument, same shape as the currency\/interest\/dividend\/spot fields on
45 -- 'QuantLib.Index.Commodity.CommodityIndex' -- the caller already holds whatever it passed in.
46 equityIndex :: (String) -- ^name
47 -> (Calendar) -- ^fixingCalendar
48 -> (Currency) -> (Maybe (GenYieldTermStructure y1)) -- ^interest
49 -> (Maybe (GenYieldTermStructure y2)) -- ^dividend
50 -> (Maybe (GenQuote q)) -- ^spot
51 -> IO ((EquityIndex))
52 equityIndex a1 a2 a3 a4 a5 a6 =
53 C2HSImp.withCString a1 $ \a1' ->
54 withCalendar a2 $ \a2' ->
55 withCurrency a3 $ \a3' ->
56 withMaybeYieldTermStructure a4 $ \a4' ->
57 withMaybeYieldTermStructure a5 $ \a5' ->
58 withMaybeQuote a6 $ \a6' ->
59 preErrorCheck $ \a7' ->
60 equityIndex'_ a1' a2' a3' a4' a5' a6' a7' >>= \res ->
61 peekEquityIndex res >>= \res' ->
62 errorCheck a7'>>
63 return (res')
64
65
66
67 -- vim: set ff=unix ts=8 sts=2 sw=2 et:
68
69 foreign import ccall safe "QuantLib/Index/Equity.chs.h qlEquityIndex"
70 equityIndex'_ :: ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.Ptr (CCalendar)) -> ((C2HSImp.Ptr (CCurrency)) -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (CYieldTermStructure')) -> ((C2HSImp.Ptr (CQuote')) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO (C2HSImp.Ptr (CEquityIndex'))))))))))