Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env stack
-- stack --install-ghc --resolver lts-6.1 runghc --package http-conduit
{-# LANGUAGE TypeFamilies, UndecidableInstances #-}
module HangGhc where
type family List a :: *
type instance List a = Either () (a, List a)
-- Hangs ghc 6.12.1:
#!/usr/bin/env stack
-- stack --install-ghc --resolver lts-6.1 runghc --package http-conduit
{-# LANGUAGE InstanceSigs, FlexibleInstances, KindSignatures, TypeFamilies, LambdaCase #-}
{-# LANGUAGE OverloadedStrings, RankNTypes, MultiParamTypeClasses, FunctionalDependencies #-}
{-# LANGUAGE ScopedTypeVariables, UnicodeSyntax, PartialTypeSignatures #-}
module MainFunctionalUnparsing where
import Data.Proxy
import Prelude.Unicode
resolver: lts-5.5
nix:
enable: true
packages:
- nodejs-5_x
compiler: ghcjs-0.2.0.20160315_ghc-7.10.2
compiler-check: match-exact
setup-info:
{ stdenv, fetchFromGitHub, fetchpatch, git, mono, v8, icu, subversion, python, which }:
# There are some similarities with the pinta derivation. We should
# have a helper to make it easy to package these Mono apps.
stdenv.mkDerivation rec {
name = "EventStore-${version}";
version = "3.5.0";
src = fetchFromGitHub {
owner = "EventStore";
system-ghc: false
extra-deps:
- web-routes-0.27.9
- blaze-builder-0.4.0.1
- exceptions-0.8.0.2
- http-types-0.8.6
- parsec-3.1.9
- split-0.2.2
- utf8-string-1.0.1.1
- transformers-compat-0.4.0.4
/Users/nrolland/Sync/clones/yackage-0.8.0/yackage.hs:115:20:
Ambiguous occurrence ‘toHtml’
It could refer to either ‘Yesod.Core.toHtml’,
imported from ‘Yesod.Core’ at yackage.hs:9:1-17
(and originally defined in ‘blaze-html-0.8.1.0@blaze_4GWZ0kMoMPPJKX71fHjppL:Text.Blaze.Html’)
or ‘Text.Blaze.Html.toHtml’,
imported from ‘Text.Blaze.Html’ at yackage.hs:43:25-30
@nrolland
nrolland / lts36packageslimited.nix
Created October 5, 2015 14:45
nix 3.6 packages working on macos yosemite and elcapitan
p : with p; [
AC-Vector
#Agda
BlastHTTP
BlogLiterately
BlogLiterately-diagrams
Boolean
BoundedChan
Cabal
Cabal-ide-backend
test :: MonadPlus m => m a
test =
let r = mzero :: m a
in let r' :: m a = mzero
in mzero
~/c/g/gloss-examples git:tags/v1.8.2.1 ❯❯❯ cabal install sandboxed ⏎ ◼
Resolving dependencies...
Notice: installing into a sandbox located at
/Users/nrolland/clones/gloss/gloss-examples/.cabal-sandbox
Configuring bmp-1.2.5.2...
Configuring tf-random-0.5...
Configuring OpenGL-2.9.2.0...
Building tf-random-0.5...
Building bmp-1.2.5.2...
Building OpenGL-2.9.2.0...
newtype Complex = Complex
{ real :: Number
, imaginary :: Number
}
eqCplx :: Complex -> Complex -> Boolean
eqCplx (Complex a) (Complex b) = (a.real == b.real) `and` (a.imaginary == b.imaginary)
where and :: Boolean -> Boolean -> Boolean
and x y = x && y