Skip to content

Instantly share code, notes, and snippets.

@lewurm
lewurm / .gitignore
Created June 10, 2012 09:17
haskell: get address of a haskell function (at runtime)
*.hi
*_stub.h
*.o
main
@lewurm
lewurm / .gitignore
Created May 18, 2012 10:47
ghci: "GHCi runtime linker: fatal error: I found a duplicate definition for symbol"
*.hi
*_stub.*
ffiso
@lewurm
lewurm / .gitignore
Created April 26, 2012 21:13
ghc: segmentation fault under strange conditions
*.hi
stackoverflow_segv
@lewurm
lewurm / .gitignore
Created April 12, 2012 11:06
ghci doesn't work with FFI export declarations?
*.hi
*_stub.*
ffiso
@lewurm
lewurm / .gitignore
Created June 8, 2011 18:25
C implementation of assignment 13.12.2010. compiler + VM.
13122010
*.o
" diese datei nach ~/.vim/syntax/ub10.vim kopieren und
" folgendes in die ~/.vimrc schmeissen:
" > syntax on
" > filetype on
" > augroup filetypedetect
" > au BufNewFile,BufRead *.0 setf ub10
" > au BufNewFile,BufRead *.1 setf ub10
" > au BufNewFile,BufRead *.2 setf ub10
" > au BufNewFile,BufRead *.3 setf ub10
" > augroup END
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
extern unsigned char *asmb(unsigned char *a);
unsigned char *asmb_ref(unsigned char *s)
{
unsigned long i;
for (i=0; s[i]; i++) {
#! runhugs
-- Testfaelle fuer Aufgabe 6 der LVA 185.161 Funktionale Programmierung im WS09/10
-- an der Technischen Universitaet Wien
-- Aufgabenstellung: http://www.complang.tuwien.ac.at/knoop/fp185161_ws0910.html
-- Module ----------------------------------------------------------------------
module Main where