packages feed

immutaball-core-0.1.0.4.1: immutaball-core.cabal

cabal-version: 3.0

name: immutaball-core
version: 0.1.0.4.1

synopsis: Immutaball platformer game
description:
    The Immutaball platformer game is a rewrite of Neverball in Haskell.
category:     Games
homepage:     https://nibzdil.org/
bug-reports:  https://nibzdil.org/

-- When packaged with Neverball data (e.g. into ‘immutaball’), distribute under
-- GPL terms to be compliant.
license:      0BSD
license-file: LICENSE.md
author:       Byron Johnson
maintainer:   bjohnson@nibzdil.org
build-type:   Simple
copyright:    2024, Byron Johnson

extra-source-files:
    README.md
extra-doc-files:
    doc/legal/*.md
    doc/legal/*.txt
    doc/screenshots/*.png

source-repository head
    type: git
    location: https://github.com/nibzdil/immutaball

source-repository this
    type: git
    location: https://github.com/nibzdil/immutaball
    tag: v0.1.0.4.1-hackage

flag add-default-compiler-flags
    description:
        Add default set of compiler flags.
    default: True
    manual: True

common all-components
    default-language: Haskell2010
    other-extensions:
        TemplateHaskell
        TypeSynonymInstances
        FlexibleInstances
        InstanceSigs
        ScopedTypeVariables
        UndecidableInstances
        RankNTypes
        Arrows
        DerivingVia
        FlexibleContexts
        ExistentialQuantification
        ExplicitForAll
        NondecreasingIndentation

    hs-source-dirs: .

    -- We use multiple threads.  Include to fix this error:
    -- > user error (RTS doesn't support multiple OS threads (use ghc -threaded when linking))
    -- >
    -- > Package: ghc-internal
    -- > Module: GHC.Internal.IO.Exception
    -- > Type: IOException
    ghc-options: -threaded

    if flag(add-default-compiler-flags)
        -- Disable tab warner.
        -- It's a better style: https://dmitryfrank.com/articles/indent_with_tabs_align_with_spaces
        ghc-options: -Wall -Wno-tabs
        -- ghc-options: -O2

    build-depends:
        base             >= 4.9      && < 9.5,
        bytestring       >= 0.11.0.0 && < 0.13,
        containers       >= 0.6.0.1  && < 0.8,
        transformers     >= 0.5.0.0  && < 0.7,
        pipes            >= 4.3.16   && < 4.4,
        lens             >= 5.3.2    && < 5.4,
        parallel         >= 3.2.2.0  && < 3.3,
        --stm              >= 2.5.3.1  && < 2.6,
        stm              >= 2.5.1.0  && < 2.6,
        async            >= 2.2.5    && < 2.3,
        wires            >  0.2.1    && < 0.3,
        mtl              >= 2.2      && < 2.4,
        --filepath         >= 1.5.3.0  && < 1.6,
        filepath         >= 1.4.2.2  && < 1.6,
        --directory        >= 1.3.8.5  && < 1.4,
        directory        >= 1.3.8.4  && < 1.4,
        prettyprinter    >= 1.7.1    && < 1.8,
        parsec           >= 3.1.17.0 && < 3.2,
        unbounded-delays >= 0.1.1.1  && < 0.2,
        time             >= 1.12     && < 1.15,

        sdl2             >= 2.5.5.0  && < 2.6,
        gl               >= 0.9      && < 0.10,
        array            >= 0.5.8.0  && < 0.6,
        OpenGL           >= 3.0.3.0  && < 3.1,
        sdl2-ttf         >= 2.1.3    && < 2.2,
        libvorbis        >= 0.1.0.2  && < 0.2,
        JuicyPixels      >= 3.3.9    && < 3.4,
        curl             >= 1.3.8    && < 1.3.9,
        i18n             >= 0.4.0.0  && < 0.5,
        text             >= 2.1      && < 2.2

common executable-components
    build-depends: immutaball-core

    other-modules:
        Control.Monad.Trans.MaybeM
        Immutaball.Ball.CLI
        Immutaball.Ball.CLI.Config
        Immutaball.Ball.Game
        Immutaball.Ball.LevelSets
        Immutaball.Ball.Main
        Immutaball.Ball.State.Game
        Immutaball.Ball.State.LevelSelect
        Immutaball.Ball.State.LevelSets
        Immutaball.Ball.State.Play
        Immutaball.Ball.State.Preplay
        Immutaball.Ball.State.Title
        Immutaball.Prelude
        Immutaball.Putt.CLI
        Immutaball.Putt.CLI.Config
        Immutaball.Putt.Main
        Immutaball.Share.AutoPar
        Immutaball.Share.Config
        Immutaball.Share.Config.Parser
        Immutaball.Share.Config.Printer
        Immutaball.Share.Context
        Immutaball.Share.Context.Config
        Immutaball.Share.Controller
        Immutaball.Share.GLManager
        Immutaball.Share.GLManager.Config
        Immutaball.Share.GLManager.Types
        Immutaball.Share.GUI
        Immutaball.Share.ImmutaballIO
        Immutaball.Share.ImmutaballIO.BasicIO
        Immutaball.Share.ImmutaballIO.DirectoryIO
        Immutaball.Share.ImmutaballIO.GLIO
        Immutaball.Share.ImmutaballIO.SDLIO
        Immutaball.Share.Level
        Immutaball.Share.Level.Analysis
        Immutaball.Share.Level.Analysis.LowLevel
        Immutaball.Share.Level.Attributes
        Immutaball.Share.Level.Base
        Immutaball.Share.Level.Render
        Immutaball.Share.Level.Parser
        Immutaball.Share.Level.Utils
        Immutaball.Share.Math
        Immutaball.Share.Math.Core
        Immutaball.Share.Math.X3D
        Immutaball.Share.SDLManager
        Immutaball.Share.SDLManager.Config
        Immutaball.Share.SDLManager.Types
        Immutaball.Share.State
        Immutaball.Share.State.Context
        Immutaball.Share.Utils
        Immutaball.Share.Video
        Immutaball.Share.Video.LowLevel
        Immutaball.Share.Video.Shaders
        Immutaball.Share.Wire

executable immutaball
    import: all-components
    import: executable-components

    main-is: Main.hs

executable immutaputt
    import: all-components
    import: executable-components

    main-is: Putt.hs

library
    import: all-components

    exposed-modules:
        Control.Monad.Trans.MaybeM
        Immutaball.Ball.CLI
        Immutaball.Ball.CLI.Config
        Immutaball.Ball.Game
        Immutaball.Ball.LevelSets
        Immutaball.Ball.Main
        Immutaball.Ball.State.Game
        Immutaball.Ball.State.LevelSelect
        Immutaball.Ball.State.LevelSets
        Immutaball.Ball.State.Play
        Immutaball.Ball.State.Preplay
        Immutaball.Ball.State.Title
        Immutaball.Prelude
        Immutaball.Putt.CLI
        Immutaball.Putt.CLI.Config
        Immutaball.Putt.Main
        Immutaball.Share.AutoPar
        Immutaball.Share.Config
        Immutaball.Share.Config.Parser
        Immutaball.Share.Config.Printer
        Immutaball.Share.Context
        Immutaball.Share.Context.Config
        Immutaball.Share.Controller
        Immutaball.Share.GLManager
        Immutaball.Share.GLManager.Config
        Immutaball.Share.GLManager.Types
        Immutaball.Share.GUI
        Immutaball.Share.ImmutaballIO
        Immutaball.Share.ImmutaballIO.BasicIO
        Immutaball.Share.ImmutaballIO.DirectoryIO
        Immutaball.Share.ImmutaballIO.GLIO
        Immutaball.Share.ImmutaballIO.SDLIO
        Immutaball.Share.Level
        Immutaball.Share.Level.Analysis
        Immutaball.Share.Level.Analysis.LowLevel
        Immutaball.Share.Level.Attributes
        Immutaball.Share.Level.Base
        Immutaball.Share.Level.Render
        Immutaball.Share.Level.Parser
        Immutaball.Share.Level.Utils
        Immutaball.Share.Math
        Immutaball.Share.Math.Core
        Immutaball.Share.Math.X3D
        Immutaball.Share.SDLManager
        Immutaball.Share.SDLManager.Config
        Immutaball.Share.SDLManager.Types
        Immutaball.Share.State
        Immutaball.Share.State.Context
        Immutaball.Share.Utils
        Immutaball.Share.Video
        Immutaball.Share.Video.LowLevel
        Immutaball.Share.Video.Shaders
        Immutaball.Share.Wire

test-suite test-immutaball
    import: all-components
    import: executable-components

    type: exitcode-stdio-1.0

    main-is: Test.hs

    build-depends:
        -- tasty: avoid deprecated 1.5.1 version.
        --tasty            >= 1.5      && < 1.6,
        tasty            (>= 1.5     && < 1.5.1) || (> 1.5.1 && < 1.6),
        tasty-hunit      >= 0.10.2   && < 0.11,
        tasty-quickcheck >= 0.11     && < 0.12,
        HUnit            >= 1.6.2.0  && < 1.7,
        QuickCheck       >= 2.15.0.1 && < 2.16

    other-modules:
        Test.Immutaball.Test
        Test.Immutaball.Share.Math.Core.Orphans
        Test.Immutaball.Share.Math.Core.Test
        Test.Immutaball.Share.Math.Orphans
        Test.Immutaball.Share.Math.Test
        Test.Immutaball.Share.Math.X3D.Test
        Test.Immutaball.Share.State.Fixtures
        Test.Immutaball.Share.State.Test
        Test.Immutaball.Share.Wire.Test