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

building generated code should not emit warnings #18

Open
legrostdg opened this issue Feb 6, 2017 · 11 comments
Open

building generated code should not emit warnings #18

legrostdg opened this issue Feb 6, 2017 · 11 comments

Comments

@legrostdg
Copy link

Running pulp build on the code generated by servant-purescript generates a lot of warnings. If possible, we should try to generate clean code.

For example, building central-counter generates 68 warnings:

$ pulp build
* Building project in /tmp/central-counter/frontend
Compiling Global
Compiling Unsafe.Coerce
Compiling Data.Int.Bits
Compiling Data.Show
Compiling Type.Proxy
Compiling Data.ArrayBuffer.Types
Compiling Data.NaturalTransformation
Compiling Data.String.Unsafe
Compiling Control.Semigroupoid
Compiling Data.Boolean
Compiling Math
Compiling Data.Char
Compiling Partial
Compiling DOM.XHR.Types
Compiling Global.Unsafe
Compiling Control.Timer
Compiling DOM
Compiling DOM.File.Types
Compiling Data.Unit
Compiling Data.Void
Compiling Control.Category
Compiling Partial.Unsafe
Compiling DOM.HTML.Event.DragEvent.DataTransfer
Compiling Data.Bifunctor
Compiling Control.Lazy
Compiling Data.Function
Compiling Data.HeytingAlgebra
Compiling Data.Semiring
Compiling Data.Function.Uncurried
Compiling Data.Semigroup
Compiling Data.Eq
Compiling Data.Functor
Compiling Control.Biapply
Compiling Data.Ring
Compiling Data.BooleanAlgebra
Compiling Data.Monoid
Compiling Data.Ordering
Compiling Data.Functor.Invariant
Compiling Control.Extend
Compiling Data.Functor.Contravariant
Compiling Data.CommutativeRing
Compiling Control.Alt
Compiling Control.Apply
Compiling Data.Ord.Unsafe
Compiling Data.Monoid.Endo
Compiling Control.Biapplicative
Compiling Data.EuclideanRing
Compiling Data.Predicate
Compiling Data.Op
Compiling Control.Plus
Compiling Data.Ord
Compiling Control.Comonad
Compiling Data.Bifunctor.Flip
Compiling Data.Bifunctor.Wrap
Compiling Data.Bifunctor.Product
Compiling Data.Field
Compiling Control.Applicative
Compiling Control.Comonad.Trans
Compiling Data.Bifunctor.Clown
Compiling Control.Bind
Compiling Data.Bifunctor.Join
Compiling Control.Alternative
Compiling Data.Bifunctor.Joker
Compiling Data.Bounded
Compiling Data.Comparison
Compiling Control.Monad
Compiling Data.Equivalence
Compiling Data.Monoid.Multiplicative
Compiling Data.Monoid.Additive
Compiling Data.Monoid.Dual
Compiling Control.Monad.Eff
Compiling Data.Monoid.Disj
Compiling Control.MonadZero
Compiling Data.Monoid.Conj
Compiling Prelude
Compiling Control.Monad.Eff.Class
Compiling Data.Function.Eff
Compiling Control.Monad.Eff.Unsafe
Compiling Control.Monad.Eff.Console
Compiling Control.Monad.ST
Compiling Pux.Html.Elements
Compiling Control.MonadPlus
Compiling DOM.HTML.HTMLMediaElement.CanPlayType
Compiling Control.Monad.Trans
Compiling Data.Maybe
Compiling Control.Monad.Cont.Class
Compiling React
Compiling Control.Monad.Reader.Class
Compiling Data.Lens.Internal.Compose
Compiling Data.Profunctor
Compiling DOM.HTML.SelectionMode
Compiling Control.Comonad.Traced.Trans
Compiling Data.Lazy
Compiling Control.Monad.Eff.Ref
Compiling PSCI.Support
Compiling Data.Bifoldable
Compiling React.DOM.Props
Compiling Data.Lens.Internal.Exchange
Compiling Data.Profunctor.Closed
Compiling Data.String
Compiling Data.Maybe.First
Compiling Data.Array.ST
Compiling Data.StrMap.ST
Compiling Data.Int
Compiling Control.Monad.Eff.Ref.Unsafe
Compiling Data.Nullable
Compiling Data.Maybe.Last
Compiling Data.Bitraversable
Compiling DOM.File.FileList
Compiling React.DOM
Compiling Data.Foldable
Compiling Data.Traversable
Compiling Signal
Compiling Signal.Channel
Compiling Signal.Time
Compiling React.DOM.SVG.Dynamic
Compiling React.DOM.SVG
Compiling React.DOM.Dynamic
Compiling Data.NonEmpty
Compiling Data.Identity
Compiling Data.Const
Compiling Data.Tuple
Compiling Data.Either
Compiling Signal.DOM
Compiling Data.Distributive
Compiling Data.Profunctor.Cochoice
Compiling Data.Profunctor.Choice
Compiling Control.Monad.Rec.Class
Compiling Data.Foreign
Compiling Data.String.Regex
Compiling Control.Monad.Error.Class
Compiling Data.Either.Nested
Compiling Control.Monad.Eff.Exception
Compiling Data.Functor.Coproduct
Compiling Control.Monad.Writer.Class
Compiling Data.Functor.Product
Compiling Data.Unfoldable
Compiling DOM.XHR.FormData
Compiling Data.Profunctor.Strong
Compiling Control.Comonad.Store.Trans
Compiling Data.Profunctor.Costrong
Compiling Data.Divide
Compiling Control.Comonad.Traced.Class
Compiling Control.Comonad.Env.Trans
Compiling Data.Lens.Internal.Focusing
Compiling Data.Tuple.Nested
Compiling Control.Monad.State.Class
Compiling Data.Lens.Internal.Market
Compiling Data.Foreign.Undefined
Compiling Data.Foreign.Keys
Compiling Data.Foreign.Index
Compiling Data.Foreign.NullOrUndefined
Compiling Data.Foreign.Null
Compiling Control.Monad.Eff.Exception.Unsafe
Compiling Control.Monad.Aff.Internal
Compiling Data.Enum
Compiling Data.List.Lazy
Compiling Control.Monad.List.Trans
Compiling Data.Array
Compiling Data.Functor.Coproduct.Nested
Compiling Data.Profunctor.Star
Compiling Data.Lens.Internal.Shop
Compiling Data.Profunctor.Costar
Compiling Data.Lens.Internal.Re
Compiling Data.Lens.Internal.Tagged
Compiling Data.Divisible
Compiling Data.Decide
Compiling Control.Comonad.Store.Class
Compiling Control.Comonad.Env.Class
Compiling Control.Comonad.Traced
Compiling Control.Monad.State.Trans
Compiling Control.Monad.Cont.Trans
Compiling Control.Monad.RWS.Class
Compiling Control.Monad.Reader.Trans
Compiling Control.Monad.Writer.Trans
Compiling Data.Lens.Internal.Wander
Compiling Control.Comonad.Env
Compiling Data.Decidable
Compiling Control.Monad.RWS.Trans
Compiling Control.Monad.Except.Trans
Compiling Data.Generic
Compiling Pux.Html
Compiling Control.Comonad.Store
Compiling Control.Monad.Maybe.Trans
Compiling Data.Array.Partial
Compiling Data.Foreign.Class
Compiling Data.List.ZipList
Compiling Control.Monad.State
Compiling Control.Monad.Cont
Compiling Control.Monad.Reader
Compiling DOM.Event.EventPhase
Compiling DOM.HTML.HTMLTrackElement.ReadyState
Compiling DOM.HTML.HTMLMediaElement.NetworkState
Compiling DOM.Node.NodeType
Compiling DOM.HTML.HTMLMediaElement.ReadyState
Compiling Data.Lens.Internal.Indexed
Compiling Data.Lens.Internal.Forget
Compiling Control.Monad.Eff.Var
Compiling Control.Monad.Writer
Compiling Pux.Html.Attributes
Compiling Pux.Html.Events
Compiling Control.Monad.RWS
Compiling DOM.Event.Types
Compiling Control.Monad.Except
Compiling Control.Parallel.Class
Compiling Data.Lens.Types
Compiling Data.Date.Component
Compiling Data.List
Compiling Counter.ServerTypes
Compiling Data.Argonaut.Generic.Util
Compiling Network.HTTP.ResponseHeader
Compiling Data.MediaType
Compiling Data.Time.Component
Compiling Data.Time.Duration
Compiling Data.HTTP.Method
Compiling Network.HTTP.StatusCode
Compiling Servant.Subscriber.Types
Compiling Data.FormURLEncoded
Compiling DOM.HTML.Event.Types
Compiling DOM.HTML.Event.EventTypes
Compiling DOM.CSS.Event.Types
Compiling DOM.Websocket.Event.Types
Compiling DOM.Event.EventTarget
Compiling Data.Lens.Indexed
Compiling DOM.Node.Types
Compiling Data.Lens.Getter
Compiling Data.Lens.Prism
Compiling Data.Lens.Setter
Compiling Data.Lens.Zoom
Compiling Data.Lens.Lens
Compiling Data.Lens.Iso
Compiling Control.Monad.Aff
Compiling Network.HTTP.RequestHeader
Compiling Data.MediaType.Common
Compiling DOM.File.Blob
Compiling Servant.Subscriber.Request
Compiling Data.List.Partial
Compiling Data.Lens.Fold
Compiling Data.StrMap
Compiling Data.Map
Compiling DOM.HTML.Event.ErrorEvent
Compiling Data.Time
Compiling Data.Date
Compiling DOM.Websocket.Event.CloseEvent
Compiling WebSocket
Compiling DOM.HTML.Types
Compiling DOM.Node.NodeList
Compiling DOM.Node.HTMLCollection
Compiling DOM.Node.Element
Compiling DOM.Node.DocumentType
Compiling DOM.Node.NonElementParentNode
Compiling Data.Lens.Traversal
Compiling DOM.Node.ChildNode
Compiling DOM.Node.ParentNode
Compiling DOM.Node.Document
Compiling DOM.Node.Node
Compiling Data.Lens.Prism.Maybe
Compiling DOM.Event.Event
Compiling DOM.Node.NonDocumentTypeChildNode
Compiling Data.Lens.Prism.Either
Compiling Data.Lens.Lens.Tuple
Compiling Data.Lens.Lens.Unit
Compiling Data.Lens.Lens.Void
Compiling Data.Lens.Iso.Coproduct
Compiling Data.Lens.Iso.Product
Compiling DOM.File.File
Compiling Servant.Subscriber.Response
Compiling Data.DateTime
Compiling Data.Argonaut.Core
Compiling Data.StrMap.ST.Unsafe
Compiling Data.StrMap.Unsafe
Compiling Control.Monad.Aff.Unsafe
Compiling Control.Monad.Aff.Console
Compiling Control.Monad.Aff.AVar
Compiling Control.Monad.Aff.Class
Compiling DOM.HTML.HTMLSelectElement
Compiling DOM.HTML.HTMLFieldSetElement
Compiling DOM.HTML.HTMLImageElement
Compiling DOM.HTML.HTMLTimeElement
Compiling DOM.HTML.HTMLEmbedElement
Compiling DOM.HTML.HTMLCanvasElement
Compiling DOM.HTML.HTMLTemplateElement
Compiling DOM.HTML
Compiling DOM.HTML.HTMLTitleElement
Compiling DOM.HTML.HTMLTableSectionElement
Compiling DOM.HTML.HTMLLinkElement
Compiling DOM.HTML.Location
Compiling DOM.HTML.HTMLQuoteElement
Compiling DOM.HTML.Navigator
Compiling DOM.HTML.HTMLOutputElement
Compiling DOM.HTML.HTMLScriptElement
Compiling DOM.HTML.HTMLLegendElement
Compiling DOM.HTML.HTMLModElement
Compiling DOM.HTML.HTMLFormElement
Compiling DOM.HTML.HTMLStyleElement
Compiling DOM.HTML.HTMLMetaElement
Compiling DOM.HTML.HTMLTableRowElement
Compiling DOM.HTML.HTMLAnchorElement
Compiling DOM.HTML.HTMLTableElement
Compiling DOM.HTML.HTMLBaseElement
Compiling DOM.HTML.Window
Compiling DOM.HTML.HTMLOptGroupElement
Compiling DOM.HTML.HTMLMapElement
Compiling DOM.HTML.HTMLLabelElement
Compiling DOM.HTML.HTMLParamElement
Compiling DOM.HTML.Document
Compiling DOM.HTML.HTMLButtonElement
Compiling DOM.HTML.HTMLObjectElement
Compiling DOM.HTML.HTMLKeygenElement
Compiling DOM.HTML.HTMLDataElement
Compiling DOM.HTML.HTMLAreaElement
Compiling DOM.HTML.HTMLIFrameElement
Compiling DOM.HTML.HTMLTableCellElement
Compiling DOM.HTML.HTMLOListElement
Compiling DOM.HTML.HTMLSourceElement
Compiling DOM.HTML.HTMLTableHeaderCellElement
Compiling DOM.HTML.HTMLTrackElement
Compiling DOM.HTML.HTMLTextAreaElement
Compiling DOM.HTML.HTMLVideoElement
Compiling DOM.HTML.HTMLDataListElement
Compiling DOM.HTML.HTMLProgressElement
Compiling DOM.HTML.HTMLLIElement
Compiling DOM.HTML.HTMLOptionElement
Compiling DOM.HTML.HTMLMeterElement
Compiling DOM.HTML.HTMLTableColElement
Compiling Data.Lens.Lens.Product
Compiling Data.Lens.Prism.Coproduct
Compiling Data.Lens.Common
Compiling Data.DateTime.Instant
Compiling Data.DateTime.Locale
Compiling Pux
Compiling Data.Set
Compiling Pux.Router
Compiling Network.HTTP.Affjax.Request
Compiling Network.HTTP.Affjax.Response
Compiling Data.Argonaut.Printer
Compiling Data.Argonaut.Generic.Options
Compiling Data.Argonaut.Parser
Compiling Data.Lens
Compiling Data.JSDate
Compiling Data.Argonaut.Generic.Encode
Compiling Data.Argonaut.Generic.Decode
Compiling Network.HTTP.Affjax
Compiling DOM.HTML.HTMLInputElement
Compiling DOM.HTML.HTMLMediaElement
Compiling Data.Lens.Index
Compiling Data.Argonaut.Generic.Argonaut
Compiling Data.Argonaut.Generic.Aeson
Compiling Data.Lens.At
Compiling Servant.PureScript.Affjax
Compiling Servant.PureScript.Settings
Compiling Servant.PureScript.Util
Compiling Counter.WebAPI
Compiling Servant.Subscriber.Internal
Compiling Servant.Subscriber.Connection
Compiling Servant.Subscriber.Subscriptions
Compiling Servant.Subscriber
Compiling Servant.Subscriber.Util
Compiling Counter.WebAPI.MakeRequests
Compiling Counter.WebAPI.Subscriber
Warning 1 of 68:

  in module Pux.Router
  at /tmp/central-counter/frontend/bower_components/purescript-pux/src/Pux/Router.purs line 31, column 1 - line 31, column 59

    The import of module Data.Maybe contains the following unused references:

      fromMaybe

    It could be replaced with:

      import Data.Maybe (Maybe(Just, Nothing), maybe)



  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedExplicitImport for more information,
  or to contribute content related to this warning.

