intero 0.1.12 → 0.1.13
raw patch · 5 files changed
+25/−5 lines, 5 filesdep ~ghc
Dependency ranges changed: ghc
Files
- CHANGELOG +3/−0
- elisp/intero.el +1/−1
- intero.cabal +1/−1
- src/GhciFind.hs +10/−1
- src/test/Main.hs +10/−2
CHANGELOG view
@@ -1,3 +1,6 @@+0.1.13:+ * Fix bug in :type-at returning outer span info (https://github.com/commercialhaskell/intero/issues/47)+ 0.1.12: * Emacs mode automatically installs latest intero. * intero-list-buffers command.
elisp/intero.el view
@@ -45,7 +45,7 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Configuration -(defconst intero-package-version "0.1.11"+(defconst intero-package-version "0.1.13" "Package version to auto-install.") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
intero.cabal view
@@ -1,7 +1,7 @@ name: intero version:- 0.1.12+ 0.1.13 synopsis: Complete interactive development program for Haskell license:
src/GhciFind.hs view
@@ -322,7 +322,16 @@ -- | Try to resolve the type display from the given span. resolveSpanInfo :: [SpanInfo] -> Int -> Int -> Int -> Int -> Maybe SpanInfo resolveSpanInfo spanList spanSL spanSC spanEL spanEC =- find (contains spanSL spanSC spanEL spanEC) spanList+ listToMaybe+ (sortBy (flip compareSpanInfoStart)+ (filter (contains spanSL spanSC spanEL spanEC) spanList))++-- | Compare the start of two span infos.+compareSpanInfoStart :: SpanInfo -> SpanInfo -> Ordering+compareSpanInfoStart this that =+ case compare (spaninfoStartLine this) (spaninfoStartLine that) of+ EQ -> compare (spaninfoStartCol this) (spaninfoStartCol that)+ c -> c -- | Does the 'SpanInfo' contain the location given by the Ints? contains :: Int -> Int -> Int -> Int -> SpanInfo -> Bool
src/test/Main.hs view
@@ -145,9 +145,17 @@ issue ":type-at part of a line within a do bloc (1)" "https://github.com/commercialhaskell/intero/issues/29" (typeAt testFile (4,8,4,10," 1") " 1 :: IO ()\n")- issue ":type-at part of a line within a do bloc (2)"+ issue ":type-at part of a line within a do block (2)" "https://github.com/commercialhaskell/intero/issues/29"- (typeAt testFile (4,9,4,10,"1") "1 :: Integer\n"))+ (typeAt testFile (4,9,4,10,"1") "1 :: Integer\n")+ issue ":type-at with operator resolution"+ "https://github.com/commercialhaskell/intero/issues/47"+ (typeAt (unlines ["data X = X"+ ,"instance Show X where"+ ," show _ = show (1::Int,())"+ ,"p s = id s * s == id s * s"])+ (3,18,3,19,"1")+ "1 :: Int\n")) where testFile :: String testFile = unlines ["test = putStrLn (concat3 \"aa\" \"bb\" \"cc\")"