Disco> 3 ^ (5 : Z7)
Impossible! getType at2 is not num type after checkNumTy
CallStack (from HasCallStack):
error, called at src/Disco/Typecheck.hs:689:12 in disco-0.1.0.0-3EaSG6nlUNwHFiM37sO460:Disco.Typecheck
Off the top of my head I'm not sure whether this should be allowed or a type error; but in any case it shouldn't crash.
It turns out this crashes too:
Disco> 5^(1/2)
Impossible! getType at2 is not num type after checkNumTy
CallStack (from HasCallStack):
error, called at src/Disco/Typecheck.hs:689:12 in disco-0.1.0.0-3EaSG6nlUNwHFiM37sO460:Disco.Typecheck
This should definitely be a type error (because fractional exponents might not result in a rational result), but it shouldn't cause the typechecker to crash.
Off the top of my head I'm not sure whether this should be allowed or a type error; but in any case it shouldn't crash.
It turns out this crashes too:
This should definitely be a type error (because fractional exponents might not result in a rational result), but it shouldn't cause the typechecker to crash.