Handle sequences constants for module identifiers
This commit is contained in:
parent
a698ac82ea
commit
0fcc2dbf6c
|
@ -129,8 +129,13 @@ 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
|
||||||
|
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
|
_ -> error $ show o
|
||||||
|
|
||||||
class References a where
|
class References a where
|
||||||
|
|
Loading…
Reference in a new issue