| 304 | | cls <- asks envClasses |
| 305 | | typ <- evalValType val |
| 306 | | if lv then return val else do |
| 307 | | case val of |
| 308 | | VRef ref | refType ref == mkType "Scalar::Const" -> do |
| 309 | | evalVal =<< readRef ref |
| 310 | | VRef ref | isaType cls "Junction" typ -> do |
| 311 | | evalVal =<< readRef ref |
| 312 | | _ -> do |
| 313 | | return val |
| | 304 | if lv |
| | 305 | then return val |
| | 306 | else if refType ref == mkType "Scalar::Const" |
| | 307 | then evalVal =<< readRef ref |
| | 308 | else do |
| | 309 | cls <- asks envClasses |
| | 310 | typ <- evalValType val |
| | 311 | if isaType cls "Junction" typ |
| | 312 | then evalVal =<< readRef ref |
| | 313 | else return val |
| | 314 | evalVal val = return val |