Hello everybody,
when I compile the file
I get
main.hs:28:64:
Could not deduce (Enum (a, t0))
arising from the arithmetic sequence `0 .. '
from the context (Integral a)
bound by the type signature for
plotAsString :: Integral a => [(a, a)] -> (a, a) -> String
at main.hs:(26,1)-(38,41)
Possible fix:
add (Enum (a, t0)) to the context of
the type signature for
plotAsString :: Integral a => [(a, a)] -> (a, a) -> String
or add an instance declaration for (Enum (a, t0))
In the second argument of `zip', namely `[0 .. ]'
In the first argument of `M.fromList', namely `(zip locs [0 .. ])'
In the expression: M.fromList (zip locs [0 .. ])
main.hs:28:65:
Could not deduce (Num (a, t0)) arising from the literal `0'
from the context (Integral a)
bound by the type signature for
plotAsString :: Integral a => [(a, a)] -> (a, a) -> String
at main.hs:(26,1)-(38,41)
Possible fix:
add (Num (a, t0)) to the context of
the type signature for
plotAsString :: Integral a => [(a, a)] -> (a, a) -> String
or add an instance declaration for (Num (a, t0))
In the expression: 0
In the second argument of `zip', namely `[0 .. ]'
In the first argument of `M.fromList', namely `(zip locs [0 .. ])'
can somebody help?
Thanks,
Sunil.