Warning 2 of 68:

  in module Pux.Router
  at /tmp/central-counter/frontend/bower_components/purescript-pux/src/Pux/Router.purs line 33, column 1 - line 33, column 35

    The import of module Data.Traversable is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 3 of 68:

  in module Pux.Router
  at /tmp/central-counter/frontend/bower_components/purescript-pux/src/Pux/Router.purs line 36, column 1 - line 36, column 141

    The import of module Prelude contains the following unused references:

      otherwise

    It could be replaced with:

      import Prelude (class Applicative, class Apply, class Functor, Unit, map, bind, pure, unit, (<<<), ($), (<*>), (<$>), (==), (<>))



  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedExplicitImport for more information,
  or to contribute content related to this warning.

Warning 4 of 68:

    The following definitions in the foreign module for module Pux are unused:

      fromReact



  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedFFIImplementations for more information,
  or to contribute content related to this warning.

Warning 5 of 68:

  in module Data.Argonaut.Generic.Decode
  at /tmp/central-counter/frontend/bower_components/purescript-argonaut-generic-codecs/src/Data/Argonaut/Generic/Decode.purs line 17, column 1 - line 17, column 106

    The import of module Data.Argonaut.Core contains the following unused references:

      fromArray

    It could be replaced with:

      import Data.Argonaut.Core (Json, toArray, fromObject, toString, toObject, toBoolean, toNumber)



  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedExplicitImport for more information,
  or to contribute content related to this warning.

Warning 6 of 68:

  in module Data.Argonaut.Generic.Decode
  at /tmp/central-counter/frontend/bower_components/purescript-argonaut-generic-codecs/src/Data/Argonaut/Generic/Decode.purs line 98, column 15 - line 101, column 5

    A case expression contains unreachable cases:

    _

  in value declaration sumConf
  in binding group genericUserDecodeJson', genericDecodeProdJson', genericDecodeJson'

  See https://github.com/purescript/purescript/wiki/Error-Code-OverlappingPattern for more information,
  or to contribute content related to this warning.

Warning 7 of 68:

  in module Servant.PureScript.Settings
  at /tmp/central-counter/frontend/bower_components/purescript-servant-support/src/Servant/PureScript/Settings.purs line 11, column 1 - line 11, column 52

    The import of module Data.Argonaut.Generic.Util is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 8 of 68:

  in module Servant.PureScript.Settings
  at /tmp/central-counter/frontend/bower_components/purescript-servant-support/src/Servant/PureScript/Settings.purs line 12, column 1 - line 12, column 25

    The import of module Data.Array is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 9 of 68:

  in module Servant.PureScript.Settings
  at /tmp/central-counter/frontend/bower_components/purescript-servant-support/src/Servant/PureScript/Settings.purs line 14, column 1 - line 14, column 131

    The import of type GenericSpine includes the following unused data constructors:

      SArray
      SChar
      SNumber
      SInt
      SBoolean
      SRecord
      SProd
      SUnit



  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedDctorExplicitImport for more information,
  or to contribute content related to this warning.

