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 OverloadedStrings #-} | |
module Main where | |
import Neovim | |
import Neovim.API.Plugin | |
import qualified Data.ByteString as B | |
import Data.List (foldl', sortBy) | |
import Data.MessagePack |
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 QuasiQuotes #-} | |
import Language.Haskell.Exts.QQ | |
main = print [hs| \x -> case x of { 0 -> True; _ -> odd (x - 1) } |] |
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
-- | Spawn N threads, each one adding new elements to sets randomly | |
-- selected from a pool of sets. | |
module Main where | |
import Control.Concurrent | |
import Control.DeepSeq | |
import Control.Monad | |
import Data.IORef | |
import Data.Maybe | |
import qualified Data.Set as 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
module Main where | |
import qualified Data.ByteString as B | |
import Data.MessagePack (Object) | |
import Data.Serialize (decode) | |
import System.IO (hGetContents) | |
import System.Process | |
main :: IO () | |
main = do |
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
# Some utilities to record jump table/virtual method calls. | |
# Implemented commands: | |
# `dynamics break-from-file`: reads an objdump output from given file and adds breakpoints to | |
# to dynamic calls. When one of the breakpoints are hit, it records jump address without | |
# dropping to the GDB prompt. | |
# `dynamics save`: saves collected dynamic call info to the hard-coded file `breakpoint_info`. | |
# `dynamics print`: prints collected dynamic call info. | |
# `dynamics disable-hits`: disables breakpoints that are hit at least one time. | |
# WIP, NOT WORKING YET: | |
# `dynamics note`: This should be run when $eip is on a dynamic call instruction. |
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 = 'hello' | |
define i64 @add(i64 %a, i64 %b) { | |
%1 = alloca i64 | |
store i64 %a, i64* %1 | |
%2 = alloca i64 | |
store i64 %b, i64* %2 | |
%3 = load i64* %1 | |
%4 = load i64* %2 | |
%5 = add i64 %3, %4 |
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 Cardinality where | |
open import Data.Bool using (Bool; true; false) | |
open import Data.Nat | |
open import Data.Fin using (Fin; zero; suc) | |
open import Data.Sum | |
open import Data.Product | |
open import Relation.Binary.PropositionalEquality | |
open import Function |
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
diff --git k-core/src/main/java/org/kframework/backend/java/symbolic/KILtoBackendJavaKILTransformer.java k-core/src/main/java/org/kframework/backend/java/symbolic/KILtoBackendJavaKILTransformer.java | |
index 12ab701..28f9aca 100644 | |
--- k-core/src/main/java/org/kframework/backend/java/symbolic/KILtoBackendJavaKILTransformer.java | |
+++ k-core/src/main/java/org/kframework/backend/java/symbolic/KILtoBackendJavaKILTransformer.java | |
@@ -537,11 +537,11 @@ public class KILtoBackendJavaKILTransformer extends CopyOnWriteTransformer { | |
java.util.Map<CellLabel, Term> lhsOfReadCell = null; | |
java.util.Map<CellLabel, Term> rhsOfWriteCell = null; | |
if (ruleData.isCompiledForFastRewriting()) { | |
- lhsOfReadCell = Maps.newHashMap(); | |
+ lhsOfReadCell = Maps.newLinkedHashMap(); |
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
%default total | |
class Cardinality (a : Type) (n : Nat) where | |
toFin : a -> Fin n | |
fromFin : Fin n -> a | |
bijective : (a' : a) -> fromFin (toFin a') = a' | |
bijective_inv : (f : Fin n) -> toFin (fromFin f) = f | |
data T = A | B | C |