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
-- | An implementation of CTCP coding -- -- CTCP (Client To Client Protocol) is a way of sending arbitrary data -- over an IRC network, which may include bytes not allowed in -- standard IRC messages. CTCPs are sent as a PRIVMSG or NOTICE, where -- the first and last characters as @\\001@ (SOH), and special bytes -- ar...
barrucadu/wheat
tests/CTCP.hs
mit
2,181
0
11
421
359
223
136
24
1
{-# LANGUAGE FlexibleContexts #-} module Unification ( Id(..) , Index(..) , Term(..) , raise , subst , substMV , manySubst , substFV , UnifyM (..) , Constraint(..) , Subst (..) , unify , runUnifyM , driver) where import Control.Monad import Control.Monad.Gen import ...
jozefg/higher-order-unification
src/Unification.hs
mit
8,520
0
16
2,194
3,088
1,542
1,546
188
9
module Simplexs where import Numeric.Limp.Rep.Rep as R import Numeric.Limp.Rep.Arbitrary as R import Numeric.Limp.Program as P import Numeric.Limp.Canon as C import Numeric.Limp.Solve.Simplex.Maps as SM import Numeric.Limp.Solve.Simplex.StandardForm as ST import qualified Data.Map as M data Xs = X1 ...
amosr/limp
tests/Simplexs.hs
mit
6,624
0
15
2,100
2,273
1,155
1,118
178
2
{-# LANGUAGE CPP #-} module GHCJS.DOM.SVGFEColorMatrixElement ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.SVGFEColorMatrixElement #else #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) import G...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/SVGFEColorMatrixElement.hs
mit
382
0
5
33
33
26
7
4
0
function onInit(game) { game.log("Game - onInit: " + game.name + "(" + game.getOS() + ")"); //Mouse.hide(); }
joelam789/oge2d
examples/stg/Assets/games/stg.hs
mit
113
5
10
20
68
33
35
-1
-1
module GHCJS.DOM.SVGPathSegCurvetoCubicSmoothAbs ( ) where
manyoo/ghcjs-dom
ghcjs-dom-webkit/src/GHCJS/DOM/SVGPathSegCurvetoCubicSmoothAbs.hs
mit
61
0
3
7
10
7
3
1
0
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.Entity (js_getPublicId, getPublicId, js_getSystemId, getSystemId, js_getNotationName, getNotationName, Entity, castToEntity, gTypeEntity) where import Prelude ((.), (==), (>>=), retur...
manyoo/ghcjs-dom
ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/Entity.hs
mit
2,233
18
10
311
567
339
228
37
1
module Network.BitFunctor.State.Pending where import Network.BitFunctor.Transaction class PendingTxs mp where addTx :: mp -> Transaction -> mp takeTx :: mp -> TransactionHash -> (Maybe Transaction, mp) getTx :: mp -> TransactionHash -> Maybe Transaction getTxs :: Foldable t => mp -> t Transaction
BitFunctor/bitfunctor
src/Network/BitFunctor/State/Pending.hs
mit
311
0
10
55
93
50
43
7
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-acl-entry.html module Stratosphere.Resources.EC2NetworkAclEntry where import Stratosphere.Resource...
frontrowed/stratosphere
library-gen/Stratosphere/Resources/EC2NetworkAclEntry.hs
mit
5,616
0
15
644
904
513
391
71
1
module Foundation where import Prelude import Yesod import Yesod.Static import Yesod.Auth import Yesod.Auth.BrowserId import Yesod.Auth.GoogleEmail import Yesod.Default.Config import Yesod.Default.Util (addStaticContentExternal) import Network.HTTP.Client.Conduit (Manager, HasHttpManager (getHttpManager)) import quali...
mostalive/yesod-splittest
Foundation.hs
mit
6,439
0
18
1,429
931
509
422
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-athena-namedquery.html module Stratosphere.Resources.AthenaNamedQuery where import Stratosphere.ResourceImport...
frontrowed/stratosphere
library-gen/Stratosphere/Resources/AthenaNamedQuery.hs
mit
2,793
0
15
361
461
262
199
41
1
module Test.App.Cell (tests) where import Test.Tasty import Test.Tasty.HUnit import App.Cell import App.Direction import App.Stuff tests :: TestTree tests = testGroup "Cell" [ cellVisitTests ] cellVisitTests = testGroup "cellVisit" [ testCase "move up from cell" $ cellVisits (cellVisit emptyCell) ...
triplepointfive/hapi
test/Test/App/Cell.hs
gpl-2.0
461
0
12
93
121
65
56
14
1
import Data.List main :: IO () main = readLn >>= print . solve -- The indices of the asked digits idx :: Int -> [Int] idx p = [ 10^x-1 | x <- [0..6] ] -- Calculate the digits lazily, take out the needed ones, and multiply them. solve :: Int -> Integer solve p = product $ map (read . (\n->[n]) . (str !!)) $...
NorfairKing/project-euler
040/haskell/solution.hs
gpl-2.0
364
0
13
91
147
80
67
8
1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ViewPatterns#-} {-# LANGUAGE FlexibleInstances,UndecidableInstances#-} {-# LANGUAGE CPP #-} module DeriveMutation where import Language.Haskell.TH import Language.Haskell.TH.Syntax import Test.QuickCheck import Control.Monad --import Control.Monad.Free --import Control.Mo...
fcostantini/QuickFuzz
src/DeriveMutation.hs
gpl-3.0
5,166
26
19
1,915
1,549
813
736
97
6
{- Copyright (C) 2014 Ellis Whitehead 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 3 of the License, or (at your option) any later version. This program is distributed in the hope...
ellis/OnTopOfThings
old-20150308/src/OnTopOfThings/Data/Json.hs
gpl-3.0
6,406
2
43
1,628
2,022
1,057
965
135
0
{- The parser combinators used when reading in NFA input. This was created as Project 1 for EECS 665 at the University of Kansas. Author: Ryan Scott -} module NFA2DFA.Parse where import Control.Applicative import Control.Monad import qualified Data.Map as M import Data.Maybe import qual...
RyanGlScott/nfa2dfa
src/NFA2DFA/Parse.hs
gpl-3.0
3,147
0
15
763
801
413
388
62
2
-- What is the greatest product of four adjacent numbers in the same direction -- (up, down, left, right, or diagonally) in the 20×20 grid? {-# LANGUAGE ConstraintKinds#-} {-# LANGUAGE FlexibleContexts#-} -- import Data.Matrix import Control.Monad.State import Control.Monad.Reader import Control.Lens import Data.Mono...
ignuki/projecteuler
11/problem11.hs
gpl-3.0
4,243
0
17
1,636
1,812
1,109
703
78
1
module QFeldspar.Expression.Conversions.Reification(rei,reiVar) where import QFeldspar.Variable.Typed as VT import QFeldspar.Environment.Typed import qualified QFeldspar.Expression.GADTFirstOrder as GFO import QFeldspar.Variable.Conversion () import qualified QFeldspar.Literal.GADT ...
shayan-najd/QFeldspar
QFeldspar/Expression/Conversions/Reification.hs
gpl-3.0
2,201
1
10
680
795
454
341
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-sqladmin/gen/Network/Google/Resource/SQL/Instances/Export.hs
mpl-2.0
5,412
0
20
1,383
863
502
361
126
1
{-# LANGUAGE FlexibleContexts #-} module Misc.Parser.ByteString ( module Data.Attoparsec.ByteString.Char8 , quoted , noneOf1 , token , isToken ) where import Data.Attoparsec.ByteString.Char8 import qualified Data.Attoparsec.ByteString.Char8 as BSParser import Data.ByteString ...
inq/agitpunkt
src/Misc/Parser/ByteString.hs
agpl-3.0
1,198
0
14
331
331
183
148
30
3
module TesML.Data.RecordHeader (RecordHeader , offset , name , dataSize , flags , formId , revision , version ...
Kromgart/tesML
lib/TesML/Data/RecordHeader.hs
agpl-3.0
1,753
0
13
1,129
231
138
93
37
1
{-| Arbitrary types for Network.Haskoin.Crypto -} module Network.Haskoin.Test.Crypto ( ArbitraryHash512(..) , ArbitraryHash256(..) , ArbitraryHash160(..) , ArbitraryCheckSum32(..) , ArbitraryByteString(..) , ArbitraryNotNullByteString(..) , ArbitraryPrvKey(..) , ArbitraryPrvKeyC(..) , ArbitraryPrvKeyU(..) , Arbitrary...
tphyahoo/haskoin
haskoin-core/Network/Haskoin/Test/Crypto.hs
unlicense
8,028
0
13
1,697
1,872
1,015
857
177
1
import Prelude hiding (exp) import Data.Maybe (mapMaybe) import System.Environment (getArgs) import Text.Read (readMaybe) seed :: Int seed = 20151125 base :: Int base = 252533 modulus :: Int modulus = 33554393 iterations :: Int -> Int -> Int iterations row column = (diagonal * diagonal + diagonal) `div` 2 - row w...
petertseng/adventofcode-hs
bin/25_triangular.hs
apache-2.0
1,241
0
18
316
564
297
267
35
3
{-# LANGUAGE ScopedTypeVariables #-} module Main where import Types import Render import Mechanics import Data.Char import System.Environment import Parser import Debug.Trace as D add (x,y) (dx,dy) = (x+dx,y+dy) acceleration = let stg = [(x,y) | y<-[-1,0,1], x<-[-1,0,1]] in \input -> stg !! (input - 1) ...
nrolland/racetrack
src/Main.hs
apache-2.0
1,227
0
16
284
481
254
227
32
3
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QStyleOptionTabBarBase.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:35 Warning : this file is machine gener...
uduki/hsQt
Qtc/Enums/Gui/QStyleOptionTabBarBase.hs
bsd-2-clause
4,742
0
18
919
1,074
528
546
89
1
{-# LANGUAGE NoImplicitPrelude #-} module Hakflow.Instances.Vector where import Prelude.Plus import Data.Vector (Vector) import qualified Data.Vector as V import Control.DeepSeq instance Foldable Vector where foldr = V.foldr foldr1 = V.foldr1 foldl = V.foldl foldl1 = V.foldl1 instance Functor V...
badi/hakflow
Hakflow/Instances/Vector.hs
bsd-2-clause
795
0
10
186
262
145
117
28
0
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverlappingInstances #-} module Text.Syntax.Printer.ByteString ( runAsPrinter, runAsPrinterChar8, runAsPrinter', runAsPrinterChar8' ) where import Control.Monad (liftM2, mplus) import Control.Isomorphism.Partial (IsoFunctor ((<$>)), unapply) import Text.Synta...
schernichkin/haskell-invertible-syntax-attoparsec
Text/Syntax/Printer/ByteString.hs
bsd-3-clause
2,328
0
11
559
661
370
291
54
1
-- Copyright (c) 2016-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. An additional grant -- of patent rights can be found in the PATENTS file in the same directory. ------------------...
facebookincubator/duckling
Duckling/Ranking/Classifiers/MY_XX.hs
bsd-3-clause
828
0
6
105
66
47
19
8
1
{-| Module : Idris.DSL Description : Code to deal with DSL blocks. Copyright : License : BSD3 Maintainer : The Idris Community. -} {-# LANGUAGE PatternGuards #-} module Idris.DSL where import Idris.AbsSyntax import Idris.Core.Evaluate import Idris.Core.TT import Control.Monad.State.Strict import Data.Ge...
FranklinChen/Idris-dev
src/Idris/DSL.hs
bsd-3-clause
10,266
0
17
3,720
4,823
2,362
2,461
195
22
{-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE GADTs #-} module Andromeda.Simulator.Actions where import qualified Data.ByteString.Char8 as BS import qualified Data.Map as M import qualified Control.Monad.Trans.State as S import Control.Monad.IO.Class (liftIO) import Control.Monad import Control.Concurrent im...
graninas/Andromeda
src/Andromeda/Simulator/Actions.hs
bsd-3-clause
2,345
0
15
375
710
361
349
-1
-1
module Main where import System main = do [sn] <- getArgs let n = read sn res = if n > 0 then list $ build (abs n) snoc nil else reverse $ build (abs n) (:) [] print $ length res build :: Int -> (Char -> b -> b) -> b -> b build 0 f x = x build n f x = build (...
ndmitchell/firstify
compare/List.hs
bsd-3-clause
395
0
14
153
215
110
105
15
2
{-# LANGUAGE PatternGuards #-} {-# LANGUAGE FlexibleContexts #-} -- TODO: suggest the convenience functions be put into Hint proper? module Mueval.Interpreter where import qualified Control.Exception.Extensible as E (evaluate,catch,SomeException(..)) import Control.Monad (forM_,guard,mplus,unless,when) impor...
gwern/mueval
Mueval/Interpreter.hs
bsd-3-clause
10,984
0
17
4,605
1,824
979
845
150
4
import System.FilePath.Glob (glob) import Test.DocTest (doctest) main = glob "src/**/*.*hs" >>= doctest -- main = do -- src_hs <- glob "src/**/*.hs" -- src_lhs <- glob "src/**/*.lhs" -- doctest (src_hs ++ src_lhs ++ ["test/TestInstances.hs", "test/TestUtil.hs"])
bjornbm/dimensional-experimental
test/Doctests.hs
bsd-3-clause
275
0
6
46
38
23
15
3
1
{-# LANGUAGE CPP #-} -- |Main module of the Lobby module Main where import Haste.App import Haste.App.Standalone import Haste.App.Concurrent import qualified Control.Concurrent as CC import Views.Lobby import LobbyAPI #ifdef __HASTE__ import LobbyClient (clientMain) #define disconnect(x) (\_ -> return ()) #define...
DATx02-16-14/Hastings
app/StandaloneApp.hs
bsd-3-clause
967
0
11
141
171
93
78
21
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE FlexibleContexts #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} -- | This module contains helper functions to work with JSON -- Credits: https://github.com/klappvisor/haskell-telegram-api mod...
mseri/fbmessenger-api-hs
src/Web/FBMessenger/API/Bot/JsonExt.hs
bsd-3-clause
831
0
8
164
87
54
33
15
1
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} module Lasca.Lexer where import Data.Void import Data.Text (Text) import qualified Data.Text as T import Data.Scientific import Data.Char import qualified Data.List.NonEmpty as NonEmpty import Text.Megaparsec import Control.Monad (void, when) import T...
nau/lasca-compiler
src/lib/Lasca/Lexer.hs
bsd-3-clause
2,601
0
16
509
986
521
465
68
1
module Matterhorn.State.ChannelList ( updateSidebar , updateWindowTitle , toggleChannelListVisibility , showChannelInSidebar ) where import Prelude () import Matterhorn.Prelude import Brick.Main ( getVtyHandle, invalidateCache, invalidateCacheEntry ) import qualified Data.HashM...
matterhorn-chat/matterhorn
src/Matterhorn/State/ChannelList.hs
bsd-3-clause
6,573
0
28
2,059
1,222
608
614
-1
-1
{-# LANGUAGE TemplateHaskell #-} module Language.GDL.Quote ( gdl, gdlq ) where import Data.Data import Data.ByteString.Char8 (ByteString) import qualified Data.ByteString.Char8 as B import Language.Haskell.TH import Language.Haskell.TH.Quote import Language.Haskell.AntiQuoter import Language.GDL.Syntax ...
ian-ross/ggp
Language/GDL/Quote.hs
bsd-3-clause
1,842
0
12
468
616
323
293
44
2
{-# OPTIONS_GHC -w #-} {-# OPTIONS -fglasgow-exts -cpp #-} module LF_Parser ( parseThenCall , parseTermThenCall , SimpleTerm , SyntaxInfo(..) ) where import IOExts_(trace) import Data.Array import Control.Monad (ap) import Data.Char(isSpace) import BaseClasses(OkF(..), Embeddable(..), Fallible(..)) impo...
part-xx/hott-plastic
LF_Parser.--ghc.hs
bsd-3-clause
157,651
5,007
78
23,091
47,001
25,550
21,451
-1
-1
{-# LANGUAGE Safe #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Bitraversable -- Copyright : (C) 2011-2016 Edward Kmett -- License : BSD-style (see the file LICENSE) -- -- Maintainer : libraries@haskell.org -- Stability : provisional -- Porta...
sgillespie/ghc
libraries/base/Data/Bitraversable.hs
bsd-3-clause
7,524
0
13
1,598
1,697
965
732
66
1
{-# LANGUAGE DeriveDataTypeable #-} module Ak.Commands ( Command(cmdName, cmdUsage, cmdHandler, cmdDescription) , CommandHandler , CommandError(CommandError) , throwCommandError , command , allCommands , initializeCmd , addTaskCmd , showTasksCmd ) where import Control.Exception...
elliottt/ak
src/Ak/Commands.hs
bsd-3-clause
3,155
0
18
1,059
785
421
364
109
2
-- http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_6_B -- Finding Missing Cards -- input: -- 47 -- S 10 -- S 11 -- S 12 -- S 13 -- H 1 -- H 2 -- S 6 -- S 7 -- S 8 -- S 9 -- H 6 -- H 8 -- H 9 -- H 10 -- H 11 -- H 4 -- H 5 -- S 2 -- S 3 -- S 4 -- S 5 -- H 12 -- H 13 -- C 1 -- C 2 -- D 1 -- D 2 -- D 3 -- D ...
ku00/aoj-haskell
src/ITP1_6_B.hs
bsd-3-clause
992
0
11
274
304
194
110
13
1
-- | -- Module : Crypto.Cipher.Types -- License : BSD-style -- Maintainer : Vincent Hanquez <vincent@snarc.org> -- Stability : Stable -- Portability : Excellent -- -- Symmetric cipher basic types -- {-# LANGUAGE DeriveDataTypeable #-} module Crypto.Cipher.Types ( -- * Cipher classes Cipher(..)...
tekul/cryptonite
Crypto/Cipher/Types.hs
bsd-3-clause
846
0
5
198
125
93
32
20
0
{-# LANGUAGE OverloadedStrings, DeriveDataTypeable #-} module Main where import Prelude hiding(getContents, putStr, putStrLn) import Data.ByteString.Char8 as BS import qualified System.Network.ZMQ.MDP.Client as C import Data.List as L import System.Console.CmdArgs.Implicit data Client = Client {broker :: String, ...
mwotton/majordomo
src/mdp_client.hs
bsd-3-clause
1,193
0
19
335
329
180
149
26
4
{-# LANGUAGE RecordWildCards, PatternGuards #-} module Text.HTML.TagSoup.Specification(parse) where import Text.HTML.TagSoup.Implementation import Data.Char (isAlpha, isAlphaNum, isDigit, toLower) -- We make some generalisations: -- <!name is a valid tag start closed by > -- <?name is a valid tag start closed by ?> ...
ChristopherKing42/tagsoup
Text/HTML/TagSoup/Specification.hs
bsd-3-clause
10,814
0
14
2,841
4,203
1,997
2,206
210
10
module Prime ( primeRange , isPrime ) where import Data.Bits import Control.Parallel.Strategies powM :: Integer -> Integer -> Integer -> Integer powM a d n = powM' a d n where powM' a d n | d == 0 = 1 | d == 1 = mod a n | otherwise = mod q n where p = powM' ( mod ( a^2 ) n ) (...
mukeshtiwari/miller-rabin-primality
src/Prime.hs
bsd-3-clause
1,237
2
16
446
603
312
291
31
2
-- dynamic programming dp :: [Int] -> Int -> [Int] dp v p = ret where ret = [ (v !! i) + (f i) | i <- [0 .. (length v) - 1] ] f i = if i >= p then ret !! (i - p) else 0 main = print $ v !! 200 where v = foldl dp dp0 [1, 2, 5, 10, 20, 50, 100, 200] dp0 = 1 : (take 200 $ repeat 0)
foreverbell/project-euler-solutions
src/31.hs
bsd-3-clause
315
0
13
115
186
103
83
9
2
module Main where import qualified Pact.GasModel.GasModel as GasModel main :: IO () main = GasModel.main
kadena-io/pact
executables/GasModel.hs
bsd-3-clause
107
0
6
17
30
19
11
4
1
{-# LANGUAGE TypeFamilies, RankNTypes,TypeSynonymInstances, MultiParamTypeClasses,FlexibleInstances #-} module Database.Junk.HashTable (HT (..)) where import Control.Monad.Trans (lift) import qualified Data.Hashable as HS (Hashable) import qualified Data.HashTable.Class as H (HashTable) import qualified Data.HashTable...
seagull-kamome/JunkDB
driver-hashtables/Database/Junk/HashTable.hs
bsd-3-clause
860
0
10
147
333
188
145
16
0
{-# OPTIONS_GHC -fno-warn-orphans #-} module Pos.Core.Common.StakeholderId ( StakeholderId ) where import Universum import Text.JSON.Canonical (FromObjectKey (..), JSValue (..), ReportSchemaErrors, ToObjectKey (..)) import Pos.Core.Common.AddressHash ...
input-output-hk/pos-haskell-prototype
core/src/Pos/Core/Common/StakeholderId.hs
mit
916
0
9
204
182
109
73
-1
-1
{-# LANGUAGE MultiParamTypeClasses #-} module Core ( NonUnitVector , UnitVector , Point(..) , Ray(..) , Transform(..) , RayPosition , VectorUnaryOps(..) , VectorBinaryOps(..) , vector , normal , unsafeForceUnitVector , origin , to , normalize , at , toRayPosition , magnitude ) where data Vector = Vector !Double !...
stu-smith/rendering-in-haskell
src/experiment04/Core.hs
mit
5,359
0
11
1,719
2,235
1,116
1,119
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveDataTypeable #-} module Gpg.Run ( module Gpg.Run , module Gpg.Basic , StatusCode(..) ) where import Bindings import Control.Applicative import qualified Control.Exception as Ex import Control.Monad import Control.Mona...
pontarius/pontarius-gpg
src/Gpg/Run.hs
mit
3,839
0
17
1,247
1,114
568
546
95
9
{-# LANGUAGE CPP #-} module DTypes.Precompose ( Precompose (..) ) where import DTypes.Classes import DTypes.Compose import DTypes.Trafo #if !MIN_VERSION_base(4,8,0) import Control.Applicative (Applicative (..), (<$>)) import Data.Traversable (Traversable (..)) #endif newtype Precompose d f g = Precompose { ...
timjb/ftypes
src/DTypes/Precompose.hs
mit
1,058
0
12
215
391
205
186
23
0
{-# OPTIONS -fno-implicit-prelude #-} module GHC.Dynamic ( Dynamic, TypeRep, dynTypeRep, showsTypeRep ) where import Data.Dynamic ( Dynamic, dynTypeRep ) import Data.Typeable ( TypeRep ) import GHC.Show ( ShowS, shows ) showsTypeRep :: TypeRep -> ShowS showsTypeRep = shows
alekar/hugs
packages/base/GHC/Dynamic.hs
bsd-3-clause
280
6
5
44
77
47
30
8
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RankNTypes #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.LHC -- Copyright : Isaac Jones 2003-2007 -- License : BSD3 -- -- Maintainer : cabal-devel@haskell.org -- Portability : portab...
themoritz/cabal
Cabal/Distribution/Simple/LHC.hs
bsd-3-clause
32,866
0
27
9,355
7,276
3,749
3,527
577
6
import Diagrams.Prelude import Diagrams.Backend.OpenGL import Diagrams.Backend.OpenGL.CmdLine main :: IO () main = defaultMain d d :: Diagram OpenGL R2 d = circle 1 # fc green # lc blue
bergey/diagrams-opengl
examples/curves.hs
bsd-3-clause
188
0
7
31
69
36
33
7
1
{-# LANGUAGE NoImplicitPrelude, MagicHash, TypeOperators, DataKinds, TypeFamilies, FlexibleContexts, MultiParamTypeClasses, AllowAmbiguousTypes #-} ----------------------------------------------------------------------------- -- | -- Module : Java.Concurrent -- Copyright : (c) Jyothsna Srinivas 2017 -- -- Li...
rahulmutt/ghcvm
libraries/base/Java/Concurrent.hs
bsd-3-clause
3,146
25
11
430
577
312
265
-1
-1
module Main where import Language.Lua.Lexer import Control.Monad import Data.Loc import Text.Printf main :: IO () main = forever $ do tks <- streamToList . runLexer luaLexer "stdin" <$> getLine putStr "[ " mapM_ (\(L loc tk) -> printf "%s @ %s, " (show tk) (show loc)) tks putStrLn "]"
mitchellwrosen/language-lua2
app/Lex.hs
bsd-3-clause
305
0
13
68
119
60
59
11
1
{-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeInType #-} {-# LANGUAGE TypeOperators ...
ezyang/ghc
testsuite/tests/dependent/should_compile/T14038.hs
bsd-3-clause
2,353
22
20
687
999
574
425
-1
-1
{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- -- Machine-dependent assembly language -- -- (c) The University of Glasgow 1993-2004 -- ----------------------------------------------------------------------------- #include "HsVersions.h" #include "nativeGen/NCG.h"...
vikraman/ghc
compiler/nativeGen/PPC/Instr.hs
bsd-3-clause
26,174
0
18
9,031
6,956
3,587
3,369
454
64
module Distribution.Solver.Modular.Log ( Log , logToProgress ) where import Control.Applicative import Data.List as L import Data.Maybe (isNothing) import Distribution.Solver.Types.PackagePath import Distribution.Solver.Types.Progress import Distribution.Solver.Modular.Dependency import Distribution.Solv...
sopvop/cabal
cabal-install/Distribution/Solver/Modular/Log.hs
bsd-3-clause
5,126
0
17
1,814
1,099
579
520
53
15
{-# LANGUAGE CPP #-} {-# OPTIONS_HADDOCK show-extensions #-} -- | -- Module : Yi.Buffer.Region -- License : GPL-2 -- Maintainer : yi-devel@googlegroups.com -- Stability : experimental -- Portability : portable -- -- This module defines buffer operation on regions module Yi.Buffer.Region ( module Yi...
siddhanathan/yi
yi-core/src/Yi/Buffer/Region.hs
gpl-2.0
5,126
0
21
1,329
1,243
647
596
89
3
module Test.SwiftNav.SBP.Tracking ( tests ) where import BasicPrelude import SwiftNav.SBP.Tracking import Test.SwiftNav.SBP.Utils import Test.Tasty import Test.Tasty.HUnit testParse :: TestTree testParse = testGroup "Package tests" [ testCase "Parsing tests" $ do let filepath = "../spec/tests/yaml/s...
mookerji/libsbp
haskell/test/Test/SwiftNav/SBP/Tracking.hs
lgpl-3.0
555
0
12
120
117
65
52
19
1
-- | -- Module : $Header$ -- Copyright : (c) 2013-2015 Galois, Inc. -- License : BSD3 -- Maintainer : cryptol@galois.com -- Stability : provisional -- Portability : portable -- -- Convert a literate source file into an ordinary source file. {-# LANGUAGE OverloadedStrings, Safe, PatternGuards #-} mo...
iblumenfeld/cryptol
src/Cryptol/Parser/Unlit.hs
bsd-3-clause
3,891
0
12
1,255
1,376
712
664
86
5
module MultiMatchesIn1 where --The application of a function is replaced by the right-hand side of the definition, --with actual parameters replacing formals. --In this example, unfold the first 'sq' in 'sumSquares' --This example aims to test unfolding a function application with multiple matches. sumSquares x y ...
kmate/HaRe
old/testing/unfoldDef/MultiMatchesIn1.hs
bsd-3-clause
358
0
6
62
53
29
24
5
1
module WhereIn3 where sumSquares x y = (sq p x) + (sq p y) where p = 2 sq :: Int -> Int -> Int sq pow 0 = 0 sq pow z = z ^ pow sq :: Int -> Int -> Int sq pow 0 = 0 sq pow z = z ^ pow anotherFun 0 y = sq y where sq x = x ^ 2
kmate/HaRe
old/testing/demote/WhereIn3AST.hs
bsd-3-clause
261
0
8
106
142
73
69
11
2
{-# LANGUAGE DeriveDataTypeable, UndecidableInstances #-} {-# LANGUAGE CPP #-} -- -- (c) The University of Glasgow 2002-2006 -- -- The IO Monad with an environment -- -- The environment is passed around as a Reader monad but -- as its in the IO monad, mutable references can be used -- for updating state. -- module IO...
green-haskell/ghc
compiler/utils/IOEnv.hs
bsd-3-clause
7,036
0
13
1,419
1,838
971
867
-1
-1
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE Trustworthy #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Functor.Compose -- Copyright : (c) Ross Paterson 20...
shlevy/ghc
libraries/base/Data/Functor/Compose.hs
bsd-3-clause
3,707
0
12
782
1,141
618
523
60
0
{-# LANGUAGE OverloadedStrings, DeriveDataTypeable #-} module Ros.Internal.Header where import qualified Prelude as P import qualified Data.Typeable as T import Control.Applicative import Ros.Internal.RosBinary import Ros.Internal.Msg.MsgInfo import Ros.Internal.RosTypes import qualified Data.Word as Word data Header ...
bitemyapp/roshask
src/Ros/Internal/Header.hs
bsd-3-clause
761
2
13
166
206
117
89
19
0
{-# LANGUAGE NoImplicitPrelude #-} module Stack.Options.GhcVariantParser where import Options.Applicative import Options.Applicative.Types (readerAsk) import Stack.Prelude import Stack.Options.Utils import Stack.Types.Config -- | GHC variant parser ghcVariantP...
MichielDerhaeg/stack
src/Stack/Options/GhcVariantParser.hs
bsd-3-clause
771
0
14
240
148
76
72
20
2
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} module Data.Vector.Hybrid.Internal (Vector) where import Control...
ezyang/ghc
testsuite/tests/simplCore/should_compile/T13410.hs
bsd-3-clause
4,743
0
16
1,183
1,964
1,008
956
-1
-1
{-# htermination foldl :: (a -> b -> a) -> a -> [b] -> a #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_foldl_1.hs
mit
61
0
2
16
3
2
1
1
0
module Data.CapnProto.Serialize where import Control.Monad import Data.ByteString (useAsCStringLen) import qualified Data.ByteString as BS import Data.ByteString.Internal import Data.Word import Foreign.Ptr import Foreign.Storable import ...
cstrahan/hs-capnp
src/Data/CapnProto/Serialize.hs
mit
2,214
0
15
607
603
306
297
50
2
{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- | -- Module : Plugins.HelloWorld -- Copyright : (c) Andrea Rossato -- License : BSD-style (see LICENSE) -- -- Maintainer : Jose A. Ortega Ruiz <jao@gnu.org> -- Stability : unstable -- P...
Tr1p0d/xmobar_NetworkManager_plugin
src/Plugins/NetworkManager.hs
mit
2,358
0
13
411
471
257
214
-1
-1
module Template where import Language import Utils {-exs_1-}type MultState = (Int, Int, Int, Int) -- (n, m, d, t) {-exs_1-}evalMult :: MultState -> [MultState] {-exs_1-}evalMult state = if multFinal state {-exs_1-} then [state] {-exs_1-} else state : evalMult (stepMult state) {-...
binesiyu/ifl
book/template.hs
mit
11,639
240
11
3,101
3,173
1,785
1,388
-1
-1
type Diagram b = QDiagram b (V b) (N b) Any newtype QDiagram b v n m = QD (DUALTree (DownAnnots v n) (UpAnnots b v n m) Annotation (QDiaLeaf b v n m)) data QDiaLeaf b v n m = PrimLeaf (Prim b v n) | Delaye...
jeffreyrosenbluth/NYC-meetup
meetup/QDiagram.hs
mit
1,038
0
11
365
372
203
169
-1
-1
{-# LANGUAGE CPP, MultiParamTypeClasses #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module System.Process.ByteString.Lazy where #if __GLASGOW_HASKELL__ <= 709 import Control.Applicative ((<$>)) #endif import Control.DeepSeq (force) import qualified Control.Exception as C (evaluate) import Data.ByteString.Lazy (ByteStrin...
seereason/process-extras
src/System/Process/ByteString/Lazy.hs
mit
1,656
0
13
342
286
175
111
30
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} module Betfair.APING.Types.AppKey ( AppKey ) where import Protolude -- data Token = Token Text -- deriving (Eq, Show, Generic, Pretty) type AppKey = Text
joe9/betfair-api
src/Betfair/APING/Types/AppKey.hs
mit
234
0
4
42
26
19
7
6
0
{-# LANGUAGE CPP, TypeFamilies, DeriveDataTypeable #-} module PGIP.GraphQL.Result.ReasoningAttempt where import PGIP.GraphQL.Result.Action import PGIP.GraphQL.Result.Reasoner import PGIP.GraphQL.Result.ReasonerConfiguration import PGIP.GraphQL.Result.ReasonerOutput import Data.Data data ReasoningAttempt = Reasoni...
spechub/Hets
PGIP/GraphQL/Result/ReasoningAttempt.hs
gpl-2.0
626
0
9
152
105
66
39
14
0
-- |Haskollider.Osc facilitates the actual osc communication with a running scsynth instance. module Haskollider.Osc where import Control.Concurrent import Sound.OSC import Control.Monad createOscServer :: Int -> (Message -> IO ()) -> IO ThreadId createOscServer listeningPort parseFunc = forkIO $ withTransport server...
ChadMcKinney/Haskollider
src/Haskollider/Osc.hs
gpl-2.0
1,848
0
13
347
299
147
152
22
2
{- | Module : $Header$ Description : Interface for the SPASS theorem prover. Copyright : (c) Rene Wagner, Klaus Luettich, Rainer Grabbe, Uni Bremen 2005-2006 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portability : ne...
nevrenato/Hets_Fork
SoftFOL/ProveSPASS.hs
gpl-2.0
9,247
0
21
2,373
1,584
866
718
145
4
-- | Driver module for running the test suite. module RunTests where import Test.HUnit(runTestTT, errors, failures) import qualified Dsgen.TestCards as TestCards import qualified Dsgen.TestSetSelect as TestSetSelect {- Test collection lists -} hunitTests = [ TestCards.hunitTests, TestSetSelect.hunitTests ...
pshendry/dsgen
testsuite/RunTests.hs
gpl-3.0
804
0
8
173
179
90
89
24
1
module BlastItWithPiss.PastaGen (readPastaFile ,parsePasta ,randomQuote ,genPastaRandomQuote ,choosePostToRepost ,probablyDescendAndGetPosts ,genPastaFromReposts ) where import Import import BlastItWithPiss.Parsing import BlastItWithPiss.MonadChoice import qualified Data.Text as T im...
exbb2/BlastItWithPiss
src/BlastItWithPiss/PastaGen.hs
gpl-3.0
3,416
0
16
975
940
468
472
85
2
{-# OPTIONS_GHC -Wall #-} module Database.Design.Ampersand.ADL1.Disambiguate(disambiguate, DisambPrim(..),pCpt2aCpt) where import Database.Design.Ampersand.Core.ParseTree import Database.Design.Ampersand.Core.AbstractSyntaxTree hiding (sortWith, maxima, greatest) import Database.Design.Ampersand.Basics (fatalMsg) impor...
DanielSchiavini/ampersand
src/Database/Design/Ampersand/ADL1/Disambiguate.hs
gpl-3.0
15,558
0
17
3,643
4,676
2,462
2,214
217
13
{-# LANGUAGE TemplateHaskell #-} module Task ( Task (..) , TaskStatus(..) , ActiveTask(..) , id , target , taskType , command , precondition ) where import Prelude hiding (id) import Control.Lens((^.)) import Control.Lens.T...
svenkeidel/gnome-citadel
src/Task.hs
gpl-3.0
1,391
1
14
459
379
214
165
44
0
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} module Ampersand.Output.ToJSON.Populations (Populations) where import Ampersand.ADL1 import Ampersand.Basics import Ampersand.Output.ToJSON.JSONutils import Data.Maybe im...
AmpersandTarski/ampersand
src/Ampersand/Output/ToJSON/Populations.hs
gpl-3.0
2,629
0
15
542
754
408
346
63
0
data Person = Person { name :: String , age :: Int , pl :: String } deriving (Eq, Show) nonEmpty :: String -> Maybe String -- pattern match; yes, there are other ways to do it nonEmpty "" = Nothing nonEmpty str = Just str nonNegative :: Int -> Maybe Int nonNegative n = if n >= 0 then Just n...
GinBaby/applicatives
maybe.hs
gpl-3.0
3,229
0
16
900
649
332
317
56
4
module NS3473Beam.BeamSystem where -- let system = S.BeamSystem curB curH curD (nd opts) (nl opts) curO (Just curV) (Just curM) curS curXI (lt opts) class BeamSystem a where w :: a -> Double -- ^ Beam width [mm] wt :: a -> Double -- ^ Beam width [mm] h :: a -> Double -- ^...
baalbek/ns3473beam
src/NS3473Beam/BeamSystem.hs
gpl-3.0
1,222
0
8
389
189
110
79
19
0
module HandSpec (main, spec) where import Test.Hspec import Hokey.Hand import Hokey.Card main :: IO () main = hspec spec spec :: Spec spec = do let twoPairPairedBoard = [Card Ace D, Card Ace H, Card Three S, Card Three C, ...
CalumMcCall/hokey
test/HandSpec.hs
gpl-3.0
6,837
0
17
2,650
2,271
1,102
1,169
161
1
module DL3056 (tests) where import qualified Data.Map as Map import qualified Hadolint.Process import qualified Hadolint.Rule as Rule import Helpers import Test.Hspec tests :: SpecWith () tests = do let ?rulesConfig = Hadolint.Process.RulesConfig [] (Map.fromList [("semver", Rule.SemVer)]) False describe "DL3056...
lukasmartinelli/hadolint
test/DL3056.hs
gpl-3.0
927
0
15
160
182
90
92
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-healthcare/gen/Network/Google/Resource/Healthcare/Projects/Locations/DataSets/ConsentStores/TestIAMPermissions.hs
mpl-2.0
7,497
0
16
1,444
791
467
324
126
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.Logging.Typ...
rueshyna/gogol
gogol-logging/gen/Network/Google/Logging/Types/Product.hs
mpl-2.0
82,992
0
42
20,166
14,185
8,225
5,960
1,543
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/Purge.hs
mpl-2.0
5,543
0
16
1,213
785
461
324
108
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-monitoring/gen/Network/Google/Resource/Monitoring/Projects/CollectdTimeSeries/Create.hs
mpl-2.0
6,804
0
19
1,562
944
550
394
139
1
{-# LANGUAGE LambdaCase, MultiParamTypeClasses, FlexibleInstances, InstanceSigs, OverloadedStrings #-} module Papstehrenwort.I18n ( renderMessage , Markup(..), FromMarkup(..) , Default(..), Lang(..) , UIMessages(..) ) where import Protolude import Data.String (fromString) import Data.List.NonEmpty (NonEmpty(...
openlab-aux/papstehrenwort
src/Papstehrenwort/I18n.hs
agpl-3.0
4,742
0
16
1,418
896
487
409
92
0
module Foundation where import Import.NoFoundation import Database.Persist.Sql (ConnectionPool, runSqlPool) import Text.Hamlet (hamletFile) import Text.Jasmine (minifym) import Yesod.Auth.BrowserId (authBrowserId) import Yesod.Auth.Message (AuthMessage (InvalidLogin)) import Yesod.Default.Util (ad...
learnyou/lypaste
Foundation.hs
agpl-3.0
5,365
0
14
1,153
622
344
278
-1
-1
module XMobar (xmobarLogHook) where import Control.Arrow ((>>>), (&&&), (***), first, second) import Control.Monad.State (gets) import Data.Monoid ((<>), mappend) import Data.List (intercalate, isPrefixOf, reverse) import System.FilePath (splitDirectories, joinPath) import XMonad.Core (spawn, windowset, X) import XMo...
Balletie/.xmonad
lib/XMobar.hs
unlicense
4,347
0
16
960
1,034
561
473
86
5
module RL_Glue.Experiment ( runExperiment, initExperiment, cleanupExperiment, runEpisode, startEpisode, stepEpisode, getNumSteps, getNumEpisodes, getReturn ) where import Control.Monad.Trans.Maybe import Data.Binary.Get import Data.Binary.IEEE754 import Data.Binary.Put import qualified Data.ByteString as BS impo...
rhofour/rlglue-haskell-codec
src/RL_Glue/Experiment.hs
apache-2.0
3,541
0
18
872
1,026
498
528
99
2
{-# LANGUAGE OverloadedStrings, FlexibleContexts #-} module Ethereum.AnalyzerSpec ( spec ) where import Protolude hiding (show) import Ckev.In.Text import Data.Text as DT import Ethereum.Analyzer.EVM import Ethereum.Analyzer.TestData.Basic import Test.Hspec spec :: Spec spec = describe "disasm" $ do it "w...
zchn/ethereum-analyzer
ethereum-analyzer/test/Ethereum/AnalyzerSpec.hs
apache-2.0
5,106
0
15
1,995
586
367
219
159
1
{-# LANGUAGE CPP #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} -- | @Alt F@ is the free 'Alternative' functor on @F@ module Env.Free ( Alt(..) , liftAlt , runAlt , foldAlt , hoistAlt -- * Debug , inspect ) where #if __GLASGOW_HASKELL__ < 710 import Control....
olorin/envparse
src/Env/Free.hs
bsd-2-clause
2,222
0
11
595
1,054
543
511
63
5