packages feed

file-location 0.4.6 → 0.4.7

raw patch · 2 files changed

+3/−10 lines, 2 filesdep +th-orphansPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependencies added: th-orphans

API changes (from Hackage documentation)

- Debug.FileLocation: instance Lift Loc

Files

Debug/FileLocation.hs view
@@ -8,6 +8,7 @@  import Control.Applicative ((<$>), (<*>), pure) import Language.Haskell.TH (recConE, litE, stringL, integerL)+import Language.Haskell.TH.Instances import Language.Haskell.TH.Syntax import Debug.Util import Debug.Trace (trace)@@ -41,15 +42,6 @@   loc <- qLocation   let prefix = "DEBUG: " ++ (locationToString loc) ++ " "   [|(\_x -> ltraceM (prefix ++ show _x) _x)|]--instance Lift Loc where-    lift x = recConE 'Loc [ (,) <$> (pure 'loc_filename) <*> litE (stringL (loc_filename x))-                          , (,) <$> (pure 'loc_package) <*> litE (stringL (loc_package x))-                          , (,) <$> (pure 'loc_module) <*> litE (stringL (loc_module x))-                          , (,) <$> (pure 'loc_start) <*> [|($(litE (integerL (fromIntegral (fst (loc_start x))))),-                                                             $(litE (integerL (fromIntegral (snd (loc_start x)))))) :: (Int, Int)|]-                          , (,) <$> (pure 'loc_end) <*> [|($(litE (integerL (fromIntegral (fst (loc_end x))))),-                                                           $(litE (integerL (fromIntegral (snd (loc_end x)))))) :: (Int, Int)|] ]  -- | Embed an expression of type Loc containing the location -- information for the place where it appears.  Could be used in
file-location.cabal view
@@ -1,5 +1,5 @@ Name:                file-location-Version:             0.4.6+Version:             0.4.7 Synopsis:            common functions that show file location information Homepage:            https://github.com/gregwebs/FileLocation.hs License:             BSD3@@ -69,6 +69,7 @@   Build-depends:  base >= 4 && < 5                 , lifted-base                 , template-haskell+                , th-orphans       >= 0.9                 , transformers     >= 0.2 && < 0.5                 , containers