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 #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE ConstraintKinds #-} | |
module Data.HdrHistogram.Config.Test where | |
import Data.Proxy | |
import GHC.TypeLits (Nat, type (<=)) |
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
$ conda list | grep llvm | |
llvm 3.3 0 <unknown> | |
llvmlite 0.8.0 py27_0 defaults | |
llvmpy 0.12.7 py27_0 <unknown> |
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
; ModuleID = '-' | |
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" | |
target triple = "x86_64-unknown-linux-gnu" | |
%Si = type <{ i64 }> | |
%Vs5Int32 = type <{ i32 }> | |
%Sp = type <{ i8* }> | |
%swift.type = type { i64 } | |
%swift.type_pattern = type opaque | |
%swift.protocol = type { i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i32, i32 } |
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
module Eval ( | |
eval | |
) where | |
import Syntax | |
import Data.Functor ((<$>)) | |
isNum :: Expr -> Bool | |
isNum Zero = True | |
isNum (Succ x) = isNum x |
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
//----------------------------------------------------------------------------- | |
// MurmurHash3 was written by Austin Appleby, and is placed in the public | |
// domain. The author hereby disclaims copyright to this source code. | |
// Note - The x86 and x64 versions do _not_ produce the same results, as the | |
// algorithms are optimized for their respective platforms. You can still | |
// compile and run any of them on any platform, but your performance with the | |
// non-native version will be less than optimal. | |
#include "MurmurHash3.h" |
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
_class_template = '''\ | |
class {typename}(tuple): | |
'{typename}({arg_list})' | |
__slots__ = () | |
_fields = {field_names!r} | |
def __new__(_cls, {arg_list}): | |
'Create new instance of {typename}({arg_list})' |
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
Diehl | |
Asymptotics | |
frontend | |
AST | |
desugar | |
primops | |
unboxed | |
desugaring | |
Lexer | |
REPL |
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
module Eval (eval) where | |
import Syntax | |
import Control.Monad.State | |
import qualified Data.Map as Map | |
data Value | |
= VInt Int | |
| VUnit |
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
import Control.Monad | |
------------------------------------------------------------------------------- | |
-- State Monad Implementation | |
------------------------------------------------------------------------------- | |
newtype State s a = State { runState :: s -> (a,s) } | |
instance Monad (State s) where | |
return a = State $ \s -> (a, s) |
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 #-} | |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE QuasiQuotes #-} | |
{-# LANGUAGE TemplateHaskell #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
import TypeLevelString |