From 4b31ead18464d031ad83d6484c918da8f200e5c5 Mon Sep 17 00:00:00 2001 From: Oskar Gewalli Date: Sun, 20 Nov 2022 14:58:14 +0200 Subject: [PATCH 1/2] Use F# Collections List instead of deprecated method --- src/FSharpPlus/Lens.fs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FSharpPlus/Lens.fs b/src/FSharpPlus/Lens.fs index 269b5d005..41e62312c 100644 --- a/src/FSharpPlus/Lens.fs +++ b/src/FSharpPlus/Lens.fs @@ -120,7 +120,7 @@ module Lens = /// None will delete the value at the specified index. Works well together with non. let inline _item i f t = Map.InvokeOnInstance - (function | None -> List.removeAt i t | Some x -> List.setAt i x t) + (function | None -> FSharp.Collections.List.removeAt i t | Some x -> List.setAt i x t) (f (List.tryItem i t)) [] @@ -255,4 +255,4 @@ module Lens = /// The mapped Functor. let inline (<&>) (x: '``F<'t>``) (f: 't -> 'u) : '``F<'u>`` = Map.InvokeOnInstance f x -#endif \ No newline at end of file +#endif From cecde03930745b64d50d3654a03ea3225b3d86d0 Mon Sep 17 00:00:00 2001 From: Oskar Gewalli Date: Sun, 20 Nov 2022 17:14:31 +0200 Subject: [PATCH 2/2] -download_nugets.[cmd|ps1|sh] --- build.proj | 4 ---- docsrc/tools/download_nugets.cmd | 1 - docsrc/tools/download_nugets.ps1 | 23 ----------------------- docsrc/tools/download_nugets.sh | 19 ------------------- docsrc/tools/manually_build_docs.sh | 2 -- 5 files changed, 49 deletions(-) delete mode 100644 docsrc/tools/download_nugets.cmd delete mode 100644 docsrc/tools/download_nugets.ps1 delete mode 100755 docsrc/tools/download_nugets.sh diff --git a/build.proj b/build.proj index a3e35ed69..20cff49e0 100644 --- a/build.proj +++ b/build.proj @@ -22,16 +22,12 @@ - - - - diff --git a/docsrc/tools/download_nugets.cmd b/docsrc/tools/download_nugets.cmd deleted file mode 100644 index 6b4bff1c0..000000000 --- a/docsrc/tools/download_nugets.cmd +++ /dev/null @@ -1 +0,0 @@ -@%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -Command "try { & '%~dpn0.ps1' %*; $err = -not $? } catch { Write-Host $_; $err = $true; $LastExitCode = 1 }; if ($err) { $ppid = (gwmi Win32_Process -Filter processid=$pid).ParentProcessId; $cl = (gwmi Win32_Process -Filter processid=$ppid).CommandLine; if ($cl -like '*cmd.exe /c*') { $gppid = (gwmi Win32_Process -Filter processid=$ppid).ParentProcessId; $pn = (gps -id $gppid).ProcessName; if ($pn -eq 'explorer') { pause } } }; exit $LastExitCode" \ No newline at end of file diff --git a/docsrc/tools/download_nugets.ps1 b/docsrc/tools/download_nugets.ps1 deleted file mode 100644 index e5510ac7e..000000000 --- a/docsrc/tools/download_nugets.ps1 +++ /dev/null @@ -1,23 +0,0 @@ -Push-Location -try { - $rootDir = [IO.Path]::Combine($PSScriptRoot, ".." , "..") - Set-Location $rootDir - dotnet tool restore - if (!(Test-Path "./bin")) { - mkdir -p ./bin - } - if (!(Test-Path "./packages/docs/")) { - mkdir -p ./packages/docs/ - } - $nuget="./bin/nuget.exe" - - if (!(Test-Path $nuget)) { - Invoke-WebRequest -Uri https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -OutFile ./bin/nuget.exe - } - & $nuget install FSharp.Core "-ExcludeVersion" "-version" 4.6.2 "-source" https://www.nuget.org/api/v2 "-OutputDirectory" packages/docs/ - & $nuget install System.Runtime "-ExcludeVersion" "-version" 4.3.1 "-source" https://www.nuget.org/api/v2 "-OutputDirectory" packages/docs/ - & $nuget install MathNet.Numerics.FSharp "-ExcludeVersion" "-version" 4.8.1 -source https://www.nuget.org/api/v2 "-OutputDirectory" packages/docs/ -} -finally { - Pop-Location -} diff --git a/docsrc/tools/download_nugets.sh b/docsrc/tools/download_nugets.sh deleted file mode 100755 index 791f7c4de..000000000 --- a/docsrc/tools/download_nugets.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -pushd $(dirname "${0}") > /dev/null -cd ../../ -dotnet tool restore -mkdir -p ./bin -mkdir -p ./packages/docs/ -NUGET="./bin/nuget.exe" -if test ! -f "$NUGET"; then - curl -o ./bin/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -fi -if test "$OS" = "Windows_NT"; then - MONO="" -else - MONO="mono" -fi - -$MONO $NUGET install FSharp.Core "-ExcludeVersion" "-version" 4.6.2 "-source" https://www.nuget.org/api/v2 "-OutputDirectory" packages/docs/ -$MONO $NUGET install System.Runtime "-ExcludeVersion" "-version" 4.3.1 "-source" https://www.nuget.org/api/v2 "-OutputDirectory" packages/docs/ -$MONO $NUGET install MathNet.Numerics.FSharp "-ExcludeVersion" "-version" 4.8.1 -source https://www.nuget.org/api/v2 "-OutputDirectory" packages/docs/ diff --git a/docsrc/tools/manually_build_docs.sh b/docsrc/tools/manually_build_docs.sh index 449d65676..d748c64a6 100755 --- a/docsrc/tools/manually_build_docs.sh +++ b/docsrc/tools/manually_build_docs.sh @@ -4,8 +4,6 @@ cd ../../ # Restore fake and paket dotnet tool restore -./docsrc/tools/download_nugets.sh - # Build # Note: some bug means can't build debug dotnet build -c Release FSharpPlus.sln