code
stringlengths
5
1.03M
repo_name
stringlengths
5
90
path
stringlengths
4
158
license
stringclasses
15 values
size
int64
5
1.03M
n_ast_errors
int64
0
53.9k
ast_max_depth
int64
2
4.17k
n_whitespaces
int64
0
365k
n_ast_nodes
int64
3
317k
n_ast_terminals
int64
1
171k
n_ast_nonterminals
int64
1
146k
loc
int64
-1
37.3k
cycloplexity
int64
-1
1.31k
{-# OPTIONS_GHC -F -pgmF htfpp #-} {-# Language TemplateHaskell #-} module TestLabyrinth.ShowMove (htf_thisModulesTests) where import Labyrinth import Control.Applicative import Control.Monad import Data.DeriveTH import Test.Framework import TestLabyrinth.Common test_show_move = do assertShowEquals "skip" $ ...
koterpillar/labyrinth
testsuite/TestLabyrinth/ShowMove.hs
mit
5,445
0
13
1,669
1,377
643
734
131
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module Main where import System.FilePath import System.Directory import SiteArchiver.DataStore import SiteArchiver.Types import SiteArchiver.JobRunner import Network.Wai.Middleware.Static import Control.Monad.IO.Class import Network.URI import Ne...
iansullivan88/site-archiver
src/SiteArchiver.hs
mit
4,023
0
18
789
1,256
620
636
89
2
module StrProc where -- 1 notThe :: String -> Maybe String notThe "the" = Nothing notThe s = Just s replaceThe :: String -> String replaceThe = unwords . replaceThe' . words replaceThe' :: [String] -> [String] replaceThe' [] = [] replaceThe' (x:xs) | x == "the" = "a" : replaceThe' xs | otherwise = x : r...
ashnikel/haskellbook
ch12/ch12.5_string_processing.hs
mit
869
0
10
174
327
168
159
26
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpool-deviceconfiguration.html module Stratosphere.ResourceProperties.CognitoUserPoolDeviceConfigu...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/CognitoUserPoolDeviceConfiguration.hs
mit
2,593
0
12
205
264
151
113
27
1
-- Unique digit sequence -- https://www.codewars.com/kata/599688d0e2800dda4e0001b0 module Codewars.UniqueSeries (findNum) where import Data.List (delete, intersect) import Data.Function (on) findNum :: Int -> Integer findNum = (series !!) series = 0 : f 0 [1..] where f n xs = let x = head . filter (null . (inte...
gafiatulin/codewars
src/Beta/UniqueSeries.hs
mit
370
0
18
68
141
78
63
7
1
module Language.Haskell.HsColour.Options ( Option(..) , Output(..) , TerminalType(..) ) where {-@ LIQUID "--totality" @-} import Language.Haskell.HsColour.Output -- | Command-line options data Option = Help -- ^ print usage message | Version -- ^ report version | Information -- ^ report auxiliary...
nikivazou/hscolour
Language/Haskell/HsColour/Options.hs
gpl-2.0
730
0
6
155
101
70
31
17
0
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE TupleSections #-} {-# OPTIONS_GHC -fno-warn-type-defaults #-} ----------------------------------------------------------------------------- -- -- Module : Main -- Copyright : 2007-2011 Juergen Nickl...
JPMoresmau/leksah-server
main/Collector.hs
gpl-2.0
15,355
0
27
6,051
3,514
1,802
1,712
275
13
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-} -- | Korrekturfunktion für Faktorisierung -- joe@informatik.uni-leipzig.de -- benutzt code für challenger/PCProblem -- von Markus Kreuz mai99byv@studserv.uni-leipzig.de module Faktor.Faktor ( make_fixed , make_quiz ) where -- $Id$ import Ch...
Erdwolf/autotool-bonn
src/Faktor/Faktor.hs
gpl-2.0
2,051
22
13
596
573
307
266
45
1
module SelectionProblem where import Control.Applicative import Data.List (nub) import Test.QuickCheck (<&>) :: Functor f => f a -> (a -> b) -> f b (<&>) = flip fmap -- X and Y are two DISJOINT sets of elements -- (size X + size Y) > k -- compute: k-th smallest element of X `union` Y -- k-th smallest: exactly k ele...
markus1189/PearlsFAD
src/SelectionProblem.hs
gpl-3.0
2,153
0
14
530
804
432
372
33
2
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TupleS...
taktoa/TSLogAnalyzer
library/Utility/TSLogAnalyzer/BiMultiMap.hs
gpl-3.0
2,757
0
15
864
822
440
382
46
2
{- mtlstats Copyright (C) 1984, 1985, 2019, 2020, 2021 Rhéal Lamothe <rheal.lamothe@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) an...
mtlstats/mtlstats
test/TypesSpec.hs
gpl-3.0
31,467
0
24
9,673
9,436
5,067
4,369
-1
-1
-- | Functions for calculating aggregates (total cleansheets, total goal-less draws, etc.) module Anorak.Aggregates (getAggregateTables) where import Anorak.Results import Data.List(foldl', sortBy) import Data.Map(Map, (!)) import qualified Data.Map as Map(fromList, map, mapWithKey, toList) -- | The supported aggrega...
dwdyer/anorak
src/haskell/Anorak/Aggregates.hs
gpl-3.0
2,700
0
9
569
751
411
340
33
5
{-# LANGUAGE TemplateHaskell #-} module Tic.Level where import ClassyPrelude import Control.Lens (makePrisms) newtype Level = Level Int deriving(Show) $(makePrisms ''Level)
pmiddend/tic
lib/Tic/Level.hs
gpl-3.0
197
0
8
44
47
27
20
6
0
----------------------------------------------------------------------------- -- | -- Module : Data.Unique -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries@haskell.org -- Stability : experimental -- Portabilit...
kaoskorobase/mescaline
resources/hugs/packages/base/Data/Unique.hs
gpl-3.0
1,670
0
11
313
212
126
86
19
1
{-| Module : Craeft.Driver Description : Driving the compiler: compiling LLVM @Module@s to output files. Copyright : (c) Ian Kuehne, 2017 License : GPL-3 Maintainer : ikuehne@caltech.edu Stability : experimental -} module Craeft.Driver ( compileToObject , compileToLlvm ) where impor...
ikuehne/craeft-hs
lib/Craeft/Driver.hs
gpl-3.0
1,347
0
11
325
235
129
106
21
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-books/gen/Network/Google/Resource/Books/Familysharing/Share.hs
mpl-2.0
5,218
0
20
1,300
872
505
367
120
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-healthcare/gen/Network/Google/Resource/Healthcare/Projects/Locations/DataSets/DicomStores/List.hs
mpl-2.0
8,688
0
19
1,848
985
579
406
146
1
{-#LANGUAGE OverloadedStrings#-} module Data.P440.XML.Instances.BVS where import qualified Data.P440.Domain.BVS as BVS import Data.P440.Domain.SimpleTypes import Data.P440.Domain.ComplexTypes import Data.P440.XML.XML import qualified Data.P440.XML.Instances.ComplexTypes as C import qualified Data.P440.XML.Instances.C...
Macil-dev/440P-old
src/Data/P440/XML/Instances/BVS.hs
unlicense
6,132
0
10
1,724
3,179
1,603
1,576
98
0
data Day = Monday | Tuesday | Wednesday | Thursday | Friday | Saturday | Sunday deriving (Eq, Ord, Show, Read, Bounded, Enum) day = Monday
SPbAU-ProgrammingParadigms/materials
haskell_2/Days.hs
unlicense
151
1
6
38
61
33
28
3
1
{-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-warn-unused-do-bind #-} import Data.FileEmbed import Graphics.UI.Gtk import Data.ByteString.UTF8 main :: IO () main = do initGUI builder <- builderNew --builderAddFromFile builder "gtk-hello.ui" -- use this for designing the UI builderAddFromStri...
dysinger/gtk-hello
Main.hs
apache-2.0
943
0
13
166
209
95
114
22
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE TemplateHaskell #-} {- - Copyright (c) 2015, Peter Lebbing <peter@digitalbrains.com> - 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. Redistrib...
DigitalBrains1/clash-lt24
LT24/LT24.hs
bsd-2-clause
9,764
0
12
2,896
1,122
668
454
75
6
module Data.Drasil.SI_Units where import Language.Drasil import Language.Drasil.ShortHands (cOmega) fundamentals :: [UnitDefn] fundamentals = [metre, kilogram, second, kelvin, mole, ampere, candela] derived :: [UnitDefn] derived = [becquerel, calorie, centigrade, coulomb, farad, gray, henry, hertz, joule, katal, k...
JacquesCarette/literate-scientific-software
code/drasil-data/Data/Drasil/SI_Units.hs
bsd-2-clause
4,814
0
13
948
1,430
801
629
95
1
{-# LANGUAGE OverloadedStrings #-} module Main where --import System.Console.GetOpt import System.Environment import Control.Applicative ((<$>)) import Control.Monad import qualified Crypto.PubKey.RSA as RSA (generate) import qualified Crypto.PubKey.RSA.PSS as RSA (sign, verify, defaultPSSParamsSHA1) import Data.Certi...
vincenthz/cabal-signature
Src/Main.hs
bsd-3-clause
3,390
0
17
1,025
904
468
436
77
5
{-# OPTIONS_GHC -fno-cse #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Main (main) where import Data.ByteString.Char8 (pack) import Data.Version (showVersion) import Database.PostgreSQL.Simple import Paths_hurling (version) import System.Console.CmdA...
noteed/hurling
bin/hurling.hs
bsd-3-clause
2,596
0
14
561
590
313
277
77
2
module Language.LambdaCalculus.AST.Term ( Info(..) , Term(..) ) where data Term = TmVar Info Int Int | TmAbs Info String Term | TmApp Info Term Term deriving (Show) data Info = Info { row :: Int, col :: Int } instance Show Info where show (Info r c) = "(" ++ show r ++ "," ++ show c ++ ")"
kseo/untyped
src/Language/LambdaCalculus/AST/Term.hs
bsd-3-clause
311
0
10
80
129
73
56
11
0
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE OverloadedStrings #-} module Types where import Data.Aeson import Data.ByteString (ByteString) import Data.ByteString.Char8 (unpack) import Data.Map.Strict (Map) import Data.Text.Encodin...
chemist/series-storage
src/Types.hs
bsd-3-clause
2,737
0
15
724
814
456
358
70
1
{-# LANGUAGE OverloadedStrings #-} module Test where import Text.XmlHtml import qualified Data.Text.IO as T import qualified Text.XmlHtml as X import qualified Data.ByteString as B import Xml.XPath main :: IO () main = do file <- B.readFile "data/test.html" let parsed = case parser thePath ...
silkapp/xmlhtml-xpath
src/Test.hs
bsd-3-clause
918
0
16
217
217
107
110
24
3
module Data.Cmm.AnnotatedSpec where import Test.Hspec import Data.Cmm.Parser import TestPrograms import Data.CFG import Anal import Text.Pretty import Data.Cmm.AST import qualified Data.Map.Lazy as LM import Data.Cmm.Annotated main :: IO () main = hspec spec cfgs :: [(String,(CFG,Program))] cfgs = map (\(n,p) -> (n...
adamschoenemann/asa-analysis
test/Data/Cmm/AnnotatedSpec.hs
bsd-3-clause
963
0
14
202
345
181
164
31
1
{-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE PatternGuards #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Distributed.Process.ManagedProcess.Server -- Copyright : (c) Tim Watson 201...
haskell-distributed/distributed-process-client-server
src/Control/Distributed/Process/ManagedProcess/Server.hs
bsd-3-clause
25,322
0
16
6,396
4,876
2,645
2,231
371
3
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DataKinds #-} module React.Flux.Mui.List.ListItem where import Protolude import Data.Aeson import Data.Aeson.Casing import Data.String (String) import React.Flux import React.Flux.Mui.Types import React.Flux.Mui.Util data ListItem = List...
pbogdan/react-flux-mui
react-flux-mui/src/React/Flux/Mui/List/ListItem.hs
bsd-3-clause
1,615
0
15
258
436
243
193
65
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeSynonymInstances #-} -- | -- Module : Game.Slaughterhouse.Agnostic -- Description : Implementation-agnostic chess things. -- Copyright : 2014, Peter Harpending. -- License : BSD3 -- Maintainer : Peter Harpending <ph...
pharpend/slaughterhouse
src/Game/Slaughterhouse/Agnostic.hs
bsd-3-clause
2,950
0
11
765
628
342
286
67
1
-- Example of using digitalWrite. -- Run with LEDs connected to wiringPi pins 0-7: -- https://www.flickr.com/photos/107479024@N04/31360240974/ -- Blinks the LEDs in sequence: -- https://www.flickr.com/photos/107479024@N04/32070893472/ -- Compatible with the hs-wiringPi test board. -- https://github.com/ppelleti/h...
ppelleti/hs-wiringPi
examples/output-example.hs
bsd-3-clause
1,038
0
11
162
113
62
51
10
1
-- #hide ----------------------------------------------------------------------------- -- | -- Module : Language.Haskell.ParseMonad -- Copyright : (c) The GHC Team, 1997-2000 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries@haskell.org -- Stability : experime...
FranklinChen/hugs98-plus-Sep2006
packages/haskell-src/Language/Haskell/ParseMonad.hs
bsd-3-clause
7,342
182
20
1,690
2,308
1,249
1,059
122
2
module Network.VPN.Pocket.SimpleServer where import Network.BSD import Network.Socket hiding (recvFrom,sendTo) import Network.Socket.ByteString import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as BL import Control.Monad import Control.Concurrent import Control.Concurrent.Chan import Data.May...
junjihashimoto/pocket-vpn
Network/VPN/Pocket/SimpleServer.hs
bsd-3-clause
2,092
0
23
475
720
369
351
59
2
-- |Test the view layer - that the output data is converted to strings as specified module RenderTests where import Geometry import Environment import Render import Controller import Test.HUnit aRover = RoverPos (2,3) N -- |Tests rendered 'RoverResult' meets specification testRenderResult :: Test testRenderResult =...
garethrowlands/marsrover
test/RenderTests.hs
bsd-3-clause
1,566
0
14
347
250
140
110
33
1
----------------------------------------------------------------------------- -- | -- Module : Plugins.PipeReader -- Copyright : (c) Andrea Rossato -- License : BSD-style (see LICENSE) -- -- Maintainer : Jose A. Ortega Ruiz <jao@gnu.org> -- Stability : unstable -- Portability : unportable -- -- A pl...
raboof/xmobar
src/Plugins/PipeReader.hs
bsd-3-clause
791
0
11
161
136
75
61
11
0
{-# LANGUAGE PackageImports #-} module Control.Monad.ST.Lazy.Safe (module M) where import "base" Control.Monad.ST.Lazy.Safe as M
silkapp/base-noprelude
src/Control/Monad/ST/Lazy/Safe.hs
bsd-3-clause
134
0
4
18
27
21
6
3
0
----------------------------------------------------------------------------- -- | -- Module : System.Handle.String -- Copyright : 2011 Kei Hibino -- License : BSD3 -- -- Maintainer : ex8k.hibino@gmail.com -- Stability : experimental -- Portability : non-portable (requires POSIX) -- -- This package inclu...
khibino/haskell-data-handle
System/Handle/Enumerator.hs
bsd-3-clause
2,047
0
14
348
467
256
211
33
1
----------------------------------------------------------------------------- -- | -- Module : ForSyDe.Shallow.Core.Signal -- Copyright : (c) ForSyDe Group, KTH 2007-2008 -- License : BSD-style (see the file LICENSE) -- -- Maintainer : forsyde-dev@ict.kth.se -- Stability : experimental -- Portability : ...
forsyde/forsyde-shallow
src/ForSyDe/Shallow/Core/Signal.hs
bsd-3-clause
6,787
0
12
1,784
2,015
1,077
938
114
3
{-# LANGUAGE ExistentialQuantification, GeneralizedNewtypeDeriving #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-| This is the core module of Elerea, which contains the signal implementation and the atomic constructors. The basic idea is to create a dataflow network whose structure closely resembles the user's ...
cabrera/elerea
FRP/Elerea/Legacy/Internal.hs
bsd-3-clause
24,182
0
27
7,560
6,184
3,068
3,116
280
14
----------------------------------------------------------------------------- -- | -- Module : Berp.Base.SemanticTypes -- Copyright : (c) 2010 Bernie Pope -- License : BSD-style -- Maintainer : florbitous@gmail.com -- Stability : experimental -- Portability : ghc -- -- The core types used to represent the...
bjpop/berp
libs/src/Berp/Base/SemanticTypes.hs
bsd-3-clause
6,523
0
13
1,472
1,404
804
600
209
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeOperators #-} module Lib ( startServer ) where import Control.Monad.IO.Class (liftIO) import Data.Aeson (ToJSON) import GHC.Generics ...
rubenmoor/sf-servant-tutorial
src/Lib.hs
bsd-3-clause
1,246
0
8
366
280
168
112
33
1
module ZhinaDNS where import qualified Resolve.Types as R import Resolve.DNS.Types hiding (Query, Response) import Resolve.DNS.Lookup hiding (Config) import qualified IPSet import qualified NameSet import Control.Monad import Control.Monad.Trans.Except import Control.Concurrent import Control.Exception import Contro...
riaqn/zhina-dns
src/ZhinaDNS.hs
bsd-3-clause
2,543
0
28
997
704
349
355
59
7
{-# LANGUAGE ForeignFunctionInterface #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Elem.LAPACK.Zomplex -- Copyright : Copyright (c) , Patrick Perry <patperry@stanford.edu> -- License : BSD3 -- Maintainer : Patrick Perry <patperry@stanford.edu> -- Stabi...
patperry/lapack
lib/Data/Elem/LAPACK/Zomplex.hs
bsd-3-clause
1,353
0
18
271
359
183
176
18
0
{-# LANGUAGE CPP #-} {-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FunctionalDependencies #-} module Control.Monad.UnionFind.Class ( MonadUnionFind (..) , contents ) where import Contr...
sonyandy/wart
src/Control/Monad/UnionFind/Class.hs
bsd-3-clause
2,311
0
13
535
931
497
434
55
1
module FruitShopKata.Day3Spec (spec) where import Test.Hspec import FruitShopKata.Day3 (process) spec :: Spec spec = do it "should add product" $ do process ["Pommes"] `shouldBe` [100] it "should sum up cost of products" $ do process ["Pommes", "Bananes", "Ceri...
Alex-Diez/haskell-tdd-kata
old-katas/test/FruitShopKata/Day3Spec.hs
bsd-3-clause
353
0
12
101
104
58
46
9
1
module HarmLang.Interpreter where import HarmLang.Parser import HarmLang.Types import HarmLang.InitialBasis import Text.ParserCombinators.Parsec --In addition to compile time code, here functionality to interpret strings at runtime (with identical parse semantics) is provided. --These are typed functions that cause...
lrassaby/harmlang
src/HarmLang/Interpreter.hs
mit
2,443
0
11
449
555
280
275
50
2
{-# OPTIONS -fno-warn-missing-signatures #-} module Distribution.Client.Mirror.Config ( MirrorConfig(..) , PreRepo(..) , readMirrorConfig ) where -- stdlib import Distribution.Server.Prelude import Data.Char (isSpace) import Network.URI (URI) import Text.Parsec import Text.Parsec.Language (haskellStyle) imp...
edsko/hackage-server
Distribution/Client/Mirror/Config.hs
bsd-3-clause
4,460
0
12
1,209
963
527
436
87
2
{- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section[RnSource]{Main pass of renamer} -} {-# LANGUAGE ScopedTypeVariables #-} module ETA.Rename.RnSource ( rnSrcDecls, addTcgDUs, rnTyClDecls, findSplice ) where -- import {-# SOURCE #-} ETA.Rename.RnExpr( rnLExpr ) import ETA.Rename.RnExpr...
pparkkin/eta
compiler/ETA/Rename/RnSource.hs
bsd-3-clause
70,291
5
25
21,759
14,296
7,607
6,689
846
4
-- | Provide help information -- {-# LANGUAGE OverloadedStrings #-} module NumberSix.Handlers.Help ( handler ) where import NumberSix.Irc import NumberSix.Bang handler :: UninitializedHandler handler = makeBangHandler "Help" ["!help"] $ const $ return $ "Documentation can be found at http://github.com/jas...
itkovian/number-six
src/NumberSix/Handlers/Help.hs
bsd-3-clause
339
0
9
53
55
33
22
8
1
{-# LANGUAGE CPP, GeneralizedNewtypeDeriving #-} -- | Breadth first search algorithms. module Game.LambdaHack.Client.Bfs ( BfsDistance, MoveLegal(..), apartBfs , fillBfs, findPathBfs, accessBfs #ifdef EXPOSE_INTERNAL -- * Internal operations , minKnownBfs #endif ) where import Control.Exception.Assert.Suga...
Concomitant/LambdaHack
Game/LambdaHack/Client/Bfs.hs
bsd-3-clause
7,480
0
24
2,433
1,666
902
764
-1
-1
{- (c) The University of Glasgow 2006 (c) The AQUA Project, Glasgow University, 1998 Desugaring foreign declarations (see also DsCCall). -} {-# LANGUAGE CPP #-} module DsForeign ( dsForeigns , dsForeigns' , dsFImport, dsCImport, dsFCall, dsPrimCall , dsFExport, dsF...
green-haskell/ghc
compiler/deSugar/DsForeign.hs
bsd-3-clause
31,366
0
26
10,594
5,935
3,064
2,871
-1
-1
-- | a simple type that only lets an IO action happen once, caching its result. module Util.Once( Once, newOnce, runOnce, altOnce, OnceMap, newOnceMap, runOnceMap, altOnceMap, onceMapToList, onceMapKeys, onceMapElems ) where import qualified Data.Map as Map import Da...
m-alvarez/jhc
src/Util/Once.hs
mit
2,267
0
15
712
839
404
435
73
2
module X foo :: int -> int foo 1 = 1 foo 2 = 2
john-difool/pfff
tests/hs/foo.hs
lgpl-2.1
48
1
5
16
29
15
14
-1
-1
{-# LANGUAGE NoMonoPatBinds #-} -- Disable experimetal monomorphic pattern bindings -- Nasty test for type signatures -- In both groups of declarations below, the type variables 'a' and 'b' -- end up being unified together. module ShouldCompile where ------------- x :: a x = z `asTypeOf` y y :: b y ...
snoyberg/ghc
testsuite/tests/typecheck/should_compile/tc189.hs
bsd-3-clause
451
0
6
115
123
79
44
13
1
{-# LANGUAGE Unsafe #-} {-# LANGUAGE CPP, NoImplicitPrelude #-} ----------------------------------------------------------------------------- -- | -- Module : Foreign.Marshal -- Copyright : (c) The FFI task force 2003 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : ffi@...
beni55/haste-compiler
libraries/ghc-7.8/base/Foreign/Marshal.hs
bsd-3-clause
1,878
0
6
344
69
51
18
11
1
module Main (main) where import Data.Char (digitToInt, lexLitChar, readLitChar) main :: IO () main = do putStrLn (show $ readLitChar "A") putStrLn (show $ readLitChar "'A'") putStrLn (show $ lexLitChar "A") putStrLn (show $ lexLitChar "'A'")
beni55/ghcjs
test/pkg/base/readLitChar.hs
mit
270
0
10
64
104
52
52
8
1
{-# LANGUAGE ViewPatterns #-} {-# LANGUAGE OverloadedStrings #-} module Main where import Data.String -- {{{ Num literals newtype N = N Int deriving (Show,Eq) instance Num N where fromInteger 0 = error "0" fromInteger 1 = N 0 fromInteger _ = N 1 f x = case x of 1 -> False 0 -> True g x = case ...
urbanslug/ghc
testsuite/tests/deSugar/should_run/T3126.hs
bsd-3-clause
929
0
11
339
347
176
171
36
3
{-# htermination (esLtLt :: (a -> Maybe b) -> Maybe a -> Maybe b) #-} import qualified Prelude data MyBool = MyTrue | MyFalse data List a = Cons a (List a) | Nil data Maybe a = Nothing | Just a ; gtGtEsMaybe :: Maybe c -> (c -> Maybe b) -> Maybe b gtGtEsMaybe (Just x) k = k x; gtGtEsMaybe Nothing k = ...
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/EQLTLT_1.hs
mit
415
0
9
112
157
84
73
9
1
-- Copyright (c) Microsoft. All rights reserved. -- Licensed under the MIT license. See LICENSE file in the project root for full license information. {-# LANGUAGE QuasiQuotes, OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-| Copyright : (c) Microsoft License : MIT Maintainer : adamsap@microsoft...
upsoft/bond
compiler/src/Language/Bond/Codegen/Util.hs
mit
3,030
0
8
529
382
235
147
28
1
import Enumerate() import Criterion.Main import Prelude main = defaultMain [ bgroup "Enumerate" [ bench "1" $ nf length [1 .. 1000::Int] , bench "2" $ whnf length [1 .. 1000::Int] ] ]
sboosali/enumerate
enumerate-function/benchmarks/Bench.hs
mit
204
0
11
52
79
43
36
7
1
{-# LANGUAGE OverloadedStrings #-} module Middleware.SimpleAuth (headerAuth) where import qualified Data.ByteString as BS (ByteString) import qualified Data.CaseInsensitive as CI (mk) import Network.HTTP.Types (status401) import Network.HTTP.Types.Header (hContentType) import Network...
keveri/anhyzer-api
src/Middleware/SimpleAuth.hs
mit
787
0
10
161
204
117
87
19
3
{-# LANGUAGE DataKinds #-} module Main where import Criterion.Main import Data.Int import Data.Ord import Data.List import Executor import Cpu.Instruction main :: IO () main = defaultMain [ bgroup "exec" [ bench "1" $ whnf execute 0x00 ] ]
wayofthepie/emu-mos-6502
bench/Main.hs
mit
273
0
10
71
74
41
33
13
1
module Network.Wai.Middleware.Session.Stateless.Types where import Data.ByteString (ByteString) type ParameterValidator = ByteString -> Bool type ParametersValidator = ByteString -> Bool
NerdGGuy/wai-middleware-session-stateless
src/Network/Wai/Middleware/Session/Stateless/Types.hs
mit
189
0
5
20
40
26
14
4
0
{-# LANGUAGE TemplateHaskell #-} module KNXd.Client.Internal.Types where import Data.Bits import Data.ByteString (ByteString) import Data.Typeable import Data.Word import Data.Singletons.TH import Text.Printf -- |APDUs have structure, too. But we're approximating them as ByteStrings for now. type APDU = ByteString s...
KaneTW/knxd-native-client
src/KNXd/Client/Internal/Types.hs
mit
7,869
0
11
1,401
1,865
974
891
-1
-1
import Prelude hiding (signum) {- signum :: Integral a => a -> Int signum x = if x < 0 then -1 else if x > 0 then 1 else 0 -} signum :: Integral a => a -> Int signum 0 = 0 signum n | n < 0 = -1 | otherwise = 1
fmi-lab/fp-elective-2017
exercises/11/signum.hs
mit
242
1
8
88
62
32
30
6
1
{-# LANGUAGE CPP #-} {-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} #ifndef NO_OVERLAP {-# LANGUAGE OverlappingInstances #-} #endif module Database.Persist.Sql.Class ( MonadSqlPersist (..) , RawSql (..) , Persist...
gbwey/persistentold
persistent/Database/Persist/Sql/Class.hs
mit
11,799
0
17
2,909
4,154
2,346
1,808
-1
-1
lucky :: Int -> String lucky 7 = "Seven" lucky x = "Sorry, you are out of luck." factorial :: Int -> Int factorial 0 = 1 factorial n = n * factorial (n - 1) addVectors :: (Double, Double) -> (Double, Double) -> (Double, Double) addVectors a b = (fst a + fst b, snd a + snd b) addVectors2 :: (Double, Double) -> (Doubl...
v0lkan/learning-haskell
number.hs
mit
1,184
0
9
275
590
324
266
29
1
module Main where import Forensics main :: IO () main = do input <- parseForensicsFromFile "input.txt" case input of Left err -> error (show err) Right sues -> print $ findSue partOneCriteria sues
corajr/adventofcode2015
16/app/Main.hs
mit
211
0
12
47
75
36
39
8
2
trace("helloworld"); FlxG.log.add("log: helloworld, hell yeah"); function testCreateFunction() { trace("testCreateFunction"); FlxG.log.add("testCreateFunction"); } function testUpdateFunction(elapsed) { if (FlxG.keys.pressed.D) { player.x += 5; } if (FlxG.keys.pressed.A) { ...
kgs0142/AnotherLibrary
assets/data/script/config.hs
mit
487
14
11
149
167
93
74
-1
-1
-------------------------------------------------------------------------------- -- | Unbounded FIFO channel for sessions {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleContexts #-} module Web.SocketIO.Channel ( newGlobalChannel , newLogChannel , streamToHandle , streamBothChannelTo ...
banacorn/socket.io-haskell
Web/SocketIO/Channel.hs
mit
3,320
0
17
753
530
283
247
45
3
module Types where import qualified Aws import qualified Aws.Core import qualified Aws.Sqs as Sqs import Aws.Sqs.Core hiding (sqs) import Control.Monad import Control.Monad.IO.Class import Control.Monad.Trans.Reader import qualified Data.Text ...
5outh/sqs-example
src/Types.hs
mit
827
0
10
237
200
123
77
26
0
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Configuration ( Config(..), ConfigM(..), getConfig, ) where import Control.Monad.IO.Class (MonadIO) import Control.Monad.Reader (MonadReader, ReaderT) import Database import Workqueue data Config = Config { workqueue :: Workqueue , datab...
keithduncan/chatterbox
src/common/Configuration.hs
mit
602
0
8
154
145
89
56
17
1
{- CIS 194 HW 10 due Monday, 1 April -} module Cis194.Spring13.HW10.AParser where import Control.Applicative import Data.Char -- A parser for a value of type a is a function which takes a String -- represnting the input to be parsed, and succeeds or fails; if it -- succeeds, it returns the parsed value along wit...
tylerjl/cis194
library/Cis194/Spring13/HW10/AParser.hs
mit
3,131
0
13
775
723
395
328
39
2
{-# LANGUAGE TemplateHaskell #-} module Gx.Data.Window where import Control.Lens data WindowState = WindowFloating | WindowFullscreen deriving (Show) data Window = Window { _windowName :: String , _windowPosition :: (Int, Int) , _windowSize :: (Int, Int) , _windowState :: WindowState } defWindow :: Wind...
andgate/GXK
src/Gx/Data/Window.hs
gpl-2.0
489
0
9
96
131
82
49
18
1
{-# LANGUAGE FlexibleContexts , OverloadedStrings #-} module Cabal where import Cabal.Types import Cabal.Deprecated import Cabal.Docs import Cabal.Distros import Cabal.Uploaded import Cabal.Versions import Schema import Schema.Types import Imports hiding (requestHeaders, responseStatus, author) import ...
athanclark/happ-store
src/Cabal.hs
gpl-3.0
9,714
0
26
3,382
2,516
1,287
1,229
204
5
module Main where collatzLen :: Int->Int collatzLen x = length (listaGeradora x) listaGeradora :: Int -> [Int] listaGeradora x = lista where lista = (collatz x) : prox lista prox (x:resto) | x == 1 = [] | otherwise = (collatz x) : prox resto collatz::Int->Int collatz x | x `mod` 2...
llscm0202/BIGDATA2017
ATIVIDADE1/exerciciosListas/ex7.hs
gpl-3.0
410
0
10
117
202
102
100
16
1
{-# LANGUAGE OverloadedStrings #-} module Tidal.Inputs where import Sound.Tidal.Pattern import Sound.Tidal.Core import Sound.Tidal.ParseBP import Sound.Tidal.Core import Sound.Tidal.Params import Sound.Tidal.Control import Sound.Tidal.UI import Weigh columns :: Weigh () columns = setColumns [Case, Allocated, Max,...
d0kt0r0/Tidal
bench/Memory/Tidal/Inputs.hs
gpl-3.0
1,768
6
15
385
722
391
331
59
1
{-# LANGUAGE ScopedTypeVariables #-} import Control.Exception import qualified Data.ByteString as BS import Data.ByteString.Internal import Foreign.C.Error import Foreign.C.Types import Foreign.ForeignPtr.Safe import System.Directory import System.Environment import System.FilePath.Posix hiding ((</>)) import System.F...
nilcons/PrefetchFS
misc/CacheFS.hs
gpl-3.0
5,231
0
18
1,337
1,720
864
856
117
2
{-# LANGUAGE OverloadedStrings #-} module Logic.ETree where import Prelude hiding (FilePath) import Types.Base import Types.ETree import Types.EState import Types.AppConfig(Config(..)) import qualified Types.Brick as B import qualified Adapter.ETree as ETree import qualified Adapter.Entry as Entry import Logic.Tree...
diegospd/pol
src/Logic/ETree.hs
gpl-3.0
1,946
0
12
499
573
317
256
42
1
{-# LANGUAGE Arrows #-} -- | This module defines game blocks. -- -- Objects are represented as Signal Functions as well ('ObjectSF'). In this -- game we are introducing a novel construct, named 'AliveObject' in this -- a particular instance of a 'ListSF'. A 'ListSF' is a signal function that -- can die, or can prod...
keera-studios/pang-a-lambda
src/Game/Objects/Blocks.hs
gpl-3.0
11,646
6
19
4,401
2,376
1,349
1,027
182
3
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} import qualified Codec.Zlib as Zlib import Control.Applicative import Control.DeepSeq -- import qualified Control.Foldl as Foldl import ...
wavewave/lhc-analysis-collection
heavyhiggs/lhcoparser.hs
gpl-3.0
7,361
0
25
1,778
2,432
1,300
1,132
174
2
-- (c) Aditya Mahajan <aditya.mahajan@yale.edu> -- | This Haskell library implements the algorithm for simplifying sequential -- teams presented -- -- Aditya Mahajan and Sekhar Tatikonda, A graphical modeling approach to -- simplifying sequential teams, proceedings of 7th International Symposium on -- Modeling and Opt...
adityam/teams
Data/Teams/Graph.hs
gpl-3.0
13,335
1
12
3,364
2,879
1,593
1,286
176
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-ec2/gen/Network/AWS/EC2/CancelImportTask.hs
mpl-2.0
5,060
0
11
1,073
706
421
285
77
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Aliases/Watch.hs
mpl-2.0
3,837
0
17
906
484
288
196
75
1
{- Created : 2014 Oct 26 (Sun) 09:22:44 by Harold Carr. Last Modified : 2014 Oct 26 (Sun) 09:22:44 by Harold Carr. -} import Data.List (sort) import Test.HUnit as T import Test.HUnit.Util as U -- HOMEWORK 1 --------------------------------------------------------------...
haroldcarr/learn-haskell-coq-ml-etc
haskell/course/2014-10-edx-delft-fp101x-intro-to-fp-erik-meijer/hw01.hs
unlicense
4,202
0
11
1,124
993
570
423
55
1
module Braxton.A282165Spec (main, spec) where import Test.Hspec import Braxton.A282165 (a282165) main :: IO () main = hspec spec spec :: Spec spec = describe "A282165" $ it "correctly computes the first 20 elements" $ take 20 (map a282165 [1..]) `shouldBe` expectedValue where expectedValue = [1,2,4,12,36,...
peterokagey/haskellOEIS
test/Braxton/A282165Spec.hs
apache-2.0
454
0
10
59
160
95
65
10
1
{-# LANGUAGE BangPatterns #-} -- -- Copyright : (c) T.Mishima 2014 -- License : Apache-2.0 -- module Hinecraft.Data ( WorldData , getWorldData , getBlockID , getSurfaceList , getAllSurfaceData , calcReGenArea , calcCursorPos -- , setBlockID -- , DataHdl , initData , exitData , reconfData ...
tmishima/Hinecraft
Hinecraft/Data.hs
apache-2.0
20,185
2
36
6,562
9,529
5,192
4,337
446
14
module Lib.DList ( dlistConcat , unfoldrEDL , unfoldrDL , viewl , ViewL(..) ) where ------------------------------------------------------------------------------------ import Data.DList (DList) import qualified Data.DList as DList -------------------...
kernelim/gitomail
src/Lib/DList.hs
apache-2.0
1,127
0
13
288
447
240
207
23
2
{- Created : 2014 Mar 03 (Mon) 20:39:50 by Harold Carr. Last Modified : 2014 Mar 17 (Mon) 16:39:36 by Harold Carr. -} module BitlyClient where import BitlyClientCommon import BitlyClientRequests as BCR import Control.Monad.IO.Class (MonadIO, liftIO) import qualified Data.ByteStr...
haroldcarr/bitly-client
src/BitlyClient.hs
apache-2.0
846
0
13
184
187
105
82
17
1
module JDBC.Types.Statement ( addBatchStatement, cancelStatement, clearBatchStatement, clearWarningStatement, closeStatement, closeOnCompletionStatement, executeStatement, executeStatement2, executeStatement3, executeStatement4, executeBatchStatement, executeQueryStatement,...
Jyothsnasrinivas/eta-jdbc
src/JDBC/Types/Statement.hs
apache-2.0
6,513
89
8
886
1,324
694
630
-1
-1
{-# LANGUAGE BangPatterns, CPP, InstanceSigs, RankNTypes, ScopedTypeVariables, TypeFamilies, UndecidableInstances #-} -- | Continuation-passing parser for Parsing Expression Grammars that keeps track of the parsed prefix length module Text.Grampa.PEG.Continued.Measured (Parser(..), Result(..), alt) where import Contro...
blamario/grampa
grammatical-parsers/src/Text/Grampa/PEG/Continued/Measured.hs
bsd-2-clause
15,247
0
18
4,202
5,750
2,967
2,783
-1
-1
module Helpers.Completion ( generalCompletion , uniqueLandlords , uniqueAddresses , looseMatch ) where import Import import Data.List (nub) import qualified Data.Text as T generalCompletion :: (Text -> Handler [Text]) -> Handler RepJson generalCompletion f = do mterm <- lookupGetParam "term" ...
pbrisbin/renters-reality
Helpers/Completion.hs
bsd-2-clause
1,166
0
12
326
411
211
200
34
3
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE ViewPatterns #-} module Novelist.Types.MockDirectoryTreeF where -- microlens import Lens.Micro.TH -- microlens-ghc import Lens.Micro.GHC -- mtl import Control.Monad.State -- containers import qualified Data....
kgadek/novelist
test/Novelist/Types/MockDirectoryTreeF.hs
bsd-2-clause
2,176
0
13
579
546
307
239
-1
-1
{-# language CPP #-} -- | = Name -- -- VK_AMD_shader_ballot - device extension -- -- == VK_AMD_shader_ballot -- -- [__Name String__] -- @VK_AMD_shader_ballot@ -- -- [__Extension Type__] -- Device extension -- -- [__Registered Extension Number__] -- 38 -- -- [__Revision__] -- 1 -- -- [__Extension and Ver...
expipiplus1/vulkan
src/Vulkan/Extensions/VK_AMD_shader_ballot.hs
bsd-3-clause
3,199
0
8
657
199
153
46
-1
-1
module Rede.SpdyProtocol.Framing.ChunkProducer(chunkProducerHelper) where import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as LB import Rede.SpdyProtocol.Framing.AnyFrame ( lengthFromPerfunct , perfunctoryClassify ) chunkProd...
loadimpact/http2-test
hs-src/Rede/SpdyProtocol/Framing/ChunkProducer.hs
bsd-3-clause
1,478
0
15
497
329
171
158
31
3
{-# LANGUAGE OverloadedStrings #-} module DobadoBots.GameEngine.Utils( getXV2, getYV2, minTuple, minTupleArray, v2toSGVect, sGVectToV2, degreeToRadian, radianToDegree, point2ToV2, objectToShape, setPhase, setLevel ) where import Linear.V2 (V2(..)) import Data.SG.Geometry.TwoDim (...
NinjaTrappeur/DobadoBots
src/DobadoBots/GameEngine/Utils.hs
bsd-3-clause
2,318
0
13
791
800
439
361
66
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE NoImplicitPrelude #-} -- | Home/landing page. module HL.V.Home where import HL.V hiding (list) import HL.V.Code import HL.V.Home.Features import HL.V.Template -- | Home view. homeV :: [(Text, Text, Text)] -> FromBlaze App homeV vids = skeleton "Haskell Language"...
chrisdone/hl
src/HL/V/Home.hs
bsd-3-clause
3,359
0
21
1,227
835
419
416
91
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Distributed.Process.Extras.Timer -- Copyright : (c) Tim Watson 2012 - 2017 -- License : BSD3 (see the file LICENSE) -- -- Maintain...
haskell-distributed/distributed-process-extras
src/Control/Distributed/Process/Extras/Timer.hs
bsd-3-clause
6,764
0
16
1,487
1,261
678
583
109
4
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE OverlappingInstances #-} module Data.YamlObject.Instances where import Data.YamlObject.Types import Data.YamlObject.Support import Data.ConvertibleInstances import Data.Convertible (convert) import Data.Typeable import qualified Dat...
arirahikkala/yaml-with-class
src/Data/YamlObject/Instances.hs
bsd-3-clause
12,753
0
24
4,695
4,558
2,280
2,278
219
0