omega12345 / RefactorAgda

Master's thesis project: A refactoring engine for Agda. Very much under construction.
BSD 3-Clause "New" or "Revised" License
6 stars 1 forks source link

Build failure: field not initialized: range #2

Open andreasabel opened 5 years ago

andreasabel commented 5 years ago

Parser.hs does not compile: -Werror complains about Fields of ‘OpenImport’ not initialised: range.

[ 97 of 102] Compiling Parser           ( Parser.hs, Parser.o )
Compilation error:

Parser.hs:126:30: error: [-Wmissing-fields, -Werror=missing-fields]
    • Fields of ‘OpenImport’ not initialised: range
    • In the first argument of ‘return’, namely
        ‘OpenImport
           {opened = True, imported = False, moduleName = name,
            comments = [c, []]}’
      In a stmt of a 'do' block:
        return
          OpenImport
            {opened = True, imported = False, moduleName = name,
             comments = [c, []]}
      In the expression:
        do string "open"
           c <- allCommentsUntilNonComment
           sc
           name <- qualifiedName
           ....
    |
126 |                       return OpenImport { opened = True, imported = False, moduleName = name, comments = [c , []]}
    |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
omega12345 commented 5 years ago

Thanks for the fix. I was rather hoping to just suppress the errors entirely, because I still get useless errors about not being able to find libraries. The Agda files which need to be compiled rely on Haskell modules which in their turn rely on modules handled by Cabal. The program should be fine anyway because by the time we get to the error, all the Agda files have been properly compiled.