Warning 10 of 68:

  in module Servant.PureScript.Settings
  at /tmp/central-counter/frontend/bower_components/purescript-servant-support/src/Servant/PureScript/Settings.purs line 15, column 1 - line 15, column 30

    The import of module Data.String is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 11 of 68:

  in module Servant.PureScript.Affjax
  at /tmp/central-counter/frontend/bower_components/purescript-servant-support/src/Servant/PureScript/Affjax.purs line 17, column 1 - line 17, column 36

    The import of module Data.Generic is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 12 of 68:

  in module Servant.PureScript.Affjax
  at /tmp/central-counter/frontend/bower_components/purescript-servant-support/src/Servant/PureScript/Affjax.purs line 22, column 1 - line 22, column 44

    The import of module Network.HTTP.StatusCode is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 13 of 68:

  in module Servant.PureScript.Util
  at /tmp/central-counter/frontend/bower_components/purescript-servant-support/src/Servant/PureScript/Util.purs line 10, column 1 - line 10, column 56

    The import of module Data.Foreign is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 14 of 68:

  in module Servant.PureScript.Util
  at /tmp/central-counter/frontend/bower_components/purescript-servant-support/src/Servant/PureScript/Util.purs line 12, column 1 - line 12, column 35

    The import of module Global is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 15 of 68:

  in module Servant.PureScript.Util
  at /tmp/central-counter/frontend/bower_components/purescript-servant-support/src/Servant/PureScript/Util.purs line 16, column 1 - line 16, column 128

    The import of module Servant.PureScript.Settings contains the following unused references:

      gDefaultToURLPiece

    It could be replaced with:

      import Servant.PureScript.Settings (SPSettings_(SPSettings_), gDefaultEncodeHeader, gDefaultEncodeURLPiece)



  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedExplicitImport for more information,
  or to contribute content related to this warning.

Warning 16 of 68:

  in module Servant.PureScript.Util
  at /tmp/central-counter/frontend/bower_components/purescript-servant-support/src/Servant/PureScript/Util.purs line 17, column 1 - line 17, column 36

    The import of module Unsafe.Coerce is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 17 of 68:

  in module Servant.PureScript.Util
  at /tmp/central-counter/frontend/bower_components/purescript-servant-support/src/Servant/PureScript/Util.purs line 15, column 79 - line 15, column 146

    Import list contains multiple references to type ErrorDescription


  See https://github.com/purescript/purescript/wiki/Error-Code-DuplicateImportRef for more information,
  or to contribute content related to this warning.

Warning 18 of 68:

  in module Servant.PureScript.Util
  at /tmp/central-counter/frontend/bower_components/purescript-servant-support/src/Servant/PureScript/Util.purs line 41, column 1 - line 41, column 94

    No type declaration was provided for the top-level declaration of encodeQueryItem.
    It is good practice to provide type declarations as a form of documentation.
    The inferred type of encodeQueryItem was:
                                                                                 
      forall t87 t88. (Generic t88) => SPSettings_ t87 -> String -> t88 -> String
                                                                                 

  in value declaration encodeQueryItem

  See https://github.com/purescript/purescript/wiki/Error-Code-MissingTypeDeclaration for more information,
  or to contribute content related to this warning.

Warning 19 of 68:

  in module Servant.PureScript.Util
  at /tmp/central-counter/frontend/bower_components/purescript-servant-support/src/Servant/PureScript/Util.purs line 37, column 1 - line 37, column 103

    No type declaration was provided for the top-level declaration of encodeListQuery.
    It is good practice to provide type declarations as a form of documentation.
    The inferred type of encodeListQuery was:
                                                             
      forall t103 t104 t99.                                  
        ( Foldable t99                                       
        , Functor t99                                        
        , Generic t103                                       
        ) => SPSettings_ t104 -> String -> t99 t103 -> String
                                                             

  in value declaration encodeListQuery

  See https://github.com/purescript/purescript/wiki/Error-Code-MissingTypeDeclaration for more information,
  or to contribute content related to this warning.

Warning 20 of 68:

  in module Counter.WebAPI
  at /tmp/central-counter/frontend/src/Counter/WebAPI.purs line 6, column 1 - line 6, column 57

    The import of module Control.Monad.Aff.Class contains the following unused references:

      liftAff

    It could be replaced with:

      import Control.Monad.Aff.Class (class MonadAff)



  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedExplicitImport for more information,
  or to contribute content related to this warning.

Warning 21 of 68:

  in module Counter.WebAPI
  at /tmp/central-counter/frontend/src/Counter/WebAPI.purs line 13, column 1 - line 13, column 46

    The import of module Data.Nullable contains the following unused references:

      Nullable

    It could be replaced with:

      import Data.Nullable (toNullable)



  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedExplicitImport for more information,
  or to contribute content related to this warning.

Warning 22 of 68:

  in module Counter.WebAPI
  at /tmp/central-counter/frontend/src/Counter/WebAPI.purs line 14, column 1 - line 14, column 35

    The import of module Global is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 23 of 68:

  in module Counter.WebAPI
  at /tmp/central-counter/frontend/src/Counter/WebAPI.purs line 17, column 1 - line 17, column 73

    The import of type AjaxError includes data constructors but only the type is used


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedDctorImport for more information,
  or to contribute content related to this warning.

Warning 24 of 68:

  in module Counter.WebAPI
  at /tmp/central-counter/frontend/src/Counter/WebAPI.purs line 18, column 1 - line 18, column 73

    The import of module Servant.PureScript.Settings contains the following unused references:

      gDefaultToURLPiece

    It could be replaced with:

      import Servant.PureScript.Settings (SPSettings_(SPSettings_))



  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedExplicitImport for more information,
  or to contribute content related to this warning.

Warning 25 of 68:

  in module Counter.WebAPI
  at /tmp/central-counter/frontend/src/Counter/WebAPI.purs line 19, column 1 - line 19, column 107

    The import of module Servant.PureScript.Util contains the following unused references:

      encodeListQuery
      encodeQueryItem
      encodeURLPiece

    It could be replaced with:

      import Servant.PureScript.Util (getResult, encodeHeader)



  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedExplicitImport for more information,
  or to contribute content related to this warning.

