hsmin-0.1.0: hsmin.cabal
cabal-version: 3.0
name: hsmin
version: 0.1.0
license: MIT
license-file: LICENSE
author: Jappie Klooster
maintainer: jappieklooster@hotmail.com
build-type: Simple
synopsis: Haskell source code minifier for LLM token reduction
description:
A Haskell source code minifier that uses ghc-lib-parser to parse
Haskell source and produce a compact output with comments and
whitespace stripped, layout converted to explicit brace syntax,
and other size reductions. Useful for reducing LLM token usage
when including Haskell source in prompts.
category: Development
source-repository head
type: git
location: https://github.com/jappeace-sloth/haskell-minifier.git
flag werror
description: Enable -Werror during development
manual: True
default: False
common warnings
ghc-options:
-Wall
-Wincomplete-uni-patterns
-Wincomplete-record-updates
-Widentities
-Wredundant-constraints
-Wcpp-undef
-fwarn-tabs
-Wpartial-fields
-Wunused-packages
-fno-omit-yields
if flag(werror)
ghc-options: -Werror
default-extensions:
EmptyCase
FlexibleContexts
FlexibleInstances
InstanceSigs
MultiParamTypeClasses
LambdaCase
MultiWayIf
NamedFieldPuns
TupleSections
DeriveFoldable
DeriveFunctor
DeriveGeneric
DeriveLift
DeriveTraversable
DerivingStrategies
GeneralizedNewtypeDeriving
StandaloneDeriving
OverloadedStrings
TypeApplications
NumericUnderscores
ImportQualifiedPost
ScopedTypeVariables
library
import: warnings
exposed-modules:
HsMin
HsMin.Parse
HsMin.Print
HsMin.Transform
HsMin.Util
build-depends:
base >= 4.16 && < 5
, ghc-lib-parser >= 9.12 && < 9.14
hs-source-dirs: src
default-language: Haskell2010
executable hsmin
import: warnings
main-is: Main.hs
build-depends:
base >= 4.16 && < 5
, hsmin
, optparse-applicative >= 0.16 && < 0.19
hs-source-dirs: app
default-language: Haskell2010
ghc-options: -threaded -rtsopts "-with-rtsopts=-N"
test-suite unit
import: warnings
type: exitcode-stdio-1.0
main-is: Test.hs
other-modules:
Test.Parse
Test.Print
Test.Integration
Test.E2E
build-depends:
base >= 4.16 && < 5
, hsmin
, tasty >= 1.4 && < 1.6
, tasty-hunit >= 0.10 && < 0.11
, temporary >= 1.3 && < 1.5
, directory >= 1.3 && < 1.5
, filepath >= 1.4 && < 1.6
, process >= 1.6 && < 1.8
hs-source-dirs: test
default-language: Haskell2010
ghc-options: -threaded -rtsopts "-with-rtsopts=-N"