getTopLevelDeclarationNames
Extract top-level declaration names (functions, data types, type classes) from PureScript code or a file. Enables code analysis without requiring an IDE server, simplifying development tasks.
Instructions
List all main definitions in PureScript code: function names, data types, type classes, etc. Gets just the names (like 'myFunction', 'MyDataType'). Fast analysis without needing IDE server.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
code | No | PureScript code string. | |
filePath | No | Absolute path to the PureScript file. Only absolute paths are supported. |
Input Schema (JSON Schema)
{
"additionalProperties": false,
"description": "Exactly one of 'filePath' or 'code' must be provided.",
"properties": {
"code": {
"description": "PureScript code string.",
"type": "string"
},
"filePath": {
"description": "Absolute path to the PureScript file. Only absolute paths are supported.",
"type": "string"
}
},
"type": "object"
}