summaryrefslogtreecommitdiff
path: root/compiler/parser
diff options
context:
space:
mode:
authorÖmer Sinan Ağacan <omeragacan@gmail.com>2015-06-14 20:30:29 -0500
committerAustin Seipp <austin@well-typed.com>2015-06-14 20:33:19 -0500
commit1cf7fc0f182602b18ac04427b248f0374d2e626e (patch)
tree491068f4e3b0c28939216a768a2106114bc28d15 /compiler/parser
parenta5084557b0b30faf3f89386ee6ee5a308dae51b1 (diff)
downloadhaskell-1cf7fc0f182602b18ac04427b248f0374d2e626e.tar.gz
add type annotations to SrcLoc functions
Because sometimes types make more sense than docs. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D983
Diffstat (limited to 'compiler/parser')
-rw-r--r--compiler/parser/Parser.y3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/parser/Parser.y b/compiler/parser/Parser.y
index b88a3b1bf8..682b34263f 100644
--- a/compiler/parser/Parser.y
+++ b/compiler/parser/Parser.y
@@ -3207,12 +3207,15 @@ sL span a = span `seq` a `seq` L span a
-- replaced last 3 CPP macros in this file
{-# INLINE sL0 #-}
+sL0 :: a -> Located a
sL0 = L noSrcSpan -- #define L0 L noSrcSpan
{-# INLINE sL1 #-}
+sL1 :: Located a -> b -> Located b
sL1 x = sL (getLoc x) -- #define sL1 sL (getLoc $1)
{-# INLINE sLL #-}
+sLL :: Located a -> Located b -> c -> Located c
sLL x y = sL (comb2 x y) -- #define LL sL (comb2 $1 $>)
{- Note [Adding location info]