Fix Binary SymbolDb instance for ghc 7.6

This commit is contained in:
Nikolay Yakimov 2016-07-10 18:35:44 +03:00
parent 1a302707b3
commit 0eb87f34c4
1 changed files with 9 additions and 0 deletions

View File

@ -72,7 +72,16 @@ data SymbolDb = SymbolDb
, sdTimestamp :: ModTime
} deriving (Generic)
#if __GLASGOW_HASKELL__ >= 708
instance Binary SymbolDb
#else
instance Binary SymbolDb where
put (SymbolDb a b) = put a >> put b
get = do
a <- get
b <- get
return (SymbolDb a b)
#endif
instance NFData SymbolDb
isOutdated :: IOish m => SymbolDb -> GhcModT m Bool