No constant folding done for first arg of qp()
- Dominant language
- Haskell
- Stars
- 24
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
### Expected Behaviour
It should be OK to have the following in a Chronikis program:
qp(24.0 * 7.0, 0.5, 10, rho_w, sigmap_w)
### Actual Behaviour
I get the following error:
chronikisc: toModelBody requires an argument in BasicModel form
CallStack (from HasCallStack):
error, called at src/InferShapesBoundsImpl.hs:205:17 in compiler-0.2.0.0-9V7qdTqRCYd5vzfi3sufpJ:InferShapesBoundsImpl
If I run with the `-x` flag, I find that the call to `qp()` doesn't get expanded.
Contributor guide
Research direction
Start at the error reported in src/InferShapesBoundsImpl.hs:205 and trace how qp() is handled when its first argument is the constant expression 24.0 * 7.0. Use the -x flag to inspect expansion; done means the expression is accepted and the qp() call is expanded without the toModelBody error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100