@@ -355,9 +355,6 @@ argsToValue opts multiCons (RecC conName ts) = case (unwrapUnaryRecords opts, no
355355
356356 (maybes, rest) = partition isMaybe argCons
357357
358− isMaybe (_, (_, _, AppT (ConT t) _)) = t == ''Maybe
359− isMaybe _ = False
360−
361358 maybeToPair (arg, (field, _, _)) =
362359 infixApp (infixE (Just $ toFieldName field)
363360 [|(.=)|]
@@ -408,6 +405,10 @@ argsToValue opts multiCons (InfixC _ conName _) = do
408405argsToValue opts multiCons (ForallC _ _ con) =
409406 argsToValue opts multiCons con
410407
408+isMaybe :: (a, (b, c, Type)) -> Bool
409+isMaybe (_, (_, _, AppT (ConT t) _)) = t == ''Maybe
410+isMaybe _ = False
411+
411412(<^>) :: ExpQ -> ExpQ -> ExpQ
412413(<^>) a b = infixApp a [|(<>)|] b
413414infixr 6 <^>
@@ -489,9 +490,6 @@ argsToEncoding opts multiCons (RecC conName ts) = case (unwrapUnaryRecords opts,
489490
490491 (maybes, rest) = partition isMaybe argCons
491492
492− isMaybe (_, (_, _, AppT (ConT t) _)) = t == ''Maybe
493− isMaybe _ = False
494−
495493 maybeToPair (arg, (field, _, _)) =
496494 infixApp (infixE (Just $ toFieldName field)
497495 [|(.=)|]