[01:13:13] i figured it out
[04:33:10] *** Quits: wmacmil (~wmacmil@c83-252-138-144.bredband.comhem.se) (Ping timeout: 272 seconds)
[05:19:58] *** Quits: drbean (~drbean@TC210-63-209-172.static.apol.com.tw) (Read error: Connection reset by peer)
[05:22:32] *** Joins: drbean (~drbean@TC210-63-209-206.static.apol.com.tw)
[06:30:55] *** Joins: wmacmil (~wmacmil@c83-252-138-144.bredband.comhem.se)
[07:55:02] *** Quits: Flammie (~flammie@flammie.name) (Quit: leaving)
[07:59:49] *** Joins: Flammie (~flammie@flammie.name)
[11:57:15] wmacmil: how did you solve it?
[12:46:19] *** Quits: wmacmil (~wmacmil@c83-252-138-144.bredband.comhem.se) (Ping timeout: 246 seconds)
[12:56:39] daherb: hahah wtf happened with that omslag
[13:22:18] i guess they took yours, updated it with my picture and added another title
[13:22:46] *** Joins: wmacmil (~wmacmil@c83-248-104-92.bredband.comhem.se)
[13:27:59] i defined my own list category which took the Type variable with the empty list constructor
[13:28:02] BaseCls : Clas -> TypVar -> ListCls ;
[13:28:02] ConsCls : Clas -> ListCls -> ListCls ;
[13:29:38] and then kept the variable name as an extra record field with that variable, appending where needed
[13:29:48] lin
[13:29:49] BaseCls cl tv = { s = cl ++ tv ; v = tv } ;
[13:29:49] ConsCls cl lcl = { s = cl ++ lcl.v ++ "," ++ lcl.s ; v = lcl.v } ;
[13:42:33] but i do have some adjunct questions: (i) is there any good heuristic for reducing the number of parses of a given expression, and (ii) why isn't GF able to solve the metavariables velow
[13:42:35] PlType> p "foobar :: ( Monad z , Ord x , Num x ) => z x -> y -> x"
[13:42:35] Eval (TypSig (MkName "foobar") (ExtendCls (BaseCls Num Xx) (ExtendCls (BaseCls Ord Xx) (ExtendCls (BaseCls Monad Zz) ?12))) (TArr (TVar1 Zz (TVar Xx)) (TArr (TVar Yy) (TVar Xx))))
[13:42:35] Eval (TypSig (MkName "foobar") (ExtendCls (BaseCls Num Xx) (ExtendCls (BaseCls Ord Xx) (ExtendCls (BaseCls Monad Zz) ?12))) (TArr (TArr (TVar1 Zz (TVar Xx)) (TVar Yy)) (TVar Xx)))
[13:42:35] Eval (TypSig (MkName "foobar") (ExtendCls (BaseCls Num Xx) (ExtendCls (BaseCls Ord Xx) (ExtendCls (BaseCls Monad Zz) ?12))) (TArr (TVar1 Zz (TArr (TVar Xx) (TVar Yy))) (TVar Xx)))
[13:42:38] Eval (TypSig (MkName "foobar") (ExtendCls (BaseCls Num Xx) (ExtendCls (BaseCls Ord Xx) (ExtendCls (BaseCls Monad Zz) ?12))) (TVar1 Zz (TArr (TVar Xx) (TArr (TVar Yy) (TVar Xx)))))
[13:42:41] Eval (TypSig (MkName "foobar") (ExtendCls (BaseCls Num Xx) (ExtendCls (BaseCls Ord Xx) (ExtendCls (BaseCls Monad Zz) ?12))) (TVar1 Zz (TArr (TArr (TVar Xx) (TVar Yy)) (TVar Xx))))
[13:42:44] Eval (TypSig (MkName "foobar") (ExtendCls (ConsCls Ord (BaseCls Num Xx)) (ExtendCls (BaseCls Monad Zz) ?11)) (TArr (TVar1 Zz (TVar Xx)) (TArr (TVar Yy) (TVar Xx))))
[13:42:47] Eval (TypSig (MkName "foobar") (ExtendCls (ConsCls Ord (BaseCls Num Xx)) (ExtendCls (BaseCls Monad Zz) ?11)) (TArr (TArr (TVar1 Zz (TVar Xx)) (TVar Yy)) (TVar Xx)))
[13:42:49] Eval (TypSig (MkName "foobar") (ExtendCls (ConsCls Ord (BaseCls Num Xx)) (ExtendCls (BaseCls Monad Zz) ?11)) (TArr (TVar1 Zz (TArr (TVar Xx) (TVar Yy))) (TVar Xx)))
[13:42:52] Eval (TypSig (MkName "foobar") (ExtendCls (ConsCls Ord (BaseCls Num Xx)) (ExtendCls (BaseCls Monad Zz) ?11)) (TVar1 Zz (TArr (TVar Xx) (TArr (TVar Yy) (TVar Xx)))))
[13:42:55] Eval (TypSig (MkName "foobar") (ExtendCls (ConsCls Ord (BaseCls Num Xx)) (ExtendCls (BaseCls Monad Zz) ?11)) (TVar1 Zz (TArr (TArr (TVar Xx) (TVar Yy)) (TVar Xx))))
[13:46:09] I guess introducing precedence with everything?
[13:51:10] it becomes even more immediate when i immediately linearize the parse
[13:51:11] PlType> p "foobar :: ( Monad z , Ord x , Num x ) => z x -> y -> x" | l
[13:51:11] foobar :: ( ?12 , Monad z , Ord x , Num x ) => z x -> y -> x
[13:51:11] foobar :: ( ?12 , Monad z , Ord x , Num x ) => z x -> y -> x
[13:51:11] foobar :: ( ?12 , Monad z , Ord x , Num x ) => z x -> y -> x
[13:51:11] foobar :: ( ?12 , Monad z , Ord x , Num x ) => z x -> y -> x
[13:51:13] foobar :: ( ?12 , Monad z , Ord x , Num x ) => z x -> y -> x
[13:51:15] foobar :: ( ?11 , Monad z , Ord x , Num x ) => z x -> y -> x
[13:51:17] foobar :: ( ?11 , Monad z , Ord x , Num x ) => z x -> y -> x
[13:51:19] foobar :: ( ?11 , Monad z , Ord x , Num x ) => z x -> y -> x
[13:51:21] foobar :: ( ?11 , Monad z , Ord x , Num x ) => z x -> y -> x
[13:51:23] foobar :: ( ?11 , Monad z , Ord x , Num x ) => z x -> y -> x
[14:09:40] wmacmil: as for metavariables, the rule is that every argument needs to contribute with a string, otherwise it isnâ€™t recognised when parsing
[14:10:01] so it's not enough if your argument only contains a parameter that chooses a string from the other argument(s)
[14:12:31] which arguement are you referring to
[14:12:34] ?
[14:13:42] so the metavariable takes place in the ExtendCls function
[14:15:50] which is essentially a list
[14:15:50] with
[14:15:50] can you paste its code too?
[14:15:50] EmptCls = { s = "" ; empt = True } ;
[14:15:50] ExtendCls lcl tc = { s =
[14:15:50] case tc.empt of {
[14:15:50] True => lcl.s ;
[14:15:50] False => tc.s ++ "," ++ lcl.s
[14:15:50] }
[14:15:50] ; empt = False } ;
[14:15:50] right, there's the problem, in case of true, tc's string argument isn't used
[14:15:50] ok thank you!
[14:15:50] as for the other thing, has aarne showed you precedence levels in gf?
[14:15:50] I haven't used them myself, because I've just done natural languages, but in this book page 190 there's some instructions https://listenmaa.fi/b/Aarne_Ranta-GF-book.pdf
[14:15:50] he has and i've read about it so i'll probably try to extend my grammar with them
[14:16:02] okay, nice! in the case of your parses, the difference seems to be only the order
[14:16:35] if you only had to parse up to a known length, I would do a lazy variant and make different constructors for different lengths :-P but that's super non-scalable
[14:18:14] constructors and lengths of what specifically?
[14:20:14] I mean, extremely silly for any real applications, like "Cls2" and "Cls3" for lists of exactly 2 and 3 classes. but as said, that's a terrible idea for anything that is supposed to scale like yours
[15:29:25] *** Quits: wmacmil (~wmacmil@c83-248-104-92.bredband.comhem.se) (Ping timeout: 246 seconds)
[15:52:18] *** Joins: wmacmil (~wmacmil@c83-252-138-144.bredband.comhem.se)
[16:40:50] new section in my gf-gotchas+tips post, after an anonymous industrial user asked if there's a way to do that https://inariksit.github.io/gf/2018/08/28/gf-gotchas.html#re-export-rgl-opers-in-application-grammar
[21:54:31] *** Joins: michmech (~Thunderbi@cst-prg-111-155.cust.vodafone.cz)
[22:00:51] *** Quits: michmech (~Thunderbi@cst-prg-111-155.cust.vodafone.cz) (Quit: michmech)