mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-11-28 11:05:17 +03:00
Fix reflection of PiInfo
It needs to account for the implicit parameter
This commit is contained in:
parent
8e788658c4
commit
e7f8e2df8c
@ -444,7 +444,7 @@ Reify t => Reify (PiInfo t) where
|
|||||||
(NS _ (UN "ImplicitArg"), _) => pure Implicit
|
(NS _ (UN "ImplicitArg"), _) => pure Implicit
|
||||||
(NS _ (UN "ExplicitArg"), _) => pure Explicit
|
(NS _ (UN "ExplicitArg"), _) => pure Explicit
|
||||||
(NS _ (UN "AutoImplicit"), _) => pure AutoImplicit
|
(NS _ (UN "AutoImplicit"), _) => pure AutoImplicit
|
||||||
(NS _ (UN "DefImplicit"), [t])
|
(NS _ (UN "DefImplicit"), [_, t])
|
||||||
=> do t' <- reify defs !(evalClosure defs t)
|
=> do t' <- reify defs !(evalClosure defs t)
|
||||||
pure (DefImplicit t')
|
pure (DefImplicit t')
|
||||||
_ => cantReify val "PiInfo"
|
_ => cantReify val "PiInfo"
|
||||||
@ -452,12 +452,15 @@ Reify t => Reify (PiInfo t) where
|
|||||||
|
|
||||||
export
|
export
|
||||||
Reflect t => Reflect (PiInfo t) where
|
Reflect t => Reflect (PiInfo t) where
|
||||||
reflect fc defs env Implicit = getCon fc defs (reflectiontt "ImplicitArg")
|
reflect fc defs env Implicit
|
||||||
reflect fc defs env Explicit = getCon fc defs (reflectiontt "ExplicitArg")
|
= appCon fc defs (reflectiontt "ImplicitArg") [Erased fc False]
|
||||||
reflect fc defs env AutoImplicit = getCon fc defs (reflectiontt "AutoImplicit")
|
reflect fc defs env Explicit
|
||||||
|
= appCon fc defs (reflectiontt "ExplicitArg") [Erased fc False]
|
||||||
|
reflect fc defs env AutoImplicit
|
||||||
|
= appCon fc defs (reflectiontt "AutoImplicit") [Erased fc False]
|
||||||
reflect fc defs env (DefImplicit t)
|
reflect fc defs env (DefImplicit t)
|
||||||
= do t' <- reflect fc defs env t
|
= do t' <- reflect fc defs env t
|
||||||
appCon fc defs (reflectiontt "DefImplicit") [t']
|
appCon fc defs (reflectiontt "DefImplicit") [Erased fc False, t']
|
||||||
|
|
||||||
export
|
export
|
||||||
Reify LazyReason where
|
Reify LazyReason where
|
||||||
|
Loading…
Reference in New Issue
Block a user