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
#!c:/ruby/bin/ruby.exe | |
require 'rubygems' | |
require 'rubygems/gem_runner' | |
require 'rubygems/exceptions' | |
def install(lib) | |
begin | |
Gem::GemRunner.new.run ['install', lib] | |
rescue Gem::SystemExitException => e | |
end |
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
// 1. pure, don't think about IO at all | |
module Domain = | |
let add x y = x + y | |
// 2. think about IO but not its implementation | |
module App = | |
let add (getX: unit -> Async<int32>) y = | |
async { | |
let! x = getX () | |
return Domain.add x y |
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
open FSharpPlus | |
open FSharpPlus.TypeLevel | |
let x = TypeNat<2>.Value | |
// For more information see https://aka.ms/fsharp-console-apps | |
printfn "Hello from F#" |
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.Web"> | |
<PropertyGroup> | |
<!-- ... | |
based on https://stackoverflow.com/questions/7643615/how-can-i-get-msbuild-to-copy-all-files-marked-as-content-to-a-folder-preservin | |
--> | |
<WWWRoot>$(ProjectDir)wwwroot</WWWRoot> | |
</PropertyGroup> | |
<ItemGroup> | |
<!-- Specify a file collection WWWRootFiles: --> | |
<WWWRootFiles Include="..\wwwroot\**\*.*"></WWWRootFiles> |
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 @"c:/packages/FSharpPlus.1.0.0-CI00099/lib/net45/FSharpPlus.dll" | |
open System | |
open FSharpPlus | |
// Validation definition | |
type Validation<'a,'e> = Success of 'a | Failure of 'e | |
with | |
// Validation is an instance of Applicative | |
static member inline Return x = Success x |
This file has been truncated, but you can view the full file.
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
<?xml version="1.0" encoding="utf-8"?> | |
<coverage line-rate="0.1306" branch-rate="0.0974" version="1.9" timestamp="1592029460" lines-covered="512" lines-valid="3919" branches-covered="343" branches-valid="3519"> | |
<sources> | |
<source>/Users/mathieu/src/fs/FSharpPlus/src/FSharpPlus/</source> | |
</sources> | |
<packages> | |
<package name="FSharpPlus" line-rate="0.1306" branch-rate="0.0974" complexity="5733"> | |
<classes> | |
<class name="FSharpPlus.Internals.Id`1" filename="Internals.fs" line-rate="0" branch-rate="1" complexity="2"> |
This file has been truncated, but you can view the full file.
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
<?xml version="1.0" encoding="utf-8"?> | |
<coverage line-rate="0.1306" branch-rate="0.0974" version="1.9" timestamp="1592029460" lines-covered="512" lines-valid="3919" branches-covered="343" branches-valid="3519"> | |
<sources> | |
<source>/Users/mathieu/src/fs/FSharpPlus/src/FSharpPlus/</source> | |
</sources> | |
<packages> | |
<package name="FSharpPlus" line-rate="0.1306" branch-rate="0.0974" complexity="5733"> | |
<classes> | |
<class name="FSharpPlus.Internals.Id`1" filename="Internals.fs" line-rate="0" branch-rate="1" complexity="2"> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
[AttributeUsage(System.AttributeTargets.All, AllowMultiple = true, Inherited = true)] | |
public class ಠ_ಠAttribute : Attribute | |
{ | |
public ILog Log { get; set; } | |
public ಠ_ಠAttribute() | |
{ | |
Log.Info("This code is bad and you should feel bad"); | |
} | |
} |
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> | |
<TargetFramework Condition="$(Configuration)=='Test'">netcoreapp3.0</TargetFramework> | |
<TargetFramework Condition="$(Configuration)!='Test'">netstandard2.0</TargetFramework> | |
<IsPackable Condition="$(Configuration)=='Test'">false</IsPackable> | |
<DefineConstants Condition="$(Configuration)=='Test'">TESTS</DefineConstants> | |
</PropertyGroup> |
NewerOlder