on decrease-android-validity help sign in
14 lines 386 B history raw
1module Obelisk.Asset.TH
2 ( assetPath
3 ) where
5import Obelisk.Asset.Gather
7import Language.Haskell.TH.Syntax
8import System.FilePath.Posix
10-- | Produces a string literal with the hashed path of the file
11assetPath :: FilePath -> FilePath -> Q Exp
12assetPath root relativePath = do
13 qAddDependentFile $ root </> relativePath
14 LitE . StringL <$> runIO (toHashedPath root relativePath)