Symptom: A weird error such as:
error FS0001: This expression was expected to have type
'FSI_0011.MyType'
but here has type
'FSI_0012.MyType'
| [<EntryPoint>] | |
| let main argv = | |
| printfn "Should be zero (netWeight emptyPallet): %A" Stock.shouldBeZero | |
| printfn "harvesterPartsWeight: %A" Stock.harvesterPartsWeight | |
| printfn "grossWeight harvesterParts: %A" (Stock.grossWeight Stock.harvesterParts) | |
| printfn "grossWeight emptyPallet: %A" (Stock.grossWeight Stock.emptyPallet) | |
| printfn "netWeight harvesterParts: %A" (Stock.netWeight Stock.harvesterParts) | |
| printfn "value harvesterParts: %A" (Stock.value Stock.harvesterParts) | |
| printfn "boxLabels harvesterParts: %A" (Stock.boxLabels Stock.harvesterParts) | |
| printfn "boxLabels emptyPallet: %A" (Stock.boxLabels Stock.emptyPallet) |
| #r "nuget: Farmer, 1.6.0" | |
| open Farmer | |
| open Farmer.Builders | |
| open Farmer.Builders.ContainerGroups | |
| open Farmer.Builders.TrafficManager | |
| open Farmer.TrafficManager | |
| let msi = userAssignedIdentity { | |
| name "my-app" |
| using System; | |
| using System.Collections.Generic; | |
| using System.Text; | |
| namespace ProbabilisticDataStructures.DataStructures | |
| { | |
| public class BitSet | |
| { | |
| private ulong[] bitset; | |
| public int Size { get; private set; } |
| private static int _bufferHeight; | |
| private static int _bufferY; | |
| public static async Task Main() | |
| { | |
| _bufferWidth = Console.WindowWidth; | |
| _bufferHeight = Console.WindowHeight; | |
| _bufferY = _bufferHeight; | |
| Console.SetBufferSize(_bufferWidth, _bufferHeight * 2); |
| #r "nuget: Suave" | |
| // 👆🏽 this was added in F# 5.0 | |
| // if you are using the .NET 5.0 previews or RC run as follows | |
| // dotnet fsi suavefileexplorer.fsx --langversion:preview | |
| open System | |
| open System.IO | |
| open System.Threading | |
| open System.Text | |
| open Suave |
| addEventListener('fetch', event => { | |
| event.respondWith(fetchAndApply(event.request)) | |
| }) | |
| async function fetchAndApply(request) { | |
| let response = await fetch(request) | |
| let referer = request.headers.get('Referer') | |
| let contentType = response.headers.get('Content-Type') || '' | |
| if (referer && contentType.startsWith('image/')) { |
| // ========= Event Sourcing in a nutshell | |
| (* | |
| FriendlyName: string | |
| Aggregate friendly name. | |
| Initial: 'State | |
| Initial (empty) state we will start with. | |
| Decide: 'Command -> 'State -> 'Event list |
| using Octokit; | |
| using System; | |
| using System.Threading.Tasks; | |
| using System.Diagnostics; | |
| namespace UpdateGitHub | |
| { | |
| class Program | |
| { |
| module Main exposing (main) | |
| import Element exposing (..) | |
| import Element.Background as Background | |
| import Element.Border as Border | |
| import Element.Font as Font | |
| main = | |
| layout [] <| |