Skip to content

Instantly share code, notes, and snippets.

View forki's full-sized avatar

Steffen Forkmann forki

View GitHub Profile
open Giraffe.TokenRouter
....
let notfound = NOT_FOUND "Page not found"
choose [
GET >=>
router notfound [
let update (msg:Msg) model : Model*Cmd<Msg> =
match msg with
| ...
| Error exn ->
printfn "error: %A" exn.Message
model, Cmd.none
| Noop _ ->
model, Cmd.none
@forki
forki / Msg.fs
Created November 14, 2017 10:32
Msg
type Msg =
| ...
| ServerMsg of Elmish.WebSocket.WebSocketMsg<SocketEvent>
| Noop of unit
| Error of exn
| Send of StartSocket
@forki
forki / Init.fs
Created November 14, 2017 10:31
Init
let initModel user =
let ws = Elmish.WebSocket.createAuthenticated ("ws://localhost:8085/websocket", user.Token)
{ ChargingPoints = [||]
Reservations = Map.empty
WebSocket = ws
Connected = false
User = user },
Cmd.batch [
Cmd.ofPromise getChargingPoints () ChargingPointsLoaded Error
Elmish.WebSocket.Cmd.Configure ws ServerMsg
module Elmish.WebSocket
open Fable.Core
open Elmish
open Fable.Import.Browser
open Fable.Import.JS
open Fable.Core.JsInterop
open System.Runtime.InteropServices.ComTypes
[<RequireQualifiedAccess>]
let result =
seq { for p2a in produkteZuAnwendungen do
for p in produkte do
if p2a.Release = p.Release && p2a.``PK-ID`` = p.``PK-ID`then
for p2pg in produktGruppenZuProdukte do
if p2a.Release = p2pg.Release && p2pg.``PK-ID`` = p.``PK-ID` then
for pg in produktGruppen do
if p2a.Release = pg.Release && p2pg.``PG-ID`` = pg.``PG-ID`` then
yield p2a.Release, p2a.``ANW-ID``, p.``PK-ID``, p.Definition, pg.``PG-ID``, pg.Defintion }
[16:22:43 DEBUG] REQ (001) -> {project}, File = "~\src\msuReading.fsproj"
Data={"FileName":"d:\\code\\msu.Reading\\src\\msuReading.fsproj"}
[16:22:45 DEBUG] RES (001) <- {project} in 2359 ms: Kind={"error"}
Data={"Code":1,"Message":"MSBuild failed with exitCode 1 Working Directory: 'd:\\code\\msu.Reading\\src' Exe Path: 'dotnet' Args: 'msbuild d:\\code\\msu.Reading\\src\\msuReading.fsproj /p:SkipCompilerExecution=true /p:ProvideCommandLineArgs=true /p:CopyBuildOutputToOutputDirectory=false /p:UseCommonOutputDirectory=true /t:_Inspect_FscArgs /p:_Inspect_FscArgs_OutFile=C:\\Users\\Steffen\\AppData\\Local\\Temp\\tmp1BF7.tmp.FscArgs.txt /p:DesignTimeBuild=true /t:_Inspect_GetResolvedProjectReferences /p:_Inspect_GetResolvedProjectReferences_OutFile=C:\\Users\\Steffen\\AppData\\Local\\Temp\\tmp1C0D.tmp.GetResolvedProjectReferences.txt /t:_Inspect_GetProperties /p:_Inspect_GetProperties_OutFile=C:\\Users\\Steffen\\AppData\\Local\\Temp\\tmp1C71.tmp.GetProperties.txt /nologo /verbosity:quiet'","AdditionalData":{}}
[
@forki
forki / LICENSE
Created April 18, 2017 06:34 — forked from Pauan/LICENSE
Fable Elmish Counter Sample (in vanilla JavaScript)
Copyright (c) 2017 Paul Chapman
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
> FSharp.LanguageService.Compiler.dll!Microsoft.FSharp.Compiler.CompileOps.ScriptPreprocessClosure.resolvePackageManagerSources@4922.Invoke(Microsoft.FSharp.Core.Unit unitVar0) Zeile 4937 F#
FSharp.LanguageService.Compiler.dll!Microsoft.FSharp.Compiler.CompileOps.ScriptPreprocessClosure.loop@4950-81.GenerateNext(ref System.Collections.Generic.IEnumerable<Microsoft.FSharp.Compiler.CompileOps.ScriptPreprocessClosure.ClosureFile> next) Zeile 4972 F#
FSharp.Core.dll!Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase<Microsoft.FSharp.Compiler.CompileOps.ScriptPreprocessClosure.ClosureFile>.MoveNextImpl() Zeile 781 F#
FSharp.Core.dll!Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase<Microsoft.FSharp.Compiler.CompileOps.ScriptPreprocessClosure.ClosureFile>.System.Collections.IEnumerator.System-Collections-IEnumerator-MoveNext() Zeile 812 F#
FSharp.Core.dll!Microsoft.FSharp.Collections.SeqModule.ToList<Microsoft.FSharp.Compiler.CompileOps.ScriptPreprocessClosure.ClosureFile>(System.Collec
> FSharp.LanguageService.dll!Microsoft.VisualStudio.FSharp.LanguageService.Assert.Exception(System.Exception e) Zeile 54 F#
FSharp.Editor.dll!<StartupCode$FSharp-Editor>[email protected](System.Exception _arg5) Zeile 150 F#
FSharp.Core.dll!Microsoft.FSharp.Control.AsyncBuilderImpl.callA@839<Microsoft.FSharp.Core.FSharpOption<Microsoft.FSharp.Compiler.SourceCodeServices.FSharpProjectOptions>, System.Runtime.ExceptionServices.ExceptionDispatchInfo>.Invoke(Microsoft.FSharp.Control.AsyncParams<Microsoft.FSharp.Core.FSharpOption<Microsoft.FSharp.Compiler.SourceCodeServices.FSharpProjectOptions>> args) Zeile 843 F#
FSharp.Core.dll!<StartupCode$FSharp-Core>[email protected](Microsoft.FSharp.Core.FSharpFunc<Microsoft.FSharp.Core.Unit, Microsoft.FSharp.Control.FakeUnitValue> action) Zeile 426 F#
FSharp.Core.dll!Microsoft.FSharp.Control.Trampoline.ExecuteAction(Microsoft.FSharp.Core.FSharpFunc<Microsoft.FSharp.Core.Unit, Microsoft.FSharp.Control.FakeUnit