Skip to content

Commit af12aa6

Browse files
authored
Merge pull request #52 from janeymunoz/id-to-identity
Replace 'id' with 'identity' in documentation
2 parents e48b2e9 + ebdfb66 commit af12aa6

File tree

7 files changed

+17
-17
lines changed

7 files changed

+17
-17
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,23 +53,23 @@ Along with these types, you'll want to define an options record that specifies h
5353
options ∷ Record (URIRefOptions UserInfo (HostPortPair Host Port) Path HierPath RelPath Query Fragment)
5454
options =
5555
{ parseUserInfo: pure
56-
, printUserInfo: id
56+
, printUserInfo: identity
5757
, parseHosts: HostPortPair.parser pure pure
58-
, printHosts: HostPortPair.print id id
58+
, printHosts: HostPortPair.print identity identity
5959
, parsePath: pure
60-
, printPath: id
60+
, printPath: identity
6161
, parseHierPath: pure
62-
, printHierPath: id
62+
, printHierPath: identity
6363
, parseRelPath: pure
64-
, printRelPath: id
64+
, printRelPath: identity
6565
, parseQuery: pure
66-
, printQuery: id
66+
, printQuery: identity
6767
, parseFragment: pure
68-
, printFragment: id
68+
, printFragment: identity
6969
}
7070
```
7171

72-
As you can see by all the `pure` and `id`, we're not doing a whole lot here. `parseHosts` is a bit of an exception, but that's just due to the way that case is handled (see [later in this README](#host-parsing) for more details about that).
72+
As you can see by all the `pure` and `identity`, we're not doing a whole lot here. `parseHosts` is a bit of an exception, but that's just due to the way that case is handled (see [later in this README](#host-parsing) for more details about that).
7373

7474
These types ([`UserInfo`][UserInfo], [`HostPortPair`][HostPortPair], [`Host`][Host], etc.) are all provided by the library, and where necessary can only be constructed via smart constructor. This ensures that percent-encoding is applied to characters where necessary to ensure the constructed values will print as valid URIs, and so on.
7575

src/URI/AbsoluteURI.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ type AbsoluteURIParseOptions userInfo hosts path hierPath query r =
8080
-- | when type anotating an options record.
8181
-- |
8282
-- | As a reverse of the parse options, this specifies how to print values back
83-
-- | from custom representations. If this is not necessary, `id` can be used for
83+
-- | from custom representations. If this is not necessary, `identity` can be used for
8484
-- | all the options aside from `printHosts`, which will typically be
85-
-- | `HostPortPair.printHosts id id`. See [`URI.HostPortPair`](../URI.HostPortPair)
85+
-- | `HostPortPair.printHosts identity identity`. See [`URI.HostPortPair`](../URI.HostPortPair)
8686
-- | for more information on the host/port pair printer.
8787
type AbsoluteURIPrintOptions userInfo hosts path hierPath query r =
8888
( printUserInfo userInfo UserInfo

src/URI/Extra/MultiHostPortPair.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ parseRegName' = RegName.unsafeFromString <<< NES.join1With "" <$> NEA.some p
7979
-- |
8080
-- | As a counterpart to the `parser` this function also requires the `Host`
8181
-- | and `Port` components to be printed back from their custom representations.
82-
-- | If no custom types are being used, pass `id` for both of these arguments.
82+
-- | If no custom types are being used, pass `identity` for both of these arguments.
8383
print
8484
host port
8585
. (host Host)

src/URI/Extra/QueryPairs.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ parsePart parseK parseV = do
8787
-- |
8888
-- | As a counterpart to the `parser` this function also requires the `Key`
8989
-- | and `Value` components to be printed back from their custom representations.
90-
-- | If no custom types are being used, pass `id` for both of these arguments.
90+
-- | If no custom types are being used, pass `identity` for both of these arguments.
9191
print
9292
k v
9393
. (k Key)

src/URI/HostPortPair.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ parser parseHost parsePort = do
4848
-- |
4949
-- | As a counterpart to the `parser` this function also requires the `Host`
5050
-- | and `Port` components to be printed back from their custom representations.
51-
-- | If no custom types are being used, pass `id` for both of these arguments.
51+
-- | If no custom types are being used, pass `identity` for both of these arguments.
5252
print
5353
host port
5454
. (host Host)

src/URI/RelativeRef.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ type RelativeRefParseOptions userInfo hosts path relPath query fragment r =
7777
-- | printer.
7878
-- |
7979
-- | As a reverse of the parse options, this specifies how to print values back
80-
-- | from custom representations. If this is not necessary, `id` can be used for
80+
-- | from custom representations. If this is not necessary, `identity` can be used for
8181
-- | all the options aside from `printHosts`, which will typically be
82-
-- | `HostPortPair.printHosts id id`. See [`URI.HostPortPair`](../URI.HostPortPair)
82+
-- | `HostPortPair.printHosts identity identity`. See [`URI.HostPortPair`](../URI.HostPortPair)
8383
-- | for more information on the host/port pair printer.
8484
type RelativeRefPrintOptions userInfo hosts path relPath query fragment r =
8585
( printUserInfo userInfo UserInfo

src/URI/URI.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ type URIParseOptions userInfo hosts path hierPath query fragment r =
8383
-- | when type anotating an options record.
8484
-- |
8585
-- | As a reverse of the parse options, this specifies how to print values back
86-
-- | from custom representations. If this is not necessary, `id` can be used for
86+
-- | from custom representations. If this is not necessary, `identity` can be used for
8787
-- | all the options aside from `printHosts`, which will typically be
88-
-- | `HostPortPair.printHosts id id`. See [`URI.HostPortPair`](../URI.HostPortPair)
88+
-- | `HostPortPair.printHosts identity identity`. See [`URI.HostPortPair`](../URI.HostPortPair)
8989
-- | for more information on the host/port pair printer.
9090
type URIPrintOptions userInfo hosts path hierPath query fragment r =
9191
( printUserInfo userInfo UserInfo

0 commit comments

Comments
 (0)