-
Notifications
You must be signed in to change notification settings - Fork 2
/
example.fsx
36 lines (26 loc) · 892 Bytes
/
example.fsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
///
/// CurryTheF#Up
///
// Load the script
#load "curryup.fsx"
open CurryUp
let outfile = __SOURCE_DIRECTORY__ + "/testoutput.fsx"
// Generate namespace
Curry.up outfile "System.Collections.Generic"
// Generate individual types
Curry.up outfile "System.Text.StringBuilder"
Curry.up outfile "System.Collections.Generic.SortedDictionary`2"
// Generate for a DLL
Curry.up outfile @"C:\local\proj\mydll.dll"
// Piped examples
@"System.Collections" |> Curry.up outfile
@"System.Collections.Generic.List`1" |> Curry.up outfile
@"/proj/src/bin/release/my.dll" |> Curry.up outfile
// Full configuration
let config =
{ Curry.DefaultConfig with
From = "System.Collections.Generic"
To = "test.fsx"
NameOverload = fun name -> name + "'"
CurriedNamespace = fun namespace' -> namespace' + ".Curried" }
Curry.up' config