Skip to content

"Uncaught h$setField: setter not implemented for field: 101"#13

Open
lprez wants to merge 1 commit into
ghcjs:masterfrom
lprez:master
Open

"Uncaught h$setField: setter not implemented for field: 101"#13
lprez wants to merge 1 commit into
ghcjs:masterfrom
lprez:master

Conversation

@lprez

@lprez lprez commented Dec 23, 2014

Copy link
Copy Markdown

When there is a typeclass with more than 101 fields, you get this error before the program starts:

Uncaught h$setField: setter not implemented for field: 101

For example here: https://gist.github.com/ZioCrocifisso/5eb583dc525cd02a097c

@luite

luite commented Dec 23, 2014

Copy link
Copy Markdown
Member

this does not survive minification with closure compiler in advanced mode

@luite

luite commented Jan 4, 2015

Copy link
Copy Markdown
Member

do you actually run into this limit? it could be bumped by adding more cases, but a proper solution will probably have to wait until the new codegen has been merged.

@lprez

lprez commented Jan 4, 2015

Copy link
Copy Markdown
Author

Yes, I do. I have a very big typeclass in my project: https://github.com/ZioCrocifisso/FWGL/blob/experimental/FWGL/Backend/GLES.hs
Anyway, I'm using the version of shims that I put in this commit, therefore it isn't a problem, for now.

@lprez

lprez commented Jul 21, 2015

Copy link
Copy Markdown
Author

this does not survive minification with closure compiler in advanced mode

It doesn't work anymore:

$ git clone https://gist.github.com/5eb583dc525cd02a097c.git
$ ghcjs -O 5eb583dc525cd02a097c/gistfile1.hs -o out
$ closure --compilation_level ADVANCED_OPTIMIZATIONS out.jsexe/all.js > test.js
$ node test.js

/tmp/test/test.js:154
;break;default:throw"h$setField: setter not implemented for field: "+b;}}funct
                                                                    ^
h$setField: setter not implemented for field: 101

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 this pull request may close these issues.

2 participants