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
<!-- | |
If no PackageReadmeFile is present and there's a _PackageFiles with the metadata node `PackageReadmeFile="true"` set, | |
use its resolved PackagePath as the `PackageReadmeFile` | |
eg. <None Include="../../README.md" Pack="true" PackagePath="\" PackageReadmeFile="true" /> | |
--> | |
<Target Name="_SetPackageReadmeFileByConvention" | |
DependsOnTargets="_GetPackageFiles" | |
BeforeTargets="GenerateNuspec" | |
Condition="'$(PackageReadmeFile)' == ''"> |
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
#! /usr/bin/env zsh | |
# call like `devCompile <path to fsx> <other compiler flags>` | |
# note that I've got my locally-built compiler here for fsc.dll, for normal use you'd want to use the one from | |
# <SDK_ROOT>/FSharp/fsc.dll | |
function devCompile () { | |
file=$(realpath $1) | |
shift | |
base=$(basename $file .fsx) | |
/usr/local/share/dotnet/dotnet \ |
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
2 (3/4 lb) pork tenderloins | |
1/2 c soy sauce | |
1/3 c honey | |
1/4 c dry sherry | |
1/4 tsp garlic powder | |
1/4 tsp ground ginger | |
2 Tbsp dry mustard (sauce) | |
1/3 c sesame seeds, toasted |
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
namespace blah_lib | |
module Say = | |
let hello name () = | |
printfn "Hello %s" name |
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
#r "nuget: System.CommandLine, 2.0.0-beta2.21623.1" | |
#r "nuget: RestoreSources=https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-libraries/nuget/v3/index.json" | |
open System.CommandLine | |
open System.IO | |
open System.Threading.Tasks | |
let tagCommand = Command("tag-extract", "Get content with the given tag") | |
let inputfileArg = Argument<FileInfo>("input-file", "the file to extract content from") | |
tagCommand.AddArgument inputfileArg |
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
#r "nuget: RestoreSources=https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-libraries/nuget/v3/index.json" | |
#r "nuget: System.CommandLine, 2.0.0-beta3.22076.2" | |
open System.CommandLine | |
open System.CommandLine.Parsing | |
open System | |
[<return:Struct>] | |
let inline (|EqualsIC|_|) l r = if String.Equals(l, r, StringComparison.OrdinalIgnoreCase) then ValueSome () else ValueNone | |
[<return:Struct>] |
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
#r "nuget: System.CommandLine, 2.0.0-beta3.22106.2" | |
open System.CommandLine | |
open System.CommandLine.Builder | |
open System.CommandLine.Parsing | |
open System.CommandLine.Invocation | |
open System.Threading.Tasks | |
open System | |
let args = fsi.CommandLineArgs[1..] |
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
#r "nuget: Expecto" | |
open Expecto | |
let dependentTest testName condition testCase = | |
test testName { | |
if condition then | |
testCase () | |
else | |
skiptestf "Expecto: condition failed" |
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
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<OutputType>Exe</OutputType> | |
<TargetFramework>net7.0</TargetFramework> | |
<!-- Super critical - ensure your generation target runs _before_ the IncrementalClean target, which happens before `CoreCompile` --> | |
<IncrementalCleanDependsOn>GenerateFile;$(IncrementalCleanDependsOn)</IncrementalCleanDependsOn> | |
</PropertyGroup> | |
<Target |
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
#r "nuget: Newtonsoft.Json" | |
open Newtonsoft.Json | |
type Person = { First: string; Last: string } | |
type Employee = Employee of person: Person | Manager of manager: Person * employees: Employee list | |
let chet = Employee { First = "Chet"; Last = "Husk"} | |
let tim = Manager ({ First = "Tim"; Last = "Heuer"}, [chet]) | |
let data = Map.ofList [ |