Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • C curry-base
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 10
    • Issues 10
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • curry
  • curry-base
  • Merge requests
  • !9

Add support for higher-rank polymorphism

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Jan-Hendrik Matthes requested to merge higher-rank-polymorphism into master Apr 12, 2019
  • Overview 2
  • Commits 15
  • Changes 9

This merge request adds support for higher-rank polymorphism to the parser. Furthermore a new language extension RankNTypes is introduced. The representation of AbstractCurry is also adapted to support higher-rank polymorphism.

The recognized syntax of Curry will change as follows (only the relevant parts are listed):

\begin{aligned}
\cdots
\end{aligned}
\begin{aligned}
\textit{ConstrDecl}   &::=\dots\\
                      &\phantom{::}\mid\phantom{!)}\textit{AppTypeExpr}~\textit{ConOp}~\textit{AppTypeExpr}\\
                      &\phantom{::}\mid\phantom{!)}\dots\\
\textit{ForallVarID}  &::=\textit{Ident}\\
\textit{ForallVars}   &::=\texttt{forall}~\textit{ForallVarID}_{1}\ldots\textit{ForallVarID}_{n}~\texttt{.} &&(n\geq 1)\\
\textit{TypeExpr}     &::=\{\textit{ForallVars}\}~[\textit{Context}~\texttt{=>}]~\textit{FuncTypeExpr}\\
\textit{FuncTypeExpr} &::=\textit{AppTypeExpr}~[\texttt{->}~\textit{TypeExpr}]\\
\textit{AppTypeExpr}  &::=[\textit{AppTypeExpr}]~\textit{SimpleTypeExpr}\\
\textit{Signature}    &::=\textit{Functions}~\texttt{::}~\textit{TypeExpr}\\
\textit{Expr}         &::=\textit{InfixExpr}~\texttt{::}~\textit{TypeExpr}\\
                      &\phantom{::}\mid\phantom{=}\dots
\end{aligned}
\begin{aligned}
\cdots
\end{aligned}
\begin{aligned}
\textit{QualTypeExpr} &::=\dots &&(\text{removed})\\
\textit{TypeAppExpr}  &::=\dots &&(\text{removed})
\end{aligned}
\begin{aligned}
\cdots
\end{aligned}
Edited Nov 01, 2019 by Jan-Hendrik Matthes
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: higher-rank-polymorphism