Skip to content
0:00 / 0:00

#layout-rule#syntax#ghc

@rae: How whitespace works in Haskell

Tweag by Modus Create

5K subscribers • 25 videos on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.
  • Presented by Richard Eisenberg, software engineer at Tweag

Beginner. No background in the topic needed.

2.8K views5 years ago1 recommendation

Programming languagesHaskellLanguage design and type systems

Richard Eisenberg explains Haskell's layout rule and how whitespace works in practice.

We explore Haskell's layout rule, and how it works in practice. Official description of that layout rule: haskell.org/onlinereport/haskell2010/haskellch2.html#x7-2100… Find me at richarde.dev/

Why it's here

1 person recommends this

What people say. Recommended as a clear explanation of Haskell's layout and indentation rules.

u/libeakoin r/haskell • Recommends

Richard Eisenberg: How whitespace works in Haskell

u/Spasmodic_Ramblingsin r/haskell • Mentions

On “Indentation rules”

If you want a more expansive explanation than in the report listed in the other comment (and/or prefer video format), I highly recommend this video: [video

u/UnclearVoyantin r/haskell • Mentions

On “Desugaring confusion with `do`”

This video clarifies a lot about indentation scopes link to this video

u/cyrus_t_crumplesin r/haskell • Mentions

On “Haskell For Dilettantes - Part 2 (Expressions, Simple types, Simple functions)”

When you say "can I bind a name to something without using a function?", I think the better phrasing would have been "Can I bind a name just using an expression?" I felt like you were going for making a binding without a "top-level declaration", but that's a bit of jargon that maybe you don't want to introduce at this stage. > I think you can extend this out as far as you want Haha, you can't go higher than 63-tuples, I think! WRT indentation concerns, I cannot recommend the lovely Richard Eisenberg video on whitespace high enough. When you started introducing typed holes, you were saying that "The compiler doesn't actually know what should go there!" and you were saying that the hole…