Created
October 7, 2019 13:21
-
-
Save chrisdone/c7cf46b2d74f01113301f94290523738 to your computer and use it in GitHub Desktop.
intero-file-embed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE CPP #-} | |
-- | | |
module Data.FileEmbed2 | |
( makeRelativeToProject2 | |
, module Data.FileEmbed | |
) where | |
import Data.FileEmbed | |
import Language.Haskell.TH | |
import System.Environment | |
-- @since 0.0.10 | |
makeRelativeToProject2 :: FilePath -> Q FilePath | |
makeRelativeToProject2 fp = do | |
m <- runIO (lookupEnv "INTERO") | |
case m of | |
Nothing -> makeRelativeToProject fp | |
Just {} -> pure fp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment