Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Playground.v
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
From MetaCoq.Template Require Import Loader Ast.
From MetaCoq.ErasurePlugin Require Import Erasure Loader.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Erasure.Typed Require Import ResultMonad.
From MetaCoq.Erasure.Typed Require Import Optimize.
From MetaCoq.Erasure.Typed Require Import Extraction.
From Coq Require Import ZArith List String Nat.
From MetaRocq.Template Require Import Loader Ast.
From MetaRocq.ErasurePlugin Require Import Erasure Loader.
From MetaRocq.Utils Require Import utils.
From MetaRocq.Erasure.Typed Require Import ResultMonad.
From MetaRocq.Erasure.Typed Require Import Optimize.
From MetaRocq.Erasure.Typed Require Import Extraction.
From Stdlib Require Import ZArith List String Nat.

Import MCMonadNotation.
Import ListNotations.
Expand Down
2 changes: 1 addition & 1 deletion agda2lambox.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ executable agda2lambox
LambdaBox.Type,
LambdaBox.Env,
LambdaBox,
CodeGen.Coq,
CodeGen.Rocq,
CodeGen.SExpr,
Paths_agda2lambox
autogen-modules: Paths_agda2lambox
Expand Down
4 changes: 1 addition & 3 deletions src/Agda2Lambox/Compile/Monad.hs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ import Data.Foldable (traverse_)

-- | Compilation Environment
data CompileEnv = CompileEnv
{ noBlocks :: Bool
-- ^ When set to 'True', constructors take no arguments,
-- and regular function application is used instead.
{
}

-- | Backend compilation state.
Expand Down
8 changes: 1 addition & 7 deletions src/Agda2Lambox/Compile/Utils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,7 @@ toConApp qn es = do
ctrs <- liftTCM $ getConstructors dt
ind <- liftTCM $ toInductive dt
let idx = fromMaybe 0 $ qn `elemIndex` ctrs

-- if the no blocks option is enabled
-- no argument is given to LConstruct
-- and we instead use regular application
nb <- asks noBlocks
if nb then pure $ foldl' LBox.LApp (LBox.LConstruct ind idx []) es
else pure $ LBox.LConstruct ind idx es
pure $ foldl' LBox.LApp (LBox.LConstruct ind idx []) es


-- | Class for things that may be considered logical, and thus erased.
Expand Down
229 changes: 0 additions & 229 deletions src/CodeGen/Coq.hs

This file was deleted.

Loading