What would be the right way to invoke the Websharper compiler in version 4? Can you provide a snippet like the one above?
Thank you!
Hi,
try.websharper.com already uses WebSharper 4 beta, that's where the difference is coming from.
WS3 tranlates from F# quotations (ReflectedDefinition), and the F# compiler itself creates these extra-long form on complicated match expressions. WS3 is could have tried to optimize it away, but we never got around to implement this.
WS4 translates from source code (using FSharp.Compiler.Service) which does not have this issue, matches can usually be tranlated to switch statements which are in linear size to the original.
You can find the upgrade guide to WS4 here: WebSharper 3 to 4-beta update guide
Topic tags
- f# × 3707
- websharper × 2884
- core × 418
- bolero × 329
- compiler × 291
- enhancement × 215
- functional × 201
- bug × 177
- ui next × 140
- ui × 132
- c# × 122
- classes × 97
- web × 97
- .net × 84
- book × 84
- async × 77
- ui.next × 67
- templates × 58
- website × 51
- trywebsharper × 50
- question × 46
- html × 45
- server × 45
- owin × 44
- javascript × 43
- parallel × 43
- parsing × 41
- testing × 41
- typescript × 39
- template × 38
- sitelet × 31
- asynchronous × 30
- feature request × 28
- monad × 28
- ocaml × 28
- warp × 28
- tutorial × 27
- haskell × 26
- dotnet-ws × 23
- linq × 22
- sitelets × 22
- workflows × 22
- rpc × 21
- getting started × 20
- wpf × 20
- fpish × 19
- introduction × 19
- silverlight × 19
- monodevelop × 17
- piglets × 17
- suave × 17
- docs × 16
- collections × 15
- jquery × 15
- proposal × 15
- aspnetcore × 14
- pipeline × 14
- reactive × 14
- 4.6.0.361 × 13
- documentation × 13
- kendoui × 13
- formlets × 12
- 4.1.0.171 × 11
- monads × 11
- released: v0.1 × 11
- websocket × 11
- 4.4.0.280 × 10
- 4.4.1.288 × 10
- opinion × 10
- tryfsharponwasm × 10
- 4.0.190.100-rc × 9
- deployment × 9
- fixed × 9
- in × 9
- json × 9
- plugin × 9
- scheme × 9
- solid × 9
- wontfix × 9
- 4.3.0.274 × 8
- 4.5.4.317 × 8
- basics × 8
- concurrent × 8
- highcharts × 8
- how-to × 8
- mvu × 8
- python × 8
- released: v0.11 × 8
- 4.1.1.175 × 7
- 4.5.1.304 × 7
- complexity × 7
- remoting × 7
- visual studio × 7
- 4.1.2.178 × 6
- 4.5.4.151 × 6
- authentication × 6
- datefns × 6
- lisp × 6
- real-world × 6
- released in 4.0.192.103-rc × 6
- resources × 6
- scala × 6
- websharper ui.next × 6
- workshop × 6
- xaml × 6
- 4.0.193.110 × 5
- 4.2.11.258 × 5
- 4.2.3.236 × 5
- aspnetmvc × 5
- azure × 5
- bootstrap × 5
- conference × 5
- css × 5
- dsl × 5
- formlet × 5
- java × 5
- list × 5
- metaprogramming × 5
- ml × 5
- q&a × 5
- released in Zafir.4.0.188.91-beta10 × 5
- released: v0.4 × 5
- released: v0.8 × 5
- spa × 5
- sql × 5
- visualstudio × 5
- websharper.forms × 5
- zafir × 5
- 4.0.192.106 × 4
- 4.0.195.127 × 4
- 4.1.0.38 × 4
- 4.2.1.86 × 4
- 4.2.13.263 × 4
- 4.2.6.118 × 4
- 4.5.5.155 × 4
- 4.6.4.404 × 4
- discussion × 4
- example × 4
- extension × 4
- extensions × 4
- fsi × 4
- fsx × 4
- help wanted × 4
- highlightjs × 4
- html5 × 4
- jqueryui × 4
- lift × 4
- performance × 4
- qna × 4
- react × 4
- reflection × 4
- released: v0.10 × 4
- released: v0.5 × 4
- remote × 4
- rest × 4
- teaching × 4
- todomvc × 4
- 4.0.196.147 × 3
- 4.1.0.34 × 3
- 4.1.6.207 × 3
- 4.2.1.223-beta × 3
- 4.2.14.264 × 3
- 4.2.4.114 × 3
- 4.2.4.247 × 3
- 4.2.5.115 × 3
- 4.2.6.253 × 3
- 4.2.9.256 × 3
- 4.5.0.140 × 3
- 4.5.0.290 × 3
- 4.5.18.348 × 3
- 4.5.2.309 × 3
- 4.5.8.327 × 3
- 4.6.2.386 × 3
- ajax × 3
- alt.net × 3
- aml × 3
- asp.net mvc × 3
- build × 3
- canvas × 3
- cloudsharper × 3
- compilation × 3
- d3 × 3
- data × 3
- database × 3
- erlang × 3
- events × 3
- file upload × 3
- forums × 3
- how to × 3
- http × 3
- inline × 3
- issue × 3
- kendo × 3
- macro × 3
- materialui × 3
- mono × 3
- msbuild × 3
- mvc × 3
- pattern × 3
- piglet × 3
- released in Zafir.4.0.187.90-beta10 × 3
- released: v0.12 × 3
- released: v0.9 × 3
- svg × 3
- type provider × 3
- view × 3
- websharper4 × 3
- 4.1.1.64 × 2
- 4.1.5.203 × 2
- 4.1.7.232 × 2
- 4.2.10.257 × 2
- 4.2.3.111 × 2
- 4.2.5.249 × 2
- 4.3.0.127 × 2
- 4.3.1.275 × 2
- 4.5.10.166 × 2
- 4.5.10.332 × 2
- 4.5.15.342 × 2
- 4.5.19.349 × 2
- 4.5.3.146 × 2
- 4.5.9.301 × 2
- android × 2
- api × 2
- asp.net × 2
- beginner × 2
- blog × 2
- chart × 2
- client × 2
- client server app × 2
- clojure × 2
- computation expressions × 2
- constructor × 2
- corporate × 2
- courses × 2
- cufp × 2
- debugging × 2
- direct × 2
- discriminated union × 2
- dom × 2
- elm × 2
- endpoint × 2
- endpoints × 2
- enterprise × 2
- entity framework × 2
- event × 2
- f# interactive × 2
- fable × 2
- flowlet × 2
- formdata × 2
- forms × 2
- fsc × 2
- fsharp × 2
- google × 2
- google maps × 2
- hosting × 2
- https × 2
- iis 8.0 × 2
- install × 2
- interactive × 2
- interface × 2
- iphone × 2
- iteratee × 2
- jobs × 2
- jquery mobile × 2
- keynote × 2
- lens × 2
- lenses × 2
- linux × 2
- listmodel × 2
- mac × 2
- maps × 2
- numeric × 2
- oauth × 2
- obfuscation × 2
- offline × 2
- oop × 2
- osx × 2
- packaging × 2
- pattern matching × 2
- pipelines × 2
- post × 2
- quotation × 2
- reference × 2
- released in Zafir.4.0.185.88-beta10 × 2
- released: v0.13 × 2
- released: v0.6 × 2
- remarkable × 2
- rx × 2
- script × 2
- security × 2
- self host × 2
- seq × 2
- sockets × 2
- stm × 2
- sweetalert × 2
- tcp × 2
- trie × 2
- tutorials × 2
- type × 2
- url × 2
- var × 2
- websharper.charting × 2
- websockets × 2
- wig × 2
- xna × 2
- zh × 2
- .net framework × 1
- .net interop × 1
- 2012 × 1
- 4.0.194.126 × 1
- 4.1.3.184 × 1
- 4.1.4.189 × 1
- 4.2.0.214-beta × 1
- 4.2.12.259 × 1
- 4.2.2.231-beta × 1
- 4.2.8.255 × 1
- 4.4.1.137 × 1
- 4.5.1.141 × 1
- 4.5.11.334 × 1
- 4.5.12.177 × 1
- 4.5.13.318 × 1
- 4.5.13.338 × 1
- 4.5.16.344 × 1
- 4.5.2.145 × 1
- 4.5.3.144 × 1
- 4.5.3.310 × 1
- 4.5.5.319 × 1
- 4.5.6.156 × 1
- 4.5.6.320 × 1
- 4.5.7.322 × 1
- 4.5.8.161 × 1
- 4.5.9.164 × 1
- 4.6.1.127 × 1
- 4.6.1.381 × 1
- 4.6.3.388 × 1
- 4.6.5.406 × 1
- 4.6.6.407 × 1
- Canvas Sample Example × 1
- DynamicStyle Animated Style × 1
- ES8 × 1
- Fixed in 4.0.190.100-rc × 1
- Metro-Ui-Css × 1
- Metro4 × 1
- Released in Zafir.UI.Next.4.0.169.79-beta10 × 1
- SvgDynamicAttribute × 1
- Swiper × 1
- WebComponent × 1
- WebSharper.TypeScript × 1
- abstract class × 1
- accumulator × 1
- active pattern × 1
- actor × 1
- addin × 1
- agents × 1
- aggregation × 1
- agile × 1
- alter session × 1
- animation × 1
- anonymous object × 1
- apache × 1
- appcelerator × 1
- architecture × 1
- array × 1
- arrays × 1
- asp.net 4.5 × 1
- asp.net core × 1
- asp.net integration × 1
- asp.net mvc 4 × 1
- asp.net web api × 1
- aspnet × 1
- ast × 1
- attributes × 1
- authorization × 1
- b-tree × 1
- back button × 1
- badimageformatexception × 1
- bash script × 1
- batching × 1
- binding-vars × 1
- bistro × 1
- body × 1
- bundle × 1
- camtasia studio × 1
- cas protocol × 1
- charts × 1
- clarity × 1
- class × 1
- cli × 1
- clipboard × 1
- clojurescript × 1
- closures × 1
- cloud × 1
- cms × 1
- code-review × 1
- coding diacritics × 1
- color highlighting × 1
- color zones × 1
- combinator × 1
- combinators × 1
- compile × 1
- compile code on server × 1
- config × 1
- confirm × 1
- content × 1
- context × 1
- context.usersession × 1
- continuation-passing style × 1
- coords × 1
- cordova × 1
- cors × 1
- coursera × 1
- cross-domain × 1
- csla × 1
- current_schema × 1
- custom content × 1
- data grid × 1
- datetime × 1
- debug × 1
- declarative × 1
- delete × 1
- devexpress × 1
- dhtmlx × 1
- dictionary × 1
- directattribute × 1
- disqus × 1
- distance × 1
- do binding × 1
- doc elt ui.next upgrade × 1
- docker × 1
- dojo × 1
- dol × 1
- domain × 1
- dotnet core × 1
- du × 1
- duf-101 × 1
- dynamic × 1
- eastern language × 1
- eclipse × 1
- edsl × 1
- em algorithm × 1
- emacs × 1
- emotion × 1
- enums × 1
- error × 1
- etw × 1
- euclidean × 1
- eventhandlerlist × 1
- examples × 1
- ext js × 1
- extension methods × 1
- extjs × 1
- extra × 1
- facet pattern × 1
- failed to translate × 1
- fake × 1
- fantomas × 1
- fear × 1
- float × 1
- form × 1
- form-data × 1
- forum × 1
- fp × 1
- frank × 1
- fsdoc × 1
- fsharp.core × 1
- fsharp.powerpack × 1
- fsharpx × 1
- fsunit × 1
- function × 1
- functional style × 1
- game × 1
- games × 1
- gc × 1
- generic × 1
- geometry × 1
- getlastwin32error × 1
- getting-started × 1
- good first issue × 1
- google visualization timeline × 1
- google.maps × 1
- grid × 1
- group × 1
- guide × 1
- hash × 1
- headers × 1
- hello world example × 1
- heroku × 1
- highchart × 1
- history × 1
- html-templating × 1
- http405 × 1
- httpcontext × 1
- hubfs × 1
- i18n × 1
- ide × 1
- ie 8 × 1
- if-doc × 1
- iis × 1
- image × 1
- images × 1
- inheritance × 1
- initialize × 1
- input × 1
- install "visual studio" × 1
- installer × 1
- int64 × 1
- interfaces × 1
- internet explorer × 1
- interop × 1
- interpreter × 1
- invalid × 1
- io × 1
- iobservable × 1
- ios × 1
- iot × 1
- ipad × 1
- isomorphic × 1
- javascript optimization × 1
- javascript semanticui resources × 1
- jquery-plugin × 1
- jquery-ui × 1
- jquery-ui-datepicker × 1
- jquerymobile × 1
- js × 1
- kendo datasource × 1
- kendochart × 1
- kendoui compiler × 1
- knockout × 1
- l10n × 1
- leaflet × 1
- learning × 1
- library × 1
- libs × 1
- license × 1
- licensing × 1
- lineserieszonescfg × 1
- local setting × 1
- localization × 1
- logging × 1
- loop × 1
- macros × 1
- mailboxprocessor × 1
- mapping × 1
- markerclusterer × 1
- markup × 1
- marshal × 1
- math × 1
- mathjax × 1
- message × 1
- message passing × 1
- message-passing × 1
- meta × 1
- metro style × 1
- metro-ui × 1
- micro orm × 1
- minimum-requirements × 1
- mix × 1
- mobile installation × 1
- mod_mono × 1
- modal × 1
- module × 1
- mouseevent × 1
- mouseposition × 1
- multidimensional × 1
- multiline × 1
- multithreading × 1
- mysql × 1
- mysqlclient × 1
- nancy × 1
- native × 1
- nested × 1
- nested loops × 1
- netstandard × 1
- node × 1
- nunit × 1
- object relation mapper × 1
- object-oriented × 1
- om × 1
- onboarding × 1
- onclick × 1
- optimization × 1
- option × 1
- orm × 1
- os x × 1
- output-path × 1
- override × 1
- paper × 1
- parameter × 1
- persistence × 1
- persistent data structure × 1
- phonegap × 1
- plotly × 1
- pola × 1
- powerpack × 1
- prefix tree × 1
- principle of least authority × 1
- privacy × 1
- private × 1
- profile × 1
- programming × 1
- project × 1
- project euler × 1
- projekt_feladat × 1
- protected × 1
- provider × 1
- proxy × 1
- ptvs × 1
- public × 1
- pure f# × 1
- purescript × 1
- quant × 1
- query sitelet × 1
- quotations × 1
- range × 1
- raphael × 1
- razor × 1
- rc × 1
- reactjs × 1
- real-time × 1
- ref × 1
- region × 1
- released in 4.0.190.100-rc × 1
- released: v0.2 × 1
- released: v0.3 × 1
- released: v0.7 × 1
- reporting × 1
- responsive design × 1
- rest api × 1
- rest sitelet × 1
- restful × 1
- round table × 1
- router × 1
- routing × 1
- rpc reverseproxy × 1
- runtime × 1
- sales × 1
- sample × 1
- sampleapp × 1
- scriptcs × 1
- scripting × 1
- search × 1
- self hosted × 1
- semanticui × 1
- sequence × 1
- serialisation × 1
- service × 1
- session-state × 1
- sharepoint × 1
- signals × 1
- sitelet website × 1
- sitelet.protect × 1
- sitlets × 1
- slickgrid × 1
- source code × 1
- sqlentityconnection × 1
- ssl × 1
- standards × 1
- static content × 1
- stickynotes × 1
- streamreader × 1
- stress × 1
- strong name × 1
- structures × 1
- submitbutton × 1
- subscribe × 1
- svg example html5 websharper.ui.next × 1
- system.datetime × 1
- system.reflection.targetinvocationexception × 1
- table storage × 1
- targets × 1
- tdd × 1
- template ClientServer × 1
- templates ui.next × 1
- templating × 1
- text parsing × 1
- three.js × 1
- time travel × 1
- tls × 1
- tooltip × 1
- tracing × 1
- tsunamiide × 1
- turkish × 1
- twitter-bootstrap × 1
- type erasure × 1
- type inference × 1
- type providers × 1
- type-providers × 1
- typeprovider × 1
- ui next forms × 1
- ui-next × 1
- ui.next jqueryui × 1
- ui.next charting × 1
- ui.next formlets × 1
- ui.next forms × 1
- ui.next suave visualstudio × 1
- ui.next templating × 1
- unicode × 1
- unittest client × 1
- up for grabs × 1
- upload × 1
- usersession × 1
- validation × 1
- vb × 1
- vb.net × 1
- vector × 1
- view.map × 1
- visal studio × 1
- visual f# × 1
- visual studio 11 × 1
- visual studio 2012 × 1
- visual studio code × 1
- visual studio shell × 1
- visualstudio-websharper × 1
- vs2017 compiler zafir × 1
- vsix × 1
- web api × 1
- web-scraping × 1
- webapi × 1
- webcomponents × 1
- webforms × 1
- webgl × 1
- webrtc × 1
- webshaper × 1
- websharper async × 1
- websharper codemirror × 1
- websharper f# google × 1
- websharper forms × 1
- websharper reactive × 1
- websharper rpc × 1
- websharper sitelets routing × 1
- websharper warp × 1
- websharper-interface-generator × 1
- websharper.chartsjs × 1
- websharper.com × 1
- websharper.exe × 1
- websharper.owin × 1
- websharper.ui.next × 1
- websharper.ui.next jquery × 1
- websockets iis × 1
- webspeech × 1
- why-websharper × 1
- windows 7 × 1
- windows 8 × 1
- windows-phone × 1
- winrt × 1
- www.grabbitmedia.com × 1
- xamarin × 1
- xml × 1
- yeoman × 1
- yield × 1
- zafir beta × 1
- zafir websharper4 × 1
- zarovizsga × 1
|
Copyright (c) 2011-2012 IntelliFactory. All rights reserved. Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy |
Built with WebSharper |







