Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,385
    • Issues 4,385
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 370
    • Merge Requests 370
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #2776

Closed
Open
Opened Nov 13, 2008 by Syzygies@trac-Syzygies

Document -pgmL (Use cmd as the literate pre-processor)

The GHC option -pgmL (Use cmd as the literate pre-processor) is undocumented, and behaves differently than -pgmF (Use cmd as the pre-processor).

While one can count on the first three arguments to a -pgmF command giving file names, with optional arguments coming later, the last three arguments to a -pgmL command give the file names. An undocumented "-h" argument always comes before these file arguments, throwing off any command designed according to the documentation for -pgmF. Moreover, an optional argument provided using -opL comes before any of these arguments.

The undocumented "-h" reminds me of the passage in Real World Haskell, how only one reasonable program could have type "(a, b) -> a", because there isn't enough information to do anything clever. Here, GHC wants the -pgmL command to emit standard Haskell, but for all it knows, the literate program is in Swahili. GHC isn't really in a good position to be offering advice via options on this conversion, because it has no idea what conversion is taking place. So the "-h" is inexplicable.

Also, the example command in GHC manual section 5.10.4. doesn't use argument $1, and probably wants to use $1 rather than $2 for the echo, if in fact it is possible to create circumstance where $1 and $2 differ.

Trac metadata
Trac field Value
Version 6.10.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Documentation
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
Assignee
Assign to
8.0.1
Milestone
8.0.1 (Past due)
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#2776