{-# LANGUAGE FlexibleInstances #-} module PATHTH where import Data.String (IsString(..)) import Language.Haskell.TH.Syntax (Q, TExp(..), lift) import Path instance IsString (Q (TExp (Path Rel Dir))) where fromString = fmap TExp . mkRelDir instance IsString (Q (TExp (Path Abs Dir))) where fromString = fmap TExp . mkAbsDir instance IsString (Q (TExp (Path Rel File))) where fromString = fmap TExp . mkRelFile instance IsString (Q (TExp (Path Abs File))) where fromString = fmap TExp . mkAbsFile