on master help sign in
Don't normalize terms before executing when elaborating type providers

Normalized terms can lose information about sequencing of IO, and they can be infinite.

commit443b1735c5b03ccbdc2c98847d3d374a15ae9c7e authorDavid Christiansen <david@davidchristiansen.dk> dateWed 24 Apr 2013, 12:05 (14 years ago) parent3d38d42
1 file changed+3−3
src/Idris/ElabDecls.hs+3−3
src/Idris/ElabDecls.hs+3−3
@@ -223,11 +223,11 @@ elabProvider info syn fc n ty tm
223223 " as " ++ show using
224224 (e', et) <- elabVal toplevel False using
225225 ctxt <- getContext
226− let e'' = normaliseAll ctxt [] e'
227− logLvl 1 $ "Term is " ++ show e''
226+ let str = show e' in
227+ logLvl 1 $ "Term is " ++ if length str > 200 then (take 200 str) ++ "..." else str
228228 let et' = normaliseAll ctxt [] et
229229 elabType info syn "" fc [] n ty
230− rhs <- execute e''
230+ rhs <- execute e'
231231 logLvl 1 $ "Normalized " ++ show n ++ "'s RHS to " ++ show rhs
232232 providerError rhs
233233 elabClauses info fc [] n [PClause fc n (PRef fc $ n) [] (delab i rhs) []]