module Development.IDE.Graph.Database(
    Shake.ShakeDatabase,
    shakeOpenDatabase,
    shakeRunDatabase,
    Shake.shakeProfileDatabase,
    ) where

import qualified Development.Shake.Database as Shake
import Development.IDE.Graph.Internal.Action
import Development.IDE.Graph.Internal.Options
import Development.IDE.Graph.Internal.Rules

shakeOpenDatabase :: ShakeOptions -> Rules () -> IO (IO Shake.ShakeDatabase, IO ())
shakeOpenDatabase :: ShakeOptions -> Rules () -> IO (IO ShakeDatabase, IO ())
shakeOpenDatabase ShakeOptions
a Rules ()
b = ShakeOptions -> Rules () -> IO (IO ShakeDatabase, IO ())
Shake.shakeOpenDatabase (ShakeOptions -> ShakeOptions
fromShakeOptions ShakeOptions
a) (Rules () -> Rules ()
forall a. Rules a -> Rules a
fromRules Rules ()
b)

shakeRunDatabase :: Shake.ShakeDatabase -> [Action a] -> IO ([a], [IO ()])
shakeRunDatabase :: ShakeDatabase -> [Action a] -> IO ([a], [IO ()])
shakeRunDatabase ShakeDatabase
a [Action a]
b = ShakeDatabase -> [Action a] -> IO ([a], [IO ()])
forall a. ShakeDatabase -> [Action a] -> IO ([a], [IO ()])
Shake.shakeRunDatabase ShakeDatabase
a ((Action a -> Action a) -> [Action a] -> [Action a]
forall a b. (a -> b) -> [a] -> [b]
map Action a -> Action a
forall a. Action a -> Action a
fromAction [Action a]
b)