2026/06/19

Newest at the top

2026-06-19 09:07:08 +0000 <fp1> I see
2026-06-19 09:06:28 +0000 <merijn> fp1: That said, the compiler used to build everything has to support all extensions of your transitive dependencies
2026-06-19 09:06:06 +0000 <merijn> fp1: To answer your extension question: Libraries are compiled independently, so enabling extension X in a package will **only** enable it in that package
2026-06-19 09:04:22 +0000 <yahb2> False
2026-06-19 09:04:22 +0000 <jaror> % (==) @Int 1 2
2026-06-19 09:04:08 +0000 <yahb2> <interactive>:51:2: error: [GHC-58481] parse error on input ‘@’
2026-06-19 09:04:08 +0000 <mauke> % (@Int == 1) 2
2026-06-19 09:02:47 +0000 <yahb2> "42"
2026-06-19 09:02:46 +0000 <mauke> % show @Int 42
2026-06-19 09:02:42 +0000 <yahb2> "42.0"
2026-06-19 09:02:42 +0000 <mauke> % show @Double 42
2026-06-19 08:53:06 +0000emilym(~Thunderbi@user/emilym) emilym
2026-06-19 08:49:33 +0000 <yahb2> id :: forall a. a -> a
2026-06-19 08:49:33 +0000 <int-e> % :t id
2026-06-19 08:49:31 +0000 <yahb2> <no output>
2026-06-19 08:49:31 +0000 <int-e> % :set -fprint-explicit-foralls
2026-06-19 08:48:50 +0000 <int-e> (you can read the `forall` as a type lambda)
2026-06-19 08:48:31 +0000 <int-e> fp1: The full type of id is id :: forall a. a -> a; the @ supplies a type to use as `a`.
2026-06-19 08:47:30 +0000 <yahb2> id :: Int -> Int :: Int -> Int
2026-06-19 08:47:30 +0000 <int-e> % :t id :: Int -> Int
2026-06-19 08:47:24 +0000 <yahb2> id @Int :: Int -> Int
2026-06-19 08:47:24 +0000 <int-e> % :t id @Int
2026-06-19 08:46:30 +0000 <int-e> (I don't see search engines finding this from just Haskell and `@`)
2026-06-19 08:46:26 +0000 <fp1> what's the difference from :: ?
2026-06-19 08:46:16 +0000tromp(~textual@2001:1c00:340e:2700:ed09:73b3:83dd:1e97) (Quit: My iMac has gone to sleep. ZZZzzz…)
2026-06-19 08:45:57 +0000 <int-e> Oh, and the '@' is syntax... you have to know that it's a type application
2026-06-19 08:45:56 +0000 <[exa]> as in, the @ is a special syntax from the extension and you probably won't hoogle it
2026-06-19 08:45:44 +0000 <fp1> I see
2026-06-19 08:45:36 +0000 <fp1> I also tried just @
2026-06-19 08:45:36 +0000 <[exa]> fp1: the `@` is a type application, and [] is a normal type
2026-06-19 08:45:32 +0000 <yahb2> type List :: * -> * ; data List a = [] | a : [a] ; -- Defined in ‘GHC.Internal.Types’ ; instance Monoid [a] -- Defined in ‘GHC.Internal.Base’ ; instance Foldable [] -- Defined in ‘GHC.Internal.D...
2026-06-19 08:45:31 +0000 <int-e> % :i []
2026-06-19 08:45:25 +0000 <[exa]> anyway yeah some libraries just ask "hey simply enable OverloadedString to make the code look digestible"
2026-06-19 08:45:12 +0000 <fp1> How does one look up @[]? I tried with hoogle and :info, but I didn't get anything
2026-06-19 08:43:03 +0000 <fp1> I see
2026-06-19 08:42:44 +0000 <[exa]> fp1: I guess the main issue is portability to other compilers/standards
2026-06-19 08:42:38 +0000 <int-e> but if it's a type system extension then often you'll run into having to enable that when you try to use such a library (using its data types and calling its function)
2026-06-19 08:41:55 +0000 <jaror> generally you shouldn't need to enable extensions just for importing a module that uses extensions
2026-06-19 08:41:21 +0000 <jaror> In this case you can also use the more common (it's in GHC2021 and up) TypeApplications: `pure @[] "carrot"`
2026-06-19 08:40:56 +0000 <fp1> Does enabling an extension for a library impact the library user at all? Like will they be forced to turn on the extension as well?
2026-06-19 08:40:17 +0000caz_caz
2026-06-19 08:40:16 +0000 <merijn> fp1: Some extensions are extremely small/benign, some are either very complicated, or risky. So there's no real blanket answer "besides know what you're enabling"
2026-06-19 08:40:15 +0000 <[exa]> fp1: btw the semantics of _ is literally "please give me some informative error", so what you see is correct. Some people wanted to exploit `_` for not having to specify whole (possibly very lengthy) types, thus the extension
2026-06-19 08:39:36 +0000JoelMcCracken(5ea8252fbb@2a03:6000:1812:100::10e3) JoelMcCracken
2026-06-19 08:39:33 +0000caz_(866183745f@2a03:6000:1812:100::15d4) caz
2026-06-19 08:39:33 +0000sus(1b7af6299f@user/zeromomentum) zeromomentum
2026-06-19 08:39:30 +0000bsima1(9d7e39c8ad@2a03:6000:1812:100::dd)
2026-06-19 08:39:30 +0000arcadewise(52968ed80d@2a03:6000:1812:100::3df) l3gacyb3ta
2026-06-19 08:39:28 +0000JoelMcCracken(5ea8252fbb@2a03:6000:1812:100::10e3) (Read error: Connection reset by peer)
2026-06-19 08:39:26 +0000caz(866183745f@2a03:6000:1812:100::15d4) (Write error: Connection reset by peer)