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
#! /usr/bin/env nix-shell #! nix-shell ./shell.nix -i runghc import Distribution.Simple main = defaultMain
k0001/haskell-money
safe-money/Setup.hs
bsd-3-clause
107
0
4
13
13
8
5
2
1
{-# OPTIONS_GHC -Wall -Werror #-} module ManySecond where
holzensp/ghc
testsuite/tests/driver/dynamic_flags_002/ManySecond.hs
bsd-3-clause
61
0
2
11
5
4
1
2
0
module Sudoku where import Data.Maybe (catMaybes, fromJust, isJust, listToMaybe) import Data.List ((\\), transpose) type SudokuVal = Int -- The type representing Sudoku values type EmptyPuzzle = [[ Maybe SudokuVal ]] -- A matrix where Nothing values represent unknowns. ...
brandonchinn178/sudoku
src/Sudoku.hs
mit
3,674
0
11
1,091
1,044
577
467
52
2
module Test.Hspec.Core.Formatters.Pretty.Unicode ( ushow , ushows ) where import Prelude () import Test.Hspec.Core.Compat import Data.Char ushow :: String -> String ushow xs = ushows xs "" ushows :: String -> ShowS ushows = uShowString uShowString :: String -> ShowS uShowString cs =...
hspec/hspec
hspec-core/src/Test/Hspec/Core/Formatters/Pretty/Unicode.hs
mit
688
0
11
157
241
125
116
20
1
myTuple = (8, 11) fst' = fst myTuple snd' = snd myTuple -- the zip function will merge two lists into tuples zip' = zip [1,2,3,4,5] [5,5,5,5,5] lazyZip = zip [1.. ] ["one", "two", "three", "four", "five"] --triangles problem triangles = [ (a,b,c) | c <- [1..10], b <- [1..10], a <- [1..10] ] rightTriangles = [...
luisgepeto/HaskellLearning
02 Starting Out/06_tuples.hs
mit
500
0
11
107
333
188
145
8
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeSynonymInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module IHaskell.Display.Widgets.Box.SelectionContainer.Tab ( -- * The Tab widget TabWidget -- * Constructor , mkTab ) where -- To...
gibiansky/IHaskell
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Box/SelectionContainer/Tab.hs
mit
1,810
0
15
420
340
184
156
41
1
----------------------------------------------------------------------------- -- | -- Module : Data.Either.Unwrap -- Copyright : (c) Gregory Crosswhite -- License : BSD-style -- -- Maintainer : gcross@haskell.org -- Stability : provisional -- Portability : portable -- -- Functions for probing and u...
Spawek/HCPParse
src/Data/Either/Unwrap.hs
mit
2,954
0
11
711
572
301
271
35
1
-- Prints Hello World N Times -- hello_worlds 0 = return() hello_worlds n = do putStrLn "Hello World" hello_worlds (n-1) -- Complete this function -- This part is related to the Input/Output and can be used as it is -- Do not modify it main = do n <- readLn :: IO Int hello_worlds n
jmeline/secret-meme
hackerrank/functional_programming/haskell/hello_world_n.hs
mit
304
0
9
76
70
34
36
7
1
{-# LANGUAGE JavaScriptFFI #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} import Control.Applicative import Control.Monad import Control.Monad.Reader import qualified GHCJS.Types as T import qualified GHCJS.Foreign as F import qualified GHCJS.Marshal as M import WebGL import Simple ...
jmillikan/webgl-lessons-ghcjs
src/Lesson02.hs
mit
4,723
0
14
1,279
1,067
560
507
79
1
module Tach.Wavelet.Core where import Tach.Wavelet.Core.Internal
smurphy8/tach
core-libs/tach-wavelet-core/src/Tach/Wavelet/Core.hs
mit
66
0
4
6
14
10
4
2
0
{-# LANGUAGE DeriveGeneric #-} module Data.Monoid.Colorful.Term ( Term(..) , getTerm , hGetTerm ) where import Data.List (isPrefixOf, isInfixOf) import System.Environment (getEnv) import System.IO (Handle, hIsTerminalDevice, stdout) import GHC.Generics (Generic) -- | Terminal type. For less capable terminals t...
minad/colorful-monoids
src/Data/Monoid/Colorful/Term.hs
mit
1,476
0
9
297
290
167
123
30
2
module GearScript.AST where data Type = Type { typeName :: String , typeParent :: Maybe Type } deriving (Show, Eq) data Typed a = Typed { typedType :: Maybe Type , typedVal :: a } data TopStatement = FunctionDef { functionName :: S...
teozkr/GearScript
src/GearScript/AST.hs
mit
1,237
0
9
567
234
138
96
30
0
-- | Debugging functions. module RWPAS.Debug ( logShow ) where import Control.Concurrent import System.IO import System.IO.Unsafe logLock :: MVar () logLock = unsafePerformIO $ newMVar () {-# NOINLINE logLock #-} logShow :: Show a => a -> b -> b logShow thing result = unsafePerformIO $ withMVar logLock $ \_ -> ...
Noeda/rwpas
src/RWPAS/Debug.hs
mit
415
0
11
80
127
66
61
13
1
{-# LANGUAGE FlexibleInstances, FlexibleContexts #-} {- Copyright (C) 2013 John MacFarlane <jgm@berkeley.edu> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at y...
timtylin/scholdoc-types
Text/Pandoc/JSON.hs
gpl-2.0
4,328
45
10
835
538
309
229
35
0
{- | Module : $Header$ Description : colimit of an arbitrary diagram in Set Copyright : (c) 2005, Amr Sabry, Chung-chieh Shan, Oleg Kiselyov, and Daniel P. Friedman License : GPLv2 or higher, see LICENSE.txt Maintainer : Mihai.Codescu@dfki.de Stability : provisional Portability : portable ...
nevrenato/Hets_Fork
Common/LogicT.hs
gpl-2.0
3,844
0
14
1,319
938
486
452
49
2
module Chap02.Exercise04.Test where import Chap02.Exercise04 (insert) import Chap02.Data.UnbalancedSet hiding (insert, member) import Data.Foldable (toList) prop_Ex4InsertBST :: Int -> UnbalancedSet Int -> Bool prop_Ex4InsertBST n t = isSorted . toList $ insert n t where isSorted [] = True ...
stappit/okasaki-pfds
test/Chap02/Exercise04/Test.hs
gpl-3.0
405
0
12
102
140
77
63
9
3
module Parser where import Movie import Data.Function import Data.List.Split import Data.Maybe import Text.Regex import Text.Regex.Posix import Prelude hiding (id) -- | Parse a [String] to a Movie with a default rating of 0 parseMovie :: [String] -> Movie parseMovie (id:title:date:url:genres) = Movie (read id) titl...
Jiggins/CS210
Parser.hs
gpl-3.0
1,265
0
11
343
336
183
153
23
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FunctionalDependencies #-} module Snap.Snaplet.Sedna where ------------------------------------------------------------------------------- import Control.Monad.IO.Control import...
ExternalReality/snaplet-sedna
src/Snap/Snaplet/Sedna.hs
gpl-3.0
3,091
0
13
725
574
298
276
47
1
module Data.Rhythm.RockBand.Lex.VenueRB3 where import Data.Rhythm.RockBand.Common import qualified Data.Rhythm.MIDI as MIDI import Data.Rhythm.Event import Data.Rhythm.Time import Data.Rhythm.Interpret import qualified Numeric.NonNegative.Class as NN import Data.Char (toLower) import qualified Sound.MIDI.File.Event as...
mtolly/rhythm
src/Data/Rhythm/RockBand/Lex/VenueRB3.hs
gpl-3.0
1,606
0
6
338
350
230
120
76
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-maps-engine/gen/Network/Google/Resource/MapsEngine/Layers/Get.hs
mpl-2.0
3,082
0
13
730
388
234
154
59
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
dysinger/amazonka
amazonka-swf/gen/Network/AWS/SWF/DescribeWorkflowExecution.hs
mpl-2.0
8,076
0
17
1,620
816
495
321
97
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-logging/gen/Network/Google/Resource/Logging/BillingAccounts/Sinks/Create.hs
mpl-2.0
7,962
0
20
1,834
1,036
608
428
145
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/RegionCommitments/Insert.hs
mpl-2.0
4,853
0
17
1,081
559
335
224
86
1
{- arch-tag: Generic Dict-Like Object Support Copyright (C) 2005 John Goerzen <jgoerzen@complete.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at ...
jgoerzen/anydbm
src/Database/AnyDBM.hs
lgpl-2.1
5,544
0
14
1,725
836
420
416
-1
-1
-- http://www.codewars.com/kata/5266876b8f4bf2da9b000362 module Likes where likes :: [String] -> String likes [] = "no one likes this" likes (x:[]) = x++" likes this" likes (x:y:[]) = x++" and "++y++" like this" likes (x:y:z:[]) = x++", "++y++" and "++z++" like this" likes (x:y:zs) = x++", "++y++" and "++show (length ...
Bodigrim/katas
src/haskell/6-Who-likes-it.hs
bsd-2-clause
344
0
10
52
174
91
83
7
1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QSplashScreen_h.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:27 Warning : this file is machine generated - ...
keera-studios/hsQt
Qtc/Gui/QSplashScreen_h.hs
bsd-2-clause
62,301
0
18
13,107
20,098
9,685
10,413
-1
-1
-------------------------------------------------------------------------------- module WhatMorphism.Dump ( Dump (..) ) where -------------------------------------------------------------------------------- import Coercion (Coercion) import CoreSyn import Data.List (intercalate)...
jaspervdj/what-morphism
src/WhatMorphism/Dump.hs
bsd-3-clause
4,541
0
12
908
1,194
625
569
71
1
{- BezCurve.hs (adapted from bezcurve.c which is (c) Silicon Graphics, Inc) Copyright (c) Sven Panne 2002-2005 <sven.panne@aedion.de> This file is part of HOpenGL and distributed under a BSD-style license See the file libraries/GLUT/LICENSE This program uses evaluators to draw a Bezier curve. -} import...
FranklinChen/hugs98-plus-Sep2006
packages/GLUT/examples/RedBook/BezCurve.hs
bsd-3-clause
2,027
0
12
473
663
328
335
50
2
import Data.Char (isDigit) data YorthData = YNil | YInt Integer | YOpAdd | YOpSub | YOpMul | YOpDiv | YError String deriving (Show, Eq, Ord) data Closure = DoneToken | Closure [YorthData] Closure [(YorthData, [Closure])] Closure deriving (Show, Eq, Ord) empty_closure = (Closure [] empty...
tricorder42/yorth
yorth.hs
bsd-3-clause
959
7
13
232
370
203
167
-1
-1
{-# LANGUAGE PolyKinds #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE FunctionalDependencies #-} ----------------------------------------------------------------------------- -- | -- Module : Indexed.Traversable -- Copyright : (C) 2012 Edward Km...
ekmett/indexed
src/Indexed/Traversable.hs
bsd-3-clause
904
0
14
138
131
77
54
12
0
import Data.Text (unpack) import Data.List (sortOn) import Lib main :: IO () main = do mod <- parseModuleFromFile "test/Test1.purs" putStrLn "" putStrLn $ show mod putStrLn "" putStrLn "% facts" putStrLn . unpack . formatAtomsProlog . sortForProlog . factsFromModule $ mod pu...
epost/psc-query
test/Spec.hs
bsd-3-clause
540
0
11
132
156
74
82
15
1
{-# LANGUAGE OverloadedStrings #-} import System.Random import System.Environment import Debug.Trace import Data.List import Control.Monad.Par import Control.DeepSeq import Data.Map (Map) import qualified Data.Map as Map -- ---------------------------------------------------------------------------- -- <<Talk newty...
mono0926/ParallelConcurrentHaskell
timetable3.hs
bsd-3-clause
4,343
9
13
1,131
1,522
826
696
96
2
---------------------- -- PARELM -- ---------------------- module Parelm where import LPPE import Usage -- This function removes global parameters that are never used. parelm :: PSpecification -> PSpecification parelm (lppe, initial, dataspec) = (lppeReduced, initial2, dataspec) where unused = [...
utwente-fmt/scoop
src/Parelm.hs
bsd-3-clause
607
0
19
125
172
97
75
8
1
{-# LANGUAGE TypeOperators #-} module Data.Semigroupoid.Category where import Data.Semigroupoid.Semigroupoid class Semigroupoid (~>) => Category (~>) where id :: a ~> a instance Category (->) where id a = a
tonymorris/type-class
src/Data/Semigroupoid/Category.hs
bsd-3-clause
222
0
7
44
62
36
26
-1
-1
module D18Spec (main, spec) where import Test.Hspec import D18Lib import qualified Data.Vector as V import qualified Text.Parsec as P main :: IO () main = hspec spec spec :: Spec spec = parallel $ do describe "parsing" $ do it "parses a row" $ do let r = P.parse rowP "fixture" ".^\n" ...
wfleming/advent-of-code-2016
2016/test/D18Spec.hs
bsd-3-clause
862
0
18
278
326
171
155
24
1
-- | Settings are centralized, as much as possible, into this file. This -- includes database connection settings, static file locations, etc. -- In addition, you can configure a number of different aspects of Yesod -- by overriding methods in the Yesod typeclass. That instance is -- declared in the Foundation.hs file....
konn/leport
leport-web/Settings.hs
bsd-3-clause
6,896
0
17
1,860
974
559
415
-1
-1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RankNTypes #-} import Plots import Network.Wreq import Control.Lens import Data.Csv hiding ((.=)) import Plots.Axis import qualified Data.Vector as V import Data.ByteString.Lazy (ByteString) import Control.Arrow import Control.Monad.State (MonadState, execStateT) import Da...
bergey/plots
examples/stocks.hs
bsd-3-clause
4,014
0
15
792
1,080
578
502
-1
-1
----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.Program.HcPkg -- Copyright : Duncan Coutts 2009, 2013 -- -- Maintainer : cabal-devel@haskell.org -- Portability : portable -- -- This module provides an library interface to the @hc-pkg@ progra...
fugyk/cabal
Cabal/Distribution/Simple/Program/HcPkg.hs
bsd-3-clause
16,572
0
18
4,230
3,350
1,788
1,562
294
5
{-# LANGUAGE NoImplicitPrelude #-} module Jetski.Foreign.Return ( Return(..) , storableReturn , withReturn , retVoid , retInt8 , retInt16 , retInt32 , retInt64 , retWord8 , retWord16 , retWord32 , retWord64 , retFloat , retDouble , retCChar , retCUChar , retCWchar , retCInt , r...
ambiata/jetski
src/Jetski/Foreign/Return.hs
bsd-3-clause
3,333
0
13
702
929
498
431
133
1
----------------------------------------------------------------------------- -- | -- Module : Data.SBV.SMT.SMT -- Copyright : (c) Levent Erkok -- License : BSD3 -- Maintainer : erkokl@gmail.com -- Stability : experimental -- -- Abstraction of SMT solvers ---------------------------------------------...
Copilot-Language/sbv-for-copilot
Data/SBV/SMT/SMT.hs
bsd-3-clause
26,491
0
38
9,209
6,396
3,353
3,043
344
8
{- Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 2.0 Kubernetes API version: v1.9.12 Generated by Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) -} {-| Module : Kubernetes.OpenAPI.API.Events ...
denibertovic/haskell
kubernetes/lib/Kubernetes/OpenAPI/API/Events.hs
bsd-3-clause
2,712
0
8
331
484
333
151
-1
-1
module ELc.Arbitrary where import Language.ELc import Lc.Arbitrary import Test.QuickCheck -------------------------------------------------------------- -- QuickCheck - Arbitratry -------------------------------------------------------------- instance Arbitrary ELc where arbitrary = arbitraryELc instance Arbit...
d-dorazio/lc
test/ELc/Arbitrary.hs
bsd-3-clause
522
0
7
66
101
57
44
12
1
{-# LANGUAGE BangPatterns #-} module Scrabble (makeDict,process,validHand,prettySC ,ScrabbleCommand(..),Sort(..),Dict,FilePath,Score) where import Data.Array.Unboxed((!)) import Data.Ix(inRange) import Data.List(group,sort) import Data.Char(toUpper) import Tiles(freqArray) import Dict(Dict,build) impor...
ChrisKuklewicz/XWords
src/Scrabble.hs
bsd-3-clause
3,074
0
12
632
1,208
664
544
55
3
{-# LANGUAGE OverloadedStrings #-} module CryptoTest (tests, cbTests) where import System.IO import System.IO.Temp import System.Posix.IO import Control.Monad (liftM, when) import Control.Monad.Trans.Maybe import Control.Monad.IO.Class import Control.Monad.Catch import Control.Concurrent import Data.List (isInfixOf) i...
mmhat/h-gpgme
test/CryptoTest.hs
mit
12,536
0
21
3,024
2,963
1,470
1,493
239
3
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE CPP #-} module Network.Wai.Handler.Warp.HTTP2.Worker ( Respond , response , worker ) where #if __GLASGOW_HASKELL__ < 709 import Control.Applicative #endif import Contro...
soenkehahn/wai
warp/Network/Wai/Handler/Warp/HTTP2/Worker.hs
mit
10,706
0
18
2,680
2,204
1,110
1,094
177
4
{-| Types used in both Events and Effects. -} module Urbit.Arvo.Common ( KingId(..), ServId(..) , Json, JsonNode(..) , Desk(..), Mime(..) , Port(..), Turf(..) , HttpServerConf(..), PEM(..), Key, Cert , HttpEvent(..), Method, Header(..), ResponseHeader(..) , ReOrg(..), reorgThroughNoun , AmesDest(..)...
jfranklin9000/urbit
pkg/hs/urbit-king/lib/Urbit/Arvo/Common.hs
mit
6,142
0
17
1,512
1,704
931
773
-1
-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 #-} -- ...
fmapfmapfmap/amazonka
amazonka-glacier/gen/Network/AWS/Glacier/ListJobs.hs
mpl-2.0
9,094
0
13
1,863
1,072
658
414
118
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 #-} -- ...
fmapfmapfmap/amazonka
amazonka-kms/gen/Network/AWS/KMS/PutKeyPolicy.hs
mpl-2.0
4,075
0
12
939
563
338
225
78
1
-- | See "Control.Super.Monad.Functions". module Control.Supermonad.Functions ( module Control.Super.Monad.Functions ) where import Control.Super.Monad.Functions
jbracker/supermonad-plugin
src/Control/Supermonad/Functions.hs
bsd-3-clause
168
0
5
18
25
18
7
3
0
{-# LANGUAGE CPP #-} import Test.HUnit (Assertion, (@=?), runTestTT, Test(..), Counts(..)) import System.Exit (ExitCode(..), exitWith) import Gigasecond (fromDay) import Data.Time.Clock (UTCTime) import System.Locale (iso8601DateFormat) #if __GLASGOW_HASKELL__ >= 710 import Data.Time.Format (TimeLocale, ParseTime, pars...
stevejb71/xhaskell
gigasecond/gigasecond_test.hs
mit
1,429
0
12
228
392
210
182
27
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-autoscaling/gen/Network/AWS/AutoScaling/PutNotificationConfiguration.hs
mpl-2.0
4,899
0
10
952
476
292
184
61
1
{-| Cluster checker. -} {- Copyright (C) 2012, 2013 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 copyright notice, this list of ...
andir/ganeti
src/Ganeti/HTools/Program/Hcheck.hs
bsd-2-clause
13,579
0
18
3,040
2,971
1,584
1,387
240
3
{- (c) The University of Glasgow, 2004-2006 Module ~~~~~~~~~~ Simply the name of a module, represented as a FastString. These are Uniquable, hence we can build Maps with Modules as the keys. -} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE RecordWildCards #-} module Module ( -- * The ModuleName type ...
siddhanathan/ghc
compiler/basicTypes/Module.hs
bsd-3-clause
18,321
0
19
4,439
3,590
1,927
1,663
294
2
{-# LANGUAGE CPP, BangPatterns #-} module Main where import Control.Monad import Data.Int import Network.Socket ( AddrInfo, AddrInfoFlag (AI_PASSIVE), HostName, ServiceName, Socket , SocketType (Stream), SocketOption (ReuseAddr) , accept, addrAddress, addrFlags, addrFamily, bindSocket, defaultProtocol , defa...
tweag/network-transport-zeromq
benchmarks/subparts/h-tcp-chan.hs
bsd-3-clause
4,012
0
15
818
1,222
636
586
94
2
module Infix4 (f) where -- define an infix constructor and attempt to remove it... data T1 a b = b :#: a {- g :: T1 Int Int -> Int -} {- g (x :$: y) = x + y -} f x y = error "g (x :$: y) no longer defined for T1 at line: 5"
kmate/HaRe
old/testing/removeCon/Infix4_TokOut.hs
bsd-3-clause
241
0
6
75
38
23
15
4
1
module ListSort () where import Language.Haskell.Liquid.Prelude {-@ type OList a = [a]<{\fld v -> (v >= fld)}> @-} {-@ predicate Pr X Y = (((len Y) > 1) => ((len Y) < (len X))) @-} {-@ split :: xs:[a] -> ({v:[a] | (Pr xs v)}, {v:[a]|(Pr xs v)}) <{\x y -> ((len x) + (len y) = (len xs))}>...
ssaavedra/liquidhaskell
tests/pos/ListMSort.hs
bsd-3-clause
1,062
0
10
303
375
205
170
19
1
module Conflict1 where f :: Int -> Int f x = x + 1 f1 :: Int -> Int f1 x = x - 1 f3 :: Int -> (Int, Int) f3 x y = (x + 1, y - 1)
kmate/HaRe
old/testing/merging/Conflict1_TokOut.hs
bsd-3-clause
133
0
6
45
85
47
38
7
1
{-# LANGUAGE RecordWildCards #-} -- | See: -- -- * \"The Probabilistic Relevance Framework: BM25 and Beyond\" -- <www.soi.city.ac.uk/~ser/papers/foundations_bm25_review.pdf‎> -- -- * \"An Introduction to Information Retrieval\" -- <http://nlp.stanford.edu/IR-book/pdf/irbookonlinereading.pdf> -- module Distribution...
ocharles/hackage-server
Distribution/Server/Features/Search/BM25F.hs
bsd-3-clause
6,758
0
19
1,991
1,540
846
694
110
1
{-# LANGUAGE TypeFamilies #-} module B where import A data B type instance F (B,b) = () b :: () -> F (B,b) b = id
shlevy/ghc
testsuite/tests/driver/recomp017/B.hs
bsd-3-clause
114
0
7
26
54
33
21
-1
-1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeFamilies #-} -- A very bogus program (multiple errors) but -- sent GHC 6.12 into a loop module T3330a where newtype Writer w a = Writer { runWriter :: (a, w) } execWriter :: Writer w a -> w execWriter m = snd (runWriter m) data AnyF (s :...
ezyang/ghc
testsuite/tests/indexed-types/should_fail/T3330a.hs
bsd-3-clause
1,260
0
12
341
333
176
157
-1
-1
{-# LANGUAGE BangPatterns, MagicHash, UnboxedTuples #-} -- Test allocation of statically sized arrays. There's an optimization -- that targets these and we want to make sure that the code generated -- in the optimized case is correct. -- -- The tests proceeds by allocating a bunch of arrays of different -- sizes and r...
urbanslug/ghc
testsuite/tests/codeGen/should_run/StaticArraySize.hs
bsd-3-clause
2,785
0
12
842
831
407
424
68
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeOperators #-} module Impl.MVar1 where import Control.Concurrent.MVar import Control.Monad.IO.Class import Control.Monad.Trans.Either import Data.HashMap.Strict (HashMap) import qua...
AndrewRademacher/whimsy
src/Impl/MVar1.hs
mit
1,786
0
16
517
514
260
254
47
2
{- - Comonad implementation of an infinite cellular automata grid, adapted with - minor modifications from Kukuruku's implementation here: - http://kukuruku.co/hub/haskell/cellular-automata-using-comonads - -} module Universe where import Control.Applicative (pure) import Control.Comonad (Comonad(..)) -- Univer...
billpmurphy/conway-combat
Universe.hs
mit
3,075
0
13
695
970
514
456
44
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} module Nauva.Product.Varna.Shared ( root , batteryCard ) where import qualified Data.Aeson as A import Nauva.View import Nauva.Service.Head import Nauva.P...
wereHamster/nauva
product/varna/shared/src/Nauva/Product/Varna/Shared.hs
mit
3,087
0
15
1,038
840
436
404
84
1
{-# LANGUAGE TupleSections, RecordWildCards, DeriveGeneric #-} {-# OPTIONS_GHC -fno-warn-type-defaults #-} ------------------------------------------------------------------------------ -- | -- Module : Mahjong.Kyoku -- Copyright : (C) 2014 Samuli Thomasson -- License : MIT (see the file LICENSE) --...
SimSaladin/hajong
hajong-server/src/Mahjong/Kyoku.hs
mit
28,620
0
21
7,312
8,552
4,277
4,275
-1
-1
{-# LANGUAGE RecursiveDo #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE OverloadedLists #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE OverloadedStri...
tomsmalley/quickform
src/QuickForm/Validation.hs
mit
3,284
0
14
642
1,158
588
570
-1
-1
-- | This module contains the algorithm for determining the best possible move -- in a game of tic-tac-toe. module Minimax (findOptimalMove) where ------------------- -- Local Imports -- import Board ---------- -- Code -- -- | Accessing the third element in a 3-tuple. thd :: (a, b, c) -> c thd (_, _, c) = c -- | ...
crockeo/tic-taskell
src/Minimax.hs
mit
1,584
0
12
348
535
292
243
28
2
{-| Module : BreadU.Pages.Markup.Common.Header Description : HTML markup for pages' top area. Stability : experimental Portability : POSIX HTML markup for pages' top area. Please don't confuse it with <head>-tag, it's defined in another module. -} module BreadU.Pages.Markup.Common.Header ( commonHeader ...
denisshevchenko/breadu.info
src/lib/BreadU/Pages/Markup/Common/Header.hs
mit
4,202
0
22
1,632
847
418
429
-1
-1
module System.Flannel.BuilderTreeSpec ( spec ) where import qualified System.Flannel.Argument as A import System.Flannel.Command import System.Flannel.CommandBuilder import System.Flannel.BuilderTree import Test.Hspec spec :: Spec spec = do describe "define" $ do context "when there is no previous...
nahiluhmot/flannel
spec/System/Flannel/BuilderTreeSpec.hs
mit
2,162
0
29
1,000
508
248
260
49
4
-- | module Constraint.Term where import qualified Syntax constrain env term ty = case term of Literal lit -> Literal.constrain env lit ty
cpehle/faust
src/Constraint/Term.hs
mit
153
0
9
37
45
24
21
4
1
{-# LANGUAGE OverloadedStrings, RecordWildCards, LambdaCase, ViewPatterns, ScopedTypeVariables, NoMonomorphismRestriction #-} module Network.AWS.Connection where import qualified Prelude as P import qualified Data.List as L import System.Environment (get...
thinkpad20/s3-streams
src/Network/AWS/Connection.hs
mit
6,597
0
21
1,632
1,337
712
625
104
5
-- A module with some code to explore theorems in the monadic lambda calculus module TP where import Data.List import Data.Set (Set) import qualified Data.Set as Set import Data.Maybe import Data.Map (Map) import qualified Data.Map as Map import Data.Foldable hiding (concat,any,all) import Control.Monad.State import D...
gianlucagiorgolo/lambek-monad
TP.hs
mit
19,668
0
18
5,615
8,316
4,143
4,173
382
12
module Main where import Text.ParserCombinators.UU import Text.ParserCombinators.UU.Utils import Text.ParserCombinators.UU.BasicInstances hiding (Parser, input) import System.Console.Haskeline import System.Environment (getArgs) type Parser a = P (Str Char String LineColPos) a main :: IO () main = do args <- getAr...
chriseidhof/TimeCalc
TimeCalc.hs
mit
2,186
0
15
665
751
392
359
47
3
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} -- | Defines what each type of server does upon receiving each type of message. -- Thus, the consensus protocol is largely defined here. ...
isheff/hetcons
src/Hetcons/Receive.hs
mit
11,350
0
29
3,212
2,135
1,183
952
149
1
{-**************************************************************************** * Hamster Balls * * Purpose: Rendering code for terrains in the game * * Author: David, Harley, Alex, Matt * * ...
harley/hamball
src/Terrain.hs
mit
11,981
0
18
2,732
2,224
1,150
1,074
146
1
{-# LANGUAGE NoMonomorphismRestriction, FlexibleInstances #-} module FP.Arrow ( Arrow (..) , parse_arrow , name ) where import Autolib.TES.Identifier import Autolib.TES.Term import Autolib.TES.Position import Autolib.ToDoc import Autolib.Reader import Autolib.Size import Data.Char ( isLower ) data Arrow at = ...
Erdwolf/autotool-bonn
src/FP/Arrow.hs
gpl-2.0
2,697
23
15
848
978
501
477
74
3
{-# LANGUAGE ImplicitParams,DoRec, PatternGuards #-} module Fenfire.Main where -- Copyright (c) 2006-2007, Benja Fallenstein, Tuukka Hastrup -- This file is part of Fenfire. -- -- Fenfire is free software; you can redistribute it and/or modify it under -- the terms of the GNU General Public License as published by --...
timthelion/fenfire
Fenfire/Main.hs
gpl-2.0
33,440
0
27
12,024
8,267
4,064
4,203
-1
-1
module Css.ShowCss where import Css.CssTypes import Data.List showcss :: CssRule -> String showcss (Sel sel, decls) = intercalate " " (map (concat . map showsel) sel) ++ " { " ++ intercalate " " (map showdecl decls) ++ " }" showsel :: CssNodeSpec -> String showsel (Elem n) = n showsel (Class c) = "." ++ c showsel (I...
pbevin/toycss
src/css/ShowCss.hs
gpl-2.0
1,351
0
13
327
503
242
261
33
14
-- Copyright (c) 2015-16 Nicola Bonelli <nicola@pfq.io> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- Thi...
pfq/PFQ
user/pfq-lang/src/Lang/Parser.hs
gpl-2.0
2,419
0
16
529
570
323
247
38
1
module TransactionQb (Transaction, dummyNumber, dummyAmount, prototype, createTransaction, SalesDetail, dateFromToday, TransactionType, allSales, allPurchases, allBankingTransactions, salesRefund ) where import Data.Text (Text) import Data.Time import Data.Maybe import Test...
dservgun/haskell_test_code
src/TransactionQb.hs
gpl-2.0
4,301
0
11
770
1,222
649
573
92
1
{-# LANGUAGE MultiParamTypeClasses #-} module Brainfuck.Make -- ( computer -- , acceptor -- ) where -- $Id$ import Inter.Types import Inter.Quiz -- import Brainfuck.Property import Brainfuck.Syntax.Data import Brainfuck.Syntax.Parse import qualified Brainfuck.Machine import qualified Brainfuck.Example -- imp...
Erdwolf/autotool-bonn
src/Brainfuck/Make.hs
gpl-2.0
2,316
0
9
610
280
178
102
33
1
-- type classes -- class methods class Geometry g where area :: g -> Double perim :: g -> Double data Square = Square Double Double deriving Show data Circle = Circle Double deriving Show instance Geometry Square where area (Square w h) = w * h perim (Square w h) = 2 * w + 2 * h instance Geometry C...
solvery/lang-features
haskell/typeclass_1.hs
gpl-2.0
596
0
10
184
270
132
138
21
1
{-# LANGUAGE TemplateHaskell, RankNTypes #-} module Settings ( Settings , fromOk , strToCode, codeToStr, settingsFile, annotFile , readSettings, writeUserSettings, getCode , createSettings , get_replicates, get_counts_file, get_counts_skip, get_user_settings , get_info_columns, get_ec_colu...
Victorian-Bioinformatics-Consortium/degust
app/backend/Settings.hs
gpl-3.0
11,987
0
17
3,890
2,641
1,406
1,235
205
3
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module Ship where import Prelude hiding ((.), id) import Control.Category import Control.Concurrent import Data.Aeson import Data.Data import Data.Function hiding ((....
dflemstr/ship
Ship.hs
gpl-3.0
3,079
0
9
673
948
527
421
143
1
module Event.Default where import State import Types import Graphics.X11 import Graphics.X11.Xlib.Extras type EventHandler = Event -> X11State () defaultHandler :: EventHandler defaultHandler _ = return ()
ktvoelker/argon
src/Event/Default.hs
gpl-3.0
212
0
7
32
57
33
24
8
1
module Main where import Monitoring.Shinken.Configuration import Monitoring.Shinken.Parser import Monitoring.Shinken.Print import Data.Either import Data.List hiding (find) import System.Directory import System.Environment im...
Taeradan/shinken-config-graph
src/Main.hs
gpl-3.0
1,565
0
14
513
408
205
203
40
2
module WebParsing.ArtSciParser (parseArtSci, getDeptList, fasCalendarURL) where import Data.Either (either) import Data.List (elemIndex) import Control.Monad.IO.Class (liftIO) import qualified Data.Text as T import Data.Text.Lazy (toStrict) import Data.Text.Lazy.Encoding (decodeUtf8) import Text.Parsec (count, man...
hermish/courseography
app/WebParsing/ArtSciParser.hs
gpl-3.0
7,169
0
19
1,762
1,904
1,006
898
116
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-datafusion/gen/Network/Google/Resource/DataFusion/Projects/Locations/Instances/Delete.hs
mpl-2.0
5,039
0
15
1,075
697
408
289
103
1
-- This file is part of purebred -- Copyright (C) 2017-2020 Fraser Tweedale and Róman Joost -- -- purebred is free software: you can redistribute it and/or modify -- it under the terms of the GNU Affero General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- (at yo...
purebred-mua/purebred
src/Purebred/UI/Utils.hs
agpl-3.0
1,900
0
7
333
228
127
101
26
0
{-# OPTIONS_GHC -fno-warn-orphans #-} module Application ( getApplicationDev , appMain , develMain , makeFoundation , makeLogWare -- * for DevelMain , getApplicationRepl , shutdownApp -- * for GHCI , handler , db ) where import Control.Monad.Logger (liftL...
Lasokki/omanet
Application.hs
agpl-3.0
7,053
0
13
1,792
1,071
575
496
-1
-1
-- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } func :: ((a))
lspitzner/brittany
data/Test361.hs
agpl-3.0
128
0
6
14
13
8
5
1
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternGuards #-} module Main where import Control.Concurrent (threadDelay) import Control.Monad.Random () import Control.Monad.Trans.Maybe import Data.BotConfig import Data.ByteString.Char8 (ByteString) import Data.Maybe import Data.Monoid import Data.Response import Ne...
tsahyt/lmrbot
src/Main.hs
agpl-3.0
4,349
0
16
1,238
1,364
683
681
124
1
module Data.Geo.OSM.Xapi.Lens.NoteL where import Data.Lens.Common import Data.Geo.OSM.Xapi.Note class NoteL a where noteL :: Lens a Note
liesen/osm-xapi
src/Data/Geo/OSM/Xapi/Lens/NoteL.hs
lgpl-3.0
141
0
7
20
43
27
16
5
0
{-# LANGUAGE ExistentialQuantification, TypeFamilies, GADTs, RankNTypes, ScopedTypeVariables, DeriveDataTypeable, StandaloneDeriving, MultiParamTypeClasses, FlexibleInstances #-} {-# LANGUAGE DeriveFunctor #-} -- Ba...
alanz/haxl-play
src/main.hs
unlicense
12,779
11
21
2,849
2,765
1,443
1,322
214
5
{- - Module to parse Lisp - - - Copyright 2013 -- name removed for blind review, all rights reserved! Please push a git request to receive author's name! -- - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of...
DatePaper616/code
lispParser.hs
apache-2.0
3,029
0
19
611
909
470
439
30
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} module Lycopene.Web.Api where import Servant import Lycopene.Application (AppEngine) import Lycopene.Web.Trans (lyco) import Lycopene.Web.Request import qualified Lycopene.Core as Core ...
utky/lycopene
src/Lycopene/Web/Api.hs
apache-2.0
2,660
0
14
540
864
435
429
67
2
-- | -- Common Data Types -- -- <https://docs.oasis-open.org/security/saml/v2.0/saml-core-2.0-os.pdf saml-core-2.0-os> §1.3 module SAML2.Core.Datatypes where import Prelude hiding (String) import qualified SAML2.XML.Schema.Datatypes as XS -- |§1.3.1 type XString = XS.String -- |§1.3.2 type AnyURI = XS.AnyURI -- |§1....
dylex/hsaml2
SAML2/Core/Datatypes.hs
apache-2.0
420
0
5
56
75
53
22
8
0
{-# LANGUAGE TemplateHaskell, DeriveFunctor #-} {-| Some common Ganeti types. This holds types common to both core work, and to htools. Types that are very core specific (e.g. configuration objects) should go in 'Ganeti.Objects', while types that are specific to htools in-memory representation should go into 'Ganeti....
ganeti-github-testing/ganeti-test-1
src/Ganeti/Types.hs
bsd-2-clause
32,269
0
11
6,330
7,437
4,189
3,248
659
2
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QStyleOptionFrameV2.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:21 Warning : this file is machine generate...
uduki/hsQt
Qtc/Gui/QStyleOptionFrameV2.hs
bsd-2-clause
3,434
0
12
463
761
401
360
-1
-1
{-# LANGUAGE RankNTypes, DeriveTraversable #-} -- | -- Module : Data.Map.Justified.Tutorial -- Copyright : (c) Matt Noonan 2017 -- License : BSD-style -- Maintainer : matt.noonan@gmail.com -- Portability : portable -- -- = Description -- -- The examples below demonstrate how to use the types and functi...
matt-noonan/justified-containers
src/Data/Map/Justified/Tutorial.hs
bsd-2-clause
12,739
0
23
3,078
1,244
752
492
59
3