Skip to content

Instantly share code, notes, and snippets.

View expipiplus1's full-sized avatar
🙀
Trying to `fix error` in Haskell

Ellie Hermaszewska expipiplus1

🙀
Trying to `fix error` in Haskell
View GitHub Profile
module GL where
import Graphics.GL
-- Newtype for Buffers
newtype Buffer = Buffer GLuint
-- A class for types which map to a glenum
class IsGLenum e where
toGLenum :: e -> GLenum
data A = A
data B = B
class C c where
<perhaps something here>
instance C A where
instance C B where
<some crazy patterns>
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'Chiel92/vim-autoformat'
Plugin 'Shougo/neocomplete.vim'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" height="119.19450287816603" stroke-opacity="1" viewBox="0 0 400 119" font-size="1" width="399.99999999999994" xmlns:xlink="http://www.w3.org/1999/xlink" stroke="rgb(0,0,0)" version="1.1">
<g>
<defs>
</defs>
<g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.8734098799648781" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0">
<path d="M 320.7541568588114,39.742059131789404 c -7.735625478416154e-2,0.909291528759091 0.9496496963951931,2.166088803874879 2.3377988858351157 2.2909099677362113c 1.4320660804329717,-0.391404150572989 2.6556946499883916,-1.4458263334136037 2.776967795765601 -2.871343176607017c 0.1651900367702587,-1.9417421576277372 -0.8618159144090959,-3.1985394327435244 -2.2499651038490187 -3.3233605966048585c -1.3442322984468744,-0.6410
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
module Main where
import Data.Conduit
import Control.Monad.IO.Class
import Control.Monad
source :: Source IO Char
source = forever $
do a <- liftIO getChar
yield a
fromStorable :: Storable a => a -> IO ByteString
fromStorable a =
do mem <- malloc
poke mem a
unsafePackMallocCStringLen (castPtr mem, sizeOf a)
{-# LANGUAGE DataKinds #-}
foo :: '[Bar 1000]
foo = undefined
type Bar1000 = Bar 1000
foo' :: '[Bar1000]
foo' = undefined
#include <WProgram.h>
#include <usb_serial.h>
#include <usb_joystick.h>
#include <joystick-input.h>
int main() {
pinMode(13, OUTPUT);
Joystick.useManualSend(true);
{-# LANGUAGE DeriveDataTypeable #-}
module Main where
import Control.Applicative
import Control.Concurrent(forkIO)
import Control.Monad hiding(mapM)
import Control.Monad.IO.Class
import qualified Data.ByteString as B (putStr, pack, length)
import Data.ByteString.Lazy (toStrict)