Skip to content

Commit

Permalink
remove extract from documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Kiko Fernandez Reyes committed May 31, 2016
1 parent 8737773 commit 277d358
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 16 deletions.
2 changes: 2 additions & 0 deletions doc/encore/lang/semantics/semantics.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,7 @@ class Main
(join par_par) -- :: Par Par int -> Par int
}|

@;{
@subsection{extract}
The @code{extract} combinator returns the parallel computations into a
single array. This operation might block some threads since you are
Expand All @@ -681,6 +682,7 @@ class Main
for value in arr
print value
}|
}

@subsection{each}
The @code{each} combinator lifts an @code{array} to a parallel collection.
Expand Down
10 changes: 8 additions & 2 deletions doc/encore/lang/syntax/grammar.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ This section introduces the Encore grammar by using the BNF-grammar notation and
@(encore/keyword party_par "||")
@(encore/keyword party_seq ">>")
@(encore/keyword party_join "join")
@(encore/keyword party_extract "extract")

@; TODO: Add this keyword as soon as as issue #434 is fixed
@; (encore/keyword party_extract "extract")

@(encore/keyword party_each "each")
@(encore/keyword party_liftv "liftv")
@(encore/keyword party_liftf "liftf")
Expand Down Expand Up @@ -238,7 +241,10 @@ This section introduces the Encore grammar by using the BNF-grammar notation and
@seq[party_liftv Expr]
@seq[party_liftf Expr]
@seq[party_join Expr]
@seq[party_extract Expr]

@; TODO: Add this keyword as soon as as issue #434 is fixed
@; seq[party_extract Expr]

@seq[party_each Expr]
@seq[Expr party_seq Arrow]
@seq[Expr party_par Expr]
Expand Down
3 changes: 3 additions & 0 deletions src/parser/Parser/Parser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,10 @@ lexer =
,"when"
,"liftf"
,"liftv"

-- TODO: Add this keyword as soon as as issue #434 is fixed
-- ,"extract"

,"each"
,"typedef"
],
Expand Down
14 changes: 0 additions & 14 deletions src/tests/encore/par/each.enc
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,6 @@ class Main
for v in [0..this.size] this.check_arr[v] = false;
}

-- def assert_all(): void
-- for v in this.check_arr assertTrue(v, "Expected 'true' value in test")

-- def assert_limits(): void {
-- assertTrue(this.check_arr[0], "Expected 'true' value in array with index: 0");
-- assertTrue(this.check_arr[this.size],
-- "Exprected 'true' value in array with index: {}", this.size);
-- }

def main(): void {
this.setup();
let rng = [0..this.size]
Expand All @@ -28,10 +19,5 @@ class Main

each(arr) >> (\(i: int) -> { this.check_arr[i] = true; i; } )
>> \(i: int) -> assertTrue(this.check_arr[i])

-- TODO: these tests are affected by bug #434 (https://github.com/parapluu/encore/issues/434)
-- until the bug is fixed, `extract` cannot be used in futures
-- this.assert_limits();
-- this.assert_all();
};
}

0 comments on commit 277d358

Please sign in to comment.