mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-14 05:46:47 +03:00
[ perf ] only normalise primitives on small strings on the RHS
This commit is contained in:
parent
d7133b2652
commit
1149000fb1
@ -836,12 +836,13 @@ checkApp rig elabinfo nest env fc (IVar fc' n) expargs autoargs namedargs exp
|
||||
|
||||
boundSafe : Constant -> ElabMode -> Bool
|
||||
boundSafe _ (InLHS _) = True -- always need to expand on LHS
|
||||
boundSafe (BI x) _ = abs x < 100 -- only do this for relatively small bounds.
|
||||
-- Once it gets too big, we might be making the term
|
||||
-- bigger than it would have been without evaluating!
|
||||
-- only do this for relatively small bounds.
|
||||
-- Once it gets too big, we might be making the term
|
||||
-- bigger than it would have been without evaluating!
|
||||
boundSafe (BI x) _ = abs x < 100
|
||||
boundSafe (Str str) _ = length str < 10
|
||||
boundSafe _ _ = True
|
||||
|
||||
|
||||
updateElabInfo : List Name -> ElabMode -> Name ->
|
||||
List RawImp -> ElabInfo -> Core ElabInfo
|
||||
-- If it's a primitive function applied to a constant on the LHS, treat it
|
||||
|
Loading…
Reference in New Issue
Block a user