idris-lang / Idris2

A purely functional programming language with first class types
https://idris-lang.org/
Other
2.49k stars 373 forks source link

Import Cycle wrong error message #1970

Closed redfish64 closed 2 years ago

redfish64 commented 2 years ago

icb.ipkg: https://gist.github.com/redfish64/9f362ece6264cecaf13f4cfea7b79522

package icb

modules = B
main = B
executable = b

A.idr: https://gist.github.com/redfish64/9fad8f29144f97303a8efc1d00d32cd1

module A

import A

B.idr: https://gist.github.com/redfish64/ead1ccd81c00e3675f3c1522586e2d21

module B

import A

Steps to Reproduce

idris2 --build

Expected Behavior

Uncaught error: Module imports form a cycle: A -> A

Observed Behavior

Uncaught error: Module imports form a cycle: A -> B -> A
alissa-tung commented 2 years ago

Hi @redfish64, would you like to take a look at the test result of 8623d96 to see if it works as expected?

redfish64 commented 2 years ago

Yes, that looks right to me. Thanks