@@ -159,12 +159,12 @@ conditional = mkPattern match
159159 match (JSConditional ss cond th el) = Just ((ss, th, el), cond)
160160 match _ = Nothing
161161
162−accessor :: (Emit gen) => Pattern PrinterState JS (gen, JS)
162+accessor :: Pattern PrinterState JS (Text, JS)
163163accessor = mkPattern match
164164 where
165165 match (JSIndexer _ (JSStringLiteral _ prop) val) =
166166 case decodeString prop of
167− Just s | not (identNeedsEscaping s) -> Just (emit s, val)
167+ Just s | not (identNeedsEscaping s) -> Just (s, val)
168168 _ -> Nothing
169169 match _ = Nothing
170170
@@ -259,8 +259,8 @@ prettyPrintJS' = A.runKleisli $ runPattern matchValue
259259 matchValue = buildPrettyPrinter operators (literals <+> fmap parensPos matchValue)
260260 operators :: (Emit gen) => OperatorTable PrinterState JS gen
261261 operators =
262− OperatorTable [ [ Wrap accessor $ \prop val -> val <> emit "." <> prop ]
263− , [ Wrap indexer $ \index val -> val <> emit "[" <> index <> emit "]" ]
262+ OperatorTable [ [ Wrap indexer $ \index val -> val <> emit "[" <> index <> emit "]" ]
263+ , [ Wrap accessor $ \prop val -> val <> emit "." <> emit prop ]
264264 , [ Wrap app $ \args val -> val <> emit "(" <> args <> emit ")" ]
265265 , [ unary JSNew "new " ]
266266 , [ Wrap lam $ \(name, args, ss) ret -> addMapping' ss <>