From 6ffdc0e9269239967a9dd7a547cd68ed3b72d3c4 Mon Sep 17 00:00:00 2001 From: Jacco Krijnen Date: Sat, 8 Jun 2024 12:11:38 +0200 Subject: [PATCH] Add error GHC-23482 --- message-index/messages/GHC-23482/index.md | 8 ++++++++ .../messages/GHC-23482/read-int/after/ReadInt.hs | 4 ++++ .../messages/GHC-23482/read-int/before/ReadInt.hs | 3 +++ message-index/messages/GHC-23482/read-int/index.md | 3 +++ 4 files changed, 18 insertions(+) create mode 100644 message-index/messages/GHC-23482/index.md create mode 100644 message-index/messages/GHC-23482/read-int/after/ReadInt.hs create mode 100644 message-index/messages/GHC-23482/read-int/before/ReadInt.hs create mode 100644 message-index/messages/GHC-23482/read-int/index.md diff --git a/message-index/messages/GHC-23482/index.md b/message-index/messages/GHC-23482/index.md new file mode 100644 index 00000000..3fe037cb --- /dev/null +++ b/message-index/messages/GHC-23482/index.md @@ -0,0 +1,8 @@ +--- +title: TypeApplication +summary: A type application is only allowed with the TypeApplication extension enabled. +severity: error +introduced: 9.8.1 +--- + +Applying a term to a type (using @ notation) requires enabling the TypeApplication extension. diff --git a/message-index/messages/GHC-23482/read-int/after/ReadInt.hs b/message-index/messages/GHC-23482/read-int/after/ReadInt.hs new file mode 100644 index 00000000..011331dd --- /dev/null +++ b/message-index/messages/GHC-23482/read-int/after/ReadInt.hs @@ -0,0 +1,4 @@ +{-# LANGUAGE TypeApplications #-} +module ReadInt where + +x = read @Int "42" diff --git a/message-index/messages/GHC-23482/read-int/before/ReadInt.hs b/message-index/messages/GHC-23482/read-int/before/ReadInt.hs new file mode 100644 index 00000000..d16e7693 --- /dev/null +++ b/message-index/messages/GHC-23482/read-int/before/ReadInt.hs @@ -0,0 +1,3 @@ +module ReadInt where + +x = read @Int "42" diff --git a/message-index/messages/GHC-23482/read-int/index.md b/message-index/messages/GHC-23482/read-int/index.md new file mode 100644 index 00000000..74d830dd --- /dev/null +++ b/message-index/messages/GHC-23482/read-int/index.md @@ -0,0 +1,3 @@ +--- +title: Using the read function with a type-application +---