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 XmlCE | |
open IntelliFactory.WebSharper | |
// I don't want to open IF.WS.Html here, because I'm defining my own HTML combinators | |
type IPagelet = IntelliFactory.WebSharper.Html.IPagelet | |
module E = IntelliFactory.WebSharper.Html.Events | |
/// The type of XML attributes. | |
/// I added a couple DOM events to show that we can have more | |
/// than just key/value attributes. |
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
open IntelliFactory.WebSharper | |
open Microsoft.FSharp | |
let hasRefDef (t: System.Type) = | |
match t.GetMethods() |> Seq.find (fun m -> m.Name = "get_Body") with | |
| Quotations.DerivedPatterns.MethodWithReflectedDefinition d -> true | |
| _ -> false | |
type Foo() = | |
inherit Web.Control() |
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
let getUser = | |
<@ fun userId -> | |
query { for u in db.User do | |
where (u.Id = userId) | |
select u } @> | |
let q = | |
query { for t in db.Topic do | |
for user in (%getUser) t.CreatedBy do |
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
#r "Microsoft.Build" | |
#r "Microsoft.Build.Framework" | |
#r "Microsoft.Build.Engine" | |
open System | |
open Microsoft.Build.BuildEngine | |
open Microsoft.Build.Framework | |
let engine = new Engine() | |
engine.RegisterLogger(new ConsoleLogger()) |
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
Debugger entered--Lisp error: (void-variable setup-hook) | |
ergoemacs-user--325f9eb3b180efe44bc125f10df1a8be() | |
read-from-minibuffer("Customize variable: " nil (keymap (7 . minibuffer-keyboard-quit) (10 . minibuffer-complete-and-exit) (13 . minibuffer-complete-and-exit) keymap (7 . minibuffer-keyboard-quit) (menu-bar keymap (minibuf "Minibuf" keymap (tab menu-item "Complete" minibuffer-complete :help "Complete as far as possible") (space menu-item "Complete Word" minibuffer-complete-word :help "Complete at most one word") (63 menu-item "List Completions" minibuffer-completion-help :help "Display all possible completions") "Minibuf")) (27 keymap (118 . switch-to-completions)) (prior . switch-to-completions) (63 . minibuffer-completion-help) (32 . minibuffer-complete-word) (9 . minibuffer-complete) keymap (menu-bar keymap (minibuf "Minibuf" keymap (previous menu-item "Previous History Item" previous-history-element :help "Put previous minibuffer history element in the minibuffer") (next menu-item "Next History |
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
let mutable result = Unchecked.defaultof< ^a> | |
let success = Int32.TryParse("12", &result) | |
// can be written as: | |
let success, result = Int32.TryParse("12") |
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
// NuGet reference: WebSharper.Compiler | |
open WebSharper | |
type AR = IntelliFactory.Core.AssemblyResolution.AssemblyResolver | |
module FE = WebSharper.Compiler.FrontEnd | |
let compile (expr: Microsoft.FSharp.Quotations.Expr) : string option = | |
let loader = FE.Loader.Create (AR.Create()) (eprintfn "%O") | |
let options = | |
{ FE.Options.Default with |
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 Example1 | |
open WebSharper | |
open WebSharper.UI.Next | |
open WebSharper.UI.Next.Html | |
open WebSharper.UI.Next.Client | |
[<JavaScript>] | |
module Counter = |
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 Example1 | |
open WebSharper | |
open WebSharper.UI.Next | |
open WebSharper.UI.Next.Html | |
open WebSharper.UI.Next.Client | |
[<JavaScript>] | |
module Counter = |
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 TestLensMacro | |
open WebSharper | |
open WebSharper.JavaScript | |
open WebSharper.JQuery | |
open WebSharper.UI.Next | |
open WebSharper.UI.Next.Client | |
module Extensions = | |
module M = WebSharper.Core.Macros |
OlderNewer