Skip to content

Instantly share code, notes, and snippets.

@isomorphism
isomorphism / Main.hs
Created April 20, 2014 22:01
ghcjs issue
module Main where
import GHCJS.DOM
import GHCJS.DOM.Types
import GHCJS.DOM.Document
import GHCJS.DOM.EventM
main = do
Just doc <- currentDocument
connect "keydown" doc $ do
@isomorphism
isomorphism / Bug.hs
Created August 7, 2014 00:27
GHCJS storable vector bug?
module Main where
import Data.Vector.Storable as V
main = do
print $ V.fromList [1..9 :: Float]
-- output:
-- "fromList [5.831554e-39,5.831554e-39,1.0,1.0,1.0,1.0,1.0,1.0,1.0]"
@isomorphism
isomorphism / A.hs
Created February 22, 2015 09:36
Kind incompatibility error
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE PolyKinds #-}
module A where
import Control.Lens
import Data.Vinyl
import GHC.TypeLits
class A f where
@isomorphism
isomorphism / output.txt
Created September 25, 2015 04:12
parsing with annotated hex dump
----------------------------------------------------------------------
vertex group
0x00004394 - 0x000043c3
0x4394 flags: 1073741826
0x4398 (16 bytes skipped):
0x43a8 vertex array bytes array, # entries: 135800
0x43ac vertex array bytes array offset: 0x47178
0x43b0 (8 bytes skipped):
0x43b8 vertex array stride bytes: 40