Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions _blogposts/archive/2020-03-26-generalize-uncurry.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,19 @@ message leaks the underlying encoding -- now all those limitations are gone!

**Previously:**

<img class="my-4" src="https://bucklescript.github.io/img/poly-error.png"/>
<img src="/static/blog/archive/poly-error.png" className="my-4 mx-auto max-h-[500px]"/>

<img src="https://bucklescript.github.io/img/label-error.png"/>
<img src="/static/blog/archive/label-error.png" className="my-4 mx-auto max-h-[500px]"/>

<img src="https://bucklescript.github.io/img/recursive-error.png"/>
<img src="/static/blog/archive/recursive-error.png" className="my-4 mx-auto max-h-[500px]"/>

The error messages above are cryptic and hard to understand. And the limitation of not supporting recursive functions make uncurried support pretty weak.

Now those limitations are all gone, you can have polymorphic uncurried recursive functions and it support labels.

<img src="https://bucklescript.github.io/img/uncurry-label.png"/>
<img src="/static/blog/archive/uncurry-label.png" className="my-4 mx-auto max-h-[500px]"/>

<img src="https://bucklescript.github.io/img/recursive.png"/>
<img src="/static/blog/archive/recursive.png" className="my-4 mx-auto max-h-[500px]"/>

The error message is also enhanced significantly

Expand Down
Binary file added public/static/blog/archive/label-error.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/static/blog/archive/poly-error.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/static/blog/archive/recursive-error.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/static/blog/archive/recursive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/static/blog/archive/uncurry-label.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 8 additions & 3 deletions src/Blog.res
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,13 @@ module FeatureCard = {
~firstParagraph: string="",
~slug: string,
) => {
let authorImg = <img className="h-full w-full rounded-full" src=author.imgUrl />

let authorImg = switch author.imgUrl {
| "" => React.null
| imgUrl =>
<div className="inline-block w-4 h-4 mr-2">
<img className="h-full w-full rounded-full" src=imgUrl />
</div>
}
<section
className="flex sm:px-4 md:px-8 lg:px-0 flex-col justify-end lg:flex-row sm:items-center h-full">
<div
Expand Down Expand Up @@ -166,7 +171,7 @@ module FeatureCard = {
<h2 className="hl-1"> {React.string(title)} </h2>
<div className="mb-6">
<div className="flex items-center body-sm text-gray-40 mt-2 mb-5">
<div className="inline-block w-4 h-4 mr-2"> authorImg </div>
authorImg
<div>
<a
className="hover:text-gray-60"
Expand Down
6 changes: 3 additions & 3 deletions src/common/BlogFrontmatter.res
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ let authors = [
username: "hongbo",
fullname: "Hongbo Zhang",
role: "Compiler & Build System",
imgUrl: "https://pbs.twimg.com/profile_images/1369548222314598400/E2y46vrB_400x400.jpg",
imgUrl: "",
social: X("bobzhang1988"),
},
{
username: "chenglou",
fullname: "Cheng Lou",
role: "Syntax & Tools",
imgUrl: "https://pbs.twimg.com/profile_images/554199709909131265/Y5qUDaCB_400x400.jpeg",
imgUrl: "",
social: X("_chenglou"),
},
{
username: "maxim",
fullname: "Maxim Valcke",
role: "Syntax Lead",
imgUrl: "https://pbs.twimg.com/profile_images/970271048812974080/Xrr8Ob6J_400x400.jpg",
imgUrl: "",
social: X("_binary_search"),
},
{
Expand Down
1 change: 1 addition & 0 deletions tailwind.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export default {
content: [
"./src/**/*.{mjs,js,res}",
"./pages/**/*.{mjs,js,mdx}",
"./_blogposts/**/*.mdx"
],
theme: {
extend: {
Expand Down