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
import Call main = runSystemDefault $ do linkPicture $ const $ return $ color blue $ circleOutline 240 stand
fumieval/call
examples/circle.hs
bsd-3-clause
113
0
11
23
41
19
22
4
1
{-# LANGUAGE ExistentialQuantification, FlexibleInstances, GeneralizedNewtypeDeriving, MultiParamTypeClasses, TypeSynonymInstances, CPP, DeriveDataTypeable #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Core -- Copyright : (c) Spencer Jan...
csstaub/xmonad
XMonad/Core.hs
bsd-3-clause
22,214
0
22
5,439
4,331
2,371
1,960
-1
-1
module Main where newtype CmdLineP s a = CmdLineP { runCmdLine :: s -> (a, s) } instance Monad (CmdLineP s) where return a = CmdLineP $ \s -> (a, s) m >>= k = CmdLineP $ \s -> let (a, s') = runCmdLine m s in runCmdLine (k a) s' dynamic_flags :: [Flag (CmdLineP DynFlags)] dyna...
dterei/Scraps
haskell/twoTypeArgs.hs
bsd-3-clause
575
0
12
181
231
130
101
19
1
import qualified Data.Map as M data StepState = StepState { minDigit :: Int, maxDigit :: Int, lastDigit :: Int } deriving (Show, Eq, Ord) up, down :: StepState -> StepState up (StepState a b c) = StepState a (max b $ c + 1) (c + 1) down (St...
EdisonAlgorithms/ProjectEuler
vol4/178.hs
mit
880
0
13
267
438
229
209
18
1
import Control.Monad import Distribution.Simple import Distribution.Simple.BuildPaths (autogenModulesDir) import Distribution.Simple.InstallDirs as I import Distribution.Simple.LocalBuildInfo as L import qualified Distribution.Simple.Setup as S import qualified Distribution.Simple.Program as P import Distribution.Simp...
fredokun/piccolo
Setup.hs
gpl-3.0
2,498
0
13
567
558
306
252
53
1
main :: (Int,Int,Int,Int,Int,Int,Int,Char,String,Int,Maybe Char) main = undefined
roberth/uu-helium
test/staticerrors/TupleTooBig3.hs
gpl-3.0
84
0
6
9
47
29
18
2
1
{-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} -- TODO: clean up name shadowing {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- @NOCOMMIT module Pontarius.E2E.SMP where import Control.Monad.Except...
Philonous/pontarius-xmpp-e2e
source/Pontarius/E2E/SMP.hs
apache-2.0
7,446
0
16
2,386
2,654
1,369
1,285
178
2
{-# LANGUAGE CPP, GADTs #-} {-# OPTIONS_GHC -fno-warn-type-defaults #-} -- ---------------------------------------------------------------------------- -- | Handle conversion of CmmProc to LLVM code. -- module LlvmCodeGen.CodeGen ( genLlvmProc ) where #include "HsVersions.h" import Llvm import LlvmCodeGen.Base import...
olsner/ghc
compiler/llvmGen/LlvmCodeGen/CodeGen.hs
bsd-3-clause
72,290
3
25
21,207
19,706
9,743
9,963
1,248
64
{-# LANGUAGE ScopedTypeVariables, OverloadedStrings #-} {-| Description: Respond to various requests involving database course information. This module contains the functions that perform different database queries and serve the information back to the client. -} module Database.CourseQueries (retrieveCourse, ...
tamaralipowski/courseography
hs/Database/CourseQueries.hs
gpl-3.0
7,938
0
16
1,993
1,840
925
915
131
2
{- (c) The AQUA Project, Glasgow University, 1993-1998 \section[SimplUtils]{The simplifier utilities} -} {-# LANGUAGE CPP #-} module SimplUtils ( -- Rebuilding mkLam, mkCase, prepareAlts, tryEtaExpandRhs, -- Inlining, preInlineUnconditionally, postInlineUnconditionally, activ...
mcschroeder/ghc
compiler/simplCore/SimplUtils.hs
bsd-3-clause
79,744
0
18
24,371
8,416
4,497
3,919
-1
-1
module Language.Haskell.Liquid.Simplify (simplifyBounds) where import Language.Haskell.Liquid.Types import Language.Fixpoint.Types import Language.Fixpoint.Visitor -- import Control.Applicative ((<$>)) import Data.Monoid simplifyBounds :: SpecType -> SpecType simplifyBounds = fmap go where go x ...
mightymoose/liquidhaskell
src/Language/Haskell/Liquid/Simplify.hs
bsd-3-clause
1,197
0
11
315
287
155
132
23
1
module C4 where import D4 instance SameOrNot Double where isSameOrNot a b = a == b isNotSame a b = a /= b myFringe :: (Tree a) -> [a] myFringe (Leaf x) = [x] myFringe (Branch left right) = myFringe left
SAdams601/HaRe
old/testing/renaming/C4_AstOut.hs
bsd-3-clause
222
0
7
60
97
51
46
8
1
{-# LANGUAGE DataKinds, ExistentialQuantification, MagicHash, RankNTypes, TypeApplications #-} import GHC.Records (HasField(..)) data T = MkT { foo :: forall a . a -> a } data U = forall b . MkU { bar :: b } -- This should fail because foo is higher-rank. x = getField @"foo" (MkT id) -- This should fai...
ezyang/ghc
testsuite/tests/overloadedrecflds/should_fail/hasfieldfail02.hs
bsd-3-clause
445
0
10
95
109
62
47
8
1
module E where import System.IO.Unsafe a :: Int a = 1
urbanslug/ghc
testsuite/tests/safeHaskell/ghci/E.hs
bsd-3-clause
57
0
4
14
20
13
7
4
1
import Data.List extractABAs s | length s < 3 = [] | otherwise = if x == z && x /= y then (x, y) : extractABAs (tail s) else extractABAs (tail s) where [x, y, z] = take 3 s separate supernet hypernet buffer [] = (buffer : supernet, hypernet) separate supernet hypernet buffer (c:cs) | c == ...
lzlarryli/advent_of_code_2016
day7/part2.hs
mit
788
0
11
198
367
184
183
21
2
import Control.Arrow import Data.List import Data.List.Split (|>) :: a -> (a -> b) -> b (|>) x y = y x infixl 0 |> main :: IO () main = do _ <- getLine interact $ readInts >>> solve >>> map show >>> intercalate "\n" solve :: [Integer] -> [Int] solve = iterate step >>> map length >>> takeWhile (>0) step :: [...
Dobiasd/HackerRank-solutions
Algorithms/Warmup/Cut_the_sticks/Main.hs
mit
466
0
10
101
225
119
106
16
1
{-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE FlexibleContext...
b1g3ar5/Spreadsheet
Parser.hs
mit
9,128
21
17
2,816
3,075
1,526
1,549
286
3
{-# LANGUAGE OverloadedStrings #-} module Chat where import Data.Aeson hiding (Success) import Control.Applicative ((<$>), (<*>)) import qualified Data.Text as T import qualified Network.WebSockets as WS import Control.Concurrent.STM (atomically) import Control.Concurrent.STM.TVar (TVar, newTVar, readTVar, writeTVar) ...
SPY/scotty-chat-sandbox
src/Chat.hs
mit
1,142
0
10
228
398
221
177
27
1
{- acid-state is a log-based storage, therefor correct ordering of transactions is a - key point to guarantee consistency. - To test the correctness of ordering we use a simple non-commutative - operation, as lined out in the following. -} import Test.QuickCheck ncOp1 :: Int -> Int -> Int ncOp1 x v = (x + v) `mod...
sdx23/acid-state-dist
test/NonCommutative.hs
mit
928
0
14
243
387
202
185
20
1
---------------------------------------------------------------- -- -- | Ascetic -- -- @Text\/Ascetic\/HTML.hs@ -- -- Wrappers for building HTML file represented using the -- Ascetic data structure. ---------------------------------------------------------------- -- module Text.Ascetic.HTML where import Data...
lapets/ascetic
Text/Ascetic/HTML.hs
mit
2,086
0
18
426
810
445
365
52
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE TupleSections #-} module Text.Atomos.Atom.Export where import Data.DList (DList) import qualified Data.DList as D import qualified Data.List.NonEmpty as N import Data.Monoid import Text.Atomos.Types import Text.HTML.TagSoup imp...
philopon/atomos
Text/Atomos/Atom/Export.hs
mit
6,875
0
27
1,425
2,923
1,518
1,405
124
1
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE FlexibleInstances #-} module Rules where -- | IF 'condition' DO 'action' rule following Minsky's "Model Six" data IfDo c a = IfDo { condition :: c , action :: a } deriving (E...
research-team/robot-dream
src/Rules.hs
mit
1,215
0
10
347
313
169
144
24
0
{-| Module: Itchy.Localization.RichText Description: RichText License: MIT -} {-# LANGUAGE GeneralizedNewtypeDeriving, LambdaCase, OverloadedStrings #-} module Itchy.Localization.RichText ( RichText(..) , RichChunk(..) ) where import Data.String import qualified Data.Text as T import qualified Text.Blaze as TB im...
quyse/itchy
Itchy/Localization/RichText.hs
mit
1,067
8
15
161
329
178
151
34
0
{-# LANGUAGE RecordWildCards #-} module Main ( main ) where import Universum import Control.Exception.Safe (handle) import Data.Maybe (fromMaybe) import Formatting (sformat, shown, (%)) import qualified Network.Transport.TCP as TCP (TCPAddr (..)) import qualified...
input-output-hk/pos-haskell-prototype
auxx/Main.hs
mit
7,841
0
19
2,649
1,656
895
761
-1
-1
module Movement where import Direction import Rooms import Data.List import Data.Map(Map,toList,lookup) import Data.Maybe type Transitions = Map (Room, Direction) Room move :: Transitions -> Room -> Direction -> Maybe Room move transitions current dir = Data.Map.lookup (current, dir) transitions doMove :: Transi...
disquieting-silence/adventure
src/Movement.hs
mit
797
0
14
145
304
170
134
19
2
module Orville.PostgreSQL.Internal.SyntheticField ( SyntheticField, syntheticFieldExpression, syntheticFieldAlias, syntheticFieldValueFromSqlValue, syntheticField, nullableSyntheticField, ) where import qualified Orville.PostgreSQL.Internal.Expr as Expr import Orville.PostgreSQL.Internal.FieldD...
flipstone/orville
orville-postgresql-libpq/src/Orville/PostgreSQL/Internal/SyntheticField.hs
mit
2,623
0
10
441
316
184
132
40
2
-- | failure semantics {-# language TemplateHaskell #-} {-# language DeriveDataTypeable #-} {-# language FlexibleInstances #-} {-# language MultiParamTypeClasses #-} module CSP.STS.Fail where import Challenger.Partial import Inter.Types import Inter.Quiz import CSP.STS.Type import CSP.STS.Dot import CSP.Fail.Compu...
marcellussiegburg/autotool
collection/src/CSP/STS/Fail.hs
gpl-2.0
4,091
0
14
1,469
1,258
716
542
93
2
{-# LANGUAGE DatatypeContexts #-} {-# LANGUAGE DatatypeContexts #-} {-# language DatatypeContexts #-} {-# language TemplateHaskell #-} {-# language DeriveDataTypeable #-} {-# language FlexibleContexts #-} {-# language MultiParamTypeClasses #-} module Rewriting.Termination where import Rewriting.Termination.Semiring i...
marcellussiegburg/autotool
collection/src/Rewriting/Termination.hs
gpl-2.0
6,490
0
21
1,620
1,875
976
899
147
11
{-| This module is a collection of utility functions performed over the syntax of Pepa models. -} module Language.Pepa.PepaUtils ( TransitionAnalysis ( .. ) , modelTransitionAnalysis , isPepaActionEnabled , TransSuccessor , possibleTransSuccessors , possibleTransitions , allTransitions...
allanderek/ipclib
Language/Pepa/PepaUtils.hs
gpl-2.0
17,214
0
13
4,867
2,491
1,359
1,132
217
10
-- xmonad: Personal module: Appearance -- Author: Simon L. J. Robin | https://sljrobin.org -------------------------------------------------------------------------------- module Appearance where -------------------------------------------------------------------------------- -- * `XMonad.Layout.Decoration` -> Enable ...
sljrobin/dotfiles
xmonad/.xmonad/lib/Appearance.hs
gpl-2.0
2,458
0
6
467
189
136
53
27
1
{-# LANGUAGE DeriveDataTypeable #-} {- | Module : ./OWL2/MS.hs Copyright : (c) Felix Gabriel Mance License : GPLv2 or higher, see LICENSE.txt Maintainer : f.mance@jacobs-university.de Stability : provisional Portability : portable Datatypes specific to the Manchester Syntax of OWL 2 References :...
gnn/Hets
OWL2/MS.hs
gpl-2.0
7,970
0
13
1,348
2,253
1,134
1,119
160
11
{-# OPTIONS_GHC -Wall #-} -- rewrite of dwm-status.c in the one true programming language -- but first, install haskell-x11 import Graphics.X11.Xlib.Event (sync) import Graphics.X11.Xlib.Display (defaultRootWindow, openDisplay, closeDisplay) -- import Graphics.X11.Xlib.Display -- import Graphics.X11.Xlib.Types (Displ...
ninedotnine/dwm-status-haskell
dwm-status.hs
gpl-3.0
6,548
16
14
1,686
1,143
596
547
107
6
{-# LANGUAGE UnicodeSyntax #-} module Util.Match ( match , matchBy , MatchResult , leftOnly , rightOnly , both ) where import BaseImport import Data.List data MatchResult ξ = MatchResult { leftOnly ∷ [ξ] , rightOnly ∷ [ξ] , both...
c0c0n3/audidoza
app/Util/Match.hs
gpl-3.0
1,505
0
11
486
567
300
267
33
5
{-# LANGUAGE OverloadedStrings #-} module Main where import System.Environment import System.Exit import System.Remote.Monitoring import Brnfckr.Eval (runBrainFuck) main :: IO () main = do forkServer "localhost" 8000 fname <- fmap head getArgs source <- readFile fname stream <- getContents case runBrainFu...
johntyree/brnfckr
src/executables/Main.hs
gpl-3.0
428
0
13
82
153
79
74
15
2
-- Copyright (C) 2014 Boucher, Antoni <bouanto@gmail.com> -- -- 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. -- -...
antoyo/recettesduquebec2tex
src/Cookbook.hs
gpl-3.0
2,317
0
8
396
364
206
158
22
1
import Control.Monad as M import Control.Monad as MP import Control.Monad.IO.Class (liftIO) import Control.Monad.Trans.Resource import Data.Array.Repa as R import Data.Conduit import Data.Conduit.List ...
XinhuaZhang/PetaVisionHaskell
Application/Amoeba/Plot.hs
gpl-3.0
2,384
1
18
929
587
318
269
57
3
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
dysinger/amazonka
amazonka-codedeploy/gen/Network/AWS/CodeDeploy/UpdateDeploymentGroup.hs
mpl-2.0
7,646
0
10
1,565
930
556
374
107
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- ...
olorin/amazonka
amazonka-storagegateway/gen/Network/AWS/StorageGateway/RemoveTagsFromResource.hs
mpl-2.0
5,076
0
13
1,070
679
406
273
88
1
{-# LANGUAGE OverloadedStrings #-} module Commands.Autokick ( autokick ) where import Data.ByteString (ByteString) import Control.Monad import Data.Maybe import Data.Response import Network.IRC autokick :: Monad m => ByteString -> ByteString -> Response m autokick msg usr = simpleCmd' msg $ \p chan -> ...
tsahyt/lmrbot
src/Commands/Autokick.hs
agpl-3.0
455
0
13
121
146
75
71
16
1
module ObjD.Link.Inline ( maybeInlineCall, inlineCall )where import ObjD.Link.Struct import ObjD.Link.Env import ObjD.Link.DataType import qualified Data.Map as M import Control.Arrow import Data.Maybe maybeInlineCall :: Env -> Exp -> Exp maybeInlineCall env e = let callExpOpt ...
antonzherdev/objd
src/ObjD/Link/Inline.hs
lgpl-3.0
5,077
34
20
1,133
2,357
1,190
1,167
112
34
{-# LANGUAGE OverloadedStrings #-} module WaTor.Utils ( both , floatPair , entityKey , isFish , isShark , isEmpty ) where import Control.Applicative import Data.Bifunctor import qualified Data.Text as T import WaTor.Types both :: (a -> b) -> (a,...
erochest/wa-tor
src/WaTor/Utils.hs
apache-2.0
725
0
7
213
231
132
99
27
1
module Lycopene.Option.Done (doneIssue) where import Options.Applicative import Lycopene.Option.Command import Lycopene.Option.Internal doneIssue :: ParserInfo Command doneIssue = let doneP = Done <$> argid in info doneP (progDesc "Close an issue and set it has been done")
utky/lycopene
backup/Option/Done.hs
apache-2.0
314
0
9
75
68
38
30
8
1
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS -fno-warn-name-shadowing #-} module HTML.Base where import Control.Monad import Text.Blaze.Html5 as H import Text.Blaze.Html5.Attributes as A htmlHeader :: Maybe String -- ^ HTML <title> value -> [FilePath] -- ^ CSS files -> [FilePath] -- ^ JS scri...
mcmaniac/bindrop
src/HTML/Base.hs
apache-2.0
1,026
0
15
251
297
154
143
28
1
{-| Generic data loader. This module holds the common code for parsing the input data after it has been loaded from external sources. -} {- Copyright (C) 2009, 2010, 2011, 2012 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided t...
ganeti-github-testing/ganeti-test-1
src/Ganeti/HTools/Loader.hs
bsd-2-clause
15,102
0
20
4,128
3,252
1,731
1,521
245
2
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, OverloadedStrings #-} module QC where import Data.Aeson as A import qualified Data.Vector as V import Control.Applicative import Data.HashMap.Strict (HashMap) import qualified Data.HashMap.Strict as HashMap import qualified Data.Text as Text import Data.Text...
andygill/scotty-crud
tests/QC.hs
bsd-2-clause
2,291
0
15
660
785
428
357
58
3
{-# LANGUAGE GADTs #-} module Language.Drasil.Space (Space(..), DomainDesc(..), RealInterval(..), RTopology(..), Inclusive(..), getActorName) where import Language.Drasil.Symbol (Symbol) -- FIXME: These need to be spaces and not just types. -- | Spaces data Space = Integer | Rational | Real | Natural ...
JacquesCarette/literate-scientific-software
code/drasil-lang/Language/Drasil/Space.hs
bsd-2-clause
1,409
0
10
293
332
203
129
34
1
{-# LANGUAGE CPP #-} {-# LANGUAGE OverlappingInstances, FlexibleContexts #-} {-# LANGUAGE NamedFieldPuns, RecordWildCards, PatternGuards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} module Narradar.Interface.Cli (narradarMai...
pepeiborra/narradar
src/Narradar/Interface/Cli.hs
bsd-3-clause
9,388
0
22
2,869
2,752
1,402
1,350
164
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Lib where import qualified Data.Text as T import qualified Data.Text.Format as TF import qualified Data.Text.Lazy as TL import qualified Database.RethinkDB as R disruptionUrl :: T.Text disruptionUrl = "https://citymapper.com/api/1/routestatus...
passy/disruption-tracker
src/Lib.hs
bsd-3-clause
753
0
12
140
227
133
94
18
2
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, QuasiQuotes, TemplateHaskell, TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Yesod.Admin.Crud.Handlers where import Control.Monad (unless) import Data.Monoid (mempty) import Data.Text (Text) import qualified Data.Text as Text import Language.Haskel...
yairchu/yesod-admin-crud
Yesod/Admin/Crud/Handlers.hs
bsd-3-clause
4,363
0
14
840
1,208
621
587
97
2
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE FlexibleContexts #-} module Trav where import Data.Monoid import Test.QuickCheck import Test.QuickCheck.Checkers import Test.QuickCheck.Classes newtype Identity a = Identity a deriving (Eq, Ord, Show, Functor) instance Arbitrar...
nicklawls/haskellbook
src/Trav.hs
bsd-3-clause
4,751
0
13
1,128
2,070
1,068
1,002
125
1
-- | This module contains orphan 'XMLGenT' instances for 'ServerMonad', 'FilterMonad', 'WebMonad', 'HasRqData', and 'Happstack'. It does not export any functions. {-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, TypeFamilies, UndecidableInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Happstack.Server.X...
Happstack/happstack-hsp
src/Happstack/Server/XMLGenT.hs
bsd-3-clause
2,279
6
10
495
757
405
352
37
0
{-# language CPP #-} -- No documentation found for Chapter "PipelineStageFlags2" module Vulkan.Core13.Enums.PipelineStageFlags2 ( pattern PIPELINE_STAGE_2_NONE_KHR , pattern PIPELINE_STAGE_2_TOP_OF_PIPE_BIT_KHR , pattern PI...
expipiplus1/vulkan
src/Vulkan/Core13/Enums/PipelineStageFlags2.hs
bsd-3-clause
28,884
1
10
7,158
1,653
1,043
610
-1
-1
module Stylesheet ( style ) where import Stitch import Stitch.Combinators import Data.Text (Text) type Color = Text midnight :: Color midnight = "rgba(44, 62, 80, 1)" cloud :: Color cloud = "rgba(236, 240, 241, 1)" amethyst :: Color amethyst = "rgba(155, 89, 182, 1)" nephritis :: Color nephritis = "rgba(39, 174...
intolerable/crusher
src/Stylesheet.hs
bsd-3-clause
2,669
0
16
695
512
238
274
80
1
----------------------------------------------------------------------------- -- | -- Module : Distribution.Client.List -- Copyright : (c) David Himmelstrup 2005 -- Duncan Coutts 2008-2011 -- License : BSD-like -- -- Maintainer : cabal-devel@haskell.org -- -- Search for and print info...
yihuang/cabal-install
Distribution/Client/List.hs
bsd-3-clause
21,877
0
20
6,686
5,158
2,715
2,443
405
8
take :: Int -> ([a] -> [a])
NeonGraal/rwh-stack
ch02/Take.hs
bsd-3-clause
27
0
8
6
23
13
10
1
0
-- | This module provides 'RequesterT', the standard implementation of -- 'Requester'. {-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE CPP #-} {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-...
ryantrinkle/reflex
src/Reflex/Requester/Base.hs
bsd-3-clause
28,425
0
25
7,089
8,239
4,237
4,002
-1
-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. {-# LANGUAGE OverloadedStrings #-} module Duckling.Engine.Tests ( tests ) where import Data.String import P...
facebookincubator/duckling
tests/Duckling/Engine/Tests.hs
bsd-3-clause
1,279
0
13
274
275
151
124
34
2
-------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.ARB.TextureBarrier -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portable -- ---------------...
haskell-opengl/OpenGLRaw
src/Graphics/GL/ARB/TextureBarrier.hs
bsd-3-clause
617
0
4
86
44
34
10
6
0
{-# LANGUAGE NoImplicitPrelude, Trustworthy #-} {-# LANGUAGE PolyKinds #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Proxy -- License : BSD-style (see the LICENSE file in the distribution) -- -- Maintainer : libraries@haskell.org -- Stability : ...
jstolarek/ghc
libraries/base/Data/Proxy.hs
bsd-3-clause
2,747
0
12
722
587
323
264
61
1
{-# LANGUAGE BangPatterns, CPP, DefaultSignatures, FlexibleContexts, FlexibleInstances, KindSignatures, MultiParamTypeClasses, OverlappingInstances, OverloadedStrings, Rank2Types, ScopedTypeVariables, TypeOperators, UndecidableInstances #-} module Data.Csv.Convers...
ahodgen/cassava
Data/Csv/Conversion.hs
bsd-3-clause
33,622
0
16
8,917
8,464
4,536
3,928
595
5
{------------------------------------------------------------------------------- Computes BOW similarity scores over a list of word pairs (c) 2013 Jan Snajder <jan.snajder@fer.hr> -------------------------------------------------------------------------------} import qualified DSem.VectorSpace.Bow as Bow import q...
jsnajder/dsem
src/bow-pairs-sim2.hs
bsd-3-clause
1,688
0
15
326
572
299
273
39
2
{-# LANGUAGE FlexibleInstances #-} {-# OPTIONS -fno-warn-orphans #-} -- | -- Module : Text.RegExp -- Copyright : Thomas Wilke, Frank Huch, and Sebastian Fischer -- License : BSD3 -- Maintainer : Sebastian Fischer <mailto:sebf@informatik.uni-kiel.de> -- Stability : experimental -- -- This library provide...
sebfisch/haskell-regexp
src/Text/RegExp.hs
bsd-3-clause
4,001
0
12
748
405
276
129
25
2
-- | PDF objects. module Graphics.PDF.Types ( -- * Object types ObjectID(..) , Number(..) , Array , Dict , Object(..) -- * Constructors , array , dict ) where import qualified Data.ByteString as B import Data.Fixed import Data.HashMap.Strict (HashMap)...
knrafto/pdfkit
Graphics/PDF/Types.hs
bsd-3-clause
1,302
0
9
351
314
186
128
63
1
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.Raw.ARB.VertexProgram -- Copyright : (c) Sven Panne 2015 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portable -...
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/ARB/VertexProgram.hs
bsd-3-clause
4,493
0
4
505
466
318
148
144
0
{-# LANGUAGE TemplateHaskell #-} module ChanLib where import Data.Char (toLower) import System.IO import Data.Maybe import Network.HTTP import Network.URI import Data.Aeson import Data.Aeson.TH import qualified Data.ByteString.Lazy.Char8 as BS data Board = Board [Page] deriving Show data Page = Page { threads :: [T...
spocot/haskell-chan
src/ChanLib.hs
bsd-3-clause
3,965
0
21
1,640
816
442
374
65
4
{-# LANGUAGE RecursiveDo, ScopedTypeVariables #-} import Test.Tasty import Test.Tasty.QuickCheck as QC import Test.Tasty.HUnit as HU import Data.Char import Control.Applicative import Text.Earley import Text.Earley.Mixfix main :: IO () main = defaultMain tests -- -putStrLn . prettyExpr 0 $ Add (Add (Var "a") (Va...
Axure/Earley
tests/Tests.hs
bsd-3-clause
9,453
0
19
2,756
3,530
1,840
1,690
195
2
module Baum.Leftist.Ops where import Baum.Leftist.Type import qualified Baum.Heap.Class as C import Baum.Heap.Op (Position) instance C.Heap LeftistTree where -- empty :: baum a empty = Leaf -- isEmpty :: baum a -> Bool isEmpty t = case t of Leaf -> True _ -> False -- ins...
Erdwolf/autotool-bonn
src/Baum/Leftist/Ops.hs
gpl-2.0
2,979
42
15
964
1,170
608
562
69
3
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- ...
fmapfmapfmap/amazonka
amazonka-opsworks/gen/Network/AWS/OpsWorks/UnassignVolume.hs
mpl-2.0
3,629
0
12
738
405
247
158
57
1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 Pattern-matching bindings (HsBinds and MonoBinds) Handles @HsBinds@; those at the top level require different handling, in that the @Rec@/@NonRec@/etc structure is thrown away (whereas at lower levels it is preserved with...
AlexanderPankiv/ghc
compiler/deSugar/DsBinds.hs
bsd-3-clause
49,879
0
22
15,585
8,310
4,271
4,039
-1
-1
module Optimization.TrustRegion.Newton ( -- * Newton's method newton -- * Matrix inversion methods , bicInv , bicInv' ) where import Control.Applicative import Data.Distributive (Distributive) import Data.Functor.Bind (Apply) import Data.Foldable (Foldable) import Linear -- | Newton's meth...
ocramz/optimization
src/Optimization/TrustRegion/Newton.hs
bsd-3-clause
1,456
0
12
397
438
232
206
26
1
-- #hide module Graphics.HGL.Win32.WND ( WND, mkWND, openWND, closeWND, redrawWND , handleEvents, closeAllHWNDs , beginGraphics, endGraphics , wndRect , getHWND , drawWND ) where import Graphics.HGL.Units (Point) import Graphics.HGL.Internals.Event( Event(..) ) import Graphics.HGL.Internals.Draw (Draw, unDraw) ...
FranklinChen/hugs98-plus-Sep2006
packages/HGL/Graphics/HGL/Win32/WND.hs
bsd-3-clause
10,283
147
15
2,396
2,969
1,530
1,439
266
3
-- | -- Module : Codec.Binary.Base16 -- Copyright : (c) 2007 Magnus Therning -- License : BSD3 -- -- Implemented as specified in RFC 4648 (<http://tools.ietf.org/html/rfc4648>). -- -- Further documentation and information can be found at -- <http://www.haskell.org/haskellwiki/Library/Data_encoding>. module Codec.B...
magthe/dataenc
src/Codec/Binary/Base16.hs
bsd-3-clause
2,657
0
15
792
854
485
369
63
5
module Language.Lua.Token where -- | Lua tokens data Token = TokPlus -- ^+ | TokMinus -- ^\- | TokStar -- ^\* | TokSlash -- ^/ | TokPercent -- ^% | TokExp -- ^^ | TokSh -- ^# | TokEqual -- ^== ...
yav/language-lua
src/Language/Lua/Token.hs
bsd-3-clause
4,723
0
6
2,274
791
462
329
132
0
module SAT.Beispiel where -- -- $Id$ import SAT.Types import Autolib.FiniteMap l1 = Pos (read "x") :: Literal v1 = read "x" :: Variable k1 = Or [Pos $ read "x", Neg $ read "y", Pos $ read "z"] :: Klausel k2 = Or [Neg $ read "x", Pos $ read "y", Pos $ read "z"] :: Klausel formel = And [ k1, k2 ] :: Formel b1...
Erdwolf/autotool-bonn
src/SAT/Beispiel.hs
gpl-2.0
497
2
8
119
232
128
104
13
1
-- | You don't normally need to use this Lex module directly - it is -- called automatically by the parser. (This interface is only exposed -- for debugging purposes.) -- -- This is a hand-written lexer for tokenising the text of an XML -- document so that it is ready for parsing. It attaches position -- informat...
ryanfan/courseography
dependencies/HaXml-1.25.3/src/Text/XML/HaXml/Lex.hs
gpl-3.0
15,483
64
15
4,840
5,235
2,670
2,565
256
4
{-# LANGUAGE PatternSynonyms, TypeOperators, TypeFamilies, MultiParamTypeClasses, GADTs #-} module ClassOperator where -- | Class with fixity, including associated types class a ><> b where type a <>< b :: * data a ><< b (>><), (<<>) :: a -> b -> () -- | Multiple fixities (**>), (**<), (>**), (<**) :: a ->...
ezyang/ghc
testsuite/tests/typecheck/should_fail/ClassOperator.hs
bsd-3-clause
432
0
9
94
124
82
42
14
0
{-# LANGUAGE DeriveDataTypeable #-} module T4003A where import T4003B import Data.Data data MyId = MyId deriving (Data, Typeable) data HsExpr id = HsOverLit (HsOverLit id) | HsBracketOut (HsExpr MyId) deriving (Data, Typeable)
siddhanathan/ghc
testsuite/tests/rename/should_compile/T4003A.hs
bsd-3-clause
242
0
8
47
69
40
29
10
0
module Main (main) where -- See Trac #149 -- Currently (with GHC 7.0) the CSE works, just, -- but it's delicate. import System.CPUTime main :: IO () main = print $ playerMostOccur2 [1..m] m :: Int m = 22 playerMostOccur2 :: [Int] -> Int playerMostOccur2 [a] = a playerMostOccur2 (x:xs) | numOccur x (x:xs) > numO...
ghc-android/ghc
testsuite/tests/perf/should_run/T149_B.hs
bsd-3-clause
451
0
11
97
167
89
78
14
1
{- This program crashed GHC 2.03 From: Marc van Dongen <dongen@cs.ucc.ie> Date: Sat, 31 May 1997 14:35:40 +0100 (BST) zonkIdOcc: g_aoQ panic! (the `impossible' happened): lookupBindC:no info! for: g_aoQ (probably: data dependencies broken by an optimisation pass) static binds for: Tmp.$d1...
urbanslug/ghc
testsuite/tests/typecheck/should_fail/tcfail072.hs
bsd-3-clause
471
0
8
125
72
40
32
5
1
module SpecHelper where import Control.Monad ((>=>)) import System.Directory (doesFileExist, doesDirectoryExist) import System.IO.Temp (withSystemTempDirectory) import Dotfiles import Dotfiles.Config import Dotfiles.Commands exists :: FilePath -> IO Bool e...
ilya-yurtaev/hdotfiles
tests/SpecHelper.hs
mit
631
0
9
146
188
99
89
16
1
module GridC.Util where eitherMap :: (a -> c) -> (b -> d) -> Either a b -> Either c d eitherMap a b c = case c of Left d -> Left (a d) Right e -> Right (b e) binOps :: [[(String, String)]] binOps = [ [("*", "mul"), ("/", "div"), ("%", "mod")], [("+", "add"), ("-", "sub")], [(">", "...
lessandro/gridc
src/GridC/Util.hs
mit
472
0
10
146
250
149
101
15
2
module Hircules.Config (configDir, logDir) where import System.Environment (getEnv) import System.FilePath ((</>)) import System.IO.Unsafe (unsafePerformIO) homeDir :: FilePath homeDir = unsafePerformIO $ getEnv "HOME" configDir :: FilePath configDir = homeDir </> configDirName configDirName :: FilePath configDirNa...
juhp/hircules
src/Hircules/Config.hs
mit
435
0
6
57
112
67
45
14
1
module TClasses where -- : set expandtab ts=2 ruler number spell -- daw -- : syntax enable --------------------------- -- Type Class Instances -- Instances -- Deriving -- Defining type classes -- Subclasses ---------------------------- -- Type Class Instances -- Instances where we can add on instances to exten...
HaskellForCats/HaskellForCats
MenaBeginning/Ch008/2014-0205CustTypeClass.hs
mit
4,016
9
13
982
574
321
253
-1
-1
module Gshell.Names ( gshellDirName , gshellDir , commitsDirName , commitsDir , commitFileName , commitFile , revDirName , revDir , mountDirName ...
ctlab/gShell
src/Gshell/Names.hs
mit
3,057
4
17
1,013
726
384
342
74
2
module LLVM.Codegen.Constant ( ci1, ci8, ci16, ci32, ci64, cf32, cf64, cfloat, cdouble, cnull, cundef, cstruct, cstructpack, carray, cvector, cstring, cstringz, Constant(..) ) where import Data.Char import LLVM.General.AST import qualified LLVM.General.AST.Float as F import qualified LLVM.G...
sdiehl/llvm-codegen
src/LLVM/Codegen/Constant.hs
mit
1,856
0
10
362
646
361
285
58
1
{-# LANGUAGE OverloadedStrings #-} import Web.Uploadcare main :: IO () main = do client <- newDemoClient efile <- getFile client "1d4d470b-8048-4c00-8ae6-9be332e7d2b1" putStrLn $ case efile of Right file -> originalFileUrl file Left err -> err
uploadcare/uploadcare-haskell
example/file.hs
mit
276
0
11
67
73
34
39
9
2
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE RankNTypes #-} module Numeric.Sampling.Util where import Control.Lens import Control.Monad import Control.Monad.Random import Data.Traversable import Linear.Affine import Linear.Vector import Numeric.Sampling.Types unP :: Point f x -> f x unP (P x) = x {-# INLINE unP #-...
tel/mcmc
src/Numeric/Sampling/Util.hs
mit
1,396
0
12
296
597
311
286
34
1
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE IncoherentInstances #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} module Z80.Operations ( -- * Load Group Load , ld , Stack , push , pop -- * E...
dpwright/z80
src/Z80/Operations.hs
mit
25,122
0
14
6,775
12,110
6,240
5,870
-1
-1
{-# LANGUAGE CPP, OverloadedStrings #-} module BasicTests (basicSpecs) where import Yesod.Test import Foundation redirectCode :: Int #if MIN_VERSION_yesod_test(1,4,0) redirectCode = 303 #else redirectCode = 302 #endif basicSpecs :: YesodSpec MyApp basicSpecs = ydescribe "Basic tests" $ do yit "checks the...
meteficha/yesod-auth-account-fork
tests/BasicTests.hs
mit
2,728
0
14
990
472
183
289
68
1
{-# LANGUAGE OverloadedStrings #-} import Data.Maybe import Network.URL import Pipes.Core ((+>>)) import Network.Discord.Types import Network.Discord.Gateway import Network.Discord.Rest data LogClient = LClient instance Client LogClient where getAuth _ = Bot "TOKEN" main :: IO () main = runWebsocket (fromJust $ ...
jano017/Discord.hs
examples/hello_world.hs
mit
517
0
10
68
134
71
63
14
1
module MolSeq ( MolSeq, SeqType(DNA,Protein), string2seq, seqType, seqName, seqDistance, seqSequence, seqLength ) where import Hamming import Data.Function data SeqType = DNA | Protein deriving (Show, Eq) data MolSeq = MolSeq String String SeqType deriving (Show, Eq) dnaBlocks :: String dnaBlocks = "ACGT" ...
considerate/progp
Haskell/bio/molseq.hs
mit
1,734
17
11
405
601
312
289
43
1
module Main where import Graphics.Cogh import FRP.Gearh quitOutput :: Bool -> Output quitOutput True = quit quitOutput False = mempty renderOutput :: Window -> Element -> Output renderOutput window = output . renderRoot window createImageResource :: Window -> String -> IO (Resource Texture) createImageReso...
ivokosir/gearh
test/renderResources.hs
mit
2,180
0
15
522
857
443
414
68
1
module Main where import Data.BBS import System.Console.Haskeline import System.Environment import Text.Printf usage :: IO () usage = printf "usage: post [OPTION] [TEXT]" parse :: [String] -> IO () parse ["--help"] = usage parse ["-h"] = usage -- parse ("-i":id:"-p":text) = printf "Sending '%v' to %v.\n" (head ...
mebio-us/BBS
utilities/post.hs
mit
401
0
7
80
110
61
49
13
1
{- see Chapter 32 of the Haskell 2010 Language Report -} module Foreign.Marshal.Array where
evilcandybag/JSHC
hslib/Foreign/Marshal/Array.hs
mit
95
0
3
16
8
6
2
1
0
import Network import Control.Concurrent(forkIO) import System.IO import Control.Monad import System.Environment {- Реализуйте простой эхо-сервер. Это программа, которая слушает определенный порт, принимает соединения, и всё, что присылает клиент, отправляет ему обратно. (2 балла) -} main :: IO () main = do args ...
SergeyKrivohatskiy/fp_haskell
hw09/echo_server.hs
mit
812
0
20
162
161
81
80
15
2
{-# LANGUAGE OverloadedStrings #-} module Main where import Test.Hspec import Text.Blaze.Html.Renderer.Text (renderHtml) import Yesod.Markdown import qualified Data.Text as T import qualified Data.Text.Lazy as TL main :: IO () main = hspec spec spec :: Spec spec = describe "Yesod.Markdown" $ do it "converts Mar...
robgssp/yesod-markdown
test/Spec.hs
gpl-2.0
1,719
0
16
780
304
170
134
53
1
{-| Utilities common to hledger journal readers. -} module Hledger.Read.Utils where import Control.Monad.Error import Data.List import System.Directory (getHomeDirectory) import System.FilePath(takeDirectory,combine) import System.Time (getClockTime) import Text.ParserCombinators.Parsec import Hledger.Data.Types (Jo...
trygvis/hledger
hledger-lib/Hledger/Read/Utils.hs
gpl-3.0
3,179
0
15
723
848
440
408
52
3
module StoreTest ( storeTests ) where import Data.ByteString as BS import System.IO.Temp import qualified Test.Framework as TF import Test.Framework.Providers.HUnit import Test.HUnit import Freenet.Store import Freenet.Types storeTests :: TF.Test storeTests = TF.tes...
waldheinz/ads
src/tests/StoreTest.hs
gpl-3.0
778
0
12
179
184
103
81
21
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/Configs/Get.hs
mpl-2.0
6,142
0
20
1,511
943
548
395
137
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-youtube/gen/Network/Google/Resource/YouTube/VideoCategories/List.hs
mpl-2.0
4,424
0
15
1,066
556
330
226
83
1