[1 of 1] Compiling Main ( /in/foo.hs, /tmp/Main.o )
/in/foo.hs:1:19: error:
* Couldn't match expected type `[b0] -> [b0] -> t1'
with actual type `[a0]'
* The function `solve' is applied to two arguments,
but its type `[a0]' has none
In the expression: solve (n - p) p
In the first argument of `(.)', namely `(\ n p -> solve (n - p) p)'
* Relevant bindings include
p :: [b0] (bound at /in/foo.hs:1:16)
n :: [b0] (bound at /in/foo.hs:1:14)
/in/foo.hs:2:9: error:
* Couldn't match expected type `[a]'
with actual type `t0 -> Integer -> [Integer]'
* In an equation for `main':
main
= print . (\ n p -> solve (n - p) p) . map read . words =<< getLine
where
solve x y = y : zipWith (+) (tail solve x y) [y .. ]
* Relevant bindings include solve :: [a] (bound at /in/foo.hs:2:9)
/in/foo.hs:2:32: error:
* Couldn't match expected type `t0 -> Integer -> [Integer]'
with actual type `[a]'
* The function `tail' is applied to three arguments,
but its type `[a] -> [a]' has only one
In the second argument of `zipWith', namely `(tail solve x y)'
In the second argument of `(:)', namely
`zipWith (+) (tail solve x y) [y .. ]'
* Relevant bindings include
x :: t0 (bound at /in/foo.hs:2:15)
solve :: [a] (bound at /in/foo.hs:2:9)