When I extract/compile Coq to Haskell using Extraction Language Haskell. in the Coq file and running coqtop -compile mymodule.v > MyModule.hs, I get a Haskell module which starts with module Main where.
Is there an option to set the resulting Haskell module name?
I currently pipe to sed like this -
coqtop -compile mymodule.v | sed s/Main/MyModule/ > MyModule.hs
but I'm looking for a cleaner solution.
You can use
Extraction "file"orExtraction Library(or its variants), e.g.The above produces
MyModule.hsfile, which starts withmodule MyModule where.