File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -196,12 +196,14 @@ data Format =
196
196
| GnuFormat
197
197
deriving (Eq , Ord , Show )
198
198
199
- instance NFData (GenEntry tarPath linkTarget ) where
200
- rnf (Entry _ c _ _ _ _) = rnf c
199
+ instance ( NFData tarPath , NFData linkTarget ) => NFData (GenEntry tarPath linkTarget ) where
200
+ rnf (Entry p c _ _ _ _) = rnf p `seq` rnf c
201
201
202
- instance NFData (GenEntryContent linkTarget ) where
202
+ instance NFData linkTarget => NFData (GenEntryContent linkTarget ) where
203
203
rnf x = case x of
204
204
NormalFile c _ -> rnf c
205
+ SymbolicLink lnk -> rnf lnk
206
+ HardLink lnk -> rnf lnk
205
207
OtherEntryType _ c _ -> rnf c
206
208
_ -> seq x ()
207
209
@@ -666,7 +668,7 @@ instance Monoid (GenEntries tarPath linkTarget e) where
666
668
mempty = Done
667
669
mappend = (Sem. <>)
668
670
669
- instance NFData e => NFData (GenEntries tarPath linkTarget e ) where
671
+ instance ( NFData tarPath , NFData linkTarget , NFData e ) => NFData (GenEntries tarPath linkTarget e ) where
670
672
rnf (Next e es) = rnf e `seq` rnf es
671
673
rnf Done = ()
672
674
rnf (Fail e) = rnf e
You can’t perform that action at this time.
0 commit comments