code
stringlengths
5
1.03M
repo_name
stringlengths
5
90
path
stringlengths
4
158
license
stringclasses
15 values
size
int64
5
1.03M
n_ast_errors
int64
0
53.9k
ast_max_depth
int64
2
4.17k
n_whitespaces
int64
0
365k
n_ast_nodes
int64
3
317k
n_ast_terminals
int64
1
171k
n_ast_nonterminals
int64
1
146k
loc
int64
-1
37.3k
cycloplexity
int64
-1
1.31k
{-# LANGUAGE TupleSections #-} module AERN2.PPoly.Type where import MixedTypesNumPrelude import Data.List import Data.Maybe import Control.CollectErrors -- import AERN2.Normalize import AERN2.MP.Ball (IsBall(..), MPBall, mpBall) import AERN2.MP.Precision import AERN2.MP.Accuracy import AERN2.MP.Dyadic import AERN2...
michalkonecny/aern2
aern2-fun-univariate/src/AERN2/PPoly/Type.hs
bsd-3-clause
11,645
0
16
2,847
4,191
2,229
1,962
-1
-1
module Autotool.XmlRpc.Interface.CommandLine ( main , pickTaskName , showTaskTemplateInfo , enterTaskConfig ) where import Autotool.XmlRpc.Types.TaskTree (TaskTree (Task, Category)) import Autotool.XmlRpc.Types.ScoringOrder (ScoringOrder) import Autotool.XmlRpc ( g...
j-hannes/autotool-xmlrpc-client
src/Autotool/XmlRpc/Interface/CommandLine.hs
bsd-3-clause
4,940
0
12
1,023
1,012
469
543
113
3
{-# LANGUAGE TemplateHaskell , FlexibleContexts , RankNTypes , DeriveDataTypeable #-} module Merchandise.Types.Location ( World , Location(..) , LocationType(..) -- lenses over Location , locID , name , locType ,...
trobertson/merch
src/Merchandise/Types/Location.hs
bsd-3-clause
4,383
0
11
1,503
985
555
430
-1
-1
-- | Exports a set of FFI-imported PQputf functions with different arities -- (PQputf is a variadic function and there is no way to import such -- functions with FFI in their most generic form). module Database.PostgreSQL.PQTypes.Internal.C.Put where import Foreign.C import Foreign.Ptr import Database.PostgreSQL.PQTy...
scrive/hpqtypes
src/Database/PostgreSQL/PQTypes/Internal/C/Put.hs
bsd-3-clause
23,122
0
59
8,221
10,709
4,701
6,008
-1
-1
module Help ( returnHelp ) where import qualified Data.ByteString.Lazy as B import Lib (Error, stringToBytes) -- Public functions returnHelp :: [B.ByteString] -> Either Error B.ByteString returnHelp [] = Right $ stringToBytes $ unlines [ "Usage: cryptopals [-n] challenge [challe...
mjec/cryptopals-haskell
src/Help.hs
bsd-3-clause
6,102
0
10
1,784
976
542
434
114
2
module Main where import Trombone.Server.Init main :: IO () main = runServer
johanneshilden/trombone
Main.hs
bsd-3-clause
79
0
6
14
25
15
10
4
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE LambdaCase #-} module Y2018.Day21 (answer1, answer2) where import GHC.Word import Data.Void import Data.Bits import Data.Functor import Data.List import qualified Data.Vector as V import Data....
geekingfrog/advent-of-code
src/Y2018/Day21.hs
bsd-3-clause
5,219
0
25
1,422
2,186
1,128
1,058
-1
-1
{-# LANGUAGE TemplateHaskell #-} module Game.MonsterInfoT where import Control.Lens (makeLenses) import Linear.V3 (V3(..)) import Types makeLenses ''MonsterInfoT newMonsterInfoT :: MonsterInfoT newMonsterInfoT = MonsterInfoT { _miCurrentMove = Nothing , _miAIFlags ...
ksaveljev/hake-2
src/Game/MonsterInfoT.hs
bsd-3-clause
1,101
0
7
457
224
142
82
34
1
{-# LANGUAGE ViewPatterns, PatternGuards, TupleSections #-} module Input.Cabal(parseCabal) where import Data.List.Extra import System.FilePath import Control.Applicative import Control.DeepSeq import Control.Exception import Data.Maybe import Data.Tuple.Extra import qualified Data.Map as Map import qualified Data.Byt...
ndmitchell/hogle-dead
src/Input/Cabal.hs
bsd-3-clause
1,739
0
16
355
678
365
313
29
1
module Text.HTML.Boilerpipe (boilerpipe, boilerpipeFromJarPath) where import System.Process import System.Exit import System.FilePath import System.IO import System.IO.Temp import System.UUID.V4 import Paths_Boilerpipe import qualified System.IO.Strict as Strict boilerpipeFromJarPath :: FilePath -> String -> IO (Mayb...
ThoughtLeadr/Haskell-Boilerpipe-Wrapper
Text/HTML/Boilerpipe.hs
bsd-3-clause
1,161
0
20
286
322
163
159
29
2
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-#...
tonyday567/mvc-todo
src/Todo/Model.hs
bsd-3-clause
3,558
0
14
799
1,041
567
474
108
3
{-# LANGUAGE PackageImports #-} {-# LANGUAGE PatternGuards #-} -- | Arrow in gloss module Graphics.Gloss.AdvancedShapes.Arrows where import "gloss-gtk" Graphics.Gloss import Config.Preferences (arrowDegrees, arrowLength, arrowColor, arrowThickness) -- | Plain arrow with no head arrow :: Path -> Picture arrow p | ...
ivanperez-keera/SoOSiM-ui
src/Graphics/Gloss/AdvancedShapes/Arrows.hs
bsd-3-clause
1,032
0
10
253
332
189
143
19
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE UnicodeSyntax #-} {-# LANGUAGE PackageImports #-} module Text.Numeral.Grammar ( -- * Grammatical categories -- ** Case NoCase (noCase, hasNoCase) , Ablative (ablative, isAblative) , Abessi...
telser/numerals
src/Text/Numeral/Grammar.hs
bsd-3-clause
12,334
0
7
2,773
1,573
957
616
241
0
-- 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. module Duckling.Ordinal.ZH.Tests ( tests ) where import Prelude import Data.String import Test.Tasty import D...
facebookincubator/duckling
tests/Duckling/Ordinal/ZH/Tests.hs
bsd-3-clause
504
0
9
78
79
50
29
11
1
import Control.Monad.Distribution import Control.Monad.MonoidValue import Data.List import qualified Data.Map as M import Data.Maybe import Data.Probability -- Spam Filtering -- -- Inspired by <http://www.paulgraham.com/spam.html> and -- <http://www.mathpages.com/home/kmath267.htm>. -- Each message is spam (junk mail...
emk/haskell-probability-monads
examples/spam.hs
bsd-3-clause
4,464
0
12
946
1,239
645
594
103
1
module Foo where fooFn = id
soenkehahn/ghc-imported-from
test/data/reexport-example/reexport/Foo.hs
bsd-3-clause
29
0
4
7
9
6
3
2
1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE OverloadedStrings #-} -- | Constants used throughout the project. module Stack.Constants (buildPlanDir ,distDirFromDir ,workDirFromDir ,distRelativeDir ,haskellModuleExts ,imageStagingDir ,projectDockerSandboxDir ,rawGithubUrl ,stackDot...
narrative/stack
src/Stack/Constants.hs
bsd-3-clause
11,004
0
13
2,621
2,118
1,160
958
250
2
{-# LANGUAGE TemplateHaskellQuotes #-} -- | This module contains types and functions for creating an 'ImplicitIdDef', -- which allows you to customize the implied ID column that @persistent@ -- generates. -- -- If this module doesn't suit your needs, you may want to import -- "Database.Persist.ImplicitIdDef.Internal" ...
yesodweb/persistent
persistent/Database/Persist/ImplicitIdDef.hs
mit
1,771
0
12
438
196
130
66
-1
-1
{-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE TemplateHaskell #-} module Language.LSP.Types.Implementation where import Data.Aeson.TH import Language.LSP.Types.Progress import Language.LSP.Types.StaticRegistrationOptions import Language.LSP.Types.TextDocument import Language.LSP.Types.Utils data Implementation...
alanz/haskell-lsp
lsp-types/src/Language/LSP/Types/Implementation.hs
mit
1,415
0
9
185
204
114
90
27
0
{-# LANGUAGE TypeSynonymInstances, OverloadedStrings #-} {-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Yesod.Core.Json ( -- * Convert from a JSON value defaultLayoutJson , jsonToRepJson , returnJson , returnJsonEncoding , provideJson -- * Convert to a JSON value ...
geraldus/yesod
yesod-core/src/Yesod/Core/Json.hs
mit
8,262
0
13
1,718
1,478
841
637
125
2
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} -- | -- Module : Yi.Frontend.Vty -- License : GPL-2 -- Maintainer : yi-devel@googlegroups.com -- Stability : experimen...
Fuuzetsu/yi
yi-frontend-vty/src/Yi/Frontend/Vty.hs
gpl-2.0
18,124
0
25
6,563
4,835
2,609
2,226
319
10
{-# OPTIONS_HADDOCK hide #-} {-# LANGUAGE CPP #-} #include "fusion-phases.h" -- | PR instance for the void type. module Data.Array.Parallel.PArray.PData.Void (Void, void, pvoid, fromVoid, pvoids) where import Data.Array.Parallel.PArray.PData.Base import Data.Array.Parallel.PArray.PRepr.Base () import Data...
mainland/dph
dph-lifted-vseg/Data/Array/Parallel/PArray/PData/Void.hs
bsd-3-clause
4,554
0
8
1,062
665
378
287
-1
-1
{-# LANGUAGE CPP #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} -- | Toy "parser"/"serializer" (with a bug) in And parsing. module Main where import Prelude hiding (showList, mod) #if defined(qc) || defined(qcGen) || defined(smart) import Test import System.E...
leepike/SmartCheck
regression/Parser/Parser.hs
bsd-3-clause
14,469
0
15
5,294
4,900
2,427
2,473
270
11
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE PolyKinds #-} -- | -- Copyright : Anders Claesson 2015-2017 -- Maintainer : Anders Claesson <anders.claesson@gmail.com> -- License : BSD-3 -- module Main (main) where import GHC.TypeLits import Data...
akc/gfscript
hops.hs
bsd-3-clause
4,650
0
17
1,283
1,694
873
821
117
5
module Fail where import System.Console.CmdTheLine import Control.Applicative import Text.PrettyPrint ( fsep -- Paragraph fill a list of 'Doc'. , text -- Make a 'String' into a 'Doc'. , quotes -- Quote a 'Doc'. , (<+>) -- Glue two 'Doc' toget...
glutamate/cmdtheline
test/Fail.hs
mit
2,350
0
12
837
562
314
248
53
1
{-# OPTIONS_GHC -fno-warn-orphans #-} module Api.Types.Config where import Data.ByteString (ByteString) import Data.Text (Text) import Data.Time.Clock (NominalDiffTime) import Data.Word (Word16, Word32) class Configurable a where defaultConfig :: a data ApiEnvironment = Development | Test | Production der...
cawinkelmann/api-server
lib/Api/Types/Config.hs
mit
1,855
0
8
498
409
248
161
58
0
{-# language ViewPatterns, NamedFieldPuns, ScopedTypeVariables, MultiParamTypeClasses, DeriveDataTypeable #-} module Sorts.Robots.PathRobots.PatrolRobot where import Data.Typeable import Data.Abelian import Data.Data import Data.Accessor import System.FilePath import Physics.Chipmunk as CM hiding (Position, r...
changlinli/nikki
src/Sorts/Robots/PathRobots/PatrolRobot.hs
lgpl-3.0
6,499
0
17
1,615
1,846
938
908
-1
-1
{-# LANGUAGE CPP, GADTs #-} ----------------------------------------------------------------------------- -- -- Generating machine code (instruction selection) -- -- (c) The University of Glasgow 1996-2004 -- ----------------------------------------------------------------------------- -- This is a big module, but, i...
ml9951/ghc
compiler/nativeGen/PPC/CodeGen.hs
bsd-3-clause
73,864
0
28
26,190
18,454
9,110
9,344
-1
-1
{-# LANGUAGE LambdaCase, PatternGuards, ViewPatterns #-} {-# OPTIONS_GHC -fwarn-incomplete-patterns #-} module Idris.Elab.Term where import Idris.AbsSyntax import Idris.AbsSyntaxTree import Idris.DSL import Idris.Delaborate import Idris.Error import Idris.ProofSearch import Idris.Output (pshow) import Idris.Core.Case...
phaazon/Idris-dev
src/Idris/Elab/Term.hs
bsd-3-clause
116,671
1,106
16
51,505
14,330
10,751
3,579
2,065
221
{-# OPTIONS_HADDOCK hide #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GL.ControlPoint -- Copyright : (c) Sven Panne 2002-2013 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable...
hesiod/OpenGL
src/Graphics/Rendering/OpenGL/GL/ControlPoint.hs
bsd-3-clause
5,614
0
11
1,189
1,050
563
487
130
18
{-# LANGUAGE GADTs, Rank2Types, CPP #-} ----------------------------------------------------------------------------------------- -- | -- Module : FRP.Yampa.Scan -- Copyright : (c) Antony Courtney and Henrik Nilsson, Yale University, 2003 -- License : BSD-style (see the LICENSE file in the distribution) -...
ony/Yampa-core
src/FRP/Yampa/Scan.hs
bsd-3-clause
1,628
0
11
360
267
153
114
13
2
{- | Module : ./Static/AnalysisStructured.hs Description : A test module for trying API communication via sockets. The code is based on the TCP syslog server example in Real World Haskell. Copyright : (c) Till Mossakowski and Uni Bremen 2003-2006 License : GPLv2 or higher, s...
keithodulaigh/Hets
PGIP/tests/Server.hs
gpl-2.0
3,680
1
15
1,148
659
315
344
54
2
-- Collecting constraints efficiently... module TiConstraints(Constraints,empty,single,Tree.merge,Tree.toList) where import qualified Tree type Constraints c = Tree.Tree c empty = Tree.Empty single = Tree.Single
forste/haReFork
tools/base/TI/TiConstraints.hs
bsd-3-clause
214
0
6
24
56
35
21
5
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="en-GB"> <title>Directory List v1.0</title> <maps> <homeID>directorylistv1</homeI...
thc202/zap-extensions
addOns/directorylistv1/src/main/javahelp/help/helpset.hs
apache-2.0
989
102
29
170
414
219
195
-1
-1
{-| Main binary for all stand-alone data collectors -} {- Copyright (C) 2012 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyri...
apyrgio/ganeti
src/mon-collector.hs
bsd-2-clause
1,630
0
6
243
64
39
25
6
1
module MultiOccur1 where idid two = two $ two main x = idid id x
kmate/HaRe
old/testing/generaliseDef/MultiOccur1_AstOut.hs
bsd-3-clause
68
0
5
18
29
15
14
3
1
{-# LANGUAGE UnicodeSyntax #-} {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInst...
olsner/ghc
testsuite/tests/determinism/determ015/A.hs
bsd-3-clause
1,483
0
13
337
480
266
214
-1
-1
module Main where import Graphics.CG.Draw.TriangulationDelauney import Graphics.CG.Handle.Delaunay import Graphics.CG.State.DelaunayState import Graphics.CG.State.DelaunayState import Graphics.Gloss initialState :: State initialState = State { _points = [] } d...
jagajaga/CG-Haskell
Testing/Main.hs
mit
684
0
8
162
168
99
69
20
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE...
nickspinale/bigword
src/Data/Word/N/Core.hs
mit
4,493
4
12
1,224
1,069
612
457
68
1
module GetLine(main)where import Data.Char import Data.List main = do putStrLn "Say hi be here:" line <- fmap (intersperse '-' . reverse . map toUpper) getLine putStrLn line
rockdragon/julia-programming
code/haskell/GetLine.hs
mit
202
0
12
55
65
32
33
7
1
{- - - Copyright (c) 2009-2010 Johnny Morrice - - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation - files (the "Software"), to deal in the Software without - restriction, including without limitation the rights to use, copy, - modif...
ozataman/shpider
Network/Shpider/URL.hs
mit
4,477
0
19
1,499
630
336
294
83
4
module FileHelper where import Control.Monad (filterM) import System.Directory import System.FilePath import System.FilePath.Glob findFiles :: Bool -> Pattern -> FilePath -> IO [FilePath] findFiles recurse pattern dir = do items <- getDirItems dir files <- filterM isGood...
CovenantEyes/Dewhiten
FileHelper.hs
mit
1,390
0
11
468
386
184
202
35
2
{-# OPTIONS_GHC -Wno-warnings-deprecations #-} {-# LANGUAGE OverloadedStrings #-} module Spec.Client where import Data.Aeson (Value (Null)) import Data.ByteString (ByteString) import Data.Text (unpack) import Data.Text.Encoding (decodeUtf8...
krdlab/haskell-oidc-client
test/Spec/Client.hs
mit
4,877
0
19
1,599
1,111
562
549
88
2
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE OverloadedStrings #-} import Regulate (parseRegex, compileRegex) import Regulate.Types import Regulate.Util (sortAndGroupOn) import Regulate.Enfa (enfaStateSet) import Regulate.Lexer (compileLexer) import Regulate.Parse (allCharacterClasses) import Data.GraphViz hidin...
praboud/regulator
src/graph.hs
mit
5,355
0
16
1,226
1,878
1,025
853
94
5
{-# LANGUAGE DeriveGeneric #-} module ZoomHub.API.Types.Config ( Config (..), ) where import Data.Aeson (ToJSON, genericToJSON, toJSON) import Data.Aeson.Casing (aesonPrefix, camelCase) import GHC.Generics (Generic) data Config = Config { configUploadsEnabled :: Bool } deriving (Eq, Show, Generic) -- JSON...
zoomhub/zoomhub
src/ZoomHub/API/Types/Config.hs
mit
399
0
8
64
110
67
43
11
0
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.SVGViewElement (js_getViewTarget, getViewTarget, SVGViewElement, castToSVGViewElement, gTypeSVGViewElement) where import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), M...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/JSFFI/Generated/SVGViewElement.hs
mit
1,433
6
11
178
377
238
139
25
1
{-# LANGUAGE ScopedTypeVariables, DeriveDataTypeable, DefaultSignatures, TypeOperators, TupleSections, FlexibleContexts, FlexibleInstances #-} module GHCJS.Marshal.Internal ( FromJSRef(..) , ToJSRef(..) , PToJSRef(..) ...
tavisrudd/ghcjs-base
GHCJS/Marshal/Internal.hs
mit
9,064
0
20
2,364
3,516
1,777
1,739
181
1
module ExprSpec where import Expr import Parser import Test.Hspec spec :: Spec spec = do describe "parseOp" $ do it "parses operators" $ do runParser parseForward ">++" `shouldBe` Just (Forward 1, "++") runParser parseInc "++>" `shouldBe` Just (Inc 2, ">") describe "p...
isaiah/brainfree
test/ExprSpec.hs
mit
1,146
0
23
259
452
226
226
22
1
{-# LANGUAGE FlexibleInstances #-} module Plugin.Pl.Transform ( transform, ) where import Plugin.Pl.Common import Plugin.Pl.PrettyPrinter () import qualified Data.Map as M import Data.Graph (stronglyConnComp, flattenSCC, flattenSCCs) import Control.Monad.Trans.State {- nub :: Ord a => [a] -> [a] nub = nub' S....
jystic/pointfree
Plugin/Pl/Transform.hs
mit
4,011
0
16
1,011
1,803
936
867
85
6
-- Allow data declarations with no constructors. {-# LANGUAGE EmptyDataDecls #-} {- This allows us to write class constraints such as (Stream s u Char) =>, where one of the type variables is defined instead of polymorphic. -} {-# LANGUAGE FlexibleContexts #-} {- An alternative syntax for datatypes, giving explicit typ...
tinkerthaler/lucrum-core
src/Main.hs
mit
2,935
0
17
693
306
162
144
33
1
{-# LANGUAGE RecordWildCards, PatternSynonyms, BangPatterns, ScopedTypeVariables, Rank2Types #-} module Crossover where -------------------------------------------------------------------- import Data.Vector (Vector(..), fromList) import Data.List (foldl', genericLength, splitAt, sortBy) import...
cirquit/genetic-tic-tac-toe
src/Crossover.hs
mit
4,291
0
14
1,056
1,272
690
582
56
3
module Bindings.Spotify.CommonTypes ( Sp_Bool , Sp_Byte ) where import Foreign.C.Types type Sp_Bool = CUChar type Sp_Byte = CUChar
thomasdziedzic/hs-spotify
src/Bindings/Spotify/CommonTypes.hs
mit
143
0
4
30
33
22
11
6
0
module Main where import MusicBrainz.Service (serviceInitAutomatic) import Snap (serveSnaplet, defaultConfig) -------------------------------------------------------------------------------- main :: IO () main = serveSnaplet defaultConfig serviceInitAutomatic
metabrainz/musicbrainz-data-service
src/Main.hs
gpl-2.0
263
0
6
23
46
27
19
5
1
{-# LANGUAGE Arrows, FlexibleContexts, NoMonomorphismRestriction, RankNTypes, ScopedTypeVariables, TypeOperators #-} {- Synthesis of cache protocols from KBPs. - Copyright : (C)opyright 2011, 2012 peteg42 at gmail dot com - License : GPL (see COPYING for details) This model satisfies "independent initialisat...
peteg/ADHOC
Apps/Cache/Tests/031_cache_bugfinder.hs
gpl-2.0
13,415
0
29
3,462
2,847
1,514
1,333
170
1
{-# LANGUAGE RecordWildCards, OverloadedStrings #-} {-# LANGUAGE PackageImports #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TupleSections #-} module Network.BitSmuggler.Common ( ConnData (..) , BitSmugglerException (..) , BTClientConfig (..) , ContactFile (..) , ServerDescriptor (..) , setupContactFiles...
danoctavian/bit-smuggler
BitSmuggler/src/Network/BitSmuggler/Common.hs
gpl-2.0
11,783
0
20
2,685
2,574
1,385
1,189
209
3
{-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} module Main (main) where import qualified Graphics.UI.SDL as SDL import qualified Graphics.UI.SDL.Image as Image import Graphics.UI.SDL.Types import Control.Monad.State hiding (state) import Shared.Input import Shared.Drawing import Shared.Li...
oldmanmike/haskellSDL2Examples
src/lesson14.hs
gpl-2.0
2,358
0
15
419
767
413
354
54
1
{-# OPTIONS_HADDOCK ignore-exports #-} module Algorithms.PolygonTriangulation where import Algebra.Polygon import Algebra.Vector import qualified Control.Arrow as A import Data.Maybe import Diagrams.TwoD.Types import Safe data VCategory = VStart | VEnd | VRegular | VSpli...
hasufell/CGA
Algorithms/PolygonTriangulation.hs
gpl-2.0
5,896
0
17
1,866
2,043
1,051
992
128
5
module QHaskell.Inference where import QHaskell.MyPrelude import QHaskell.Nat.ADT import qualified QHaskell.Type.Herbrand as TH import QHaskell.Type.Herbrand hiding (Tpl,App) import QHaskell.Solver import QHaskell.Conversion import QHaskell.Nat.Conversion () import QHaskell.Expression.GADTTyped import QHaskell.Enviro...
shayan-najd/QHaskell
QHaskell/Inference.hs
gpl-3.0
5,157
0
18
2,288
2,280
1,113
1,167
-1
-1
{-# OPTIONS_GHC -O0 #-} ----------------------------------------------------------------------------- -- | -- Module : -- Copyright : (c) 2012 Boyun Tang -- License : BSD-style -- Maintainer : tangboyun@hotmail.com -- Stability : experimental -- Portability : ghc -- -- -- ---------------------------------------------...
tangboyun/miranda
src/MiRanda/Parameter/FSPPara.hs
gpl-3.0
726,230
0
8
360,532
262,160
163,863
98,297
16,393
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-route53/gen/Network/AWS/Route53/Types.hs
mpl-2.0
52,871
0
27
13,414
9,255
5,238
4,017
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.Vision.Types.Sum -- Copyright : (c) 2015-2016 Brendan ...
rueshyna/gogol
gogol-vision/gen/Network/Google/Vision/Types/Sum.hs
mpl-2.0
29,562
0
11
7,261
3,958
2,129
1,829
509
0
{-# LANGUAGE TypeInType #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE GADTs #-} module TypedFlow.Memo where import qualified Data.IntMap as I import qualified Data.Map.Strict as M import System.Mem.StableName import Data.IOR...
GU-CLASP/TypedFlow
TypedFlow/Memo.hs
lgpl-3.0
3,615
2
18
972
1,598
824
774
-1
-1
module DualTreeSrcExtsSpec (main, spec) where import Test.Hspec import Language.Haskell.TokenUtils.DualTree import Language.Haskell.TokenUtils.HSE.Layout import Language.Haskell.TokenUtils.Layout -- import Language.Haskell.TokenUtils.Pretty -- import Language.Haskell.TokenUtils.TokenUtils import Language.H...
alanz/haskell-token-utils
test/DualTreeSrcExtsSpec.hs
unlicense
30,041
0
17
6,723
4,780
2,384
2,396
303
1
x a p = a * p y b c d p = if p <= c then b else b + d * (p - c) ans a b c d p = let xx = x a p yy = y b c d p in if xx <= yy then xx else yy main = do z <- getContents let (a:b:c:d:p:_) = map read $ lines z :: [Int] o = ans a b c d p print o
a143753/AOJ
0608.hs
apache-2.0
284
0
15
124
197
98
99
16
2
module RssMail.Send (readFeeds) where import Control.Concurrent (threadDelay) import qualified Control.Concurrent.MVar as MVar import Control.Monad (forM_, void) import qualified Data.Set as Set import Network.Curl.Download (openAsFeed) import Network.Mail.Mime (Mail(..), Address(..)) import Network.Mail.SMTP (renderSe...
zombiecalypse/RssMail
RssMail/Send.hs
apache-2.0
1,317
0
14
247
420
220
200
33
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeOperators #-} ---------------------------------------------------------------------------- -- | -- Module : Web.Skroutz.Endoints.Model.Manufacturer -- Copyright : (c) 2016 Remous-Aris K...
ariskou/skroutz-haskell-api
src/Web/Skroutz/Endpoints/Model/Manufacturer.hs
apache-2.0
2,792
0
21
431
401
217
184
34
1
module Lib where import System.FilePath import IntLib filepath = "a" </> "b" lib = 1 + intlib
DanielG/cabal-helper
tests/exeintlib/lib/Lib.hs
apache-2.0
98
0
5
21
30
18
12
5
1
import Data.List import System.IO f :: (Int,Int) -> Int -> (Int,Int) f (m,a) x = let m' = min m x a' = max a (x-m) in (m',a') exec :: (Int,Int) -> IO (Int,Int) exec (m,a)= do l <- getLine let i = read l :: Int o = (m,a) `seq` i `seq` f (m,a) i eof <- isEOF if eof then return o else exe...
a143753/AOJ
ALDS1_1_D.hs
apache-2.0
401
0
12
120
251
135
116
20
2
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QLine.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:32 Warning : this file is machine generated - do not mod...
uduki/hsQt
Qtc/Core/QLine.hs
bsd-2-clause
7,296
0
15
1,411
2,665
1,372
1,293
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} module Control.Concurrent.MVar.Exts ( module Control.Concurrent.MVar , modifyMVarMasked_', modifyMVarMasked', readMVar, putMVar, takeMVar ) where import Control.Concurrent.MVar import qualified Control.Concurrent.MVar import Control.Exception import Data.Typeable {-# INLIN...
cornell-pl/HsAdapton
src/Control/Concurrent/MVar/Exts.hs
bsd-3-clause
802
6
14
166
289
156
133
23
1
module Main (main) where import D21Lib import System.Environment (getArgs) import Text.Parsec.String (parseFromFile) p1input :: String p1input = "abcdefgh" p2input :: String p2input = "fbgdceah" main :: IO () main = do file <- head <$> getArgs parseResult <- parseFromFile instructionsP file let instructions =...
wfleming/advent-of-code-2016
2016/app/D21.hs
bsd-3-clause
564
0
12
98
164
84
80
17
1
-- | -- Module: Utils.DayCount -- Copyright: (c) Johan Astborg, Andreas Bock -- License: BSD-3 -- Maintainer: Andreas Bock <bock@andreasbock.dk> -- Stability: experimental -- Portability: portable -- -- Defines types and classes for computing day count modifiers module Utils.DayCount where import qualifie...
HIPERFIT/HQL
src/Utils/DayCount.hs
bsd-3-clause
1,628
0
12
429
506
267
239
29
1
module Main where import TaplError import Util import Evaluator runParseAndEval = putStrLn . runThrows . parseAndEval main :: IO () main = getContentsFromCmdLine >>= runParseAndEval
ehamberg/tapl-haskell-untyped
src/Main.hs
bsd-3-clause
192
0
6
35
45
26
19
8
1
{-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE UndecidableInstances #-} module Data.TypeLevel.Number ( Negate , OperatorNegate , Reciprocal , OperatorReciprocal , Add , Operator...
jonathanknowles/hs-type-level-prime-product
Data/TypeLevel/Number.hs
bsd-3-clause
1,770
4
6
424
426
233
193
-1
-1
module Zero.Account.Profile.Navigation ( Route(..) , navigation ) where ------------------------------------------------------------------------------ import qualified Data.Text as T import Data.Text (Text) import Reflex.Dom.Core import Reflex.Dom.Path (IsPath(..)) ---------...
et4te/zero
src/Zero/Account/Profile/Navigation.hs
bsd-3-clause
3,576
0
14
694
1,068
530
538
88
1
{-# LANGUAGE NoImplicitPrelude #-} module Protocol.ROC.PointTypes.PointType172 where import Data.Binary.Get (getByteString, getWord8, getWord32le, Get) import Data.ByteString (ByteString) import Data.Word (Word8,Word32) im...
plow-technologies/roc-translator
src/Protocol/ROC/PointTypes/PointType172.hs
bsd-3-clause
1,370
0
9
478
210
121
89
38
1
{-# LANGUAGE Rank2Types, BangPatterns #-} ----------------------------------------------------------------------------- -- | -- Module : Numeric.AD.Mode.Sparse -- Copyright : (c) Edward Kmett 2010 -- License : BSD3 -- Maintainer : ekmett@gmail.com -- Stability : experimental -- Portability : GHC only -- -...
yairchu/ad
src/Numeric/AD/Mode/Sparse.hs
bsd-3-clause
3,920
0
14
974
1,866
964
902
78
1
{-#Language GeneralizedNewtypeDeriving #-} module Language.TheExperiment.Inferrer.InferrerM where import qualified Data.Map as Map import Control.Applicative import Control.Monad import Control.Monad.Trans import Control.Monad.Trans.State import Data.Traversable import Text.PrettyPrint.HughesPJ import qualified...
jvranish/TheExperiment
src/Language/TheExperiment/Inferrer/InferrerM.hs
bsd-3-clause
2,297
0
11
390
803
415
388
47
1
module Main where import Perft import SpeedTest import Analyze import HashKeyTest import Engine import Control.Applicative import Options import Data.Maybe import Data.Either import Control.Monad data Mode = Perft | SpeedTest | Analyze | HashTest | Engine deriving...
syanidar/Sophy
app/Main.hs
bsd-3-clause
2,076
0
15
792
446
256
190
50
5
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TemplateHaskell #-} module Tak.AI.Types where import AI.Gametree import Control.Lens import Tak.Types data AIGameState = AIGameState { _aiGameState :: GameState , _aiHumanPlayer :: Player , _aiAi :: AIGameSt...
z0isch/htak
src/Tak/AI/Types.hs
bsd-3-clause
498
0
10
128
107
61
46
14
0
module Parse.Literal (literal) where import Prelude hiding (exponent) import qualified Elm.String as ES import qualified Parse.Primitives as P import Parse.ParsecAdapter import Parse.IParser import qualified Parse.String import qualified Parse.Number import AST.V0_16 literal :: IParser LiteralValue literal = P.o...
avh4/elm-format
elm-format-lib/src/Parse/Literal.hs
bsd-3-clause
1,782
0
17
446
550
278
272
53
4
----------------------------------------------------------------------------- -- | -- Module : Debug.QuickCheck.Utils -- Copyright : (c) Andy Gill 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries@haskell.org -- Stability : experimental -- Portability : ...
OS2World/DEV-UTIL-HUGS
libraries/Debug/QuickCheck/Utils.hs
bsd-3-clause
1,574
18
15
349
537
296
241
31
1
module Arhelk.Armenian.Lemma.Common( endsWith ) where import Data.Text as T endsWith :: Text -> [Text] -> Bool endsWith w ws = or $ ends <$> ws where ends s = takeEnd (T.length s) w == s
Teaspot-Studio/arhelk-armenian
src/Arhelk/Armenian/Lemma/Common.hs
bsd-3-clause
202
0
11
50
81
45
36
6
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} module OpenStack.Common where import Control.Applicative import Control.Lens.TH import Data.Ae...
anchor/openstack-api
lib/OpenStack/Common.hs
bsd-3-clause
3,671
0
12
904
1,019
548
471
104
0
----------------------------------------------------------------------------- -- | -- Module : Types.Data.Decimal.Ops -- Copyright : (c) 2008 Peter Gavin -- License : BSD-style (see the file LICENSE) -- -- Maintainer : pgavin@gmail.com -- Stability : experimental -- Portability : non-portable (type...
pgavin/tfp
Types/Base.hs
bsd-3-clause
620
0
5
103
51
37
14
-1
-1
module Koriel.Core.Type where import Control.Lens (Prism', Traversal', prism, traverseOf, traversed, (^.)) import Data.Binary (Binary) import Data.Data (Data) import Koriel.Id import Koriel.Prelude import Koriel.Pretty {- Constructors C ::= <tag n> -} data Tag = Data Text | Tuple deriving stock (Eq, Show, Ord,...
takoeight0821/malgo
src/Koriel/Core/Type.hs
bsd-3-clause
2,071
0
12
449
807
419
388
-1
-1
{-# LANGUAGE MultiParamTypeClasses,FunctionalDependencies,FlexibleContexts, FlexibleInstances #-} module AI.Classification.SemiBoost -- ( train -- , classify -- , mkBoost -- -- , module AI.Classification.BoostingAlgs -- ) where import AI.Classification import AI.RandomUtils import AI.Classific...
mikeizbicki/Classification
src/AI/Classification/SemiBoost.hs
bsd-3-clause
8,864
1
24
2,504
3,128
1,631
1,497
157
3
{-# LANGUAGE OverloadedStrings #-} module Main where import Data.ByteString.Char8 (ByteString) import Foreign.C.Types import HROOT main = do tcanvas <- newTCanvas ("test" :: ByteString) ("test" :: ByteString) 640 480 h1 <- newTH1F ("test" :: ByteString) ("test" :: ByteString) 100 (-10.0) 10.0 h2 <- newTH1F...
wavewave/HROOT-generate
HROOT-generate/template/HROOT/example/histadd.hs
gpl-3.0
1,061
0
15
295
399
196
203
31
1
-- | -- Module: SwiftNav.SBP.FileIo -- Copyright: Copyright (C) 2015 Swift Navigation, Inc. -- License: LGPL-3 -- Maintainer: Mark Fine <dev@swiftnav.com> -- Stability: experimental -- Portability: portable -- -- Messages for using device's onboard flash filesystem functionality. This -- allows data to be...
mfine/libsbp
haskell/src/SwiftNav/SBP/FileIo.hs
lgpl-3.0
9,562
0
11
1,627
1,294
695
599
-1
-1
{-# LANGUAGE CPP #-} -- -*-haskell-*- -- GIMP Toolkit (GTK) CustomStore TreeModel -- -- Author : Duncan Coutts, Axel Simon -- -- Created: 11 Feburary 2006 -- -- Copyright (C) 2005 Duncan Coutts, Axel Simon -- -- This library is free software; you can redistribute it and/or -- modify it under the terms of the GNU ...
phischu/gtk2hs
gtk/Graphics/UI/Gtk/ModelView/ListStore.hs
lgpl-3.0
12,091
25
20
2,869
2,573
1,353
1,220
168
6
-- | Konstruktion des Graphen aus dem Beweis der NP-Vollständigkeit von VC module Graph.VC.SAT ( vc ) where -- $Id$ import Autolib.Graph.Type import Autolib.Set ( mkSet ) import Autolib.FiniteMap ( listToFM ) import Autolib.Boxing.Position ( Position ) import SAT.Types import Graph.Cross ( Punkt , pinN ) -------...
Erdwolf/autotool-bonn
src/Graph/VC/SAT.hs
gpl-2.0
2,581
22
14
636
1,173
624
549
54
3
{-# LANGUAGE ViewPatterns,RecordWildCards #-} -- Collect information about target by interogating a C compiler module Support.Gcc( Compiler(), findCompiler, targetBoolValue, targetIntValue, targetIndirectBoolValue, compileTest ) where import Control.Monad import Data.Binary import Data.IORe...
hvr/jhc
src/Support/Gcc.hs
mit
5,645
0
18
1,382
1,688
862
826
-1
-1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RankNTypes #-} module Distribution.Simple.Test.ExeV10 ( runTest ) where import Prelude () import Distribution.Compat.Prelude import Distribution.Types.UnqualComponentName import Distribution.Compat.CreatePipe import Distribution.Compat.Environment import q...
themoritz/cabal
Cabal/Distribution/Simple/Test/ExeV10.hs
bsd-3-clause
6,607
0
18
1,838
1,334
699
635
119
4
module T15445 where import T15445a foo :: IO () foo = do { print (plusTwoRec [1..10 :: Int]) ; print (plusTwoRec' [1..20 :: Int]) }
sdiehl/ghc
testsuite/tests/simplCore/should_compile/T15445.hs
bsd-3-clause
144
0
10
37
65
36
29
5
1
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE UnboxedTuples #-} -- for GHC 7.4 or earlier module Network.Wai.Handler.Warp.Timeout ( -- ** Types Manager , TimeoutAction , Handle -- ** Manager , initialize , stopManager , withManager -- ** Registrati...
AndrewRademacher/wai
warp/Network/Wai/Handler/Warp/Timeout.hs
mit
4,916
0
14
1,001
965
531
434
84
4
module StateMonad () where type State = Int data ST a b = S (b -> (a, b)) | F a | G (b -> a) {-@ fresh :: ST {v:Int|v>=0} {v:Int|v>=0} @-} fresh :: ST Int Int fresh = S $ \n -> (n, n+1)
mightymoose/liquidhaskell
tests/pos/state00.hs
bsd-3-clause
190
0
9
50
89
54
35
5
1
module Tests.Map where import qualified Data.Map as M {-# NOINLINE m #-} m :: M.Map String Int m = M.fromList [("asd", 1092), ("njx.,", 55), ("sad", 3), ("durr", 726), ("42", 42), ("five", 6), ("oas", 9), ("derp", 88), ("\"\"", 0)] runTest :: IO [(Int, String)] runTest = return . map (\(k, v) -> (...
joelburget/haste-compiler
Tests/Map.hs
bsd-3-clause
553
0
19
132
297
170
127
19
1
{-# LANGUAGE PatternSynonyms #-} module T11633 where data ARecord = ARecord {anInt :: Int, aString :: String} -- This works... pattern AGoodPat :: Int -> String -> ARecord pattern AGoodPat n s = ARecord {anInt=n, aString=s} pattern ABadPat :: Int -> String -> ARecord pattern ABadPat n s = ARecord {aString=s, anInt=...
ezyang/ghc
testsuite/tests/patsyn/should_compile/T11633.hs
bsd-3-clause
323
0
8
56
113
64
49
7
0
module Main where import System.Environment import Text.ParserCombinators.Parsec hiding (spaces) import Control.Monad import Numeric symbol :: Parser Char symbol = oneOf "!#$%&|*+-/:<=>?@^_~" spaces :: Parser () spaces = skipMany1 space data LispVal = Atom String | List [LispVal] ...
llytvynenko/write-yourself-a-scheme
app/Main.hs
isc
2,547
0
14
754
865
421
444
82
5
module FunctionalGraphOld ( Graph(..) , addNode ) where data Node nodeLabelType = Node { nodeNum :: Int , nodeLabel :: nodeLabelType } deriving (Show, Eq) -- Node tests n1 = Node 0 1.0 t1 = nodeNum n1 == 0 t2 = nodeLabel n1 == 1.0 -- We have parents and...
markstoehr/Approximate-Generalized-Flows-in-Haskell
FunctionalGraphOld.hs
mit
2,703
0
10
681
553
311
242
-1
-1