This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Data.Set.Monad where | |
import Prelude | |
import Data.Set as S | |
import Data.Foldable | |
import Data.Tuple.Nested | |
import Unsafe.Coerce | |
-- data Set a where | |
-- Prim :: (Ord a) => S.Set a -> Set a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
import Prelude | |
newtype AnyShow = AnyShow (forall r. (forall a. Show a => a -> r) -> r) | |
mkAnyShow :: forall a. Show a => a -> AnyShow | |
mkAnyShow a = AnyShow (_ $ a) | |
elimAnyShow :: forall r. (forall a. Show a => a -> r) -> AnyShow -> r |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
import Data.Foldable | |
import Prelude | |
import Data.Set as S | |
-- data Set a where | |
-- Prim :: (Ord a) => S.Set a -> Set a | |
-- Return :: a -> Set a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
import Prelude | |
-- Trying to implement https://github.com/dorchard/effect-monad/blob/master/src/Control/Coeffect.hs | |
class CoEffect :: forall k. (k -> Type -> Type) -> ((k -> Type -> Type) -> k) -> ((k -> Type -> Type) -> k -> k -> k) -> Constraint | |
class CoEffect | |
-- class Coeffect (c :: k -> * -> *) where | |
c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
### [2023-06-19] UPDATE: Just tried to use my instructions again on a fresh install and it failed in a number of places. | |
###. Not sure if I'll update this gist (though I realise it seems to still have some traffic), but here's a list of | |
###. things to watch out for: | |
### - Check out the `nix-darwin` instructions, as they have changed. | |
### - There's a home manager gotcha https://github.com/nix-community/home-manager/issues/4026 | |
### | |
# I found some good resources but they seem to do a bit too much (maybe from a time when there were more bugs). | |
# So here's a minimal Gist which worked for me as an install on a new M1 Pro. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { LC, hot, useFiber } from '@use-gpu/live'; | |
import { HTML } from '@use-gpu/react'; | |
import { AutoCanvas, WebGPU } from '@use-gpu/webgpu'; | |
import { DebugProvider, FontLoader, PanControls, Flat, Pass, OrbitCamera, OrbitControls, | |
PointLight, AmbientLight, | |
} from '@use-gpu/workbench'; | |
import { UI, Layout, Flex, Block, Inline, Text } from '@use-gpu/layout'; | |
import { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*** | |
* Common tweaks | |
***/ | |
/* Using the Github Theme with a few tweaks */ | |
.theme-dark { | |
--background-primary: #1f1f1f; | |
} | |
/* display headings with normal font size */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NativeDatabase, SQLiteOpenOptions } from "./NativeDatabase"; | |
import { | |
NativeStatement, | |
SQLiteAnyDatabase, | |
SQLiteBindBlobParams, | |
SQLiteBindPrimitiveParams, | |
SQLiteColumnNames, | |
SQLiteColumnValues, | |
SQLiteRunResult, | |
} from "./NativeStatement"; |
OlderNewer