Skip to content

Instantly share code, notes, and snippets.

{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ViewPatterns #-}
module Issue375 where
import Data.Array.Accelerate as A
import Data.Array.Accelerate.Debug as A
import Data.Array.Accelerate.Control.Lens
import Data.Array.Accelerate.Linear
@maoe
maoe / hackagedocs
Last active August 29, 2015 14:07 — forked from Fuuzetsu/hackagedocs
#!/bin/bash
cabal configure && cabal build && cabal haddock --hyperlink-source \
--html-location='http://hackage.haskell.org/package/$pkg/docs' \
--contents-location='http://hackage.haskell.org/package/$pkg'
S=$?
if [ "${S}" -eq "0" ]; then
cd "dist/doc/html"
DDIR="${1}-${2}-docs"
cp -r "${1}" "${DDIR}" && tar -c -v -z -Hustar -f "${DDIR}.tar.gz" "${DDIR}"
CS=$?
@maoe
maoe / gist:5891350
Last active December 19, 2015 03:38 — forked from keigoi/gist:5887184
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Keigoi where
import Control.Monad
import Control.Monad.RWS.Strict
import Control.Monad.Trans.Error
import Prelude hiding (putChar, getChar)
import qualified System.IO as IO
import Test.QuickCheck
@maoe
maoe / Test2.hs
Created July 26, 2012 10:39 — forked from cutsea110/Test2.hs
:t zがダメだけど、D (X "123") 123 (1::Y)やD (X "123") 123 (X "456")ではデータ構築可能
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE GADTs #-}
module Test where
data X = X String
deriving Show
type Y = Int
@maoe
maoe / Test.hs
Created July 26, 2012 10:22 — forked from cutsea110/Test.hs
てすと
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE RankNTypes #-}
module Test where
data X = X String
deriving Show
type Y = Int
class Z a where