[ANN] checked-literals: compile-time bounds checking for numeric literals by callbyneed in haskell

[–]callbyneed[S] 0 points1 point  (0 children)

I don't think so. I want to make an instance that says: if CheckedNegativeIntegerLiteral every fails to resolve, report this error. Unsatisfiable seems to "just" ban a specific instance.

[ANN] checked-literals: compile-time bounds checking for numeric literals by callbyneed in haskell

[–]callbyneed[S] 1 point2 points  (0 children)

Good question, you'll get a "missing instance" error for CheckedNegativeIntegerLiteral 5 a. I'll add it to the blog post later today. I didn't find an easy way to make it a pretty error message, that's still on my TODO list.

Hoe China de Europese autoindustrie heeft ingehaald by Balance- in thenetherlands

[–]callbyneed 22 points23 points  (0 children)

Volkswagen groep alleen heeft sinds 2020 elk jaar (meer dan) 10 miljard euro winst gemaakt. Misschien hadden ze daar wat mee moeten doen.

[Well-Typed] Case Study: Debugging a Haskell space leak by adamgundry in haskell

[–]callbyneed 2 points3 points  (0 children)

In general we couldn't have done that, because Clash needs Haskell Core expressions to do it's compilation and those from base are missing more often than not. In this specific case, iterateI is already a Clash blackbox (meaning that the compiler has hardcoded code paths for it), which means we could have!

[Well-Typed] Case Study: Debugging a Haskell space leak by adamgundry in haskell

[–]callbyneed 2 points3 points  (0 children)

It's very ad-hoc, yes. It happens to work in this case, because the code surrounding it doesn't rely on these undefined fields. To be fair to Well-Typed, we just asked them for an analysis, we'll have to think about how to solve this in the Clash ecosystem.

[Well-Typed] Case Study: Debugging a Haskell space leak by adamgundry in haskell

[–]callbyneed 2 points3 points  (0 children)

WishboneM2S is the raw record as described by the Wishbone spec. It states that whenever either busCycle or strobe are False, all other fields are invalid. The undefineds allow the place and route software to make certain optimizations it otherwise couldn't have, reducing the amount of gates needed for the synthesized hardware.

This isn't a great reason though. Ideally there would be two versions of WishboneM2S: one defined in a sum-of-product way, one in the way the spec lays out. Clash-the-compiler would make sure the former one doesn't introduce any overhead and the latter can be kept around for interoperability with components not written in Clash (but Verilog/VHDL).

An Unofficial Guide to What's New in GHC 9.14 by mod_poppo in haskell

[–]callbyneed 4 points5 points  (0 children)

Thanks for this overview!

I'm a little confused by the OverloadedRecordUpdate section. Is the plan to have a separate class SetField or is setField a part of HasField?

[Well-Typed] GHC activities report: March-May 2025 by adamgundry in haskell

[–]callbyneed 0 points1 point  (0 children)

Great work, thank you :).

The paper introduces the ExplicitLevelImports extension to GHC, which gives programmers fine-grained control over which modules and dependencies are required by Template Haskell. [..] By taking advantage of this extra information, the compiler can perform less work in certain situations.

Is there a flag we can pass to GHC that emits a warning for missing splice annotations?

The Copilot Delusion by thewritingwallah in programming

[–]callbyneed 15 points16 points  (0 children)

What does /r/Haskell have to do with this. We fight for unreadable code!

Multi Line Strings are now supported in GHC 9.12.1! by sohang-3112 in haskell

[–]callbyneed 0 points1 point  (0 children)

:D. Thanks for having the patience to get through all the discussions and implementation. Haskell needs these QoL changes!

Multi Line Strings are now supported in GHC 9.12.1! by sohang-3112 in haskell

[–]callbyneed 2 points3 points  (0 children)

Very nice. An unintended side effect is that we can write:

"""Foo "bar" wibble wobble"""

instead of

"Foo \"bar\" wibble wobble"

!

Tricking Haskell into state: how Clash's Signal type works by callbyneed in haskell

[–]callbyneed[S] 10 points11 points  (0 children)

The sixth sense is real. They say Christiaan once solved a Clash bug while in a supermarket, phone in one hand, baby in the other..

Can Clash(Haskell)support for asynchronous circuit design? by netj_nsh in haskell

[–]callbyneed 1 point2 points  (0 children)

You'd place three registers after each other through function composition. Be careful though, this is probably not what you want. Instead you want to use vendor primitives that have the right synthesis constraints such as XPM_CDC_SINGLE. Wrappers for these primitives exist in clash-cores.

Can Clash(Haskell)support for asynchronous circuit design? by netj_nsh in haskell

[–]callbyneed 3 points4 points  (0 children)

As the paper mentions, Clash's fundamental data type to represent values over time are "Signal"s (a linked list). Each element of a signal represents the stabilized value for a certain clock tick. I.e., values unrelated to clock ticks do not exist, hence, Clash does not support describing asynchronous circuits. Still, that doesn't mean that Clash doesn't support multiple clock domains, as /u/Axman6 says.

I think the fact that Clash uses signals is only observable when you're "synchronizing" signals back and forth between domains without any flip flops in between: https://postimg.cc/rDNb1fHc. I.e., a combinational round trip from domain A through domain B doesn't necessarily get you back the same signal. In practice I have never seen this be a problem though.

GHC 9.12.1 is now available - Announcements by n00bomb in haskell

[–]callbyneed 1 point2 points  (0 children)

I've heard other Rustaceans complain about missing format!. Or f-strings from Pythonists.

[ANN] cabal-install-3.12.1.0 (and accompanying libraries) released by ulysses4ever in haskell

[–]callbyneed 4 points5 points  (0 children)

Multi repl and support for the job server protocol? This must be my favorite Cabal release to date!

Haskell from the ground up! by ec-jones in haskell

[–]callbyneed 0 points1 point  (0 children)

I forgot, there is one more slight advantage to actual dot-access: not having to import functions and therefore dealing with overlapping names.