Nathan Howell NathanHowell
- Palo Alto, CA
- Sign in to view email
- https://breaks.for.alienz.org
View stack.yaml
resolver: ghc-8.0.0.20160111 | |
setup-info: | |
ghc: | |
linux64: | |
8.0.0.20160111: | |
url: "http://downloads.haskell.org/~ghc/8.0.1-rc1/ghc-8.0.0.20160111-x86_64-deb7-linux.tar.xz" | |
content-length: 111404852 | |
sha1: 30d39c6ca6994dcafe25595e053035ad23198b52 | |
macosx: | |
8.0.0.20160111: |
View better-compile-errors.hs
instance (a ~ Proxy "Sum types are not supported by LLVM") => GGetElementIndex a (x :+: y) where | |
type GGetElementPtrType a (x :+: y) = Void | |
ggetElementIndex _ _ = error "Sum types are not supported by LLVM" | |
type family StructElement (a :: [*]) (n :: Nat) :: * where | |
StructElement (x ': xs) 0 = x | |
StructElement (x ': xs) n = StructElement xs (n - 1) | |
StructElement '[] n = Proxy "Attempting to index past end of structure" |
View 1.idr
module Data.Fin | |
%default total | |
%access public export | |
||| Numbers strictly less than some bound. The name comes from "finite sets". | |
||| | |
||| It's probably not a good idea to use `Fin` for arithmetic, and they will be | |
||| exceedingly inefficient at run time. | |
||| @ n the upper bound |
View error.txt
[1 of 1] Compiling Repro ( repro.hs, interpreted ) | |
repro.hs:24:13: | |
Cannot instantiate unification variable ‛b0’ | |
with a type involving foralls: | |
(forall r. (a1 -> IO r) -> IO r) -> DecodeAST a1 | |
Perhaps you want ImpredicativeTypes | |
In the expression: | |
GHC.Prim.coerce | |
(anyContToM :: |
View gist:6880968
{-# LANGUAGE DefaultSignatures #-} | |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
import Data.Typeable | |
convert :: (Typeable t, Typeable b) => (forall a . Typeable a => a -> r) -> [t] -> b -> r | |
convert f (x:xs) b = convert f xs (x, b) | |
convert f [] b = f b |
View .gitignore
.cabal-sandbox/ | |
dist/ | |
cabal.config | |
cabal.sandbox.config | |
.*.swp |
View barf.txt
gdb ./a.out | |
GNU gdb 6.3.50-20050815 (Apple version gdb-1820) (Sat Jun 16 02:40:11 UTC 2012) | |
Copyright 2004 Free Software Foundation, Inc. | |
GDB is free software, covered by the GNU General Public License, and you are | |
welcome to change it and/or distribute copies of it under certain conditions. | |
Type "show copying" to see the conditions. | |
There is absolutely no warranty for GDB. Type "show warranty" for details. | |
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries .. done | |
(gdb) run |
View A.cmm
#include <Cmm.h> | |
getInfoTable (P_ a) | |
{ | |
W_ clos, info, type; | |
clos = UNTAG(a); | |
info = %GET_STD_INFO(clos); | |
return (info); | |
} |
View thread-fixio.hs
import Control.Concurrent | |
import System.IO | |
t :: ThreadId -> IO () | |
t tid = print ("mah thread", tid) | |
main :: IO () | |
main = do | |
_tid <- fixIO (forkIO . t) | |
threadDelay 100000000 |
View cn.hs
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE TypeSynonymInstances #-} | |
{-# LANGUAGE TypeOperators #-} | |
import Data.Proxy | |
import GHC.Generics |