aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/package.yaml1
-rw-r--r--compiler/src/Resource.hs3
2 files changed, 3 insertions, 1 deletions
diff --git a/compiler/package.yaml b/compiler/package.yaml
index 21677fb..90c4ea5 100644
--- a/compiler/package.yaml
+++ b/compiler/package.yaml
@@ -25,6 +25,7 @@ dependencies:
25- cmdargs 25- cmdargs
26- JuicyPixels 26- JuicyPixels
27- JuicyPixels-extra 27- JuicyPixels-extra
28- parallel-io
28 29
29library: 30library:
30 source-dirs: src 31 source-dirs: src
diff --git a/compiler/src/Resource.hs b/compiler/src/Resource.hs
index a8be913..c3ed959 100644
--- a/compiler/src/Resource.hs
+++ b/compiler/src/Resource.hs
@@ -32,6 +32,7 @@ module Resource
32 ) where 32 ) where
33 33
34 34
35import Control.Concurrent.ParallelIO.Global (parallel)
35import Data.Function ((&)) 36import Data.Function ((&))
36import Data.List ((\\), subsequences, sortBy) 37import Data.List ((\\), subsequences, sortBy)
37import Data.Ord (comparing) 38import Data.Ord (comparing)
@@ -76,7 +77,7 @@ buildResourceTree processDir processItem processThumbnail = resNode
76 do 77 do
77 processedDir <- processDir path 78 processedDir <- processDir path
78 processedThumbnail <- maybeThumbnail thumbnailPath 79 processedThumbnail <- maybeThumbnail thumbnailPath
79 dirItems <- mapM resNode items 80 dirItems <- parallel $ map resNode items
80 return DirResource 81 return DirResource
81 { items = dirItems 82 { items = dirItems
82 , resPath = processedDir 83 , resPath = processedDir