Skip to content

Commit 85a561e

Browse files
authored
Merge pull request #75 from eskimor/added-generics
Added some Generic instances
2 parents e779847 + 3dd9027 commit 85a561e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/Network/HTTP/ResponseHeader.purs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@ module Network.HTTP.ResponseHeader
66
) where
77

88
import Prelude
9+
import Data.Generic (class Generic)
910

1011
data ResponseHeader = ResponseHeader String String
1112

13+
derive instance genericResponseHeader :: Generic ResponseHeader
14+
1215
responseHeader :: String -> String -> ResponseHeader
1316
responseHeader field value = ResponseHeader field value
1417

src/Network/HTTP/StatusCode.purs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
module Network.HTTP.StatusCode where
22

33
import Prelude
4+
import Data.Generic (class Generic)
45

56
newtype StatusCode = StatusCode Int
67

8+
derive instance genericStatusCode :: Generic StatusCode
9+
710
instance eqStatusCode :: Eq StatusCode where
811
eq (StatusCode x) (StatusCode y) = x == y
912

0 commit comments

Comments
 (0)