diff options
Diffstat (limited to 'src/LoaderRef.purs')
-rw-r--r-- | src/LoaderRef.purs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/LoaderRef.purs b/src/LoaderRef.purs index 2567b1e..f1efa04 100644 --- a/src/LoaderRef.purs +++ b/src/LoaderRef.purs | |||
@@ -4,6 +4,9 @@ module PursLoader.LoaderRef | |||
4 | , async | 4 | , async |
5 | , cacheable | 5 | , cacheable |
6 | , query | 6 | , query |
7 | , clearDependencies | ||
8 | , addDependency | ||
9 | , resourcePath | ||
7 | ) where | 10 | ) where |
8 | 11 | ||
9 | import Control.Monad.Eff (Eff()) | 12 | import Control.Monad.Eff (Eff()) |
@@ -48,3 +51,24 @@ foreign import query """ | |||
48 | function query(ref){ | 51 | function query(ref){ |
49 | return ref.query; | 52 | return ref.query; |
50 | }""" :: LoaderRef -> String | 53 | }""" :: LoaderRef -> String |
54 | |||
55 | foreign import clearDependencies """ | ||
56 | function clearDependencies(ref){ | ||
57 | return function(){ | ||
58 | return ref.clearDependencies(); | ||
59 | }; | ||
60 | }""" :: forall eff. LoaderRef -> Eff (loader :: Loader | eff) Unit | ||
61 | |||
62 | foreign import resourcePath """ | ||
63 | function resourcePath(ref){ | ||
64 | return ref.resourcePath; | ||
65 | }""" :: LoaderRef -> String | ||
66 | |||
67 | foreign import addDependency """ | ||
68 | function addDependency(ref){ | ||
69 | return function(dep){ | ||
70 | return function(){ | ||
71 | return ref.addDependency(dep); | ||
72 | }; | ||
73 | }; | ||
74 | }""" :: forall eff. LoaderRef -> String -> Eff (loader :: Loader | eff) Unit | ||