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 FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} module Main where import Control.Concurrent import Control.Concurrent.Supervised import Control.Monad import Control.Monad.Base worker1 :: (MonadSupervisor m) => m () worker1 = do liftBase $ thre...
schernichkin/supervised-concurrency
samples/supervisor-events/Main.hs
bsd-3-clause
844
0
11
225
197
96
101
26
1
module Main where import Lib main :: IO () main = mainEntry
paradoxix/haskellplayground
app/Main.hs
bsd-3-clause
62
0
6
14
22
13
9
4
1
module CLaSH.Driver.PrepareBinding ( prepareBinding ) where -- External Modules import Data.Map (Map) -- GHC API import qualified CoreSyn -- Internal Modules import CLaSH.CoreHW (coreToCoreHW) import CLaSH.Desugar (desugar) import CLaSH.Driver.Types import CLaSH.Util.CoreHW (Var,Term) prepareBind...
christiaanb/clash-tryout
src/CLaSH/Driver/PrepareBinding.hs
bsd-3-clause
620
0
9
126
144
79
65
16
1
-------------------------------------------------------------------------------- -- | -- Module : Spectrum.DTA -- Copyright : (c) [2009..2010] Trevor L. McDonell -- License : BSD -- -- Parse a DTA LC-MS/MS results file. -- -- The file format is very simple. The first line contains the singly protonated -- peptide ...
tmcdonell/hfx
src/haskell/Spectrum/DTA.hs
bsd-3-clause
2,359
0
15
402
392
219
173
22
2
{-# LANGUAGE ExistentialQuantification #-} module FFmpeg.Config where -- import Control.Monad -- import Debug import FFmpeg.Probe import System.Environment import System.FilePath class Config a where makeArgs :: a -> Probe -> [String] makeExt :: a -> String ...
YLiLarry/compress-video
src/FFmpeg/Config.hs
bsd-3-clause
978
14
9
317
269
149
120
25
0
{-# LANGUAGE FlexibleContexts #-} module Day6 where import qualified Data.Map as Map import Data.Map (Map) import Data.Tuple import Data.List import Data.Ord type ECMap = Map Int (Map Char Int) iter :: ECMap -> String -> ECMap iter m = foldl go m . zip [1..] where go r (...
cl04/advent2016
src/Day6.hs
bsd-3-clause
811
0
16
205
339
177
162
19
2
module Style ( module Style.Types , module Style.Color , styleNode ) where import Types import DOM import Style.Color import Style.Parser import Style.Types import Control.Lens hiding (children) import qualified Data.Map as M styleNode :: DomNode -> StyledNode styleNode node = StyledNode nt sty $ map s...
forestbelton/orb
src/Style.hs
bsd-3-clause
545
0
12
159
151
84
67
17
2
{-# LANGUAGE GeneralizedNewtypeDeriving, FlexibleContexts #-} -- | The type checker checks whether the program is type-consistent. -- Whether type annotations are already present is irrelevant, but if -- they are, the type checker will signal an error if they are wrong. -- The program does not need to have any particul...
mrakgr/futhark
src/Language/Futhark/TypeChecker.hs
bsd-3-clause
74,352
0
29
20,348
23,422
11,493
11,929
1,418
47
-- #hide -------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GL.Face -- Copyright : (c) Sven Panne 2002-2005 -- License : BSD-style (see the file libraries/OpenGL/LICENSE) -- -- Maintainer : sven.panne@aedion.de -- Stability : p...
FranklinChen/hugs98-plus-Sep2006
packages/OpenGL/Graphics/Rendering/OpenGL/GL/Face.hs
bsd-3-clause
1,133
0
9
199
194
112
82
19
3
module Logic.LG where import qualified Logic.Link as Link import Logic.Formula import Logic.ProofStructure -- Formula language of Lambek Grishin calculus (LG); see Moortgat & Moot 2012, p. 1-2 data Formula a = Atom a | -- NP, S, etc. (:*:) (Formula a) (Formula a) | -- ⊗ (Prod) (:\\) (Formula a) (Formula a)...
digitalheir/net-prove
src/Logic/LG.hs
bsd-3-clause
3,466
9
31
747
1,216
713
503
35
0
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} module Main where import Control.Exception.Base (displayException) import qualified Data.Text as T import Data.Time import Data.Version (showVersion) import Formatting import O...
section77/datenverbrauch
src/Main.hs
bsd-3-clause
6,114
0
18
1,897
1,155
590
565
94
3
{- source: http://www.haskell.org/haskellwiki/Introduction#Quicksort_in_Haskell -} module ArtGallery.Sort.QuickSort.NaiveOneLine ( qsort ) where qsort (p:xs) = qsort [x | x<-xs, x<p] ++ [p] ++ qsort [x | x<-xs, x>=p]
adarqui/ArtGallery
Haskell/src/ArtGallery/Sort/QuickSort/NaiveOneLine.hs
bsd-3-clause
220
0
10
29
84
46
38
3
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE NoImplicitPrelude #-} {- | 'Internal' is big so compiling it takes time; thus we make experiments in 'Unstable' and move them to 'Internal' after we are satisfied. -} module Unstable ( -- * Sequencing by stream-building monad Comonad(..) , mkid , unid , Bu...
edom/sound
src/Unstable.hs
bsd-3-clause
9,094
0
18
2,570
3,392
1,763
1,629
203
2
-- Example of Multiple Type Stack on ST Monad {-# LANGUAGE ExistentialQuantification #-} module MultiTypeStack where import Control.Monad (liftM) import Control.Monad.ST (ST) import Control.Monad.ST (runST) import Data.STRef (STRef) import Data.STRef (modifySTRef) import Data.STRef (newSTRef) import Data.STRef (read...
notae/haskell-exercise
pack/MultiTypeStack.hs
bsd-3-clause
2,187
0
12
565
903
446
457
68
1
{-# LANGUAGE EmptyDataDecls #-} module HtmlCanvas where import FFI import Prelude class Eventable a addEventListener :: String -> Fay () -> Bool -> Fay () addEventListener = ffi "window['addEventListener'](%1,%2,%3)" ------------------------------------------------------------------------------...
svaiter/fay-canvas
src/HtmlCanvas.hs
bsd-3-clause
7,846
0
16
1,181
1,934
994
940
-1
-1
{-# LANGUAGE TemplateHaskell #-} module AWS.EC2.Types.Subnets ( CreateSubnetRequest(..) , Subnet(..) , SubnetState ) where import AWS.EC2.Types.Common (ResourceTag) import AWS.Lib.FromText data CreateSubnetRequest = CreateSubnetRequest { createSubnetRequestVpcId :: Text , createSubnetRequestC...
IanConnolly/aws-sdk-fork
AWS/EC2/Types/Subnets.hs
bsd-3-clause
969
0
9
196
223
134
89
28
0
module Problem42 where import Data.Char import Data.List.Split main :: IO () main = do names <- readFile "txt/42.txt" print . length . filter isTriangular . map value . wordsBy (not . isLetter) $ names value :: String -> Int value = sum . map (\x -> ord x - ord 'A' + 1) . filter (/= '\"') isTriangular :: In...
adityagupta1089/Project-Euler-Haskell
src/problems/Problem42.hs
bsd-3-clause
515
0
16
127
218
115
103
12
1
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE BangPatterns #-} module Main where import GHC.Float import Graphics.Gloss import Graphics.Gloss.Interface.Pure.Simulate import Graphics.Gloss.Interface.IO.Simulate import Graphics.Gloss.Data.Color import Graphics.Gloss.Data.ViewPort import Debug.Trace import Control.Mo...
Smurf/Tempoist
Examples/OnsetAnimation.hs
bsd-3-clause
5,591
0
17
1,425
1,760
943
817
117
1
-- |A SExpr is an S-expressionin the style of Rivest's Canonical -- S-expressions. Atoms may be of any type, but String and -- ByteString have special support. Similarly, lists may be of any -- type, but haskell lists have special support. -- Rivest's implementation of S-expressions is unusual in supporting -- MIME...
mokus0/s-expression
src/Text/SExpr.hs
bsd-3-clause
2,089
0
5
730
173
123
50
40
0
{-# LANGUAGE DeriveGeneric #-} module Abstract.Interfaces.Wrapper ( HostDataWrapper (..) ) where import GHC.Generics data HostDataWrapper a = HostDataWrapper { h :: String, d :: a } deriving (Show, Read, Generic)
adarqui/Abstract-Interfaces
src/Abstract/Interfaces/Wrapper.hs
bsd-3-clause
218
0
8
35
59
37
22
8
0
-------------------------------------------------------------------------------- {-# LANGUAGE Rank2Types #-} {-# LANGUAGE TemplateHaskell #-} module Lib where -------------------------------------------------------------------------------- import WhatMorphism.Annotations import WhatMorphism.T...
jaspervdj/thesis
what-morphism-examples/src/Lib.hs
bsd-3-clause
1,069
0
8
134
144
79
65
19
0
module Graphics.UI.SDL.Timer ( -- * Timer Support addTimer, delay, getPerformanceCounter, getPerformanceFrequency, getTicks, removeTimer ) where import Data.Word import Foreign.C.Types import Foreign.Ptr import Graphics.UI.SDL.Types foreign import ccall "SDL.h SDL_AddTimer" addTimer :: Word32 -> TimerCallback ...
ekmett/sdl2
Graphics/UI/SDL/Timer.hs
bsd-3-clause
735
12
10
97
181
102
79
17
0
{-# LANGUAGE MultiParamTypeClasses #-} module Generic.Control.Alternative where import Prelude () import Generic.Control.Applicative class Applicative j f => Alternative j f where empty :: j (f a) (<|>) :: j (f a) -> j (f a) -> j (f a)
sebastiaanvisser/AwesomePrelude
src/Generic/Control/Alternative.hs
bsd-3-clause
243
4
7
46
92
51
41
7
0
{-# LANGUAGE OverloadedLists #-} module AccelerationStructure where import Control.Monad.IO.Class import Control.Monad.Trans.Resource import Data.Bits import Data.Coerce ( coerce ) import Data.Vector ( Vector ) import Fo...
expipiplus1/vulkan
examples/rays/AccelerationStructure.hs
bsd-3-clause
9,457
0
16
3,069
1,529
854
675
-1
-1
module SourceNames where import HsName(Id,HsName(..),hsUnQual,ModuleName(..),moduleName) import SrcLoc1(SrcLoc,loc0,srcFile) import qualified SrcLoc1 as L import PrettyPrint import HasBaseName import UniqueNames import QualNames import SpecialNames import Char(isUpper) import Data.Generics data SN i = SN i SrcLoc de...
forste/haReFork
tools/base/parse2/SourceNames.hs
bsd-3-clause
2,505
2
17
594
1,078
543
535
-1
-1
-- |A lowest common denominator interface to the Win32 and MacOSX MIDI bindings, MacOSX part. module System.MIDI.MacOSX ( module System.MIDI.Base , Source , Destination , Connection , enumerateSources , enumerateDestinations , MIDIHasName , getName , getModel , getManufacturer , openSource ...
sixohsix/hmidi
System/MIDI/MacOSX.hs
bsd-3-clause
7,172
0
21
1,558
1,923
946
977
168
3
module HPage.Test.Server where import Data.Char import GHC.IO import Control.Monad.Error import Test.QuickCheck import Test.Runner.Driver import Test.Runner import qualified HPage.Control as HP import qualified HPage.Server as HPS import qualified Language.Haskell.Interpreter as Hint import qualified Language.Haskell....
elbrujohalcon/hPage
src/HPage/Test/Server.hs
bsd-3-clause
34,468
0
26
19,219
7,038
3,455
3,583
481
4
-- | Implementation of statistics gathering and processing utilities. module Pos.Infra.Statistics ( module Pos.Infra.Statistics.Ekg , module Pos.Infra.Statistics.Statsd ) where import Pos.Infra.Statistics.Ekg import Pos.Infra.Statistics.Statsd
input-output-hk/pos-haskell-prototype
infra/src/Pos/Infra/Statistics.hs
mit
287
0
5
66
40
29
11
5
0
{-# LANGUAGE ViewPatterns #-} module Control.Monad.MWCSpec (spec) where import Test.Hspec import Test.Hspec.QuickCheck import qualified Data.Text as T import Control.Monad.MWC import Control.Monad (forM_) spec :: Spec spec = do prop "valid byte" $ do w <- runMWCReaderT uniformAsciiByte shouldSatis...
bitemyapp/snoy-extra
test/Control/Monad/MWCSpec.hs
mit
1,011
0
19
327
341
179
162
29
1
-- ErrorList {{{ data ErrorList e a = ErrorListFailure [e] | ErrorListSuccess a [a] instance Monoid (ErrorList e a) where null = ErrorListFailure [] ErrorListFailure e1 ++ ErrorListFailure e2 = ErrorListFailure $ e1 ++ e2 ErrorListSuccess x xs ++ ErrorListSuccess y ys = ErrorListSuccess x (xs ++ (y:ys)) ...
davdar/maam
src/FP/NotUsed/ErrorList.hs
bsd-3-clause
8,095
69
19
1,555
3,112
1,558
1,554
-1
-1
{-# LANGUAGE CPP #-} module TcFlatten( FlattenMode(..), flatten, flattenManyNom, unflatten, ) where #include "HsVersions.h" import TcRnTypes import TcType import Type import TcEvidence import TyCon import TypeRep import Kind( isSubKind ) import Coercion ( tyConRolesX ) import Var import VarEnv import Nam...
ghc-android/ghc
compiler/typecheck/TcFlatten.hs
bsd-3-clause
55,943
54
23
16,699
5,621
2,998
2,623
-1
-1
{-# Language PatternGuards #-} module Blub ( blub , foo , bar ) where import Ugah.Foo import Control.Applicative import Control.Monad import Ugah.Blub f :: Int -> Int f = (+ 3) ddd
jystic/hsimport
tests/goldenFiles/ModuleTest19.hs
bsd-3-clause
194
0
5
45
57
35
22
-1
-1
{-# LANGUAGE CPP #-} module Web.Browser ( openBrowser ) where #if defined(mingw32_HOST_OS) import Web.Browser.Windows (openBrowserWindows) #else import Data.List (isInfixOf) import System.Info (os) import Web.Browser.Linux (openBrowserLinux) import Web.Browser.OSX (openBrowserOSX) #endif -- |'openBrowser' opens a URL...
rightfold/open-browser
lib/Web/Browser.hs
bsd-3-clause
728
0
6
138
48
32
16
12
1
{-# LANGUAGE OverloadedStrings #-} module BitcoinCore.Transaction.Script where import BitcoinCore.Transaction.Optcodes (OPCODE(..)) import BitcoinCore.Keys (PubKeyHash(..)) import General.Hash (Hash(..)) import Prelude hiding (concat, reverse, sequence) import qualified Data.ByteString as BS import Data.ByteString (...
clample/lamdabtc
backend/src/BitcoinCore/Transaction/Script.hs
bsd-3-clause
2,466
0
14
484
766
412
354
64
2
import Data.Map as Map import Control.Monad.State class SLSymantics repr where int :: Int -> repr Int bool :: Bool -> repr Bool float :: Float -> repr Float tup2:: (repr a, repr b) -> repr (a, b) lam :: (repr a -> repr b) -> repr (a -> b) app :: repr (a -> b) -> repr a -> repr b ...
staltz/gloc
sketch/sl.hs
bsd-3-clause
1,741
0
19
554
827
403
424
37
1
----------------------------------------------------------------------------- -- | -- Module : Control.Concurrent.QSemN -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries@haskell.org -- Stability : experimental ...
FranklinChen/hugs98-plus-Sep2006
packages/base/Control/Concurrent/QSemN.hs
bsd-3-clause
2,191
10
14
441
518
284
234
-1
-1
module Reinforce.Algorithms.Double.Internal where import Reinforce.Algorithms.Internal (RLParams) class RLParams m r => DoubleTDLearning m s a r | m -> s a r where choose :: s -> m a update1 :: s -> a -> r -> m () update2 :: s -> a -> r -> m () actions1 :: s -> m [a] actions2 :: s -> m [a] value1 ::...
stites/reinforce
reinforce-algorithms/src/Reinforce/Algorithms/Double/Internal.hs
bsd-3-clause
365
0
11
103
169
90
79
-1
-1
yes = (f x) x
mpickering/hlint-refactor
tests/examples/Bracket0.hs
bsd-3-clause
14
0
7
5
15
7
8
1
1
module LetIn3 where --A definition can be lifted from a where or let into the surronding binding group. --Lifting a definition widens the scope of the definition. --In this example, lift 'sq' in 'sumSquares' --This example aims to test lifting a definition from a let clause to a let clause, sumSquares x y = let pow=...
kmate/HaRe
old/testing/liftOneLevel/LetIn3.hs
bsd-3-clause
503
0
12
182
95
48
47
7
2
module Test14 where f = (let x = 45 in (x,45))
kmate/HaRe
old/testing/refacSlicing/Test14.hs
bsd-3-clause
48
0
9
12
29
17
12
2
1
module F10 where f10f = \h -> (h 1 2, h 3) f10g = \x -> \y -> x+y f10h = f10f f10g f10x1 = fst f10h f10x2 = snd f10h f10 = f10x2 f10x1
hferreiro/replay
testsuite/tests/arityanal/f10.hs
bsd-3-clause
144
0
7
44
79
43
36
7
1
module Arbitrary.Program where import qualified Numeric.Limp.Program as P import Numeric.Limp.Rep import Arbitrary.Var import Arbitrary.Assignment import Test.QuickCheck import Control.Applicative type Program' = P.Program ZVar RVar IntDouble data ProgramAss = ProgramAss Program' Assignment' deriving Show instan...
amosr/limp
tests/Arbitrary/Program.hs
mit
1,985
0
11
559
766
387
379
60
1
module Renamer.Env ( Rn , RnName(..) , RnEnv , runRn , defaultEnv , local , insertLocalType , insertLocalValue , insertLocalInterface , insertInternalType , insertInternalValue , ident , renameType , renameValue , renameIdentValue , renameInterface , joinName -- for imports , findV...
tadeuzagallo/verve-lang
src/Renamer/Env.hs
mit
5,681
0
12
1,150
1,889
989
900
-1
-1
import Data.Numbers.Primes (isPrime, primes) rotations :: Integer -> [Integer] rotations x = fn (length s - 1) s where s = show x fn 0 (y:ys) = (toi $ ys ++ [y]) : [] fn r (y:ys) = let n = ys ++ [y] in toi n : fn (r-1) n toi i = read i :: Integer circularPrimes :: Int...
samidarko/euler
problem035.hs
mit
447
3
12
137
212
110
102
11
2
module Main where -------------------- -- Global Imports -- import Graphics.Rendering.OpenGL import Graphics.UI.GLFW as GLFW import Data.IORef ------------------- -- Local Imports -- import Network import Config ---------- -- Code -- -- | The callback for when the window should be closed. makeWindowCloseCallback ::...
crockeo/netwire-vinyl
src/Main.hs
mit
1,205
0
10
202
243
123
120
27
1
-- ------------------------------------------------------------------------------------- -- Author: Sourabh S Joshi (cbrghostrider); Copyright - All rights reserved. -- For email, run on linux (perl v5.8.5): -- perl -e 'print pack "H*","736f75726162682e732e6a6f73686940676d61696c2e636f6d0...
cbrghostrider/Xonix
GamePlay/XoPolyLine.hs
mit
17,420
72
15
3,590
4,383
2,494
1,889
152
5
-- The MIT License (MIT) -- -- Copyright (c) 2013 Jonathan McCluskey -- -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to deal -- in the Software without restriction, including without limitation the rights -- t...
gitjonathan/agile
agile.hs
mit
5,182
0
15
1,153
972
486
486
90
1
{-# LANGUAGE OverloadedStrings #-} module Common where import Data.Int import Data.Char deltaEncode :: [Int64] -> [Int64] deltaEncode a = head a : zipWith (-) (tail a) a deltaDecode :: [Int64] -> [Int64] deltaDecode = scanl1 (+) parseTerm' :: String -> String parseTerm' = do let filterAlphas = map toUpper . fi...
ederoyd46/GeoIndex
src/Common.hs
mit
595
1
15
115
211
111
100
16
1
{-# LANGUAGE LambdaCase, GeneralizedNewtypeDeriving, FlexibleContexts #-} module HsToCoq.Coq.Gallina.UseTypeInBinders ( useTypeInBinders, useTypeInBinders', UTIBError(..), UTIBIsTypeTooShort(..), -- ** Monadic version that doesn't consolidate identical typed binders useTypeInBindersM ) where import Control.Lens...
antalsz/hs-to-coq
src/lib/HsToCoq/Coq/Gallina/UseTypeInBinders.hs
mit
3,257
0
20
740
863
454
409
54
6
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE DeriveFunctor #-} module FVL.EvalAST ( Expr(..) , RVal(..) , valueTransform , showCons , evalTransform ) where import FVL.Algebra import qualified FVL.FAST as FAST data Expr a b = CInt Integer | CBool Bool | CVar String | Add b b | Sub b b | Mul...
burz/Feval
FVL/EvalAST.hs
mit
3,798
0
15
1,217
2,059
1,040
1,019
108
2
-- lineage -- By Gregory W. Schwartz -- | Built-in import qualified Data.ByteString.Lazy.Char8 as B import qualified Data.Sequence as Seq -- | Cabal import Options.Applicative import Data.Fasta.String import Data.Aeson -- | Local import Types import Utility import Tree -- Command line arguments data Options = Optio...
GregorySchwartz/lineage
src/Main.hs
gpl-2.0
3,510
0
18
1,471
689
353
336
83
6
module Properties ( testProperties ) where import Test.Framework import Properties.CHK import Properties.Statistics import Properties.Types testProperties :: [Test] testProperties = [ testGroup "CHK" chkTests , testGroup "stats" statsTests , testGroup "types" typeTests ]
waldheinz/ads
src/tests/Properties.hs
gpl-3.0
287
0
6
47
66
38
28
10
1
module Problem067 (answer) where import qualified Problem018 as P18 answer :: IO Int answer = do content <- readFile "./data/67.txt" let triangle = readTriangle content return $ P18.shortestPath 1 1 triangle readTriangle :: String -> [[Int]] readTriangle content = map (map read . words ) (lines content)
geekingfrog/project-euler
Problem067.hs
gpl-3.0
313
0
10
55
110
57
53
9
1
{-# OPTIONS_GHC -F -pgmF htfpp #-} module Y2015.Q.BTest where import Control.Parallel.Strategies import Test.Framework import Y2015.Q.B runsolve = unlines . showSolutions . parMap rdeepseq (show . solve) . parse . tail . lines where showSolutions = zipWith (++) ["Case #" ++ show i ++ ": " | i <- [1::Int ..]] te...
joranvar/GoogleCodeJam
Y2015/Q/BTest.hs
gpl-3.0
1,797
0
11
272
681
354
327
36
1
----------------------------------------------------------------------------- -- | -- Module : Numerical.PETSc.Internal.PutGet -- Copyright : (c) Marco Zocca 2015 -- License : LGPL3 -- Maintainer : zocca . marco . gmail . com -- Stability : experimental -- -- | Mid-level interface: catching exception...
ocramz/petsc-hs
src/Numerical/PETSc/Internal/PutGet.hs
gpl-3.0
1,462
0
7
193
222
167
55
23
1
import Data.Char import Data.List import System.IO import System.Environment import Algebra import Chemistry.XYZ import System.Console.CmdArgs import Ch_Geom2Molc_Opts {- ############################################################## -} {- "main" module, handling the IO and calling all other Functions -} {- ##########...
sheepforce/Haskell-Tools
ch_geom2molc/Ch_Geom2Molc.hs
gpl-3.0
3,394
6
17
651
764
401
363
44
2
module Handler.DownloadSpec (spec) where import TestImport spec :: Spec spec = withApp $ do describe "getDownloadR" $ do error "Spec not implemented: getDownloadR"
ackao/APRICoT
web/conference-management-system/test/Handler/DownloadSpec.hs
gpl-3.0
180
0
11
39
44
23
21
6
1
module HMbo.ManyBodyOperatorSpec (spec) where import Test.Hspec import Control.Exception (evaluate) import HMbo import Data.Maybe import qualified Data.Vector.Unboxed as VU import Data.Complex (conjugate, realPart) import Data.Monoid matrixElement :: Ket -> ManyBodyOperator -> Ket -> Amplitude matrixElement psi a phi...
d-meiser/hmbo
tests/HMbo/ManyBodyOperatorSpec.hs
gpl-3.0
7,690
0
22
2,065
2,810
1,381
1,429
179
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.ProximityBe...
brendanhay/gogol
gogol-proximitybeacon/gen/Network/Google/ProximityBeacon/Types/Product.hs
mpl-2.0
52,070
0
21
11,760
8,053
4,655
3,398
914
1
{-# LANGUAGE CPP #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE Trustworthy #-} {-# LANGUAGE TypeFamilies #-} {-# LANG...
duairc/opaleye-x
src/Opaleye/X/Table.hs
mpl-2.0
4,769
0
19
736
1,068
586
482
64
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.IAP.Types.Sum -- Copyright : (c) 2015-2016 Brendan Hay...
brendanhay/gogol
gogol-iap/gen/Network/Google/IAP/Types/Sum.hs
mpl-2.0
1,209
0
11
292
197
114
83
26
0
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, DeriveFunctor, DeriveTraversable, DeriveFoldable, NoMonomorphismRestriction, FlexibleContexts #-} module HN.MilnerTools (instantiatedType, freshAtoms, MyStack, unifyM, runStack, subst, closureM, templateArgs, T(..), emptyClosureM, constantType, convertTv, convert, ...
ingvar-lynn/HNC
HN/MilnerTools.hs
lgpl-3.0
3,700
2
19
629
1,436
735
701
74
4
module MancalaAI (minimax) where import MancalaBoard -- simple hueristic, returns how many stones are in store hueristic :: MancalaBoard -> Player -> Int hueristic board player = (playerHuer board player) - (playerHuer board (nextPlayer player)) where playerHuer b p = numCaptured b p + sum (playerSide b p) + (isM...
kbrose/math
Mancala/MancalaAI.hs
unlicense
961
0
11
185
351
181
170
14
2
module Handler.Utils where import Data.Text (pack, unpack) import Import toTextPairs :: [(String, String)] -> [(Text, Text)] toTextPairs = map toTextPair where toTextPair (a, b) = (pack a, pack b) getStringFromField :: Text -> GHandler sub App String getStringFromField = fmap unpack . runInputGet . ireq textFiel...
thlorenz/WebToInk
webtoink/Handler/Utils.hs
bsd-2-clause
323
0
8
54
120
67
53
8
1
{-# LANGUAGE TypeFamilies #-} module Language.Drasil.Code.Imperative.GOOL.Symantics ( -- Typeclasses PackageSym(..), AuxiliarySym(..) ) where import Language.Drasil (Expr) import Database.Drasil (ChunkDB) import Language.Drasil.Code.DataDesc (DataDesc) import Language.Drasil.CodeSpec (Comments, Verbosity) import...
JacquesCarette/literate-scientific-software
code/drasil-code/Language/Drasil/Code/Imperative/GOOL/Symantics.hs
bsd-2-clause
986
0
12
156
309
174
135
22
0
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -Wall #-} {-| Nordom lets you import external expressions located either in local files or hosted on network endpoints. To import a local file as an expression, just insert the path to the file, prepending a @./@ if th...
Gabriel439/Haskell-Nordom-Library
src/Nordom/Import.hs
bsd-3-clause
16,481
43
33
5,161
2,802
1,516
1,286
224
11
module Main ( main -- :: IO () ) where import Test.Hspec import Test.Hspec.HUnit() import Test.QuickCheck() main :: IO () main = hspec $ do describe "test" $ do it "does something dumb" $ 1 == (1::Int) describe "test2" $ do it "does something else" $ 2 == (2::Int)
thoughtpolice/hs-leveldb
tests/Properties.hs
bsd-3-clause
293
0
13
77
111
59
52
11
1
module VSimR.Timeline ( advance , commit ) where import Control.Applicative import Control.Monad import Control.Monad.Trans import VSimR.Ptr import VSimR.Time import VSimR.Signal import VSimR.Waveform import VSimR.Process -- | Returns the time of the next event, as well as signals to be ...
ierton/vsim
src/VSimR/Timeline.hs
bsd-3-clause
1,344
0
15
390
535
282
253
32
3
module Code29_Plan2 where import Code28 boxall :: [[a]] -> [a] boxall = boxall1 jcode :: Int -> [Int] jcode n = code (0,n) bumpBy :: Int -> [Int] -> [Int] bumpBy _ [] = [] bumpBy k [a] = [a+k] bumpBy k (a:b:as) = (a+k) : b : bumpBy k as bumpDn :: (Int, Int) -> [Int] ...
sampou-org/pfad
Code/Code29_Plan2.hs
bsd-3-clause
591
0
8
200
343
194
149
18
2
{-| Module : Idris.WhoCalls Description : Find function callers and callees. Copyright : License : BSD3 Maintainer : The Idris Community. -} module Idris.WhoCalls (whoCalls, callsWho) where import Idris.AbsSyntax import Idris.Core.CaseTree import Idris.Core.Evaluate import Idris.Core.TT import Data.List (...
uuhan/Idris-dev
src/Idris/WhoCalls.hs
bsd-3-clause
3,470
0
18
867
1,552
765
787
74
1
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TemplateHaskell #-} module Juno.Consensus.Handle.Revolution (handle) where import Control.Lens import Control.Monad.Reader import Control.Monad.State import Control.Monad.Writer import Data.Map (Map) import qualified Data.Map as Map ...
haroldcarr/juno
src/Juno/Consensus/Handle/Revolution.hs
bsd-3-clause
2,386
0
20
508
645
339
306
59
4
{-# LANGUAGE ConstraintKinds, FlexibleContexts, RankNTypes, OverloadedStrings #-} {-# LANGUAGE UndecidableInstances, ScopedTypeVariables, AllowAmbiguousTypes #-} ----------------------------------------------------------------------------------------------------- ------------------------------------------------------...
lingxiao/GoodGreatIntensity
lib/PatternCompiler.hs
bsd-3-clause
4,996
0
11
1,107
835
461
374
72
3
{-# LANGUAGE ImplicitParams, FlexibleContexts #-} module Frontend.TypeValidate (validateTypeSpec, validateTypeSpec2, validateTypeDeps) where import Control.Monad.Error import Data.List import TSLUtil import Pos import Frontend.NS import Frontend.Spec import Frontend.Type imp...
termite2/tsl
Frontend/TypeValidate.hs
bsd-3-clause
2,797
0
13
565
763
382
381
47
2
{-# LANGUAGE DeriveGeneric #-} module SizeOfSpec(spec) where import Test.Hspec import GHC.Generics(Generic) import Pact.Types.SizeOf -- Testing whether derived instance for empty constructors is 1 word data A = A1 | A2 deriving (Eq, Show, Generic) data B = B1 Int | B2 Int Bool | B3 Int Bool A deriving (Eq, Show, Gen...
kadena-io/pact
tests/SizeOfSpec.hs
bsd-3-clause
1,134
0
18
254
414
211
203
23
1
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE TemplateHaskell #-} -- | Types...
kadena-io/pact
src-tool/Pact/Analyze/Parse/Types.hs
bsd-3-clause
6,977
0
17
1,961
1,830
966
864
137
9
{-# LANGUAGE Haskell98 #-} {-# LINE 1 "Data/Map.hs" #-} {-# LANGUAGE CPP #-} {-# LANGUAGE Safe #-} ...
phischu/fragnix
benchmarks/containers/Data.Map.hs
bsd-3-clause
4,671
0
11
1,188
408
261
147
27
1
{- Copyright (C) 2009 Gwern Branwen <gwern0@gmail.com> and John MacFarlane <jgm@berkeley.edu> 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 ...
cleichner/gitit
src/Network/Gitit/Feed.hs
gpl-2.0
7,895
0
16
1,792
2,219
1,200
1,019
113
5
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-swf/gen/Network/AWS/SWF/RegisterDomain.hs
mpl-2.0
5,858
0
9
1,284
522
327
195
63
1
{-# LANGUAGE TemplateHaskell, FlexibleInstances, TypeSynonymInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-| Unittests for ganeti-htools. -} {- Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are per...
ganeti/ganeti
test/hs/Test/Ganeti/BasicTypes.hs
bsd-2-clause
5,815
0
15
1,311
1,017
549
468
76
1
module Data.HashPSQ.Tests ( tests ) where import Prelude hiding (lookup) import Test.Framework (Test) import Test.Framework.Providers.HUnit (testCase) import Test.Framework.Providers.QuickCheck2 (testProperty) import ...
bttr/psqueues
tests/Data/HashPSQ/Tests.hs
bsd-3-clause
3,404
0
19
1,020
663
360
303
62
2
{-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TupleSections #-} module Network.Wai.Ghcjs.Internal where import Control.Arrow import Control.Exception import Control.Monad import Control.Monad.IO.Class import Data.Char...
soenkehahn/wai-shake
src/Network/Wai/Ghcjs/Internal.hs
bsd-3-clause
6,040
0
24
1,584
1,557
804
753
168
8
{-| This @lens@ tutorial targets Haskell beginners and assumes only basic familiarity with Haskell. By the end of this tutorial you should: * understand what problems the @lens@ library solves, * know when it is appropriate to use the @lens@ library, * be proficient in the most common @lens@ idioms,...
ocramz/Haskell-Lens-Tutorial-Library
src/Control/Lens/Tutorial.hs
bsd-3-clause
28,724
0
9
7,145
574
449
125
22
1
{- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section[RnPat]{Renaming of patterns} Basically dependency analysis. Handles @Match@, @GRHSs@, @HsExpr@, and @Qualifier@ datatypes. In general, all of these functions return a renamed thing, and a set of free variables. -} {-# LANGUAGE CPP, RankNTypes, S...
sgillespie/ghc
compiler/rename/RnPat.hs
bsd-3-clause
34,616
29
23
11,248
6,604
3,565
3,039
-1
-1
{- Copyright 2015 Google Inc. All rights reserved. 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 a...
Ye-Yong-Chi/codeworld
codeworld-base/src/GHC/IO/Encoding/Latin1.hs
apache-2.0
759
0
4
136
27
21
6
4
0
{-# OPTIONS -XOverloadedStrings #-} module ChannelSpec (main, spec) where import Test.Hspec import Network.AMQP import Network.AMQP.Internal (channelID) main :: IO () main = hspec spec spec :: Spec spec = do describe "openChannel" $ do context "with automatically allocated channel id" $ do i...
bitemyapp/amqp
test/ChannelSpec.hs
bsd-3-clause
1,341
0
27
502
295
134
161
31
1
------------------------------------------------------------------------------- -- | -- Module : System.Hardware.Haskino.SamplePrograms.Rewrite.TranslationTest -- Copyright : (c) University of Kansas -- License : BSD3 -- Stability : experimental -- -- Translation Plugin Test ---------------------------...
ku-fpg/kansas-amber
tests/TransTests/TranslationTest.hs
bsd-3-clause
1,163
0
6
100
133
91
42
20
1
{-# LANGUAGE NamedFieldPuns, RecordWildCards, BangPatterns #-} module Distribution.Server.Features.StaticFiles ( initStaticFilesFeature ) where import Distribution.Server.Framework import Distribution.Server.Framework.Templating import Text.XHtml.Strict (Html, toHtml, anchor, (<<), (!), href, paragraph) import...
mpickering/hackage-server
Distribution/Server/Features/StaticFiles.hs
bsd-3-clause
5,375
0
16
1,337
1,196
642
554
96
3
module T16615 where f :: Int -> Bool f i = if i == 0 then True else g (pred i) g :: Int -> Bool g i = if i == 0 then False else f (pred i)
sdiehl/ghc
testsuite/tests/deSugar/should_compile/T16615.hs
bsd-3-clause
141
0
8
41
80
43
37
5
2
<?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="az-AZ"> <title>AJAX Spider | ZAP Extensions</title> <maps> <homeID>top</homeID> <mapref...
kingthorin/zap-extensions
addOns/spiderAjax/src/main/javahelp/org/zaproxy/zap/extension/spiderAjax/resources/help_az_AZ/helpset_az_AZ.hs
apache-2.0
974
78
66
159
413
209
204
-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="hr-HR"> <title>Linux WebDrivers</title> <maps> <homeID>top</homeID> <mapref location="m...
thc202/zap-extensions
addOns/webdrivers/webdriverlinux/src/main/javahelp/org/zaproxy/zap/extension/webdriverlinux/resources/help_hr_HR/helpset_hr_HR.hs
apache-2.0
961
77
66
156
407
206
201
-1
-1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude, ExistentialQuantification #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Exception -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base...
sdiehl/ghc
libraries/base/Control/Exception.hs
bsd-3-clause
14,368
0
10
2,959
582
382
200
69
2
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 TcMatches: Typecheck some @Matches@ -} {-# LANGUAGE CPP, RankNTypes #-} module TcMatches ( tcMatchesFun, tcGRHS, tcGRHSsPat, tcMatchesCase, tcMatchLambda, TcMatchCtxt(..), TcStmtChecker, TcExprStmtChec...
urbanslug/ghc
compiler/typecheck/TcMatches.hs
bsd-3-clause
37,847
2
20
12,259
7,469
3,956
3,513
-1
-1
main = do print $ fst $ properFraction 1.5 print $ snd $ properFraction 1.5 print $ truncate (-1.5) print $ round (-1.5) print $ ceiling (-1.5) print $ floor (-1.5) return ()
beni55/ghcjs
test/fay/realFrac.hs
mit
189
0
10
47
102
46
56
8
1
module Database.Persist.Redis ( module Database.Persist.Redis.Config , module Database.Persist.Redis.Store , module Database.Persist.Redis.Exception ) where import Database.Persist.Redis.Config import Database.Persist.Redis.Store import Database.Persist.Redis.Exception
paul-rouse/persistent
persistent-redis/Database/Persist/Redis.hs
mit
287
0
5
36
54
39
15
7
0
module ShouldSucceed where class Eq2 a where doubleeq :: a -> a -> Bool class (Eq2 a) => Ord2 a where lt :: a -> a -> Bool instance Eq2 Int where doubleeq x y = True instance Ord2 Int where lt x y = True instance (Eq2 a,Ord2 a) => Eq2 [a] where doubleeq xs ys = True f x y = doubleeq x [1]
forked-upstream-packages-for-ghcjs/ghc
testsuite/tests/typecheck/should_compile/tc058.hs
bsd-3-clause
302
0
8
78
147
76
71
12
1
{-# LANGUAGE TemplateHaskell #-} module TestModuleTH where import Language.Haskell.TH $(do modAnn <- pragAnnD ModuleAnnotation (stringE "TH module annotation") [typ] <- [d| data TestTypeTH = TestTypeTH |] conAnn <- pragAnnD (ValueAnnotation $ mkName "TestTypeTH") ...
urbanslug/ghc
testsuite/tests/annotations/should_compile/th/TestModuleTH.hs
bsd-3-clause
711
0
13
210
172
90
82
15
0
module ShouldSucceed where h x = f (f True x) x f x y = if x then y else (g y x) g y x = if x then y else (f x y)
urbanslug/ghc
testsuite/tests/typecheck/should_compile/tc027.hs
bsd-3-clause
116
0
7
37
77
41
36
4
2
{-# htermination (enumFromTup0 :: Tup0 -> (List Tup0)) #-} import qualified Prelude data MyBool = MyTrue | MyFalse data List a = Cons a (List a) | Nil data Tup0 = Tup0 ; enumFromTup0 :: Tup0 -> (List Tup0) enumFromTup0 Tup0 = Cons Tup0 Nil;
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/enumFrom_1.hs
mit
251
0
8
55
74
42
32
6
1
-- | 'foldr1' is a variant of 'foldr' that -- has no starting value argument, -- and thus must be applied to non-empty lists. foldr1 :: (a -> a -> a) -> [a] -> a foldr1 _ [x] = x foldr1 f (x:xs) = f x (foldr1 f xs) foldr1 _ [] = errorEmptyList "foldr1"
iharh/fp-by-example
tex/src/foldr1_hof.hs
mit
262
0
8
64
89
47
42
4
1
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.HTMLMenuElement (js_setCompact, setCompact, js_getCompact, getCompact, HTMLMenuElement, castToHTMLMenuElement, gTypeHTMLMenuElement) where import Prelude ((.), (==), (>>=), return, IO, Int, F...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/JSFFI/Generated/HTMLMenuElement.hs
mit
1,766
14
9
212
449
275
174
27
1