commit 142d7feefbd4fff72c9434906c83593f05d7f3cc Author: Sidharth Kulkarni Date: Wed Apr 29 20:29:04 2026 -0700 first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..48a004c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +dist-newstyle diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..d28a080 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,5 @@ +# Revision history for numbersquare + +## 0.1.0.0 -- YYYY-mm-dd + +* First version. Released on an unsuspecting world. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d70115d --- /dev/null +++ b/LICENSE @@ -0,0 +1,29 @@ +Copyright (c) 2026, sid + + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + * Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/app/Main.hs b/app/Main.hs new file mode 100644 index 0000000..f16f6f5 --- /dev/null +++ b/app/Main.hs @@ -0,0 +1,4 @@ +module Main (main) where + +main :: IO () +main = putStrLn "Hello, Haskell!" diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..afba6cb --- /dev/null +++ b/flake.nix @@ -0,0 +1,20 @@ +{ + description = "A very basic flake"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + flake-compat = { + url = "github:NixOS/flake-compat"; + flake = false; + }; + }; + + outputs = + { self, nixpkgs, ... }: + let + pkgs = nixpkgs.legacyPackages.x86_64-linux; + in + { + devShells.x86_64-linux.default = pkgs.callPackage ./shell.nix { }; + }; +} diff --git a/numbersquare.cabal b/numbersquare.cabal new file mode 100644 index 0000000..47f5833 --- /dev/null +++ b/numbersquare.cabal @@ -0,0 +1,24 @@ +cabal-version: 3.0 +name: numbersquare + +version: 0.1.0.0 + +license: BSD-3-Clause +license-file: LICENSE +author: sid +category: Game +build-type: Simple + +extra-doc-files: CHANGELOG.md + +common warnings + ghc-options: -Wall + +executable numbersquare + import: warnings + + main-is: Main.hs + + build-depends: base ^>=4.20.2.0 + hs-source-dirs: app + default-language: Haskell2010 diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..bddc07b --- /dev/null +++ b/shell.nix @@ -0,0 +1,26 @@ +{ + haskellPackages, + haskell, + zlib, +}: +haskellPackages.developPackage { + name = "numbersquare"; + root = ./.; + modifier = + let + addBuildTools = + drv: + haskell.lib.addBuildTools drv ( + with haskellPackages; + [ + fourmolu + haskell-language-server + cabal-install + ghcid + cabal-fmt + ] + ); + addExtraLibraries = drv: haskell.lib.addExtraLibraries drv [ zlib ]; + in + drv: addExtraLibraries (addBuildTools drv); +}