Skip to content

Commit 1f75bde

Browse files
authored
Merge pull request #5 from purescript-contrib/psc-0.10
Updates related to psc-0.10
2 parents e6bd842 + ab3849e commit 1f75bde

File tree

3 files changed

+20
-21
lines changed

3 files changed

+20
-21
lines changed

bower.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
"package.json"
1515
],
1616
"dependencies": {
17-
"purescript-prelude": "^1.0.1",
18-
"purescript-globals": "^1.0.0",
19-
"purescript-generics": "^1.0.0",
20-
"purescript-maybe": "^1.0.0",
21-
"purescript-strings": "^1.0.0",
22-
"purescript-tuples": "^1.0.0"
17+
"purescript-prelude": "^2.0.0",
18+
"purescript-globals": "^2.0.0",
19+
"purescript-generics": "^3.0.0",
20+
"purescript-maybe": "^2.0.0",
21+
"purescript-strings": "^2.0.0",
22+
"purescript-tuples": "^3.0.0"
2323
}
2424
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"devDependencies": {
88
"pulp": "^9.0.0",
99
"purescript-psa": "^0.3.9",
10-
"purescript": "^0.9.1",
10+
"purescript": "^0.10.1",
1111
"rimraf": "^2.5.0"
1212
}
1313
}

src/Data/FormURLEncoded.purs

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
module Data.FormURLEncoded
2-
( FormURLEncoded()
2+
( FormURLEncoded(FormURLEncoded)
33
, fromArray
44
, toArray
55
, encode
66
) where
77

8-
import Prelude (class Show, class Ord, class Eq, map, (<<<), (<>), compare, eq)
9-
import Data.String (joinWith) as String
8+
import Data.Newtype (class Newtype)
9+
import Data.Generic (class Generic)
1010
import Data.Maybe (Maybe(..))
11+
import Data.Monoid (class Monoid)
12+
import Data.Semigroup (class Semigroup)
13+
import Data.String (joinWith) as String
1114
import Data.Tuple (Tuple(..))
12-
import Data.Generic (class Generic, gShow)
13-
1415
import Global (encodeURIComponent)
16+
import Prelude (class Show, class Ord, class Eq, map, (<<<), (<>))
1517

1618
-- | `FormURLEncoded` is an ordered list of key-value pairs with possible duplicates.
1719
newtype FormURLEncoded
@@ -27,15 +29,12 @@ toArray :: FormURLEncoded -> Array (Tuple String (Maybe String))
2729
toArray (FormURLEncoded a) = a
2830

2931
derive instance genericFormUrlEncoded :: Generic FormURLEncoded
30-
31-
instance eqFormUrlEncoded :: Eq FormURLEncoded where
32-
eq (FormURLEncoded a) (FormURLEncoded b) = eq a b
33-
34-
instance ordFormUrlEncoded :: Ord FormURLEncoded where
35-
compare (FormURLEncoded a) (FormURLEncoded b) = compare a b
36-
37-
instance showFormUrlEncoded :: Show FormURLEncoded where
38-
show = gShow
32+
derive instance newtypeFormUrlEncoded :: Newtype FormURLEncoded _
33+
derive newtype instance eqFormUrlEncoded :: Eq FormURLEncoded
34+
derive newtype instance ordFormUrlEncoded :: Ord FormURLEncoded
35+
derive newtype instance showFormUrlEncoded :: Show FormURLEncoded
36+
derive newtype instance semigroupFormUrlEncoded :: Semigroup FormURLEncoded
37+
derive newtype instance monoidFormUrlEncoded :: Monoid FormURLEncoded
3938

4039
-- | Encode `FormURLEncoded` as `application/x-www-form-urlencoded`.
4140
encode :: FormURLEncoded -> String

0 commit comments

Comments
 (0)