Skip to content

Instantly share code, notes, and snippets.


Don Syme dsyme

View GitHub Profile
View gist:47a6fd35ef8c3e2433043cc95384e28a
View Traversable.fs
module FSharpPlus.Controlxx
let inline CallReturn< ^M, ^R, 'T when (^M or ^R) : (static member Return : unit -> ('T -> ^R))> () =
((^M or ^R) : (static member Return : unit -> ('T -> ^R)) ())
let inline CallApply< ^M, ^I1, ^I2, ^R when (^M or ^I1 or ^I2) : (static member Apply : ^I1 * ^I2 -> ^R)> (input1: ^I1, input2: ^I2) =
((^M or ^I1 or ^I2) : (static member Apply : ^I1 * ^I2 -> ^R) input1, input2)
let inline CallMap< ^M, ^F, ^I, ^R when (^M or ^I or ^R) : (static member Map : ^F * ^I -> ^R)> (mapping: ^F, source: ^I) : ^R =
((^M or ^I or ^R) : (static member Map : ^F * ^I -> ^R) mapping, source)
View foo.fs
let checkMethodImplIsPartialMatchForInterfaceMethod (minfo: MethInfo) (mimpl: ILMethodImpl) =
minfo.IsFinal &&
minfo.IsInterfaceMethod &&
mimpl.OverrideBy.ArgCount = List.sum minfo.NumArgs &&
mimpl.OverrideBy.GenericArity = minfo.GenericArity
let GetIntrinsicInterfaceOverrideMethodSetsUncached ((optFilter, ad, allowMultiIntfInst), m, ty) =
assert optFIlter.IsSome
assert isInterfaceTy g ty
View gist:5dd08c84ad7bdee3ad556af742172eda
type Node<'T>() =
abstract Value: 'T
abstract Name: string
let TipNode<'T>(name:string, value: 'T) =
{ new Node<'T>() with
override _.Value = value
override _.Name = name
override _.ToString() = name }
dsyme / gist:ff9e39cfff879f49dea2a95afdc4b12f
Created Feb 7, 2020
Signature dump for FSharp.COmpiler.Private.dll 07/02/2020
View gist:ff9e39cfff879f49dea2a95afdc4b12f
Microsoft (R) F# Compiler version for F# 4.7
Copyright (c) Microsoft Corporation. All Rights Reserved.
namespace FSComp
type internal SR =
private new : unit -> SR
static member
ArgumentsInSigAndImplMismatch : a0:System.String * a1:System.String ->
int * string
static member
View gist:1567b963da03463ac4edc3e594ff9f62
module Blittable
type System.SByte with
static member IsBlittableMarker = ()
type System.Byte with
static member IsBlittableMarker = ()
type System.Int16 with
static member IsBlittableMarker = ()
View gist:70e367bfaaeee33c23fc2212eeaab459
member inline x.With(?tag: obj, ?command: unit -> unit, ?commandCanExecute: bool, ?iconOverride: Fabulous.XamarinForms.InputTypes.Image, ?isEnabled: bool,
?textOverride: string, ?name: string, ?automationId: string, ?classId: string, ?effects: ViewElement list,
?menu: ViewElement, ?styleId: string, ?children: ViewElement list, ?text: string, ?accelerator: string,
?iconImageSource: Fabulous.XamarinForms.InputTypes.Image, ?isDestructive: bool, ?toolbarItemOrder: Xamarin.Forms.ToolbarItemOrder, ?priority: int, ?tapped: unit -> unit,
?contextActions: ViewElement list, ?height: float, ?completed: string -> unit, ?horizontalTextAlignment: Xamarin.Forms.TextAlignment, ?keyboard: Xamarin.Forms.Keyboard,
?label: string, ?labelColor: Xamarin.Forms.Color, ?placeholder: string, ?textChanged: Xamarin.Forms.TextChangedEventArgs -> unit, ?onChanged: Xamarin.Forms.Toggl
View Model.fs
namespace KitchenSink
open Aardvark.Base
open Aardvark.Base.Incremental
type DropdownModel =
selected : Option<int>
View MinIncremental.fs
namespace MinIncremental
#nowarn "9"
#nowarn "51"
open System
open System.Collections
open System.Collections.Generic
open System.Collections.Concurrent
View gist:924686f34bb103344213f8f5f4bbc721
namespace DiffSharp
open DiffSharp.Backend
open DiffSharp.Util
[<CustomEquality; CustomComparison>]
type Tensor =
| Tensor of primalRaw:RawTensor
| TensorF of primal:Tensor * derivative:Tensor * nestingTag:uint32
| TensorR of primal:Tensor * derivative:(Tensor ref) * parentOperation:TensorOp * fanout:(uint32 ref) * nestingTag:uint32
You can’t perform that action at this time.