packages feed

threepenny-gui-0.4.0.0: samples/Paths.hs

{-# LANGUAGE CPP#-}
module Paths (getStaticDir) where

import Control.Monad
import System.FilePath

#if CABAL
-- using cabal
import qualified Paths_threepenny_gui (getDataDir)

getStaticDir :: IO FilePath
getStaticDir = (</> "wwwroot") `liftM` Paths_threepenny_gui.getDataDir

#else
-- using GHCi

getStaticDir :: IO FilePath
getStaticDir = return "../wwwroot/"

#endif