dependent-map icon indicating copy to clipboard operation
dependent-map copied to clipboard

Example code from README.md doesn't compile

Open JavierJF opened this issue 9 years ago • 0 comments

The example code showed in the README.md doesn't compile under the GHC version 7.10.3.

Give several errors as:

Couldn't match type ‘Char’ with ‘[Char]’ Expected type: [String] Actual type: [Char] In the second argument of ‘(:=>)’, namely ‘"hello there"’ In the expression: Baz :=> "hello there" In the first argument of ‘fromList’, namely ‘[Foo :=> pi, Baz :=> "hello there"]’ /home/osboxes/Documents/Haskell-Workshop/app/Main.hs: 6, 19

No instance for (Num [Int]) arising from the literal ‘42’ In the second argument of ‘singleton’, namely ‘42’ In the expression: singleton Bar 42 In an equation for ‘y’: y = singleton Bar 42 /home/osboxes/Documents/Haskell-Workshop/app/Main.hs: 15, 20

Couldn't match type ‘v’ with ‘[v]’ ‘v’ is a rigid type variable bound by a type expected by the context: Foo v -> [v] -> [v] -> [v] at app/Main.hs:15:7 Expected type: Foo v -> [v] -> [v] -> [v] Actual type: Foo [v] -> [v] -> [v] -> [v] In the first argument of ‘unionWithKey’, namely ‘addFoo’ In the expression: unionWithKey addFoo x z

JavierJF avatar Apr 05 '17 12:04 JavierJF