Nested records#3
Merged
Merged
Conversation
Contributor
Author
|
The main issue with this PR is that for some reason I was unable to have elm-prefab actually generate the type signatures now :( I'll try and hack on it a bit more |
Contributor
Author
|
|
Contributor
Author
|
Ooook, should be done now, and with simpler code to boot! |
Owner
|
woohoo! |
dillonkearns
added a commit
to dillonkearns/elm-codegen
that referenced
this pull request
Mar 31, 2026
Targets Internal.Compiler coverage gaps: inferRecordField, getField, unifiableFields, isAppendable, and Elm.Arg.varWith. Coverage improvements: TOTAL: 52.7% -> 53.5% Internal.Compiler: 41.7% -> 43.5% Internal.Arg: 53.5% -> 57.4% Elm.Arg: 50.0% -> 55.6% No new bugs surfaced — all failures remain the known operator indentation (finding mdgriffith#3) and comparable leak (finding mdgriffith#4) issues. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
dillonkearns
added a commit
to dillonkearns/elm-codegen
that referenced
this pull request
Mar 31, 2026
…ors. Found 1 new bug (finding mdgriffith#6): - Elm.Arg.aliasAs generates fresh type variable for the alias instead of the actual record type from the underlying pattern. Coverage improvements: TOTAL: 57.4% -> 60.9% Elm.Declare: 33.7% -> 54.2% (+20.5%) Elm.Arg: 55.6% -> 77.8% (+22.2%) Internal.Arg: 57.4% -> 69.8% (+12.4%) Internal.Write: 66.1% -> 71.0% 6 bugs total found by property testing: mdgriffith#1 Number type variable collision (FIXED) mdgriffith#2 Pipe + lambda parens (FIXED) mdgriffith#3 Operator multi-line indentation mdgriffith#4 Comparable type variable leak mdgriffith#5 functionReduced wrong type annotations mdgriffith#6 aliasAs wrong type for alias variable Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
dillonkearns
added a commit
to dillonkearns/elm-codegen
that referenced
this pull request
Mar 31, 2026
Found 2 more bugs: - Finding mdgriffith#5 update: Elm.unwrapper also generates wrong type annotations (val -> unwrapped instead of Wrapper -> Int) - Finding mdgriffith#7: Elm.Op.pipeLeft with lambda absorbs <| into lambda body (\x -> x <| "hello" instead of (\x -> x) <| "hello") Coverage: 60.9% -> 62.5% Elm: 60.5% -> 64.6% Elm.Declare: 54.2% -> 63.9% (+9.7%) Elm.Op: 75.6% -> 80.5% Total bugs found: 7 mdgriffith#1 Number type variable collision (FIXED) mdgriffith#2 Pipe + lambda parens (FIXED) mdgriffith#3 Operator multi-line indentation mdgriffith#4 Comparable type variable leak mdgriffith#5 functionReduced/unwrapper wrong type annotations mdgriffith#6 aliasAs wrong type for alias variable mdgriffith#7 pipeLeft lambda not parenthesized Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
dillonkearns
added a commit
to dillonkearns/elm-codegen
that referenced
this pull request
Mar 31, 2026
Found 1 new class of bugs (finding mdgriffith#8): - 19 missing type annotations across 6 different API patterns (Let.unpack, Let.fn, unwrap, Declare.value, Elm.get through alias) - elm-codegen's type inference silently fails for these patterns, producing declarations without type annotations Coverage: 62.5% -> 63.2% Total bugs found: 8 mdgriffith#1 Number type variable collision (FIXED) mdgriffith#2 Pipe + lambda parens (FIXED) mdgriffith#3 Operator multi-line indentation mdgriffith#4 Comparable type variable leak mdgriffith#5 functionReduced/unwrapper wrong type annotations mdgriffith#6 aliasAs wrong type for alias variable mdgriffith#7 pipeLeft lambda not parenthesized mdgriffith#8 Missing type annotations for multiple APIs Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Support nested records/list APIs