fakenickels / hkt-fakenickels

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Higher Kinded Sketch from this tweet

Some experiments with lightweight higher kinded types in OCaml with @reasonml that I'm using to grasp it better (not a proper blog post or tutorial at all). Probably once I grasp it better I'll do a better refined one.https://t.co/2YsbY3SLwQ pic.twitter.com/G8FyGJwWG5

— fakenickels (@fakenickels) September 1, 2020
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

Error

  We've found a bug for you!
  /Users/mandalarian/Downloads/hkt-fakenickels/src/Demo.re:199:9-11

  197 │
  198 │ let intMax = (type field, module Lenses: LensesHKT with type t = fiel
        d, ~maxt, field: app(int, field)) =>
  199 │  IntMax(max, field)
  200 │ intMax((module StateLensesHKT), ~max=18, StateLensesHKT.inj(StateLens
        es.Age))
  201 │ /* type checks! */

  This has type: ('a, 'a) => 'a
  Somewhere wanted: int

Build + Watch

# for yarn
yarn start

# for npm
npm run start

Sketch.sh Links Are Broken

I recovered this sketch with the excellent letouzey/sketch-downloader by building and running:

Target sketch is: https://sketch.sh/s/accmipAxAqXppOk30IIDa0/

Below we are just using the hash,accmipAxAqXppOk30IIDa0.

> ./getsketch.sh accmipAxAqXppOk30IIDa0 dump.json
> dune exec ./transketch.exe dump.json

Thanks, Letouzey, whoever you are.

About


Languages

Language:OCaml 77.2%Language:Reason 22.8%