Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add message for GHC-10173 #522

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions message-index/messages/GHC-10173/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: No top level binding to annotate
summary: There is no top level binding this annotation can match.
severity: error
introduced: 9.6.1
---

There is no binding available that this annotation can match.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please quote the error message from the compiler here and/or in index.md for individual examples, it would help readers to recognise that this is a page they are looking for.


Common errors include:

- The binding is not available at all.
- The binding is available, but in the wrong namespace.
- The binding is availabale, but defined in another module.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module NoBinding where

{-# ANN foo "Bar" #-}

foo :: Integer
foo = 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module NoBinding where

{-# ANN foo "Bar" #-}
4 changes: 4 additions & 0 deletions message-index/messages/GHC-10173/no-binding/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: No Binding available
order: 1
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module NotInModule where

{-# ANN myLength "an annotation" #-}

myLength :: Foldable t => t a -> Int
myLength = length
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module NotInModule where

{-# ANN length "an annotation" #-}
4 changes: 4 additions & 0 deletions message-index/messages/GHC-10173/not-in-module/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Binding in another module
order: 3
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module WrongNamespace where

data Foo = Bar

{-# ANN type Foo (1 :: Int) #-}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module WrongNamespace where

data Foo = Bar

{-# ANN Foo (1 :: Int) #-}
4 changes: 4 additions & 0 deletions message-index/messages/GHC-10173/wrong-namespace/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Binding available, but in the wrong namespace
order: 2
---
Loading