id = "stylish-haskell" name = "stylish-haskell" homepage = "https://github.com/haskell/stylish-haskell" description = "A simple Haskell code prettifier." executables = ["stylish-haskell"] [dotfiles] # The official README's configuration search order includes a user-wide # ~/.config/stylish-haskell/config.yaml on Unix and ~/.stylish-haskell.yaml in # the home directory. Project-local .stylish-haskell.yaml is intentionally not # included because it belongs to each project rather than the user profile. # https://github.com/haskell/stylish-haskell#configuration paths = [ "~/.config/stylish-haskell/config.yaml", "~/.stylish-haskell.yaml", ] secret = [] [commands] format = 1 label = "Format Haskell files" description = "Prettify imports, pragmas and records in Haskell source files, printing the result or rewriting the files in place." quality = "ai-draft" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = true } [[commands.source]] id = "src" kind = "manual" url = "https://github.com/haskell/stylish-haskell/blob/master/src/Main.hs" revision = "2026-10-27" evidence = """ -c,--config CONFIG Configuration file -r,--recursive Recursive file search -v,--verbose Run in verbose mode -d,--defaults Dump default config and exit -i,--inplace Overwrite the given files in place FILENAME Input file(s) (from src/Main.hs: long "config", short 'c'; long "recursive", short 'r'; long "verbose", short 'v'; long "inplace", short 'i') Use `stylish-haskell --defaults > .stylish-haskell.yaml` to dump a """ [[commands.field]] id = "files" label = "Files or directories" description = "Leave empty to read stdin. Directories need Recursive." type = "path" path = { kind = "any", role = "input" } position = 0 multiple = true sources = ["src"] [[commands.field]] id = "inplace" label = "Overwrite files in place" type = "boolean" option = ["--inplace", "-i"] effect = "overwrite" sources = ["src"] [[commands.field]] id = "recursive" label = "Recursive search" type = "boolean" option = ["--recursive", "-r"] sources = ["src"] [[commands.field]] id = "config" label = "Config file" type = "path" option = ["--config", "-c"] path = { kind = "file", role = "input", must_exist = true } sources = ["src"] [[commands.field]] id = "verbose" label = "Verbose" type = "boolean" option = ["--verbose", "-v"] sources = ["src"] [[commands.field]] id = "defaults" label = "Dump default config" description = "Print the default configuration; redirect it to .stylish-haskell.yaml." type = "boolean" option = ["--defaults"] sources = ["src"] [[commands.task]] id = "format-inplace" label = "Format files in place" fields = ["files", "inplace", "recursive", "config"] required = ["files", "inplace"] set = { inplace = [true] } [[commands.task]] id = "preview" label = "Preview formatted output" fields = ["files", "config"] required = ["files"] [[commands.group]] id = "basic" label = "Basic" fields = ["files", "inplace", "recursive"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["config", "verbose", "defaults"]