mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
feat: Add Elm fixture with Person type and main function
This commit is contained in:
parent
24d2b683c8
commit
86a5e8dbe1
1 changed files with 21 additions and 0 deletions
21
tests/fixtures/languages/elm/test.elm
vendored
21
tests/fixtures/languages/elm/test.elm
vendored
|
@ -36,3 +36,24 @@ main =
|
||||||
div [ class "greeting" ]
|
div [ class "greeting" ]
|
||||||
[ text (greet Formal defaultPerson)
|
[ text (greet Formal defaultPerson)
|
||||||
]
|
]
|
||||||
|
module Main exposing (..)
|
||||||
|
|
||||||
|
-- Define a Person type
|
||||||
|
type alias Person =
|
||||||
|
{ name : String
|
||||||
|
, age : Int
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Create a person
|
||||||
|
newPerson : String -> Int -> Person
|
||||||
|
newPerson name age =
|
||||||
|
{ name = name
|
||||||
|
, age = age
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Main function
|
||||||
|
main =
|
||||||
|
let
|
||||||
|
person = newPerson "John Doe" 30
|
||||||
|
in
|
||||||
|
text ("Hello, " ++ person.name)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue