mortberg / cubicaltt

Experimental implementation of Cubical Type Theory
https://arxiv.org/abs/1611.02108
MIT License
572 stars 76 forks source link

Problem with parser generated by bnfc #118

Closed wmacmil closed 4 years ago

wmacmil commented 4 years ago

Will discuss how to resolve the bnfc grammar error i get when I run make after having run bnfc -m --haskell Exp.cf? I'm getting the follow error. If I import Data.Int I just get the error below it, ad infinitum. Are there any easy resolutions

$ make ghc --make TestExp.hs -o TestExp [1 of 7] Compiling AbsExp ( AbsExp.hs, AbsExp.o )

AbsExp.hs:13:27: error: Not in scope: type constructor or class ‘Int’ Perhaps you meant one of these: ‘Data.Int.Int’ (imported from Data.Int), ‘Data.Int.Int8’ (imported from Data.Int) Perhaps you want to add ‘Int’ to the import list in the import of ‘Prelude’ (AbsExp.hs:8:1-46). 13 newtype AIdent = AIdent ((Int,Int),String)

wmacmil@w:~/bnfc/cubicalTT$ make ghc --make TestExp.hs -o TestExp [1 of 7] Compiling AbsExp ( AbsExp.hs, AbsExp.o )

AbsExp.hs:14:42: error: • No instance for (IsString ((Int, Int), String)) arising from the 'deriving' clause of a data type declaration Possible fix: use a standalone 'deriving instance' declaration, so you can specify the instance context yourself • When deriving the instance for (IsString AIdent) | 14 | deriving (C.Eq, C.Ord, C.Show, C.Read, Data.String.IsString) | ^^^^^^^^^^^^^^^^^^^^

mortberg commented 4 years ago

I have never seen this problem before, but probably it has to do with BNFC and not cubicaltt? Maybe you can ask your question over at https://github.com/BNFC/bnfc instead?

wmacmil commented 4 years ago

Tack for the advice - Andreas recognized that it's a regression in BNFC - perhaps this should be pointed out in the README?

https://github.com/BNFC/bnfc/issues/296

wmacmil commented 4 years ago

Tack for the advice - Andreas recognized that it's a regression in BNFC - perhaps this should be pointed out in the README?

https://github.com/BNFC/bnfc/issues/296

mortberg commented 4 years ago

Tack for the advice - Andreas recognized that it's a regression in BNFC - perhaps this should be pointed out in the README?

BNFC/bnfc#296

Great that it worked out! Feel free to make a PR updating the README.

Btw, I don't think many people (if anyone) are using cubicaltt anymore now that we have Cubical Agda.