I wanted to call attention to what seems to be a bug. Or maybe I'm missing an important compiler option because this does not happen in try.websharper.com.
I use this code to compile from F# to javascript:
let translate2JSR_ (assemblyName: string) assemblies = Rop.flow { do! Rop.tryProtection() use errors = new System.IO.StringWriter() let loader = WebSharper.Compiler.FrontEnd.Loader.Create (IntelliFactory.Core.AssemblyResolution.AssemblyResolver.Create()) (fprintfn errors "%O") let options = { WebSharper.Compiler.FrontEnd.Options.Default with ErrorLimit = 5000 References = assemblies |> List.map loader.LoadFile } let compiler = WebSharper.Compiler.FrontEnd.Prepare options (fprintfn errors "%O") let! js = assemblyName |> loader.LoadFile |> compiler.Compile |> Rop.fromOption (ErrWebSharperCompiler <| errors.ToString()) return js } open Microsoft.FSharp.Compiler.SimpleSourceCodeServices let compileR_ (code:string) assemblies inMemory = Rop.flow { do! Rop.tryProtection() let fn = System.IO.Path.GetTempFileName() let src = System.IO.Path.ChangeExtension(fn, ".fs") let code2 = code.Split([| "\r\n"; "\n" ; "\r" |], System.StringSplitOptions.None) |> Seq.map(fun line -> if line.StartsWith("#r") then ("//" + line, line) else (line , "" )) System.IO.File.WriteAllText(src, code2 |> Seq.map fst |> String.concat "\r\n" ) printfn "%s:" src printfn "%s" code let scs = SimpleSourceCodeServices() let dll = System.IO.Path.ChangeExtension(src, ".dll") let options = assemblies |> Seq.collect(fun e -> ["-r"; e]) |> Seq.toArray |> Array.append [| "IGNOREDfsc.exe" "--noframework" "--optimize-" "--tailcalls-" "--target:library" "--warn:3" "--warnaserror:76" "--vserrors" "--LCID:1033" "--utf8output" "--fullpaths" "--flaterrors" "--subsystemversion:6.00" "--highentropyva+" "-o"; dll "-a"; src |] let errors, exitCode, assemblyO = if inMemory then scs.CompileToDynamicAssembly (options, None) else let errors, exitCode = scs.Compile options errors, exitCode, None System.IO.File.Delete src let result = if exitCode = 0 then (Some dll, assemblyO) |> Rop.succeed else Rop.fail (errors |> Seq.map (sprintf "%A") |> String.concat "\n" |> ErrFSharpCompiler) return! result }when the following function compiles the result has more than 9000 lines...
let handleKey (model: Model) (processMessages: Message -> unit) ev = match ev?key |> unbox with | "Esc" -> SetSelection(None, None) |> processMessages | "ArrowUp" when not ev?shiftKey && not ev?ctrlKey && not ev?altKey -> getPriorId1 model |> Option.iter (fun id -> SetSelection(Some(id, id), getCurrentCol1 model |> double) |> processMessages) | "ArrowDown" when not ev?shiftKey && not ev?ctrlKey && not ev?altKey -> getNextId1 model |> Option.iter (fun id -> SetSelection(Some(id, id), getCurrentCol1 model |> double) |> processMessages) | "ArrowLeft" when not ev?shiftKey && not ev?ctrlKey && not ev?altKey -> getPriorCol1 model |> Option.iter (fun i -> SetSelection(getCurrentId1 model |> double, Some(i , i )) |> processMessages) | "ArrowRight" when not ev?shiftKey && not ev?ctrlKey && not ev?altKey -> getNextCol1 model |> Option.iter (fun i -> SetSelection(getCurrentId1 model |> double, Some(i , i )) |> processMessages) | "ArrowUp" when ev?shiftKey && not ev?ctrlKey && not ev?altKey -> getPriorId1 model |> Option.iter (fun id -> getCurrentCol1 model |> Option.iter (fun c -> EndSelection(Some id, c) |> processMessages)) | "ArrowDown" when ev?shiftKey && not ev?ctrlKey && not ev?altKey -> getNextId1 model |> Option.iter (fun id -> getCurrentCol1 model |> Option.iter (fun c -> EndSelection(Some id, c) |> processMessages)) | "ArrowLeft" when ev?shiftKey && not ev?ctrlKey && not ev?altKey -> getPriorCol1 model |> Option.iter (fun c -> getCurrentId1 model |> Option.iter (fun id -> EndSelection(Some id, c) |> processMessages)) | "ArrowRight" when ev?shiftKey && not ev?ctrlKey && not ev?altKey -> getNextCol1 model |> Option.iter (fun c -> getCurrentId1 model |> Option.iter (fun id -> EndSelection(Some id, c) |> processMessages)) | _ -> ()The string "ArrowDown" shows up only twice in the original code but it shows up 34 times in the resulting JS. This is just the first 1000 lines:
handleKey:function(model,processMessages,ev) { var value,_,_1,_2,action,option,_3,_4,action1,option1,_5,_6,action2,option2,_7,_8,action3,option3,_9,_a,action4,option5,_b,_c,action6,option6,_d,_e,action7,option7,_f,_10,action8,option8,_11,_12,action9,option9,_13,_14,actiona,optiona,_15,_16,actionb,optionb,_17,_18,actionc,optionc,_19,_1a,actiond,optiond,_1b,_1c,actione,optione,_1d,_1e,actionf,optionf,_1f,_20,action10,option10,_21,_22,action11,option11,_23,_24,action12,option12,_25,_26,action13,option13,_27,_28,action14,option14,_29,_2a,action15,option15,_2b,_2c,action16,option16,_2d,_2e,action17,option17,_2f,_30,action18,option18,_31,_32,action19,option19,_33,_34,action1a,option1a,_35,_36,action1b,option1b,_37,_38,action1c,option1c,_39,_3a,action1d,option1d,_3b,_3c,action1e,option1e,_3d,_3e,action1f,option1f,_3f,_40,action20,option20,_41,_42,action21,option21,_43,_44,action22,option22,_45,_46,action23,option23,_47,_48,action24,option24,_49,_4a,action25,option25,_4b,_4c,action26,option26,_4d,_4e,action27,option27,_4f,_50,action28,option28,_51,_52,action29,option29,_53,_54,action2a,option2a,_55,_56,action2b,option2b,_57,_58,action2c,option2c,_59,_5a,action2d,option2d,_5b,_5c,action2e,option2e,_5d,_5e,action2f,option2f,_5f,_60,action30,option30,_61,_62,action31,option31,_63,_64,action32,option32,_65,_66,action33,option33,_67,_68,action34,option34,_69,_6a,action35,option35,_6b,_6c,action36,option36,_6d,_6e,action37,option37,_6f,_70,action38,option38,_71,_72,action39,option39,_73,_74,action3a,option3a,_75,_76,action3b,option3b,_77,_78,action3c,option3c,_79,_7a,action3d,option3d,_7b,_7c,action3e,option3e,_7d,_7e,action3f,option3f,_7f,_80,action40,option40,_81,_82,action41,option41,_83,_84,action42,option42,_85,_86,action43,option43,_87,_88,action44,option44,_89,_8a,action45,option45,_8b,_8c,action46,option46,_8d,_8e,action47,option47,_8f,_90,action48,option48,_91,_92,action49,option49,_93,_94,action4a,option4a,_95,_96,action4b,option4b,_97,_98,action4c,option4c,_99,_9a,action4d,option4d,_9b,_9c,action4e,option4e,_9d,_9e,action4f,option4f,_9f,_a0,action50,option50,_a1,_a2,action51,option51,_a3,_a4,action52,option52,_a5,_a6,action53,option53,_a7,_a8,action54,option54,_a9,_aa,action55,option55,_ab,_ac,action56,option56,_ad,_ae,action57,option57,_af,_b0,action58,option58,_b1,_b2,action59,option59,_b3,_b4,action5a,option5a,_b5,_b6,action5b,option5b,_b7,_b8,action5c,option5c,_b9,_ba,action5d,option5d,_bb,_bc,action5e,option5e,_bd,_be,action5f,option5f,_bf,_c0,action60,option60,_c1,_c2,action61,option61,_c3,_c4,action62,option62,_c5,_c6,action63,option63,_c7,_c8,action64,option64,_c9,_ca,action65,option65,_cb,_cc,action66,option66,_cd,_ce,action67,option67,_cf,_d0,action68,option68,_d1,_d2,action69,option69,_d3,_d4,action6a,option6a,_d5,_d6,action6b,option6b,_d7,_d8,action6c,option6c,_d9,_da,action6d,option6d,_db,_dc,action6e,option6e,_dd,_de,action6f,option6f,_df,_e0,action70,option70,_e1,_e2,action71,option71,_e3,_e4,action72,option72,_e5,_e6,action73,option73,_e7,_e8,action74,option74,_e9,_ea,action75,option75,_eb,_ec,action76,option76,_ed,_ee,action77,option77,_ef,_f0,action78,option78,_f1,_f2,action79,option79,_f3,_f4,action7a,option7a,_f5,_f6,action7b,option7b,_f7,_f8,action7c,option7c,_f9,_fa,action7d,option7d,_fb,_fc,action7e,option7e,_fd,_fe,action7f,option7f,_ff,_100,action80,option80,_101,_102,action81,option81,_103,_104,action82,option82,_105,_106,action83,option83,_107,_108,action84,option84,_109,_10a,action85,option85,_10b,_10c,action86,option86,_10d,_10e,action87,option87,_10f,_110,action88,option88,_111,_112,action89,option89,_113,_114,action8a,option8a,_115,_116,action8b,option8b,_117,_118,action8c,option8c,_119,_11a,action8d,option8d,_11b,_11c,action8e,option8e,_11d,_11e,action8f,option8f,_11f,_120,action90,option90,_121,_122,action91,option91,_123,_124,action92,option92,_125,_126,action93,option93,_127,_128,action94,option94,_129,_12a,action95,option95,_12b,_12c,action96,option96,_12d,_12e,action97,option97,_12f,_130,action98,option98,_131,_132,action99,option99,_133,_134,action9a,option9a,_135,_136,action9b,option9b,_137,_138,action9c,option9c,_139,_13a,action9d,option9d,_13b,_13c,action9e,option9e,_13d,_13e,action9f,option9f,_13f,_140,actiona0,optiona0,_141,_142,actiona1,optiona1,_143,_144,actiona2,optiona2,_145,_146,actiona3,optiona3,_147,_148,actiona4,optiona4,_149,_14a,actiona5,optiona5,_14b,_14c,actiona6,optiona6,_14d,_14e,actiona7,optiona7,_14f,_150,actiona8,optiona8,_151,_152,actiona9,optiona9,_153,_154,actionaa,optionaa,_155,_156,actionab,optionab,_157,_158,actionac,optionac,_159,_15a,actionad,optionad,_15b,_15c,actionae,optionae,_15d,_15e,actionaf,optionaf,_15f,_160,actionb0,optionb0,_161,_162,actionb1,optionb1,_163,_164,actionb2,optionb2,_165,_166,actionb3,optionb3,_167,_168,actionb4,optionb4,_169,_16a,actionb5,optionb5,_16b,_16c,actionb6,optionb6,_16d,_16e,actionb7,optionb7,_16f,_170,actionb8,optionb8,_171,_172,actionb9,optionb9,_173,_174,actionba,optionba,_175,_176,actionbb,optionbb,_177,_178,actionbc,optionbc,_179,_17a,actionbd,optionbd,_17b,_17c,actionbe,optionbe,_17d,_17e,actionbf,optionbf,_17f,_180,actionc0,optionc0,_181,_182,actionc1,optionc1,_183,_184,actionc2,optionc2,_185,_186,actionc3,optionc3,_187,_188,actionc4,optionc4,_189,_18a,actionc5,optionc5,_18b,_18c,actionc6,optionc6,_18d,_18e,actionc7,optionc7,_18f,_190,actionc8,optionc8,_191,_192,actionc9,optionc9,_193,_194,actionca,optionca,_195,_196,actioncb,optioncb,_197,_198,actioncc,optioncc,_199,_19a,actioncd,optioncd,_19b,_19c,actionce,optionce,_19d,_19e,actioncf,optioncf,_19f,_1a0,actiond0,optiond0,_1a1,_1a2,actiond1,optiond1,_1a3,_1a4,actiond2,optiond2,_1a5,_1a6,actiond3,optiond3,_1a7,_1a8,actiond4,optiond4,_1a9,_1aa,actiond5,optiond5,_1ab,_1ac,actiond6,optiond6,_1ad,_1ae,actiond7,optiond7,_1af,_1b0,actiond8,optiond8,_1b1,_1b2,actiond9,optiond9,_1b3,_1b4,actionda,optionda,_1b5,_1b6,actiondb,optiondb,_1b7,_1b8,actiondc,optiondc,_1b9,_1ba,actiondd,optiondd,_1bb,_1bc,actionde,optionde,_1bd,_1be,actiondf,optiondf,_1bf,_1c0,actione0,optione0,_1c1,_1c2,actione1,optione1,_1c3,_1c4,actione2,optione2,_1c5,_1c6,actione3,optione3,_1c7,_1c8,actione4,optione4,_1c9,_1ca,actione5,optione5,_1cb,_1cc,actione6,optione6,_1cd,_1ce,actione7,optione7,_1cf,_1d0,actione8,optione8,_1d1,_1d2,actione9,optione9,_1d3,_1d4,actionea,optionea,_1d5,_1d6,actioneb,optioneb,_1d7,_1d8,actionec,optionec,_1d9,_1da,actioned,optioned,_1db,_1dc,actionee,optionee,_1dd,_1de,actionef,optionef,_1df,_1e0,actionf0,optionf0,_1e1,_1e2,actionf1,optionf1,_1e3,_1e4,actionf2,optionf2,_1e5,_1e6,actionf3,optionf3,_1e7,_1e8,actionf4,optionf4,_1e9,_1ea,actionf5,optionf5,_1eb,_1ec,actionf6,optionf6,_1ed,_1ee,actionf7,optionf7,_1ef,_1f0,actionf8,optionf8,_1f1,_1f2,actionf9,optionf9,_1f3,_1f4,actionfa,optionfa,_1f5,_1f6,actionfb,optionfb,_1f7,_1f8,actionfc,optionfc,_1f9,_1fa,actionfd,optionfd,_1fb,_1fc,actionfe,optionfe,_1fd,_1fe,actionff,optionff; value=ev.key; if(value==="Esc") { _=processMessages({ $:4, $0:{ $:0 }, $1:{ $:0 } }); } else { if(value==="ArrowUp") { if((!ev.shiftKey?!ev.ctrlKey:false)?!ev.altKey:false) { action=function(id) { var a; a=DimModel.getCurrentCol1(model); return processMessages({ $:4, $0:{ $:1, $0:[id,id] }, $1:DimModel["double"](a) }); }; option=DimModel.getPriorId1(model); _2=Option.iter(action,option); } else { if(value==="ArrowDown") { if((!ev.shiftKey?!ev.ctrlKey:false)?!ev.altKey:false) { action1=function(id) { var a; a=DimModel.getCurrentCol1(model); return processMessages({ $:4, $0:{ $:1, $0:[id,id] }, $1:DimModel["double"](a) }); }; option1=DimModel.getNextId1(model); _4=Option.iter(action1,option1); } else { if(value==="ArrowLeft") { if((!ev.shiftKey?!ev.ctrlKey:false)?!ev.altKey:false) { action2=function(i) { var a; a=DimModel.getCurrentId1(model); return processMessages({ $:4, $0:DimModel["double"](a), $1:{ $:1, $0:[i,i] } }); }; option2=DimModel.getPriorCol1(model); _6=Option.iter(action2,option2); } else { if(value==="ArrowRight") { if((!ev.shiftKey?!ev.ctrlKey:false)?!ev.altKey:false) { action3=function(i) { var a; a=DimModel.getCurrentId1(model); return processMessages({ $:4, $0:DimModel["double"](a), $1:{ $:1, $0:[i,i] } }); }; option3=DimModel.getNextCol1(model); _8=Option.iter(action3,option3); } else { if(value==="ArrowUp") { if((ev.shiftKey?!ev.ctrlKey:false)?!ev.altKey:false) { action4=function(id) { var action5,option4; action5=function(c) { return processMessages({ $:7, $0:{ $:1, $0:id }, $1:c }); }; option4=DimModel.getCurrentCol1(model); return Option.iter(action5,option4); }; option5=DimModel.getPriorId1(model); _a=Option.iter(action4,option5); } else { if(value==="ArrowDown") { if((ev.shiftKey?!ev.ctrlKey:false)?!ev.altKey:false) { action6=function(id) { var action5,option4; action5=function(c) { return processMessages({ $:7, $0:{ $:1, $0:id }, $1:c }); }; option4=DimModel.getCurrentCol1(model); return Option.iter(action5,option4); }; option6=DimModel.getNextId1(model); _c=Option.iter(action6,option6); } else { if(value==="ArrowLeft") { if((ev.shiftKey?!ev.ctrlKey:false)?!ev.altKey:false) { action7=function(c) { var action5,option4; action5=function(id) { return processMessages({ $:7, $0:{ $:1, $0:id }, $1:c }); }; option4=DimModel.getCurrentId1(model); return Option.iter(action5,option4); }; option7=DimModel.getPriorCol1(model); _e=Option.iter(action7,option7); } else { if(value==="ArrowRight") { if((ev.shiftKey?!ev.ctrlKey:false)?!ev.altKey:false) { action8=function(c) { var action5,option4; action5=function(id) { return processMessages({ $:7, $0:{ $:1, $0:id }, $1:c }); }; option4=DimModel.getCurrentId1(model); return Option.iter(action5,option4); }; option8=DimModel.getNextCol1(model); _10=Option.iter(action8,option8); } else { _10=null; } _f=_10; } else { _f=null; } _e=_f; } _d=_e; } else { if(value==="ArrowRight") { if((ev.shiftKey?!ev.ctrlKey:false)?!ev.altKey:false) { action9=function(c) { var action5,option4; action5=function(id) { return processMessages({ $:7, $0:{ $:1, $0:id }, $1:c }); }; option4=DimModel.getCurrentId1(model); return Option.iter(action5,option4); }; option9=DimModel.getNextCol1(model); _12=Option.iter(action9,option9); } else { _12=null; } _11=_12; } else { _11=null; } _d=_11; } _c=_d; } _b=_c; } else { if(value==="ArrowLeft") { if((ev.shiftKey?!ev.ctrlKey:false)?!ev.altKey:false) { actiona=function(c) { var action5,option4; action5=function(id) { return processMessages({ $:7, $0:{ $:1, $0:id }, $1:c }); }; option4=DimModel.getCurrentId1(model); return Option.iter(action5,option4); }; optiona=DimModel.getPriorCol1(model); _14=Option.iter(actiona,optiona); } else { if(value==="ArrowRight") { if((ev.shiftKey?!ev.ctrlKey:false)?!ev.altKey:false) { actionb=function(c) { var action5,option4; action5=function(id) { return processMessages({ $:7, $0:{ $:1, $0:id }, $1:c }); }; option4=DimModel.getCurrentId1(model); return Option.iter(action5,option4); }; optionb=DimModel.getNextCol1(model); _16=Option.iter(actionb,optionb); } else { _16=null; } _15=_16; } else { _15=null; } _14=_15; } _13=_14; } else { if(value==="ArrowRight") { if((ev.shiftKey?!ev.ctrlKey:false)?!ev.altKey:false) { actionc=function(c) { var action5,option4; action5=function(id) { return processMessages({ $:7, $0:{ $:1, $0:id }, $1:c }); }; option4=DimModel.getCurrentId1(model); return Option.iter(action5,option4); }; optionc=DimModel.getNextCol1(model); _18=Option.iter(actionc,optionc); } else { _18=null; } _17=_18; } else { _17=null; } _13=_17; } _b=_13; } _a=_b; } _9=_a; } else { if(value==="ArrowDown") { if((ev.shiftKey?!ev.ctrlKey:false)?!ev.altKey:false) { actiond=function(id) { var action5,option4; action5=function(c) { return processMessages({ $:7, $0:{ $:1, $0:id }, $1:c }); }; option4=DimModel.getCurrentCol1(model); return Option.iter(action5,option4); }; optiond=DimModel.getNextId1(model); _1a=Option.iter(actiond,optiond); } else { if(value==="ArrowLeft") { if((ev.shiftKey?!ev.ctrlKey:false)?!ev.altKey:false) { actione=function(c) { var action5,option4; action5=function(id) { return processMessages({ $:7, $0:{ $:1, $0:id }, $1:c }); }; option4=DimModel.getCurrentId1(model); return Option.iter(action5,option4); }; optione=DimModel.getPriorCol1(model); _1c=Option.iter(actione,optione); } else { if(value==="ArrowRight") { if((ev.shiftKey?!ev.ctrlKey:false)?!ev.altKey:false) { actionf=function(c) { var action5,option4; action5=function(id) { return processMessages({ $:7, $0:{ $:1, $0:id }, $1:c }); }; option4=DimModel.getCurrentId1(model); return Option.iter(action5,option4); }; optionf=DimModel.getNextCol1(model); _1e=Option.iter(actionf,optionf); } else { _1e=null; } _1d=_1e; } else { _1d=null; } _1c=_1d; } _1b=_1c; } else { if(value==="ArrowRight") { if((ev.shiftKey?!ev.ctrlKey:false)?!ev.altKey:false) { action10=function(c) { var action5,option4; action5=function(id) { return processMessages({ $:7, $0:{ $:1, $0:id }, $1:c }); }; option4=DimModel.getCurrentId1(model); return Option.iter(action5,option4); }; option10=DimModel.getNextCol1(model); _20=Option.iter(action10,option10); } else { _20=null; } _1f=_20; } else { _1f=null; } _1b=_1f; } _1a=_1b; } _19=_1a; } else { if(value==="ArrowLeft") { if((ev.shiftKey?!ev.ctrlKey:false)?!ev.altKey:false) { action11=function(c) { var action5,option4; action5=function(id) { return processMessages({ $:7, $0:{ $:1, $0:id }, $1:c }); }; option4=DimModel.getCurrentId1(model); return Option.iter(action5,option4); }; option11=DimModel.getPriorCol1(model); _22=Option.iter(action11,option11); } else { if(value==="ArrowRight") { if((ev.shiftKey?!ev.ctrlKey:false)?!ev.altKey:false) { action12=function(c) { var action5,option4; action5=function(id) { return processMessages({ $:7, $0:{ $:1, $0:id }, $1:c }); }; option4=DimModel.getCurrentId1(model); return Option.iter(action5,option4); }; option12=DimModel.getNextCol1(model); _24=Option.iter(action12,option12); } else { _24=null; } _23=_24; } else { _23=null; } _22=_23; } _21=_22; } else { if(value==="ArrowRight") { if((ev.shiftKey?!ev.ctrlKey:false)?!ev.altKey:false) { action13=function(c) { var action5,option4; action5=function(id) { return processMessages({ $:7, $0:{ $:1, $0:id }, $1:c }); }; option4=DimModel.getCurrentId1(model); return Option.iter(action5,option4); }; option13=DimModel.getNextCol1(model); _26=Option.iter(action13,option13); } else { _26=null; } _25=_26; } else { _25=null; } _21=_25; } _19=_21; } _9=_19; } _8=_9; } _7=_8; } else { if(value==="ArrowUp") { if((ev.shiftKey?!ev.ctrlKey:false)?!ev.altKey:false) { action14=function(id) { var action5,option4; action5=function(c) { return processMessages({ $:7, $0:{ $:1, $0:id }, $1:c }); }; option4=DimModel.getCurrentCol1(model); return Option.iter(action5,option4); }; option14=DimModel.getPriorId1(model); _28=Option.iter(action14,option14); } else { if(value==="ArrowDown") { if((ev.shiftKey?!ev.ctrlKey:false)?!ev.altKey:false) { action15=function(id) { var action5,option4; action5=function(c) { return processMessages({ $:7, $0:{ $:1, $0:id }, $1:c }); }; option4=DimModel.getCurrentCol1(model); return Option.iter(action5,option4); }; option15=DimModel.getNextId1(model); _2a=Option.iter(action15,option15); } else { if(value==="ArrowLeft") { if((ev.shiftKey?!ev.ctrlKey:false)?!ev.altKey:false) { action16=function(c) { var action5,option4; action5=function(id) { return processMessages({ $:7, $0:{ $:1, $0:id }, $1:c }); }; option4=DimModel.getCurrentId1(model); return Option.iter(action5,option4); }; option16=DimModel.getPriorCol1(model); _2c=Option.iter(action16,option16); } else { if(value==="ArrowRight") { if((ev.shiftKey?!ev.ctrlKey:false)?!ev.altKey:false) { action17=function(c) { var action5,option4; action5=function(id) { return processMessages({ $:7, $0:{ $:1, $0:id }, $1:c }); }; option4=DimModel.getCurrentId1(model); return Option.iter(action5,option4); }; option17=DimModel.getNextCol1(model); _2e=Option.iter(action17,option17); } else { _2e=null; } _2d=_2e; } else { _2d=null; } _2c=_2d; } _2b=_2c; } else { if(value==="ArrowRight") { if((ev.shiftKey?!ev.ctrlKey:false)?!ev.altKey:false) { action18=function(c) { var action5,option4; action5=function(id) { return processMessages({ $:7, $0:{ $:1, $0:id }, $1:c }); }; option4=DimModel.getCurrentId1(model); return Option.iter(action5,option4); }; option18=DimModel.getNextCol1(model); _30=Option.iter(action18,option18); } else { _30=null; } _2f=_30; } else { _2f=null; } _2b=_2f; } _2a=_2b; } _29=_2a; } else { if(value==="ArrowLeft") { if((ev.shiftKey?!ev.ctrlKey:false)?!ev.altKey:false) { action19=function(c) { var action5,option4; action5=function(id) { return processMessages({ $:7, $0:{ $:1, $0:id }, $1:c }); }; option4=DimModel.getCurrentId1(model); return Option.iter(action5,option4); }; option19=DimModel.getPriorCol1(model); _32=Option.iter(action19,option19); } else { if(value==="ArrowRight") { if((ev.shiftKey?!ev.ctrlKey:false)?!ev.altKey:false) { action1a=function(c) { var action5,option4; action5=function(id) { return processMessages({ $:7, $0:{ $:1, $0:id }, $1:c }); }; option4=DimModel.getCurrentId1(model); return Option.iter(action5,option4); }; option1a=DimModel.getNextCol1(model); _34=Option.iter(action1a,option1a); } else { _34=null; } _33=_34; } else { _33=null; } _32=_33; } _31=_32; } else { if(value==="ArrowRight") { if((ev.shiftKey?!ev.ctrlKey:false)?!ev.altKey:false) { action1b=function(c) { var action5,option4; action5=function(id) { return processMessages({ $:7, $0:{ $:1, $0:id }, $1:c }); }; option4=DimModel.getCurrentId1(model); return Option.iter(action5,option4); }; option1b=DimModel.getNextCol1(model); _36=Option.iter(action1b,option1b); } else { _36=null; } _35=_36; } else { _35=null; } _31=_35; } _29=_31; } _28=_29; } _27=_28; } else { if(value==="ArrowDown") { if((ev.shiftKey?!ev.ctrlKey:false)?!ev.altKey:false) { action1c=function(id) { var action5,option4; action5=function(c) { return processMessages({ $:7, $0:{ $:1, $0:id }, $1:c }); }; option4=DimModel.getCurrentCol1(model); return Option.iter(action5,option4); }; option1c=DimModel.getNextId1(model); _38=Option.iter(action1c,option1c); } else { if(value==="ArrowLeft") { if((ev.shiftKey?!ev.ctrlKey:false)?!ev.altKey:false) { action1d=function(c) { var action5,option4; action5=function(id) { return processMessages({ $:7, $0:{ $:1, $0:id }, $1:c }); }; option4=DimModel.getCurrentId1(model); return Option.iter(action5,option4); }; option1d=DimModel.getPriorCol1(model); _3a=Option.iter(action1d,option1d); } else { if(value==="ArrowRight") { if((ev.shiftKey?!ev.ctrlKey:false)?!ev.altKey:false) { action1e=function(c) { var action5,option4; action5=function(id) { return processMessages({ $:7, $0:{ $:1, $0:id }, $1:c }); }; option4=DimModel.getCurrentId1(model); return Option.iter(action5,option4); }; option1e=DimModel.getNextCol1(model); _3c=Option.iter(action1e,option1e); } else { _3c=null; } _3b=_3c; } else { _3b=null; } _3a=_3b; } _39=_3a; } else { if(value==="ArrowRight") { if((ev.shiftKey?!ev.ctrlKey:false)?!ev.altKey:false) { action1f=function(c) { var action5,option4; action5=function(id) { return processMessages({ $:7, $0:{ $:1, $0:id }, $1:c });BTW, I found another instance where code compiled wrong in my setup but worked well in try.websharper.com