Skip to content

Commit

Permalink
Remove __using__/2 from Quark.Partial (..)
Browse files Browse the repository at this point in the history
The `:only` imported macros are the only public ones.
  • Loading branch information
toraritte committed Feb 28, 2019
1 parent f3f5377 commit b13296b
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ This does use up the full arity-space for that function name, however.
```elixir

defmodule Foo do
use Quark.Partial
import Quark.Partial

defpartial one(), do: 1
defpartial minus(a, b, c), do: a - b - c
Expand Down
2 changes: 1 addition & 1 deletion lib/quark.ex
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ defmodule Quark do
quote do
import unquote(__MODULE__)
import Quark.Curry
use Quark.Partial
import Quark.Partial
import Quark.Pointfree
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/quark/bckw.ex
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule Quark.BCKW do
A similar idea to `SKI`, but with different primitives.
"""

use Quark.Partial
import Quark.Partial
import Quark.Curry, only: [curry: 1]

@doc ~S"""
Expand Down
2 changes: 1 addition & 1 deletion lib/quark/compose.ex
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ defmodule Quark.Compose do

import Quark.SKI

use Quark.Partial
import Quark.Partial
import Quark.Curry

@doc ~S"""
Expand Down
2 changes: 1 addition & 1 deletion lib/quark/fixed_point.ex
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ defmodule Quark.FixedPoint do
"""

use Quark.Partial
import Quark.Partial
import Quark.Curry, only: [curry: 1]

defdelegate fix(), to: __MODULE__, as: :y
Expand Down
2 changes: 1 addition & 1 deletion lib/quark/m.ex
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Quark.M do
@moduledoc "The self-applyication combinator"

use Quark.Partial
import Quark.Partial

@doc ~S"""
Apply a function to itself. Also aliased as `self_apply`.
Expand Down
6 changes: 0 additions & 6 deletions lib/quark/partial.ex
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ defmodule Quark.Partial do

import Quark.Curry

defmacro __using__(_) do
quote do
import Quark.Partial, only: [defpartial: 2, defpartialp: 2]
end
end

@doc ~S"""
A convenience on `defcurry`. Generates a series of partially-bound
applications of a fully-curried function, for all arities _at and below_
Expand Down
2 changes: 1 addition & 1 deletion lib/quark/ski.ex
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defmodule Quark.SKI do
though generally not efficiently.
"""

use Quark.Partial
import Quark.Partial

@doc ~S"""
The identity combinator. Also aliased as `id`.
Expand Down
2 changes: 1 addition & 1 deletion test/quark/partial_test.exs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
defmodule Quark.PartialTest do
use ExUnit.Case, async: true
use Quark.Partial
import Quark.Partial

defpartial one(), do: 1
test "creates zero arity functions" do
Expand Down

0 comments on commit b13296b

Please sign in to comment.