Clean up some comments
This commit is contained in:
parent
0fdac97b6e
commit
560edfac3a
1 changed files with 8 additions and 5 deletions
13
src/Cards.hs
13
src/Cards.hs
|
|
@ -193,9 +193,7 @@ tierName SixteenDays = "16d"
|
|||
tierName ThirtyTwoDays = "32d"
|
||||
tierName SixtyFourDays = "64d"
|
||||
|
||||
{-
|
||||
- Converting to String
|
||||
-}
|
||||
-- Two more utility functions for dealing with NominalDiffTimes
|
||||
|
||||
integerToNom :: Integer -> NominalDiffTime
|
||||
integerToNom = fromInteger
|
||||
|
|
@ -203,6 +201,10 @@ integerToNom = fromInteger
|
|||
nomToInteger :: NominalDiffTime -> Integer
|
||||
nomToInteger = (truncate :: Double -> Integer) . realToFrac
|
||||
|
||||
{-
|
||||
- Converting to String
|
||||
-}
|
||||
|
||||
-- | Convert an 'Elements' to a string which can be parsed by 'parseElements'.
|
||||
--
|
||||
-- This string can then be written to a text file for storage.
|
||||
|
|
@ -235,14 +237,15 @@ cardToString Card{sides=s, tier=t, lastChecked=lc, offset=o}
|
|||
-- | Simple alias to clean up type signatures.
|
||||
type Parser = Parsec Void String
|
||||
|
||||
-- useful parsers
|
||||
|
||||
sc :: Parser ()
|
||||
sc = L.space space1 empty empty
|
||||
|
||||
symbol :: String -> Parser String
|
||||
symbol = L.symbol sc
|
||||
|
||||
-- useful parsers
|
||||
|
||||
-- Combines try and lookAhead: Never modifies the stack.
|
||||
followedBy :: Parser a -> Parser ()
|
||||
followedBy = void . try . lookAhead
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue