Skip to content

Commit 7f55143

Browse files
authored
Merge pull request #103 from miniBill/dequalify-arg-custom-with-type
Avoid qualifying if we're already in the same module
2 parents 9610edf + 1e72c2e commit 7f55143

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/Internal/Arg.elm

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ module Internal.Arg exposing
44
, var, varWith
55
, triple, tuple
66
, char, string, int
7-
, customType
7+
, customType, customTypeWith
88
, item, items, list, listRemaining, record, field
99
, ignore, unit
10-
, customTypeWith
1110
)
1211

1312
{-|
@@ -22,7 +21,7 @@ module Internal.Arg exposing
2221
2322
@docs char, string, int
2423
25-
@docs customType
24+
@docs customType, customTypeWith
2625
2726
@docs item, items, list, listRemaining, record, field
2827
@@ -547,10 +546,14 @@ customTypeWith :
547546
}
548547
-> a
549548
-> Arg a
550-
customTypeWith { typeName, variantName, importFrom } toType =
549+
customTypeWith ({ typeName, variantName } as details) toType =
551550
Arg
552551
(\index ->
553552
let
553+
importFrom : List String
554+
importFrom =
555+
Index.getImport index details.importFrom
556+
554557
annotation =
555558
Ok
556559
{ type_ = Internal.Types.custom importFrom (Format.formatType typeName) []

0 commit comments

Comments
 (0)