Test monotonicWordToDouble's monotonicity over the full range of Word64s
[rootstock.git] / Fund.hs
blobcc82ead19307d0f72770dacb78933fb5da4cf70c
1 {-# LANGUAGE OverloadedStrings
2 , TemplateHaskell
3 #-}
4 module Fund where
5 import Data.Text (Text)
6 import Database.Persist.TH (derivePersistField)
8 data IOULine = IOULine
9 { peerAccount :: Text
10 , lineCurrency :: Text
12 deriving (Show, Eq, Ord, Read)
14 data Fund
15 = XRP
16 | IOUFund IOULine
17 deriving (Eq, Ord, Read, Show)
18 derivePersistField "Fund"
20 bitStamp, rippleCN :: Text
21 bitStamp = "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
22 rippleCN = "rnuF96W4SZoCJmbHYBFoJZpR8eCaxNvekK"
24 btcBitstamp, usdBitstamp, cnyRippleCN :: Fund
25 btcBitstamp = IOUFund $ IOULine {peerAccount = bitStamp, lineCurrency = "BTC"}
26 usdBitstamp = IOUFund $ IOULine {peerAccount = bitStamp, lineCurrency = "USD"}
27 cnyRippleCN = IOUFund $ IOULine {peerAccount = rippleCN, lineCurrency = "CNY"}