Skip to content

Instantly share code, notes, and snippets.

@chrisdone
Created October 7, 2019 13:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisdone/c7cf46b2d74f01113301f94290523738 to your computer and use it in GitHub Desktop.
Save chrisdone/c7cf46b2d74f01113301f94290523738 to your computer and use it in GitHub Desktop.
intero-file-embed
{-# 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