From 5847dbd53675eae874297ae6f7431d9a62623d94 Mon Sep 17 00:00:00 2001 From: Enrico Sada Date: Thu, 8 Sep 2016 15:51:00 +0200 Subject: [PATCH 1/5] add osx to travis --- .travis.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ae226a89..86fd7fce 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,14 @@ language: csharp -sudo: false +matrix: + include: + - os: linux # Ubuntu 14.04 + dist: trusty + sudo: required + mono: latest + - os: osx # OSX 10.11 + osx_image: xcode7.2 + mono: latest script: - ./build.sh GenerateDocs From 28bc2d1708544e9d89349ea78be0e32410c60d8c Mon Sep 17 00:00:00 2001 From: Enrico Sada Date: Thu, 8 Sep 2016 19:26:10 +0200 Subject: [PATCH 2/5] fix deprecation warning --- src/FsCheck/Gen.fs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FsCheck/Gen.fs b/src/FsCheck/Gen.fs index 004237c1..240611ce 100644 --- a/src/FsCheck/Gen.fs +++ b/src/FsCheck/Gen.fs @@ -181,7 +181,7 @@ module Gen = | :? array<_> as arr -> elementsArr arr | _ -> - choose (0, (Seq.length xs)-1) |> map (flip Seq.nth xs) + choose (0, (Seq.length xs)-1) |> map (flip Seq.item xs) ///Build a generator that takes a non-empty sequence and randomly generates ///one of the values among an initial segment of that sequence. The size of @@ -586,7 +586,7 @@ module Gen = counter := !counter + 1 !counter - 1 let rec rands r0 = seq { let r1,r2 = split r0 in yield r1; yield! (rands r2) } - fun (v:'a) (Gen m:Gen<'b>) -> Gen (fun n r -> m n (Seq.nth ((mapToInt v)+1) (rands r))) + fun (v:'a) (Gen m:Gen<'b>) -> Gen (fun n r -> m n (Seq.item ((mapToInt v)+1) (rands r))) ///Operators for Gen. type Gen with From de5218ad7da12f9d382f062afdc284f959b498bb Mon Sep 17 00:00:00 2001 From: Enrico Sada Date: Thu, 8 Sep 2016 19:38:28 +0200 Subject: [PATCH 3/5] more mono on build matrix --- .travis.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.travis.yml b/.travis.yml index 86fd7fce..14dd4bec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,9 +6,23 @@ matrix: dist: trusty sudo: required mono: latest + - os: linux # Ubuntu 14.04 + dist: trusty + sudo: required + mono: 4.0.5 - os: osx # OSX 10.11 osx_image: xcode7.2 mono: latest + - os: osx # OSX 10.11 + osx_image: xcode7.2 + mono: weekly + - os: osx # OSX 10.11 + osx_image: xcode7.2 + mono: nightly + - os: osx # OSX 10.11 + osx_image: xcode7.2 + mono: 4.0.5 + script: - ./build.sh GenerateDocs From 49bd7f2d2652a0a5ba6575af9346c257190afe5b Mon Sep 17 00:00:00 2001 From: Kurt Schelfthout Date: Fri, 9 Sep 2016 21:09:46 +0100 Subject: [PATCH 4/5] Fix build. --- src/FsCheck/Gen.fs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FsCheck/Gen.fs b/src/FsCheck/Gen.fs index 240611ce..004237c1 100644 --- a/src/FsCheck/Gen.fs +++ b/src/FsCheck/Gen.fs @@ -181,7 +181,7 @@ module Gen = | :? array<_> as arr -> elementsArr arr | _ -> - choose (0, (Seq.length xs)-1) |> map (flip Seq.item xs) + choose (0, (Seq.length xs)-1) |> map (flip Seq.nth xs) ///Build a generator that takes a non-empty sequence and randomly generates ///one of the values among an initial segment of that sequence. The size of @@ -586,7 +586,7 @@ module Gen = counter := !counter + 1 !counter - 1 let rec rands r0 = seq { let r1,r2 = split r0 in yield r1; yield! (rands r2) } - fun (v:'a) (Gen m:Gen<'b>) -> Gen (fun n r -> m n (Seq.item ((mapToInt v)+1) (rands r))) + fun (v:'a) (Gen m:Gen<'b>) -> Gen (fun n r -> m n (Seq.nth ((mapToInt v)+1) (rands r))) ///Operators for Gen. type Gen with From b279e3c50617068822fdf83e07bc65719225175c Mon Sep 17 00:00:00 2001 From: Kurt Schelfthout Date: Fri, 9 Sep 2016 21:10:06 +0100 Subject: [PATCH 5/5] Try adding various attributes to make GenModule go away. --- src/FsCheck/Gen.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FsCheck/Gen.fs b/src/FsCheck/Gen.fs index 004237c1..c6882837 100644 --- a/src/FsCheck/Gen.fs +++ b/src/FsCheck/Gen.fs @@ -57,7 +57,7 @@ type Arbitrary<'a>() = ///Computation expression builder for Gen. -[] +[] module GenBuilder = let private result x = Gen (fun _ _ -> x)