H
Is there an established definition of totality, and does it entail termination? Notably, is id :: Void -> Void a total function? Is Data.Void.absurd total? Is a function producing an infinite stream considered terminating? For models of a simply-typed lambda calculus such as PCF, there are recursive definitions of total elements of types, including function types, but I don’t know whether the same can be said for the more complex Haskell type system. See also the levity subtleties uncovered in…
H
Cool! Can you get your agent to submit a draft PR?
H
FWIW I love tomland and I have implemented support for version 1.1.0 of the specs. In that thread I had offered to maintain the package, the offer still stands. Pull request kowainik/tomland Support TOML 1.1.0 (mixed arrays, new AST, spec-conforming validator) (#470) main ← andreabedini:toml-1.1.0 andreabedini opened 02:20AM - 09 Oct 26 UTC +1921 -906 Hi! I really like tomland, especially for its bidirectional codecs, and it made …me a bit sad to see it fall behind the spec. Now that I have…
H
Yes, it’s been very useful. My bots and I have been all over it recently. I would be happy to help update it for GHC 10. Actually IIRC Claude already made me a provisional list of breakages coming in GHC 10 just by looking at the source code.
H
We have meetings about once a month now. Join us on Discord: SeaHUG
H
I prefer value level since it’s more explicit, but other people like implicit. Other than that I can’t see a distinct difference. A couple of comments: The implementation in the linked blog post can only throw instances of class Exception, which isn’t necessary in my version, but I don’t think that’s required either. In both cases the “capability” to throw can escape its scope. To avoid that you need to track scope, either with Bluefin (for the value-level version) or effectful (for the type…
H
How does it compare with this throw :: Throws e => e -> IO a try :: (Throws e => a) -> IO (Either e a) Is there a meaningful difference tracking at value level or type level?
H
brandonchinn178: That is a cool technique, and it does solve error composition in that you simply pass two Exception e arguments to compose two exception types Exactly! brandonchinn178: it still requires you to add the exception to all intermediate functions between try and throw Yes, and I consider than an upside. I recognise that some people consider it a downside brandonchinn178: What upsides/downsides do you see here, other than error composition? The main upside for me is that you can’t…
H
You’re right, I should have written “GHC”, not “Haskell”. Regardless, I think that this is a good approach to use if you’re making your own Haskell compiler and need to solve this problem.
H
That is a cool technique, and it does solve error composition in that you simply pass two Exception e arguments to compose two exception types. But it still requires you to add the exception to all intermediate functions between try and throw. What upsides/downsides do you see here, other than error composition?
H
I guess lots of Functor-like types could have a “passthrough” HasField instance as a shorthand for “fmapping with a field accessor”. Other types can have “extracting a field and massaging its result type into some useable form” instances. I find HasField instances that “invent” new field names a bit suspect (no big reason really, just my gut feeling) but passthrough instances that transform or obtain some preexisting field are ok I think. My particular weird HasField instance was on the Optic…
H
Yes I would say it is very useful. I’d encourage you to transfer it to the haskell/ namespace on github. This is also quite close to what @L0neGamer has been doing recently, so I’m sure he has some advice for future contributors to it.
H
For the last three years I’ve been compiling a “breakage inventory” that documents all the breaking changes that accompany a GHC release. Since GHC 10 will be upon us in perhaps a month or two () I want to check whether this is this useful to anyone and, if so, whether anyone would like to help me compile it for GHC 10.
H
For the last three years I’ve been maintaining a subset of the Kowainik ecosystem to keep stan (the static analyser) up to date with GHC releases. I am stopping maintaining them effective immediately. If anyone is interested in stepping in, let me know. Maintenance involves also maintaining about 15 of stan’s reverse dependencies from within the Kowainik ecosystem too. The most widely used such package is tomland. (I also maintain relude and validation-selective but they have other active…
H
Agda also builds fine (500 modules, 130 deps)!
H
adamgundry: So I think what is happening in your example is this: You have two threads, the main thread (ThreadId 4) which is waiting in threadDelay, and the forked thread (ThreadId 5) which is allocating wildly in threadFunc. Eventually, an allocation hits the memory limit, so GHC bumps the limit by -Mgrace and throws HeapOverflow to the main thread. In the “expected” case, the main thread catches this exception in myExceptionHandler, prints it, then quickly exits (killing thread 5 in the…
H
I found this old cabal issue which might be relevant: RFC: Remote cache support · Issue #5582 · haskell/cabal · GitHub
H
Oh I mean it’s only for internal use. The types are a bit scary here since it’s a super general interface. But the gist is I have a bunch of Hook fields, and I want to make it easy to do hooks <- getHooks out <- runHook hooks.foo inp The HasField instance basically lets you do out <- getHooks.foo inp (automatically calling runHook)
H
Without knowing more of the context, I’m struggling to see what that does - the instance could definitely use some comments showing how to use it.
H
Yes! Proxies are also fun File brandonchinn178/skeletest src%2FSkeletest%2FInternal%2FHooks.hs refs%2Fheads%2Fmain instance (HasField field Hooks (Hook ctx inp out)) => HasField field UserHooks (ctx -> inp -> (inp -> IO out) -> IO out) where getField (UserHooks hooks) = runHook (getField @field hooks)
H
I feel like I shouldn’t like this, but I like this a lot, it’s very readable which I always appreciate. Reminds me a bit of one of the changes in most recent Clash release, which adds an instance for instance HasField name r a => HasField name (Signal dom r) (Signal dom a) which makes working with signals of records so much more convenient.
H
Co-signed. I’m doing pineapple-on-pizza levels of controversial nonsense in personal code with HasField when it feels nice. {-# LANGUAGE DataKinds #-} {-# LANGUAGE OverloadedRecordDot #-} import Control.Monad.Trans.Maybe (MaybeT(..), runMaybeT) import GHC.Records (HasField(..)) instance HasField "value" (MaybeT m r) (m (Maybe r)) where getField = runMaybeT data User = User { name :: String, age :: Int } deriving Show justUser :: MaybeT IO User justUser = pure (User "Ada" 36) nothingUser ::…
H
brandonchinn178.github.io Fun with OverloadedRecordDot: Logging I like -XOverloadedRecordDot. There, I said it. It's a controversial extension, and can produce obscure errors, but the ergonomics of having type-namespaced operations instead of global-namespaced or qualified-module-namespaced operations is too... A short snippet for overloaded record dots with logging, including a fun technique writing a HasField instance on monadic values
H
As a test of sorts, Stack and its 200+ dependencies builds fine with GHC 9.12.5-rc4.
H
adamgundry: Can you give an example program that illustrates this problem? I believe the default exception handler, forkIO and async exceptions work “as expected”, but these things are subtle to understand, and there are definitely dark corners with other features (e.g. FFI or unsafePerformIO)! Here’s a modified version of the program above module Main where import Control.Concurrent (forkFinally, forkIO, myThreadId, threadDelay) import Control.Exception (SomeException, handle) import GHC.Conc…
H
If you want to use GHC 9.12.5-rc4 with Stack: Add a setup-info dictionary to a configuration file with the applicable entry for your operating system. For example, on Windows or macOS/AArch64, a stack.yaml: snapshot: nightly-2026-11-03 # GHC 9.12.4 compiler: ghc-9.12.4.20261102 compiler-check: match-exact # Anticipating possible future RC releases # Only required before the GHC version has been installed: setup-info: ghc: windows64: 9.12.4.20261102: url: h…
H
Indeed, hence haskellforall.com Nixpkgs support for incremental Haskell builds A post explaining the design behind a new Nixpkgs feature for building Haskell packages incrementally
H
rpeszek.github.io Infrequent, Pragmatic, Lambda Blog - Life after Haskell, HKT flattening... We are trying to meet monthly at Boulder Haskell Programmers Meetup and welcome new participants. We will discuss “Life after Haskell” this month (loose discussion). Meetup Life after Haskell, Tue, Nov 17, 2026, 5:30 PM | Meetup Every month we try to meet to hang out and talk functional programming. This month’s speaker is Robert Peszek but the meeting will likely be a loose conversation rather tha
H
I never expressed a closing date for this. Let’s say Wednesday Nov. 11th!
H
Hey thanks a lot - just realized my blog post was featured on this issue! feeling like a VIP now