Skip to content

Commit

Permalink
Merge pull request #103 from miniBill/dequalify-arg-custom-with-type
Browse files Browse the repository at this point in the history
Avoid qualifying if we're already in the same module
  • Loading branch information
mdgriffith authored Nov 30, 2024
2 parents 9610edf + 1e72c2e commit 7f55143
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/Internal/Arg.elm
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ module Internal.Arg exposing
, var, varWith
, triple, tuple
, char, string, int
, customType
, customType, customTypeWith
, item, items, list, listRemaining, record, field
, ignore, unit
, customTypeWith
)

{-|
Expand All @@ -22,7 +21,7 @@ module Internal.Arg exposing
@docs char, string, int
@docs customType
@docs customType, customTypeWith
@docs item, items, list, listRemaining, record, field
Expand Down Expand Up @@ -547,10 +546,14 @@ customTypeWith :
}
-> a
-> Arg a
customTypeWith { typeName, variantName, importFrom } toType =
customTypeWith ({ typeName, variantName } as details) toType =
Arg
(\index ->
let
importFrom : List String
importFrom =
Index.getImport index details.importFrom

annotation =
Ok
{ type_ = Internal.Types.custom importFrom (Format.formatType typeName) []
Expand Down

0 comments on commit 7f55143

Please sign in to comment.