Clean up some comments

This commit is contained in:
Joscha 2018-01-06 00:53:08 +00:00
parent 0fdac97b6e
commit 560edfac3a

View file

@ -193,9 +193,7 @@ tierName SixteenDays = "16d"
tierName ThirtyTwoDays = "32d" tierName ThirtyTwoDays = "32d"
tierName SixtyFourDays = "64d" tierName SixtyFourDays = "64d"
{- -- Two more utility functions for dealing with NominalDiffTimes
- Converting to String
-}
integerToNom :: Integer -> NominalDiffTime integerToNom :: Integer -> NominalDiffTime
integerToNom = fromInteger integerToNom = fromInteger
@ -203,6 +201,10 @@ integerToNom = fromInteger
nomToInteger :: NominalDiffTime -> Integer nomToInteger :: NominalDiffTime -> Integer
nomToInteger = (truncate :: Double -> Integer) . realToFrac nomToInteger = (truncate :: Double -> Integer) . realToFrac
{-
- Converting to String
-}
-- | Convert an 'Elements' to a string which can be parsed by 'parseElements'. -- | Convert an 'Elements' to a string which can be parsed by 'parseElements'.
-- --
-- This string can then be written to a text file for storage. -- 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. -- | Simple alias to clean up type signatures.
type Parser = Parsec Void String type Parser = Parsec Void String
-- useful parsers
sc :: Parser () sc :: Parser ()
sc = L.space space1 empty empty sc = L.space space1 empty empty
symbol :: String -> Parser String symbol :: String -> Parser String
symbol = L.symbol sc symbol = L.symbol sc
-- useful parsers -- Combines try and lookAhead: Never modifies the stack.
followedBy :: Parser a -> Parser () followedBy :: Parser a -> Parser ()
followedBy = void . try . lookAhead followedBy = void . try . lookAhead