löb is a well-known function in Haskell for implementing spreadsheet-like behaviors and tying the knot. It is defined as:
loeb :: Functor f => f (f a -> a) -> f a
loeb fs = xs
where xs = fmap ($ xs) fs
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE RecordWildCards #-} | |
module Interpolate (plugin) where | |
import GhcPlugins | |
import HsSyn | |
import qualified Data.Generics as SYB | |
plugin :: Plugin |
#include <stdint.h> | |
double ker(void) { return 42.0; } | |
// Can't link with compiler-rt because their built-ins also use SSE registers. | |
// A super naive double to int conversion function that only works on small positive integers. | |
int64_t naive_dtoi(double x) { | |
uint64_t u = (union { double d; uint64_t u; }) { x }.u; | |
return ((u & 0xfffffffffffff) | (1ULL << 52)) >> (1075 - ((u >> 52) & 0x7ff)); | |
} |
#include <iostream> | |
#include <string> | |
struct table { | |
std::string s; | |
table() {} | |
~table() { std::cout << this->s; } | |
table(const int n) : s{std::to_string(n)} {} | |
table(std::string&& s_) : s{std::move(s_)} {} |
[Version] | |
AppVersion=5.3-656-gb8440087 | |
Version=331 | |
[General] | |
Rank=0 | |
ColorLabel=0 | |
InTrash=false | |
[Exposure] |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
module Main where | |
import Data.Reflection | |
newtype QDouble = QDouble Double | |
newtype Step = Step Double |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE FunctionalDependencies #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE TemplateHaskell #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE OverloadedLabels #-} |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE FunctionalDependencies #-} | |
{-# LANGUAGE PatternSynonyms #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE ViewPatterns #-} | |
{-# LANGUAGE TemplateHaskell #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE DataKinds #-} |
{-# LANGUAGE ExplicitForAll #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE PatternSynonyms #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE TypeSynonymInstances #-} | |
module Data.DynT where |
löb is a well-known function in Haskell for implementing spreadsheet-like behaviors and tying the knot. It is defined as:
loeb :: Functor f => f (f a -> a) -> f a
loeb fs = xs
where xs = fmap ($ xs) fs
Dungeon Crawl Stone Soup version 0.18-a0-1212-g3cecdf7 (tiles) character file. | |
1315647 pkmx the Demonologist (level 26, 182/182 HPs) | |
Began as a Gargoyle Summoner on Feb 12, 2016. | |
Was the Champion of Sif Muna. | |
Escaped with the Orb | |
... and 3 runes on Feb 13, 2016! | |
The game lasted 09:29:09 (109962 turns). |