|
1 | 1 | module Data.URI.Types where |
2 | 2 |
|
3 | 3 | import Prelude |
| 4 | + |
4 | 5 | import Data.Either (Either) |
5 | 6 | import Data.Generic (class Generic) |
6 | 7 | import Data.List (List) |
7 | 8 | import Data.Maybe (Maybe) |
| 9 | +import Data.Newtype (class Newtype) |
8 | 10 | import Data.Path.Pathy (Path, File, Dir, Abs, Rel, Sandboxed, Unsandboxed) |
9 | 11 | import Data.Tuple (Tuple) |
10 | 12 |
|
@@ -76,8 +78,9 @@ derive instance eqRelativeRef ∷ Eq RelativeRef |
76 | 78 | instance showRelativeRef ∷ Show RelativeRef where |
77 | 79 | show (RelativeRef r q f) = "(RelativeRef " <> show r <> " " <> show q <> " " <> show f <> ")" |
78 | 80 |
|
79 | | -derive instance eqURIScheme ∷ Eq URIScheme |
80 | | -derive instance ordURIScheme ∷ Ord URIScheme |
| 81 | +derive instance newtypeURIScheme ∷ Newtype URIScheme _ |
| 82 | +derive newtype instance eqURIScheme ∷ Eq URIScheme |
| 83 | +derive newtype instance ordURIScheme ∷ Ord URIScheme |
81 | 84 | derive instance genericURIScheme ∷ Generic URIScheme |
82 | 85 |
|
83 | 86 | instance showURIScheme ∷ Show URIScheme where |
@@ -109,7 +112,9 @@ instance showHost ∷ Show Host where |
109 | 112 | show (IPv4Address ip) = "(IPv4Address " <> show ip <> ")" |
110 | 113 | show (NameAddress name) = "(NameAddress " <> show name <> ")" |
111 | 114 |
|
112 | | -derive instance eqQuery ∷ Eq Query |
| 115 | +derive instance newtypeQuery ∷ Newtype Query _ |
| 116 | +derive newtype instance eqQuery ∷ Eq Query |
| 117 | +derive newtype instance ordQuery ∷ Ord Query |
113 | 118 |
|
114 | 119 | instance showQuery ∷ Show Query where |
115 | | - show (Query m) = "(Query (" <> show m <> "))" |
| 120 | + show (Query m) = "(Query " <> show m <> ")" |
0 commit comments