[Agda] Size limit on generated code?

Roly Perera roly.perera at dynamicaspects.org
Fri Sep 26 05:01:23 CEST 2014


Hi,

I've been working on an Agda development for some time and would now
like to run some test code. (Outré, I know.) So I'm compiling to a
binary using C-c C-x C-c in Emacs.

Everything is hunky dory until GHC reaches the .hs file for the test
code itself, which appears to be truncated at line 32653. I assume
this is some kind of limit on the size of the generated code.

I build a test value which represents a pi calculus expression
containing several variables. It looks like each occurrence of a de
Bruijn index in the pi calculus program is expanding into a rather
large amount of Haskell, along these sorts of lines:

   (MAlonzo.Code.Data.Fin.d135
      (MAlonzo.RTE.mazCoerce
         (MAlonzo.Code.Data.Nat.C5
            (MAlonzo.RTE.mazCoerce
               (MAlonzo.Code.Data.Nat.mazIntegerToNat
                  (8 ::
                     Integer)))))
      (MAlonzo.RTE.mazCoerce
         (MAlonzo.Code.Data.Fin.d135
            (MAlonzo.RTE.mazCoerce
               (MAlonzo.Code.Data.Nat.C5
                  (MAlonzo.RTE.mazCoerce
                     (MAlonzo.Code.Data.Nat.mazIntegerToNat
                        (8 ::
                           Integer)))))

The generated file is truncated in the middle of a token:

        (MAlonzo.Code.Dat

Is there any way around the limit, if that's indeed what I'm running
into, or tips for avoiding this sort of problem?

thanks
Roly


More information about the Agda mailing list