]> git.immae.eu Git - github/fretlink/purs-loader.git/blame - src/PursLoader/Plugin.purs
Bumping version number to 0.6.0
[github/fretlink/purs-loader.git] / src / PursLoader / Plugin.purs
CommitLineData
46039343 1module PursLoader.Plugin
845f3ec3 2 ( Compile()
46039343 3 , Context()
87145c4d 4 , Options()
46039343 5 , DependencyGraph()
46039343 6 , dependenciesOf
7 ) where
8
9import Prelude (Unit())
10
11import Control.Monad.Eff (Eff())
12import Control.Monad.Eff.Exception (Error())
13
14import Data.Either (Either(..))
15import Data.Function (Fn4(), runFn4)
46039343 16import Data.Nullable (Nullable())
17
0f0403a8 18type Compile eff = Nullable Error -> DependencyGraph -> Eff eff Unit
46039343 19
87145c4d 20type Context eff = { compile :: Compile eff -> Eff eff Unit, options :: Options }
46039343 21
87145c4d 22type Options = { bundle :: Boolean, output :: String, bundleOutput :: String }
46039343 23
24dependenciesOf :: DependencyGraph -> String -> Either Error (Array String)
25dependenciesOf = runFn4 dependenciesOfFn Left Right
26
46039343 27foreign import data DependencyGraph :: *
28
46039343 29foreign import dependenciesOfFn
30 :: Fn4 (Error -> Either Error (Array String))
31 (Array String -> Either Error (Array String))
32 DependencyGraph
33 String
34 (Either Error (Array String))