以下を満たすプログラミング言語を目指す.
- APIのバージョンをコントロールできる.
- APIの変更を検査し,変更が破壊的であるかを保証できる.
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE TypeOperators #-} | |
module NatTrans where | |
import Data.Foldable | |
import Data.Functor.Identity | |
newtype f :~> g = NT |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE PatternSynonyms #-} | |
module WithRecursion where | |
-- | With recursive | |
newtype K a r = K a | |
newtype I r = I r | |
data (f * g) r = Pair (f r) (g r) | |
data (f + g) r = InL (f r) | InR (g r) |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE FunctionalDependencies #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE UndecidableInstances #-} |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE NoMonomorphismRestriction #-} | |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE BangPatterns #-} | |
module ConduitCerealExt where | |
import Control.Exception.Base | |
import Control.Monad.Trans.Resource (MonadThrow, throwM) | |
import qualified Data.ByteString as BS |
Mizunashi Mana has waived all copyright and related or neighboring rights to MPL Notice Template.
{-# LANGUAGE BlockArguments #-} | |
{-# LANGUAGE ConstraintKinds #-} | |
{-# LANGUAGE DefaultSignatures #-} | |
{-# LANGUAGE DeriveFunctor #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
{-# LANGUAGE QuantifiedConstraints #-} | |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE ScopedTypeVariables #-} |
CC := cc | |
CXX := c++ | |
GHC := ghc | |
RUSTC := rustc | |
JAVAC := javac | |
CPPFLAGS := | |
CFLAGS := -std=c99 | |
CXXFLAGS := -std=c++14 |
module NaiveParser where | |
import Control.Monad | |
import Data.Maybe (fromMaybe) | |
import Text.ParserCombinators.Parsec | |
data Block = List [Block] | ListItem String | |
deriving Show |
module Bench.StateVSIORef where | |
import Data.IORef | |
import Control.Monad.State.Strict | |
n :: Int | |
n = 10000 * 10000 | |
rotate :: [a] -> [a] |