aboutsummaryrefslogblamecommitdiffhomepage
path: root/src/PursLoader/Glob.purs
blob: 45eeb56837ad2fc1173c40bce5d8705ba9617786 (plain) (tree)
1
2
3
4
5
6
7




                      

                            







                                            
                                                                                      

                                                      



                                                                                                     
module PursLoader.Glob
  ( Glob()
  , globAll
  ) where

import Prelude (Unit(), ($))

import Control.Monad.Aff (Aff(), makeAff)
import Control.Monad.Eff (Eff())
import Control.Monad.Eff.Exception (Error())

import Data.Function

foreign import data Glob :: !

globAll :: forall eff. Array String -> Aff (glob :: Glob | eff) (Array (Array String))
globAll patterns = makeAff $ runFn3 globAllFn patterns

foreign import globAllFn :: forall eff. Fn3 (Array String)
                                            (Error -> Eff (glob :: Glob | eff) Unit)
                                            ((Array (Array String)) -> Eff (glob :: Glob | eff) Unit)
                                            (Eff (glob :: Glob | eff) Unit)