module Language.Alloy.Ressources (
  alloyJar,
  commonsCliJar,
  slf4jJar,
  ) where

import Data.Functor                     ((<&>))
import System.FilePath                  ((</>))

import Language.Alloy.RessourceNames (
  alloyJarName, commonsCliJarName, slf4jJarName,
  )
import Paths_call_alloy                 (getDataDir)

prependDataDir :: FilePath -> IO FilePath
prependDataDir :: FilePath -> IO FilePath
prependDataDir FilePath
xs = IO FilePath
getDataDir IO FilePath -> (FilePath -> FilePath) -> IO FilePath
forall (f :: * -> *) a b. Functor f => f a -> (a -> b) -> f b
<&> (FilePath -> FilePath -> FilePath
</> FilePath
xs)

alloyJar :: IO FilePath
alloyJar :: IO FilePath
alloyJar = FilePath -> IO FilePath
prependDataDir FilePath
alloyJarName

commonsCliJar :: IO FilePath
commonsCliJar :: IO FilePath
commonsCliJar = FilePath -> IO FilePath
prependDataDir (FilePath
"commons-cli" FilePath -> FilePath -> FilePath
</> FilePath
commonsCliJarName)

slf4jJar :: IO FilePath
slf4jJar :: IO FilePath
slf4jJar = FilePath -> IO FilePath
prependDataDir (FilePath
"slf4j" FilePath -> FilePath -> FilePath
</> FilePath
slf4jJarName)