This file contains hidden or 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
| type variance = Bi | Co | Cn | Inv | |
| type ty = | |
| | Unit | |
| | Tvar of int | |
| | Arrow of ty * ty | |
| | TyApp of int * ty array | |
| type injectivity = bool |
This file contains hidden or 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
| index 3ef907960..5de2e0e85 100644 | |
| --- a/runtime/compare.c | |
| +++ b/runtime/compare.c | |
| @@ -133,7 +133,8 @@ static intnat do_compare_val(struct compare_stack* stk, | |
| return Long_val(v1) - Long_val(v2); | |
| /* Subtraction above cannot overflow and cannot result in UNORDERED */ | |
| #ifndef NO_NAKED_POINTERS | |
| - if (Is_in_value_area(v2)) { | |
| + if (!Is_in_value_area(v2)) | |
| + return LESS; |
This file contains hidden or 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
| declare module "jsverify" { | |
| // Either | |
| declare interface Either<A,B> { | |
| either<T>(l: (a: A) => T, r: (b: B) => T): T; | |
| isEqual(other: Either<A,B>): boolean; | |
| bimap<C,D>(f: (a: A) => C, g: (b: B) => D): Either<C,D>; | |
| first<C>(f: (a: A) => C): Either<C,B>; | |
| second<D>(g: (b: B) => D): Either<A,D>; |
This file contains hidden or 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
| /* @flow */ | |
| type Maybe2<T,U> = (pattern: { | |
| some: (x: T) => U, | |
| none: () => U | |
| }) => U; | |
| type Maybe<T> = Maybe2<T, *>; | |
| // Constructors |
This file contains hidden or 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 foo = {} | |
| Object.defineProperty(foo, "bar", { | |
| enumerable: true, | |
| get: function() { | |
| return bar; | |
| } | |
| }) | |
| var bar = { foo: foo } | |
| foo.bar.foo === foo // true |
This file contains hidden or 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
| /* @flow */ | |
| var React = require("react") | |
| var Immutable = require("immutable") | |
| // In order to use any type as props, including Immutable objects, we | |
| // wrap our prop type as the sole "data" key passed as props. | |
| type Component<P> = ReactClass<{},{ data: P },{}> | |
| type Element = ReactElement<any, any, any> |
This file contains hidden or 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 Result | |
| class << self | |
| def success(value) | |
| Success.new(value) | |
| end | |
| def failure(error) | |
| Failure.new(error) | |
| end | |
| end |
This file contains hidden or 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
| /* @flow */ | |
| type Maybe<T,U> = (pattern: { | |
| some(x: T): U; | |
| none(): U; | |
| }) => U; | |
| function map<A,B,C>(maybe: Maybe<A,C>, f: (a: A) => B): Maybe<B,C> { | |
| return function(pattern) { | |
| return maybe({ |
This file contains hidden or 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
| require "capybara" | |
| require "capybara/poltergeist" | |
| require "torquebox-web" | |
| require "torquebox-messaging" | |
| page = DATA.read | |
| app = proc do | |
| headers = { | |
| "Content-Type" => "text/html", | |
| "Content-Length" => page.length.to_s |
This file contains hidden or 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 Result | |
| class << self | |
| def not_nil(value) | |
| if value.nil? | |
| None | |
| else | |
| Some.new(value) | |
| end | |
| end |
NewerOlder