This file contains hidden or 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
| module FsJson | |
| open System | |
| open System.Text.RegularExpressions | |
| type Json = | |
| | JsonObject of JsonSlot list | |
| | JsonString of String | |
| | JsonNumber of float | |
| | JsonBool of bool | |
| | JsonNull |
This file contains hidden or 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
| require 'System.CoreEx, Version=1.0.2521.104, Culture=neutral, PublicKeyToken=31bf3856ad364e35' | |
| require 'System.Interactive, Version=1.0.2521.104, Culture=neutral, PublicKeyToken=31bf3856ad364e35' | |
| require 'System.Reactive, Version=1.0.2521.104, Culture=neutral, PublicKeyToken=31bf3856ad364e35' | |
| require 'System.Windows.Forms' | |
| include System | |
| include System::Collections::Generic | |
| include System::Linq | |
| include System::Windows::Forms |
This file contains hidden or 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
| load_assembly 'System.Core' | |
| load_assembly 'System.CoreEx, Version=1.0.2521.104, Culture=neutral, PublicKeyToken=31bf3856ad364e35' | |
| load_assembly 'System.Reactive, Version=1.0.2521.104, Culture=neutral, PublicKeyToken=31bf3856ad364e35' | |
| using_clr_extensions System | |
| using_clr_extensions System::Linq | |
| include System | |
| include System::Linq |
This file contains hidden or 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
| type Cont<'a,'r> = | |
| abstract Call : ('a -> 'r) * (exn -> 'r) -> 'r | |
| let private protect f x cont econt = | |
| let res = try Choice1Of2 (f x) with err -> Choice2Of2 err | |
| match res with | |
| | Choice1Of2 v -> cont v | |
| | Choice2Of2 v -> econt v | |
| let runCont (c:Cont<_,_>) cont econt = c.Call(cont, econt) |
This file contains hidden or 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 Owin | |
| { | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Text; | |
| using System.IO; | |
| public interface IResponseHandler | |
| { | |
| Type TypeToHandle { get; } |
This file contains hidden or 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 Owin | |
| open System | |
| open System.Collections.Generic | |
| open System.Threading.Tasks | |
| type Request = IDictionary<string, obj> | |
| type Response = string * IDictionary<string, seq<string>> * seq<obj> | |
| type Application = Func<Request, Task<Response>> |
This file contains hidden or 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
| module My.Blogs | |
| open System | |
| open System.Collections.Generic | |
| open System.Web | |
| open IntelliFactory.WebSharper.Sitelets | |
| type Id = int | |
| type Html = string |
This file contains hidden or 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 INTERACTIVE | |
| #r "Microsoft.CSharp.dll" | |
| #endif | |
| open System | |
| open System.Dynamic | |
| open System.Linq.Expressions | |
| open System.Reflection | |
| open System.Runtime.CompilerServices | |
| open Microsoft.CSharp.RuntimeBinder |
This file contains hidden or 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 Pipelets | |
| open System | |
| open System.Reflection | |
| open System.Collections.Concurrent | |
| open FSharp.Control | |
| [<AutoOpen>] | |
| module AsyncOperators = | |
| let inline (>>=) m f = async.Bind(m, f) | |
| let inline mreturn x = async.Return(x) |
This file contains hidden or 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
| // Possible DSLs for Frank | |
| // Pattern matching of some sort | |
| // Can't short-circuit the match when a method isn't supported | |
| // Must have a default handler | |
| // Hard to make sensible DSL | |
| "/users/{id}" Resource<User> (fun method -> | |
| match method with | |
| | GET id -> {} | |
| | POST user -> {} |