Skip to content

Commit e2c5df9

Browse files
committed
Instances
1 parent eca0ddc commit e2c5df9

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/Data/URI/Types.purs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
module Data.URI.Types where
22

33
import Prelude
4+
45
import Data.Either (Either)
56
import Data.Generic (class Generic)
67
import Data.List (List)
78
import Data.Maybe (Maybe)
9+
import Data.Newtype (class Newtype)
810
import Data.Path.Pathy (Path, File, Dir, Abs, Rel, Sandboxed, Unsandboxed)
911
import Data.Tuple (Tuple)
1012

@@ -76,8 +78,9 @@ derive instance eqRelativeRef ∷ Eq RelativeRef
7678
instance showRelativeRefShow RelativeRef where
7779
show (RelativeRef r q f) = "(RelativeRef " <> show r <> " " <> show q <> " " <> show f <> ")"
7880

79-
derive instance eqURISchemeEq URIScheme
80-
derive instance ordURISchemeOrd URIScheme
81+
derive instance newtypeURISchemeNewtype URIScheme _
82+
derive newtype instance eqURISchemeEq URIScheme
83+
derive newtype instance ordURISchemeOrd URIScheme
8184
derive instance genericURISchemeGeneric URIScheme
8285

8386
instance showURISchemeShow URIScheme where
@@ -109,7 +112,9 @@ instance showHost ∷ Show Host where
109112
show (IPv4Address ip) = "(IPv4Address " <> show ip <> ")"
110113
show (NameAddress name) = "(NameAddress " <> show name <> ")"
111114

112-
derive instance eqQueryEq Query
115+
derive instance newtypeQueryNewtype Query _
116+
derive newtype instance eqQueryEq Query
117+
derive newtype instance ordQueryOrd Query
113118

114119
instance showQueryShow Query where
115-
show (Query m) = "(Query (" <> show m <> "))"
120+
show (Query m) = "(Query " <> show m <> ")"

0 commit comments

Comments
 (0)