-
Update incremental build cache information properly on IDE rebuilds (#3789, @kritzcreek)
Fixes a bug where triggering a rebuild via the IDE would not update the
output/cache-db.json
file, which in certain situations could lead to unnecessary rebuilds, as well as modules not being rebuilt when they should have been. -
Don't include compiler-internal declarations in IDE completions (#3850, @kritzcreek)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
import Prelude | |
import Control.Alt ((<|>)) | |
import Data.Array as Array | |
import Data.Generic.Rep as G | |
import Data.Generic.Rep.Show (genericShow) | |
import Data.Int as Int | |
import Data.Maybe (Maybe(..)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
import Prelude | |
import Effect (Effect) | |
import Data.Foldable (fold) | |
import TryPureScript (h1, h2, p, text, list, indent, link, render, code) | |
import Prim.Row (class Union, class Nub) | |
import Type.Row (type (+)) | |
import Record as Record |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1"><title>PureScript: Main</title><link href="https://fonts.googleapis.com/css?family=Roboto+Mono|Roboto:300,400,400i,700,700i" type="text/css" rel="stylesheet"><style type="text/css">/*! normalize.css v3.0.2 | MIT License | git.io/normalize */ | |
/** | |
* 1. Set default font family to sans-serif. | |
* 2. Prevent iOS text size adjust after orientation change, without disabling | |
* user zoom. | |
*/ | |
html { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
import Prelude | |
import Control.Monad.Eff (Eff) | |
import Data.Foldable (fold) | |
import TryPureScript (DOM, h1, p, text, render) | |
main :: Eff (dom :: DOM) Unit | |
main = |
This gist previously contained a draft version of my post announcing the malicious code in the purescript npm installer.
You can now find the published post on my blog: https://harry.garrood.me/blog/malicious-code-in-purescript-npm-installer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const {dirname, isAbsolute, join, resolve} = require('path'); | |
const {existsSync} = require('fs'); | |
const {PassThrough} = require('stream'); | |
const inspectWithKind = require('inspect-with-kind'); | |
const npmCliDir = require('npm-cli-dir'); | |
const optional = require('optional'); | |
const resolveFromNpm = require('resolve-from-npm'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module DataTypes where | |
data Foo = Foo | |
mkFoo = Foo | |
data Bar = Bar | |
data Baz = Baz1 | Baz2 |
One of the defining features of a EuclideanRing
is that you can divide any
pair of elements, as long as the divisor is nonzero. Specifically, if you have
a euclidean ring R
, with x
, y
in R
, and y /= zero
, we need to have x = (x / y) * y + (x `mod` y)
.
We do have a Ring b => Ring (a -> b)
instance, where multiplication is
defined as follows:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var master = [15.985, 15.774, 16.664, 16.111, 15.889, 15.603, 15.598, 15.690, 15.602, 16.159]; | |
var reordered = [15.831, 16.182, 16.519, 15.383, 15.936, 15.888, 15.645, 15.775, 15.749, 16.076]; | |
function mean(arr) { | |
return arr.reduce(function(x,y) { return x + y; }) / arr.length; | |
} | |
function variance(arr) { | |
var m = mean(arr); |
NewerOlder