Skip to content

Instantly share code, notes, and snippets.

Avatar
🇸🇬

Moritz Angermann angerman

🇸🇬
View GitHub Profile
View pkgs.nix
{ pkgs ? import <nixpkgs> {}
}:
let
overrideWith = override: default:
let
try = builtins.tryEval (builtins.findFile builtins.nixPath override);
in if try.success then
builtins.trace "using search host <${override}>" try.value
else
default;
View Poll.hs
{-# LINE 1 "libraries/base/GHC/Event/Poll.hsc" #-}
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE GeneralizedNewtypeDeriving
, NoImplicitPrelude
, BangPatterns
#-}
module GHC.Event.Poll
(
new
View Main.ll
; ModuleID = '<stdin>'
source_filename = "Main.ll"
target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
target triple = "arm-unknown-linux-gnueabihf"
@.str = private unnamed_addr constant [6 x i8] c"%lld\0A\00", align 1
@Main_f_closure = local_unnamed_addr global { i32 } { i32 ptrtoint (void (i32*, i32*, i32*, i32, i32, i32, i32, i32)* @Main_f_info to i32) }
@Main_zdtrModule4_bytes = global { [5 x i8] } { [5 x i8] c"main\00" }
@Main_zdtrModule3_closure = global { i32, i32 } { i32 ptrtoint (i32* @ghczmprim_GHCziTypes_TrNameS_con_info to i32), i32 ptrtoint ({ [5 x i8] }* @Main_zdtrModule4_bytes to i32) }
View Main.ll
; ModuleID = '<stdin>'
source_filename = "Main.ll"
target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
target triple = "arm-unknown-linux-gnueabihf"
@Main_f_closure = local_unnamed_addr global { i32 } { i32 ptrtoint (void (i32*, i32*, i32*, i32, i32, i32, i32, i32)* @Main_f_info to i32) }
@Main_zdtrModule4_bytes = global { [5 x i8] } { [5 x i8] c"main\00" }
@Main_zdtrModule3_closure = global { i32, i32 } { i32 ptrtoint (i32* @ghczmprim_GHCziTypes_TrNameS_con_info to i32), i32 ptrtoint ({ [5 x i8] }* @Main_zdtrModule4_bytes to i32) }
@Main_zdtrModule2_bytes = global { [5 x i8] } { [5 x i8] c"Main\00" }
@Main_zdtrModule1_closure = global { i32, i32 } { i32 ptrtoint (i32* @ghczmprim_GHCziTypes_TrNameS_con_info to i32), i32 ptrtoint ({ [5 x i8] }* @Main_zdtrModule2_bytes to i32) }
View Main.ll
; ModuleID = '<stdin>'
source_filename = "Main.ll"
target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
target triple = "arm-unknown-linux-gnueabihf"
@r2Pd_bytes = private global { [5 x i8] } { [5 x i8] c"main\00" }
@r2Ps_closure = private global { i32, i32 } { i32 ptrtoint (i32* @ghczmprim_GHCziTypes_TrNameS_con_info to i32), i32 ptrtoint ({ [5 x i8] }* @r2Pd_bytes to i32) }
@r2Pt_bytes = private global { [5 x i8] } { [5 x i8] c"Main\00" }
@r2Pu_closure = private global { i32, i32 } { i32 ptrtoint (i32* @ghczmprim_GHCziTypes_TrNameS_con_info to i32), i32 ptrtoint ({ [5 x i8] }* @r2Pt_bytes to i32) }
@Main_zdtrModule_closure = local_unnamed_addr global { i32, i32, i32, i32 } { i32 ptrtoint (i32* @ghczmprim_GHCziTypes_Module_con_info to i32), i32 add (i32 ptrtoint ({ i32, i32 }* @r2Ps_closure to i32), i32 1), i32 add (i32 ptrtoint ({ i32, i32 }* @r2Pu_closure to i32), i32 1), i32 3 }
View Main.dump-simpl
==================== Tidy Core ====================
2017-11-28 12:35:17.812664 UTC
Result size of Tidy Core
= {terms: 121, types: 172, coercions: 9, joins: 0/0}
-- RHS size: {terms: 3, types: 3, coercions: 0, joins: 0/0}
f [InlPrag=NOINLINE] :: forall a. a -> a
[GblId,
View Main.dump-simpl
==================== Tidy Core ====================
2017-11-28 12:34:31.425861 UTC
Result size of Tidy Core
= {terms: 51, types: 32, coercions: 0, joins: 0/0}
-- RHS size: {terms: 3, types: 3, coercions: 0, joins: 0/0}
f_rqh :: forall a. a -> a
[GblId, Arity=1, Caf=NoCafRefs]
View T6084.hs
{-# LANGUAGE MagicHash, BangPatterns #-}
module Main where
import GHC.Exts
{-# NOINLINE f #-}
f :: (Int# -> Float# -> Double# -> Float# -> Double# -> String) -> String
f g = g 3# 4.0# 5.0## 6.0# 6.9## ++ " World!"
{-# NOINLINE p #-}
@angerman
angerman / helloBranch
Created Jul 28, 2016
Haskellish disassembly of an LLVM module.
View helloBranch
Module
Version 1
Triple
Datalayout
Globals
0 : @.str :: [16 x i8]*
1 : @.str.1 :: [13 x i8]*
2 : @str :: [12 x i8]*
3 : \main :: ((i32, i8**) -> i32)*
4 : \printf :: ((i8*, ...) -> i32)*
View keybase.md

Keybase proof

I hereby claim:

  • I am angerman on github.
  • I am angerman (https://keybase.io/angerman) on keybase.
  • I have a public key whose fingerprint is D911 CD44 6398 8B80 97E1 7856 6A30 3B61 31E5 29AC

To claim this, I am signing this object: