statebox / cql

CQL: Categorical Query Language implementation in Haskell
GNU Affero General Public License v3.0
162 stars 14 forks source link

6/parser for concrete syntax #35

Closed marcosh closed 5 years ago

marcosh commented 5 years ago

almost complete Schema kind parser

some tests are still missing, so that part could be not 100% correct

also, some the tests on schemaLiteralSectionParser are failing quite rarely, so probably some edge case is not handled correctly

epost commented 5 years ago

@marcosh Looks beautiful! I'm getting a compile error though:

/Users/erik/dev/statebox/aql/src/Language/AQL.hs:367:15: error:
    • Couldn't match type ‘c’ with ‘TypesideExp var0 ty0 sym0’
      ‘c’ is a rigid type variable bound by
        the type signature for:
          lookupProg :: forall c t col.
                        Syntax c t col =>
                        Program -> (String, Kind) -> Either String c
        at src/Language/AQL.hs:365:1-77
      Expected type: Either String c
        Actual type: Either [Char] (TypesideExp var0 ty0 sym0)
marcosh commented 5 years ago

yeah, sorry about that. It's not in a file I modified. Now I rebased on master and everything should work fine

epost commented 5 years ago

Ah cool! It compiles now, thanks. I am getting tab errors though. Shall we follow ghc's advice to use spaces instead?

/Users/erik/dev/statebox/aql/src/Language/Typeside.hs:5:27: warning: [-Wtabs]
    Tab character found here, and in one further location.
    Please use spaces instead.
  |
5 | import Prelude hiding (EQ)
  |                           ^^^^^^
[12 of 19] Compiling Language.Schema  ( src/Language/Schema.hs, .stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Language/Schema.o )

/Users/erik/dev/statebox/aql/src/Language/Schema.hs:5:27: warning: [-Wtabs]
    Tab character found here, and in one further location.
    Please use spaces instead.
  |
5 | import Prelude hiding (EQ)
  |                           ^^^^^^
[13 of 19] Compiling Language.Query   ( src/Language/Query.hs, .stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Language/Query.o )

/Users/erik/dev/statebox/aql/src/Language/Query.hs:5:27: warning: [-Wtabs]
    Tab character found here, and in one further location.
    Please use spaces instead.
  |
5 | import Prelude hiding (EQ)
  |                           ^^^^^^
[14 of 19] Compiling Language.Mapping ( src/Language/Mapping.hs, .stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Language/Mapping.o )

/Users/erik/dev/statebox/aql/src/Language/Mapping.hs:5:27: warning: [-Wtabs]
    Tab character found here, and in one further location.
    Please use spaces instead.
  |
5 | import Prelude hiding (EQ)
  |                           ^^^^^^
[15 of 19] Compiling Language.Instance ( src/Language/Instance.hs, .stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Language/Instance.o )

/Users/erik/dev/statebox/aql/src/Language/Instance.hs:5:27: warning: [-Wtabs]
    Tab character found here, and in one further location.
    Please use spaces instead.
  |
5 | import Prelude hiding (EQ)
  |                           ^^^^^^
epost commented 5 years ago

Oh, hmm, the tests won't compile it seems. I guess tests on master are broken? Unfortunately, that means we also can't test the parser, so we should make sure both the main and the test code compile.

wisnesky commented 5 years ago

‘Stack test’ works for me - how are you compiling the tests?

On Sep 17, 2018, at 6:05 PM, Erik Post notifications@github.com wrote:

Oh, hmm, the tests won't compile it seems. I guess tests on master are broken? Unfortunately, that means we also can't test the parser, so we should make sure both the main and the test code compile.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub, or mute the thread.

epost commented 5 years ago

@wisnesky using stack test, like you; i just read the discussion at https://github.com/statebox/aql/issues/34#issuecomment-422171708, but perhaps @marcosh rebased on a version of master before you pushed changes to fix failing tests? In that case, he should probably rebase (or merge, whichever is most convenient) again. Right Marco?

epost commented 5 years ago

@wisnesky was the tabs issue above addressed?

marcosh commented 5 years ago

@epost I opened #37 to address that

epost commented 5 years ago

Ahh I see, thanks Marco!