I'm trying to write a simple path-finding function, but I'm having trouble with an ambiguous Haskell error.
This is my code (simplified to point out the error)
routes :: int -> int -> [(int,int)] -> [[int]]
routes start finish waypoints = [[4]]
And this is the error I'm getting
ERROR "/home/freefrag/Routes":2 - Cannot justify constraints in explicitly typed binding
*** Expression : routes
*** Type : a -> a -> [(a,a)] -> [[a]]
*** Given context : ()
*** Constraints : Num a
can someone let me know what I'm doing wrong?
intis a universally quantified type variable, not the type of integer values. - danportin