packages feed

fuyu-gpio-0.0.9.0: fuyu-gpio.cabal

cabal-version:      3.0
name:               fuyu-gpio
version:            0.0.9.0
synopsis:           High-level, type-safe interface for Linux GPIO (libgpiod v2).
description:        High-level, type-safe, and resource-managed Haskell interface for Linux GPIO character devices using libgpiod v2. Built on top of fuyu-gpio-direct, fuyu-gpio provides automatic memory management (bracket / with* style), typed exception handling, metadata snapshots, and zero-copy vector operations for high-performance GPIO I/O.
license:            LGPL-2.1-or-later
license-file:       LICENSE
author:             BassGT
maintainer:         sebastian11medrano@gmail.com
-- copyright:
category:           System, Hardware
build-type:         Simple
extra-doc-files:    CHANGELOG.md

source-repository head
    type:     git
    location: https://github.com/BassGT/fuyu-gpio.git

common warnings
    ghc-options: -Wall

library
    import:           warnings
    exposed-modules:  Fuyu.GPIO,
                      Fuyu.GPIO.Chip,
                      Fuyu.GPIO.Chip.Info,
                      Fuyu.GPIO.Chip.Info.Unsafe,
                      Fuyu.GPIO.Chip.Unsafe,
                      Fuyu.GPIO.Line,
                      Fuyu.GPIO.Line.Info,
                      Fuyu.GPIO.Line.Info.Unsafe,
                      Fuyu.GPIO.Line.Unsafe,
                      Fuyu.GPIO.RequestConfig,
                      Fuyu.GPIO.RequestConfig.Unsafe,
                      Fuyu.GPIO.EdgeEvent,
                      Fuyu.GPIO.EdgeEvent.Unsafe,
                      Fuyu.GPIO.Chip.Watch,
                      Fuyu.GPIO.Chip.Watch.Unsafe,
                      Fuyu.GPIO.Exception

    other-modules:    Fuyu.GPIO.Types

    -- other-extensions:
    build-depends:    base >= 4.18 && < 5,
                      fuyu-gpio-direct ^>=0.1.0.0,
                      bytestring ^>=0.12.1.0,
                      vector ^>=0.13.1.0


    hs-source-dirs:   src
    default-language: Haskell2010
    default-extensions: PatternSynonyms


flag examples
  description: Compile all examples
  default:     False
  manual:      True

common example-config
    import:           warnings
    hs-source-dirs:   examples
    default-language: Haskell2010
    if !flag(examples)
        buildable: False
    else
        build-depends:
            base >= 4.18 && < 5,
            fuyu-gpio,
            vector ^>= 0.13.1.0,
            transformers >= 0.5 && < 0.7,
            bytestring ^>= 0.12.1.0


executable 01-blink
    import:           example-config
    main-is:          01-blink.hs
    
executable 02-button 
    import:           example-config
    main-is:          02-button.hs
    
executable 03-led-and-button
    import:           example-config
    main-is:          03-led-and-button.hs
    ghc-options:      -threaded 

executable 04-line-watch
    import:           example-config
    main-is:          04-line-watch.hs
    ghc-options:      -threaded -rtsopts
    
executable 05-request-config  
    import:           example-config
    main-is:          05-request-config.hs