Reformat code
This commit is contained in:
parent
2d86d90956
commit
2e6e06310d
@ -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
|
||||
|
@ -8,9 +8,7 @@ import Data.Maybe
|
||||
import Helper
|
||||
|
||||
data Field
|
||||
= Range Int
|
||||
Int
|
||||
Int
|
||||
= Range Int Int Int
|
||||
| Sequence [Int]
|
||||
deriving (Eq, Show)
|
||||
|
||||
|
@ -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 =
|
||||
|
Loading…
Reference in New Issue
Block a user