|
231 | 231 |
|
232 | 232 | data Element :: * |
233 | 233 |
|
234 | | - type Handler e = Event -> Eff e Unit |
| 234 | + type Handler e = DOMEvent -> Eff e Unit |
235 | 235 |
|
236 | 236 | data NgEl :: ! |
237 | 237 |
|
238 | 238 |
|
239 | 239 | ### Values |
240 | 240 |
|
241 | | - (!!) :: Element -> Number -> Maybe Node |
| 241 | + (!!) :: Element -> Number -> Maybe HTMLElement |
242 | 242 |
|
243 | 243 | addClass :: forall e. String -> Element -> ElEff e Element |
244 | 244 |
|
|
377 | 377 |
|
378 | 378 | ### Types |
379 | 379 |
|
380 | | - type Config a b c d = { responseType :: ResponseType, withCredentials :: Boolean, timeout :: Either Number (Promise c d), cache :: Either Boolean Cache, xsrfCookieName :: String, xsrfHeaderName :: String, headers :: Headers, "data" :: RequestData b, params :: { | a }, url :: Url, method :: Method } |
| 380 | + type Config a b c d = { responseType :: D.ResponseType, withCredentials :: Boolean, timeout :: Either Number (Promise c d), cache :: Either Boolean Cache, xsrfCookieName :: String, xsrfHeaderName :: String, headers :: Headers, "data" :: RequestData b, params :: { | a }, url :: D.Url, method :: D.HttpMethod } |
381 | 381 |
|
382 | 382 | data Http :: * |
383 | 383 |
|
384 | 384 | type HttpResponse e r a b c d = HttpEff e (Promise (Response r a b c d) (Response r a b c d)) |
385 | 385 |
|
386 | | - type Response r a b c d = { statusText :: String, config :: Config a b c d, headers :: [String] -> String, status :: Status, "data" :: ResponseData r } |
| 386 | + type Response r a b c d = { statusText :: String, config :: Config a b c d, headers :: [String] -> String, status :: Status, "data" :: D.HttpData r } |
387 | 387 |
|
388 | 388 |
|
389 | 389 | ### Values |
390 | 390 |
|
391 | 391 | config :: forall a b c d. Config a b c d |
392 | 392 |
|
393 | | - del :: forall e r a b c d. Url -> Http -> HttpResponse e r a b c d |
| 393 | + del :: forall e r a b c d. D.Url -> Http -> HttpResponse e r a b c d |
394 | 394 |
|
395 | | - del' :: forall e r a b c d. Url -> Config a b c d -> Http -> HttpResponse e r a b c d |
| 395 | + del' :: forall e r a b c d. D.Url -> Config a b c d -> Http -> HttpResponse e r a b c d |
396 | 396 |
|
397 | | - get :: forall e r a b c d. Url -> Http -> HttpResponse e r a b c d |
| 397 | + get :: forall e r a b c d. D.Url -> Http -> HttpResponse e r a b c d |
398 | 398 |
|
399 | | - get' :: forall e r a b c d. Url -> Config a b c d -> Http -> HttpResponse e r a b c d |
| 399 | + get' :: forall e r a b c d. D.Url -> Config a b c d -> Http -> HttpResponse e r a b c d |
400 | 400 |
|
401 | | - head :: forall e r a b c d. Url -> Http -> HttpResponse e r a b c d |
| 401 | + head :: forall e r a b c d. D.Url -> Http -> HttpResponse e r a b c d |
402 | 402 |
|
403 | | - head' :: forall e r a b c d. Url -> Config a b c d -> Http -> HttpResponse e r a b c d |
| 403 | + head' :: forall e r a b c d. D.Url -> Config a b c d -> Http -> HttpResponse e r a b c d |
404 | 404 |
|
405 | 405 | http :: forall e r a b c d. Config a b c d -> Http -> HttpResponse e r a b c d |
406 | 406 |
|
407 | | - jsonp :: forall e r a b c d. Url -> Http -> HttpResponse e r a b c d |
| 407 | + jsonp :: forall e r a b c d. D.Url -> Http -> HttpResponse e r a b c d |
408 | 408 |
|
409 | | - jsonp' :: forall e r a b c d. Url -> Config a b c d -> Http -> HttpResponse e r a b c d |
| 409 | + jsonp' :: forall e r a b c d. D.Url -> Config a b c d -> Http -> HttpResponse e r a b c d |
410 | 410 |
|
411 | | - post :: forall e r a b c d. Url -> RequestData b -> Http -> HttpResponse e r a b c d |
| 411 | + post :: forall e r a b c d. D.Url -> RequestData b -> Http -> HttpResponse e r a b c d |
412 | 412 |
|
413 | | - post' :: forall e r a b c d. Url -> RequestData b -> Config a b c d -> Http -> HttpResponse e r a b c d |
| 413 | + post' :: forall e r a b c d. D.Url -> RequestData b -> Config a b c d -> Http -> HttpResponse e r a b c d |
414 | 414 |
|
415 | | - put :: forall e r a b c d. Url -> RequestData b -> Http -> HttpResponse e r a b c d |
| 415 | + put :: forall e r a b c d. D.Url -> RequestData b -> Http -> HttpResponse e r a b c d |
416 | 416 |
|
417 | | - put' :: forall e r a b c d. Url -> RequestData b -> Config a b c d -> Http -> HttpResponse e r a b c d |
| 417 | + put' :: forall e r a b c d. D.Url -> RequestData b -> Config a b c d -> Http -> HttpResponse e r a b c d |
418 | 418 |
|
419 | 419 |
|
420 | 420 | ## Module Angular.Injector |
|
707 | 707 |
|
708 | 708 | pureResolve :: forall a b. b -> Promise a b |
709 | 709 |
|
710 | | - then' :: forall a b c d. (b -> Promise c d) -> Promise a b -> Promise c d |
| 710 | + then' :: forall a b c. (b -> Promise a c) -> Promise a b -> Promise a c |
711 | 711 |
|
712 | 712 | then'' :: forall a b c d. (b -> Promise c d) -> (a -> Promise c d) -> Promise a b -> Promise c d |
713 | 713 |
|
|
813 | 813 |
|
814 | 814 | id :: forall a. Scope a -> String |
815 | 815 |
|
816 | | - modifyScope :: forall e f a b. ({ | a } -> Eff f { | b }) -> Scope a -> ReadWriteEff e Unit |
| 816 | + modifyScope :: forall e a b. ({ | a } -> Eff e { | b }) -> Scope a -> ReadWriteEff e Unit |
817 | 817 |
|
818 | 818 | newScope :: forall e a b. Boolean -> Scope a -> ScopeEff e (Scope b) |
819 | 819 |
|
|
855 | 855 |
|
856 | 856 | extendThis :: forall e a b. { | b } -> This a -> WriteEff e |
857 | 857 |
|
858 | | - modifyThis :: forall e f a b. ({ | a } -> Eff f { | b }) -> This a -> ReadWriteEff e Unit |
| 858 | + modifyThis :: forall e a b. ({ | a } -> Eff e { | b }) -> This a -> ReadWriteEff e Unit |
859 | 859 |
|
860 | 860 | readThis :: forall e a. This a -> ReadEff e a |
861 | 861 |
|
|
888 | 888 | timeoutk :: forall e f r. Number -> Boolean -> Timeout -> Eff f r -> TimeoutEff e (TimeoutPromise r) |
889 | 889 |
|
890 | 890 |
|
891 | | -## Module DOM.Event |
892 | | - |
893 | | -### Types |
894 | | - |
895 | | - type Event = { keyCode :: Number } |
896 | | - |
897 | | - |
898 | | -## Module DOM.Node |
899 | | - |
900 | | -### Types |
901 | | - |
902 | | - data DOM :: ! |
903 | | - |
904 | | - data Node :: * |
905 | | - |
906 | | - |
907 | | -### Values |
908 | | - |
909 | | - focus :: forall e. Node -> Eff (dom :: DOM | e) Unit |
910 | | - |
911 | | - |
912 | | -## Module DOM.Types |
913 | | - |
914 | | -### Types |
915 | | - |
916 | | - data ArrayBuffer :: * |
917 | | - |
918 | | - data Blob :: * |
919 | | - |
920 | | - data Document :: * |
921 | | - |
922 | | - data MozBlob :: * |
923 | | - |
924 | | - data MozChunkedArrayBuffer :: * |
925 | | - |
926 | | - data MozChunkedText :: * |
927 | | - |
928 | | - |
929 | 891 | ## Module Angular.Http.Internal |
930 | 892 |
|
931 | 893 | ### Types |
|
943 | 905 |
|
944 | 906 | getConfigHeaders :: ForeignConfig -> Headers |
945 | 907 |
|
946 | | - getConfigMethod :: ForeignConfig -> Method |
| 908 | + getConfigMethod :: ForeignConfig -> D.HttpMethod |
947 | 909 |
|
948 | 910 | getConfigParams :: forall a. ForeignConfig -> { | a } |
949 | 911 |
|
950 | 912 | getConfigRequestData :: forall e a. ForeignConfig -> RequestData a |
951 | 913 |
|
952 | | - getConfigResponseType :: ForeignConfig -> ResponseType |
| 914 | + getConfigResponseType :: ForeignConfig -> D.ResponseType |
953 | 915 |
|
954 | 916 | getConfigTimeout :: forall a b. ForeignConfig -> Either Number (Promise a b) |
955 | 917 |
|
956 | | - getConfigUrl :: ForeignConfig -> Url |
| 918 | + getConfigUrl :: ForeignConfig -> D.Url |
957 | 919 |
|
958 | 920 | getConfigWithCredentials :: ForeignConfig -> Boolean |
959 | 921 |
|
|
963 | 925 |
|
964 | 926 | getResponseConfig :: ForeignResponse -> ForeignConfig |
965 | 927 |
|
966 | | - getResponseData :: forall a. ResponseType -> ForeignResponse -> ResponseData a |
| 928 | + getResponseData :: forall a. D.ResponseType -> ForeignResponse -> D.HttpData a |
967 | 929 |
|
968 | 930 | getResponseHeaders :: ForeignResponse -> [String] -> String |
969 | 931 |
|
|
975 | 937 |
|
976 | 938 | setConfigHeaders :: forall e. Headers -> ForeignConfig -> HttpEff e Unit |
977 | 939 |
|
978 | | - setConfigMethod :: forall e. Method -> ForeignConfig -> HttpEff e Unit |
| 940 | + setConfigMethod :: forall e. D.HttpMethod -> ForeignConfig -> HttpEff e Unit |
979 | 941 |
|
980 | 942 | setConfigParams :: forall e a. { | a } -> ForeignConfig -> HttpEff e Unit |
981 | 943 |
|
982 | 944 | setConfigRequestData :: forall e a. RequestData a -> ForeignConfig -> HttpEff e Unit |
983 | 945 |
|
984 | | - setConfigResponseType :: forall e. ResponseType -> ForeignConfig -> HttpEff e Unit |
| 946 | + setConfigResponseType :: forall e. D.ResponseType -> ForeignConfig -> HttpEff e Unit |
985 | 947 |
|
986 | 948 | setConfigTimeout :: forall e a b. Either Number (Promise a b) -> ForeignConfig -> HttpEff e Unit |
987 | 949 |
|
988 | | - setConfigUrl :: forall e. Url -> ForeignConfig -> HttpEff e Unit |
| 950 | + setConfigUrl :: forall e. D.Url -> ForeignConfig -> HttpEff e Unit |
989 | 951 |
|
990 | 952 | setConfigWithCredentials :: forall e. Boolean -> ForeignConfig -> HttpEff e Unit |
991 | 953 |
|
|
1015 | 977 |
|
1016 | 978 | type HttpEff e r = Eff (nghttp :: NgHttp | e) r |
1017 | 979 |
|
1018 | | - data Method where |
1019 | | - GET :: Method |
1020 | | - POST :: Method |
1021 | | - PUT :: Method |
1022 | | - DELETE :: Method |
1023 | | - PATCH :: Method |
1024 | | - HEAD :: Method |
1025 | | - OPTIONS :: Method |
1026 | | - JSONP :: Method |
1027 | | - |
1028 | 980 | data NgHttp :: ! |
1029 | 981 |
|
1030 | 982 | data RequestData a where |
|
1034 | 986 |
|
1035 | 987 | type RequestDataFn a = { objectRequestData :: a -> RequestData a, stringRequestData :: String -> RequestData a, noRequestData :: RequestData a } |
1036 | 988 |
|
1037 | | - data ResponseData a where |
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 |
1048 | | - |
1049 | | - 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 } |
1050 | | - |
1051 | | - data ResponseType where |
1052 | | - Default :: ResponseType |
1053 | | - ArrayBuffer :: ResponseType |
1054 | | - Blob :: ResponseType |
1055 | | - Document :: ResponseType |
1056 | | - Json :: ResponseType |
1057 | | - Text :: ResponseType |
1058 | | - MozBlob :: ResponseType |
1059 | | - MozChunkedText :: ResponseType |
1060 | | - MozChunkedArrayBuffer :: ResponseType |
1061 | | - |
1062 | 989 | data Status where |
1063 | 990 | OK :: Status |
1064 | 991 | Created :: Status |
|
1070 | 997 | InternalServerError :: Status |
1071 | 998 | OtherStatus :: Number -> Status |
1072 | 999 |
|
1073 | | - type Url = String |
1074 | | - |
1075 | | - |
1076 | | -### Type Class Instances |
1077 | | - |
1078 | | - instance showMethod :: Show Method |
1079 | | - |
1080 | | - instance showResponseType :: Show ResponseType |
1081 | | - |
1082 | 1000 |
|
1083 | 1001 | ### Values |
1084 | 1002 |
|
|
1090 | 1008 |
|
1091 | 1009 | readHeadersFn :: forall a b. Fn4 (String -> Either String (Unit -> String)) ((Unit -> String) -> Either String (Unit -> String)) (String -> Either String (Unit -> String) -> Header) ForeignHeaders Headers |
1092 | 1010 |
|
1093 | | - readMethod :: String -> Method |
| 1011 | + readMethod :: String -> D.HttpMethod |
1094 | 1012 |
|
1095 | 1013 | readRequestDataFn :: forall a. Fn2 (RequestDataFn a) ForeignRequestData (RequestData a) |
1096 | 1014 |
|
1097 | | - readResponseDataFn :: forall a. Fn3 (ResponseDataFn a) String ForeignResponseData (ResponseData a) |
| 1015 | + readResponseData :: forall a d. (d -> D.HttpData a) -> ForeignResponseData -> D.HttpData a |
1098 | 1016 |
|
1099 | | - readResponseType :: String -> ResponseType |
| 1017 | + readResponseType :: String -> D.ResponseType |
1100 | 1018 |
|
1101 | 1019 | readStatus :: Number -> Status |
1102 | 1020 |
|
|
0 commit comments