|
1 | | -# Module Documentation |
| 1 | +purescript-foreign |
| 2 | +================== |
2 | 3 |
|
3 | | -## Module Data.Foreign |
| 4 | +[](https://travis-ci.org/purescript/purescript-foreign) |
4 | 5 |
|
5 | | -### Types |
| 6 | +Library for dealing with foreign data (JSON and JavaScript objects). |
6 | 7 |
|
7 | | - data Foreign :: * |
8 | | - |
9 | | - data ForeignParser a where |
10 | | - ForeignParser :: Foreign -> Either String a -> ForeignParser a |
11 | | - |
12 | | - |
13 | | -### Type Classes |
14 | | - |
15 | | - class ReadForeign a where |
16 | | - read :: ForeignParser a |
17 | | - |
18 | | - |
19 | | -### Type Class Instances |
20 | | - |
21 | | - instance applicativeForeignParser :: Prelude.Applicative ForeignParser |
22 | | - |
23 | | - instance applyForeignParser :: Prelude.Apply ForeignParser |
24 | | - |
25 | | - instance bindForeignParser :: Prelude.Bind ForeignParser |
26 | | - |
27 | | - instance functorForeignParser :: Prelude.Functor ForeignParser |
28 | | - |
29 | | - instance monadForeignParser :: Prelude.Monad ForeignParser |
30 | | - |
31 | | - instance readArray :: (ReadForeign a) => ReadForeign [a] |
32 | | - |
33 | | - instance readBoolean :: ReadForeign Boolean |
34 | | - |
35 | | - instance readError :: ReadForeign Error |
36 | | - |
37 | | - instance readMaybe :: (ReadForeign a) => ReadForeign (Maybe a) |
38 | | - |
39 | | - instance readNumber :: ReadForeign Number |
40 | | - |
41 | | - instance readString :: ReadForeign String |
42 | | - |
43 | | - instance showForeign :: Prelude.Show Foreign |
44 | | - |
45 | | - |
46 | | -### Values |
47 | | - |
48 | | - index :: forall a. (ReadForeign a) => Number -> ForeignParser a |
49 | | - |
50 | | - keys :: String -> ForeignParser [String] |
51 | | - |
52 | | - parseForeign :: forall a. ForeignParser a -> Foreign -> Either String a |
53 | | - |
54 | | - parseJSON :: forall a. (ReadForeign a) => String -> Either String a |
55 | | - |
56 | | - prop :: forall a. (ReadForeign a) => String -> ForeignParser a |
| 8 | +- [Module documentation](docs/Module.md) |
| 9 | +- [Examples](examples/) |
0 commit comments