Merge pull request #686 from Tarrasch/fixes-to-tutorial
Fixes to tutorial (Client.lhs file)
This commit is contained in:
commit
16cb26608d
1 changed files with 4 additions and 3 deletions
|
@ -27,8 +27,8 @@ Also, we need examples for some domain specific data types:
|
||||||
|
|
||||||
``` haskell
|
``` haskell
|
||||||
data Position = Position
|
data Position = Position
|
||||||
{ x :: Int
|
{ xCoord :: Int
|
||||||
, y :: Int
|
, yCoord :: Int
|
||||||
} deriving (Show, Generic)
|
} deriving (Show, Generic)
|
||||||
|
|
||||||
instance FromJSON Position
|
instance FromJSON Position
|
||||||
|
@ -107,6 +107,7 @@ data BaseUrl = BaseUrl
|
||||||
{ baseUrlScheme :: Scheme -- ^ URI scheme to use
|
{ baseUrlScheme :: Scheme -- ^ URI scheme to use
|
||||||
, baseUrlHost :: String -- ^ host (eg "haskell.org")
|
, baseUrlHost :: String -- ^ host (eg "haskell.org")
|
||||||
, baseUrlPort :: Int -- ^ port (eg 80)
|
, baseUrlPort :: Int -- ^ port (eg 80)
|
||||||
|
, baseUrlPath :: String -- ^ path (eg "/a/b/c")
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -135,7 +136,7 @@ run = do
|
||||||
Here's the output of the above code running against the appropriate server:
|
Here's the output of the above code running against the appropriate server:
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
Position {x = 10, y = 10}
|
Position {xCoord = 10, yCoord = 10}
|
||||||
HelloMessage {msg = "Hello, servant"}
|
HelloMessage {msg = "Hello, servant"}
|
||||||
Email {from = "great@company.com", to = "alp@foo.com", subject = "Hey Alp, we miss you!", body = "Hi Alp,\n\nSince you've recently turned 26, have you checked out our latest haskell, mathematics products? Give us a visit!"}
|
Email {from = "great@company.com", to = "alp@foo.com", subject = "Hey Alp, we miss you!", body = "Hi Alp,\n\nSince you've recently turned 26, have you checked out our latest haskell, mathematics products? Give us a visit!"}
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue