@@ -65,11 +65,11 @@ import Language.Haskell.Exts.Pretty (Pretty, prettyPrint)
6565import Prelude hiding (Enum)
6666import Text.EDE (Template)
6767
68−newtype Fix f = Fix (f (Fix f))
69−
7068keyless :: Map Text a -> [a]
7169keyless = Map.elems
7270
71+newtype Fix f = Fix (f (Fix f))
72+
7373data Location
7474 = Query
7575 | Path
@@ -122,15 +122,16 @@ data Schema a
122122 | SObj Info (Obj a)
123123 deriving (Eq, Show)
124124
125−instance FromJSON a => FromJSON (Schema a) where
125+instance FromJSON (Fix Schema) where
126126 parseJSON o = do
127127 i <- parseJSON o
128− SRef i <$> parseJSON o
128+ s <- SRef i <$> parseJSON o
129129 <|> SAny i <$> parseJSON o
130130 <|> SLit i <$> parseJSON o
131131 <|> SEnm i <$> parseJSON o
132132 <|> SArr i <$> parseJSON o
133133 <|> SObj i <$> parseJSON o
134+ pure (Fix s)
134135
135136instance HasInfo (Schema a) where
136137 info = lens f (flip g)