aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/LoaderRef.purs
diff options
context:
space:
mode:
authoreric <thul.eric@gmail.com>2015-07-18 17:11:00 -0400
committereric <thul.eric@gmail.com>2015-07-18 17:11:00 -0400
commit78da2ff4a8ba259403efc166d3f753068221914e (patch)
treea4858f5e16e3df01aee249ad53b5b76f90fb97de /src/LoaderRef.purs
parent418c9429609c6d80ddaf7df41e0ee64192e2ec7b (diff)
parent3610dff1b8308a810d827f0595832b326deff37b (diff)
downloadpurs-loader-78da2ff4a8ba259403efc166d3f753068221914e.tar.gz
purs-loader-78da2ff4a8ba259403efc166d3f753068221914e.tar.zst
purs-loader-78da2ff4a8ba259403efc166d3f753068221914e.zip
Merge pull request #20 from ethul/topic/issue-18
Add FFI JavaScript as a webpack dependency
Diffstat (limited to 'src/LoaderRef.purs')
-rw-r--r--src/LoaderRef.purs24
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
9import Control.Monad.Eff (Eff()) 12import Control.Monad.Eff (Eff())
@@ -48,3 +51,24 @@ foreign import query """
48function query(ref){ 51function query(ref){
49 return ref.query; 52 return ref.query;
50}""" :: LoaderRef -> String 53}""" :: LoaderRef -> String
54
55foreign import clearDependencies """
56function clearDependencies(ref){
57 return function(){
58 return ref.clearDependencies();
59 };
60}""" :: forall eff. LoaderRef -> Eff (loader :: Loader | eff) Unit
61
62foreign import resourcePath """
63function resourcePath(ref){
64 return ref.resourcePath;
65}""" :: LoaderRef -> String
66
67foreign import addDependency """
68function 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