ucsd-progsys / liquidhaskell-tutorial

Tutorial for LiquidHaskell
https://ucsd-progsys.github.io/liquidhaskell-tutorial/
MIT License
75 stars 27 forks source link

Error: errs is undefined (Polymorphism section) #71

Open felipeochoa opened 6 years ago

felipeochoa commented 6 years ago

Going through the tutorial in the github pages, I get the following error on the polymorphism page:

Error: errs is undefined
blockErrors@http://ucsd-progsys.github.io/liquidhaskell-tutorial/js/liquid/liquid.js:198:5
setErrors@http://ucsd-progsys.github.io/liquidhaskell-tutorial/js/liquid/liquid.js:207:19
verifyQuery/<@http://ucsd-progsys.github.io/liquidhaskell-tutorial/js/liquid/liquid.js:415:38
$http/promise.success/<@http://ucsd-progsys.github.io/liquidhaskell-tutorial/js/angular/angular.js:8663:11
wrappedCallback@http://ucsd-progsys.github.io/liquidhaskell-tutorial/js/angular/angular.js:6623:31
then/<@http://ucsd-progsys.github.io/liquidhaskell-tutorial/js/angular/angular.js:6660:26
$eval@http://ucsd-progsys.github.io/liquidhaskell-tutorial/js/angular/angular.js:7808:16
$digest@http://ucsd-progsys.github.io/liquidhaskell-tutorial/js/angular/angular.js:7680:17
$apply@http://ucsd-progsys.github.io/liquidhaskell-tutorial/js/angular/angular.js:7894:13
done@http://ucsd-progsys.github.io/liquidhaskell-tutorial/js/angular/angular.js:8883:9
completeRequest@http://ucsd-progsys.github.io/liquidhaskell-tutorial/js/angular/angular.js:9023:7
createHttpBackend/</xhr.onreadystatechange@http://ucsd-progsys.github.io/liquidhaskell-tutorial/js/angular/angular.js:8993:11

The error comes up when I try to run a code sample. In liquid.js, inside LiquidDemoCtrl there's a verifyQuery function which calls setErrors with undefined for the 2nd param:

$scope.errorBlocks = setErrors(blocks, data.errors); // line 207 online

The error prevents running the code samples and seeing the annotations.

I'm on Firefox 62

felipeochoa commented 6 years ago

At that point, data is:

{"path": "resources/custom/liquidhaskell/sandbox/1538612610_2142.hs",​​
 "status": "crash"}