Troubleshooting

Common issues:

  • translated generates an error:

      Couldn't match expected type ‘Double’ with actual type ‘Int’
      In the first argument of ‘translated’, namely ‘x’
    

    The translated function needs decimals (Double) for inputs. Solution: use (fromIntegral x) to treat the int as a decimal.

  • Need to convert an Int to a Double: use fromIntegral.

  • Error about No instance for (Integral Double): you rounded a double and now you have an integer. Put in fromIntegral to allow the integer to change back to a Double.

Last modified August 18, 2023: 2022-2023 End State (7352e87)