Skip to content

Commit

Permalink
MA: Made changes that leave me with a broken Agda system; please help.
Browse files Browse the repository at this point in the history
  • Loading branch information
Musa Al-hassy committed Oct 2, 2018
1 parent cf921d3 commit 6043e77
Show file tree
Hide file tree
Showing 6 changed files with 210,390 additions and 11 deletions.
43 changes: 43 additions & 0 deletions compiler_alteration.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,47 @@ agda-mode setup

# Now silly0.lagda typechecks.

############################################################################
#
# Now trying to make modifications

P=~/agda

cd $P/src/full/Agda/Syntax/Parser

emacs Parser.y &
# rewrite: 'module' ↦ 'mmodule'

# produce: Parser.hs
happy Parser.y

emacs Lexer.x &
# rewrite: module ↦ mmodule

# product: Lexer.hs
alex Lexer.x

cd $P
cabal install

emacs silly0.agda &
#
# Loading this yields the error:
# The name of the top level module does not match the file name. The
# module Primitive should be defined in one of the following files:

This comment has been minimized.

Copy link
@fredrikNordvallForsberg

fredrikNordvallForsberg Oct 2, 2018

Is the problem perhaps that the file that defines the Agda primitives (probably /home/alhassy/.cabal/share/x86_64-linux-ghc-8.0.2/Agda-2.6.0/lib/prim/Agda/Primitive.agda) still has a module line, not a mmodule line? If so, maybe experiment with rrecord instead?

# /home/alhassy/agda/Primitive.agda
# /home/alhassy/agda/Primitive.lagda
# /home/alhassy/Projects/agda-stdlib/src/Primitive.agda
# /home/alhassy/Projects/agda-stdlib/src/Primitive.lagda
# /home/alhassy/RATH-Agda/Primitive.agda
# /home/alhassy/RATH-Agda/Primitive.lagda
# /home/alhassy/.cabal/share/x86_64-linux-ghc-8.0.2/Agda-2.6.0/lib/prim/Primitive.agda
# /home/alhassy/.cabal/share/x86_64-linux-ghc-8.0.2/Agda-2.6.0/lib/prim/Primitive.lagda
#
#
# Changing the module name to “Primitive” does not fix the issue: Same error is reported.

# I would expect silly0.agda to no longer work since it uses the “old” keyword “module”.
# Instead I'd expect silly1.agda to now work, since it's empty, and uses the new “mmodule” keyword.


2 changes: 2 additions & 0 deletions silly1.agda
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
mmodule silly1 where

2 comments on commit 6043e77

@andreasabel
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Makefile installs the current Agda as agda-2.6.0, see issue agda#3154. You might have two versions of Agda installed now, agda and agda-2.6.0 which gives you the confusing behavior.

@alhassy
Copy link
Owner

@alhassy alhassy commented on 6043e77 Oct 2, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, it seems I only have one resulting agda --no version number attached to anything.

Please sign in to comment.