Safe Haskell | None |
---|---|
Language | GHC2024 |
Constraint
Synopsis
- data NotEmpty
- data SeatCapacity (sc :: Nat)
- data BoundedSeatNumber (sc :: Nat)
- data UuidProblem = UuidIsEmpty
Documentation
A non-empty constraint, for containers it means 1+ inhabitants, for uuid it means that it's not zeroed, etc.
Instances
Predicate NotEmpty UUID # | |
Defined in Constraint | |
KnownNat sc => Predicate NotEmpty (Set (Proposal sc)) # | |
Defined in Aggregate.Proposal | |
Predicate NotEmpty (Set Reservation) # | |
Defined in Aggregate.Reservation Methods validate :: Proxy NotEmpty -> Set Reservation -> Maybe RefineException # |
data SeatCapacity (sc :: Nat) #
sc
defines the upper bound capacity, aka the number of seats, range [1 - sc]
Instances
KnownNat sc => Predicate NotEmpty (Set (Proposal sc)) # | |
Defined in Aggregate.Proposal | |
KnownNat sc => Predicate (SeatCapacity sc :: Type) (Set Reservation) # | |
Defined in Aggregate.Reservation Methods validate :: Proxy (SeatCapacity sc) -> Set Reservation -> Maybe RefineException # | |
KnownNat sc => Predicate (SeatCapacity sc :: Type) (Bimap Passenger s) # | |
Defined in Aggregate.Assignment Methods validate :: Proxy (SeatCapacity sc) -> Bimap Passenger s -> Maybe RefineException # |
data BoundedSeatNumber (sc :: Nat) #
sc
upper bound (exclusive) seat number, range [0 - sc)
Instances
KnownNat sc => Predicate NotEmpty (Set (Proposal sc)) # | |
Defined in Aggregate.Proposal | |
KnownNat sc => Predicate (BoundedSeatNumber sc :: Type) (Bimap Passenger AssignableSeat) # | |
Defined in Aggregate.Assignment Methods validate :: Proxy (BoundedSeatNumber sc) -> Bimap Passenger AssignableSeat -> Maybe RefineException # | |
KnownNat sc => Predicate (BoundedSeatNumber sc :: Type) (Bimap Passenger Seat) # | |
Defined in Aggregate.Assignment Methods validate :: Proxy (BoundedSeatNumber sc) -> Bimap Passenger Seat -> Maybe RefineException # |
data UuidProblem #
Generic implementations
Constructors
UuidIsEmpty |
Instances
Exception UuidProblem # | |
Defined in Constraint Methods toException :: UuidProblem -> SomeException # fromException :: SomeException -> Maybe UuidProblem # displayException :: UuidProblem -> String # backtraceDesired :: UuidProblem -> Bool # | |
Show UuidProblem # | |
Defined in Constraint Methods showsPrec :: Int -> UuidProblem -> ShowS # show :: UuidProblem -> String # showList :: [UuidProblem] -> ShowS # |