Skip to content

Instantly share code, notes, and snippets.

@Talndir
Talndir / FizzBuzz.hs
Last active January 12, 2024 16:53
FizzBuzz in Haskell at the type level. Use `:t fizzbuzz` in GHCi to get the output.
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE UndecidableInstances #-}
module FizzBuzz where
import Data.Kind (Type)
import GHC.TypeLits (Symbol, AppendSymbol)
data Nat :: Type where
@Talndir
Talndir / aoc_2023_day2.scala
Created December 22, 2023 00:52
AoC 2023 Day 2 - Mistake somewhere?
package day21
import parsley.Parsley
import parsley.combinator.{some}
import parsley.implicits.zipped.*
import parsing.Parsing.*
import day.Day
import coord.*
import Dir.*
@Talndir
Talndir / Example.agda
Created December 1, 2022 14:53
Instance search issue in Agda
module Example where
open import Data.List
open import Data.Bool
open import Relation.Binary.PropositionalEquality
data Rose : Set where
V : Bool → Rose
B : List Rose → Rose