This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.cabal-sandbox/ | |
dist/ | |
cabal.config | |
cabal.sandbox.config | |
.*.swp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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 :: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
connectionUrl :: Monad m => ReaderT m Config B.ByteString | |
-- withConnection | |
-- :: (Database.PostgreSQL.Simple.Internal.Connection -> IO c) | |
-- -> ReaderT Config IO c | |
withConnection f = do | |
url <- connectionUrl | |
liftIO $ bracket (connectPostgreSQL url) close f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
cat > /etc/yum.repos.d/upgrade.repo <<END | |
[upgrade] | |
name=upgrade | |
baseurl=http://dev.centos.org/centos/6/upg/x86_64/ | |
enabled=1 | |
gpgcheck=0 | |
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE RankNTypes #-} | |
import qualified GHC.Event | |
data TimerManager2 = TimerManager2 | |
{ registerTimeout :: Int -> GHC.Event.TimeoutCallback -> IO GHC.Event.TimeoutKey | |
, updateTimeout :: GHC.Event.TimeoutKey -> Int -> IO () | |
, unregisterTimeout :: GHC.Event.TimeoutKey -> IO () | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE TypeOperators #-} | |
import GHC.Generics | |
import Data.Foldable as Foldable | |
import Data.Monoid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foo :: Int -> Int | |
foo x | x > 0 = x -1 | |
foo x | otherwise = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Licensed to the Apache Software Foundation (ASF) under one or more | |
* contributor license agreements. See the NOTICE file distributed with | |
* this work for additional information regarding copyright ownership. | |
* The ASF licenses this file to You under the Apache License, Version 2.0 | |
* (the "License"); you may not use this file except in compliance with | |
* the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |