1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 16:02:43 +03:00

🔥 Loc.

This commit is contained in:
Rob Rix 2019-10-10 13:56:22 -04:00
parent 20c6d12b03
commit 8880278961
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -1,7 +1,6 @@
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE RecordWildCards #-}
module Data.Loc module Data.Loc
( Loc(..) ( Path(..)
, Path(..)
, here , here
, stackLoc , stackLoc
) where ) where
@ -13,12 +12,6 @@ import Source.Span
newtype Path = Path { getPath :: Text } newtype Path = Path { getPath :: Text }
deriving (Eq, Ord, Show) deriving (Eq, Ord, Show)
data Loc = Loc
{ locPath :: !Path
, locSpan :: {-# UNPACK #-} !Span
}
deriving (Eq, Ord, Show)
here :: HasCallStack => Maybe (Path, Span) here :: HasCallStack => Maybe (Path, Span)
here = stackLoc callStack here = stackLoc callStack