This repository was archived by the owner on Oct 4, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 11 files changed +481
-496
lines changed Expand file tree Collapse file tree 11 files changed +481
-496
lines changed Original file line number Diff line number Diff line change
1
+ /. *
2
+ ! /.gitignore
3
+ ! /.jscsrc
4
+ ! /.jshintrc
5
+ ! /.travis.yml
1
6
/bower_components /
2
7
/node_modules /
3
8
/output /
4
- /tmp /
Original file line number Diff line number Diff line change
1
+ {
2
+ "preset" : " grunt" ,
3
+ "disallowSpacesInFunctionExpression" : null ,
4
+ "requireSpacesInFunctionExpression" : {
5
+ "beforeOpeningRoundBrace" : true ,
6
+ "beforeOpeningCurlyBrace" : true
7
+ },
8
+ "disallowSpacesInAnonymousFunctionExpression" : null ,
9
+ "requireSpacesInAnonymousFunctionExpression" : {
10
+ "beforeOpeningRoundBrace" : true ,
11
+ "beforeOpeningCurlyBrace" : true
12
+ },
13
+ "disallowSpacesInsideObjectBrackets" : null ,
14
+ "requireSpacesInsideObjectBrackets" : " all" ,
15
+ "validateQuoteMarks" : " \" " ,
16
+ "requireCurlyBraces" : null
17
+ }
Original file line number Diff line number Diff line change 5
5
"freeze" : true ,
6
6
"funcscope" : true ,
7
7
"futurehostile" : true ,
8
- "globalstrict " : true ,
8
+ "strict " : " global " ,
9
9
"latedef" : true ,
10
10
"maxparams" : 1 ,
11
11
"noarg" : true ,
15
15
"singleGroups" : true ,
16
16
"undef" : true ,
17
17
"unused" : true ,
18
- "eqnull" : true
18
+ "eqnull" : true ,
19
+ "predef" : [" exports" ]
19
20
}
Original file line number Diff line number Diff line change 1
1
language : node_js
2
- sudo : false
3
- node_js :
4
- - 0.10
2
+ dist : trusty
3
+ sudo : required
4
+ node_js : 6
5
5
env :
6
6
- PATH=$HOME/purescript:$PATH
7
7
install :
8
8
- TAG=$(wget -q -O - https://github.com/purescript/purescript/releases/latest --server-response --max-redirect 0 2>&1 | sed -n -e 's/.*Location:.*tag\///p')
9
9
- wget -O $HOME/purescript.tar.gz https://github.com/purescript/purescript/releases/download/$TAG/linux64.tar.gz
10
10
- tar -xvf $HOME/purescript.tar.gz -C $HOME/
11
11
- chmod a+x $HOME/purescript
12
+ - npm install -g bower
12
13
- npm install
13
14
script :
14
- - npm run build
15
+ - bower install --production
16
+ - npm run -s build
17
+ - bower install
18
+ - npm -s test
19
+ after_success :
20
+ - >-
21
+ test $TRAVIS_TAG &&
22
+ echo $GITHUB_TOKEN | pulp login &&
23
+ echo y | pulp publish --no-push
Original file line number Diff line number Diff line change 4
4
[ ![ Build Status] ( https://travis-ci.org/purescript/purescript-generics.svg?branch=master )] ( https://travis-ci.org/purescript/purescript-generics )
5
5
[ ![ Dependency Status] ( https://www.versioneye.com/user/projects/5620cd8436d0ab00160009c5/badge.svg?style=flat )] ( https://www.versioneye.com/user/projects/5620cd8436d0ab00160009c5 )
6
6
7
- Generic Programming.
8
-
9
- - [ Module Documentation] ( docs/Data/ )
10
- - [ Example] ( test/Main.purs )
7
+ Generic programming.
11
8
12
9
## Usage
13
10
14
11
```
15
12
bower install purescript-generics
16
13
```
17
14
18
- The methods in the ` Generic ` type class can be derived in versions >= 0.7.3 of the PureScript compiler. Simply omit their definitions to derive them.
15
+ The methods in the ` Generic ` type class can be derived in versions >= 0.7.3 of the PureScript compiler with the following syntax:
16
+
17
+ ``` purescript
18
+ derive instance genericMyType :: Generic MyType
19
+ ```
20
+
21
+ There are some example usages of the library [ in the tests] ( test/Main.purs ) .
22
+
23
+ ## Documentation
24
+
25
+ Module documentation is [ published on Pursuit] ( http://pursuit.purescript.org/packages/purescript-generics ) .
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " purescript-generics" ,
3
3
"homepage" : " https://github.com/purescript-contrib/purescript-generics" ,
4
+ "description" : " Generic programming for PureScript" ,
4
5
"authors" : [
5
6
" Gershom Bazerman <[email protected] >"
6
7
],
7
- "description" : " Generic programming" ,
8
- "keywords" : [
9
- " purescript" ,
10
- " generic"
11
- ],
12
- "moduleType" : [
13
- " node"
14
- ],
15
8
"license" : " MIT" ,
9
+ "repository" : {
10
+ "type" : " git" ,
11
+ "url" : " git://github.com/purescript/purescript-generics.git"
12
+ },
16
13
"ignore" : [
17
14
" **/.*" ,
18
15
" bower_components" ,
19
16
" node_modules" ,
20
- " output"
17
+ " output" ,
18
+ " test" ,
19
+ " bower.json" ,
20
+ " package.json"
21
21
],
22
- "repository" : {
23
- "type" : " git" ,
24
- "url" : " git://github.com/purescript/purescript-generics.git"
25
- },
26
22
"dependencies" : {
27
- "purescript-arrays" : " ^0.4.2 " ,
28
- "purescript-either" : " ^0.2 .1" ,
29
- "purescript-proxy" : " ^0. 1.0" ,
30
- "purescript-strings" : " ^0.7.0 "
23
+ "purescript-arrays" : " ^1.0.0-rc.1 " ,
24
+ "purescript-either" : " ^1.0.0-rc .1" ,
25
+ "purescript-proxy" : " ^1.0.0-rc.1 " ,
26
+ "purescript-strings" : " ^1.0.0-rc.1 "
31
27
},
32
28
"devDependencies" : {
33
- "purescript-console " : " ^0. 1.0" ,
34
- "purescript-assert " : " ^0.1 .1"
29
+ "purescript-assert " : " ^1.0.0-rc.1 " ,
30
+ "purescript-console " : " ^1.0.0-rc .1"
35
31
}
36
32
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
{
2
2
"private" : true ,
3
3
"scripts" : {
4
- "postinstall" : " pulp dep install" ,
5
- "build" : " jshint src && pulp test && rimraf docs && pulp docs"
4
+ "clean" : " rimraf output && rimraf .pulp-cache" ,
5
+ "build" : " jshint src && jscs src && pulp build --censor-lib --strict" ,
6
+ "test" : " pulp test"
6
7
},
7
8
"devDependencies" : {
8
- "jshint" : " ^2.8.0" ,
9
- "pulp" : " ^4.0.1" ,
10
- "rimraf" : " ^2.4.1"
9
+ "jscs" : " ^2.8.0" ,
10
+ "jshint" : " ^2.9.1" ,
11
+ "pulp" : " ^8.2.0" ,
12
+ "purescript-psa" : " ^0.3.8" ,
13
+ "rimraf" : " ^2.5.0"
11
14
}
12
15
}
Original file line number Diff line number Diff line change 1
- /* global exports */
2
1
"use strict" ;
3
2
4
3
// module Data.Generic
5
4
6
-
7
- //------------------------------------------------------------------------------
8
- // Zipping ---------------------------------------------------------------------
9
- //------------------------------------------------------------------------------
10
-
11
- exports . zipAll = function ( f ) {
12
- return function ( xs ) {
13
- return function ( ys ) {
14
- var l = xs . length < ys . length ? xs . length : ys . length ;
15
- for ( var i = 0 ; i < l ; i ++ ) {
16
- if ( ! f ( xs [ i ] ) ( ys [ i ] ) ) {
17
- return false ;
18
- }
19
- }
20
- return true ;
21
- } ;
5
+ exports . zipAll = function ( f ) {
6
+ return function ( xs ) {
7
+ return function ( ys ) {
8
+ var l = xs . length < ys . length ? xs . length : ys . length ;
9
+ for ( var i = 0 ; i < l ; i ++ ) {
10
+ if ( ! f ( xs [ i ] ) ( ys [ i ] ) ) {
11
+ return false ;
12
+ }
13
+ }
14
+ return true ;
22
15
} ;
16
+ } ;
23
17
} ;
24
18
25
- exports . zipCompare = function ( f ) {
26
- return function ( xs ) {
27
- return function ( ys ) {
28
- var i = 0 ;
29
- var xlen = xs . length ;
30
- var ylen = ys . length ;
31
- while ( i < xlen && i < ylen ) {
32
- var o = f ( xs [ i ] ) ( ys [ i ] ) ;
33
- if ( o !== 0 ) {
34
- return o ;
35
- }
36
- i ++ ;
37
- }
38
- if ( xlen === ylen ) {
39
- return 0 ;
40
- } else if ( xlen > ylen ) {
41
- return - 1 ;
42
- } else {
43
- return 1 ;
44
- }
45
- } ;
19
+ exports . zipCompare = function ( f ) {
20
+ return function ( xs ) {
21
+ return function ( ys ) {
22
+ var i = 0 ;
23
+ var xlen = xs . length ;
24
+ var ylen = ys . length ;
25
+ while ( i < xlen && i < ylen ) {
26
+ var o = f ( xs [ i ] ) ( ys [ i ] ) ;
27
+ if ( o !== 0 ) {
28
+ return o ;
29
+ }
30
+ i ++ ;
31
+ }
32
+ if ( xlen === ylen ) {
33
+ return 0 ;
34
+ } else if ( xlen > ylen ) {
35
+ return - 1 ;
36
+ } else {
37
+ return 1 ;
38
+ }
46
39
} ;
40
+ } ;
47
41
} ;
You can’t perform that action at this time.
0 commit comments