Skip to content
Snippets Groups Projects
Commit 556d5430 authored by Jens Nolte's avatar Jens Nolte
Browse files

Add example application

parent 6a60ce38
No related branches found
No related tags found
No related merge requests found
module Main (main) where
import Quasar.Prelude
import Quasar.ResourceManager
import Quasar.Wayland.Client
main :: IO ()
main = withResourceManagerM do
traceIO "Connecting"
client <- connectWaylandClient
traceIO "Connected"
......@@ -3,14 +3,14 @@
print -P %F{yellow}Cleaning repository%f
nix develop -c cabal clean
(git ls-files test; git ls-files '*.cabal'; git ls-files 'flake.*') | \
(git ls-files test example; git ls-files '*.cabal'; git ls-files 'flake.*') | \
entr -r \
nix develop -c \
ghcid \
--warnings \
"--command=cabal repl lib:quasar-wayland" \
"--test=:! \
cabal test --test-show-details=direct --ghc-option -fdiagnostics-color=always && \
cabal build --ghc-option -fdiagnostics-color=always && \
cabal test --disable-optimisation --enable-debug-info=2 --test-show-details=direct --ghc-option -fdiagnostics-color=always && \
cabal run --disable-optimisation --enable-debug-info=2 --ghc-option -fdiagnostics-color=always quasar-wayland-example && \
zsh -c 'print -P %F{green}Build and tests passed%f' \
"
......@@ -106,6 +106,18 @@ library
hs-source-dirs:
src
executable quasar-wayland-example
import: shared-executable-properties
build-depends:
quasar,
quasar-wayland,
-- required for record-dot-preprocessor
record-dot-preprocessor,
record-hasfield,
main-is: Main.hs
hs-source-dirs:
example
test-suite quasar-wayland-test
import: shared-executable-properties
type: exitcode-stdio-1.0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment