Portability | portable |
---|---|
Stability | experimental |
Maintainer | Drew Day<drewday@gmail.com> |
Safe Haskell | Safe-Infered |
- p :: Show a => a -> IO ()
- enrollment :: Relation [Char] [Char]
- rebecaenrollment :: Set [Char]
- takingreligion :: Set [Char]
- others :: Set [Char]
- test1 :: Bool
- takingreligion2 :: Relation [Char] [Char]
- id1 :: Set [Char] -> (Bool, Set [Char])
- id2 :: Set [Char] -> (Bool, Set [Char])
- id3 :: Set [Char] -> (Bool, Set [Char])
- id4 :: Set [Char] -> (Bool, Set [Char])
- religion :: Set [Char]
- teresa :: Set [Char]
- t11 :: (Bool, Set [Char])
- t12 :: (Bool, Set [Char])
- t13 :: (Bool, Set [Char])
- t14 :: (Bool, Set [Char])
- id1R, id2R :: (Ord a, Ord b) => Set b -> Relation a b -> Bool
- id3R, id4R :: (Ord a, Ord b) => Set a -> Relation a b -> Bool
- testAll :: Bool
Documentation
p :: Show a => a -> IO ()Source
Documentation Tests
All examples in this module are tested automatically with Doctest, and pretty printed with Text.Groom.
This output is provided as proof of the correctness of the REPL (>>>
) text:
There are 12 tests, with 12 total interactions. Examples: 12 Tried: 12 Errors: 0 Failures: 0
enrollment :: Relation [Char] [Char]Source
Example 2:
A student x can take n classes.
- Each student must take at least 1 class
- Each class must have at least one student.
>>>
p enrollment
Relation{domain = fromList [("Antonio", fromList ["History"]), ("Rebeca", fromList ["History", "Mathematics"]), ("Rolando", fromList ["Comunication", "Religion"]), ("Teresa", fromList ["Architecture", "Religion"])], range = fromList [("Architecture", fromList ["Teresa"]), ("Comunication", fromList ["Rolando"]), ("History", fromList ["Antonio", "Rebeca"]), ("Mathematics", fromList ["Rebeca"]), ("Religion", fromList ["Rolando", "Teresa"])]}
rebecaenrollment :: Set [Char]Source
>>>
p rebecaenrollment
fromList ["History", "Mathematics"]
takingreligion :: Set [Char]Source
>>>
p takingreligion
fromList ["Rolando", "Teresa"]
takingreligion2 :: Relation [Char] [Char]Source
>>>
p takingreligion2
Relation{domain = fromList [("Rolando", fromList ["Religion"]), ("Teresa", fromList ["Religion"])], range = fromList [("Religion", fromList ["Rolando", "Teresa"])]}