Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #135 from slamdata/dequalify-header-fns
Remove name prefixes for Header module functions
- Loading branch information
Showing
4 changed files
with
26 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,17 @@ | ||
module Affjax.ResponseHeader | ||
( ResponseHeader() | ||
, responseHeader | ||
, responseHeaderName | ||
, responseHeaderValue | ||
) where | ||
module Affjax.ResponseHeader where | ||
|
||
import Prelude | ||
|
||
data ResponseHeader = ResponseHeader String String | ||
|
||
responseHeader :: String -> String -> ResponseHeader | ||
responseHeader field value = ResponseHeader field value | ||
|
||
instance eqResponseHeader :: Eq ResponseHeader where | ||
eq (ResponseHeader h1 v1) (ResponseHeader h2 v2) = h1 == h2 && v1 == v2 | ||
derive instance eqResponseHeader :: Eq ResponseHeader | ||
derive instance ordResponseHeader :: Ord ResponseHeader | ||
|
||
instance showResponseHeader :: Show ResponseHeader where | ||
show (ResponseHeader h v) = "(ResponseHeader " <> show h <> " " <> show v <> ")" | ||
|
||
responseHeaderName :: ResponseHeader -> String | ||
responseHeaderName (ResponseHeader h _) = h | ||
name :: ResponseHeader -> String | ||
name (ResponseHeader h _) = h | ||
|
||
responseHeaderValue :: ResponseHeader -> String | ||
responseHeaderValue (ResponseHeader _ v) = v | ||
value :: ResponseHeader -> String | ||
value (ResponseHeader _ v) = v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters