Skip to content

Commit

Permalink
Removing unused code for capture free lambdas
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigogribeiro committed Jan 2, 2025
1 parent 0b1241c commit ad5b990
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 2 deletions.
49 changes: 49 additions & 0 deletions spec/new-solidity-spec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
title: 'Specification for the experimental solidity'
author: Argot collective
revision: 0.1
---


# 1. Introduction

This document describes the current specification of the
experimental solidity (ES) programming language.
We start presenting some basic definitions and notations
used. Next, we describe the syntax of the high-level
language ...

# 2. Basic definitions and notations

We let **x** denote an arbitrary identifier...

# 3. Design of the high-level language

The syntax of experimental solidity programs can be described by the
following context-free grammar.

$$
\begin{array}{lcl}
Program & \to & \overline{Decl} \\
Decl & \to & Fun\,|\,Data\,|\,Sym\,|\,Contract\,|\,Pragma\,|\,Class\,|\,Instance\\
Fun & \to & Sig\:Body\\
Data & \to & \mathbf{data}\:\mathbf{T}\:\overline{\alpha}\:Constrs\\
Sym & \to & \mathbf{type}\:\mathbf{S}\:\overline{\alpha}\,=\,\tau\\
Contract & \to & \mathbf{contract}\:\mathbf{D}\:\overline{\alpha}\:\overline{ContrDecl}\\
Pragma & \to & \mathbf{pragma}\:PragTy\:\overline{\mathbf{x}}\\
Class & \to & \mathbf{class}\:\overline{Pred}\Rightarrow\alpha\,:\,\mathbf{C}\,
\overline{\alpha}\:\mathbf{where}\:\overline{Sig}\\
Instance & \to & \mathbf{instance}\:\overline{Pred}\Rightarrow\tau\,:\,\mathbf{C}\,
\overline{\tau}\:\mathbf{where}\:\overline{Fun}\\
Sig & \to & \forall\,\overline{\alpha}\,.\,\overline{Pred}\,\Rightarrow\,\mathbf{function}\:\mathbf{F}\
(\overline{Arg}) \to \tau\\
Body & \to & \overline{Stmt}\\
Constrs & \to & \mathbf{=}\:\overline{Constr}\,|\,\lambda\\
\tau & \to & \alpha\,|\,\mathbf{T}\:\overline{\tau}\\
ContrDecl & \to & Fun\,|\,FieldDecl\,|\,Constructor\\
PragTy & \to & \boldsymbol{boundedvar}\,|\,\boldsymbol{coverage}\,|\,
\boldsymbol{patterson}\\
Pred & \to & \tau\,:\,\mathbf{C}\,\overline{\tau}\\
Arg & \to & \mathbf{x}\,:\,\tau\,|\,\mathbf{x}\\
\end{array}
$$
6 changes: 4 additions & 2 deletions src/Solcore/Desugarer/LambdaLifting.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import Solcore.Frontend.TypeInference.TcEnv (primCtx)
import Solcore.Primitives.Primitives


-- lambda lifting transformation top level function for capture free lambdas
-- lambda lifting transformation top level function for capture free lambdas.

lambdaLifting :: CompUnit Name -> Either String (CompUnit Name, [String])
lambdaLifting unit
Expand Down Expand Up @@ -141,7 +141,9 @@ createFunction :: [Param Name] ->
Body Name ->
LiftM (FunDef Name)
createFunction ps bdy
= (flip FunDef bdy) <$> createSignature ps
= do
(sig,mp) <- createSignature ps

Check failure on line 145 in src/Solcore/Desugarer/LambdaLifting.hs

View workflow job for this annotation

GitHub Actions / build

• Couldn't match expected type: Signature Name
pure (FunDef sig bdy)

createSignature :: [Param Name] ->
LiftM (Signature Name)
Expand Down

0 comments on commit ad5b990

Please sign in to comment.