Re: Parsing funny arrows

2020-08-29 Thread Csongor Kiss
nd that ‘happy’ > generates a shift-reduce parser that does not backtrack. The ‘lexerDbg’ > output is useful to see how far the parser got. And there’s also this command > in case you want to go low level and inspect the state machine generated by > ‘happy’: > >happy -

Re: Parsing funny arrows

2020-08-29 Thread Csongor Kiss
Thanks a lot Vlad and Shayne, that indeed did the trick! Out of curiosity, how could I have figured out that this was the culprit? The parse error I got was a bit puzzling, and I couldn't find any flags that would give more information (I think I was looking for the parser equivalent of -ddump-t

Parsing funny arrows

2020-08-28 Thread Csongor Kiss
Hello devs, I am trying to modify GHC's parser to allow the following syntax in types: a -> @m b but my naive attempt was unsuccessful: type :: { LHsType GhcPs } : btype{ $1 } | btype '->' PREFIX_AT btype ctype ... For example when I try to parse the

Re: Recover role of a type variable in source Haskell

2019-04-07 Thread Csongor Kiss
Hi chessai, It is indeed not possible in source Haskell at the moment. Cheers, Csongor > On 7 Apr 2019, at 17:41, chessai . wrote: > > Hi devs, > > Is it possible to programmatically recover the role of a type variable? > > Or, possibly, a list of the roles of the type variables from left to

Re: Loading GHC into GHCi (and ghcid)

2018-06-07 Thread Csongor Kiss
Indeed, it's a lot faster with these flags, thanks for the tip! Best, Csongor > On 7 Jun 2018, at 16:47, Simon Marlow wrote: > > For loading large amounts of code into GHCi, you want to add -j +RTS > -A128m where is the number of cores on your machine. We've found that > parallel compilation

Re: Q: Types in GADT pattern match

2017-10-30 Thread Csongor Kiss
Right, but I think Gabor's suggestion here is for type checking of the pattern to be done first, and then capturing the coercions that were brought into scope by the pattern match. data Foo a where   Bar :: Foo [a] foo :: Foo a -> () foo Bar = -- we know (a ~ [b]) here, for some b The pattern