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

Sometimes c.GetHashCode() returns negative integer, thus composing invalid Haskell identifier #1

Closed
SnowOnion opened this issue Nov 10, 2016 · 1 comment

Comments

@SnowOnion
Copy link

I tried the example in Readme:

階阿定畳乗壱[壱至阿]
主推穢空
主定行
 曰、示、階六

and I get

var-1769040242 a = foldr (*) 1 [1 .. a ]
main :: IO () 
main = do 
 putStrLn $ show $ var-1769040242 6 

.
Obviously the code at https://github.com/kazakami/Hasukeru/blob/master/kanji.cs line131:
return "var" + c.GetHashCode() + " ";
converted to -1769040242.

Have you encountered such case that GetHashCode() returns negative integer?

My environment:
Windows 10 (Chinese. Does it matter?),
.NET Framework 4.5

p.s.
私は日本語とHaskellを初めに勉強しました。面白いrepo!:)

@kazakami
Copy link
Owner

kazakami commented Aug 8, 2017

Fixed a problem when GetHashCode() return negative integer with the latest commit.

@kazakami kazakami closed this as completed Aug 8, 2017
@kazakami kazakami reopened this Aug 8, 2017
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

No branches or pull requests

2 participants