diff options
Diffstat (limited to 'src/PursLoader/Loader.purs')
-rw-r--r-- | src/PursLoader/Loader.purs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/PursLoader/Loader.purs b/src/PursLoader/Loader.purs index f78153f..5e00f7e 100644 --- a/src/PursLoader/Loader.purs +++ b/src/PursLoader/Loader.purs | |||
@@ -34,6 +34,7 @@ import PursLoader.LoaderRef | |||
34 | , resourcePath | 34 | , resourcePath |
35 | ) | 35 | ) |
36 | 36 | ||
37 | import PursLoader.Debug (debug) | ||
37 | import PursLoader.LoaderUtil (parseQuery) | 38 | import PursLoader.LoaderUtil (parseQuery) |
38 | import PursLoader.Options (Options(..)) | 39 | import PursLoader.Options (Options(..)) |
39 | import PursLoader.Path (dirname, relative) | 40 | import PursLoader.Path (dirname, relative) |
@@ -47,6 +48,8 @@ loader ref source = do | |||
47 | 48 | ||
48 | cacheable ref | 49 | cacheable ref |
49 | 50 | ||
51 | debug "Invoke PureScript plugin compilation" | ||
52 | |||
50 | pluginContext.compile (compile callback) | 53 | pluginContext.compile (compile callback) |
51 | where | 54 | where |
52 | pluginContext :: Plugin.Context (Effects eff) | 55 | pluginContext :: Plugin.Context (Effects eff) |
@@ -56,6 +59,8 @@ loader ref source = do | |||
56 | compile callback error' { srcMap, ffiMap, graph } = do | 59 | compile callback error' { srcMap, ffiMap, graph } = do |
57 | clearDependencies ref | 60 | clearDependencies ref |
58 | 61 | ||
62 | either (const $ pure unit) (\a -> debug ("Adding PureScript dependency " ++ a)) name | ||
63 | |||
59 | addDependency ref (resourcePath ref) | 64 | addDependency ref (resourcePath ref) |
60 | 65 | ||
61 | either (\err -> callback (Just err) "") id | 66 | either (\err -> callback (Just err) "") id |
@@ -63,6 +68,7 @@ loader ref source = do | |||
63 | where | 68 | where |
64 | handle :: String -> Array String -> String -> Eff (Effects eff) Unit | 69 | handle :: String -> Array String -> String -> Eff (Effects eff) Unit |
65 | handle name' deps res = do | 70 | handle name' deps res = do |
71 | debug ("Adding PureScript transitive dependencies for " ++ name') | ||
66 | addTransitive name' | 72 | addTransitive name' |
67 | foreachE deps addTransitive | 73 | foreachE deps addTransitive |
68 | callback (toMaybe error') res | 74 | callback (toMaybe error') res |