Handle sequences constants for module identifiers
This commit is contained in:
parent
a698ac82ea
commit
0fcc2dbf6c
|
@ -129,9 +129,14 @@ appendToContext n = updateContext go
|
||||||
go q = name2ns n <> q
|
go q = name2ns n <> q
|
||||||
|
|
||||||
name2ns :: Name -> Namespace
|
name2ns :: Name -> Namespace
|
||||||
name2ns (Name o) = case o of
|
name2ns (Name o) = go o
|
||||||
Aeson.Array [_, _, Aeson.String s] -> [s]
|
where
|
||||||
_ -> error $ show o
|
go :: Aeson.Value -> Namespace
|
||||||
|
go = \case
|
||||||
|
Aeson.Array [Aeson.String "const", x, Aeson.String s] -> case x of
|
||||||
|
Aeson.Null -> [s]
|
||||||
|
_ -> go x <> [s]
|
||||||
|
_ -> error $ show o
|
||||||
|
|
||||||
class References a where
|
class References a where
|
||||||
entries :: MyMonad m => a -> m ()
|
entries :: MyMonad m => a -> m ()
|
||||||
|
|
Loading…
Reference in a new issue