Warning 26 of 68:

  in module Servant.Subscriber.Internal
  at /tmp/central-counter/frontend/bower_components/purescript-subscriber/src/Servant/Subscriber/Internal.purs line 16, column 1 - line 16, column 30

    The import of module Control.Monad is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 27 of 68:

  in module Servant.Subscriber.Internal
  at /tmp/central-counter/frontend/bower_components/purescript-subscriber/src/Servant/Subscriber/Internal.purs line 20, column 1 - line 20, column 17

    The import of module DOM is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 28 of 68:

  in module Servant.Subscriber.Internal
  at /tmp/central-counter/frontend/bower_components/purescript-subscriber/src/Servant/Subscriber/Internal.purs line 21, column 1 - line 21, column 53

    The import of module DOM.Event.Types contains the following unused references:

      keyboardEventToEvent

    It could be replaced with:

      import DOM.Event.Types (Event)



  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedExplicitImport for more information,
  or to contribute content related to this warning.

Warning 29 of 68:

  in module Servant.Subscriber.Internal
  at /tmp/central-counter/frontend/bower_components/purescript-subscriber/src/Servant/Subscriber/Internal.purs line 29, column 1 - line 29, column 70

    The import of module Data.Foldable contains the following unused references:

      elem
      intercalate

    It could be replaced with:

      import Data.Foldable (traverse_, foldl, sequence_)



  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedExplicitImport for more information,
  or to contribute content related to this warning.

Warning 30 of 68:

  in module Servant.Subscriber.Internal
  at /tmp/central-counter/frontend/bower_components/purescript-subscriber/src/Servant/Subscriber/Internal.purs line 32, column 1 - line 32, column 58

    The import of module Data.Generic contains the following unused references:

      gEq
      gCompare

    It could be replaced with:

      import Data.Generic (class Generic, gShow)



  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedExplicitImport for more information,
  or to contribute content related to this warning.

Warning 31 of 68:

  in module Servant.Subscriber.Internal
  at /tmp/central-counter/frontend/bower_components/purescript-subscriber/src/Servant/Subscriber/Internal.purs line 39, column 1 - line 39, column 44

    The import of module Data.StrMap contains the following unused references:

      pureST

    It could be replaced with:

      import Data.StrMap (StrMap, thawST)



  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedExplicitImport for more information,
  or to contribute content related to this warning.

Warning 32 of 68:

  in module Servant.Subscriber.Internal
  at /tmp/central-counter/frontend/bower_components/purescript-subscriber/src/Servant/Subscriber/Internal.purs line 48, column 1 - line 48, column 79

    The import of module WebSocket contains the following unused references:

      ReadyState

    It could be replaced with:

      import WebSocket (WEBSOCKET, Message(Message), newWebSocket)



  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedExplicitImport for more information,
  or to contribute content related to this warning.

Warning 33 of 68:

  in module Servant.Subscriber.Internal
  at /tmp/central-counter/frontend/bower_components/purescript-subscriber/src/Servant/Subscriber/Internal.purs line 6, column 1 - line 6, column 30

    Module Control.Monad.ST was imported as ST with unspecified imports.
    As there are multiple modules being imported as ST, consider using the explicit form:

      import Control.Monad.ST (ST, pureST) as ST



  See https://github.com/purescript/purescript/wiki/Error-Code-ImplicitQualifiedImport for more information,
  or to contribute content related to this warning.

Warning 34 of 68:

  in module Servant.Subscriber.Internal
  at /tmp/central-counter/frontend/bower_components/purescript-subscriber/src/Servant/Subscriber/Internal.purs line 12, column 1 - line 12, column 35

    Module Data.StrMap.ST.Unsafe was imported as ST with unspecified imports.
    As there are multiple modules being imported as ST, consider using the explicit form:

      import Data.StrMap.ST.Unsafe (unsafeGet) as ST



  See https://github.com/purescript/purescript/wiki/Error-Code-ImplicitQualifiedImport for more information,
  or to contribute content related to this warning.

Warning 35 of 68:

  in module Servant.Subscriber.Internal
  at /tmp/central-counter/frontend/bower_components/purescript-subscriber/src/Servant/Subscriber/Internal.purs line 286, column 1 - line 286, column 41

    No type declaration was provided for the top-level declaration of runHttpRequest.
    It is good practice to provide type declarations as a form of documentation.
    The inferred type of runHttpRequest was:
                                                           
      HttpRequest                                          
      -> { httpMethod :: String                            
         , httpPath :: Path                                
         , httpHeaders :: Array (Tuple String String)      
         , httpQuery :: Array (Tuple String (Maybe String))
         , httpBody :: String                              
         }                                                 
                                                           

  in value declaration runHttpRequest

  See https://github.com/purescript/purescript/wiki/Error-Code-MissingTypeDeclaration for more information,
  or to contribute content related to this warning.

Warning 36 of 68:

  in module Counter.WebAPI.MakeRequests
  at /tmp/central-counter/frontend/src/Counter/WebAPI/MakeRequests.purs line 6, column 1 - line 6, column 57

    The import of module Control.Monad.Aff.Class is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 37 of 68:

  in module Counter.WebAPI.MakeRequests
  at /tmp/central-counter/frontend/src/Counter/WebAPI/MakeRequests.purs line 7, column 1 - line 7, column 52

    The import of module Control.Monad.Error.Class is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 38 of 68:

  in module Counter.WebAPI.MakeRequests
  at /tmp/central-counter/frontend/src/Counter/WebAPI/MakeRequests.purs line 9, column 1 - line 9, column 54

    The import of module Counter.ServerTypes contains the following unused references:

      AuthToken

    It could be replaced with:

      import Counter.ServerTypes (CounterAction)



  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedExplicitImport for more information,
  or to contribute content related to this warning.

Warning 39 of 68:

  in module Counter.WebAPI.MakeRequests
  at /tmp/central-counter/frontend/src/Counter/WebAPI/MakeRequests.purs line 11, column 1 - line 11, column 60

    The import of module Data.Argonaut.Generic.Aeson contains the following unused references:

      decodeJson

    It could be replaced with:

      import Data.Argonaut.Generic.Aeson (encodeJson)



  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedExplicitImport for more information,
  or to contribute content related to this warning.

