@@ -55,7 +55,7 @@ literal lit =
5555expression :: Expr -> State Int (Expression ())
5656expression (A region expr) =
5757 case expr of
58− Var (V.Raw x) -> return $ ref x
58+ Var (V.Raw x) -> return $ obj x
5959 Literal lit -> return $ literal lit
6060
6161 Range lo hi ->
@@ -243,7 +243,11 @@ match region mtch =
243243 isLiteral p = case p of
244244 Case.Clause (Right _) _ _ -> True
245245 _ -> False
246− access name = if any isLiteral clauses then ref name else dotSep [name,"ctor"]
246+
247+ access name
248+ | any isLiteral clauses = obj name
249+ | otherwise = dotSep (split name ++ ["ctor"])
250+
247251 format isChars e
248252 | or isChars = InfixExpr () OpAdd e (string "")
249253 | otherwise = e