Packages

A custom Credo check to verify that modules are pure

Current section

Files

Jump to
credo_pure_check lib example pure_with_impl.ex
Raw

lib/example/pure_with_impl.ex

defmodule Example.PureWithProtocolImpl do
@moduledoc """
Has a protocol implementation
"""
use Example.PureModuleMarker
defstruct [:field]
def f1 do
Map.new()
end
defimpl Example.My.Protocol do
def f(v), do: v.field
end
end