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

internal error: Core.Parc.getDataDefInfo: cannot find type: std/time/timestamp/timespan #500

Open
Caid11 opened this issue Apr 19, 2024 · 3 comments
Labels

Comments

@Caid11
Copy link

Caid11 commented Apr 19, 2024

I see this error when I try to compile my code:

parse   : .../bb.kk
check   : bb
bb(1, 1): internal error: Core.Parc.getDataDefInfo: cannot find type: std/time/timestamp/timespan
CallStack (from HasCallStack):
  error, called at src\Common\Failure.hs:46:12 in koka-3.1.1-4KWDIhobz6XJ1Dhpw9I5uN:Common.Failure
  raise, called at src\Common\Failure.hs:32:5 in koka-3.1.1-4KWDIhobz6XJ1Dhpw9I5uN:Common.Failure
  failure, called at src\Backend\C\Parc.hs:988:34 in koka-3.1.1-4KWDIhobz6XJ1Dhpw9I5uN:Backend.C.Parc

Failed to compile bb.kk

Some notes:

  • I'm using Koka v3.1.1 on Windows
  • My C compiler is MSVC 19.34.31937
  • The build succeeds if I pass --rebuild
  • Even when the build succeeds, re-running the build command produces the error.

The failing code is here: https://github.com/Caid11/Functional-Program-Studio/tree/internal-error-cannot-find-type/blockbuilder

It only compiles on Windows and is a large reproducer, but I'm not sure how to meaningfully reduce it (suggestions are welcome).

@daanx
Copy link
Member

daanx commented Apr 19, 2024

Ah, I know about this bug but haven't been able to find the culprit yet. You can work around it by importing std/time/timestamp explicitly I think.

@Caid11
Copy link
Author

Caid11 commented Apr 19, 2024

I tried importing timestamp, but I still see the error, unfortunately.

I also opened #501 on a very similar and possibly related issue, although it produces a different error message.

@TimWhiting
Copy link
Collaborator

TimWhiting commented Apr 19, 2024

This is what I've had to import for a similar error before: (using now()).

import std/time
import std/num/ddouble
import std/time/instant
import std/time/chrono
import std/time/duration

I'm not sure if all of those are actually necessary.

@TimWhiting TimWhiting added the bug label May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants