Created
October 25, 2009 13:59
-
-
Save mattwynne/218070 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [matt@bowie src (master)]$ runhaskell Tests.hs | |
| Tests.hs:13:9: | |
| Ambiguous type variable `a' in the constraints: | |
| `Show a' arising from a use of `~?=' at Tests.hs:(13,9)-(14,11) | |
| `Eq a' arising from a use of `~?=' at Tests.hs:(13,9)-(14,11) | |
| Probable fix: add a type signature that fixes these type variable(s) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Main | |
| where | |
| import Test.HUnit | |
| import Cities | |
| main = runTestTT tests | |
| tests = TestList [ | |
| "check" ~: 1 ~?= 0, | |
| "calculates for a single user" | |
| ~: affinities [("matt", ["london"])] | |
| ~?= [], | |
| "calculates city affinities" | |
| ~: affinities [("matt", ["london","paris","nyc"]),("sue", ["london", "nyc"])] | |
| ~?= [("london","nyc",2),("london","paris",1),("paris","nyc",1)] | |
| ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment