Newest at the top
| 2026-06-19 08:53:06 +0000 | emilym | (~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 +0000 | tromp | (~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 +0000 | caz_ | 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 +0000 | JoelMcCracken | (5ea8252fbb@2a03:6000:1812:100::10e3) JoelMcCracken |
| 2026-06-19 08:39:33 +0000 | caz_ | (866183745f@2a03:6000:1812:100::15d4) caz |
| 2026-06-19 08:39:33 +0000 | sus | (1b7af6299f@user/zeromomentum) zeromomentum |
| 2026-06-19 08:39:30 +0000 | bsima1 | (9d7e39c8ad@2a03:6000:1812:100::dd) |
| 2026-06-19 08:39:30 +0000 | arcadewise | (52968ed80d@2a03:6000:1812:100::3df) l3gacyb3ta |
| 2026-06-19 08:39:28 +0000 | JoelMcCracken | (5ea8252fbb@2a03:6000:1812:100::10e3) (Read error: Connection reset by peer) |
| 2026-06-19 08:39:26 +0000 | caz | (866183745f@2a03:6000:1812:100::15d4) (Write error: Connection reset by peer) |
| 2026-06-19 08:39:25 +0000 | sus | (1b7af6299f@user/zeromomentum) (Read error: Connection reset by peer) |
| 2026-06-19 08:39:23 +0000 | bsima1 | (9d7e39c8ad@2a03:6000:1812:100::dd) (Read error: Connection reset by peer) |
| 2026-06-19 08:39:23 +0000 | arcadewise | (52968ed80d@2a03:6000:1812:100::3df) (Read error: Connection reset by peer) |
| 2026-06-19 08:39:22 +0000 | <merijn> | fp1: Practically GHC is the only implementation in use, so assuming extensions exists in a GHC version it probably works |
| 2026-06-19 08:39:12 +0000 | <[exa]> | np but might help later :) |
| 2026-06-19 08:39:04 +0000 | <fp1> | Ah sorry |
| 2026-06-19 08:39:02 +0000 | GdeVolpiano | (~GdeVolpia@user/GdeVolpiano) GdeVolpiano |
| 2026-06-19 08:38:55 +0000 | <[exa]> | fp1: pls pastebin, many people's clients gobble this up |
| 2026-06-19 08:38:30 +0000 | <merijn> | "It Depends (TM)" |
| 2026-06-19 08:38:20 +0000 | <fp1> | To what extent should one be using extensions? |
| 2026-06-19 08:37:44 +0000 | <merijn> | fp1: [_] isn't valid Haskell, it's an extension "PartialTypesignatures" :) |