This file is indexed.

/usr/share/doc/libghc-time-compat-doc/html/time-compat.txt is in libghc-time-compat-doc 0.1.0.3-7build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Compatibility with old-time for the time package
--   
--   Compatibility with the <a>old-time</a> package for the "new"
--   <a>time</a> package.
@package time-compat
@version 0.1.0.3


-- | Compatibility with the <a>old-time</a> package for the "new"
--   <a>time</a> package.
--   
--   This is useful for writing portable code; in particular, if you're
--   using the <a>directory</a> package and you want your code to build
--   with both GHC 7.6 and earlier versions. The version of
--   <tt>directory</tt> used with GHC 7.6 changed a dependency from
--   <tt>old-time</tt> to <tt>time</tt> which means its
--   <tt>getModificationTime</tt> function now returns a <a>UTCTime</a>
--   instead of a <a>ClockTime</a>. This type affects the public API of
--   many libraries that use it. To make such libraries portable, port your
--   code to use the <tt>time</tt> package and to only rely on
--   <a>UTCTime</a> in its public API, and call <a>toUTCTime</a> on the
--   values returned by functions like <tt>getModificationTime</tt>, for
--   example:
--   
--   <pre>
--   fmap toUTCTime getModificationTime
--   </pre>
--   
--   If you're using <tt>directory-1.2</tt>, <a>toUTCTime</a> will just be
--   <a>id</a> and the original value is returned intact. If you're using
--   an older <tt>directory</tt>, for example because you're building with
--   GHC 7.4, the <a>ClockTime</a> returned by <tt>getModificationTime</tt>
--   will be converted to a <a>UTCTime</a> and will be compatible with your
--   code ported to the new <tt>time</tt> package.
module Data.Time.Compat
class ToUTCTime a
toUTCTime :: ToUTCTime a => a -> UTCTime
instance Data.Time.Compat.ToUTCTime Data.Time.Clock.UTC.UTCTime
instance Data.Time.Compat.ToUTCTime System.Time.ClockTime
instance Data.Time.Compat.ToUTCTime System.Time.CalendarTime