Reformat code

This commit is contained in:
Anton Vakhrushev 2020-06-20 12:40:10 +03:00
parent 2d86d90956
commit 2e6e06310d
3 changed files with 16 additions and 14 deletions

View File

@ -4,10 +4,12 @@ module Constraint
, inside
) where
data Constraint = Constraint
{ lower :: Int
, upper :: Int
} deriving (Show, Eq)
data Constraint =
Constraint
{ lower :: Int
, upper :: Int
}
deriving (Show, Eq)
inside :: (Int, Int) -> Constraint -> Bool
inside (x, y) (Constraint lw up) = x >= lw && y <= up

View File

@ -8,9 +8,7 @@ import Data.Maybe
import Helper
data Field
= Range Int
Int
Int
= Range Int Int Int
| Sequence [Int]
deriving (Eq, Show)

View File

@ -10,13 +10,15 @@ import Data.Dates
import Data.Maybe
import Field
data Pattern = Pattern
{ cminute :: Field
, chour :: Field
, cday :: Field
, cmonth :: Field
, cweek :: Field
} deriving (Show)
data Pattern =
Pattern
{ cminute :: Field
, chour :: Field
, cday :: Field
, cmonth :: Field
, cweek :: Field
}
deriving (Show)
match :: String -> DateTime -> Maybe Bool
match s d =