Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allowing negative literals in the Elm frontend. #1115

Open
nwokafor-choongsaeng opened this issue Nov 27, 2023 · 0 comments
Open

Allowing negative literals in the Elm frontend. #1115

nwokafor-choongsaeng opened this issue Nov 27, 2023 · 0 comments
Labels
task Task level project item

Comments

@nwokafor-choongsaeng
Copy link
Contributor

Describe the bug
The Elm frontend currently interprets negative literals as a function call to the negate function with the literal number as an argument.

{-| 
the line below produces an IR that looks like  
foo = negate 2
-}
foo: Int
foo = -2

To Reproduce
Steps to reproduce the behavior:

  1. Create a Morphir Elm project
  2. in one of the modules, add the example above
  3. run morphir-elm make
  4. run the develop tool and use the X-Ray view to inspect the IR for the function.

Expected behavior
Expects a negative literal to be created.

Additional context
Add any other context about the problem here.

@nwokafor-choongsaeng nwokafor-choongsaeng added the task Task level project item label Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task Task level project item
Projects
None yet
Development

No branches or pull requests

1 participant