Skip to content

Instantly share code, notes, and snippets.

@jbrownson
Created October 15, 2015 12:43
Show Gist options
  • Select an option

  • Save jbrownson/fa4d84f64b171bf42e4b to your computer and use it in GitHub Desktop.

Select an option

Save jbrownson/fa4d84f64b171bf42e4b to your computer and use it in GitHub Desktop.
infinite type error using purescript-react
module Main where
import Prelude (($), unit, bind, pure)
import React (createClass, spec, getProps)
import qualified React.DOM as D
import qualified React.DOM.Props as P
f = createClass $ spec unit \this -> do
x <- getProps this
y <- x 42
pure $ D.div' []
@jbrownson
Copy link
Author

error:

* Building project in /Users/jake/Downloads/infinite-type
psc: No files found using pattern: src/**/*.js
Error found:
Error in module Main:
Error in value declaration f:
Error checking that type
  _0 _1
subsumes type
  Control.Monad.Eff.Eff (props :: React.ReactProps (Prim.Int -> _0 _2) | _3) _4
Error at /Users/jake/Downloads/infinite-type/src/Main.purs line 8, column 38 - line 11, column 18:
  Infinite type detected:
    Control.Monad.Eff.Eff (props :: React.ReactProps (Prim.Int -> _0 _2) | _3)
See https://github.com/purescript/purescript/wiki/Error-Code-InfiniteType for more information, or to contribute content related to this error.

Compiling Main
* ERROR: Subcommand terminated with error code 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment