Safe Haskell | None |
---|---|
Language | GHC2024 |
Aggregate.Assignment
Contents
Synopsis
- type Assignments (sc :: Nat) = Refined (SeatCapacity sc && BoundedSeatNumber sc) (Bimap Passenger Seat)
- type ConfirmableAssignments (sc :: Nat) = Refined (SeatCapacity sc && BoundedSeatNumber sc) (Bimap Passenger AssignableSeat)
- data AssignmentsProblem
- parseAssignmentsProblem :: RefineException -> AssignmentsProblem
- partitionConfirmableAssignments :: forall (sc :: Nat). ConfirmableAssignments sc -> (Bimap Passenger Seat, Bimap Passenger AssignableSeat)
Documentation
type Assignments (sc :: Nat) = Refined (SeatCapacity sc && BoundedSeatNumber sc) (Bimap Passenger Seat) #
type ConfirmableAssignments (sc :: Nat) = Refined (SeatCapacity sc && BoundedSeatNumber sc) (Bimap Passenger AssignableSeat) #
data AssignmentsProblem #
Constructors
AssignmentsIsEmpty | |
AssignmentsExceedSeatCapacity | |
AssignmentsContainOutOfRangeSeat | |
AssignmentsCorrupt Text |
Instances
Exception AssignmentsProblem # | |
Defined in Aggregate.Assignment Methods toException :: AssignmentsProblem -> SomeException # fromException :: SomeException -> Maybe AssignmentsProblem # | |
Show AssignmentsProblem # | |
Defined in Aggregate.Assignment Methods showsPrec :: Int -> AssignmentsProblem -> ShowS # show :: AssignmentsProblem -> String # showList :: [AssignmentsProblem] -> ShowS # | |
Eq AssignmentsProblem # | |
Defined in Aggregate.Assignment Methods (==) :: AssignmentsProblem -> AssignmentsProblem -> Bool # (/=) :: AssignmentsProblem -> AssignmentsProblem -> Bool # |
parseAssignmentsProblem :: RefineException -> AssignmentsProblem #
Parse RefineException
to AssignmentsProblem
, falls back to AssignmentsCorrupt
partitionConfirmableAssignments :: forall (sc :: Nat). ConfirmableAssignments sc -> (Bimap Passenger Seat, Bimap Passenger AssignableSeat) #
Partitions ConfirmableAssignments
into assigned / unassigned
Orphan instances
KnownNat sc => Predicate (BoundedSeatNumber sc :: Type) (Bimap Passenger AssignableSeat) # | |
Methods validate :: Proxy (BoundedSeatNumber sc) -> Bimap Passenger AssignableSeat -> Maybe RefineException # | |
KnownNat sc => Predicate (BoundedSeatNumber sc :: Type) (Bimap Passenger Seat) # | |
Methods validate :: Proxy (BoundedSeatNumber sc) -> Bimap Passenger Seat -> Maybe RefineException # | |
KnownNat sc => Predicate (SeatCapacity sc :: Type) (Bimap Passenger s) # | |
Methods validate :: Proxy (SeatCapacity sc) -> Bimap Passenger s -> Maybe RefineException # |