add File.zeroTime for a dummy time value
this is used in REPL errors to make it easier to reuse existing code to
print out error messages
commitcc45728619ebe0d8e0e620d56a8f030ad9e0d5af
authorEvan Czaplicki <evancz@users.noreply.github.com>
dateMon 24 Jun 2019, 16:50 (7 years ago)
parent21fe4a9
builder/src/File.hs+6
@@ -1,6 +1,7 @@
11module File
22 ( Time
33 , getTime
4+ , zeroTime
45 , writeBinary
56 , readBinary
67 , writeUtf8
@@ -49,6 +50,11 @@ getTime path =
4950 (Dir.getModificationTime path)
5051
5152
53+zeroTime :: Time
54+zeroTime =
55+ Time 0
56+
57+
5258instance Binary.Binary Time where
5359 put (Time time) = Binary.put time
5460 get = Time <$> Binary.get