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 +---