debian/0000775000000000000000000000000012277057147007204 5ustar debian/fsharpi.10000664000000000000000000000633512276646630010731 0ustar .\" Originally generated by help2man 1.44.1. .TH FSHARPI "1" "February 2014" "fsharpi 3.0.34" "User Commands" .SH NAME fsharpi \- manual page for F# 3.0 interactive REPL (Open Source Edition) .SH DESCRIPTION Interactive REPL console for the F# language, version 3.0 .SH SYNOPSIS \fBfsharpi\fR [\fIoptions\fR...] [\fIscript.fsx\fR [\fIarguments\fR...] .SH OPTIONS .SS "INPUT FILES" .TP \fB\-\-use:\fR\fIfile\fR Use the given file on startup as initial input .TP \fB\-\-load:\fR\fIfile\fR #load the given file on startup \fB\-\-reference:\fR\fIassembly\fR, \fB\-r\fR \fIassembly\fR Reference an assembly \fB\-\-\fR Pass remaning arguments to script, accessed using fsi.CommandLineArgs .SS "CODE GENERATION" .TP \fB\-\-debug\fR[+|\-], \fB-g\fR Emit debug information .TP \fB\-\-debug\fR:[full|pdbonly] Specify debugging type: \fIfull\fR, \fIpdbonly\fR. \fIfull\fR is the default and enables attaching a debugger to a running program. .TP \fB\-\-optimize\fR[+|\-], \fB\-O\fR Enable optimizations .TP \fB\-\-tailcalls\fR[+|\-] Enable tailcalls .TP \fB\-\-crossoptimize\fR[+|\-] Enable cross\-module optimizations .SS "ERRORS AND WARNINGS" .TP \fB\-\-warnaserror\fR[+|\-] Report all warnings as errors .TP \fB\-\-warnaserror\fR[+|\-]:\fIwarn\fR[;\fIwarn\fR[;...]] Report specific warnings as errors .TP \fB\-\-warn\fR:\fIn\fR Set a warning level (0\-5) .TP \fB\-\-nowarn\fR:\fIwarn\fR[;\fIwarn\fR[;...]] Disable specific warning messages .TP \fB\-\-warnon\fR:\fIwarn\fR[;\fIwarn\fR[;...]] Enable specific warnings that may be off by default .TP \fB\-\-consolecolors\fR[+|\-] Output warning and error messages in color .SS "LANGUAGE" .TP \fB\-\-checked\fR[+|\-] Generate overflow checks .TP \fB\-\-define\fR:\fIstring\fR, \fB\-d\fR \fIstring\fR Define conditional compilation symbols .TP \fB\-\-mlcompatibility\fR Ignore ML compatibility warnings .SS "MISCELLANEOUS" .TP \fB\-\-nologo\fR Suppress compiler copyright message .TP \fB\-\-help\fR, \fB\-?\fR Display this usage message .SS "ADVANCED" .TP \fB\-\-codepage\fR:\fIn\fR Specify the codepage used to read source files .TP \fB\-\-utf8output\fR Output messages in UTF\-8 encoding .TP \fB\-\-fullpaths\fR Output messages with fully qualified paths .TP \fB\-\-lib\fR:\fIdir\fR[;\fIdir\fR[;...]], \fB\-I\fR \fIdir\fR[;\fIdir\fR[;...]] Specify a directory for the include path which is used to resolve source files and assemblies .TP \fB\-\-baseaddress\fR:\fIaddress\fR Base address for the library to be built .TP \fB\-\-noframework\fR Do not reference the default CLI assemblies by default .TP \fB\-\-standalone\fR Statically link the F# library and all referenced DLLs that depend on it into the assembly being generated .TP \fB\-\-staticlink\fR:\fIassembly\fR Statically link the given assembly and all referenced DLLs that depend on this assembly. Use an assembly name e.g. \fImylib\fR, not a DLL name. .TP \fB\-\-resident\fR Use a resident background compilation service to improve compiler startup times. .TP \fB\-\-pdb\fR:\fIfile\fR Name the output debug file .TP \fB\-\-simpleresolution\fR Resolve assembly references using directory\-based rules rather than MSBuild resolution .TP \fB\-\-highentropyva\fR[+|\-] Enable high\-entropy ASLR .TP \fB\-\-subsystemversion\fR:\fIstring\fR Specify subsystem version of this assembly debian/compat0000664000000000000000000000000212276130276010374 0ustar 8 debian/libfsharp-core4.3-cil.install0000664000000000000000000000022312276130276014455 0ustar usr/lib/mono/gac/FSharp.Core/4.3*/* /usr/lib/cli/FSharp.Core-4.3 usr/lib/mono/gac/policy.*.FSharp.Core/* /usr/lib/cli/FSharp.Core-4.3 debian/tests/0000775000000000000000000000000012276647071010346 5ustar debian/tests/basic-xbuild-project0000664000000000000000000000007012276130276014272 0ustar #! /bin/sh exec xbuild debian/tests/BasicXBuildTest.sln debian/tests/control0000664000000000000000000000011012276647071011741 0ustar Tests: basic-xbuild-project Restrictions: Depends: fsharp, mono-xbuild debian/tests/BasicXBuildTest/0000775000000000000000000000000012276130276013331 5ustar debian/tests/BasicXBuildTest/FSharpTest.fsproj0000664000000000000000000000352112276130276016602 0ustar Debug x86 10.0.0 2.0 {1F2C4886-C6BA-4530-AAFE-470E7EA8113B} Exe FSharpTest FSharpTest v4.5 true full bin\Debug DEBUG prompt x86 true true pdbonly true bin\Release prompt x86 true true debian/tests/BasicXBuildTest/Tutorial.fs0000664000000000000000000005541112276130276015474 0ustar // Author: // Christohper James Halse Rogers // // Copyright © 2014 Christopher James Halse Rogers // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . // This sample will guide you through elements of the F# language. // // ******************************************************************************************************* // To execute the code in F# Interactive, highlight a section of code and press Alt-Enter or right-click // and select "Execute in Interactive". You can open the F# Interactive Window from the "View" menu. // ******************************************************************************************************* // // For more about F#, see: // http://fsharp.net // // For additional templates to use with F#, see the 'Online Templates' in Visual Studio, // 'New Project' --> 'Online Templates' // // For specific F# topics, see: // http://fsharp.org (F# Open Organization) // http://tryfsharp.org (F# Learning Portal) // http://go.microsoft.com/fwlink/?LinkID=234174 (Visual F# Development Portal) // http://go.microsoft.com/fwlink/?LinkID=124614 (Visual F# Code Gallery) // http://go.microsoft.com/fwlink/?LinkId=235173 (Visual F# Math/Stats Programming) // http://go.microsoft.com/fwlink/?LinkId=235176 (Visual F# Charting) // Contents: // - Integers and basic functions // - Booleans // - Strings // - Tuples // - Lists and list processing // - Classes // - Generic classes // - Implementing interfaces // - Arrays // - Sequences // - Recursive functions // - Record types // - Union types // - Option types // - Pattern matching // - Units of measure // - Parallel array programming // - Using events // - Database access using type providers // - OData access using type providers // --------------------------------------------------------------- // Integers and basic functions // --------------------------------------------------------------- module Integers = let sampleInteger = 176 /// Do some arithmetic starting with the first integer let sampleInteger2 = (sampleInteger/4 + 5 - 7) * 4 /// A list of the numbers from 0 to 99 let sampleNumbers = [ 0 .. 99 ] /// A list of all tuples containing all the numbers from 0 to 99 and their squares let sampleTableOfSquares = [ for i in 0 .. 99 -> (i, i*i) ] // The next line prints a list that includes tuples, using %A for generic printing printfn "The table of squares from 0 to 99 is:\n%A" sampleTableOfSquares module BasicFunctions = // Use 'let' to define a function that accepts an integer argument and returns an integer. let func1 x = x*x + 3 // Parenthesis are optional for function arguments let func1a (x) = x*x + 3 /// Apply the function, naming the function return result using 'let'. /// The variable type is inferred from the function return type. let result1 = func1 4573 printfn "The result of squaring the integer 4573 and adding 3 is %d" result1 // When needed, annotate the type of a parameter name using '(argument:type)' let func2 (x:int) = 2*x*x - x/5 + 3 let result2 = func2 (7 + 4) printfn "The result of applying the 1st sample function to (7 + 4) is %d" result2 let func3 x = if x < 100.0 then 2.0*x*x - x/5.0 + 3.0 else 2.0*x*x + x/5.0 - 37.0 let result3 = func3 (6.5 + 4.5) printfn "The result of applying the 2nd sample function to (6.5 + 4.5) is %f" result3 // --------------------------------------------------------------- // Booleans // --------------------------------------------------------------- module SomeBooleanValues = let boolean1 = true let boolean2 = false let boolean3 = not boolean1 && (boolean2 || false) printfn "The expression 'not boolean1 && (boolean2 || false)' is %A" boolean3 // --------------------------------------------------------------- // Strings // --------------------------------------------------------------- module StringManipulation = let string1 = "Hello" let string2 = "world" /// Use @ to create a verbatim string literal let string3 = @"c:\Program Files\" /// Using a triple-quote string literal let string4 = """He said "hello world" after you did""" let helloWorld = string1 + " " + string2 // concatenate the two strings with a space in between printfn "%s" helloWorld /// A string formed by taking the first 7 characters of one of the result strings let substring = helloWorld.[0..6] printfn "%s" substring // --------------------------------------------------------------- // Tuples (ordered sets of values) // --------------------------------------------------------------- module Tuples = /// A simple tuple of integers let tuple1 = (1, 2, 3) /// A function that swaps the order of two values in a tuple. /// QuickInfo shows that the function is inferred to have a generic type. let swapElems (a, b) = (b, a) printfn "The result of swapping (1, 2) is %A" (swapElems (1,2)) /// A tuple consisting of an integer, a string, and a double-precision floating point number let tuple2 = (1, "fred", 3.1415) printfn "tuple1: %A tuple2: %A" tuple1 tuple2 // --------------------------------------------------------------- // Lists and list processing // --------------------------------------------------------------- module Lists = let list1 = [ ] /// an empty list let list2 = [ 1; 2; 3 ] /// list of 3 elements let list3 = 42 :: list2 /// a new list with '42' added to the beginning let numberList = [ 1 .. 1000 ] /// list of integers from 1 to 1000 /// A list containing all the days of the year let daysList = [ for month in 1 .. 12 do for day in 1 .. System.DateTime.DaysInMonth(2012, month) do yield System.DateTime(2012, month, day) ] /// A list containing the tuples which are the coordinates of the black squares on a chess board. let blackSquares = [ for i in 0 .. 7 do for j in 0 .. 7 do if (i+j) % 2 = 1 then yield (i, j) ] /// Square the numbers in numberList, using the pipeline operator to pass an argument to List.map let squares = numberList |> List.map (fun x -> x*x) /// Computes the sum of the squares of the numbers divisible by 3. let sumOfSquaresUpTo n = numberList |> List.filter (fun x -> x % 3 = 0) |> List.sumBy (fun x -> x * x) // --------------------------------------------------------------- // Classes // --------------------------------------------------------------- module DefiningClasses = /// The class's constructor takes two arguments: dx and dy, both of type 'float'. type Vector2D(dx : float, dy : float) = /// The length of the vector, computed when the object is constructed let length = sqrt (dx*dx + dy*dy) // 'this' specifies a name for the object's self identifier // In instance methods, it must appear before the member name. member this.DX = dx member this.DY = dy member this.Length = length member this.Scale(k) = Vector2D(k * this.DX, k * this.DY) /// An instance of the Vector2D class let vector1 = Vector2D(3.0, 4.0) /// Get a new scaled vector object, without modifying the original object let vector2 = vector1.Scale(10.0) printfn "Length of vector1: %f Length of vector2: %f" vector1.Length vector2.Length // --------------------------------------------------------------- // Generic classes // --------------------------------------------------------------- module DefiningGenericClasses = type StateTracker<'T>(initialElement: 'T) = // 'T is the type parameter for the class /// Store the states in an array let mutable states = [ initialElement ] /// Add a new element to the list of states member this.UpdateState newState = states <- newState :: states // use the '<-' operator to mutate the value /// Get the entire list of historical states member this.History = states /// Get the latest state member this.Current = states.Head /// An 'int' instance of the state tracker class. Note that the type parameter is inferred. let tracker = StateTracker 10 // Add a state tracker.UpdateState 17 // --------------------------------------------------------------- // Implementing interfaces // --------------------------------------------------------------- /// Type that implements IDisposable type ReadFile() = let file = new System.IO.StreamReader("readme.txt") member this.ReadLine() = file.ReadLine() // this class's implementation of IDisposable members interface System.IDisposable with member this.Dispose() = file.Close() // --------------------------------------------------------------- // Arrays // --------------------------------------------------------------- module Arrays = /// The empty array let array1 = [| |] let array2 = [| "hello"; "world"; "and"; "hello"; "world"; "again" |] let array3 = [| 1 .. 1000 |] /// An array containing only the words "hello" and "world" let array4 = [| for word in array2 do if word.Contains("l") then yield word |] /// An array initialized by index and containing the even numbers from 0 to 2000 let evenNumbers = Array.init 1001 (fun n -> n * 2) /// sub-array extracted using slicing notation let evenNumbersSlice = evenNumbers.[0..500] for word in array4 do printfn "word: %s" word // modify an array element using the left arrow assignment operator array2.[1] <- "WORLD!" /// Calculates the sum of the lengths of the words that start with 'h' let sumOfLengthsOfWords = array2 |> Array.filter (fun x -> x.StartsWith "h") |> Array.sumBy (fun x -> x.Length) // --------------------------------------------------------------- // Sequences // --------------------------------------------------------------- module Sequences = // Sequences are evaluated on-demand and are re-evaluated each time they are iterated. // An F# sequence is an instance of a System.Collections.Generic.IEnumerable<'T>, // so Seq functions can be applied to Lists and Arrays as well. /// The empty sequence let seq1 = Seq.empty let seq2 = seq { yield "hello"; yield "world"; yield "and"; yield "hello"; yield "world"; yield "again" } let numbersSeq = seq { 1 .. 1000 } /// another array containing only the words "hello" and "world" let seq3 = seq { for word in seq2 do if word.Contains("l") then yield word } let evenNumbers = Seq.init 1001 (fun n -> n * 2) let rnd = System.Random() /// An infinite sequence which is a random walk // Use yield! to return each element of a subsequence, similar to IEnumerable.SelectMany. let rec randomWalk x = seq { yield x yield! randomWalk (x + rnd.NextDouble() - 0.5) } let first100ValuesOfRandomWalk = randomWalk 5.0 |> Seq.truncate 100 |> Seq.toList // --------------------------------------------------------------- // Recursive functions // --------------------------------------------------------------- module RecursiveFunctions = /// Compute the factorial of an integer. Use 'let rec' to define a recursive function let rec factorial n = if n = 0 then 1 else n * factorial (n-1) /// Computes the greatest common factor of two integers. // Since all of the recursive calls are tail calls, the compiler will turn the function into a loop, // which improves performance and reduces memory consumption. let rec greatestCommonFactor a b = if a = 0 then b elif a < b then greatestCommonFactor a (b - a) else greatestCommonFactor (a - b) b /// Computes the sum of a list of integers using recursion. let rec sumList xs = match xs with | [] -> 0 | y::ys -> y + sumList ys /// Make the function tail recursive, using a helper function with a result accumulator let rec private sumListTailRecHelper accumulator xs = match xs with | [] -> accumulator | y::ys -> sumListTailRecHelper (accumulator+y) ys let sumListTailRecursive xs = sumListTailRecHelper 0 xs // --------------------------------------------------------------- // Record types // --------------------------------------------------------------- module RecordTypes = // define a record type type ContactCard = { Name : string Phone : string Verified : bool } let contact1 = { Name = "Alf" ; Phone = "(206) 555-0157" ; Verified = false } // Create a new record that is a copy of contact1, // but has different values for the 'Phone' and 'Verified' fields let contact2 = { contact1 with Phone = "(206) 555-0112"; Verified = true } /// Converts a 'ContactCard' object to a string let showCard c = c.Name + " Phone: " + c.Phone + (if not c.Verified then " (unverified)" else "") // --------------------------------------------------------------- // Union types // --------------------------------------------------------------- module UnionTypes = /// Represents the suit of a playing card type Suit = | Hearts | Clubs | Diamonds | Spades /// Represents the rank of a playing card type Rank = /// Represents the rank of cards 2 .. 10 | Value of int | Ace | King | Queen | Jack static member GetAllRanks() = [ yield Ace for i in 2 .. 10 do yield Value i yield Jack yield Queen yield King ] type Card = { Suit: Suit; Rank: Rank } /// Returns a list representing all the cards in the deck let fullDeck = [ for suit in [ Hearts; Diamonds; Clubs; Spades] do for rank in Rank.GetAllRanks() do yield { Suit=suit; Rank=rank } ] /// Converts a 'Card' object to a string let showCard c = let rankString = match c.Rank with | Ace -> "Ace" | King -> "King" | Queen -> "Queen" | Jack -> "Jack" | Value n -> string n let suitString = match c.Suit with | Clubs -> "clubs" | Diamonds -> "diamonds" | Spades -> "spades" | Hearts -> "hearts" rankString + " of " + suitString let printAllCards() = for card in fullDeck do printfn "%s" (showCard card) // --------------------------------------------------------------- // Option types // --------------------------------------------------------------- module OptionTypes = /// Option values are any kind of value tagged with either 'Some' or 'None'. /// They are used extensively in F# code to represent the cases where many other /// languages would use null references. type Customer = { zipCode : decimal option } /// Abstract class that computes the shipping zone for the customer's zip code, /// given implementations for the 'GetState' and 'GetShippingZone' abstract methods. [] type ShippingCalculator = abstract GetState : decimal -> string option abstract GetShippingZone : string -> int /// Return the shipping zone corresponding to the customer's ZIP code /// Customer may not yet have a ZIP code or the ZIP code may be invalid member this.CustomerShippingZone(customer : Customer) = customer.zipCode |> Option.bind this.GetState |> Option.map this.GetShippingZone // --------------------------------------------------------------- // Pattern matching // --------------------------------------------------------------- module PatternMatching = /// A record for a person's first and last name type Person = { First : string Last : string } /// Define a discriminated union of 3 different kinds of employees type Employee = /// Engineer is just herself | Engineer of Person /// Manager has list of reports | Manager of Person * list /// Executive also has an assistant | Executive of Person * list * Employee /// Count everyone underneath the employee in the management hierarchy, including the employee let rec countReports(emp : Employee) = 1 + match emp with | Engineer(id) -> 0 | Manager(id, reports) -> reports |> List.sumBy countReports | Executive(id, reports, assistant) -> (reports |> List.sumBy countReports) + countReports assistant /// Find all managers/executives named "Dave" who do not have any reports let rec findDaveWithOpenPosition(emps : Employee list) = emps |> List.filter(function | Manager({First = "Dave"}, []) -> true // [] matches the empty list | Executive({First = "Dave"}, [], _) -> true | _ -> false) // '_' is a wildcard pattern that matches anything // this handles the "or else" case // --------------------------------------------------------------- // Units of measure // --------------------------------------------------------------- module UnitsOfMeasure = // Code can be annotated with units of measure when using F# arithmetic over numeric types open Microsoft.FSharp.Data.UnitSystems.SI.UnitNames [] type mile = /// Conversion factor mile to meter: meter is defined in SI.UnitNames static member asMeter = 1600. let d = 50. // Distance expressed using imperial units let d' = d * mile.asMeter // Same distance expressed using metric system printfn "%A = %A" d d' // let error = d + d' // Compile error: units of measure do not match // --------------------------------------------------------------- // Parallel array programming // --------------------------------------------------------------- module ParallelArrayProgramming = let oneBigArray = [| 0 .. 100000 |] // do some CPU intensive computation let rec computeSomeFunction x = if x <= 2 then 1 else computeSomeFunction (x - 1) + computeSomeFunction (x - 2) // Do a parallel map over a large input array let computeResults() = oneBigArray |> Array.Parallel.map (fun x -> computeSomeFunction (x % 20)) printfn "Parallel computation results: %A" (computeResults()) // --------------------------------------------------------------- // Using events // --------------------------------------------------------------- module Events = open System // Create instance of Event object that consists of subscription point (event.Publish) and event trigger (event.Trigger) let simpleEvent = new Event() // Add handler simpleEvent.Publish.Add(fun x -> printfn "this is handler was added with Publish.Add: %d" x) // Trigger event simpleEvent.Trigger(5) // Create instance of Event that follows standard .NET convention: (sender, EventArgs) let eventForDelegateType = new Event() // Add handler eventForDelegateType.Publish.AddHandler( EventHandler(fun _ _ -> printfn "this is handler was added with Publish.AddHandler")) // Trigger event (note that sender argument should be set) eventForDelegateType.Trigger(null, EventArgs.Empty) // --------------------------------------------------------------- // Database access using type providers // --------------------------------------------------------------- module DatabaseAccess = // The easiest way to access a SQL database from F# is to use F# type providers. // Add references to System.Data, System.Data.Linq, and FSharp.Data.TypeProviders.dll. // You can use Server Explorer to build your ConnectionString. (* #r "System.Data" #r "System.Data.Linq" #r "FSharp.Data.TypeProviders" open Microsoft.FSharp.Data.TypeProviders type SqlConnection = SqlDataConnection let db = SqlConnection.GetDataContext() let table = query { for r in db.Table do select r } *) // You can also use SqlEntityConnection instead of SqlDataConnection, which accesses the database using Entity Framework. () // --------------------------------------------------------------- // OData access using type providers // --------------------------------------------------------------- module OData = (* open System.Data.Services.Client open Microsoft.FSharp.Data.TypeProviders // Consume demographics population and income OData service from Azure Marketplace. // For more information, see http://go.microsoft.com/fwlink/?LinkId=239712 type Demographics = Microsoft.FSharp.Data.TypeProviders.ODataService let ctx = Demographics.GetDataContext() // Sign up for a Azure Marketplace account at https://datamarket.azure.com/account/info ctx.Credentials <- System.Net.NetworkCredential ("", "") let cities = query { for c in ctx.demog1 do where (c.StateName = "Washington") } for c in cities do printfn "%A - %A" c.GeographyId c.PerCapitaIncome2010.Value *) () #if COMPILED module BoilerPlateForForm = [] do () // do System.Windows.Forms.Application.Run() #endif debian/tests/BasicXBuildTest.sln0000664000000000000000000000160712276130276014053 0ustar  Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 Project("{4925A630-B079-445d-BCD4-3A9C94FE9307}") = "BasicXBuildTest", "BasicXBuildTest\FSharpTest.fsproj", "{1F2C4886-C6BA-4530-AAFE-470E7EA8113B}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x86 = Debug|x86 Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {1F2C4886-C6BA-4530-AAFE-470E7EA8113B}.Debug|x86.ActiveCfg = Debug|x86 {1F2C4886-C6BA-4530-AAFE-470E7EA8113B}.Debug|x86.Build.0 = Debug|x86 {1F2C4886-C6BA-4530-AAFE-470E7EA8113B}.Release|x86.ActiveCfg = Release|x86 {1F2C4886-C6BA-4530-AAFE-470E7EA8113B}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(MonoDevelopProperties) = preSolution StartupItem = FSharpTest\FSharpTest.fsproj EndGlobalSection EndGlobal debian/rules0000775000000000000000000000204212276646630010262 0ustar #!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # # Modified to make a template file for a multi-binary package with separated # build-arch and build-indep targets by Bill Allombert 2001 # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # This has to be exported to make some magic below work. export DH_OPTIONS override_dh_fixperms: dh_fixperms # Fix permissions of non-executable cruft find debian -iname *.xml -type f -exec chmod 644 {} + find debian -iname *.sigdata -type f -exec chmod 644 {} + find debian -iname *.optdata -type f -exec chmod 644 {} + find debian -iname *.targets -type f -exec chmod 644 {} + override_dh_clideps: dh_clideps --exclude-moduleref=mscoree.dll %: dh $@ --with=cli,autoreconf debian/libfsharp-core4.3-cil.installcligac0000664000000000000000000000056512276130276015631 0ustar /usr/lib/cli/FSharp.Core-4.3/FSharp.Core.dll /usr/lib/cli/FSharp.Core-4.3/0.0.0.0__b03f5f7f11d50a3a/policy.2.0.FSharp.Core.dll /usr/lib/cli/FSharp.Core-4.3/0.0.0.0__b03f5f7f11d50a3a/policy.2.3.FSharp.Core.dll /usr/lib/cli/FSharp.Core-4.3/0.0.0.0__b03f5f7f11d50a3a/policy.4.0.FSharp.Core.dll /usr/lib/cli/FSharp.Core-4.3/0.0.0.0__b03f5f7f11d50a3a/policy.4.3.FSharp.Core.dll debian/docs0000664000000000000000000000003512276130276010047 0ustar README.md README-original.md debian/control0000664000000000000000000000360612277057145010612 0ustar Source: fsharp Section: cli-mono Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Debian CLI Applications Team Uploaders: Christopher James Halse Rogers Build-Depends: debhelper (>= 8.0.0), dh-autoreconf, cli-common-dev (>= 0.9), Standards-Version: 3.9.5 Homepage: http://fsharp.org Vcs-Git: git://anongit.debian.org/pkg-cli-apps/packages/fsharp.git Vcs-Browser: http://anongit.debian.org/?p=pkg-cli-apps/packages/fsharp.git;a=summary XS-Testsuite: autopkgtest Package: fsharp Architecture: all Depends: ${cli:Depends}, ${shlibs:Depends}, ${misc:Depends}, libmono-compilerservices-symbolwriter4.0-cil, Breaks: fsharp-console (<< 3.0.34+dfsg-3) Replaces: fsharp-console (<< 3.0.34+dfsg-3) Description: functional-first programming language - compiler for the CLI F# is a multi-paradigm programming language, supporting functional, imperative, and object-oriented structures. . This package contains an F# compiler targeting the CLI runtime. Package: libfsharp-core4.3-cil Architecture: all Depends: ${cli:Depends}, ${shlibs:Depends}, ${misc:Depends} Description: functional-first programming language - core runtime library F# is a multi-paradigm programming language, supporting functional, imperative, and object-oriented structures. . This package contains the core runtime library for F# binaries. Package: libfsharp-data-typeproviders4.3-cil Architecture: all Depends: ${cli:Depends}, ${shlibs:Depends}, ${misc:Depends} Description: functional-first programming language - data integration library F# is a multi-paradigm programming language, supporting functional, imperative, and object-oriented structures. . This package contains a runtime library that automatically binds remote data sources such as OData, SQL, or WSDL into strongly-typed objects. debian/libfsharp-data-typeproviders4.3-cil.installcligac0000664000000000000000000000011112276130276020512 0ustar /usr/lib/cli/FSharp.Data.TypeProviders-4.3/FSharp.Data.TypeProviders.dll debian/source/0000775000000000000000000000000012276130276010476 5ustar debian/source/format0000664000000000000000000000001412276130276011704 0ustar 3.0 (quilt) debian/fsharp.installcliframework0000664000000000000000000000173612276130276014466 0ustar # Core library 40 /usr/lib/cli/FSharp.Core-4.3/FSharp.Core.dll 40 /usr/lib/cli/FSharp.Core-4.3/FSharp.Core.sigdata 40 /usr/lib/cli/FSharp.Core-4.3/FSharp.Core.optdata 45 /usr/lib/cli/FSharp.Core-4.3/FSharp.Core.dll 45 /usr/lib/cli/FSharp.Core-4.3/FSharp.Core.sigdata 45 /usr/lib/cli/FSharp.Core-4.3/FSharp.Core.optdata # Build targets for xbuild support 40 /usr/lib/cli/fsharp/FSharp.Build.dll 40 /usr/lib/cli/fsharp/Microsoft.FSharp.Targets 40 /usr/lib/cli/fsharp/Microsoft.Portable.FSharp.Targets ## The lines above are mandatory for correct functionality ## The lines below are optional - these replicate the upstream ## layout, but aren't used by any tools I'm aware of. # Add the compiler binary, as tools may look for it here 40 /usr/lib/cli/fsharp/fsc.exe 40 /usr/lib/cli/fsharp/fsi.exe # Compiler infrastructure 40 /usr/lib/cli/fsharp/FSharp.Compiler.dll 40 /usr/lib/cli/fsharp/FSharp.Compiler.Interactive.Settings.dll 40 /usr/lib/cli/fsharp/FSharp.Compiler.Server.Shared.dll debian/copyright0000664000000000000000000000175212276130276011136 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: fsharp Source: http://fsharp.github.com/fsharp/ Files: * Copyright: © 2002-2012 Microsoft Corporation License: Apache-2.0 Files: debian/* Copyright: 2012 Christopher James Halse Rogers License: Apache-2.0 License: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at . http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. . On Debian systems, the complete text of the Apache version 2.0 license can be found in "/usr/share/common-licenses/Apache-2.0". debian/fsharp-doc.install0000664000000000000000000000000712276130276012611 0ustar #DOCS# debian/watch0000664000000000000000000000034712276130345010230 0ustar # format version number, currently 3; this line is compulsory! version=3 opts="dversionmangle=s/\+dfsg//,filenamemangle=s_.*/(\d[\d\.]*)\.tar\.gz_fsharp-$1.tar.gz_" \ https://github.com/fsharp/fsharp/tags .*/(\d[\d\.]*)\.tar\.gz debian/changelog0000664000000000000000000000444412277057121011054 0ustar fsharp (3.0.34+dfsg-3ubuntu1) trusty; urgency=medium * Make DEP-8 test depend on only fsharp package to pick up any dependency breakage * Add missing libmono-compilerservices-symbolwriter4.0-cil dependency to fsharp * Add fsharpc/fsharpi manpages * Strip executable bit from xbuild .Targets files; now lintian clean! -- Christopher James Halse Rogers Thu, 13 Feb 2014 16:55:16 +1100 fsharp (3.0.34+dfsg-3) unstable; urgency=medium * Fix typo in FSharp.Compiler.Interactive.Settings install dir (LP: #1251253) * Drop disable-debug-symbols patch; replace with dependency on compilerservices-symbolwriter. (LP: #1259230) * Drop FSharp.Build.dll & FSharp.Compiler.* from the GAC and bundle them into the fsharp package. * Bump Standards-Version to 3.9.5 (no changes needed) * Improve watch file -- Christopher James Halse Rogers Tue, 11 Feb 2014 01:06:06 +0100 fsharp (3.0.34+dfsg-2) experimental; urgency=medium * Install F# xbuild project infrastructure * Add basic DEP-8 testsuite, checking that a minimal F# project can be built by xbuild * Add (temporary) links between fsharp and fsharp-console to fix xbuild projects. -- Christopher James Halse Rogers Fri, 07 Feb 2014 07:43:43 +0100 fsharp (3.0.34+dfsg-1) experimental; urgency=low * New upstream release * Add README.source, documenting the +dfsg * Add Vcs-Git headers * Don't build 2.0- and 3.5-profile F# libraries * Fix incorrect permissions more carefully * Bump standards version to 3.9.5 (no changes required) * Properly mark as team-maintained * Make watch file more robust * Use new cli-common infrastructure to install core libraries in framework paths (Closes: #705906, #706683) * Debian CLI policy fixes for fsharpc and fsharpi - now supports parallel mono installations! * debian/patches/never-ask-for-debug-symbols.patch: Disable request of debug symbols for dynamically generated code by fsharpi - Mono does not implement this (cf: https://github.com/fsharp/fsharp/issues/241) -- Christopher James Halse Rogers Fri, 17 Jan 2014 16:20:20 +1100 fsharp (3.0.26-1) unstable; urgency=low * Initial release (Closes: #603306) -- Christopher James Halse Rogers Sun, 04 Nov 2012 09:49:41 +1100 debian/fsharp-doc.docs0000664000000000000000000000000712276130276012073 0ustar #DOCS# debian/fsharp.install0000664000000000000000000000106012276647071012054 0ustar usr/bin/fsharpc usr/bin/fsharpi usr/lib/mono/gac/fsc/4.3*/* /usr/lib/cli/fsharp usr/lib/mono/gac/fsi/4.3*/* /usr/lib/cli/fsharp usr/lib/mono/Microsoft?F# usr/lib/mono/Microsoft?SDKs usr/lib/mono/xbuild usr/lib/mono/4.0/Microsoft.*.Targets /usr/lib/cli/fsharp usr/lib/mono/gac/FSharp.Build/4.3*/* /usr/lib/cli/fsharp usr/lib/mono/gac/FSharp.Compiler.Interactive.Settings/4.3*/* /usr/lib/cli/fsharp usr/lib/mono/gac/FSharp.Compiler.Server.Shared/4.3*/* /usr/lib/cli/fsharp usr/lib/mono/gac/FSharp.Compiler/4.3*/* /usr/lib/cli/fsharp debian/patches/0000775000000000000000000000000012276647071010633 5ustar debian/patches/series0000664000000000000000000000006212276130276012040 0ustar build-only-4.0-libs.patch debian-cli-policy.patch debian/patches/build-only-4.0-libs.patch0000664000000000000000000000405112276647071015160 0ustar --- a/src/fsharp/FSharp.Core/Makefile.in +++ b/src/fsharp/FSharp.Core/Makefile.in @@ -103,10 +103,10 @@ include $(topdir)/src/fsharp/targets.make -do-final: do-4-0 do-2-0 do-2-1 +do-final: do-4-0 clean: clean-4-0 clean-2-0 clean-2-1 -install: install-lib-4 install-lib-4-5 install-lib-2 install-lib-2-1 +install: install-lib-4 install-lib-4-5 --- a/src/fsharp/policy.2.0.FSharp.Core/Makefile.in +++ b/src/fsharp/policy.2.0.FSharp.Core/Makefile.in @@ -20,10 +20,10 @@ cp policy.2.0.FSharp.Core.dll.config $(@D) al /link:policy.2.0.FSharp.Core.dll.config /out:$@ /delaysign /keyfile:$(topdir)msfinal.pub /version:$(VERSION_4_0) -do-final: do-2-0 do-4-0 +do-final: do-4-0 clean: clean-2-0 clean-4-0 -install: install-lib-2 install-lib-4 +install: install-lib-4 --- a/src/fsharp/policy.2.3.FSharp.Core/Makefile.in +++ b/src/fsharp/policy.2.3.FSharp.Core/Makefile.in @@ -20,10 +20,10 @@ cp policy.2.3.FSharp.Core.dll.config $(@D) al /link:policy.2.3.FSharp.Core.dll.config /out:$@ /delaysign /keyfile:$(topdir)msfinal.pub /version:$(VERSION_4_0) -do-final: do-2-0 do-4-0 +do-final: do-4-0 clean: clean-2-0 clean-4-0 -install: install-lib-2 install-lib-4 +install: install-lib-4 --- a/src/fsharp/policy.4.0.FSharp.Core/Makefile.in +++ b/src/fsharp/policy.4.0.FSharp.Core/Makefile.in @@ -20,11 +20,11 @@ cp policy.4.0.FSharp.Core.dll.config $(@D) al /link:policy.4.0.FSharp.Core.dll.config /out:$@ /delaysign /keyfile:$(topdir)msfinal.pub /version:$(VERSION_4_0) -do-final: do-2-0 do-4-0 +do-final: do-4-0 clean: clean-2-0 clean-4-0 -install: install-lib-2 install-lib-4 +install: install-lib-4 --- a/src/fsharp/policy.4.3.FSharp.Core/Makefile.in +++ b/src/fsharp/policy.4.3.FSharp.Core/Makefile.in @@ -20,11 +20,11 @@ cp policy.4.3.FSharp.Core.dll.config $(@D) al /link:policy.4.3.FSharp.Core.dll.config /out:$@ /delaysign /keyfile:$(topdir)msfinal.pub /version:$(VERSION_4_0) -do-final: do-2-0 do-4-0 +do-final: do-4-0 clean: clean-2-0 clean-4-0 -install: install-lib-2 install-lib-4 +install: install-lib-4 debian/patches/debian-cli-policy.patch0000664000000000000000000000233012276647071015136 0ustar --- a/launcher.in +++ b/launcher.in @@ -27,4 +27,4 @@ # location of the default FSharp install in order to find the FSharp compiler binaries (see # fsharpbinding/MonoDevelop.FSharpBinding/Services/CompilerLocationUtils.fs). That's a pretty unfortunate # way of finding those binaries. And really should be changed. -$EXEC mono $DEBUG $MONO_OPTIONS $MONO_GC_OPTIONS @DIR@/@TOOL@ "$@" +SILLY_ENV_HACK_FOR_REGEX=mono $EXEC cli $DEBUG $MONO_OPTIONS $MONO_GC_OPTIONS @DIR@/@TOOL@ "$@" --- a/src/fsharp/targets.make +++ b/src/fsharp/targets.make @@ -221,9 +221,11 @@ # The binaries fsc.exe and fsi.exe only get installed for Mono 4.0 profile # This also installs 'fsharpc' and 'fsharpi' +# +# Debian patch - Point fsharpc and fsharpi at our install paths, not the GAC. install-bin-4: chmod +x $(outdir)$(ASSEMBLY) - sed -e 's,[@]DIR[@],$(gacdir)/$(TARGET),g' -e 's,[@]TOOL[@],$(ASSEMBLY),g' < $(topdir)launcher > $(outdir)$(subst fs,fsharp,$(NAME))$(VERSION) + sed -e "s,[@]DIR[@],/usr/lib/cli/fsharp,g" -e 's,[@]TOOL[@],$(ASSEMBLY),g' < $(topdir)launcher > $(outdir)$(subst fs,fsharp,$(NAME))$(VERSION) chmod +x $(outdir)$(subst fs,fsharp,$(NAME))$(VERSION) @mkdir -p $(DESTDIR)$(gacdir)/$(TARGET) @mkdir -p $(DESTDIR)$(bindir) debian/fsharpc.10000664000000000000000000001117412276646630010720 0ustar .\" Originally generated by help2man 1.44.1. .TH FSHARPC "1" "February 2014" "fsharpc 3.0.34" "User Commands" .SH NAME fsharpc \- manual page for F# 3.0 Compiler (Open Source Edition) .SH DESCRIPTION Compiler for the F# language, version 3.0 .SH SYNOPSIS \fBfsharpc\fR [\fIoptions\fR...] \fIfile\fR [\fIfile\fR...] .SH OPTIONS .SS "OUTPUT FILES" .TP \fB\-\-out\fR:\fIfile\fR, \fB\-o\fR \fIfile\fR Name of the output file .TP \fB\-\-target\fR:exe Build a console executable .TP \fB\-\-target\fR:winexe Build a Windows executable .TP \fB\-\-target\fR:library, \fB\-a\fR Build a library .TP \fB\-\-target\fR:module Build a module that can be added to another assembly .TP \fB\-\-delaysign\fR[+|\-] Delay\-sign the assembly using only the public portion of the strong name key .TP \fB\-\-doc\fR:\fIfile\fR Write the xmldoc of the assembly to the given file .TP \fB\-\-keyfile\fR:\fIfile\fR Specify a strong name key file .TP \fB\-\-keycontainer\fR:\fIstring\fR Specify a strong name key container .TP \fB\-\-platform\fR:\fIstring\fI Limit which platforms this code can run on: \fIx86\fR, \fIItanium\fR, \fIx64\fR, \fIanycpu32bitpreferred\fR, or \fIanycpu\fR. The default is \fIanycpu\fR. .TP \fB\-\-nooptimizationdata\fR Only include optimization information essential for implementing inlined constructs. Inhibits cross\-module inlining but improves binary compatibility. .TP \fB\-\-nointerfacedata\fR Don't add a resource to the generated assembly containing F#\-specific metadata .TP \fB\-\-sig\fR:\fIfile\fR Print the inferred interface of the assembly to a file .SS "INPUT FILES" .TP \fB\-\-reference\fR:\fIfile\fR, \fB\-r\fR \fIfile\fR Reference an assembly .SS "RESOURCES" .TP \fB\-\-win32res\fR:\fIfile\fR Specify a Win32 resource file (.res) .TP \fB\-\-win32manifest\fR:\fIfile\fR Specify a Win32 manifest file .TP \fB\-\-nowin32manifest\fR Do not include the default Win32 manifest .TP \fB\-\-resource\fR:\fIfile\fR[,\fIstring_name\fR[,public|private]] Embed the specified managed resource .TP \fB\-\-linkresource\fR:\fIfile\fR[,\fIstring_name\fR[,public|private]] Link the specified resource to this assembly .SS "CODE GENERATION" .TP \fB\-\-debug\fR[+|\-], \fB-g\fR Emit debug information .TP \fB\-\-debug\fR:[full|pdbonly] Specify debugging type: \fIfull\fR, \fIpdbonly\fR. \fIfull\fR is the default and enables attaching a debugger to a running program. .TP \fB\-\-optimize\fR[+|\-], \fB\-O\fR Enable optimizations .TP \fB\-\-tailcalls\fR[+|\-] Enable tailcalls .TP \fB\-\-crossoptimize\fR[+|\-] Enable cross\-module optimizations .SS "ERRORS AND WARNINGS" .TP \fB\-\-warnaserror\fR[+|\-] Report all warnings as errors .TP \fB\-\-warnaserror\fR[+|\-]:\fIwarn\fR[;\fIwarn\fR[;...]] Report specific warnings as errors .TP \fB\-\-warn\fR:\fIn\fR Set a warning level (0\-5) .TP \fB\-\-nowarn\fR:\fIwarn\fR[;\fIwarn\fR[;...]] Disable specific warning messages .TP \fB\-\-warnon\fR:\fIwarn\fR[;\fIwarn\fR[;...]] Enable specific warnings that may be off by default .TP \fB\-\-consolecolors\fR[+|\-] Output warning and error messages in color .SS "LANGUAGE" .TP \fB\-\-checked\fR[+|\-] Generate overflow checks .TP \fB\-\-define\fR:\fIstring\fR, \fB\-d\fR \fIstring\fR Define conditional compilation symbols .TP \fB\-\-mlcompatibility\fR Ignore ML compatibility warnings .SS "MISCELLANEOUS" .TP \fB\-\-nologo\fR Suppress compiler copyright message .TP \fB\-\-help\fR, \fB\-?\fR Display this usage message .SS "ADVANCED" .TP \fB\-\-codepage\fR:\fIn\fR Specify the codepage used to read source files .TP \fB\-\-utf8output\fR Output messages in UTF\-8 encoding .TP \fB\-\-fullpaths\fR Output messages with fully qualified paths .TP \fB\-\-lib\fR:\fIdir\fR[;\fIdir\fR[;...]], \fB\-I\fR \fIdir\fR[;\fIdir\fR[;...]] Specify a directory for the include path which is used to resolve source files and assemblies .TP \fB\-\-baseaddress\fR:\fIaddress\fR Base address for the library to be built .TP \fB\-\-noframework\fR Do not reference the default CLI assemblies by default .TP \fB\-\-standalone\fR Statically link the F# library and all referenced DLLs that depend on it into the assembly being generated .TP \fB\-\-staticlink\fR:\fIassembly\fR Statically link the given assembly and all referenced DLLs that depend on this assembly. Use an assembly name e.g. \fImylib\fR, not a DLL name. .TP \fB\-\-resident\fR Use a resident background compilation service to improve compiler startup times. .TP \fB\-\-pdb\fR:\fIfile\fR Name the output debug file .TP \fB\-\-simpleresolution\fR Resolve assembly references using directory\-based rules rather than MSBuild resolution .TP \fB\-\-highentropyva\fR[+|\-] Enable high\-entropy ASLR .TP \fB\-\-subsystemversion\fR:\fIstring\fR Specify subsystem version of this assembly debian/libfsharp-data-typeproviders4.3-cil.install0000664000000000000000000000014312276130276017354 0ustar usr/lib/mono/gac/FSharp.Data.TypeProviders/4.3*/* /usr/lib/cli/FSharp.Data.TypeProviders-4.3 debian/README.source0000664000000000000000000000051112276130276011352 0ustar * The upstream tarball has been repacked to remove the dependencies/ folder, containing binary Silverlight and MonoDroid core libraries. These are probably redistributable, but are not built from source, and we don't need them. -- Christopher James Halse Rogers , Fri, 26 Apr 2013 10:23:05 +1000 debian/fsharp.manpages0000664000000000000000000000004212276646630012200 0ustar debian/fsharpc.1 debian/fsharpi.1