chore: setup project for multi-cradle hls

We might not need all files added to components, but we might as well
since it gives us the possibility to open any file in our editors and
LSP will automatically figure out what component it belongs to.
This commit is contained in:
Jacob Jonsson 2026-01-07 23:32:35 +01:00
parent 12ef150209
commit 67ab70182b
No known key found for this signature in database
GPG key ID: E82A449642FD9CED
3 changed files with 69 additions and 20 deletions

View file

@ -53,27 +53,52 @@ extra-doc-files: CHANGELOG.md
common warnings
ghc-options: -Wall
executable aoc25
-- Import common warning flags.
executable day1
import: warnings
-- .hs or .lhs file containing the Main module.
main-is: Main.hs
-- Modules included in this executable, other than Main.
-- other-modules:
-- LANGUAGE extensions used by modules in this package.
-- other-extensions:
-- Other library packages from which modules are imported.
main-is: Day1.hs
build-depends: base ^>=4.20.2,
containers >= 0.6.7
-- Directories containing source files.
hs-source-dirs: app
default-language: GHC2021
-- Base language which the package is written in.
executable day2
import: warnings
main-is: Day2.hs
build-depends: base ^>=4.20.2,
containers >= 0.6.7
hs-source-dirs: app
default-language: GHC2021
executable day3
import: warnings
main-is: Day3.hs
build-depends: base ^>=4.20.2,
containers >= 0.6.7
hs-source-dirs: app
default-language: GHC2021
executable day4
import: warnings
main-is: Day4.hs
build-depends: base ^>=4.20.2,
containers >= 0.6.7
hs-source-dirs: app
default-language: GHC2021
executable day5
import: warnings
main-is: Day5.hs
build-depends: base ^>=4.20.2,
containers >= 0.6.7
hs-source-dirs: app
default-language: GHC2021
executable day6
import: warnings
main-is: Day6.hs
build-depends: base ^>=4.20.2,
containers >= 0.6.7
hs-source-dirs: app
default-language: GHC2021
executable day7
@ -91,3 +116,11 @@ executable day8
containers >= 0.6.7
hs-source-dirs: app
default-language: GHC2021
executable day9
import: warnings
main-is: Day9.hs
build-depends: base ^>=4.20.2,
containers >= 0.6.7
hs-source-dirs: app
default-language: GHC2021

View file

@ -1,4 +0,0 @@
module Main where
main :: IO ()
main = putStrLn "Hello, Haskell!"

20
hie.yaml Normal file
View file

@ -0,0 +1,20 @@
cradle:
stack:
- path: "./app/Day1.hs"
component: "aoc25:exe:day1"
- path: "./app/Day2.hs"
component: "aoc25:exe:day2"
- path: "./app/Day3.hs"
component: "aoc25:exe:day3"
- path: "./app/Day4.hs"
component: "aoc25:exe:day4"
- path: "./app/Day5.hs"
component: "aoc25:exe:day5"
- path: "./app/Day6.hs"
component: "aoc25:exe:day6"
- path: "./app/Day7.hs"
component: "aoc25:exe:day7"
- path: "./app/Day8.hs"
component: "aoc25:exe:day8"
- path: "./app/Day9.hs"
component: "aoc25:exe:day9"