Skip to content

Commit 2408b24

Browse files
committed
Updates for purescript 0.6
1 parent eba6a68 commit 2408b24

File tree

4 files changed

+36
-32
lines changed

4 files changed

+36
-32
lines changed

MODULE.md

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@
7575

7676
data CacheFactory :: *
7777

78-
type Key = String
78+
type Key = String
7979

80-
type Name = String
80+
type Name = String
8181

8282
data NgCache :: !
8383

@@ -111,7 +111,7 @@
111111
RootElement :: Element -> RootElement
112112

113113
newtype RootScope a where
114-
RootScope :: Scope a -> RootScope
114+
RootScope :: Scope a -> RootScope a
115115

116116

117117
### Type Classes
@@ -122,6 +122,8 @@
122122
class Injectable a where
123123
dependencies :: a -> [String]
124124

125+
class (Dependency a) <= Service a where
126+
125127

126128
### Type Class Instances
127129

@@ -471,7 +473,7 @@
471473

472474
type IntervalEff e r = Eff (nginterval :: NgInterval | e) r
473475

474-
type IntervalPromise = Promise Unit Number
476+
type IntervalPromise = Promise Unit Number
475477

476478
data NgInterval :: !
477479

@@ -593,7 +595,7 @@
593595

594596
type Parser a = String -> Maybe a
595597

596-
type ValidationErrorKey = String
598+
type ValidationErrorKey = String
597599

598600

599601
### Values
@@ -645,7 +647,7 @@
645647

646648
### Types
647649

648-
type Expression = String
650+
type Expression = String
649651

650652
data Getter :: * -> *
651653

@@ -754,9 +756,9 @@
754756
### Types
755757

756758
data ApplyExpr e r a where
757-
DefaultApplyExpr :: ApplyExpr
758-
StringApplyExpr :: String -> ApplyExpr
759-
FnApplyExpr :: (Scope a -> Eff e r) -> ApplyExpr
759+
DefaultApplyExpr :: ApplyExpr e r a
760+
StringApplyExpr :: String -> ApplyExpr e r a
761+
FnApplyExpr :: (Scope a -> Eff e r) -> ApplyExpr e r a
760762

761763
type Event e a b = { defaultPrevented :: Boolean, preventDefault :: Eff e Unit, stopPropagation :: Eff e Unit, name :: String, currentScope :: Scope b, targetScope :: Scope a }
762764

@@ -890,7 +892,7 @@
890892

891893
### Types
892894

893-
type Event = { keyCode :: Number }
895+
type Event = { keyCode :: Number }
894896

895897

896898
## Module DOM.Node
@@ -1006,7 +1008,7 @@
10061008

10071009
data ForeignTimeout :: *
10081010

1009-
type Header = Tuple String (Either String (Unit -> String))
1011+
type Header = Tuple String (Either String (Unit -> String))
10101012

10111013
newtype Headers where
10121014
Headers :: [Header] -> Headers
@@ -1026,23 +1028,23 @@
10261028
data NgHttp :: !
10271029

10281030
data RequestData a where
1029-
NoRequestData :: RequestData
1030-
StringRequestData :: String -> RequestData
1031-
ObjectRequestData :: a -> RequestData
1031+
NoRequestData :: RequestData a
1032+
StringRequestData :: String -> RequestData a
1033+
ObjectRequestData :: a -> RequestData a
10321034

10331035
type RequestDataFn a = { objectRequestData :: a -> RequestData a, stringRequestData :: String -> RequestData a, noRequestData :: RequestData a }
10341036

10351037
data ResponseData a where
1036-
NoResponseData :: ResponseData
1037-
DefaultResponseData :: String -> ResponseData
1038-
ArrayBufferResponseData :: D.ArrayBuffer -> ResponseData
1039-
BlobResponseData :: D.Blob -> ResponseData
1040-
DocumentResponseData :: D.Document -> ResponseData
1041-
JsonResponseData :: a -> ResponseData
1042-
TextResponseData :: String -> ResponseData
1043-
MozBlobResponseData :: D.MozBlob -> ResponseData
1044-
MozChunkedTextResponseData :: D.MozChunkedText -> ResponseData
1045-
MozChunkedArrayBufferResponseData :: D.MozChunkedArrayBuffer -> ResponseData
1038+
NoResponseData :: ResponseData a
1039+
DefaultResponseData :: String -> ResponseData a
1040+
ArrayBufferResponseData :: D.ArrayBuffer -> ResponseData a
1041+
BlobResponseData :: D.Blob -> ResponseData a
1042+
DocumentResponseData :: D.Document -> ResponseData a
1043+
JsonResponseData :: a -> ResponseData a
1044+
TextResponseData :: String -> ResponseData a
1045+
MozBlobResponseData :: D.MozBlob -> ResponseData a
1046+
MozChunkedTextResponseData :: D.MozChunkedText -> ResponseData a
1047+
MozChunkedArrayBufferResponseData :: D.MozChunkedArrayBuffer -> ResponseData a
10461048

10471049
type ResponseDataFn a = { mozChunkedArrayBufferResponseData :: D.MozChunkedArrayBuffer -> ResponseData a, mozChunkedTextResponseData :: D.MozChunkedText -> ResponseData a, mozBlobResponseData :: D.MozBlob -> ResponseData a, textResponseData :: String -> ResponseData a, jsonResponseData :: a -> ResponseData a, documentResponseData :: D.Document -> ResponseData a, blobResponseData :: D.Blob -> ResponseData a, arrayBufferResponseData :: D.ArrayBuffer -> ResponseData a, defaultResponseData :: String -> ResponseData a, noResponseData :: ResponseData a }
10481050

@@ -1068,7 +1070,7 @@
10681070
InternalServerError :: Status
10691071
OtherStatus :: Number -> Status
10701072

1071-
type Url = String
1073+
type Url = String
10721074

10731075

10741076
### Type Class Instances
@@ -1110,7 +1112,7 @@
11101112
### Types
11111113

11121114
newtype PromiseEff e f a b where
1113-
PromiseEff :: Promise (Eff e a) (Eff f b) -> PromiseEff
1115+
PromiseEff :: Promise (Eff e a) (Eff f b) -> PromiseEff e f a b
11141116

11151117

11161118
### Type Class Instances

gulpfile.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var gulp = require('gulp')
1616
todomvc: 'examples/Todomvc/**/*.purs'
1717
},
1818
dest: 'dist',
19-
docgen: 'MODULE.md',
19+
docs: 'MODULE.md',
2020
options: {
2121
main: 'Todomvc.Main',
2222
output: 'todomvc.js'
@@ -81,13 +81,13 @@ gulp.task('psci', function(){
8181
);
8282
});
8383

84-
gulp.task('docgen', function(){
84+
gulp.task('docs', function(){
8585
return (
8686
gulp.src(config.purescript.src[1]).
8787
pipe(plumber()).
88-
pipe(purescript.docgen()).
88+
pipe(purescript.pscDocs()).
8989
on('error', error).
90-
pipe(gulp.dest(config.purescript.docgen))
90+
pipe(gulp.dest(config.purescript.docs))
9191
);
9292
});
9393

@@ -100,4 +100,4 @@ gulp.task('watch.todomvc', function(cb){
100100
server(cb);
101101
});
102102

103-
gulp.task('default', ['clean', 'make', 'docgen', 'psci']);
103+
gulp.task('default', ['clean', 'make', 'docs', 'psci']);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"gulp": "3.8.7",
66
"gulp-clean": "0.3.1",
77
"gulp-plumber": "0.6.4",
8-
"gulp-purescript": "0.0.10",
8+
"gulp-purescript": "0.1.1",
99
"gulp-util": "3.0.0",
1010
"node-static": "0.7.4"
1111
}

src/Angular/DI.purs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
module Angular.DI (
22
Dependency
3+
, name
34
, Service
45
, RootScope(..)
56
, RootElement(..)
67
, get
78
, Injectable
9+
, dependencies
810
, Annotated()
911
, annotate
1012
) where

0 commit comments

Comments
 (0)