Warning 40 of 68:

  in module Counter.WebAPI.MakeRequests
  at /tmp/central-counter/frontend/src/Counter/WebAPI/MakeRequests.purs line 13, column 1 - line 13, column 30

    The import of module Data.Maybe is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 41 of 68:

  in module Counter.WebAPI.MakeRequests
  at /tmp/central-counter/frontend/src/Counter/WebAPI/MakeRequests.purs line 14, column 1 - line 14, column 46

    The import of module Data.Nullable is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 42 of 68:

  in module Counter.WebAPI.MakeRequests
  at /tmp/central-counter/frontend/src/Counter/WebAPI/MakeRequests.purs line 16, column 1 - line 16, column 35

    The import of module Global is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 43 of 68:

  in module Counter.WebAPI.MakeRequests
  at /tmp/central-counter/frontend/src/Counter/WebAPI/MakeRequests.purs line 17, column 1 - line 17, column 34

    The import of module Network.HTTP.Affjax is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 44 of 68:

  in module Counter.WebAPI.MakeRequests
  at /tmp/central-counter/frontend/src/Counter/WebAPI/MakeRequests.purs line 19, column 1 - line 19, column 73

    The import of module Servant.PureScript.Affjax is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 45 of 68:

  in module Counter.WebAPI.MakeRequests
  at /tmp/central-counter/frontend/src/Counter/WebAPI/MakeRequests.purs line 21, column 1 - line 21, column 107

    The import of module Servant.PureScript.Util is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 46 of 68:

  in module Counter.WebAPI.MakeRequests
  at /tmp/central-counter/frontend/src/Counter/WebAPI/MakeRequests.purs line 22, column 1 - line 22, column 39

    The import of module Servant.Subscriber is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 47 of 68:

  in module Counter.WebAPI.MakeRequests
  at /tmp/central-counter/frontend/src/Counter/WebAPI/MakeRequests.purs line 24, column 1 - line 24, column 75

    The import of module Servant.Subscriber.Subscriptions is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 48 of 68:

  in module Counter.WebAPI.MakeRequests
  at /tmp/central-counter/frontend/src/Counter/WebAPI/MakeRequests.purs line 26, column 1 - line 26, column 110

    The import of module Servant.Subscriber.Util is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 49 of 68:

  in module Counter.WebAPI.Subscriber
  at /tmp/central-counter/frontend/src/Counter/WebAPI/Subscriber.purs line 6, column 1 - line 6, column 57

    The import of module Control.Monad.Aff.Class is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 50 of 68:

  in module Counter.WebAPI.Subscriber
  at /tmp/central-counter/frontend/src/Counter/WebAPI/Subscriber.purs line 7, column 1 - line 7, column 52

    The import of module Control.Monad.Error.Class is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 51 of 68:

  in module Counter.WebAPI.Subscriber
  at /tmp/central-counter/frontend/src/Counter/WebAPI/Subscriber.purs line 8, column 1 - line 8, column 59

    The import of module Control.Monad.Reader.Class contains the following unused references:

      ask

    It could be replaced with:

      import Control.Monad.Reader.Class (class MonadReader)



  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedExplicitImport for more information,
  or to contribute content related to this warning.

Warning 52 of 68:

  in module Counter.WebAPI.Subscriber
  at /tmp/central-counter/frontend/src/Counter/WebAPI/Subscriber.purs line 9, column 1 - line 9, column 39

    The import of module Counter.ServerTypes is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 53 of 68:

  in module Counter.WebAPI.Subscriber
  at /tmp/central-counter/frontend/src/Counter/WebAPI/Subscriber.purs line 10, column 1 - line 10, column 38

    The import of type SPParams_ includes data constructors but only the type is used


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedDctorImport for more information,
  or to contribute content related to this warning.

Warning 54 of 68:

  in module Counter.WebAPI.Subscriber
  at /tmp/central-counter/frontend/src/Counter/WebAPI/Subscriber.purs line 11, column 1 - line 11, column 60

    The import of module Data.Argonaut.Generic.Aeson is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 55 of 68:

  in module Counter.WebAPI.Subscriber
  at /tmp/central-counter/frontend/src/Counter/WebAPI/Subscriber.purs line 12, column 1 - line 12, column 41

    The import of module Data.Argonaut.Printer is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 56 of 68:

  in module Counter.WebAPI.Subscriber
  at /tmp/central-counter/frontend/src/Counter/WebAPI/Subscriber.purs line 13, column 1 - line 13, column 30

    The import of module Data.Maybe is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 57 of 68:

  in module Counter.WebAPI.Subscriber
  at /tmp/central-counter/frontend/src/Counter/WebAPI/Subscriber.purs line 14, column 1 - line 14, column 46

    The import of module Data.Nullable is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 58 of 68:

  in module Counter.WebAPI.Subscriber
  at /tmp/central-counter/frontend/src/Counter/WebAPI/Subscriber.purs line 15, column 1 - line 15, column 30

    The import of module Data.Tuple is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 59 of 68:

  in module Counter.WebAPI.Subscriber
  at /tmp/central-counter/frontend/src/Counter/WebAPI/Subscriber.purs line 16, column 1 - line 16, column 35

    The import of module Global is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 60 of 68:

  in module Counter.WebAPI.Subscriber
  at /tmp/central-counter/frontend/src/Counter/WebAPI/Subscriber.purs line 17, column 1 - line 17, column 34

    The import of module Network.HTTP.Affjax is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 61 of 68:

  in module Counter.WebAPI.Subscriber
  at /tmp/central-counter/frontend/src/Counter/WebAPI/Subscriber.purs line 19, column 1 - line 19, column 73

    The import of module Servant.PureScript.Affjax is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 62 of 68:

  in module Counter.WebAPI.Subscriber
  at /tmp/central-counter/frontend/src/Counter/WebAPI/Subscriber.purs line 20, column 1 - line 20, column 73

    The import of module Servant.PureScript.Settings contains the following unused references:

      gDefaultToURLPiece

    It could be replaced with:

      import Servant.PureScript.Settings (SPSettings_)



  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedExplicitImport for more information,
  or to contribute content related to this warning.

