Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example code from README.md doesn't compile #15

Open
JavierJF opened this issue Apr 5, 2017 · 0 comments
Open

Example code from README.md doesn't compile #15

JavierJF opened this issue Apr 5, 2017 · 0 comments

Comments

@JavierJF
Copy link

JavierJF commented Apr 5, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant