packages feed

purekell-0.1.0.0: purekell.cabal

cabal-version: 3.0
name:          purekell
version:       0.1.0.0
synopsis:      Bidirectional Haskell/PureScript expression translator
description:
  Parses Haskell and PureScript expressions into a shared AST, then
  prints them back in either language with correct syntax. Handles
  divergent syntax like record access, tuples, cons patterns, and
  record field separators. Designed for translating typeclass instance
  method bodies.

category:       Language
license:        Apache-2.0
license-file:   LICENSE
author:         philippedev101
maintainer:     philippedev101
copyright:      2026 philippedev101
homepage:       https://github.com/philippedev101/purekell#readme
bug-reports:    https://github.com/philippedev101/purekell/issues
build-type:     Simple

extra-source-files:
  README.md

extra-doc-files:
  CHANGELOG.md

source-repository head
  type:     git
  location: https://github.com/philippedev101/purekell

flag dev
  description: Enable -Werror for development
  manual:      True
  default:     False

common warnings
  default-language: GHC2021
  default-extensions:
    DerivingVia
    LambdaCase
    OverloadedStrings
  ghc-options:
    -Weverything
    -Wno-unrecognised-warning-flags
    -- Not useful for this project
    -Wno-missing-safe-haskell-mode
    -Wno-safe
    -Wno-unsafe
    -Wno-implicit-prelude
    -Wno-missing-import-lists
    -Wno-missing-local-signatures
    -Wno-missing-kind-signatures
    -Wno-missing-deriving-strategies
    -Wno-missing-export-lists
    -Wno-missing-role-annotations
    -Wno-prepositive-qualified-module
    -Wno-unticked-promoted-constructors
    -- Intentional in this codebase
    -Wno-orphans
    -Wno-name-shadowing
    -Wno-unused-imports
    -Wno-monomorphism-restriction
    -Wno-type-defaults
    -Wno-deprecations
    -- Not actionable
    -Wno-missed-specialisations
    -Wno-all-missed-specialisations
  if flag(dev)
    ghc-options: -Werror

library
  import:         warnings
  hs-source-dirs: src
  exposed-modules:
    Purekell
    Purekell.AST
    Purekell.Codec
    Purekell.Haskell
    Purekell.Instance
    Purekell.Parser
    Purekell.Printer
    Purekell.PureScript
  build-depends:
    base      >= 4.7 && < 5,
    megaparsec >= 9.0 && < 9.8,
    text      >= 2.0 && < 2.2,

test-suite purekell-test
  import:         warnings
  type:           exitcode-stdio-1.0
  main-is:        Spec.hs
  hs-source-dirs: test
  other-modules:
    Purekell.Arbitrary
    Purekell.ASTSpec
    Purekell.DivergentSpec
    Purekell.InstanceSpec
    Purekell.RoundtripSpec
  ghc-options:
    -threaded
    -rtsopts
    -with-rtsopts=-N
    -Wno-unused-packages
  build-tool-depends:
    hspec-discover:hspec-discover
  build-depends:
    base       >= 4.7 && < 5,
    hspec,
    megaparsec >= 9.0 && < 9.8,
    purekell,
    QuickCheck,
    text       >= 2.0 && < 2.2,