Reformat code
This commit is contained in:
parent
2d86d90956
commit
2e6e06310d
@ -4,10 +4,12 @@ module Constraint
|
|||||||
, inside
|
, inside
|
||||||
) where
|
) where
|
||||||
|
|
||||||
data Constraint = Constraint
|
data Constraint =
|
||||||
{ lower :: Int
|
Constraint
|
||||||
, upper :: Int
|
{ lower :: Int
|
||||||
} deriving (Show, Eq)
|
, upper :: Int
|
||||||
|
}
|
||||||
|
deriving (Show, Eq)
|
||||||
|
|
||||||
inside :: (Int, Int) -> Constraint -> Bool
|
inside :: (Int, Int) -> Constraint -> Bool
|
||||||
inside (x, y) (Constraint lw up) = x >= lw && y <= up
|
inside (x, y) (Constraint lw up) = x >= lw && y <= up
|
||||||
|
@ -8,9 +8,7 @@ import Data.Maybe
|
|||||||
import Helper
|
import Helper
|
||||||
|
|
||||||
data Field
|
data Field
|
||||||
= Range Int
|
= Range Int Int Int
|
||||||
Int
|
|
||||||
Int
|
|
||||||
| Sequence [Int]
|
| Sequence [Int]
|
||||||
deriving (Eq, Show)
|
deriving (Eq, Show)
|
||||||
|
|
||||||
|
@ -10,13 +10,15 @@ import Data.Dates
|
|||||||
import Data.Maybe
|
import Data.Maybe
|
||||||
import Field
|
import Field
|
||||||
|
|
||||||
data Pattern = Pattern
|
data Pattern =
|
||||||
{ cminute :: Field
|
Pattern
|
||||||
, chour :: Field
|
{ cminute :: Field
|
||||||
, cday :: Field
|
, chour :: Field
|
||||||
, cmonth :: Field
|
, cday :: Field
|
||||||
, cweek :: Field
|
, cmonth :: Field
|
||||||
} deriving (Show)
|
, cweek :: Field
|
||||||
|
}
|
||||||
|
deriving (Show)
|
||||||
|
|
||||||
match :: String -> DateTime -> Maybe Bool
|
match :: String -> DateTime -> Maybe Bool
|
||||||
match s d =
|
match s d =
|
||||||
|
Loading…
Reference in New Issue
Block a user