2026/02/25

Newest at the top

2026-02-25 19:31:15 +0100 <ski> Foo -> ...
2026-02-25 19:31:12 +0100 <ski> anotherResult = case ... of
2026-02-25 19:31:06 +0100 <ski> Foo -> ...
2026-02-25 19:30:59 +0100 <ski> let result = case ... of
2026-02-25 19:30:52 +0100 <ski> consider
2026-02-25 19:30:48 +0100 <ski> no
2026-02-25 19:30:42 +0100 <Milan_Vanca> I don't understand the problem with indentation. It has one more indentaion as "let" and that should be enough
2026-02-25 19:30:31 +0100 <ski> ah
2026-02-25 19:30:14 +0100 <Milan_Vanca> ski: I added bracket as I thought this is root of error..
2026-02-25 19:30:06 +0100 <EvanR> could you encode category theory
2026-02-25 19:29:47 +0100 <ski> .. also, instead of `... -> (...)', you can simply write `... -> ...' (extra brackets redundant)
2026-02-25 19:29:42 +0100 <EvanR> that is so much equality constraints now I'm imagining things to do with them
2026-02-25 19:29:15 +0100uli-fem(~uli-fem@118.210.1.123) (Ping timeout: 255 seconds)
2026-02-25 19:28:54 +0100 <ski> (one more than the `r' in `result')
2026-02-25 19:28:48 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 19:28:37 +0100 <ski> `Left' and `Right' must be indented at least three spaces more
2026-02-25 19:28:27 +0100 <EvanR> indent lines Left and Right more
2026-02-25 19:28:03 +0100 <Milan_Vanca> https://paste.tomsmeding.com/tCHM4xIg
2026-02-25 19:28:01 +0100 <Milan_Vanca> ski: I don't know.. to me code looks good
2026-02-25 19:27:03 +0100 <ski> make sure the branches after the `of' are indented more than the start of `something'
2026-02-25 19:26:37 +0100 <ski> you likely have indentation off
2026-02-25 19:26:26 +0100 <ski> (well, you need an expression between the `case' and `of'. assuming you just omitted that)
2026-02-25 19:26:04 +0100 <ski> no
2026-02-25 19:25:55 +0100 <Milan_Vanca> Hello guyz, is "let something = case of" forbiden in "do notation"?
2026-02-25 19:24:56 +0100Milan_Vanca(~milan@88.212.61.169)
2026-02-25 19:24:55 +0100uli-fem(~uli-fem@118.210.1.123)
2026-02-25 19:23:30 +0100 <ski> EvanR : well, strictly speaking `Make(Ord)' (`Set' is a functor, a module function. `elt' is in the output/result module, constructed by this) (and the functor `Make' itself is a component of the module `Set', so `Set.Make(Ord)') .. where `Ord' is whatever parameter module you decide to use
2026-02-25 19:21:54 +0100 <ski> here, the `sharing type ... = ...' constraints ensure that all the different parameter agree about the relevant types that are supposed to be the same over their interfaces/signatures
2026-02-25 19:21:29 +0100jmcantrell_jmcantrell
2026-02-25 19:21:00 +0100 <ski> functor Program (structure Lg : LOGICALS structure Lam : LAM structure Error : ERROR structure Module : MODULE structure UU : UUTILS structure IU : IU sharing type Lam.lterm = Module.lterm = IU.lterm = UU.lterm sharing type Lg.const = Module.const = Lam.const sharing type IU.tp = Lg.tp = Lam.tp = Module.tp) : PROGRAM = struct ... end
2026-02-25 19:19:55 +0100 <ski> here's one SML example (from lambdaProlog implementation Terzo) :
2026-02-25 19:17:53 +0100 <EvanR> er Set
2026-02-25 19:17:39 +0100 <EvanR> Set.S
2026-02-25 19:17:36 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds)
2026-02-25 19:17:14 +0100 <ski> yes
2026-02-25 19:17:10 +0100 <EvanR> ok elt is in the resulting module
2026-02-25 19:17:00 +0100 <ski> (otherwise, you would know nothing about `elt', except, perhaps, that it has a `compare' function (or any function defined in terms of that), assuming the result module exports that operation)
2026-02-25 19:16:07 +0100 <ski> and the `with type elt = Ord.t' ensures that it is known to callers of `Make' that the type `elt' in the resulting module will be equal to the type `t' in the parameter module
2026-02-25 19:15:18 +0100 <ski> given a parameter module `Ord', of signature `OrderedType' (equal to `sig type t val compare : t -> t -> int'), it constructs a module of signature `S' (including a type `elt' of set elements, a type `t' of sets, and various operations on sets)
2026-02-25 19:14:54 +0100 <EvanR> so elt is defined in ...
2026-02-25 19:13:39 +0100 <ski> is one example, from OCaml, <https://ocaml.org/manual/5.4/api/Set.S.html>
2026-02-25 19:13:25 +0100 <ski> module Set.Make : functor (Ord : OrderedType) -> S with type elt = Ord.t
2026-02-25 19:12:58 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 19:12:02 +0100ChanServ+v yahb2
2026-02-25 19:12:02 +0100yahb2(~yahb2@user/tomsmeding/bot/yahb2) yahb2
2026-02-25 19:11:39 +0100yahb2(~yahb2@user/tomsmeding/bot/yahb2) (Server closed connection)
2026-02-25 19:09:22 +0100 <__monty__> Backpack was sold to me as bringing ML's functors to Haskell.
2026-02-25 19:09:08 +0100ljdarj(~Thunderbi@user/ljdarj) ljdarj
2026-02-25 19:07:44 +0100wickedjargon(~user@208.98.208.115)
2026-02-25 19:07:18 +0100 <EvanR> what's an example of a sharing constraint