@@ -890,50 +890,6 @@ Reflect a => Reflect (WithFC a) where
890890 val' <- reflect fc defs lhs env value. val
891891 appCon fc defs (reflectiontt " MkFCVal" ) [Erased fc Placeholder , loc', val']
892892
893- -- -- Records are reflected into Data.List.Quantifier.All
894- -- export
895- -- (refs : All (Reflect . LabelledValue) fields) => Reflect (Record fields) where
896- -- reflect fc defs lhs env [] = appCon fc defs (listAll "Nil") [Erased fc Placeholder]
897- -- reflect fc defs lhs env (x :: xs) {refs = r :: rs}
898- -- = do x' <- reflect @{r} fc defs lhs env x
899- -- xs' <- reflect fc defs lhs env xs
900- -- appCon fc defs (listAll "::") [Erased fc Placeholder, x', xs']
901- --
902- -- -- Records are reified from Data.List.Quantifier.All the labels are inferred from the type
903- -- export
904- -- {fields : _} -> (rei : All (Reify . LabelledValue) fields) => Reify (Record fields) where
905- -- reify defs val@(NDCon _ n _ _ args) {fields = []}
906- -- = case (dropAllNS !(full (gamma defs) n)) of
907- -- (UN (Basic "Nil")) => pure []
908- -- _ => cantReify val "expected empty fields"
909- -- reify defs val@(NDCon _ n _ _ args) {fields = f :: fs} {rei = r :: rs}
910- -- = case (dropAllNS !(full (gamma defs) n), map snd args) of
911- -- (UN (Basic "::"), [_, x, xs]) => do
912- -- x' <- reify defs !(evalClosure defs x)
913- -- xs' <- reify defs !(evalClosure defs xs)
914- -- pure (x' :: xs')
915- -- (_, args) => cantReify val "fields : \{show (map label (f :: fs))}, args: \{show (length args)}"
916- -- reify defs val {fields} = cantReify val "fields : \{show (map label fields)}"
917-
918- -- export
919- -- All (Reflect . LabelledValue) fields => Reflect a => Reflect (WithData fields a) where
920- -- reflect fc defs lhs env (MkWithData metadata val)
921- -- = do m' <- reflect fc defs lhs env metadata
922- -- val' <- reflect fc defs lhs env val
923- -- appCon fc defs (reflectiontt "MkWithData") [m', val']
924- --
925- -- export
926- -- {fields : _} -> All (Reify . LabelledValue) fields => Reify a => Reify (WithData fields a) where
927- -- reify defs val@(NDCon _ n _ _ args) {fields}
928- -- = case (dropAllNS !(full (gamma defs) n), map snd args) of
929- -- (UN (Basic "MkWithData"), [_, m, val]) => do
930- -- m' <- reify defs !(evalClosure defs m)
931- -- v' <- reify defs !(evalClosure defs val)
932- -- pure (MkWithData m' v')
933- -- (_, args) => cantReify val "WithData : \{show (map label fields)}, args : \{show (length args)}"
934- -- reify defs val {fields} = cantReify val "WithData : \{show (map label fields)}"
935-
936-
937893export
938894Reflect BindingModifier where
939895 reflect fc defs lhs env NotBinding = getCon fc defs (reflectiontt " NotBinding" )
0 commit comments