Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] FSharp and Tailcall Test #2348

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions Cosmos.FSharp/Cosmos.FSharp.fsproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<!--<RuntimeIdentifier>cosmos</RuntimeIdentifier> -->
<Platform>cosmos</Platform>
<SupportsX86Intrinsics>false</SupportsX86Intrinsics>
<SelfContained>True</SelfContained>
</PropertyGroup>

<PropertyGroup>
<EnableGDB>False</EnableGDB>
<StartCosmosGDB>False</StartCosmosGDB>
<VisualStudioDebugPort>Pipe: Cosmos\Serial</VisualStudioDebugPort>
<CosmosDebugPort>Serial: COM1</CosmosDebugPort>
<Launch>VMware</Launch>
<Profile>VMware</Profile>
<Description>Use VMware Player or Workstation to deploy and debug.</Description>
<PxeInterface>192.168.0.8</PxeInterface>
</PropertyGroup>

<ItemGroup>
<Compile Include="Kernel.fs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Cosmos.Build" Version="0-*" NoWarn="NU1604" />
<PackageReference Include="Cosmos.Debug.Kernel" Version="0-*" NoWarn="NU1604" />
<PackageReference Include="Cosmos.System2" Version="0-*" NoWarn="NU1604" />
</ItemGroup>

</Project>
13 changes: 13 additions & 0 deletions Cosmos.FSharp/Kernel.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace Cosmos.FSharp

open System

type Kernel() =
inherit Cosmos.System.Kernel()
override u.BeforeRun() = (Console.WriteLine("Cosmos booted successfully. Type a line of text to get it echoed back.");)
override u.Run() =
Console.Write("Input: ");
printf("printf/println fails"); // this fails OpCode 'Tailcall' not implemented
let input = Console.ReadLine();
Console.Write("Text typed: ");
Console.WriteLine(input);
Loading