Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C curry-frontend
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 71
    • Issues 71
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • curry
  • curry-frontend
  • Merge requests
  • !28

Provide GHC-like line snippets in messages

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Fredrik Wieczerkowski requested to merge message-line-previews into master Jun 09, 2020
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 1

Fixes #87 (closed)

This merge request builds on top of !26 (merged), depends on curry-base!17 (merged) and implements GHC-like line previews in error/warning messages.

Example:

data Test a = Test

demo = case 4 of
    _ -> 3
    _ -> 5

Output:

[2 of 2] Compiling TestThis         ( src/TestThis.curry, src/.curry/TestThis.fcy )

src/TestThis.curry:1:11 Warning:
    Unreferenced type variable `a'
   | 
 1 | data Test a = Test
   |           ^

src/TestThis.curry:3:1-3:4 Warning:
    Top-level binding with no type signature:
      demo :: Prelude.Num a => a
   | 
 3 | demo = case 7 of
   | ^^^^

src/TestThis.curry:5:5-5:10 Warning:
    Pattern matches are potentially unreachable
    In a case alternative:
      _ -> ...
   | 
 5 |     _ -> 5
   |     ^^^^^^
Edited Jul 23, 2020 by Fredrik Wieczerkowski
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: message-line-previews