Skip to content

Instantly share code, notes, and snippets.

checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
struct Point2d<T>(T, T);
struct Point3d<T>(T, T, T);
fn do_stuff<P, T>(p: P<T>) -> P<T> {
p
}
-- While building custom Setup.hs for package ghc-paths-0.1.0.9 using:
/private/var/folders/gl/zvl8d6415vsbkd50nnll95k40000gs/T/stack18866/ghc-paths-0.1.0.9/.stack-work/dist/x86_64-osx/Cabal-2.0.1.0/setup/setup --builddir=.stack-work/dist/x86_64-osx/Cabal-2.0.1.0 configure --with-ghc=/Users/eschnett/.stack/programs/x86_64-osx/ghc-8.2.2/bin/ghc --with-ghc-pkg=/Users/eschnett/.stack/programs/x86_64-osx/ghc-8.2.2/bin/ghc-pkg --user --package-db=clear --package-db=global --package-db=/Users/eschnett/.stack/snapshots/x86_64-osx/lts-11.0/8.2.2/pkgdb --libdir=/Users/eschnett/.stack/snapshots/x86_64-osx/lts-11.0/8.2.2/lib --bindir=/Users/eschnett/.stack/snapshots/x86_64-osx/lts-11.0/8.2.2/bin --datadir=/Users/eschnett/.stack/snapshots/x86_64-osx/lts-11.0/8.2.2/share --libexecdir=/Users/eschnett/.stack/snapshots/x86_64-osx/lts-11.0/8.2.2/libexec --sysconfdir=/Users/eschnett/.stack/snapshots/x86_64-osx/lts-11.0/8.2.2/etc --docdir=/Users/eschnett/.stack/snapshots/x86_64-osx/lts-11.0/8.2.2/doc/ghc-paths-0.1.0.9 --
module Category where
import Data.Constraint
import Data.Kind
type CatKind = Type -> Constraint
type ObjKind = Type
type MorKind = Type -> Type -> Type
@eschnett
eschnett / TurtleLong.hs
Created November 20, 2017 16:08
Run this as `view (long (ls "."))`
{-# LANGUAGE OverloadedStrings #-}
module TurtleLong (long) where
import qualified Data.Text as T
import Prelude hiding (FilePath)
import Data.Time.Clock.POSIX
import Turtle
@eschnett
eschnett / manifold.hs
Created April 20, 2017 17:30
Associated type instances
class Manifold m where
type Bnd m :: * -> *
instance Functor (Bnd m)
instance Manifold Grid where
type Bnd Grid a = GridBnd a
template <typename F, typename Z, typename FT,
typename FX = typename foldable<std::decay_t<FT>>::unbind_t,
typename T = typename foldable<std::decay_t<FT>>::value_type,
typename R = std::decay_t<std::result_of_t<F(T, Z)>>,
typename std::enable_if_t<
std::is_convertible<Z, R>::value &&
std::is_same<R, std::decay_t<std::result_of_t<F(T, R)>>>::value>
* = nullptr>
inline R foldr(F &&f, Z &&z, FT &&xs) {
return foldable<FX>::foldr(std::forward<F>(f), std::forward<Z>(z),
+ spack env lmod
+ '[' -n '' ']'
+ args=("$@")
+ _sp_flags=
+ [[ env =~ ^- ]]
+ [[ ! -z '' ]]
+ _sp_subcommand=env
+ shift
+ _sp_spec=lmod
+ case $_sp_subcommand in