Warning 63 of 68:

  in module Counter.WebAPI.Subscriber
  at /tmp/central-counter/frontend/src/Counter/WebAPI/Subscriber.purs line 20, column 1 - line 20, column 73

    The import of type SPSettings_ includes data constructors but only the type is used


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedDctorImport for more information,
  or to contribute content related to this warning.

Warning 64 of 68:

  in module Counter.WebAPI.Subscriber
  at /tmp/central-counter/frontend/src/Counter/WebAPI/Subscriber.purs line 21, column 1 - line 21, column 107

    The import of module Servant.PureScript.Util is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 65 of 68:

  in module Counter.WebAPI.Subscriber
  at /tmp/central-counter/frontend/src/Counter/WebAPI/Subscriber.purs line 22, column 1 - line 22, column 39

    The import of module Servant.Subscriber is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 66 of 68:

  in module Counter.WebAPI.Subscriber
  at /tmp/central-counter/frontend/src/Counter/WebAPI/Subscriber.purs line 23, column 1 - line 23, column 52

    The import of module Servant.Subscriber.Request is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 67 of 68:

  in module Counter.WebAPI.Subscriber
  at /tmp/central-counter/frontend/src/Counter/WebAPI/Subscriber.purs line 25, column 1 - line 25, column 43

    The import of module Servant.Subscriber.Types is redundant


  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedImport for more information,
  or to contribute content related to this warning.

Warning 68 of 68:

  in module Counter.WebAPI.Subscriber
  at /tmp/central-counter/frontend/src/Counter/WebAPI/Subscriber.purs line 26, column 1 - line 26, column 110

    The import of module Servant.Subscriber.Util contains the following unused references:

      subGenFlagQuery
      subGenListQuery
      subGenNormalQuery

    It could be replaced with:

      import Servant.Subscriber.Util (TypedToUser, toUserType)



  See https://github.com/purescript/purescript/wiki/Error-Code-UnusedExplicitImport for more information,
  or to contribute content related to this warning.


* Build successful.
@andremarianiello
Copy link

I had trouble getting that example to build at all. What did you have to do anything beyond the steps listed in the README for the example?

@andremarianiello
Copy link

In addition to the warnings, I get errors:

Error 1 of 3:

  in module Control.Monad.Aff.Console
  at /home/user/servant-purescript/examples/central-counter/frontend/bower_components/purescript-aff/src/Control/Monad/Aff/Console.purs line 36, column 1 - line 36, column 34

    No type class instance was found for

      Control.Monad.Eff.Class.MonadEff ( "console" :: CONSOLE
                                       | t0
                                       )
                                       (Aff
                                          ( "console" :: CONSOLE
                                          | eff1
                                          )
                                       )

    The instance head contains unknown type variables. Consider adding a type annotation.

  while checking that expression (compose liftEff) warnShow
    has type forall a eff.
               (Show a) => a
                           -> Aff
                                ( "console" :: CONSOLE
                                | eff
                                )
                                Unit
  while applying a function compose
    of type forall b c d a. (Semigroupoid a) => a c d -> a b c -> a b d
    to argument liftEff
  in value declaration warnShow

  where eff1 is a rigid type variable
          bound at line 36, column 1 - line 36, column 34
        t0 is an unknown type

  See https://github.com/purescript/documentation/blob/master/errors/NoInstanceFound.md for more information,
  or to contribute content related to this error.
Error 2 of 3:                                                                                                                                                                                            [119/1930]

  in module Network.HTTP.Affjax
  at /home/user/servant-purescript/examples/central-counter/frontend/bower_components/purescript-affjax/src/Network/HTTP/Affjax.purs line 190, column 1 - line 231, column 32

    No type class instance was found for

      Control.Monad.Eff.Class.MonadEff ( "ref" :: REF
                                       | t3
                                       )
                                       (Aff
                                          ( "ajax" :: AJAX
                                          , "avar" :: AVAR
                                          , "ref" :: REF
                                          | e4
                                          )
                                       )

    The instance head contains unknown type variables. Consider adding a type annotation.

  while checking that expression \policy ->
                                   \run ->
                                     \req ->
                                       let
                                         ...
                                         ...
                                       in ...
    has type forall e a b.
               (Requestable a) => { "timeout" :: Maybe Int
                                  , "delayCurve" :: Int -> Int
                                  , "shouldRetryWithStatusCode" :: StatusCode -> Boolean
                                  }
                                  -> ({ "method" :: Either Method CustomMethod
                                      , "url" :: String
                                      , "headers" :: Array RequestHeader
                                      , "content" :: Maybe a
                                      , "username" :: Maybe String
                                      , "password" :: Maybe String
                                      , "withCredentials" :: Boolean
                                      }
                                      -> Aff
                                           ( "ajax" :: AJAX
                                           , "avar" :: AVAR
                                           , "ref" :: REF
                                           | e
                                           )
                                           { "status" :: StatusCode
                                           , "headers" :: Array ResponseHeader
                                           , "response" :: b
                                           }                                                                                                                                                              [70/1930]
                                     )
                                     -> { "method" :: Either Method CustomMethod
                                        , "url" :: String
                                        , "headers" :: Array RequestHeader
                                        , "content" :: Maybe a
                                        , "username" :: Maybe String
                                        , "password" :: Maybe String
                                        , "withCredentials" :: Boolean
                                        }
                                        -> Aff
                                             ( "ajax" :: AJAX
                                             , "avar" :: AVAR
                                             , "ref" :: REF
                                             | e
                                             )
                                             { "status" :: StatusCode
                                             , "headers" :: Array ResponseHeader
                                             , "response" :: b
                                             }
  while applying a function (bind (#dict Bind t28)) (((map (...)) retryState) (attempt (run req)))
    of type (t0 -> t1 t2) -> t1 t2
    to argument \$1 ->
                  case $1 of
                    result -> case result of
                                ...
                                ...
  in value declaration retry

  where e4 is a rigid type variable
          bound at line 190, column 1 - line 231, column 32
        t1 is an unknown type
        t2 is an unknown type
        t0 is an unknown type
        t3 is an unknown type

  See https://github.com/purescript/documentation/blob/master/errors/NoInstanceFound.md for more information,
  or to contribute content related to this error.

Error 3 of 3:

  in module Pux
  at /home/user/servant-purescript/examples/central-counter/frontend/bower_components/purescript-pux/src/Pux.purs line 50, column 1 - line 69, column 28

    No type class instance was found for

      Control.Monad.Eff.Class.MonadEff ( "channel" :: CHANNEL
                                       | t3
                                       )
                                       (Aff                                                                                                                                                               [21/1930]
                                          ( "channel" :: CHANNEL
                                          , "err" :: EXCEPTION
                                          | eff4
                                          )
                                       )

    The instance head contains unknown type variables. Consider adding a type annotation.

  while checking that expression \config ->
                                   let
                                     bind = bind
                                   in (bind (...)) (\$3 ->
                                                      ...
                                                   )
    has type forall state action eff.
               { "update" :: action
                             -> state
                                -> { "state" :: state
                                   , "effects" :: Array
                                                    (Aff
                                                       ( "channel" :: CHANNEL
                                                       , "err" :: EXCEPTION
                                                       | eff
                                                       )
                                                       action
                                                    )
                                   }
               , "view" :: state -> Html action
               , "initialState" :: state
               , "inputs" :: Array (Signal action)
               }
               -> Eff
                    ( "channel" :: CHANNEL
                    , "err" :: EXCEPTION
                    | eff
                    )
                    { "html" :: Signal (Html action)
                    , "state" :: Signal state
                    }
  while applying a function (bind (#dict Bind t1)) (channel Nil)
    of type (t0 -> t1 t2) -> t1 t2
    to argument \$3 ->
                  case $3 of
                    actionChannel -> let
                                       ...
                                       ...
                                       ...
                                       ...
                                       ...
                                       ...
                                       ...
                                     in ...
  in value declaration start

  where eff4 is a rigid type variable
          bound at line 50, column 1 - line 69, column 28
        t1 is an unknown type
        t2 is an unknown type
        t0 is an unknown type
        t3 is an unknown type

  See https://github.com/purescript/documentation/blob/master/errors/NoInstanceFound.md for more information,
  or to contribute content related to this error.


* ERROR: Subcommand terminated with exit code 1

@eskimor
Copy link
Owner

eskimor commented Feb 7, 2017

What purescript version are you using, currently only 0.9 is supported.

@andremarianiello
Copy link

Ah, I am just starting with purescript, so I was using the latest version, 0.10.5. I will try again with 0.9. Is 0.10 support expected in the future?

@eskimor
Copy link
Owner

eskimor commented Feb 7, 2017

It is, but I am pretty busy at the moment. There are some kind fellows working on it, but they hit a problem with a dependency not yet building with the new compiler:
zudov/purescript-strongcheck-generics#5

@andremarianiello
Copy link

Which specific 0.9.* version of psc should I be using?

@eskimor
Copy link
Owner

eskimor commented Feb 8, 2017

This should not matter. Use the latest. Or wait a bit, I believe psc-0.10 support is coming real soon. People already submitted PRs for some libraries of my libraries, I am currently making releases ready for 0.10 all the time.

@andremarianiello
Copy link

Version 0.9.3 does not work due to functional dependencies, so I guess I will wait until 0.10 support is available.

@eskimor
Copy link
Owner

eskimor commented Feb 12, 2017

It should work already, you just have to bump dependency versions.

@legrostdg
Copy link
Author

The number of warnings have been reduced, but there still is a few left:

* Building project in /home/user/src/test-project/test-project-client-web/frontend
Compiling Data.Argonaut.Generic.Util
Compiling Data.Argonaut.Generic.Options
Compiling Data.Argonaut.Generic.Encode
Compiling Data.Argonaut.Generic.Decode
Compiling Servant.PureScript.Affjax
Compiling test-project.Model.Identificator
Compiling test-project.Model
Compiling Data.Argonaut.Generic.Argonaut
Compiling Data.Argonaut.Generic.Aeson
Compiling Servant.PureScript.Settings
Compiling Servant.PureScript.Util
Compiling ServerAPI
Compiling Main
Warning 1 of 5:

  in module test-project.Model.Identificator
  at src/test-project/Model/Identificator.purs line 4, column 1 - line 4, column 47

    The import of module Data.Lens contains the following unused references:

      Lens'
      lens

    It could be replaced with:

      import Data.Lens (Prism', prism')



  See https://github.com/purescript/documentation/blob/master/errors/UnusedExplicitImport.md for more information,
  or to contribute content related to this warning.

Warning 2 of 5:

  in module test-project.Model
  at src/test-project/Model.purs line 6, column 27 - line 6, column 36

    Import list contains multiple references to type Maybe


  See https://github.com/purescript/documentation/blob/master/errors/DuplicateImportRef.md for more information,
  or to contribute content related to this warning.

Warning 3 of 5:

  in module ServerAPI
  at src/ServerAPI.purs line 18, column 1 - line 18, column 73

    The import of module Servant.PureScript.Settings contains the following unused references:

      gDefaultToURLPiece

    It could be replaced with:

      import Servant.PureScript.Settings (SPSettings_(SPSettings_))



  See https://github.com/purescript/documentation/blob/master/errors/UnusedExplicitImport.md for more information,
  or to contribute content related to this warning.

Warning 4 of 5:

  in module ServerAPI
  at src/ServerAPI.purs line 19, column 1 - line 19, column 107

    The import of module Servant.PureScript.Util contains the following unused references:

      encodeHeader
      encodeListQuery

    It could be replaced with:

      import Servant.PureScript.Util (encodeQueryItem, encodeURLPiece, getResult)



  See https://github.com/purescript/documentation/blob/master/errors/UnusedExplicitImport.md for more information,
  or to contribute content related to this warning.

Warning 5 of 5:

  in module ServerAPI
  at src/ServerAPI.purs line 4, column 1 - line 4, column 15

    There is an existing import of Prelude, consider merging the import lists


  See https://github.com/purescript/documentation/blob/master/errors/DuplicateSelectiveImport.md for more information,
  or to contribute content related to this warning.


* Build successful.

Of these, 1 & 2 are generated by purescript-bridge, and 3, 4, 5 by servant-purescript

@safareli
Copy link

I have fixed similar issue in this project (link to pr)

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

No branches or pull requests

4 participants