Verified Commit e794f0c5 authored by Camil Staps's avatar Camil Staps 🚀

Use module_and_name: keep track of source location

parent d4bbcb2d
Pipeline #27800 passed with stage
in 1 minute and 51 seconds
......@@ -320,7 +320,7 @@ where
: [gp.gp_implementation \\ gp <- props]
]
propsets = map (uncurry $ generateProperties pvis generators) fes
propsets = map (uncurry $ generateProperties modname pvis generators) fes
where pvis = fromMaybe [] $ docPropertyTestWith <$> mod_doc
props = flatten propsets
......@@ -375,8 +375,8 @@ where
, ga_ptg :: !Maybe NamedTestGenerator // the generator used
}
generateProperties :: ![PropertyVarInstantiation] ![NamedTestGenerator] !String !FunctionDoc -> [GeneratedProperty]
generateProperties pvis generators fname doc =
generateProperties :: !String ![PropertyVarInstantiation] ![NamedTestGenerator] !String !FunctionDoc -> [GeneratedProperty]
generateProperties modname pvis generators fname doc =
[gen i fname doc.preconditions p config
\\ p <- doc.properties
, config <- configurationsForProperty p (pvis ++ docPropertyTestWith doc)
......@@ -402,7 +402,7 @@ where
{ gp_name = tname
, gp_implementation = join "\n"
[ tname +++ " :: Property"
, tname +++ " = name \"" +++ fname +++ ": " +++ name` +++ "\""
, tname +++ " = module_and_name \"" +++ modname +++ "\" \"" +++ fname +++ ": " +++ name` +++ "\""
, "\t(" +++ join " " lambdas +++ join " " [name`` +++ "`":[ga.ga_expr \\ ga <- gas]] +++ {')' \\ _ <- lambdas} +++ ")"
, "where"
, "\t" +++ name`` +++ "` :: " +++ toString type`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment