Error(bs-pixi with rescript 9.1.2): The type variable 'a occurs inside 'a


When I run rescript build -w -with-deps I get the following error.
rescript version : 9.1.2
bs-pixi version : 0.1.14 github link

rescript: [3/17] src/BaseTexture-PIXI.cmj
FAILED: src/BaseTexture-PIXI.cmj

  We've found a bug for you!

  289 ┆ */
  290 ┆ let getDrawableSource: Js.t(#C1.baseTexture) => ICanvasImageSource.t =
      ┆  baseTexture => {
  291 ┆   let drawableSource = baseTexture |. _getDrawableSource;
  292 ┆ 
  293 ┆   module Internal {

  This has type: Js.t(#PIXI.C1.baseTexture)
  Somewhere wanted: Js.t(#PIXI.C1.baseTexture)
  The type variable 'a occurs inside 'a

FAILED: cannot make progress due to previous errors.
Failure: /Users/acsreedharreddy/***/***/node_modules/rescript/darwin/ninja.exe 
Location: /Users/acsreedharreddy/***/***/node_modules/bs-pixi/lib/bs

What does The type variable 'a occurs inside 'a mean?


Hi, I’m sorry, maybe I don’t understand what do you do, but what is |.? I suppose that you want use pipe operator, I never seen this syntax. Could you show me where it described in doc?

Hi this is from reasonml. I am also not completely sure of this syntax. I think this is similar to pipe first.

1 Like

this used to come from some occurence checks, the error message is super weird, can you provide a small reproducible one

Hi @Hongbo Here is the repo :

yarn start

Throws the above error.

Hi @Hongbo Would it be better if I open an issue in github related to this?

Yes. It would be nice if you can narrow down a bit