File tree Expand file tree Collapse file tree 4 files changed +12
-12
lines changed Expand file tree Collapse file tree 4 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -12,4 +12,4 @@ bower install purescript-const
12
12
13
13
## Module documentation
14
14
15
- [ ` docs/MODULE.md ` ] ( docs/MODULE .md )
15
+ - [ Data.Const ] ( docs/Data.Const .md )
Original file line number Diff line number Diff line change 28
28
" package.json"
29
29
],
30
30
"dependencies" : {
31
- "purescript-contravariant" : " ~ 0.2.0" ,
32
- "purescript-foldable-traversable" : " ~ 0.4.0"
31
+ "purescript-contravariant" : " ^ 0.2.0" ,
32
+ "purescript-foldable-traversable" : " ^ 0.4.0"
33
33
}
34
34
}
Original file line number Diff line number Diff line change @@ -9,6 +9,14 @@ newtype Const a b
9
9
= Const a
10
10
```
11
11
12
+ The ` Const ` type constructor, which wraps its first type argument
13
+ and ignores its second. That is, ` Const a b ` is isomorphic to ` a `
14
+ for any ` b ` .
15
+
16
+ ` Const ` has some useful instances. For example, the ` Applicative `
17
+ instance allows us to collect results using a ` Monoid ` while
18
+ ignoring return values.
19
+
12
20
##### Instances
13
21
``` purescript
14
22
instance eqConst :: (Eq a) => Eq (Const a b)
@@ -28,14 +36,6 @@ instance foldableConst :: Foldable (Const a)
28
36
instance traversableConst :: Traversable (Const a)
29
37
```
30
38
31
- The ` Const ` type constructor, which wraps its first type argument
32
- and ignores its second. That is, ` Const a b ` is isomorphic to ` a `
33
- for any ` b ` .
34
-
35
- ` Const ` has some useful instances. For example, the ` Applicative `
36
- instance allows us to collect results using a ` Monoid ` while
37
- ignoring return values.
38
-
39
39
#### ` getConst `
40
40
41
41
``` purescript
Original file line number Diff line number Diff line change 3
3
"devDependencies" : {
4
4
"gulp" : " ^3.8.11" ,
5
5
"gulp-plumber" : " ^1.0.0" ,
6
- "gulp-purescript" : " ^0.5.0" ,
6
+ "gulp-purescript" : " ^0.5.0-rc.1 " ,
7
7
"rimraf" : " ^2.3.3"
8
8
}
9
9
}
You can’t perform that action at this time.
0 commit comments