Initial commit

This commit is contained in:
Smaug123
2023-05-06 13:00:12 +01:00
commit 1dde7a65f7
28 changed files with 1164 additions and 0 deletions

20
UsePlugin/Generated.fs Normal file
View File

@@ -0,0 +1,20 @@
//------------------------------------------------------------------------------
// This code was generated by myriad.
// Changes to this file will be lost when the code is regenerated.
//------------------------------------------------------------------------------
namespace UsePlugin
/// Module containing an option-truncated version of the RecordType type
[<RequireQualifiedAccess>]
[<CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>]
module RecordType =
/// My whatnot
type Short =
{
/// A thing!
A : int
/// Another thing!
B : string
/// Yet another thing!
C : float list
}

19
UsePlugin/Program.fs Normal file
View File

@@ -0,0 +1,19 @@
namespace UsePlugin
module Program =
let f : RecordType =
{
A = Some 3
B = "hello"
C = [ 0.3 ]
}
let g : RecordType.Short =
{
A = 3
B = "hello"
C = [ 0.3 ]
}
[<EntryPoint>]
let main _ = 0

13
UsePlugin/RecordFile.fs Normal file
View File

@@ -0,0 +1,13 @@
namespace UsePlugin
/// My whatnot
[<MyriadPlugin.RemoveOptions>]
type RecordType =
{
/// A thing!
A : int option
/// Another thing!
B : string
/// Yet another thing!
C : float list
}

View File

@@ -0,0 +1,29 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<MyriadSdkGenerator Include="$(MSBuildThisFileDirectory)..\MyriadPlugin\bin\$(Configuration)\$(TargetFramework)\MyriadPlugin.dll" />
</ItemGroup>
<ItemGroup>
<Compile Include="RecordFile.fs" />
<Compile Include="Generated.fs"> <!--1-->
<MyriadFile>RecordFile.fs</MyriadFile> <!--2-->
</Compile>
<Compile Include="Program.fs" />
<None Include="..\runmyriad.sh">
<Link>runmyriad.sh</Link>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MyriadPlugin\MyriadPlugin.fsproj" />
<PackageReference Include="Myriad.Sdk" Version="0.8.2" />
<PackageReference Include="Myriad.Core" Version="0.8.2" />
</ItemGroup>
</Project>