-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7553b33
Showing
12 changed files
with
262 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
use flake | ||
|
||
watch_file *.cabal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
result | ||
dist-newstyle/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Chelleport | ||
|
||
WIP | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
* Current | ||
- ( ) | ||
|
||
* Later | ||
- ( ) | ||
|
||
* Maybe | ||
- ( ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module Main where | ||
|
||
import qualified Chelleport | ||
import Data.Text (Text, splitOn) | ||
import qualified Data.Text as Text | ||
import System.Environment (getArgs) | ||
import System.Exit (exitFailure) | ||
|
||
main :: IO () | ||
main = do | ||
putStrLn "Wow" | ||
Chelleport.open |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
cabal-version: 3.0 | ||
|
||
name: chelleport | ||
version: 0.1.0.0 | ||
license: MIT | ||
author: Akshay Nair <[email protected]> | ||
maintainer: Akshay Nair <[email protected]> | ||
build-type: Simple | ||
synopsis: Mouse control | ||
description: Mouse control | ||
|
||
common common-config | ||
default-extensions: | ||
OverloadedStrings, | ||
LambdaCase, | ||
QuasiQuotes, | ||
TemplateHaskell, | ||
TupleSections, | ||
NamedFieldPuns | ||
default-language: Haskell2010 | ||
build-depends: | ||
base, | ||
text, | ||
containers | ||
|
||
common warnings | ||
ghc-options: | ||
-Wall -Wincomplete-record-updates -Wincomplete-uni-patterns | ||
-Wunused-foralls -Wextra -Wno-unused-do-bind -Wname-shadowing | ||
-fwarn-tabs -fprint-explicit-foralls -fprint-explicit-kinds | ||
|
||
executable chelleport | ||
import: common-config, warnings | ||
hs-source-dirs: bin | ||
main-is: Main.hs | ||
build-depends: lib-chelleport | ||
-- other-modules: | ||
|
||
library lib-chelleport | ||
import: common-config, warnings | ||
hs-source-dirs: src | ||
build-depends: | ||
gloss == 1.13.2.2, | ||
sdl2 == 2.5.5.0 | ||
exposed-modules: | ||
Chelleport | ||
|
||
test-suite specs | ||
import: common-config | ||
type: exitcode-stdio-1.0 | ||
hs-source-dirs: specs | ||
main-is: Main.hs | ||
other-modules: | ||
Specs.ParserSpec, | ||
Specs.SerializerSpec, | ||
Specs.TransformerSpec | ||
build-depends: | ||
lib-chelleport, | ||
neat-interpolation, | ||
pretty-simple, | ||
hspec |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
inputs = { | ||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; | ||
flake-parts.url = "github:hercules-ci/flake-parts"; | ||
haskell-flake.url = "github:srid/haskell-flake"; | ||
}; | ||
outputs = inputs@{ self, nixpkgs, flake-parts, ... }: | ||
flake-parts.lib.mkFlake { inherit inputs; } { | ||
systems = nixpkgs.lib.systems.flakeExposed; | ||
imports = [ inputs.haskell-flake.flakeModule ]; | ||
|
||
perSystem = { self', pkgs, lib, config, ... }: { | ||
haskellProjects.default = { | ||
projectRoot = builtins.toString (lib.fileset.toSource { | ||
root = ./.; | ||
fileset = lib.fileset.unions [ | ||
./src | ||
./specs | ||
./chelleport.cabal | ||
]; | ||
}); | ||
|
||
packages = {}; | ||
settings = {}; | ||
|
||
devShell = { | ||
# tools = hp: { fourmolu = hp.fourmolu; ghcid = null; }; | ||
hlsCheck.enable = pkgs.stdenv.isDarwin; | ||
}; | ||
|
||
autoWire = [ "packages" "apps" "checks" ]; | ||
}; | ||
|
||
packages.default = self'.packages.chelleport; | ||
apps.default = self'.apps.chelleport; | ||
|
||
devShells.default = pkgs.mkShell { | ||
inputsFrom = [ | ||
config.haskellProjects.default.outputs.devShell | ||
]; | ||
packages = with pkgs; [ | ||
just | ||
haskellPackages.hspec-golden | ||
]; | ||
}; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
cradle: | ||
cabal: | ||
- path: "./src" | ||
component: "lib:lib-chelleport" | ||
|
||
- path: "./bin/Main.hs" | ||
component: "exe:chelleport" | ||
|
||
- path: "./specs" | ||
component: "test:specs" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
default: | ||
@just --choose | ||
|
||
run *args: | ||
cabal run chelleport -- {{args}} | ||
|
||
test: | ||
cabal test | ||
|
||
testw: | ||
npx nodemon -e .hs -w src --exec 'ghcid -c "cabal repl test:specs" -T :main' | ||
|
||
build: | ||
nix build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module Main (main) where | ||
|
||
import qualified Specs.ParserSpec | ||
import Test.Hspec (hspec) | ||
|
||
main :: IO () | ||
main = hspec $ do | ||
Specs.ParserSpec.test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
module Chelleport where | ||
|
||
import Graphics.Gloss | ||
|
||
open = | ||
display | ||
( InWindow | ||
"Hello World" -- window title | ||
(400, 150) -- window size | ||
(10, 10) -- window position | ||
) | ||
white -- background color | ||
picture -- picture to display | ||
|
||
picture = | ||
Translate (-170) (-20) $ -- shift the text to the middle of the window | ||
Scale 0.5 0.5 $ -- display it half the original size | ||
Text "Hello World" -- text to display |