mirror of
https://github.com/anoma/juvix.git
synced 2024-12-15 01:52:11 +03:00
[concrete] Add HasLoc for LiteralLoc
This commit is contained in:
parent
b7ce2939f2
commit
edcddcd3ce
@ -694,6 +694,9 @@ instance Pretty LiteralLoc where
|
||||
instance Eq LiteralLoc where
|
||||
l1 == l2 = _literalLocLiteral l1 == _literalLocLiteral l2
|
||||
|
||||
instance HasLoc LiteralLoc where
|
||||
getLoc = _literalLocLoc
|
||||
|
||||
-- | Expressions without application
|
||||
data ExpressionAtom (s :: Stage)
|
||||
= AtomIdentifier (IdentifierType s)
|
||||
|
@ -13,7 +13,7 @@ import MiniJuvix.Syntax.Concrete.Scoped.Name.NameKind
|
||||
import qualified MiniJuvix.Syntax.Concrete.Language as C
|
||||
import MiniJuvix.Syntax.Fixity
|
||||
import Prettyprinter
|
||||
import MiniJuvix.Syntax.Concrete.Language (literalLocLoc, HasLoc)
|
||||
import MiniJuvix.Syntax.Concrete.Language (HasLoc)
|
||||
|
||||
type FunctionName = Name
|
||||
|
||||
@ -203,7 +203,7 @@ instance HasLoc Expression where
|
||||
ExpressionIden i -> C.getLoc i
|
||||
ExpressionApplication a -> C.getLoc (a ^. appLeft)
|
||||
ExpressionTyped t -> C.getLoc (t ^. typedExpression)
|
||||
ExpressionLiteral l -> (l ^. literalLocLoc)
|
||||
ExpressionLiteral l -> C.getLoc l
|
||||
|
||||
instance HasLoc Iden where
|
||||
getLoc = \case
|
||||
|
Loading…
Reference in New Issue
Block a user