Skip to content

List binding fix#6

Merged
mdgriffith merged 2 commits into
mdgriffith:mainfrom
miniBill:list-binding-fix
Nov 18, 2021
Merged

List binding fix#6
mdgriffith merged 2 commits into
mdgriffith:mainfrom
miniBill:list-binding-fix

Conversation

@miniBill
Copy link
Copy Markdown
Contributor

@miniBill miniBill commented Nov 7, 2021

If we're unpacking a list, we need to List.map the unpacker over the list

@mdgriffith mdgriffith merged commit 48f7f60 into mdgriffith:main Nov 18, 2021
@miniBill miniBill deleted the list-binding-fix branch November 18, 2021 03:06
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants