Commit 12dbc892 authored by Herbert Valerio Riedel's avatar Herbert Valerio Riedel 🕺

Add `PrelNames.thenAName` for `Applicative(*>)`

This is needed to allow subsequent patches to refer to `*>`.

While at it, this commit also groups together the `Applicative` definitions
to reduce confusion.

Reviewed By: austin

Differential Revision: https://phabricator.haskell.org/D1513
parent 1c45f417
......@@ -234,9 +234,8 @@ basicKnownKeyNames
enumFromName, enumFromThenName,
enumFromThenToName, enumFromToName,
-- Applicative/Alternative stuff
pureAName,
apAName,
-- Applicative stuff
pureAName, apAName, thenAName,
-- Monad stuff
thenIOName, bindIOName, returnIOName, failIOName, bindMName, thenMName,
......@@ -927,9 +926,15 @@ monadFailClassName, failMName :: Name
monadFailClassName = clsQual mONAD_FAIL (fsLit "MonadFail") monadFailClassKey
failMName = varQual mONAD_FAIL (fsLit "fail") failMClassOpKey
-- Classes (Applicative, Foldable, Traversable)
applicativeClassName, foldableClassName, traversableClassName :: Name
applicativeClassName = clsQual gHC_BASE (fsLit "Applicative") applicativeClassKey
-- Class Applicative
applicativeClassName, pureAName, apAName, thenAName :: Name
applicativeClassName = clsQual gHC_BASE (fsLit "Applicative") applicativeClassKey
apAName = varQual gHC_BASE (fsLit "<*>") apAClassOpKey
pureAName = varQual gHC_BASE (fsLit "pure") pureAClassOpKey
thenAName = varQual gHC_BASE (fsLit "*>") thenAClassOpKey
-- Classes (Foldable, Traversable)
foldableClassName, traversableClassName :: Name
foldableClassName = clsQual dATA_FOLDABLE (fsLit "Foldable") foldableClassKey
traversableClassName = clsQual dATA_TRAVERSABLE (fsLit "Traversable") traversableClassKey
......@@ -937,17 +942,18 @@ traversableClassName = clsQual dATA_TRAVERSABLE (fsLit "Traversable") trave
-- AMP additions
joinMName, apAName, pureAName, alternativeClassName :: Name
joinMName, alternativeClassName :: Name
joinMName = varQual gHC_BASE (fsLit "join") joinMIdKey
apAName = varQual gHC_BASE (fsLit "<*>") apAClassOpKey
pureAName = varQual gHC_BASE (fsLit "pure") pureAClassOpKey
alternativeClassName = clsQual mONAD (fsLit "Alternative") alternativeClassKey
joinMIdKey, apAClassOpKey, pureAClassOpKey, alternativeClassKey :: Unique
--
joinMIdKey, apAClassOpKey, pureAClassOpKey, thenAClassOpKey,
alternativeClassKey :: Unique
joinMIdKey = mkPreludeMiscIdUnique 750
apAClassOpKey = mkPreludeMiscIdUnique 751 -- <*>
pureAClassOpKey = mkPreludeMiscIdUnique 752
alternativeClassKey = mkPreludeMiscIdUnique 753
thenAClassOpKey = mkPreludeMiscIdUnique 753
alternativeClassKey = mkPreludeMiscIdUnique 754
-- Functions for GHC extensions
......
CustomTypeErrors02.hs:17:1: error:
The type 'a_aES -> a_aES' cannot be represented as an integer.
The type 'a_aER -> a_aER' cannot be represented as an integer.
When checking that ‘err’ has the inferred type
err :: (TypeError ...)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment