Skip to content

Instantly share code, notes, and snippets.

@mattwynne
Created October 25, 2009 13:59
Show Gist options
  • Select an option

  • Save mattwynne/218070 to your computer and use it in GitHub Desktop.

Select an option

Save mattwynne/218070 to your computer and use it in GitHub Desktop.
[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)
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