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
{-# OPTIONS -XCPP -#include "comPrim.h" #-} ----------------------------------------------------------------------------- -- | -- Module : System.Win32.Com.Exception -- Copyright : (c) 2009, Sigbjorn Finne -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : sof@forkIO.com --...
HJvT/com
System/Win32/Com/Exception.hs
bsd-3-clause
32,564
0
16
3,896
6,940
3,950
2,990
711
3
-- | -- Module : Crypto.Cipher.Types -- License : BSD-style -- Maintainer : Vincent Hanquez <vincent@snarc.org> -- Stability : Stable -- Portability : Excellent -- -- symmetric cipher basic types -- module Crypto.Internal ( -- * Key type and constructor KeyError(..) , Key(..) , makeKey...
jonathankochems/hs-crypto-cipher
src/Crypto/Internal.hs
bsd-3-clause
1,085
0
10
301
253
144
109
25
1
-- Copyright © 2010 Greg Weber and Bart Massey -- [This program is licensed under the "3-clause ('new') BSD License"] -- Please see the file COPYING in this distribution for license information. -- | Read a spelling dictionary. module Text.SpellingSuggest.Dictionary ( defaultDictionary, readDictionary ) where imp...
gregwebs/haskell-spell-suggest
Text/SpellingSuggest/Dictionary.hs
bsd-3-clause
899
0
9
150
119
64
55
12
1
module Main where import Ivory.Tower.Options import Tower.AADL import Ivory.Tower.Config import Tower.AADL.Build.Common import Tower.AADL.Build.EChronos import Ivory.BSP.STM32.Config import BSP.Tests.Platforms import BSP.Tests.LED.TestApp (app) main :: IO () main = compileTowerAADLForPlatform f p $ do app tes...
GaloisInc/ivory-tower-stm32
ivory-bsp-tests/tests/LEDAADLTest.hs
bsd-3-clause
704
0
10
172
180
103
77
18
1
{-# LANGUAGE OverloadedStrings #-} import Test.Hspec import Test.QuickCheck import Flux main = hspec $ do describe "The delegation graph" $ it "Should have size 0 when empty" $ do graphSize emptyGraph `shouldBe` 0 -- adding and removing a voter is a no-op -- adding a voter is idempotent -- ...
timbod7/flux-model
test/Spec.hs
bsd-3-clause
477
0
12
113
83
45
38
10
1
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE BangPatterns #-} module Sky.Parsing.Invertible3.Isomorphism where import Prelude hiding (id, (.)) import Data.Data (Data) import Data.Proxy (Proxy(..)) import Control.Category (Category(..)) import Sky.Parsing.Inv...
xicesky/sky-haskell-playground
src/Sky/Parsing/Invertible3/Isomorphism.hs
bsd-3-clause
6,820
0
12
1,610
1,938
1,023
915
106
1
module WildBind.ForTest ( SampleInput(..), SampleState(..), SampleBackState(..), inputAll, execAll, evalStateEmpty, boundDescs, boundDescs', curBoundInputs, curBoundDescs, curBoundDesc, checkBoundInputs, c...
debug-ito/wild-bind
wild-bind/test/WildBind/ForTest.hs
bsd-3-clause
3,683
0
14
802
1,403
744
659
78
2
module GLogger.Client ( initLogger, cleanLog, logDebug, logInfo, logNotice, logWarning, logError, logCritical, logAlert, logEmergency ) where import qualified System.Log.Logger as SL import System.Log.Handler.Simple (fileHandler) import System.Log.Handler (setFormatter) import System.Log.Formatte...
cernat-catalin/haskellGame
src/GLogger/Client.hs
bsd-3-clause
1,815
0
14
314
595
302
293
56
1
{-# LANGUAGE ViewPatterns #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Actions.FocusNth -- Description : Focus the nth window of the current workspace. -- Copyright : (c) Karsten Schoelzel <kuser@gmx.de> -- License : BSD -- -- Maintainer : K...
xmonad/xmonad-contrib
XMonad/Actions/FocusNth.hs
bsd-3-clause
1,920
0
14
441
450
241
209
19
1
module Language.Haskell.Liquid.Bare.SymSort ( txRefSort ) where import Control.Applicative ((<$>)) import qualified Data.List as L import Language.Fixpoint.Misc (errorstar, safeZip, fst3, snd3) import Language.Fixpoint.Types (meet) import Language.Haskell.Liquid.Types.RefType (appRTyCon, strengthen) import La...
abakst/liquidhaskell
src/Language/Haskell/Liquid/Bare/SymSort.hs
bsd-3-clause
2,198
0
15
556
762
397
365
43
2
{- Copyright (C) 2012-2017 Kacper Bak, Jimmy Liang, Michal Antkiewicz <http://gsd.uwaterloo.ca> 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 limitatio...
juodaspaulius/clafer
src-cmd/clafer.hs
mit
2,148
0
13
393
317
163
154
27
2
{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances #-} {- | Module : ./Comorphisms/ExtModal2ExtModalTotal.hs Description : coding out subsorting Copyright : (c) C. Maeder DFKI GmbH 2012 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability ...
spechub/Hets
Comorphisms/ExtModal2ExtModalTotal.hs
gpl-2.0
4,067
0
15
823
852
450
402
79
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module Book ( Book (..) , Part (..) , Chapter (..) , loadBook ) where import Control.Exception (SomeException, evaluate, handle, ...
wolftune/yesodweb.com
Book.hs
bsd-2-clause
10,973
0
28
3,884
3,464
1,795
1,669
239
22
-- print2.hs module Print2 where main :: IO () main = do putStrLn "Count to four for me:" putStr "one, two" putStr ", three, and" putStrLn " four!"
OCExercise/haskellbook-solutions
chapters/chapter03/scratch/print2.hs
bsd-2-clause
169
0
7
49
44
20
24
7
1
{-# LANGUAGE CPP #-} {-# LANGUAGE ScopedTypeVariables #-} #if __GLASGOW_HASKELL__ >= 701 {-# LANGUAGE Trustworthy #-} #endif -- | -- Copyright : (c) 2010 Simon Meier -- -- License : BSD3-style (see LICENSE) -- -- Maintainer : Simon Meier <iridcode@gmail.com> -- Stability : experimental -- Portability : GHC -- ...
CloudI/CloudI
src/api/haskell/external/bytestring-0.10.10.0/Data/ByteString/Builder/Prim/Internal/Floating.hs
mit
1,783
0
13
348
292
156
136
26
1
{-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Vimus.Command.Help ( Help (..) , help , commandShortHelp , commandHelpText ) where import Control.Monad import Data.Maybe import Data.String import Language.Haskell.TH import Language.Haske...
haasn/vimus
src/Vimus/Command/Help.hs
mit
1,881
0
15
509
510
275
235
43
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-iam/gen/Network/AWS/IAM/UploadSigningCertificate.hs
mpl-2.0
5,344
0
9
1,035
501
310
191
61
1
module Control.Search.Combinator.Let (let', set') where import Control.Search.Language import Control.Search.GeneratorInfo import Control.Search.Generator import Control.Search.Stat stmPrefixLoop stm super = super { tryH = \i -> (stm i) @>>>@ (tryE super) i, startTryH = \i -> (stm i) @>>>@ (startTryH super) i, toStri...
neothemachine/monadiccp
src/Control/Search/Combinator/Let.hs
bsd-3-clause
1,680
0
24
603
605
319
286
31
1
{-| Module : CSH.Eval.Cacheable.Make Description : Cacheable Actions to Create Objects Copyright : Stephen Demos, Matt Gambogi, Travis Whitaker, Computer Science House 2015 License : MIT Maintainer : pvals@csh.rit.edu Stability : Provisional Portability : POSIX CSH.Eval.Cacheable.Make defines 'Cacheable'...
TravisWhitaker/csh-eval
src/CSH/Eval/Cacheable/Make.hs
mit
14,290
0
12
5,752
3,094
1,541
1,553
367
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="el-GR"> <title>Port Scan | ZAP Extension</title> <maps> <homeID>top</homeID> <mapref l...
veggiespam/zap-extensions
addOns/zest/src/main/javahelp/org/zaproxy/zap/extension/zest/resources/help_el_GR/helpset_el_GR.hs
apache-2.0
996
80
66
160
449
226
223
-1
-1
{-# LANGUAGE PatternGuards, ExistentialQuantification, CPP #-} {-# OPTIONS_GHC -fwarn-incomplete-patterns #-} module Idris.Core.Execute (execute) where import Idris.AbsSyntax import Idris.AbsSyntaxTree import IRTS.Lang(FDesc(..), FType(..)) import Idris.Primitives(Prim(..), primitives) import Idris.Core.TT import Id...
TimRichter/Idris-dev
src/Idris/Core/Execute.hs
bsd-3-clause
30,115
0
6
11,119
259
166
93
28
1
{-# LANGUAGE RecordWildCards #-} module Network.Wai.Middleware.RequestLogger.JSON (formatAsJSON) where import qualified Blaze.ByteString.Builder as BB import Data.Aeson import Data.CaseInsensitive (original) import Data.Monoid ((<>)) import qualified Data.ByteString.Char8 as S8 import Data.IP import qualified Data.Te...
rgrinberg/wai
wai-extra/Network/Wai/Middleware/RequestLogger/JSON.hs
mit
3,346
0
18
625
972
524
448
80
2
-- Copyright (c) 2014-present, 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. {-# LANGUAGE CPP #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGU...
hiteshsuthar/Haxl
Haxl/Core/DataCache.hs
bsd-3-clause
3,612
5
18
778
876
477
399
69
3
module ConstructorIn1 where data MyBTree a = Empty | T a (MyBTree a) (MyBTree a) deriving Show buildtree :: Ord a => [a] -> MyBTree a buildtree [] = Empty buildtree ((x : xs)) = insert x (buildtree xs) insert :: Ord a => a -> (MyBTree a) -> MyBTree a insert val Empty = T val Empty Empty insert val tree@(T t...
mpickering/HaRe
old/testing/renaming/ConstructorIn1_AstOut.hs
bsd-3-clause
487
0
9
120
240
122
118
13
1
{-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -O #-} module T12944 () where class AdditiveGroup v where (^+^) :: v -> v -> v negateV :: v -> v (^-^) :: v -> v -> v v ^-^ v' = v ^+^ negateV v' class AdditiveGroup v => VectorSpace v where type Scalar v :: * (*^) :: Scalar v -> v -> v data Poly1 a = Poly1 ...
ezyang/ghc
testsuite/tests/deSugar/should_compile/T12944.hs
bsd-3-clause
1,147
0
10
291
465
240
225
-1
-1
module Complex(Complex((:+)), realPart, imagPart, conjugate, mkPolar, cis, polar, magnitude, phase) where --import Prelude infix 6 :+ data (RealFloat a) => Complex a = !a :+ !a deriving (Eq,Read,Show) realPart, imagPart :: (RealFloat a) => Complex a -> a realPart (x:+y) = x imagPart (x:+y)...
forste/haReFork
tools/base/tests/HaskellLibraries/Complex.hs
bsd-3-clause
3,383
4
14
1,293
1,856
974
882
79
1
{-# LANGUAGE GADTs #-} -- It's not clear whether this one should succeed or fail, -- Arguably it should succeed because the type refinement on -- T1 should make (y::Int). Currently, though, it fails. module ShouldFail where data T a where T1 :: Int -> T Int f :: (T a, a) -> Int f ~(T1 x, y) = x+y
olsner/ghc
testsuite/tests/gadt/lazypatok.hs
bsd-3-clause
306
0
8
68
65
38
27
6
1
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.HTMLBaseFontElement (js_setColor, setColor, js_getColor, getColor, js_setFace, setFace, js_getFace, getFace, js_setSize, setSize, js_getSize, getSize, HTMLBaseFontElement, castToHTMLBaseFont...
manyoo/ghcjs-dom
ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/HTMLBaseFontElement.hs
mit
3,387
42
10
465
800
461
339
48
1
-- Word a9n (abbreviation) -- http://www.codewars.com/kata/5375f921003bf62192000746/ module A9n where import Data.Char (isLetter) import Data.List (groupBy) import Data.Function (on) abbreviate :: String -> String abbreviate = concatMap (\w -> if isLetter . head $ w then f w else w) . groupBy ((==) `on` isLetter) ...
gafiatulin/codewars
src/6 kyu/A9n.hs
mit
422
0
13
88
163
88
75
8
2
{-# LANGUAGE OverloadedStrings #-} import Data.Monoid import Web.Scotty import qualified Data.Text.Lazy as T import Data.Text.Lazy.Encoding (decodeUtf8) import qualified Views.Index import Text.Blaze.Html.Renderer.Text import Network.Wai.Middleware.RequestLogger import Network.Wai.Middleware.Static blaze = html . rend...
Pholey/place-puppy
Placepuppy/Main.hs
mit
680
0
13
115
181
98
83
19
1
{-# LANGUAGE BangPatterns, DeriveDataTypeable #-} import System.Console.CmdArgs import qualified Data.ByteString as S import qualified Data.ByteString.Char8 as S8 import qualified Data.ByteString.Lazy as L import Data.NGH.Alignments import Data.NGH.Formats.Sam import Data.Void import Data.Conduit import Data.Maybe impo...
luispedro/NGH
bin/sam-filter.hs
mit
1,832
1
18
500
572
308
264
53
1
{-# LANGUAGE OverloadedStrings #-} -- | Data structures needed for interfacing with the Websocket -- Gateway module Network.Discord.Types.Gateway where import Control.Monad (mzero) import System.Info import Data.Aeson import Data.Aeson.Types import Network.WebSockets import Network.Discord.Types.Prelude...
jano017/Discord.hs
src/Network/Discord/Types/Gateway.hs
mit
3,325
0
18
1,303
845
456
389
101
0
{-# LANGUAGE ViewPatterns #-} module Unison.Util.Set where import Data.Set symmetricDifference :: Ord a => Set a -> Set a -> Set a symmetricDifference a b = (a `difference` b) `union` (b `difference` a) mapMaybe :: (Ord a, Ord b) => (a -> Maybe b) -> Set a -> Set b mapMaybe f s = fromList [ r | (f -> Just r) <- toLi...
unisonweb/platform
unison-core/src/Unison/Util/Set.hs
mit
327
0
11
69
157
83
74
7
1
{-# LANGUAGE RecordWildCards #-} module Processor.Sprockell where {------------------------------------------------------------- | | SPROCKELL: Simple PROCessor in hasKELL :-) | | j.kuper@utwente.nl | October 14, 2012 | -------------------------------------------------------------} {---------------------------------...
thomasbrus/imperia
src/Processor/Sprockell.hs
mit
5,676
4
10
1,713
1,629
956
673
100
15
factors n = [x | x <- [1..n], n `mod` x == 0] perfects :: Int -> [Int] perfects n = [x | x <- [1..n], isPerfect x] where isPerfect n' = sum (factors n') - n' == n' -- using filter but not so good perfects' :: Int -> [Int] perfects' n = [x | x <- [1..n], isPerfect x] where isPerfect n' = sum (filter (/= n') (f...
fabioyamate/programming-in-haskell
ch05/ex04.hs
mit
749
0
12
194
378
193
185
19
1
module Session where import Data.IntMap (adjust) import PeaCoq isAlive :: SessionState -> Bool isAlive (SessionState alive _) = alive markStale :: SessionState -> SessionState markStale (SessionState _ hs) = SessionState False hs touchSession :: SessionState -> SessionState touchSession (SessionState _ hs) = Sessi...
Ptival/peacoq-server
lib/Session.hs
mit
542
0
10
97
175
94
81
13
1
import Churro.Interpreter import System.Environment import System.IO {- Opens a file and interprets the Churro code. -} main :: IO () main = do{ args <- getArgs ; case args of x:xs -> do{ handle <- openFile x ReadMode ; code <- hGetContents handle ...
TheLastBanana/Churro
Main.hs
mit
475
0
13
203
107
55
52
13
2
module Main where import Prelude () import Common import Blas import qualified C import qualified Fortran as F mapFst f (x, y) = (f x, y) convRet config (Just t) = (F.typeMap config t, F.returnConventionMap config t) convRet _ Nothing = (C.Void, F.ReturnValue) convIntent F.In = C.Const convIntent _ = id co...
Rufflewind/blas-shim
Main.hs
mit
2,975
0
16
901
993
528
465
74
3
xs <- get get >>= (\xs -> put (result : xs)) State (\s -> (s,s)) >>= (\xs -> put (result:xs)) State (\s -> (s,s)) >>= (\xs -> State (\_ -> ((), (result:xs)))) f = (\s -> (s,s)) g = (\xs -> State (\_ -> ((), (result:xs)))) State $ (\s -> let (a,s') = (\s -> (s,s)) s in runState (g a) s' a ~ s s' ~ s reduces to:...
JustinUnger/haskell-book
ch23/foo.hs
mit
585
8
13
137
477
268
209
-1
-1
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.SVGFEDisplacementMapElement (pattern SVG_CHANNEL_UNKNOWN, pattern SVG_CHANNEL_R, pattern SVG_CHANNEL_G, pattern SVG_CHANNEL_B, pattern SVG_CHANNEL_A, js_getIn1, getIn1, js_getIn2, getIn2, ...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/JSFFI/Generated/SVGFEDisplacementMapElement.hs
mit
4,146
30
11
662
818
469
349
74
1
module GrabBag where -- Question 3a addOneIfOdd n = case odd n of True -> f n False -> n where f = (\n -> n + 1) -- could also do (+1) and get rid of the function -- Question 3b addFive = \x -> \y -> (if x > y then y else x) + 5 -- Question 3c mflip f x y = f y x
rasheedja/HaskellFromFirstPrinciples
Chapter7/grabBag.hs
mit
273
0
10
78
108
60
48
7
2
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE TypeOperators #-} {-# OPTIONS_HADDOCK show-extensions #-} -- | -- Module : Yi.Misc -- License : GPL-2 -- Maintainer : yi-devel@googlegroups.com -- Stability : experimental -- Portability : portab...
atsukotakahashi/wi
src/library/Yi/Misc.hs
gpl-2.0
8,968
0
17
2,282
2,029
1,064
965
-1
-1
{-# LANGUAGE BangPatterns, GADTs, TypeFamilies #-} {- The guts of the arrowized Esterel circuit translation. - Copyright : (C)opyright 2006, 2009-2011 peteg42 at gmail dot com - License : GPL (see COPYING for details) - - The 'E' arrow acts as an /environment transformer/. - - Sketch following Berry, CONS...
peteg/ADHOC
ADHOC/Control/Kesterel/Kernel.hs
gpl-2.0
29,163
105
25
8,759
8,509
4,677
3,832
-1
-1
module HSE.Type(module HSE.Type, module Export) where -- Almost all from the Annotated module, but the fixity resolution from Annotated -- uses the unannotated Assoc enumeration, so export that instead import Language.Haskell.Exts.Annotated as Export hiding (parse, loc, parseFile, paren, Assoc(..)) import Language.Ha...
alphaHeavy/hlint
src/HSE/Type.hs
gpl-2.0
37,438
0
6
4,741
129
85
44
10
0
{-# LANGUAGE CPP #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE...
robgssp/yesod-markdown
src/Yesod/Markdown.hs
gpl-2.0
4,075
0
11
781
792
456
336
-1
-1
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable, UndecidableInstances, FlexibleContexts #-} module NFA.Nerode.Congruent.Instance where import Autolib.Reader import Autolib.ToDoc import Convert.Language import Autolib.Exp import Autolib.NFA ( NFAC ) import Data.Typeable data NFAC c Int => Instance c = Ins...
Erdwolf/autotool-bonn
src/NFA/Nerode/Congruent/Instance.hs
gpl-2.0
757
0
9
209
168
102
66
21
1
{- hpodder component Copyright (C) 2006-2008 John Goerzen <jgoerzen@complete.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 versio...
jgoerzen/hpodder
Config.hs
gpl-2.0
3,992
0
11
1,056
754
356
398
70
2
module FQuoter.Templating.TemplateParserSpec (main, spec) where import Text.ParserCombinators.Parsec.Error import Test.Hspec import FQuoter.Templating.TemplateTypes import FQuoter.Templating.TemplateParser import FQuoter.Config.Config main :: IO() main = hspec spec parse f = case parseTemplate f of Left...
Raveline/FQuoter
testsuite/FQuoter/Templating/TemplateParserSpec.hs
gpl-3.0
2,613
0
14
753
710
355
355
53
2
module ConfigParser where { import Char; import ParseToken; import Text.ParserCombinators.Parsec; import Config; type ConfigBuilder = Config -> Config; parseConfig :: String -> IO (Either ParseError ConfigBuilder); parseConfig fname = do { input <- readFile fname; return $ parse confi...
ckaestne/CIDE
CIDE_Language_Haskell/test/WSP/Webserver/ConfigParser.hs
gpl-3.0
8,038
0
53
2,678
2,656
1,432
1,224
227
1
{-# LANGUAGE DeriveDataTypeable #-} module Sound.Tidal.Pattern where import Control.Applicative import Data.Monoid import Data.Fixed import Data.List import Data.Maybe import Data.Ratio import Debug.Trace import Data.Typeable import Data.Function import System.Random.Mersenne.Pure64 import Music.Theory.Bjorklund im...
unthingable/Tidal
Sound/Tidal/Pattern.hs
gpl-3.0
18,654
0
18
4,578
6,382
3,391
2,991
271
2
{-# LANGUAGE CPP #-} -- -- Copyright (C) 2004 Don Stewart - http://www.cse.unsw.edu.au/~dons -- -- This library is free software; you can redistribute it and/or -- modify it under the terms of the GNU Lesser General Public -- License as published by the Free Software Foundation; either -- version 2.1 of the License, or...
stepcut/plugins
src/System/Plugins/Consts.hs
lgpl-2.1
2,250
0
5
462
135
99
36
14
1
{-# LANGUAGE CPP #-} module API.Question.GetQuestion.Url (url) where url :: String url = "/api/getQuestion"
DataStewardshipPortal/ds-wizard
DSServer/app/API/Question/GetQuestion/Url.hs
apache-2.0
111
0
4
17
24
16
8
4
1
module Common where import Test.QuickCheck import SIL.TypeChecker import SIL class TestableIExpr a where getIExpr :: a -> IExpr data TestIExpr = TestIExpr IExpr data ValidTestIExpr = ValidTestIExpr TestIExpr data ZeroTypedTestIExpr = ZeroTypedTestIExpr TestIExpr data ArrowTypedTestIExpr = ArrowTypedTestIExpr T...
sfultong/stand-in-language
test/Common.hs
apache-2.0
3,591
0
18
908
1,275
622
653
73
2
{-# LANGUAGE PackageImports #-} import "fun-w-yesod" Application (getApplicationDev) import Network.Wai.Handler.Warp (runSettings, defaultSettings, settingsPort) import Control.Concurrent (forkIO) import System.Directory (doesFileExist, removeFile) import System.Exit (exitSuccess) import Control.Concurrent (threadD...
tomasherman/fun-w-yesod
devel.hs
bsd-2-clause
705
0
10
123
186
101
85
23
2
{- path manipulation - - Copyright 2010-2014 Joey Hess <id@joeyh.name> - - License: BSD-2-clause -} {-# LANGUAGE PackageImports, CPP #-} {-# OPTIONS_GHC -fno-warn-tabs #-} module Utility.Path where import Data.String.Utils import System.FilePath import Data.List import Data.Maybe import Data.Char import Control...
ArchiveTeam/glowing-computing-machine
src/Utility/Path.hs
bsd-2-clause
10,692
20
15
2,063
1,928
1,000
928
141
2
module Args ( theLast , ljust , nonNegative , parseArgs , positive , printUsage ) where import Data.Monoid (Monoid(..), Last(..)) import System.Console.GetOpt (OptDescr, ArgOrder(Permute), getOpt, usageInfo) import System.Environment (getProgName) import System.Exit (ExitCode(..), exi...
tibbe/event
benchmarks/Args.hs
bsd-2-clause
2,332
0
14
678
794
414
380
57
2
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RankNTypes #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.Haddock -- Copyright : Isaac Jones 2003-2005 -- License : BSD3 -- -- Maintainer : cabal-devel@h...
mydaum/cabal
Cabal/Distribution/Simple/Haddock.hs
bsd-3-clause
32,090
0
28
9,606
6,996
3,598
3,398
586
9
{-# LANGUAGE QuasiQuotes #-} module Huff ( huff, Spec, Domain(), Problem(), Literal(), Term(), module Huff ) where import Huff.Compile.AST (Problem,Term(..),Literal(..)) import Huff.Input (Spec,Domain,Operator(..)) import Huff.QQ (huff) import qualified Huff...
elliottt/huff
src/Huff.hs
bsd-3-clause
913
0
17
246
388
216
172
44
2
{-# LANGUAGE NoImplicitPrelude , CPP , GADTs , FlexibleContexts , ScopedTypeVariables , KindSignatures , TypeFamilies , DeriveDataTypeable , TypeOperators #-} ----------------------------------------------------------------------...
timsears/species
Math/Combinatorics/Species/Enumerate.hs
bsd-3-clause
18,320
0
16
4,626
3,199
1,736
1,463
184
5
module Language.Granule.Syntax.Preprocessor.Latex ( processGranuleLatex , unLatex ) where import Data.Char (isSpace) import Control.Arrow ((>>>)) data DocType = Latex | GranuleBlock -- | Extract @\begin{env}@ code blocks @\end{env}@ from tex files on a -- line-by-line basis, where @env@ is the name of th...
dorchard/gram_lang
frontend/src/Language/Granule/Syntax/Preprocessor/Latex.hs
bsd-3-clause
1,907
0
13
489
482
252
230
28
3
{-# LANGUAGE OverloadedStrings #-} import Network.NetSpec import Network.NetSpec.Text -- Notice the restrictions NetSpec places on how you can communicate. -- Working within NetSpec isn't well-suited for all situations; -- it is specialized for situations where there is -- a deterministic sequence of communication....
DanBurton/netspec
examples/Chat.hs
bsd-3-clause
826
1
14
216
187
98
89
18
2
------------------------------------------------------------------------------ -- | -- Maintainer : Ralf Laemmel, Joost Visser -- Stability : experimental -- Portability : portable -- -- This module is part of 'Sdf2Haskell', a tool for generating a set of -- Haskell data types from an SDF grammar. This module provide...
jkoppel/Strafunski-Sdf2Haskell
generator/SGLR.hs
bsd-3-clause
4,290
41
16
1,303
891
461
430
79
3
{-# LANGUAGE TypeFamilies, DataKinds, TypeOperators #-} {-# LANGUAGE FlexibleInstances #-} module Database.SQLFragment.Operators where -- standard import Data.Monoid import Data.List (intercalate) import Data.String import GHC.TypeLits -- third-party import Data.HList -- local import Database.SQLFragment.SQLFragment im...
maxigit/sql-fragment
src/Database/SQLFragment/Operators.hs
bsd-3-clause
9,043
0
12
1,981
2,434
1,321
1,113
-1
-1
-- | TODO: Put some kind of a tutorial here module Sound.Fluidsynth ( module Sound.Fluidsynth.Audio , module Sound.Fluidsynth.Event , module Sound.Fluidsynth.Gen , module Sound.Fluidsynth.Log , module Sound.Fluidsynth.Midi , module Sound.Fluidsynth.Misc , module Sound.Fluidsynth.Settings , modul...
projedi/fluidsynth-hs-complete
src/Sound/Fluidsynth.hs
bsd-3-clause
659
0
5
90
126
87
39
19
0
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, PatternGuards #-} {- A high level language of tactic composition, for building elaborators from a high level language into the core theory. This is our interface to proof construction, rather than ProofState, because this gives us a language to build der...
bkoropoff/Idris-dev
src/Idris/Core/Elaborate.hs
bsd-3-clause
34,029
11
22
12,976
12,275
6,078
6,197
695
13
{-# LANGUAGE RecordWildCards, PolymorphicComponents, GADTs, TemplateHaskell #-} module Synthesis.Interface where import Control.Monad.ST import qualified Data.Map as Map import Data.Map (Map) import qualified Data.Set as Set import Data.Set (Set) import Control.Monad.State import Control.Arrow import Data.List as Lis...
termite2/synthesis
Synthesis/Interface.hs
bsd-3-clause
18,474
0
23
4,784
7,915
3,955
3,960
-1
-1
module BoardSpec (spec) where import Control.Exception (evaluate) import Data.Function (on) import Data.List (nubBy, (\\)) import Test.Hspec import Test.QuickCheck import Board import Clues (clueAt) import Position (axis, positionsByColumn) import Tile (clueFor, isVoltorb, isOptional, isRequired) import ArrayGenerat...
jameshales/voltorb-flip
test/BoardSpec.hs
bsd-3-clause
4,488
0
23
1,022
1,226
625
601
76
1
module Control.Monad.Extensions (satisfiesM,if') where import Control.Applicative (Applicative,liftA3) satisfiesM :: Monad m => (a -> Bool) -> m a -> m a satisfiesM p x = x >>= if' p return (const (satisfiesM p x)) if' :: Applicative f => f Bool -> f a -> f a -> f a if' = liftA3 (\ c t e -> if c then t else e)
bitemyapp/checkers
src/Control/Monad/Extensions.hs
bsd-3-clause
315
0
10
67
160
83
77
6
2
{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module : Plugins.MBox -- Copyright : (c) Jose A Ortega Ruiz -- License : BSD-style (see LICENSE) -- -- Maintainer : Jose A Ortega Ruiz <jao@gnu.org> -- Stability : unstable -- Portability : unp...
apoikos/pkg-xmobar
src/Plugins/MBox.hs
bsd-3-clause
3,906
0
12
1,119
634
379
255
12
0
module QuoteUtils ( compileQuote , compileSimpleQuoteBTCBuy , compileSimpleQuoteBTCSell , QuoteCompilation(..) , QCError(..) ) where import Control.Error import Control.Monad.IO.Class import Network.MtGoxAPI import Network.MtGoxAPI.DepthStore import qualified Data.Text as T import CommonTypes...
javgh/bridgewalker
src/QuoteUtils.hs
bsd-3-clause
7,325
0
19
2,418
1,512
748
764
134
8
module Bamboo.Plugin.Photo.Util where import Bamboo.Plugin.Photo.Config import MPSUTF8 import Prelude hiding ((.), (>), (^), (/), id) import System.Directory mkdir :: String -> IO () mkdir = u2b > createDirectory show_data :: (Show a) => a -> String show_data = show > snake_case parse_boolean :: String -> Bool pars...
nfjinjing/bamboo-plugin-photo
src/Bamboo/Plugin/Photo/Util.hs
bsd-3-clause
638
1
7
111
241
139
102
19
1
{-# LANGUAGE TemplateHaskell #-} module Game.GameLocalsT where import Control.Lens (makeLenses) import qualified Data.Vector as V import qualified Constants import Game.GClientT import Types makeLenses ''GameLocalsT newGameLocalsT :: GameLocalsT newGameLocalsT = GameLocalsT { _glH...
ksaveljev/hake-2
src/Game/GameLocalsT.hs
bsd-3-clause
624
0
8
170
126
79
47
20
1
{-# LANGUAGE OverlappingInstances, FunctionalDependencies, ScopedTypeVariables, MultiParamTypeClasses, FlexibleInstances, UndecidableInstances, FlexibleContexts, DeriveFunctor #-} {-# OPTIONS_HADDOCK hide #-} module Happstack.StaticRouting.Internal where import Happstack.Server(askRq, rqPaths, rqMethod, local...
carlssonia/happstack-static-routing
src/Happstack/StaticRouting/Internal.hs
bsd-3-clause
8,603
0
20
2,252
3,429
1,827
1,602
159
5
{-# language CPP #-} -- No documentation found for Chapter "Promoted_From_VK_KHR_format_feature_flags2" module Vulkan.Core13.Promoted_From_VK_KHR_format_feature_flags2 ( FormatProperties3(..) , StructureType(..) ...
expipiplus1/vulkan
src/Vulkan/Core13/Promoted_From_VK_KHR_format_feature_flags2.hs
bsd-3-clause
4,812
0
14
855
900
526
374
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Cataskell.Server.MessageTypesSpec (main, spec) where import Test.Hspec import Cataskell.Server.MessageTypes import Data.Aeson main :: IO () main = hspec spec spec :: Spec spec = parallel $ describe "Message types" $ do describe "AddUser" $ it "can be decoded from...
corajr/cataskell
test-server/Cataskell/Server/MessageTypesSpec.hs
bsd-3-clause
1,128
0
14
298
309
146
163
30
1
module Utils where pkgToDir str = let xs = map (\c -> if c == '.' then '/' else c) str in "src/" ++ xs ++ "/"
robstewart57/ripl
src/Utils.hs
bsd-3-clause
186
0
13
103
56
30
26
10
2
{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE EmptyDataDeriving #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE...
sdiehl/ghc
libraries/base/GHC/Generics.hs
bsd-3-clause
54,675
0
12
13,656
7,223
4,427
2,796
-1
-1
{-# LANGUAGE Rank2Types, ScopedTypeVariables, FlexibleInstances, OverloadedStrings, TypeSynonymInstances, TypeOperators, GADTs #-} module Paskell.Syntax.Haskell where import Paskell.Expr import Paskell.EvalM import Control.Monad import Data.Maybe import System.IO.Unsafe import Control.Monad.Error import Control.Monad....
glutamate/paskell
Paskell/Syntax/Haskell.hs
bsd-3-clause
6,071
0
15
1,875
2,543
1,294
1,249
173
2
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE CPP #-} -- #define DEBUG {-| Module : AERN2.Poly.Ball Description : Polynomial enclosures with large radii Copyright : (c) Michal Konecny License : BSD3 Maintainer : mikkonecny@gmail.com Stability : experimental Portability :...
michalkonecny/aern2
aern2-fun-univariate/src/AERN2/Poly/Ball.hs
bsd-3-clause
10,071
0
13
2,184
3,161
1,708
1,453
-1
-1
module Paths ( vheDirStructure , cabalConfigLocation , getVirtualEnvironment ) where import System.FilePath ((</>)) import System.Directory (getCurrentDirectory) import System.Environment (getEnvironment) import Types import MyMonad -- returns record containing paths to all imp...
Paczesiowa/virthualenv
src/Paths.hs
bsd-3-clause
1,935
0
11
506
306
172
134
32
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} module Zodiac.HttpClient.TSRP( authedHttpClientRequest , macHttpClientRequest , httpAuthHeader , httpClientKeyId , httpClientAuthHeader , verifyHttpClientRequest , verifyHttpClientRequest' ) where import Data.Time.Clock (...
ambiata/zodiac
zodiac-http-client/src/Zodiac/HttpClient/TSRP.hs
bsd-3-clause
4,068
0
13
1,248
750
400
350
87
3
{-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE RankNTypes #-} module Test.Integration.Framework.DSL ( -- * Scenario scenario , xscenario , pendingWith , Scenarios , Context(..) -- * Steps , Setup(..) , setup , request...
input-output-hk/pos-haskell-prototype
wallet/test/integration/Test/Integration/Framework/DSL.hs
mit
24,605
0
20
6,487
5,890
3,134
2,756
-1
-1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE LambdaCase #-} {-# OPTIONS_HADDOCK show-extensions #-} -- | -- Module : Yi.Keymap.Emacs -- License : GPL-2 -- Maintainer : yi-devel@googlegroups.c...
noughtmare/yi
yi-keymap-emacs/src/Yi/Keymap/Emacs.hs
gpl-2.0
13,706
0
15
4,828
3,167
1,609
1,558
-1
-1
{- Copyright (C) 2007-2010 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 later version. This program is ...
Lythimus/lptv
sites/all/modules/jgm-pandoc-8be6cc2/src/Text/Pandoc/Readers/TeXMath.hs
gpl-2.0
4,486
0
13
1,104
1,343
680
663
74
17
module Rasa.Ext.Views ( viewports -- * Working with Views , View(..) , viewable , splitRule , active , scrollPos , getViews -- * View Structure -- | Views are stored as a Tree, with 'Split's determining -- the layout of each branch. , Split(..) , Dir(..) , SplitRule(..) , Window , BiTre...
ChrisPenner/rasa
rasa-ext-views/src/Rasa/Ext/Views.hs
gpl-3.0
1,615
0
8
337
297
198
99
57
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-swf/gen/Network/AWS/SWF/PollForActivityTask.hs
mpl-2.0
8,888
0
19
1,910
973
595
378
107
1
{-# LANGUAGE CPP, GADTs #-} ----------------------------------------------------------------------------- -- -- Generating machine code (instruction selection) -- -- (c) The University of Glasgow 1996-2004 -- ----------------------------------------------------------------------------- -- This is a big module, but, i...
shlevy/ghc
compiler/nativeGen/PPC/CodeGen.hs
bsd-3-clause
102,542
0
30
40,522
24,696
12,241
12,455
-1
-1
{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE OverloadedStrings #-} module Snap.Util.Proxy.Tests (tests) where ------------------------------------------------------------------------------ import Control.Monad.State.Strict (modify) import ...
snapframework/snap-core
test/Snap/Util/Proxy/Tests.hs
bsd-3-clause
6,436
0
14
1,584
1,107
595
512
91
1
{-# LANGUAGE RankNTypes #-} {-# OPTIONS_GHC -funbox-strict-fields #-} -- ----------------------------------------------------------------------------- -- -- (c) The University of Glasgow, 2010 -- -- The Session type and related functionality -- -- ------------------------------------------------------------------------...
rahulmutt/ghcvm
compiler/Eta/Main/GhcMonad.hs
bsd-3-clause
6,934
0
18
1,622
1,758
925
833
106
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-s3/gen/Network/AWS/S3/GetBucketLocation.hs
mpl-2.0
3,491
0
9
745
445
268
177
58
1
-- | -- Module : $Header$ -- Copyright : (c) 2013-2015 Galois, Inc. -- License : BSD3 -- Maintainer : cryptol@galois.com -- Stability : provisional -- Portability : portable {-# LANGUAGE PatternGuards #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE RecordWildCards #-...
beni55/cryptol
src/Cryptol/ModuleSystem/Renamer.hs
bsd-3-clause
21,636
0
18
6,602
7,115
3,473
3,642
458
15
{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- -- Stg to C-- code generation: the binding environment -- -- (c) The University of Glasgow 2004-2006 -- ----------------------------------------------------------------------------- module StgCmmEnv ( CgIdInfo...
olsner/ghc
compiler/codeGen/StgCmmEnv.hs
bsd-3-clause
6,443
0
20
1,586
1,556
812
744
119
3
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE Trustworthy #-} -- can't use Safe due to IsList instance {-# LANGUAGE TypeFamilies #-} ----------------------------------------------------------------------------- -- | -- Module : Data.List.NonEmpty -- Copyright : (C) 2011-2015 ...
da-x/ghc
libraries/base/Data/List/NonEmpty.hs
bsd-3-clause
18,767
0
13
4,782
4,320
2,370
1,950
247
2
module Network.HTTP.UserAgent where import Control.Monad.Error import Data.ByteString.Lazy.Char8 ( ByteString ) import qualified Data.ByteString.Lazy.Char8 as BS import Network.HTTP import Network.URI import Data.Maybe ( maybe ) ----------------------------------------------------------------------------- defaultR...
beni55/HTTP
Network/HTTP/UserAgent.hs
bsd-3-clause
2,287
0
11
607
761
397
364
39
2
-- | -- Copyright : (c) 2012 Benedikt Schmidt -- License : GPL v3 (see LICENSE) -- -- Maintainer : Benedikt Schmidt <beschmi@gmail.com> -- -- Provided NFData instance for ByteString (with bytestring < 0.10) module Extension.Data.ByteString ( ) where import Data.ByteString ()
rsasse/tamarin-prover
lib/utils/src/Extension/Data/ByteString.hs
gpl-3.0
286
0
4
52
25
19
6
2
0
module Options.Misc where import Types miscOptions :: [Flag] miscOptions = [ flag { flagName = "-jN" , flagDescription = "When compiling with :ghc-flag:`--make`, compile ⟨N⟩ modules in parallel." , flagType = DynamicFlag } , flag { flagName = "-fno-hi-version-check" ...
olsner/ghc
utils/mkUserGuidePart/Options/Misc.hs
bsd-3-clause
1,602
0
8
516
211
135
76
36
1
-- parser produced by Happy Version 1.11 module PropParser (parse) where import PropSyntax import PropSyntaxUtil import ParseMonad import Lexer import LexUtil(readInteger, readRational) import ParseUtil --import Rewrite import IOExts import Char(showLitChar) data HappyAbsSyn = HappyTerminal Token | HappyErrorTo...
forste/haReFork
tools/property/parse/extras/PropParser.hs
bsd-3-clause
240,488
8,942
22
33,646
74,153
39,836
34,317
6,961
68
module Main where import Test.Hspec import SpecHelper import Spec main :: IO () main = resetDb >> hspec spec
Drooids/postgrest
test/Main.hs
mit
111
0
6
21
37
21
16
6
1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Char -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : lib...
beni55/haste-compiler
libraries/ghc-7.10/base/Data/Char.hs
bsd-3-clause
13,652
0
10
3,221
1,216
842
374
115
8
{-# LANGUAGE TemplateHaskell, GADTs #-} module T4188 where import Language.Haskell.TH import System.IO class C a where {} data T1 a where MkT1 :: a -> b -> T1 a data T2 a where MkT2 :: (C a, C b) => a -> b -> T2 a data T3 x where MkT3 :: (C x, C y) => x -> y -> T3 (x,y) $(do { dec1 <- reify ''T1 ; run...
oldmanmike/ghc
testsuite/tests/th/T4188.hs
bsd-3-clause
525
0
13
150
252
132
120
-1
-1