Skip to content

Error in example #56

@brodeuralexis

Description

@brodeuralexis

I'm having trouble compiling the example.

The following snippet:

postEdit :: Match MyRoute
postEdit =
  PostEdit <$> lit "posts" *> int <* lit "edit"

Gives me this error message

Compiling Routes
Error found:
in module Routes
at src/Routes.purs line 63, column 3 - line 65, column 1

  Could not match type
        
    Unit
        
  with type
       
    Int
       

while trying to match type t1 Unit
  with type t0 Int
while checking that expression lit "posts"
  has type t0 Int
in value declaration postEdit

where t0 is an unknown type
      t1 is an unknown type

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


* ERROR: Subcommand terminated with exit code 1

Here is my environment:

Pulp version 11.0.2
purs version 0.11.6 using /Users/brodeuralexis/.nvm/versions/node/v8.4.0/bin/purs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions