mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-09-11 13:36:08 +03:00
[ fix, re #3063 ] Fix forgotten reflection values
This commit is contained in:
parent
58e5d15662
commit
36132f6539
@ -330,9 +330,9 @@ export
|
||||
Reflect a => Reflect (WithDefault a def) where
|
||||
reflect fc defs lhs env def
|
||||
= onWithDefault
|
||||
(appCon fc defs (reflectionttimp "Default") [Erased fc Placeholder, Erased fc Placeholder])
|
||||
(appCon fc defs (reflectionttimp "DefaultedValue") [Erased fc Placeholder, Erased fc Placeholder])
|
||||
(\x => do x' <- reflect fc defs lhs env x
|
||||
appCon fc defs (reflectionttimp "Value") [Erased fc Placeholder, Erased fc Placeholder, x'])
|
||||
appCon fc defs (reflectionttimp "SpecifiedValue") [Erased fc Placeholder, Erased fc Placeholder, x'])
|
||||
def
|
||||
|
||||
export
|
||||
|
15
tests/idris2/reflection/reflection026/Issue3168.idr
Normal file
15
tests/idris2/reflection/reflection026/Issue3168.idr
Normal file
@ -0,0 +1,15 @@
|
||||
import Language.Reflection
|
||||
|
||||
%language ElabReflection
|
||||
|
||||
data_decl : List Decl
|
||||
data_decl = `[data T = A | B]
|
||||
|
||||
record_decl : List Decl
|
||||
record_decl = `[record R where]
|
||||
|
||||
data_decl' : List Decl
|
||||
data_decl' = `[public export data T = A | B]
|
||||
|
||||
record_decl' : List Decl
|
||||
record_decl' = `[public export record R where]
|
1
tests/idris2/reflection/reflection026/expected
Normal file
1
tests/idris2/reflection/reflection026/expected
Normal file
@ -0,0 +1 @@
|
||||
1/1: Building Issue3168 (Issue3168.idr)
|
3
tests/idris2/reflection/reflection026/run
Executable file
3
tests/idris2/reflection/reflection026/run
Executable file
@ -0,0 +1,3 @@
|
||||
. ../../../testutils.sh
|
||||
|
||||
check Issue3168.idr
|
1
tests/idris2/reflection/reflection026/test.ipkg
Normal file
1
tests/idris2/reflection/reflection026/test.ipkg
Normal file
@ -0,0 +1 @@
|
||||
package a-test
|
Loading…
Reference in New Issue
Block a user