This file contains 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
@require: easytable/easytable | |
@require: stdja | |
@require: ncsq/ncsq | |
document (| | |
title = {ほげふが}; | |
author = {}; | |
show-title = true; | |
show-toc = true; | |
|) '< |
This file contains 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
let const a _ = a | |
let always-zero = const 0 | |
let _ = always-zero (always-zero true) % Error! | |
% ^~~~~~~~~~~~~~~~~ | |
% Type Error | |
% this expression has type | |
% int, | |
% but is expected of type | |
% bool. |
This file contains 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
@require: stdjareport | |
@require: math | |
document (| | |
title = {あああああ}; | |
author = {mr_konn}; | |
date = {2022/04/23}; | |
|) '< | |
+chapter{あああああ}< | |
+proof{ | |
ううううううう |
This file contains 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
$ stack ghci --verbose | |
Version 2.5.1, Git revision d6ab861544918185236cf826cb2028abb266d6d5 x86_64 hpack-0.33.0 | |
2021-01-29 22:44:07.844116: [debug] Checking for project config at: /Users/hiromi/Documents/Programming/Haskell/git/hls-conditional-modules/stack.yaml | |
2021-01-29 22:44:07.844573: [debug] Loading project config file stack.yaml | |
2021-01-29 22:44:07.849169: [debug] (SQL) SELECT COUNT(*) FROM "last_performed" WHERE ("action"=?) AND ("timestamp">=?); [PersistInt64 1,PersistUTCTime 2021-01-28 13:44:07.849126 UTC] | |
2021-01-29 22:44:07.850659: [debug] Using package location completions from a lock file | |
2021-01-29 22:44:07.852246: [debug] Loaded snapshot from Pantry database. | |
2021-01-29 22:44:08.007014: [debug] RawSnapshotLayer {rslParent = RSLCompiler (WCGhc (mkVersion [8,10,3])), rslCompiler = Nothing, rslLocations = [RPLIHackage AC-Angle-1.0@sha256:e1ffee97819283b714598b947de323254e368f6ae7d4db1d3618fa933f80f065,544 (Just (TreeKey 7edd1f1a6228af27c0f0ae53e73468c1d7ac26166f2cb386962db7ff021a2714,210)),RPLIHa |
This file contains 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
{-# LANGUAGE DuplicateRecordFields, OverloadedStrings, RecordWildCards #-} | |
module JSaddleCompat (runApp, App(..)) where | |
import qualified Language.Javascript.JSaddle.Warp as JSaddle | |
import Miso (startApp, syncPoint) | |
import qualified Miso as Miso | |
import Network.HTTP.Client.Conduit (Manager, newManager) | |
import Network.HTTP.ReverseProxy (WaiProxyResponse (..), | |
defaultOnExc, waiProxyTo) | |
import Network.Wai (Application, pathInfo) | |
import qualified Network.Wai.Handler.Warp as Warp |
This file contains 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
{-# LANGUAGE DataKinds, FlexibleContexts, FlexibleInstances, PolyKinds #-} | |
{-# LANGUAGE RankNTypes, RecordWildCards, StandaloneDeriving, TypeFamilies #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
module Lib where | |
import Data.Functor.Identity | |
import Options.Applicative | |
someFunc :: IO () | |
someFunc = putStrLn "someFunc" |
This file contains 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
{-# LANGUAGE PolyKinds, DataKinds, TypeFamilies, GADTs, DeriveDataTypeable, TypeApplications #-} | |
data Foo (a :: Maybe b) where { Any :: Foo a; Bang :: Foo (Just t) } | |
newtype F a (t :: Maybe s) (u :: Foo t) | |
= F { runF :: a} deriving (Show, Eq, Ord, Typeable) | |
main :: IO () | |
main = print $ typeRep $ Proxy @(F Int ('Just ()) Any) | |
-- ~> No instance for (Typeable (F2 Int ('Just ()))) |
This file contains 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
define IsSemigroup(#ty, #mul) = | |
(record | |
[assoc: | |
(-> | |
[a b c: #ty] | |
(= #ty | |
($ #mul a ($ #mul b c)) | |
($ #mul ($ #mul a b) c) | |
) | |
) |
This file contains 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
{-# LANGUAGE DataKinds, FlexibleContexts, FlexibleInstances, KindSignatures #-} | |
{-# LANGUAGE LiberalTypeSynonyms, RankNTypes, ScopedTypeVariables #-} | |
{-# LANGUAGE TypeFamilies, TypeOperators, TypeSynonymInstances #-} | |
module ConstraintUnion where | |
import Data.Kind | |
import Data.Proxy | |
import Data.Singletons.Prelude | |
import Data.Singletons.Prelude.Ord | |
import Data.Type.Equality | |
import GHC.TypeNats |
This file contains 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
use std::marker::PhantomData; | |
pub trait Nat { | |
type Eval; | |
fn as_int() -> usize; | |
} | |
#[derive(Debug)] | |
pub struct Zero {} |
NewerOlder