I'd like to device a custom type that uses a cast, but
use Drops.Type, (cast(string(), caster: Caster) |> string())
doesn't seem to work, giving the error:
The following arguments were given to Drops.Type.infer_constraints/1:
# 1
{:cast, {{:type, {:string, []}}, {:type, {:string, []}}, [caster: Caster]}}
Attempted function clauses (showing 6 out of 6):
def infer_constraints([])
def infer_constraints(map) when is_map(map)
def infer_constraints(type) when is_atom(type)
def infer_constraints(predicates) when is_list(predicates)
def infer_constraints({:type, {type, predicates}}) when length(predicates) > 0
def infer_constraints({:type, {type, []}})
(drops 0.2.0) lib/drops/type.ex:251: Drops.Type.infer_constraints/1
I'd like to device a custom type that uses a cast, but
doesn't seem to work, giving the error: