GithubHelp home page GithubHelp logo

Comments (4)

gdziadkiewicz avatar gdziadkiewicz commented on June 8, 2024 1

I wonder if compile error for '<keyword> or ^<keyword> type parameters is expected in F# or if it's a bug in the compiler. I will try to check the specs.

If it's expected then your change solves the problem and if not then we can use it as a workaround for the compiler bug.

from fslexyacc.

gdziadkiewicz avatar gdziadkiewicz commented on June 8, 2024

According to the syntax specs in https://fsharp.org/specs/language-spec/4.1/FSharpSpec-4.1-latest.pdf it works as expected.

from fslexyacc.

thautwarm avatar thautwarm commented on June 8, 2024

According to the specification(search type variable in the pdf):

type :=
 ( type )
 type -> type -- function type
 type * ... * type -- tuple type
 typar
 ...


typar :=
 _ -- anonymous variable type
 'ident -- type variable
 ^ident -- static head-type type variable

ident-keyword and ident seem to be distingushable according the specification, so I'd think 'type is not a bug, i.e., my PR solves the problem.

However, 'ident can still be unexpected to the compiler team because I don't see a reason to reject type variables like 'type.

from fslexyacc.

thautwarm avatar thautwarm commented on June 8, 2024

appreciate for your fast check.

from fslexyacc.

Related Issues (20)

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.