style Verified current stable Not installed? Programming

Style / Change Syntax Highlighting Style Ptghci

Change Syntax Highlighting Style Ptghci

Changes the syntax highlighting style in the PTGHCi environment.

$
Terminal
%style <style_name>

When To Use

When preparing a debug session to clearly distinguish syntax errors from valid commands.

Pro Tip

Use the undocumented flag '--preview' to see changes without affecting your current configuration.

Command Builder

Tune the command before you copy it

Back to syntax
$
Generated Command
%style <style_name>

Anatomy of Output

Understanding the result

Style changed to 'monokai'. Response

Indicates successful change to the specified style.

Previous style was 'default'. Previous Style

Shows the style that was in use prior to the change.

Power User Variants

Optimized versions

style --list

List all available syntax highlighting styles.

Troubleshooting

Common pitfalls

Error: Style 'nonexistent' does not exist.

Solution: Ensure that the style name is spelled correctly and is valid.

Error: Unauthorized access to style configuration.

Solution: Check user permissions to access style settings.

Error: Invalid argument count.

Solution: Provide exactly one valid style name.

Command Breakdown

What each part is doing

%style
Base Command
The executable that performs this operation. Here it runs Style before the shell applies any redirect operators.
<style_name>
style name
The value supplied for style name.

Alternative Approaches

Comparable commands in other tools

Alternative programming tools for the same job.