Skip to content

Add Elm.fn6#7

Merged
mdgriffith merged 1 commit into
mdgriffith:mainfrom
miniBill:main
Nov 18, 2021
Merged

Add Elm.fn6#7
mdgriffith merged 1 commit into
mdgriffith:mainfrom
miniBill:main

Conversation

@miniBill
Copy link
Copy Markdown
Contributor

What is says on the tin

@mdgriffith mdgriffith merged commit a7840db into mdgriffith:main Nov 18, 2021
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>
dillonkearns added a commit to dillonkearns/elm-codegen that referenced this pull request Mar 31, 2026
…ators.

Confirmed that Elm.Op.pipeTo hits the same lambda parens bug as
finding mdgriffith#2/mdgriffith#7 (internally calls functionReduced).

Extensible record annotations (Type.extensible) generate correctly —
`{ a | name : String }` works for both aliases and function args.

List pattern matching (Elm.Arg.list, items, listRemaining) generates
correct code with proper head :: tail and [first, second] patterns.

Note: elm-pages --coverage stopped working after recent changes
(Coverage.track not found in compiled output). Filed as DX bug.

Coverage at last measurement: 63.2% total.

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