Giter Club home page Giter Club logo

surface's People

Contributors

robrix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

surface's Issues

The Sigma constructor does not typecheck

I don’t know when this broke exactly, but Sigma no longer typechecks:

λ: runCommand (Surface.Command.Run "src/Prelude.surf")
Cannot unify A -> Type with Type
Execution trace as of 34873fb
(checkDeclaration Prelude.Sigma, { g3, [] })
(isType (A -> (A -> Type) -> Type), { g3, [] })
(isType Type, { g3, [] })
(isType ((A -> Type) -> Type), { g3, [ A :: Type ] })
(isType (A -> Type), { g3, [ A :: Type ] })
(isType A, { g3, [ A :: Type ] })
(isType Type, { g3, [ A :: Type ] })
(isType Type, { g3, [ A :: Type, _ :: A ] })
(isType Type, { g3, [ A :: Type, B :: (A -> Type) ] })
(checkConstructor Prelude.Sigma.sigma, { g3, [] })
(fresh Type, { g3, [ ; ] })
(fresh (A -> Type), { h3, [ ;, g3 := Type ] })
(infer (A -> (B : (A -> Type)) -> (a : A) -> B a -> Sigma A B), { i3, [ ;, g3 := Type, h3 := (A -> Type) ] })
(infer ((B : (A -> Type)) -> (a : A) -> B a -> Sigma A B), { i3, [ ;, g3 := Type, h3 := (A -> Type), A :: Type ] })
(infer ((a : A) -> B a -> Sigma A B), { i3, [ ;, g3 := Type, h3 := (A -> Type), A :: Type, B :: (A -> Type) ] })
(infer (B a -> Sigma A B), { i3, [ ;, g3 := Type, h3 := (A -> Type), A :: Type, B :: (A -> Type), a :: A ] })
(infer (Sigma A B), { i3, [ ;, g3 := Type, h3 := (A -> Type), A :: Type, B :: (A -> Type), a :: A, _ :: B a ] })
(infer B, { i3, [ ;, g3 := Type, h3 := (A -> Type), A :: Type, B :: (A -> Type), a :: A, _ :: B a ] })
(fresh A, { i3, [ ;, g3 := Type, h3 := (A -> Type), A :: Type, B :: (A -> Type), a :: A, _ :: B a ] })
(fresh _, { j3, [ ;, g3 := Type, h3 := (A -> Type), A :: Type, B :: (A -> Type), a :: A, _ :: B a, i3 := A ] })
(check (Sigma A) (Type -> j3), { k3, [ ;, g3 := Type, h3 := (A -> Type), A :: Type, B :: (A -> Type), a :: A, _ :: B a, i3 := A, j3 := _ ] })
(infer (Sigma A), { k3, [ ;, g3 := Type, h3 := (A -> Type), A :: Type, B :: (A -> Type), a :: A, _ :: B a, i3 := A, j3 := _ ] })
(infer A, { k3, [ ;, g3 := Type, h3 := (A -> Type), A :: Type, B :: (A -> Type), a :: A, _ :: B a, i3 := A, j3 := _ ] })
(fresh _, { k3, [ ;, g3 := Type, h3 := (A -> Type), A :: Type, B :: (A -> Type), a :: A, _ :: B a, i3 := A, j3 := _ ] })
(check Sigma (Type -> k3), { l3, [ ;, g3 := Type, h3 := (A -> Type), A :: Type, B :: (A -> Type), a :: A, _ :: B a, i3 := A, j3 := _, k3 := _ ] })
(unify (A -> (A -> Type) -> Type) (Type -> k3), { l3, [ ;, g3 := Type, h3 := (A -> Type), A :: Type, B :: (A -> Type), a :: A, _ :: B a, i3 := A, j3 := _, k3 := _ ] })
(unify Type Type, { l3, [ ;, g3 := Type, h3 := (A -> Type), A :: Type, B :: (A -> Type), a :: A, _ :: B a, i3 := A, j3 := _, k3 := _ ] })
(unify ((A -> Type) -> Type) k3, { l3, [ ;, g3 := Type, h3 := (A -> Type), A :: Type, B :: (A -> Type), a :: A, _ :: B a, i3 := A, j3 := _, k3 := _ ] })
(solve k3 [] ((A -> Type) -> Type), { l3, [ ;, g3 := Type, h3 := (A -> Type), A :: Type, B :: (A -> Type), a :: A, _ :: B a, i3 := A, j3 := _, k3 := _ ] })
(replace [ k3 := ((A -> Type) -> Type) ], { l3, [ ;, g3 := Type, h3 := (A -> Type), A :: Type, B :: (A -> Type), a :: A, _ :: B a, i3 := A, j3 := _ ] })
(unify (Type -> j3) k3, { l3, [ ;, g3 := Type, h3 := (A -> Type), A :: Type, B :: (A -> Type), a :: A, _ :: B a, i3 := A, j3 := _, k3 := ((A -> Type) -> Type) ] })
(solve k3 [] (Type -> j3), { l3, [ ;, g3 := Type, h3 := (A -> Type), A :: Type, B :: (A -> Type), a :: A, _ :: B a, i3 := A, j3 := _, k3 := ((A -> Type) -> Type) ] })
(unify ((A -> Type) -> Type) (Type -> j3), { l3, [ ;, g3 := Type, h3 := (A -> Type), A :: Type, B :: (A -> Type), a :: A, _ :: B a, i3 := A, j3 := _ ] })
(unify (A -> Type) Type, { l3, [ ;, g3 := Type, h3 := (A -> Type), A :: Type, B :: (A -> Type), a :: A, _ :: B a, i3 := A, j3 := _ ] })
([ "Cannot unify A -> Type with Type", "" ], { l3, [ ;, g3 := Type, h3 := (A -> Type), A :: Type, B :: (A -> Type), a :: A, _ :: B a, i3 := A, j3 := _ ] })

There is no comment syntax

Comment syntax like -- … \n and/or {- … -} would be good. Ideally we should also have some sort of annotation syntax for e.g. checked doc comments, but I think we can leave that til later.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.