on master help sign in
Stylish fixes
commited80b7d4be6c07926314fa5fc25be485b4670e2a authorEdwin Brady <ecb10@st-andrews.ac.uk> dateTue 23 Oct 2018, 11:10 (8 years ago) parent5c02f10
2 files changed+9−8
src/Idris/IBC.hs+5−5 src/Idris/Parser.hs+4−3
src/Idris/IBC.hs+5−5
@@ -12,7 +12,7 @@ Maintainer : The Idris Community.
1212
1313module Idris.IBC (loadIBC, loadPkgIndex,
1414 writeIBC, writePkgIndex,
15− hasValidIBCVersion, IBCPhase(..),
15+ hasValidIBCVersion, IBCPhase(..),
1616 getIBCHash, getImportHashes) where
1717
1818import Idris.AbsSyntax
@@ -152,7 +152,7 @@ getIBCHash fp
152152 case toArchiveOrFail archiveFile of
153153 Left _ -> return 0
154154 Right archive -> getEntry 0 "iface_hash" archive
155−
155+
156156
157157getImportHashes :: FilePath -> Idris [(FilePath, Int)]
158158getImportHashes fp
@@ -259,12 +259,12 @@ qhash hash (x:xs) = qhash (hash * 33 + fromIntegral (fromEnum x)) xs
259259
260260hashTerm :: Term -> Int
261261hashTerm t = qhash 5381 (show t)
262−
262+
263263hashName :: Name -> Int
264264hashName n = qhash 5381 (show n)
265265
266266calculateHash :: IState -> IBCFile -> Int
267−calculateHash ist f
267+calculateHash ist f
268268 = let acc = L.filter exported (ibc_access f) in
269269 mkHashFrom (map fst acc) (getDefs acc)
270270 where
@@ -276,7 +276,7 @@ calculateHash ist f
276276 exported _ = False
277277
278278 findTms :: [(a, Term, Term)] -> [Term]
279− findTms = L.concatMap (\ (_, x, y) -> [x, y])
279+ findTms = L.concatMap (\ (_, x, y) -> [x, y])
280280
281281 patDef :: Name -> [Term]
282282 patDef n
src/Idris/Parser.hs+4−3
@@ -55,7 +55,8 @@ import Data.Maybe
5555import Data.Ord
5656import qualified Data.Set as S
5757import qualified Data.Text as T
58−import qualified System.Directory as Dir (makeAbsolute, getModificationTime, doesFileExist)
58+import qualified System.Directory as Dir (doesFileExist, getModificationTime,
59+ makeAbsolute)
5960import System.FilePath
6061import Text.Megaparsec ((<?>))
6162import qualified Text.Megaparsec as P
@@ -1678,7 +1679,7 @@ loadSource lidr f toline
16781679 -- hashes are the same as the ones we've just read,
16791680 -- quit and just load the IBC
16801681
1681− let needLoad = (ibcmod <= fmod) ||
1682+ let needLoad = (ibcmod <= fmod) ||
16821683 (sort impHashes /= sort (mapMaybe id newHashes))
16831684
16841685 if not needLoad
@@ -1724,7 +1725,7 @@ loadSource lidr f toline
17241725 i <- getIState
17251726 putIState (i { default_access = Private, module_aliases = modAliases })
17261727 clearIBC -- start a new .ibc file
1727− mapM_ addIBC (map (\ (f, h) -> IBCImportHash f h)
1728+ mapM_ addIBC (map (\ (f, h) -> IBCImportHash f h)
17281729 (mapMaybe id newHashes))
17291730 -- record package info in .ibc
17301731 imps <- allImportDirs