From fd498a2713d69a5d55179ff07e58ce296d6fba94 Mon Sep 17 00:00:00 2001 From: Neil Smith Date: Fri, 23 Dec 2016 19:41:11 +0000 Subject: [PATCH] Got Stack working with days in separate packages --- .../adventofcode16.cabal | 18 -------- {app => adventofcode16/app}/Main.hs | 0 {app => adventofcode16/app}/advent03.hs | 0 {app => adventofcode16/app}/advent04.hs | 0 {app => adventofcode16/app}/advent05.hs | 0 {app => adventofcode16/app}/advent06-old.hs | 0 {app => adventofcode16/app}/advent06.hs | 0 {app => adventofcode16/app}/advent07.hs | 0 {app => adventofcode16/app}/advent08.hs | 0 {app => adventofcode16/app}/advent09.hs | 0 {app => adventofcode16/app}/advent10.hs | 0 {app => adventofcode16/app}/advent11.hs | 0 {app => adventofcode16/app}/advent11a.hs | 0 {app => adventofcode16/app}/advent11h.hs | 0 {app => adventofcode16/app}/advent11p.hs | 0 {app => adventofcode16/app}/advent12.hs | 0 {app => adventofcode16/app}/advent13.hs | 0 {app => adventofcode16/app}/advent14.hs | 0 {app => adventofcode16/app}/advent14c.hs | 0 .../app}/advent14parallel.hs | 0 {app => adventofcode16/app}/advent15.hs | 0 {app => adventofcode16/app}/advent15l.hs | 0 {app => adventofcode16/app}/advent16.hs | 0 {app => adventofcode16/app}/advent16i.hs | 0 {app => adventofcode16/app}/advent17.hs | 0 {app => adventofcode16/app}/advent18.hs | 0 {app => adventofcode16/app}/advent18f.hs | 0 {app => adventofcode16/app}/advent19.hs | 0 {app => adventofcode16/app}/advent20.hs | 0 {app => adventofcode16/app}/advent21.hs | 0 {app => adventofcode16/app}/advent22.hs | 0 .../app}/advent22library.hs | 0 {app => adventofcode16/app}/advent22search.hs | 0 .../app}/advent22showgrid.hs | 0 {app => adventofcode16/app}/advent23.hs | 0 {src => adventofcode16/src}/Lib.hs | 0 {test => adventofcode16/test}/Spec.hs | 0 adventofcode1601/adventofcode1601.cabal | 44 +++++++++++++++++++ .../app/Main.hs | 0 adventofcode1602/adventofcode1602.cabal | 44 +++++++++++++++++++ .../app/Main.hs | 0 stack.yaml | 4 +- 42 files changed, 91 insertions(+), 19 deletions(-) rename adventofcode16.cabal => adventofcode16/adventofcode16.cabal (95%) rename {app => adventofcode16/app}/Main.hs (100%) rename {app => adventofcode16/app}/advent03.hs (100%) rename {app => adventofcode16/app}/advent04.hs (100%) rename {app => adventofcode16/app}/advent05.hs (100%) rename {app => adventofcode16/app}/advent06-old.hs (100%) rename {app => adventofcode16/app}/advent06.hs (100%) rename {app => adventofcode16/app}/advent07.hs (100%) rename {app => adventofcode16/app}/advent08.hs (100%) rename {app => adventofcode16/app}/advent09.hs (100%) rename {app => adventofcode16/app}/advent10.hs (100%) rename {app => adventofcode16/app}/advent11.hs (100%) rename {app => adventofcode16/app}/advent11a.hs (100%) rename {app => adventofcode16/app}/advent11h.hs (100%) rename {app => adventofcode16/app}/advent11p.hs (100%) rename {app => adventofcode16/app}/advent12.hs (100%) rename {app => adventofcode16/app}/advent13.hs (100%) rename {app => adventofcode16/app}/advent14.hs (100%) rename {app => adventofcode16/app}/advent14c.hs (100%) rename {app => adventofcode16/app}/advent14parallel.hs (100%) rename {app => adventofcode16/app}/advent15.hs (100%) rename {app => adventofcode16/app}/advent15l.hs (100%) rename {app => adventofcode16/app}/advent16.hs (100%) rename {app => adventofcode16/app}/advent16i.hs (100%) rename {app => adventofcode16/app}/advent17.hs (100%) rename {app => adventofcode16/app}/advent18.hs (100%) rename {app => adventofcode16/app}/advent18f.hs (100%) rename {app => adventofcode16/app}/advent19.hs (100%) rename {app => adventofcode16/app}/advent20.hs (100%) rename {app => adventofcode16/app}/advent21.hs (100%) rename {app => adventofcode16/app}/advent22.hs (100%) rename {app => adventofcode16/app}/advent22library.hs (100%) rename {app => adventofcode16/app}/advent22search.hs (100%) rename {app => adventofcode16/app}/advent22showgrid.hs (100%) rename {app => adventofcode16/app}/advent23.hs (100%) rename {src => adventofcode16/src}/Lib.hs (100%) rename {test => adventofcode16/test}/Spec.hs (100%) create mode 100644 adventofcode1601/adventofcode1601.cabal rename app/advent01.hs => adventofcode1601/app/Main.hs (100%) create mode 100644 adventofcode1602/adventofcode1602.cabal rename app/advent02.hs => adventofcode1602/app/Main.hs (100%) diff --git a/adventofcode16.cabal b/adventofcode16/adventofcode16.cabal similarity index 95% rename from adventofcode16.cabal rename to adventofcode16/adventofcode16.cabal index 6216e51..18cc51d 100644 --- a/adventofcode16.cabal +++ b/adventofcode16/adventofcode16.cabal @@ -19,24 +19,6 @@ library build-depends: base >= 4.7 && < 5 default-language: Haskell2010 -executable advent01 - hs-source-dirs: app - main-is: advent01.hs - ghc-options: -O2 -threaded -rtsopts -with-rtsopts=-N - build-depends: base - , adventofcode16 - , split - default-language: Haskell2010 - -executable advent02 - hs-source-dirs: app - main-is: advent02.hs - ghc-options: -O2 -threaded -rtsopts -with-rtsopts=-N - build-depends: base - , adventofcode16 - , array - default-language: Haskell2010 - executable advent03 hs-source-dirs: app main-is: advent03.hs diff --git a/app/Main.hs b/adventofcode16/app/Main.hs similarity index 100% rename from app/Main.hs rename to adventofcode16/app/Main.hs diff --git a/app/advent03.hs b/adventofcode16/app/advent03.hs similarity index 100% rename from app/advent03.hs rename to adventofcode16/app/advent03.hs diff --git a/app/advent04.hs b/adventofcode16/app/advent04.hs similarity index 100% rename from app/advent04.hs rename to adventofcode16/app/advent04.hs diff --git a/app/advent05.hs b/adventofcode16/app/advent05.hs similarity index 100% rename from app/advent05.hs rename to adventofcode16/app/advent05.hs diff --git a/app/advent06-old.hs b/adventofcode16/app/advent06-old.hs similarity index 100% rename from app/advent06-old.hs rename to adventofcode16/app/advent06-old.hs diff --git a/app/advent06.hs b/adventofcode16/app/advent06.hs similarity index 100% rename from app/advent06.hs rename to adventofcode16/app/advent06.hs diff --git a/app/advent07.hs b/adventofcode16/app/advent07.hs similarity index 100% rename from app/advent07.hs rename to adventofcode16/app/advent07.hs diff --git a/app/advent08.hs b/adventofcode16/app/advent08.hs similarity index 100% rename from app/advent08.hs rename to adventofcode16/app/advent08.hs diff --git a/app/advent09.hs b/adventofcode16/app/advent09.hs similarity index 100% rename from app/advent09.hs rename to adventofcode16/app/advent09.hs diff --git a/app/advent10.hs b/adventofcode16/app/advent10.hs similarity index 100% rename from app/advent10.hs rename to adventofcode16/app/advent10.hs diff --git a/app/advent11.hs b/adventofcode16/app/advent11.hs similarity index 100% rename from app/advent11.hs rename to adventofcode16/app/advent11.hs diff --git a/app/advent11a.hs b/adventofcode16/app/advent11a.hs similarity index 100% rename from app/advent11a.hs rename to adventofcode16/app/advent11a.hs diff --git a/app/advent11h.hs b/adventofcode16/app/advent11h.hs similarity index 100% rename from app/advent11h.hs rename to adventofcode16/app/advent11h.hs diff --git a/app/advent11p.hs b/adventofcode16/app/advent11p.hs similarity index 100% rename from app/advent11p.hs rename to adventofcode16/app/advent11p.hs diff --git a/app/advent12.hs b/adventofcode16/app/advent12.hs similarity index 100% rename from app/advent12.hs rename to adventofcode16/app/advent12.hs diff --git a/app/advent13.hs b/adventofcode16/app/advent13.hs similarity index 100% rename from app/advent13.hs rename to adventofcode16/app/advent13.hs diff --git a/app/advent14.hs b/adventofcode16/app/advent14.hs similarity index 100% rename from app/advent14.hs rename to adventofcode16/app/advent14.hs diff --git a/app/advent14c.hs b/adventofcode16/app/advent14c.hs similarity index 100% rename from app/advent14c.hs rename to adventofcode16/app/advent14c.hs diff --git a/app/advent14parallel.hs b/adventofcode16/app/advent14parallel.hs similarity index 100% rename from app/advent14parallel.hs rename to adventofcode16/app/advent14parallel.hs diff --git a/app/advent15.hs b/adventofcode16/app/advent15.hs similarity index 100% rename from app/advent15.hs rename to adventofcode16/app/advent15.hs diff --git a/app/advent15l.hs b/adventofcode16/app/advent15l.hs similarity index 100% rename from app/advent15l.hs rename to adventofcode16/app/advent15l.hs diff --git a/app/advent16.hs b/adventofcode16/app/advent16.hs similarity index 100% rename from app/advent16.hs rename to adventofcode16/app/advent16.hs diff --git a/app/advent16i.hs b/adventofcode16/app/advent16i.hs similarity index 100% rename from app/advent16i.hs rename to adventofcode16/app/advent16i.hs diff --git a/app/advent17.hs b/adventofcode16/app/advent17.hs similarity index 100% rename from app/advent17.hs rename to adventofcode16/app/advent17.hs diff --git a/app/advent18.hs b/adventofcode16/app/advent18.hs similarity index 100% rename from app/advent18.hs rename to adventofcode16/app/advent18.hs diff --git a/app/advent18f.hs b/adventofcode16/app/advent18f.hs similarity index 100% rename from app/advent18f.hs rename to adventofcode16/app/advent18f.hs diff --git a/app/advent19.hs b/adventofcode16/app/advent19.hs similarity index 100% rename from app/advent19.hs rename to adventofcode16/app/advent19.hs diff --git a/app/advent20.hs b/adventofcode16/app/advent20.hs similarity index 100% rename from app/advent20.hs rename to adventofcode16/app/advent20.hs diff --git a/app/advent21.hs b/adventofcode16/app/advent21.hs similarity index 100% rename from app/advent21.hs rename to adventofcode16/app/advent21.hs diff --git a/app/advent22.hs b/adventofcode16/app/advent22.hs similarity index 100% rename from app/advent22.hs rename to adventofcode16/app/advent22.hs diff --git a/app/advent22library.hs b/adventofcode16/app/advent22library.hs similarity index 100% rename from app/advent22library.hs rename to adventofcode16/app/advent22library.hs diff --git a/app/advent22search.hs b/adventofcode16/app/advent22search.hs similarity index 100% rename from app/advent22search.hs rename to adventofcode16/app/advent22search.hs diff --git a/app/advent22showgrid.hs b/adventofcode16/app/advent22showgrid.hs similarity index 100% rename from app/advent22showgrid.hs rename to adventofcode16/app/advent22showgrid.hs diff --git a/app/advent23.hs b/adventofcode16/app/advent23.hs similarity index 100% rename from app/advent23.hs rename to adventofcode16/app/advent23.hs diff --git a/src/Lib.hs b/adventofcode16/src/Lib.hs similarity index 100% rename from src/Lib.hs rename to adventofcode16/src/Lib.hs diff --git a/test/Spec.hs b/adventofcode16/test/Spec.hs similarity index 100% rename from test/Spec.hs rename to adventofcode16/test/Spec.hs diff --git a/adventofcode1601/adventofcode1601.cabal b/adventofcode1601/adventofcode1601.cabal new file mode 100644 index 0000000..a152de7 --- /dev/null +++ b/adventofcode1601/adventofcode1601.cabal @@ -0,0 +1,44 @@ +name: adventofcode1601 +version: 0.1.0.0 +synopsis: Initial project template from stack +description: Please see README.md +homepage: https://github.com/neilnjae/adventofcode16#readme +license: BSD3 +license-file: LICENSE +author: Neil Smith +maintainer: noone@njae.me.uk +copyright: 2016 Neil Smith +category: None +build-type: Simple +extra-source-files: README.md +cabal-version: >=1.10 + +library + hs-source-dirs: src + build-depends: base >= 4.7 && < 5 + default-language: Haskell2010 + +executable advent01 + hs-source-dirs: app + main-is: Main.hs + ghc-options: -O2 -threaded -rtsopts -with-rtsopts=-N + build-depends: base + , adventofcode1601 + , adventofcode16 + , split + default-language: Haskell2010 + +test-suite adventofcode1601-test + type: exitcode-stdio-1.0 + hs-source-dirs: test + main-is: Spec.hs + build-depends: base + , adventofcode1601 + , adventofcode16 + , split + ghc-options: -threaded -rtsopts -with-rtsopts=-N + default-language: Haskell2010 + +source-repository head + type: git + location: https://github.com/neilnjae/adventofcode16 diff --git a/app/advent01.hs b/adventofcode1601/app/Main.hs similarity index 100% rename from app/advent01.hs rename to adventofcode1601/app/Main.hs diff --git a/adventofcode1602/adventofcode1602.cabal b/adventofcode1602/adventofcode1602.cabal new file mode 100644 index 0000000..1e4aa7d --- /dev/null +++ b/adventofcode1602/adventofcode1602.cabal @@ -0,0 +1,44 @@ +name: adventofcode1602 +version: 0.1.0.0 +synopsis: Initial project template from stack +description: Please see README.md +homepage: https://github.com/neilnjae/adventofcode16#readme +license: BSD3 +license-file: LICENSE +author: Neil Smith +maintainer: noone@njae.me.uk +copyright: 2016 Neil Smith +category: None +build-type: Simple +extra-source-files: README.md +cabal-version: >=1.10 + +library + hs-source-dirs: src + build-depends: base >= 4.7 && < 5 + default-language: Haskell2010 + +executable advent02 + hs-source-dirs: app + main-is: Main.hs + ghc-options: -O2 -threaded -rtsopts -with-rtsopts=-N + build-depends: base + , adventofcode1602 + , adventofcode16 + , array + default-language: Haskell2010 + +test-suite adventofcode1602-test + type: exitcode-stdio-1.0 + hs-source-dirs: test + main-is: Spec.hs + build-depends: base + , adventofcode1602 + , adventofcode16 + , array + ghc-options: -threaded -rtsopts -with-rtsopts=-N + default-language: Haskell2010 + +source-repository head + type: git + location: https://github.com/neilnjae/adventofcode16 diff --git a/app/advent02.hs b/adventofcode1602/app/Main.hs similarity index 100% rename from app/advent02.hs rename to adventofcode1602/app/Main.hs diff --git a/stack.yaml b/stack.yaml index b77fb38..48e2e2e 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,7 +1,9 @@ flags: {} extra-package-dbs: [] packages: -- '.' +- adventofcode16 +- adventofcode1601 +- adventofcode1602 system-ghc: true extra-deps: - astar-0.3.0.0 -- 2.34.1