code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-# LANGUAGE UndecidableInstances #-}
-- | @mp4a@ Audio sample entry according to ISO 14496-14
module Data.ByteString.Mp4.Boxes.AudioSpecificConfig where
import Data.ByteString.IsoBaseFileFormat.ReExports
import Data.ByteString.Mp4.Boxes.DecoderSpecificInfo
-- * Decoder Configuration for ISO 14496... | sheyll/isobmff-builder | src/Data/ByteString/Mp4/Boxes/AudioSpecificConfig.hs | bsd-3-clause | 13,298 | 1 | 13 | 3,477 | 2,607 | 1,430 | 1,177 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Text.XML.ToJSON.Builder
( -- * Element type and operations
Element(..)
, emptyElement
, addChild'
, addValue'
, addAttr'
, addAttrs'
-- * Stack type and operations
, Stack
, popStack
, closeStack
-- * Builder type and operations
, Builder
, run... | yihuang/xml2json | Text/XML/ToJSON/Builder.hs | bsd-3-clause | 3,219 | 0 | 12 | 711 | 817 | 472 | 345 | 71 | 2 |
#!/usr/bin/env runhaskell
import Distribution.Simple
import Distribution.PackageDescription
import Distribution.Version
import Distribution.Simple.LocalBuildInfo
import Distribution.Simple.Program
import Distribution.Verbosity
import Data.Char (isSpace)
import Data.List (dropWhile,reverse)
import Control.Monad
mai... | tnarg/haskell-libpq | Setup.hs | bsd-3-clause | 1,460 | 0 | 17 | 294 | 379 | 198 | 181 | 34 | 1 |
{-# LANGUAGE RecordWildCards #-}
module Main where
import Control.Monad (forM_)
import Data.Monoid (mconcat)
import Development.Shake
import Development.Shake.FilePath
import System.Console.GetOpt
import qualified System.Info (os, arch)
import System.IO
import Config
import Dirs
import GhcDist
import HaddockMaster
i... | gbaz/haskell-platform | hptool/src/Main.hs | bsd-3-clause | 4,630 | 0 | 16 | 1,421 | 1,103 | 567 | 536 | -1 | -1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
-- | Create new a new project directory populated with a basic working
-- project.
module Stack.New
( ne... | juhp/stack | src/Stack/New.hs | bsd-3-clause | 18,535 | 0 | 23 | 5,621 | 3,996 | 1,996 | 2,000 | 378 | 8 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE ViewPatterns #-}
{-# OPTIONS -fno-warn-unused-do-bind -fno-warn-type-defaults #-}
-- | Calendar.
module Ircbrowse.View.Calendar
(calendar
,channel
,channelNav)
where
import Ircbrowse.Types.Import
import Ir... | chrisdone/ircbrowse | src/Ircbrowse/View/Calendar.hs | bsd-3-clause | 2,663 | 0 | 44 | 1,028 | 724 | 372 | 352 | 67 | 3 |
-- | This module provides the type function symbols and variables.
module Tct.Trs.Data.Symbol
( Fun(..)
, AFun(..)
, F
, fun
, V
, var
, mainFunction
)
where
import qualified Data.ByteString.Char8 as BS
import qualified Tct.Core.Common.Pretty as PP
import qualified Tct.Core.Common.Xml ... | ComputationWithBoundedResources/tct-trs | src/Tct/Trs/Data/Symbol.hs | bsd-3-clause | 2,456 | 0 | 13 | 567 | 864 | 459 | 405 | 61 | 1 |
-- | Utility functions on strings
module Servant.ChinesePod.Util.String (
explode
, dropBOM
, trim
, lowercase
) where
import Data.Char
-- | Split a string at the specified delimeter
explode :: Char -> String -> [String]
explode needle = go
where
go :: String -> [String]
go haystack = case break... | edsko/ChinesePodAPI | src/Servant/ChinesePod/Util/String.hs | bsd-3-clause | 866 | 0 | 11 | 241 | 230 | 131 | 99 | 22 | 2 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE OverloadedStrings #-}
module Snap.Internal.Parsing where
------------------------------------------------------------------------------
import Blaze.ByteString.Builder
import Contr... | jonpetterbergman/wai-snap | src/Snap/Internal/Parsing.hs | bsd-3-clause | 16,493 | 0 | 17 | 4,045 | 3,537 | 1,880 | 1,657 | 253 | 4 |
myEnumFromTo :: Integer -> Integer -> [Integer]
myEnumFromTo m n | m > n = []
myEnumFromTo m n = m : myEnumFromTo (m + 1) n
| YoshikuniJujo/funpaala | samples/16_return_list/enum.hs | bsd-3-clause | 124 | 0 | 8 | 27 | 65 | 32 | 33 | 3 | 1 |
module CLaSH.QuickCheck.Instances.Signal () where
import Test.QuickCheck
import CLaSH.Prelude
import CLaSH.Prelude.Explicit
instance Arbitrary a => Arbitrary (Signal' clk a) where
arbitrary = fromList <$> infiniteList
--TODO: what does it mean to shrink an infinite stream
--shrink x = [] : (fmap fromList $ ... | Ericson2314/clash-prelude-quickcheck | src/CLaSH/QuickCheck/Instances/Signal.hs | bsd-3-clause | 353 | 0 | 7 | 58 | 61 | 36 | 25 | 6 | 0 |
-- | <http://programmingpraxis.com/2015/09/11/finding-the-median/ Finding the median>
--
-- The median of an array is the value in the middle if the array
-- was sorted; if the array has an odd number of items n, the median
-- is the (n+1)/2’th largest item in the array (which is also the
-- (n+1)/2’th smallest item in... | FranklinChen/twenty-four-days2015-of-hackage | src/VectorExample.hs | bsd-3-clause | 4,467 | 0 | 16 | 925 | 825 | 435 | 390 | 54 | 4 |
{-# LANGUAGE ScopedTypeVariables, BangPatterns, GADTs, FlexibleContexts,
FlexibleInstances, TypeFamilies, EmptyDataDecls #-}
-- | Module for definitions of detector level physical objects
module HEP.Parser.LHCOAnalysis.PhysObj (
-- * Individual Physical Object
-- | Types for reconstructed physical ob... | wavewave/LHCOAnalysis-type | src/HEP/Parser/LHCOAnalysis/PhysObj.hs | bsd-3-clause | 16,628 | 2 | 23 | 5,792 | 5,665 | 2,961 | 2,704 | -1 | -1 |
-- | TAG a stack project based on snapshot versions
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Stack.Tag where
#if !MIN_VERSION_base(4,8,0)
import Control.Applicative
#endif
import qualified Control.Exception as E
import qualified Data.Set as Set
impo... | CodyReichert/stack-tag | src/Stack/Tag.hs | bsd-3-clause | 7,990 | 0 | 19 | 2,022 | 1,880 | 980 | 900 | 156 | 4 |
module TestFramework (
assert_, assertEqual_, assertEqual2_, assertNotNull_, assertNull_,
assertSeqEqual_,
assertLambdabot_,
tests, random, io80,
HU.Test(..), runTestTT
) where
import Data.Char
import IO ( stderr )
import Data.List ( (\\) )
import Language.Haskell.TH
import qualified Test.HUnit as HU
imp... | zeekay/lambdabot | testsuite/TestFramework.hs | mit | 6,964 | 0 | 18 | 1,881 | 2,179 | 1,105 | 1,074 | -1 | -1 |
module Database.Persist.Sql.Types
( module Database.Persist.Sql.Types
, SqlBackend, SqlReadBackend (..), SqlWriteBackend (..)
, Statement (..), LogFunc, InsertSqlResult (..)
, readToUnknown, readToWrite, writeToUnknown
, SqlBackendCanRead, SqlBackendCanWrite, SqlReadT, SqlWriteT, IsSqlBackend
, ... | yesodweb/persistent | persistent/Database/Persist/Sql/Types.hs | mit | 4,814 | 0 | 11 | 963 | 564 | 371 | 193 | 70 | 1 |
module Lamdu.Infer.Unify
( unify
) where
import Lamdu.Calc.Type (Type)
import Lamdu.Infer.Internal.Monad (Infer)
import qualified Lamdu.Infer.Internal.Monad as M
import qualified Lamdu.Infer.Internal.Subst as Subst
import Lamdu.Infer.Internal.Unify (unifyUnsafe)
{-# INLINE unify ... | Peaker/Algorithm-W-Step-By-Step | src/Lamdu/Infer/Unify.hs | gpl-3.0 | 457 | 0 | 10 | 112 | 133 | 79 | 54 | 13 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Webbench.Client
(
ClientDone(..),
ClientConfig,
ClientAsync,
ClientOK,
ClientCount
) where
import Control.Exception ( SomeException, handle )
import Control.Concurrent ( forkIO )
import Control.Concurrent.Async ( async, Async )
import qualified Network... | Sapiens-OpenSource/webbench | client/src/Webbench/Client.hs | bsd-2-clause | 1,640 | 11 | 8 | 468 | 255 | 173 | 82 | -1 | -1 |
{-@ LIQUID "--no-termination" @-}
{-@ LIQUID "--short-names" @-}
{-@ LIQUID "--diff" @-}
module KMP (search) where
import Language.Haskell.Liquid.Prelude (liquidError, liquidAssert)
import Data.IORef
import Control.Applicative ((<$>))
import qualified Data.Map as M
import Prelude hiding (map)
{-@ type U... | Kyly/liquidhaskell | tests/todo/kmpMonad.hs | bsd-3-clause | 5,263 | 0 | 19 | 1,806 | 1,310 | 659 | 651 | 83 | 2 |
{-# LANGUAGE TemplateHaskell, CPP, MultiParamTypeClasses #-}
-- | Offline mode / RC file / -e support module. Handles spooling lists
-- of commands (from readline, files, or the command line) into the vchat
-- layer.
module Plugin.OfflineRC (theModule) where
import Plugin
import System.IO( hPutStrLn, hFlush, stdout )... | dmalikov/lambdabot | Plugin/OfflineRC.hs | mit | 4,213 | 0 | 15 | 1,642 | 1,100 | 545 | 555 | 74 | 3 |
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE helpset
PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN"
"http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="en-GB">
<title>Passive Scan Rules - Alpha | ZAP Extension</title>
<maps>
<homeID... | 0xkasun/security-tools | src/org/zaproxy/zap/extension/pscanrulesAlpha/resources/help/helpset.hs | apache-2.0 | 1,000 | 82 | 68 | 175 | 430 | 219 | 211 | -1 | -1 |
module Moo (plusOne) where
{-@ assert plusOne :: x:Int -> {v:Int| v > x } @-}
plusOne :: Int -> Int
plusOne x = x + 1
| ssaavedra/liquidhaskell | tests/tmp/Moo.hs | bsd-3-clause | 119 | 0 | 5 | 28 | 31 | 18 | 13 | 3 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
module T12538 where
data Tagged t a = Tagged a
type family Tag a where
Tag (Ta... | ezyang/ghc | testsuite/tests/indexed-types/should_compile/T12538.hs | bsd-3-clause | 946 | 0 | 10 | 221 | 322 | 174 | 148 | 26 | 1 |
{-# LANGUAGE OverloadedStrings #-}
import Network.Wai
import Blaze.ByteString.Builder (Builder, fromByteString)
import Blaze.ByteString.Builder.Char8 (fromShow)
import Data.Monoid (mappend)
import Network.Wai.Handler.Warp (run)
import Data.Enumerator (enumList, ($$), run_)
bigtable :: [Builder]
bigtable =
fromByte... | jberryman/wai | warp/attic/bigtable-stream.hs | mit | 799 | 0 | 10 | 171 | 245 | 138 | 107 | 20 | 1 |
import Graphics.Gloss
import System.IO.Unsafe
import System.Environment
import Data.Char
-- | Main entry point to the application.
-- | module Main where
-- | The main entry point.
main = animate (InWindow "Sierpinski Triangles" (500, 650) (20, 20))
black (picture_sierpinski getDegree)
getDegree :: Int
getDegre... | kylegodbey/haskellProject | src/sierpinski_ani.hs | mit | 1,349 | 10 | 21 | 323 | 611 | 331 | 280 | 33 | 1 |
import Data.List.Split
import Control.Arrow
data Point = Point Int Int
instance Show Point where
show (Point x y) = show x ++ " " ++ show y
symPoint :: Point -> Point -> Point
symPoint (Point px py) (Point qx qy) = Point (qx + (qx - px)) (qy + (qy - py))
solve :: String -> String
solve line = show res
where... | Dobiasd/HackerRank-solutions | Algorithms/Geometry/Find_Point/Main.hs | mit | 533 | 0 | 9 | 145 | 254 | 130 | 124 | 16 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Utils where
import Text.Printf
import Data.Text (Text)
import qualified Data.Text as T
-- Remove nth item from list
remove :: Int -> [a] -> [a]
remove n xs = let (ys,zs) = splitAt n xs in ys ++ (tail zs)
showT :: (Show a) => a -> Text
showT = T.pack . show
numberToEuropean... | michaelbeaumont/kirchhoff-generator | src/Utils.hs | mit | 642 | 0 | 9 | 135 | 207 | 114 | 93 | 18 | 3 |
import Data.List
import Primes
import Utils
truncateRight :: Integer -> [Integer]
truncateRight 0 = []
truncateRight n | n>0 = n : truncateRight (n `div` 10)
truncateLeft :: Integer -> [Integer]
truncateLeft n
| n>9 = n : truncateLeft ((read $ tail $ show n) :: Integer)
| otherwise = [n]
allTruncRigh... | arekfu/project_euler | p0037/p0037.hs | mit | 810 | 0 | 11 | 159 | 338 | 173 | 165 | 19 | 1 |
second xs = head (tail xs)
| calebgregory/fp101x | wk2/second.hs | mit | 27 | 0 | 7 | 6 | 18 | 8 | 10 | 1 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE UndecidableInstances #-}
-----------------------------------------------------------------------------
-- |
-- Maintainer : me@joelt.io
-- Stability : experimental
-- Portability : portable
--
-- A monad whose actions produce an ... | pikajude/concurrent-state | src/Control/Monad/Writer/Concurrent/Strict.hs | mit | 6,555 | 0 | 17 | 1,609 | 2,199 | 1,157 | 1,042 | 122 | 1 |
module Handler.Articles where
import Import
import qualified Database.Esqueleto as E
import qualified Data.Text as T
import qualified Data.Time.Format as Time
getArticlesR :: Handler Html
getArticlesR = do
articles <- runDB $
E.select
$ E.from $ \(article `E.InnerJoin` language) -> do
E.on $ ... | builtinnya/lambdar-website | Handler/Articles.hs | mit | 565 | 0 | 16 | 126 | 183 | 98 | 85 | 16 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module Hackup.Action(Action(..),
Archive(..), baseName, targetDirectory, archiveItems, archiveItemsBaseDir, keepPrevious,
Command(..), workingDir, command, ignoreFailure,
planActions) where
import Control.Applic... | chwthewke/hackup | src/Hackup/Action.hs | mit | 1,771 | 0 | 10 | 523 | 440 | 250 | 190 | -1 | -1 |
{-# OPTIONS_HADDOCK show-extensions #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE RankNTypes #-}
{-|
Module : Numeric.Neural.Layer
Description : layer components
Copyright : (c) Lars Brünjes, 2016
License : MIT
Maintainer : brunjlar@gmail.c... | brunjlar/neural | src/Numeric/Neural/Layer.hs | mit | 3,622 | 0 | 12 | 763 | 725 | 408 | 317 | 52 | 2 |
module Game where
import Graphics.Gloss.Interface.Pure.Game
import Graphics.Gloss.Data.Picture
import Data.List
import qualified Data.Map.Strict as M
import Types
import BrickMap
import Paddle
import Ball
import Collision
import Timer
import Instance
initGame :: Int -> Int -> Game
initGame w h =
let fw = fromIn... | Chase-C/Breakout | src/Game.hs | mit | 3,616 | 0 | 16 | 1,429 | 1,169 | 613 | 556 | 89 | 8 |
module Main (
main
) where
import Test.HUnit
import Pangraph.GraphML.Parser
import Tuura.Fantasi.VHDL.Writer
import VHDLLiterals
main :: IO Counts
main = runTestTT $ TestList[case1, case2]
case1 :: Test
case1 = TestCase $ assertEqual "case1: Enviroment Writer N1"
enviroFile1 (writeEnvironment $ unsafeParse graphf... | tuura/fantasi | test/Main.hs | mit | 450 | 0 | 9 | 67 | 118 | 66 | 52 | 14 | 1 |
-- file: ch03/GlobalVariable.hs
itemName = "Weighted Companion Cube"
-- That variable is defined at the top level of a source file.
| supermitch/learn-haskell | real-world-haskell/ch03/GlobalVariable.hs | mit | 134 | 0 | 4 | 23 | 8 | 5 | 3 | 1 | 1 |
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE TypeApplications #-}
-- | This is a tutorial on implementing custom effects.
--
-- == What is an effect?
--
-- An effect is made up of a few parts.
--
-- === External
--
-- This is the external interface of the effect that users of the effect use.
--
-- 1. __The DSL syntax__: th... | suhailshergill/extensible-effects | src/Control/Eff/Extend/Tutorial.hs | mit | 3,855 | 0 | 10 | 778 | 447 | 267 | 180 | -1 | -1 |
module Utilities where
isqrt :: Integer -> Integer
isqrt num = floor (sqrt (fromIntegral num))
isPrime :: Integer -> Bool
isPrime num
| num < 2 = False
| num == 2 = True
| even num = False
| otherwise = and (map (\n -> (num `mod` n) /= 0) [3, 5 .. lim])
where
lim = isqrt num + 1
isMod... | KumarL/ProjectEuler | ProjectEuler/Utilities.hs | cc0-1.0 | 793 | 0 | 13 | 223 | 425 | 216 | 209 | 24 | 1 |
{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances #-}
{- |
Module : $Header$
Description : Instance of class Logic for the Haskell logic
Copyright : (c) Christian Maeder, Sonja Groening, Uni Bremen 2002-2004
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Ma... | nevrenato/Hets_Fork | Haskell/Logic_Haskell.hs | gpl-2.0 | 2,901 | 0 | 13 | 676 | 463 | 247 | 216 | 62 | 0 |
module Amath.Expr.ExprFuncs
( numop
, wmSize
, expSize
, expLength
, evalExpr
, matches
, applyPattern
, getVarBinding
, getVarBinding'
, getVars
, linearize
, subExpr
, isubExpr
, transformExpr
, substExpr
, substAll
, isPa... | arnizamani/SeqSolver | Amath/Expr/ExprFuncs.hs | gpl-2.0 | 21,913 | 2 | 17 | 6,491 | 9,613 | 4,862 | 4,751 | 384 | 17 |
-- Implicit CAD. Copyright (C) 2011, Christopher Olah (chris@colah.ca)
-- Released under the GNU GPL, see LICENSE
module Graphics.Implicit.Export.Render.TesselateLoops (tesselateLoop) where
import Graphics.Implicit.Definitions
import Graphics.Implicit.Export.Render.Definitions
import Graphics.Implicit.Export.Util (ce... | silky/ImplicitCAD | Graphics/Implicit/Export/Render/TesselateLoops.hs | gpl-2.0 | 3,170 | 0 | 24 | 860 | 1,609 | 898 | 711 | 55 | 3 |
--
-- Copyright (c) 2013 Bonelli Nicola <bonelli@antifork.org>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--... | beni55/cgrep | src/CGrep/Lang.hs | gpl-2.0 | 4,916 | 0 | 16 | 1,248 | 1,891 | 1,053 | 838 | 79 | 2 |
{-----------------------------------------------------------------
(c) 2008-2009 Markus Dittrich
This program is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public
License Version 3 as published by the Free Software Foundation.
This program is distribut... | markusle/husky | src/husky.hs | gpl-3.0 | 3,302 | 0 | 24 | 1,092 | 463 | 232 | 231 | 46 | 13 |
{-# LANGUAGE ScopedTypeVariables, RecordWildCards, Rank2Types, ExistentialQuantification #-}
-----------------------------------------------------------------------------
-- |
-- Module : HEP.Automation.EventChain.File
-- Copyright : (c) 2012,2013 Ian-Woo Kim
--
-- License : BSD3
-- Maintainer : Ian-Woo Ki... | wavewave/evchain | lib/HEP/Automation/EventChain/File.hs | gpl-3.0 | 1,589 | 0 | 9 | 341 | 265 | 153 | 112 | 25 | 1 |
{-|
A 'Transaction' represents a movement of some commodity(ies) between two
or more accounts. It consists of multiple account 'Posting's which balance
to zero, a date, and optional extras like description, cleared status, and
tags.
-}
module Hledger.Data.Transaction (
-- * Transaction
nullsourcepos,
nulltrans... | kmels/hledger | hledger-lib/Hledger/Data/Transaction.hs | gpl-3.0 | 25,354 | 2 | 26 | 7,091 | 5,981 | 3,214 | 2,767 | 389 | 7 |
{-
- Copyright (C) 2014 Alexander Berntsen <alexander@plaimi.net>
-
- This file is part of virtualtennis.
-
- Virtual Tennis is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
... | alexander-b/master-fun | src/virtualtennis/Visible.hs | gpl-3.0 | 994 | 0 | 7 | 177 | 37 | 23 | 14 | 4 | 0 |
{-# LANGUAGE TemplateHaskell #-}
module DoublePole where
import RungeKutta
import Control.Lens
data Config = Config { _maxTimeSteps :: Int
, _gravity :: Float
, _cartMass :: Float
, _poleLength1 :: Float
, _pole... | jrraymond/pendulum | src/DoublePole.hs | gpl-3.0 | 3,060 | 0 | 15 | 1,144 | 1,077 | 589 | 488 | 76 | 1 |
{-# OPTIONS -O2 -Wall #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Data.Store.Transaction
(Transaction, run, Property,
Store(..),
lookupBS, lookup,
insertBS, insert,
delete, deleteIRef,
readIRef, readIRefDef, writeIRef,
readGuid, writeGuid,
isEmpty,
irefExists,
... | alonho/bottle | src/Data/Store/Transaction.hs | gpl-3.0 | 5,588 | 0 | 13 | 1,471 | 1,944 | 1,024 | 920 | 114 | 2 |
-- Proof objects, proof parser and theorem-prover for prop logic
-- THIS VERSION ENCODES NAMES AS INTEGERS, THUS ALLOWING MORE RAPID COMPARISON.
module PropLogicProofLib(
Proof(Axiom, AndIntro, AndElimL, AndElimR, ImpIntro, ImpElim,
OrIntroL, OrIntroR, OrElim, NotIntro, NotElim, TrueIntro, FalseElim),... | ckaestne/CIDE | CIDE_Language_Haskell/test/fromviral/PropLogicProofLib-encoded.hs | gpl-3.0 | 9,210 | 4 | 26 | 4,514 | 2,597 | 1,409 | 1,188 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-doubleclick-bids/gen/Network/Google/Resource/DoubleClickBidManager/Queries/Listqueries.hs | mpl-2.0 | 5,043 | 0 | 18 | 1,201 | 806 | 466 | 340 | 113 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-cloudtasks/gen/Network/Google/Resource/CloudTasks/Projects/Locations/Queues/Delete.hs | mpl-2.0 | 5,771 | 0 | 15 | 1,200 | 709 | 420 | 289 | 102 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | dysinger/amazonka | amazonka-opsworks/gen/Network/AWS/OpsWorks/DescribeRdsDbInstances.hs | mpl-2.0 | 5,035 | 0 | 10 | 978 | 571 | 344 | 227 | 69 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
-- Module : System.Statgrab
-- Copyright : (c) 2013-2015 Brendan Hay <brendan.g.hay@gmail.com>
-- License : This Source Code Form is subject to the terms of
-- the Mozilla Public License, v. 2.0.
-- ... | brendanhay/statgrab | src/System/Statgrab.hs | mpl-2.0 | 3,574 | 0 | 14 | 1,026 | 678 | 405 | 273 | 69 | 1 |
module AstroData2
( Species(..)
, parseSpecies
, showSpecies ) where
import Text.Parsec
import Debug.Trace ( traceShow )
data Species = D | G | H | Hp | He | Hep | Hepp | Hm | H2 | H2p
| R | S | H2xD | Cx | Cy | Cz | Mv
deriving (Show, Read, Eq, Ord)
parseSpecies :: String -> Species
parseSpec... | kvelicka/Fizz | AstroData_parser.hs | lgpl-2.1 | 514 | 0 | 9 | 132 | 217 | 126 | 91 | 14 | 2 |
{-
Copyright 2010-2012 Cognimeta Inc.
Licensed 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
Unless required by applicable law or agreed to in writ... | Cognimeta/cognimeta-utils | src/Cgm/System/Endian.hs | apache-2.0 | 5,413 | 0 | 13 | 1,024 | 1,328 | 705 | 623 | 96 | 3 |
{-
onemax.hs
Description: Computes the sum of the bits over a boolean vector
License: GPL-3
This code creates a random boolean vector and sums all of its bits.
The time elapsed between the start and getting the result of the sum
is measured.
-}
import Data.Sequence hiding (take)
import Data.Time
import Data.Foldable ... | geneura-papers/2016-ea-languages-PPSN | haskell/onemax.hs | artistic-2.0 | 1,287 | 0 | 11 | 264 | 302 | 161 | 141 | 21 | 2 |
module Emulator.InterpreterSpec where
import Test.Hspec
main :: IO ()
main = hspec spec
spec :: Spec
spec = return ()
| intolerable/GroupProject | test/Emulator/InterpreterSpec.hs | bsd-2-clause | 121 | 0 | 6 | 23 | 44 | 24 | 20 | 6 | 1 |
{-#LANGUAGE NoImplicitPrelude, DeriveGeneric, ForeignFunctionInterface#-}
module LibMu.MuApi (
MuVM(..),
MuCtx(..),
newContext,
idOf,
nameOf,
setTrapHandler,
execute,
ctxIdOf,
ctxNameOf,
closeContext,
loadBundle,
loadHail,
handleFromSInt8,
handleFromUInt8,
handleFromSInt16,
hand... | andrew-m-h/libmu-HS | src/LibMu/MuApi.hs | bsd-3-clause | 37,039 | 0 | 20 | 6,829 | 12,766 | 6,406 | 6,360 | 626 | 1 |
-- Copyright (c) 2014, Facebook, Inc.
-- All rights reserved.
--
-- This source code is distributed under the terms of a BSD license,
-- found in the LICENSE file. An additional grant of patent rights can
-- be found in the PATENTS file.
-- | Everything needed to define data sources and to invoke the
-- engine. This m... | kantp/Haxl | Haxl/Core.hs | bsd-3-clause | 723 | 0 | 6 | 120 | 97 | 69 | 28 | 11 | 0 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE... | rpereira/servant-blog | src/Models/Favorite.hs | bsd-3-clause | 971 | 0 | 7 | 277 | 85 | 56 | 29 | 19 | 0 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.ARB.TextureSwizzle
-- Copyright : (c) Sven Panne 2015
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : portable
... | phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/ARB/TextureSwizzle.hs | bsd-3-clause | 756 | 0 | 4 | 90 | 49 | 39 | 10 | 7 | 0 |
{-# LANGUAGE NamedFieldPuns, OverloadedStrings #-}
module MusicPad.Utils where
import Rika.Scene
import Rika.Engine
import Prelude ()
import Rika.Env hiding (encode)
import Rika.Component.Script.Helper
import qualified Prelude as P
import Rika.Data.Tensor
import MusicPad.Type
import Text.JSON.Generic
import Control.M... | nfjinjing/level5 | src/MusicPad/Utils.hs | bsd-3-clause | 793 | 2 | 12 | 110 | 234 | 134 | 100 | 25 | 1 |
-- |
-- Module: Language.KURE.Combinators
-- Copyright: (c) 2006-2008 Andy Gill
-- License: BSD3
--
-- Maintainer: Andy Gill <andygill@ku.edu>
-- Stability: unstable
-- Portability: ghc
--
-- This module contains various combinators that use 'Translate' and 'Rewrite'. The convension is that
-- 'Translate' based combin... | andygill/kure | Language/KURE/Combinators.hs | bsd-3-clause | 7,385 | 22 | 13 | 1,616 | 2,369 | 1,257 | 1,112 | 107 | 2 |
{-# LANGUAGE TemplateHaskell, NoMonomorphismRestriction, MultiParamTypeClasses, TypeFamilies #-}
module Main where
import Language.KURE
import Language.KURE.Boilerplate
import Data.Monoid
import Data.List
import Debug.Trace
import Control.Monad
import Exp
import Id
data MyGeneric = ExpG Exp
$(kureYourBoilerplate ... | andygill/kure-your-boilerplate | test/Test2.hs | bsd-3-clause | 3,729 | 5 | 18 | 1,118 | 1,463 | 757 | 706 | 79 | 2 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE ViewPatterns #-}
module Schema.AQuery where
import Data.List.NonEmpty (NonEmpty ((:|)))
import Database.DSH
data Trade = Tr... | ulricha/dsh-example-queries | Schema/AQuery.hs | bsd-3-clause | 1,659 | 0 | 13 | 588 | 406 | 225 | 181 | 53 | 1 |
module Parsing.Fta
( parseFta
) where
import Data.ByteString (ByteString)
import Data.Maybe (isJust)
import Text.Parsec hiding (State)
import Text.Parsec.ByteString
import Data.Set (Set)
import qualified Data.Set as Set
import Text.Parsec.Char
import Text.Parsec.Number
import Types.Fta
-- |Returns a FTA parsed f... | jakubriha/automata | src/Parsing/Fta.hs | bsd-3-clause | 2,764 | 0 | 11 | 501 | 866 | 425 | 441 | 88 | 2 |
-- | Check parse tables for conflicts and resolve them.
module Data.Parser.Grempa.Parser.Conflict
( Conflict
, conflicts
, showConflict
) where
import qualified Control.Arrow as A
import Data.Function
import Data.List
import Data.Parser.Grempa.Grammar.Token
import Data.Parser.Grempa.Parser.Table
type... | ollef/Grempa | Data/Parser/Grempa/Parser/Conflict.hs | bsd-3-clause | 1,575 | 0 | 16 | 451 | 477 | 262 | 215 | 31 | 4 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Data.String
import Data.Text.Lazy (Text)
import Data.Monoid ((<>))
import Web.Scotty.Trans
import Web.Beam
import Web.Beam.Types
import Web.Beam.Plugins.Auth
import Web.Beam.Plugins.Session
import Web.Beam.Utils.Cookie
-- | Use the RAM auth and session ba... | hansonkd/BeamFramework | examples/Main.hs | bsd-3-clause | 1,678 | 0 | 14 | 374 | 355 | 187 | 168 | 40 | 1 |
module AWS.RDS.Types.OptionGroup
( OptionGroup(..)
, Option(..)
) where
import AWS.Lib.FromText (Text)
import AWS.RDS.Types.DBInstance
( VpcSecurityGroupMembership
, DBSecurityGroupMembership
)
data OptionGroup = OptionGroup
{ optionGroupAllowsVpcAndNonVpcInstanceMemberships :: Bool
, ... | IanConnolly/aws-sdk-fork | AWS/RDS/Types/OptionGroup.hs | bsd-3-clause | 835 | 0 | 9 | 170 | 174 | 111 | 63 | 23 | 0 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE RebindableSyntax #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeSynonymInstances #-}
module Mandelbrot.NikolaV4.Implementation where
import qualified Prelude as P
import Prelude hiding (iterate, map, zipWith)
import Data.Array.Nikola.Backend.CUDA
import Data... | mainland/nikola | examples/mandelbrot/Mandelbrot/NikolaV4/Implementation.hs | bsd-3-clause | 3,337 | 0 | 15 | 976 | 1,439 | 766 | 673 | 92 | 2 |
------------------------------------------------------------------------------
-- |
-- Module : Data.Param.TFVec
-- Copyright : (c) 2009 Christiaan Baaij
-- Licence : BSD-style (see the file LICENCE)
--
-- Maintainer : christiaan.baaij@gmail.com
-- Stability : experimental
-- Portability : non-porta... | christiaanb/tfvec | Data/Param/TFVec.hs | bsd-3-clause | 10,103 | 2 | 14 | 2,948 | 4,342 | 2,291 | 2,051 | -1 | -1 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP, NoImplicitPrelude, ScopedTypeVariables, MagicHash #-}
{-# LANGUAGE BangPatterns #-}
{-# OPTIONS_HADDOCK hide #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.List
-- Copyright : (c) The University of Glasgow 1... | jstolarek/ghc | libraries/base/GHC/List.hs | bsd-3-clause | 35,165 | 0 | 14 | 9,782 | 5,542 | 3,170 | 2,372 | 412 | 3 |
{-# LANGUAGE FunctionalDependencies, UndecidableInstances #-}
module Data.Array.Repa.Operators.Mapping
( -- * Generic maps
map, mapLTS, zipWithLTS
, zipWith
, (+^), (-^), (*^), (/^)
-- * Structured maps
, Structured(..))
where
import Data.Array.Repa.Shape
import Dat... | kairne/repa-lts | Data/Array/Repa/Operators/Mapping.hs | bsd-3-clause | 6,264 | 8 | 13 | 1,616 | 1,680 | 922 | 758 | -1 | -1 |
-----------------------------------------------------------------------------
-- |
-- Module : Database.PostgreSQL.Simple.Streams.LargeObjects
-- Copyright : (c) 2013-2014 Leon P Smith
-- License : BSD3
--
-- Maintainer : leon@melding-monads.com
-- Stability : experimental
--
--
-- An io-stream based... | lpsmith/postgresql-simple-streams | src/Database/PostgreSQL/Simple/Streams/LargeObjects.hs | bsd-3-clause | 2,685 | 0 | 13 | 534 | 532 | 288 | 244 | 41 | 2 |
module Test.Unification where
import Test.Tasty
import Test.Tasty.HUnit
import Types.Constant
import Types.EType
import Types.Expr
import Unification
unificationSpec :: TestTree
unificationSpec = testGroup "Type unification"
[ testCase "c... | letsbreelhere/egg | test/Test/Unification.hs | bsd-3-clause | 1,550 | 0 | 17 | 720 | 464 | 230 | 234 | 31 | 1 |
{-# LANGUAGE TemplateHaskell, RecordWildCards, NamedFieldPuns, PatternGuards, FlexibleContexts #-}
module Data.TrieMap.Representation.TH.Representation (
Representation(..),
Case(..),
fstRepr,
sndRepr,
prodRepr,
sumRepr,
unifyProdRepr,
unifySumRepr,
checkEnumRepr,
unitRepr,
vectorizeRepr,
mapRep... | lowasser/TrieMap | Data/TrieMap/Representation/TH/Representation.hs | bsd-3-clause | 5,274 | 28 | 17 | 877 | 2,099 | 1,153 | 946 | 113 | 2 |
{-
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[RnSource]{Main pass of renamer}
-}
{-# LANGUAGE CPP, ScopedTypeVariables #-}
module RnSource (
rnSrcDecls, addTcgDUs, findSplice
) where
#include "HsVersions.h"
import {-# SOURCE #-} RnExpr( rnLExpr )
import {-# SOURCE #-} RnSplice (... | GaloisInc/halvm-ghc | compiler/rename/RnSource.hs | bsd-3-clause | 85,704 | 1 | 25 | 26,931 | 16,954 | 8,938 | 8,016 | 1,056 | 8 |
{-# LANGUAGE TemplateHaskell #-}
module AWS.EC2.Types.Image
( AMIAttribute(..)
, AMIAttributeDescription(..)
, BlockDeviceMapping(..)
, BlockDeviceMappingParam(..)
, EbsBlockDevice(..)
, EbsSource(..)
, Image(..)
, ImageState(..)
, ImageType(..)
, LaunchPermission(..)
, Laun... | IanConnolly/aws-sdk-fork | AWS/EC2/Types/Image.hs | bsd-3-clause | 4,613 | 0 | 9 | 956 | 953 | 571 | 382 | 124 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Concurrent.STM.TQueue
import Control.Concurrent.STM.TVar
import Control.Monad.IO.Class
import Control.Monad.STM
import Data.ByteString (ByteString)
import Data.ByteString.Lazy (fromStrict)
import qualified Data.Map.Strict as M
import Data.UUID
import ... | Taneb/webqueues | Main.hs | bsd-3-clause | 2,418 | 0 | 21 | 500 | 596 | 298 | 298 | 51 | 2 |
infin :: Double -> Double -> Double
infin 0 v = v
infin n v = infin (n-1) (v + 1/n)
main =
let x = infin 1000000000 0
in
putStrLn (show x)
| dterei/Scraps | haskell/infin.hs | bsd-3-clause | 145 | 4 | 9 | 39 | 91 | 45 | 46 | 6 | 1 |
{-# LANGUAGE DeriveLift #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecordWildCards #-}
-- | Provides the git revision which this was compiled from.
--
-- Stack builds will have the `git` command available to run during
-- compilation.
--
-- ... | input-output-hk/pos-haskell-prototype | util/src/Pos/Util/CompileInfo.hs | mit | 2,208 | 0 | 11 | 524 | 329 | 194 | 135 | -1 | -1 |
f y@(x:xs)
| x > 10 = let z = [] in (z)
| otherwise = []
| itchyny/vim-haskell-indent | test/guard/top_of_line.in.hs | mit | 57 | 1 | 10 | 17 | 55 | 27 | 28 | -1 | -1 |
-- | Migration support for JSONs with schemaVersion 2 to 3
-- Migration changes:
-- 1. Change "schemaVersion" to 3
--
-- 2. Replace "OO" with {"Object": <TAG>}
-- and "Infix" with {"Infix": [<TAG>, <TAG>]}
-- (presentation modes now mention the special tags)
module Lamdu.Data.Export.JSON.Migration.ToVersi... | lamdu/lamdu | src/Lamdu/Data/Export/JSON/Migration/ToVersion3.hs | gpl-3.0 | 2,377 | 0 | 18 | 684 | 610 | 323 | 287 | 50 | 5 |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="hu-HU">
<title>Active Scan Rules | ZAP Extension</title>
<maps>
<homeID>top</homeID>
<... | msrader/zap-extensions | src/org/zaproxy/zap/extension/ascanrules/resources/help_hu_HU/helpset_hu_HU.hs | apache-2.0 | 979 | 80 | 66 | 161 | 417 | 211 | 206 | -1 | -1 |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="hu-HU">
<title>Token Generator | ZAP Extension</title>
<maps>
<homeID>top</homeID>
<ma... | veggiespam/zap-extensions | addOns/tokengen/src/main/javahelp/org/zaproxy/zap/extension/tokengen/resources/help_hu_HU/helpset_hu_HU.hs | apache-2.0 | 977 | 80 | 66 | 160 | 415 | 210 | 205 | -1 | -1 |
------------------------------------------------------------------------------
--- Knowledge-based Autonomic Heterogeneous Networks (KAHN)
--- @author Rajesh Krishnan, Cosocket LLC
--- @version September 2014
------------------------------------------------------------------------------
{-
Copyright (c) 2014, Cosocket... | Cosocket-LLC/kahn | v2.0/src/KAHN/SysInit.hs | bsd-3-clause | 3,638 | 0 | 11 | 692 | 760 | 391 | 369 | 53 | 1 |
-- Copyright 2016 TensorFlow authors.
--
-- Licensed 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
--
-- Unless required by applicable law or agree... | judah/tensorflow-haskell | tensorflow-mnist/src/TensorFlow/Examples/MNIST/Parse.hs | apache-2.0 | 3,526 | 0 | 13 | 752 | 773 | 425 | 348 | 60 | 4 |
--
-- Copyright (c) 2014 Citrix Systems, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This progra... | jean-edouard/manager | xenmgr/Vm/Monitor.hs | gpl-2.0 | 8,422 | 0 | 15 | 2,214 | 2,330 | 1,166 | 1,164 | 197 | 5 |
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="fa-IR">
<title>OpenAPI Support Add-on</title>
<maps>
<homeID>openapi</homeID>
<mapref l... | kingthorin/zap-extensions | addOns/openapi/src/main/javahelp/org/zaproxy/zap/extension/openapi/resources/help_fa_IR/helpset_fa_IR.hs | apache-2.0 | 971 | 77 | 67 | 157 | 413 | 209 | 204 | -1 | -1 |
{-# LANGUAGE CPP, StandaloneDeriving, GeneralizedNewtypeDeriving #-}
-- |
-- Types for referring to remote objects in Remote GHCi. For more
-- details, see Note [External GHCi pointers] in compiler/ghci/GHCi.hs
--
-- For details on Remote GHCi, see Note [Remote GHCi] in
-- compiler/ghci/GHCi.hs.
--
module GHCi.Remote... | ezyang/ghc | libraries/ghci/GHCi/RemoteTypes.hs | bsd-3-clause | 3,990 | 0 | 12 | 621 | 791 | 425 | 366 | 60 | 1 |
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Config.Gnome
-- Copyright : (c) Spencer Janssen <spencerjanssen@gmail.com>
-- License : BSD
--
-- Maintainer : Spencer Janssen <spencerjanssen@gmail.com... | markus1189/xmonad-contrib-710 | XMonad/Config/Gnome.hs | bsd-3-clause | 2,616 | 0 | 13 | 538 | 394 | 227 | 167 | 38 | 1 |
{-# LANGUAGE RecordWildCards #-}
-- | This module provides the ability to create reapers: dedicated cleanup
-- threads. These threads will automatically spawn and die based on the
-- presence of a workload to process on.
module Control.Reaper (
-- * Settings
ReaperSettings
, defaultReaperSettings
... | jberryman/wai | auto-update/Control/Reaper.hs | mit | 6,237 | 0 | 16 | 1,666 | 1,117 | 619 | 498 | 88 | 3 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE DeriveGeneric #-}
import Control.Applicative ((<$>), (<*>), empty)
import Data.Aeson
import GHC.Generics (Generic)
import Control.Monad (mzero)
import Data.Text (Text)
import Data.Scientific (Scientific)
import Data.ByteString.Lazy (ByteS... | iambernie/tryhaskell | aesonexamples/aesonex.hs | mit | 3,085 | 0 | 19 | 1,391 | 606 | 347 | 259 | 65 | 0 |
module Chess.BoardSpec where
import qualified Data.List.Safe as SL
import Data.Maybe (isNothing)
import Test.Hspec
import Test.QuickCheck
import Chess.Board
spec :: Spec
spec = do
describe "validPosition" $ do
it "returns True when given a valid position" $
all validPosition [(f, r) | f <- ['... | samgd/Chess | test/Chess/BoardSpec.hs | mit | 2,738 | 0 | 18 | 826 | 981 | 509 | 472 | 54 | 1 |
-- author: Benjamin Surma <benjamin.surma@gree.net>
{-# LANGUAGE DeriveGeneric #-}
module Main.Internals where
import Test.Sandbox hiding (sendTo)
import qualified Test.Sandbox (sendTo)
import Test.Sandbox.HUnit
import Test.Framework.Providers.Sandbox
import Control.Monad
import Data.List
import Data.Serialize
impo... | gree/flare-tests | src/Main/Internals.hs | mit | 6,048 | 0 | 17 | 1,754 | 1,822 | 909 | 913 | 141 | 5 |
-- Example of an drawing graphics onto a canvas.
import Graphics.UI.Gtk
import Graphics.Rendering.Cairo
import Control.Monad.Trans ( liftIO )
import Graphics.UI.Gtk.Gdk.EventM
run :: Render () -> IO ()
run act = do
initGUI
dia <- dialogNew
dialogAddButton dia stockClose ResponseClose
contain <- dialogGetUpper ... | SwiftsNamesake/ElegantChess | Cairo.hs | mit | 1,756 | 0 | 12 | 375 | 555 | 263 | 292 | 54 | 1 |
module XorBool where
xorBool :: Bool -> Bool -> Bool
xorBool left right = (left || right) && (not (left && right))
xorPair :: (Bool, Bool) -> Bool
xorPair (x, y) = xorBool x y
xor :: [Bool] -> [Bool] -> [Bool]
xor xs ys = map xorPair (zip xs ys)
type Bits = [Bool]
intToBits' :: Int -> Bits
intToBits' 0 = [False]
i... | raventid/coursera_learning | haskell/will_kurt/15.11_xor_bool.hs | mit | 3,223 | 0 | 12 | 673 | 981 | 530 | 451 | 66 | 2 |
-- Car Depreciation
-- http://www.codewars.com/kata/55521d28f790f6d92d0001ab
module Codewars.Kata.CarValue where
import Text.Printf (printf)
car :: Float -> Integer -> String
car p n = printf "%.2f" (price p n :: Float)
where price p 0 = p
price p 1 = 0.8 * price p 0
price p 2 = 0.64 * pric... | gafiatulin/codewars | src/Beta/CarValue.hs | mit | 371 | 0 | 10 | 104 | 134 | 70 | 64 | 8 | 4 |
module Rebase.Foreign
(
module Foreign
)
where
import Foreign
| nikita-volkov/rebase | library/Rebase/Foreign.hs | mit | 65 | 0 | 4 | 12 | 15 | 10 | 5 | 4 | 0 |
{-# htermination isPrefixOf :: [(Ratio Int)] -> [(Ratio Int)] -> Bool #-}
import List
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/List_isPrefixOf_9.hs | mit | 86 | 0 | 3 | 14 | 5 | 3 | 2 | 1 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.