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 DataKinds, MultiParamTypeClasses, FunctionalDependencies, TypeOperators, PolyKinds, TypeFamilies, FlexibleInstances, ScopedTypeVariables, UndecidableInstances, DefaultSignatures, FlexibleContexts #-} {-# OPTIONS_HADDOCK prune #-} module Data.MZip where import Data.MGeneric import Data.Unapply import Dat...
RafaelBocquet/haskell-mgeneric
src/Data/MZip.hs
mit
12,658
0
15
3,219
5,867
3,008
2,859
-1
-1
{-# LANGUAGE TypeFamilies, QuasiQuotes, TemplateHaskell, MultiParamTypeClasses, OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module YesodCoreTest.ErrorHandling ( errorHandlingTest , Widget ) where import Yesod.Core import Test.Hspec import Network.Wai import Network.Wai.Test import Text.Hamlet...
piyush-kurur/yesod
yesod-core/test/YesodCoreTest/ErrorHandling.hs
mit
3,811
0
18
881
788
404
384
87
2
-- | -- Module: Math.NumberTheory.Primes.Testing.Probabilistic -- Copyright: (c) 2011 Daniel Fischer, 2017 Andrew Lelechenko -- Licence: MIT -- Maintainer: Daniel Fischer <daniel.is.fischer@googlemail.com> -- -- Probabilistic primality tests, Miller-Rabin and Baillie-PSW. {-# LANGUAGE BangPatterns #...
cartazio/arithmoi
Math/NumberTheory/Primes/Testing/Probabilistic.hs
mit
9,084
0
17
2,339
1,956
1,070
886
103
6
import Data.List import Data.List.Split import Data.Maybe import System.IO import Data.Char import qualified AStar main = do contents <- readFile "day11input.txt" let result = compute $ lines contents print result type Pair = (Int, Int) -- (Floor of microchip, Floor of gene...
aBhallo/AoC2016
Day 11/day11part2.hs
mit
3,004
3
12
754
1,385
745
640
61
2
{-# LANGUAGE TupleSections, OverloadedStrings #-} module Handler.Delete where import Data.Maybe import qualified Data.Map as M import qualified Data.Text as T import Text.Parsec import Text.Parsec.Error import qualified Text.BibTeX.Parse as BibP import qualified Text.BibTeX.Format as BibF import Yesod.Markdown import...
klarh/barch
Handler/Delete.hs
mit
1,469
0
12
340
383
202
181
45
1
module Language.Binal.Verifier where import Control.Applicative import Control.Monad import Control.Monad.State import Control.Lens import qualified Data.Maybe as Maybe import qualified Data.List as List import qualified Data.HashSet as HashSet import q...
pasberth/binal1
Language/Binal/Verifier.hs
mit
26,883
12
30
9,165
10,946
5,302
5,644
626
34
-------------------------------------------------------------------------------- {-# LANGUAGE OverloadedStrings #-} import Data.Monoid (mappend) import Hakyll -------------------------------------------------------------------------------- main :: IO () main = hakyll $ do match "images/*" $ do...
prannayk/Hakyll-Blog
site.hs
mit
2,284
3
20
725
446
201
245
51
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ViewPatterns #-} {-# OPTI...
lambdacms/lambdacms.org
lambdacmsorg-tutorial/LambdaCmsOrg/Tutorial/Foundation.hs
mit
3,035
0
13
774
686
362
324
54
1
module Main where -- import Control.Monad ( (<<) ) import System( getArgs ) import System.IO( stderr, hPutStrLn ) import System.Process( runCommand, waitForProcess) import Data.List( nub, sort, isPrefixOf ) main = do args <- getArgs if (length args >= 2) then do let file = head args ...
spockz/Haskell-Code-Completion-for-TextMate
Main.hs
mit
904
0
15
317
228
116
112
16
2
<?xml version='1.0' encoding='ISO-8859-1' ?> <helpset version="2.0"> <!-- title --> <title>JavaScore - Auswertungsprogramm für Segelregatten</title> <!-- maps --> <maps> <homeID>top</homeID> <mapref location="de/Map.jhm"/> </maps> <!-- views --> <view> <name>TOC</name> ...
sgrosven/gromurph
Javascore/src/main/resources/help/JavaScore_de.hs
gpl-2.0
453
58
7
102
177
102
75
-1
-1
module MachineLearning.SupervisedLearning.SupportVectorMachines.Terms where import Notes makeDefs [ "support vector machines" , "linear support vector machines" , "confidence" , "support vector" ]
NorfairKing/the-notes
src/MachineLearning/SupervisedLearning/SupportVectorMachines/Terms.hs
gpl-2.0
232
0
6
56
29
18
11
-1
-1
{-# OPTIONS -w -O0 #-} {- | Module : HolLight/ATC_HolLight.der.hs Description : generated Typeable, ShATermConvertible instances Copyright : (c) DFKI Bremen 2008 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portability : non-portable(over...
nevrenato/Hets_Fork
HolLight/ATC_HolLight.der.hs
gpl-2.0
2,184
0
5
265
115
80
35
16
0
{- | Module : $Header$ Description : Additional (manual) ATerm-Conversions for OMDoc Copyright : (c) Hendrik Iben, Uni Bremen 2005-2007 License : GPLv2 or higher, see LICENSE.txt Maintainer : hiben@informatik.uni-bremen.de Stability : provisional Portability : portable Additional ATerm-Conversion...
nevrenato/Hets_Fork
OMDoc/ATerm.hs
gpl-2.0
971
0
15
262
209
108
101
18
0
{- ----------------------------------------------------------------------------- ZDCPU16 is a DCPU-16 emulator. Copyright (C) 2012 Luis Cabellos 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, eithe...
zhensydow/zdcpu16
src/zddcpu16_emu_main.hs
gpl-3.0
4,098
0
21
973
931
485
446
78
16
{-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE PatternSynonyms #-} module Logic where import Data.Char (toLower) import Data.List type Var = String data Exp = Op Op [Exp] ...
GU-CLASP/FraCoq
Logic.hs
gpl-3.0
5,498
0
14
1,393
2,583
1,346
1,237
141
6
{-# LANGUAGE ViewPatterns, TupleSections, TypeFamilies, FlexibleInstances, MultiParamTypeClasses, RecordWildCards, TemplateHaskell, ScopedTypeVariables #-} {-# OPTIONS -Wall #-} module Triangulation.AbstractNeighborhood( EdgeNeighborhoodTet, IEdgeNeighborhoodTet, ent_top,ent_bot,ent_left,ent_right,ent_leftT...
DanielSchuessler/hstri
Triangulation/AbstractNeighborhood.hs
gpl-3.0
8,967
0
23
2,183
1,868
1,026
842
148
2
{-# LANGUAGE OverloadedStrings #-} module Network.OAuth2.Util ( fromFileL, fromFile, fromUrl, fromAuthorizedUrl, fromRequest, fromUrl', fromAuthUrl, checkDirectory, downloadFile, authRequest ) where import Data.Aeson import Data.String impor...
limaner2002/OAuth2
src/Network/OAuth2/Util.hs
gpl-3.0
6,474
14
21
1,440
1,967
1,011
956
145
3
module Model.Geometry where import Graphics.Rendering.OpenGL data Geometry = Geometry { gVertices :: BufferObject , gUVCoords :: BufferObject , gNormals :: BufferObject , gTriElems :: BufferObject , gTriAdjElems :: BufferObject ...
halvorgb/AO2D
src/Model/Geometry.hs
gpl-3.0
447
0
8
191
69
45
24
11
0
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -Wall #-} module BlazeDateTime ( inputDate ) where import Data.Text (Text) import Text.Blaze ((!)) import qualified Text.Blaze.Html5 as H import qualified Text.Blaze.Html5.Attributes as A import Text.Digestive -- Old but could be used as a ...
nmbooker/recremind
BlazeDateTime.hs
gpl-3.0
680
0
11
177
166
93
73
17
1
{-# language FlexibleContexts #-} {-# language ScopedTypeVariables #-} ----------------------------------------------------------------------------- -- | -- Module : Numeric.LinearAlgebra.Accelerate -- Copyright : (c) Marco Zocca 2017 -- License : BSD3 (see the file LICENSE) -- -- Maintainer : zocca mar...
ocramz/sparse-linear-algebra
accelerate/src/Numeric/LinearAlgebra/Accelerate.hs
gpl-3.0
1,105
0
6
168
111
85
26
7
0
module Descr where import Helpers import Ticket descript :: Ticket -> [String] -> IO () descript tick tgs = do putStrLn $ "change description of: " ++ title tick ++ " - " ++ (head tgs) ++ "." saveTicket (setDescr (head tgs) tick) handleDescr args = paramList descript args "descr" "Usage: descr ticket-name new-de...
anttisalonen/nix
src/Descr.hs
gpl-3.0
332
0
11
62
110
55
55
8
1
module DL3040 (tests) where import Helpers import Test.Hspec tests :: SpecWith () tests = do let ?rulesConfig = mempty describe "DL3040 - `dnf clean all` missing after dnf command." $ do it "no ok without dnf clean all" $ do ruleCatches "DL3040" "RUN dnf install -y mariadb-10.4" onBuildRuleCatche...
lukasmartinelli/hadolint
test/DL3040.hs
gpl-3.0
695
0
13
147
119
53
66
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-iam/gen/Network/Google/Resource/IAM/Organizations/Roles/List.hs
mpl-2.0
8,047
0
20
1,687
1,064
623
441
144
1
{-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} -- Module : Network.PagerDuty.REST -- Copyright : (c) 2013-2015 Brendan Hay <brendan.g.hay@gmail.com> -- License : This Source Code Form is subject to the terms of -- the Mozilla Public License, v. 2.0. -- A co...
brendanhay/pagerduty
src/Network/PagerDuty/REST.hs
mpl-2.0
3,063
0
16
983
760
406
354
65
2
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.AdSense.Typ...
brendanhay/gogol
gogol-adsense/gen/Network/Google/AdSense/Types/Product.hs
mpl-2.0
59,355
0
18
14,633
11,198
6,445
4,753
1,230
1
----------------------------------------------------------------------------------------- {-| Module : Frame Copyright : (c) Daan Leijen 2003 License : wxWindows Maintainer : wxhaskell-devel@lists.sourceforge.net Stability : provisional Portability : portable Frame utility functions. -} -----...
thielema/wxhaskell
wxcore/src/haskell/Graphics/UI/WXCore/Frame.hs
lgpl-2.1
5,065
0
15
1,023
915
472
443
90
3
{- | Module : $Header$ Description : Various utility functions License : PublicDomain -} module Utils where import Data.Digits(digits) import Data.List(maximumBy) import Data.Ord(comparing) digitSum :: Integral n => n -> n digitSum = sum . digits 10 digitLength :: Integral n => n -> Int digitLength = lengt...
jhnesk/project-euler
src/Utils.hs
unlicense
767
0
9
145
343
185
158
18
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE StaticPointers #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE BangPatterns #-} module Driver ( tests ) where import Test.Framework (Test, testGroup) import Test.HUnit hiding (Test) import Test.Framework.Providers.HUnit (testCase) import CodeWorld import CodeWorld.D...
pranjaltale16/codeworld
codeworld-api/test/Driver.hs
apache-2.0
1,290
0
16
271
301
154
147
30
1
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE ScopedTypeVariables #-} -- :script test/Spark/Core/Internal/PathsSpec.hs module Spark.Core.Internal.PathsSpec where import Test.Hspec import qualified Data.Map.Strict as M import qualified Data.Set as S import qualified Data.ByteString.Char8 ...
krapsh/kraps-haskell
test/Spark/Core/Internal/PathsSpec.hs
apache-2.0
6,446
0
22
1,856
2,708
1,433
1,275
171
1
module NLP.TAG.Vanilla.SubtreeSharing.Tests where import Control.Applicative ((<$>)) import qualified Data.Set as S import Test.Tasty (TestTree, testGroup) -- , localOptions) import Test.HUnit (Assertion, (@?=)) import Test.Tasty.HUnit (testCase) import NLP.TAG.Va...
kawu/tag-vanilla
src/NLP/TAG/Vanilla/SubtreeSharing/Tests.hs
bsd-2-clause
3,252
0
12
829
858
479
379
87
1
{-# LANGUAGE OverloadedStrings #-} module Radiation.Parsers.Internal.CStyle where import Data.Attoparsec.ByteString.Char8 as BP import Data.Attoparsec.ByteString.Lazy as Lazy import qualified Data.Attoparsec.ByteString as BB import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as BSL import qu...
jrahm/Radiation
src/Radiation/Parsers/Internal/CStyle.hs
bsd-2-clause
4,032
0
17
874
1,299
667
632
81
2
-- | The Ox monad facilitates writing functional expressions over the -- input sentence with arbitrary type of sentence token. module Control.Monad.Ox ( -- * Types Ox , Id -- * Functions , save , saves , when , whenJT , group -- * Ox monad execution , execOx -- * Utilities , atWith , atsWith ) where import Cont...
kawu/monad-ox
Control/Monad/Ox.hs
bsd-2-clause
4,293
0
12
1,015
1,161
622
539
90
2
{-# LANGUAGE QuasiQuotes, TemplateHaskell, TypeFamilies #-} {-# LANGUAGE OverloadedStrings #-} module Tap ( Tap (..) , TapRoute (..) , resourcesTap , Handler , Widget , module Yesod.Core , module Settings , StaticRoute (..) , lift , liftIO ) where import Tap.Redis import Yes...
KirinDave/redis-conduit
Tap.hs
bsd-2-clause
3,858
0
16
816
546
313
233
52
0
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QTextDocument_h.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:28 Warning : this file is machine generated - ...
keera-studios/hsQt
Qtc/Gui/QTextDocument_h.hs
bsd-2-clause
28,767
0
18
6,549
9,473
4,506
4,967
-1
-1
module NametableSpec where import Test.Hspec import Test.QuickCheck import Test.QuickCheck.Monadic import Test.Test import Grin.Nametable import Grin.Pretty runTests :: IO () runTests = hspec spec spec :: Spec spec = do describe "Property" $ do it "restore . convert == id" $ property $ forAll genProg $ ...
andorp/grin
grin/test/NametableSpec.hs
bsd-3-clause
400
0
17
92
135
71
64
16
1
{-# LANGUAGE RankNTypes #-} {-# LANGUAGE TemplateHaskell #-} module TitleScene ( titleScene ) where import GameEngine.Scene import GameEngine.Sprite import GameEngine.Sprite.Label import GameEngine.Sprite.Colored import Control.Lens import Control.Monad (when) import Control.Monad.IO.Class import Control.Monad.S...
lotz84/SnakeGameHaskell
src/TitleScene.hs
bsd-3-clause
2,381
0
14
925
551
288
263
-1
-1
import Language.Haskell.TH putLeftRight :: Int -> ExpQ -> ExpQ putLeftRight 0 ex = leftE `appE` ex putLeftRight n ex = rightE `appE` putLeftRight (n - 1) ex rightE, leftE :: ExpQ rightE = conE $ mkName "Right" leftE = conE $ mkName "Left" reduce :: Either Int (Either String (Either Char ())) -> Either Int (Either S...
YoshikuniJujo/papillon
test/templateHaskell/leftRight.hs
bsd-3-clause
509
14
10
100
247
130
117
13
1
{-| Copyright : (c) Dave Laing, 2017 License : BSD3 Maintainer : dave.laing.80@gmail.com Stability : experimental Portability : non-portable -} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAG...
dalaing/type-systems
src/Rules/Kind/Infer/SyntaxDirected.hs
bsd-3-clause
1,701
0
12
398
500
269
231
-1
-1
{-# LANGUAGE GADTs, MultiParamTypeClasses, FlexibleInstances, Rank2Types, PolyKinds, UndecidableInstances #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Monad.Indexed.Free -- Copyright : (C) 2013 Fumiaki Kinoshita -- License : BSD-style (see the ...
fumieval/indexed-free
Control/Monad/Indexed/Free.hs
bsd-3-clause
1,914
0
10
398
682
361
321
33
1
{-# LANGUAGE TypeFamilies, TypeOperators, TupleSections #-} {-# OPTIONS_GHC -Wall #-} ---------------------------------------------------------------------- -- | -- Module : FunctorCombo.Holey -- Copyright : (c) Conal Elliott 2010 -- License : BSD3 -- -- Maintainer : conal@conal.net -- Stability : e...
conal/functor-combo
src/FunctorCombo/DHoley.hs
bsd-3-clause
5,280
0
13
1,294
963
520
443
41
1
{-# LANGUAGE OverloadedStrings , FlexibleContexts #-} module Application where import Template.Main (htmlLight, page) import Application.Types (MonadApp) import Network.Wai.Trans (ApplicationT, MiddlewareT) import Network.Wai (pathInfo) import Network.Wai.Middleware.ContentType import Network.Wai.Middleware....
Debatable-Online/backend
src/Application.hs
bsd-3-clause
917
0
13
156
286
156
130
22
1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 Handles @deriving@ clauses on @data@ declarations. -} {-# LANGUAGE CPP #-} module TcDeriv ( tcDeriving, DerivInfo(..), mkDerivInfos ) where #include "HsVersions.h" import HsSyn import DynFlags import TcRnMonad import ...
mcschroeder/ghc
compiler/typecheck/TcDeriv.hs
bsd-3-clause
96,356
50
18
29,216
12,270
6,465
5,805
-1
-1
module Test where import Data.List main :: IO () main = return () f::(Ord b, Show b, Eq a) => b -> a f = undefined
sebastiaanvisser/ghc-goals
tests/Test.hs
bsd-3-clause
120
0
6
31
64
35
29
6
1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 TcSplice: Template Haskell splices -} {-# LANGUAGE CPP, FlexibleInstances, MagicHash, ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module TcSplice( -- These functions are defined in stage1 and stage...
gcampax/ghc
compiler/typecheck/TcSplice.hs
bsd-3-clause
63,028
0
10
19,324
571
359
212
18
1
module Main where import System.Environment import Server main :: IO () main = do args <- getArgs if length args /= 1 then putStr help else case args of [cfg] -> startServer cfg _ -> putStr help -- | Help message help :: String help = "Students Big Brother Server v0.1.0 \n\ \Usage: \...
geo2a/students-big-brother
students-big-brother-server/app/Main.hs
bsd-3-clause
385
0
11
101
91
48
43
13
3
{-# LANGUAGE TemplateHaskell #-} module Client.CEntityT where import Control.Lens (makeLenses) import Linear (V3(..)) import Game.EntityStateT import Types makeLenses ''CEntityT newCEntityT :: CEntityT newCEntityT = CEntityT { _ceBaseline = newEntitySta...
ksaveljev/hake-2
src/Client/CEntityT.hs
bsd-3-clause
539
0
7
168
115
68
47
16
1
{-| Module : $Header$ Description : Adapter for communicating with Slack via the webhook based Events API Copyright : (c) Justus Adam, 2016 License : BSD3 Maintainer : dev@justus.science Stability : experimental Portability : POSIX See http://marvin.readthedocs.io/en/latest/adapters.html#events-api for d...
JustusAdam/marvin
src/Marvin/Adapter/Slack/EventsAPI.hs
bsd-3-clause
4,540
0
24
1,466
1,007
524
483
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Image_Loader where import Graphics.Blank import Wiki -- (578,400) main :: IO () main = do blankCanvas 3000 $ \ context -> do url1 <- staticURL context "type/jpeg" "images/Haskell.jpg" url2 <- staticURL context "type/jpeg" "images/House.jpg" send co...
ku-fpg/blank-canvas
wiki-suite/Image_Loader.hs
bsd-3-clause
584
0
16
174
166
82
84
16
1
#!/usr/bin/runghc import Distribution.Simple main = defaultMain
baldo/derive-trie
Setup.hs
bsd-3-clause
65
1
4
7
15
7
8
2
1
module Deflisp.Core.Show where import Deflisp.Core.Types import Debug.Trace import qualified Data.Map as Map instance Show LispFunk where show (LibraryFunction name _) = "library function: " ++ name show (VarArgFunction _ _ _ _) = "vararg function" show (UserFunction _ _ _) = "user function" show (Macros _ _)...
ifesdjeen/deflisp
src/DefLisp/Core/Show.hs
bsd-3-clause
1,361
0
14
312
397
208
189
23
0
module Language ( initialInterpreterState , parse , interpret , setInterpreterVariables , updateSystemVars , module Language.Ast ) where import Control.Monad ( forM_ ) import Control.Monad.Trans ( liftIO ) import qualified Data.Map.Strict as M...
rumblesan/improviz
src/Language.hs
bsd-3-clause
3,026
0
13
1,221
598
326
272
68
1
module System.Build.Access.Version where class Version r where setVersion :: r -> r unsetVersion :: r -> r
tonymorris/lastik
System/Build/Access/Version.hs
bsd-3-clause
130
0
7
40
35
20
15
8
0
{-# LANGUAGE JavaScriptFFI #-} module GHCJS.Three.HasName (HasName(..) ) where import GHCJS.Types import GHCJS.Three.Monad import Data.JSString (pack, unpack) -- | get name foreign import javascript unsafe "($1)['name']" thr_getName :: JSVal -> Three JSString -- | set name foreign import javascript unsaf...
manyoo/ghcjs-three
src/GHCJS/Three/HasName.hs
bsd-3-clause
605
11
8
126
181
99
82
15
0
{-# LANGUAGE CPP #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE TypeFamilies #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Lens.Equality -- Copyright : (C) 2012-14 Edward Kmett -- License : BSD-style (see the file LICENSE) -...
hvr/lens
src/Control/Lens/Equality.hs
bsd-3-clause
2,358
0
10
452
433
250
183
36
1
module Distribution.Client.Dependency.Modular ( modularResolver, SolverConfig(..)) where -- Here, we try to map between the external epm solver -- interface and the internal interface that the solver actually -- expects. There are a number of type conversions to perform: we -- have to convert the package indi...
typelead/epm
epm/Distribution/Client/Dependency/Modular.hs
bsd-3-clause
2,611
0
13
551
476
281
195
39
5
{- (c) The GRASP/AQUA Project, Glasgow University, 1992-2006 \section[RnEnv]{Environment manipulation for the renamer monad} -} {-# LANGUAGE CPP, MultiWayIf #-} module RnEnv ( newTopSrcBinder, lookupLocatedTopBndrRn, lookupTopBndrRn, lookupLocatedOccRn, lookupOccRn, lookupOccRn_maybe, ...
tjakway/ghcjvm
compiler/rename/RnEnv.hs
bsd-3-clause
97,750
601
39
28,916
15,586
8,250
7,336
1,207
10
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeApplications #-} module Test.Pos.Chain.Txp.Bi ( tests ) where import Universum import qualified Data.Map as M import Data.Typeable (typeRep) import Hedgehog (Gen, Property) import qualified Hedgehog as H import qualified H...
input-output-hk/pos-haskell-prototype
chain/test/Test/Pos/Chain/Txp/Bi.hs
mit
12,445
0
24
2,650
2,044
1,177
867
172
2
-- | -- Copyright : (c) 2010, 2011 Benedikt Schmidt & Simon Meier -- License : GPL v3 (see LICENSE) -- -- Maintainer : Simon Meier <iridcode@gmail.com> -- Portability : GHC only -- -- Support for interaction with the console: argument parsing. module Main.Console ( defaultMain -- * Static information abo...
ekr/tamarin-prover
src/Main/Console.hs
gpl-3.0
7,294
0
18
1,849
1,296
728
568
128
2
{-# 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-autoscaling/gen/Network/AWS/AutoScaling/EnterStandby.hs
mpl-2.0
5,587
0
15
1,154
752
448
304
93
1
module Examples.UsablePath ( upExamples ) where import Utils import Algebra.Matrix import Algebra.Semiring import Algebra.Optimum import Policy.UsablePath upExamples :: Int -> Matrix UsablePath upExamples 0 = M (toArray 5 [(U 0), (U 0), (U 0), (U 1), (U 0) ,(U 0), (U 0), (U 0), (U 1), (U 0) ...
sdynerow/Semirings-Library
haskell/Examples/UsablePath.hs
apache-2.0
1,609
0
10
558
1,465
808
657
33
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="pl-PL"> <title>Customizable HTML Report</title> <maps> <homeID>top</homeID> <mapref lo...
veggiespam/zap-extensions
addOns/customreport/src/main/javahelp/org/zaproxy/zap/extension/customreport/resources/help_pl_PL/helpset_pl_PL.hs
apache-2.0
973
79
66
158
416
210
206
-1
-1
module HermBanded where import Driver import Monadic import qualified Test.QuickCheck.BLAS as Test import Data.Matrix.Herm import Data.Matrix.Banded import Data.Vector.Dense import Data.Vector.Dense.ST import Data.Matrix.Dense.ST import Test.Matrix.Herm.Banded type V = Vector E type B = Banded E type HB = Herm...
patperry/hs-linear-algebra
tests-old/HermBanded.hs
bsd-3-clause
2,038
0
17
468
707
363
344
-1
-1
{-# LANGUAGE Rank2Types, FlexibleContexts #-} module Tests.Utils where import Data.Word import Control.Monad.ST import Foreign.C.Error import System.Directory import System.IO import System.IO.Unsafe (unsafePerformIO) import System.FilePath import Test.QuickCheck hiding (numTests) import Test.QuickCheck.Monadic impo...
hackern/halfs
test/src/Tests/Utils.hs
bsd-3-clause
11,787
0
23
3,801
3,506
1,797
1,709
269
5
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGU...
tolysz/prepare-ghcjs
spec-lts8/aeson/Data/Aeson/Types/ToJSON.hs
bsd-3-clause
97,291
0
15
23,900
24,386
12,954
11,432
1,772
4
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1993-1998 \section[IdInfo]{@IdInfos@: Non-essential information about @Ids@} (And a pretty good illustration of quite a few things wrong with Haskell. [WDP 94/11]) -} module IdInfo ( -- * The IdDetails type IdDetail...
oldmanmike/ghc
compiler/basicTypes/IdInfo.hs
bsd-3-clause
18,548
0
11
5,854
2,092
1,241
851
217
10
module IxEnvMT (HasEnv(..), MT(..), at, Z, S, Top, Under, WithEnv, withEnv, mapEnv) where import MT import Control_Monad_Fix import Control.Monad(liftM,MonadPlus(..)) newtype WithEnv e m a = E { unE :: e -> m a } withEnv :: e -> WithEnv e m a -> m a withEnv e (E f) = f e mapEnv :: Monad m => (e2 -> e1) -> WithEn...
mpickering/HaRe
old/tools/base/lib/Monads/IxEnvMT.hs
bsd-3-clause
2,210
0
15
592
1,011
513
498
-1
-1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Functor -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : l...
rahulmutt/ghcvm
libraries/base/Data/Functor.hs
bsd-3-clause
3,644
0
9
787
387
283
104
25
1
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances, UndecidableInstances, FlexibleContexts #-} -- UndecidableInstances now needed because the Coverage Condition fails module ShouldFail where -- A stripped down functional-dependency -- example that causes GHC 4.08.1 to crash wit...
ezyang/ghc
testsuite/tests/typecheck/should_fail/tcfail093.hs
bsd-3-clause
1,102
0
7
237
121
71
50
10
1
newtype MkT2 a = MkT2 [Maybe a] deriving Show f :: t Int -> t Int f x = x f2 :: t Int -> t Int -> (t Int, t Int) f2 x y = (x,y)
urbanslug/ghc
testsuite/tests/ghci.debugger/scripts/print029.hs
bsd-3-clause
129
0
8
38
89
46
43
5
1
{-# LANGUAGE LambdaCase #-} module WykopProfile ( indexProfile , addedProfile , publishedProfile , commentedProfile , diggedProfile , buriedProfile , observeProfile , unobserveProfile , blockProfile , unblockProfile , followersProfile , followedProfile , favoritesP...
mikusp/hwykop
WykopProfile.hs
mit
3,055
0
12
753
1,077
550
527
63
2
{-# LANGUAGE OverloadedStrings #-} module System.PassengerCheck.Health (queuedRequests, status) where import System.PassengerCheck.Types import System.Nagios.Plugin (CheckStatus(..)) import Data.Text (Text) queuedRequests :: PassengerStatus -> Integer queuedRequests stat = requestsInTopLevelQueue stat + sum (requ...
stackbuilders/passenger-check
src/System/PassengerCheck/Health.hs
mit
755
0
10
149
194
108
86
18
1
--This script orients sequences according to a PWM. The sequences must --be in the first column of the input file --Author: Tristan Bepler (tbepler@gmail.com) import qualified Data.Map as Map import System.Environment import System.Exit import Debug.Trace data Orientation = Fwd | Rvs main = getArgs >>= parse >>= pu...
tbepler/PBM-Analysis
orientseqs.hs
mit
3,061
4
14
621
1,255
643
612
82
10
module GHCJS.DOM.DeviceProximityEvent ( ) where
manyoo/ghcjs-dom
ghcjs-dom-webkit/src/GHCJS/DOM/DeviceProximityEvent.hs
mit
50
0
3
7
10
7
3
1
0
module Inputs (getInput) where import qualified Data.Map as M import Board (Coords, Board, getBlankCoords, getNeighbors) getKeyMoveMapping :: Board -> M.Map Char Coords getKeyMoveMapping board = case getBlankCoords board of Just coords -> buildMap coords Nothing -> M.empty where buildMap (x,y) = M....
lshemesh/Slide
src/Inputs.hs
mit
674
0
11
161
316
170
146
19
2
module Network.Gazelle.Types.Artist ( Artist(..), ArtistEntry(..), ArtistStatistics(..), Tag(..) ) where import Network.Gazelle.Types.Gazelle import Network.Gazelle.Types.Id import Data.Aeson import Data.Scientific import Data.Text (Text) import Network.API.Builder data Tag = Tag { tagName :: Te...
mr/gazelle
src/Network/Gazelle/Types/Artist.hs
mit
2,047
0
27
557
539
312
227
71
0
module Glucose.Test.IR.Core where import Control.Comonad import Data.Text (Text) import Glucose.Identifier (Identifier (..)) import Glucose.IR import Glucose.Parser.Source import Glucose.Test.Source -- * Without source locations constantAnywhere :: Text -> Literal -> FromSource (Definition ann) constantA...
sardonicpresence/glucose
test/Glucose/Test/IR/Core.hs
mit
1,431
0
10
233
465
234
231
21
1
module Main where import System.Environment import PropDoc.Core import PropDoc.Input.JavaProps -- IO main = do args <- getArgs name <- return (head args) contents <- readFile name let defs = props nameValuePair Nothing [] (lines contents) putStr $ foldr (\a acc -> acc ++ (show a)) "" defs
chrislewis/PropDoc
src/Main.hs
mit
302
0
13
59
119
60
59
10
1
{-# LANGUAGE OverloadedStrings #-} module Data.IP.Extra where import Data.IP -- Return a List of AddrRanges within a given AddrRange -- that have the given netmask. If the given netmask is -- greater than the netmask of the original AddrRange, -- an empty List is returned. ranges :: AddrRange IPv4 -> Int -> [AddrRan...
rjosephwright/awstemplate
src/Data/IP/Extra.hs
mit
909
0
13
208
384
208
176
22
1
module Main where import Prelude import qualified Hasql.Connection as A import qualified Hasql.Session as B import qualified Hasql.Transaction as C import qualified Hasql.Transaction.Sessions as G import qualified Main.Statements as D import qualified Main.Transactions as E import qualified Control.Concurrent.Async as...
nikita-volkov/hasql-transaction
conflicts-test/Main.hs
mit
3,586
0
15
778
1,147
558
589
85
2
module HsSearch.SearchResultTest ( getBinaryFileSearchResultTests , getMultiLineSearchResultTests , getSingleLineSearchResultTests ) where import qualified Data.ByteString.Char8 as BC import HsSearch.Config import HsSearch.SearchResult import HsSearch.SearchSettings import Test.Framework import Test.Framework...
clarkcb/xsearch
haskell/hssearch/test/HsSearch/SearchResultTest.hs
mit
4,148
0
26
1,467
702
368
334
71
1
module Shipper ( startShipper, Event, Input(..), Output(..), ) where import Shipper.Inputs import Shipper.Outputs import Shipper.Types import Shipper.Event (maxPacketSize) import Control.Concurrent.STM (atomically) import Control.Concurrent.STM.TBQueue import Control.Concurrent import Control.Monad ...
christian-marie/pill-bug
Shipper.hs
mit
2,463
0
16
628
505
259
246
43
6
module FactorTable (computeForList, toList) where import qualified Data.Map as M import qualified Data.List as L import qualified Data.Set as S import Types toList :: FactorTable -> [(Int, [Int])] toList = M.toList computeForList :: [Int] -> FactorTable computeForList = L.foldl' insert empty . L.sort . unique inse...
mg50avant/factorizer
src/FactorTable.hs
mit
1,305
0
9
260
334
190
144
24
1
module ChatCore.Util.Error where import Control.Exception import Control.Monad -- | Runs the given IO action and wraps the return value in Nothing if an -- exception is raised. tryMaybe :: IO a -> IO (Maybe a) tryMaybe f = catch (Just `liftM` f) (return . catchNothing) where catchNothing :: SomeException -> May...
Forkk/ChatCore
ChatCore/Util/Error.hs
mit
355
0
8
69
91
50
41
7
1
module Exercise where data OA = Add | Mul data OB = EQu | GTh | LTh data ExprA = Const Int | Var Char | OpA OA ExprA ExprA | If ExprB ExprA ExprA data ExprB = OpB OB ExprA ExprA evalA :: ExprA -> Int evalA (Const a) = a evalA (OpA Add expr1 expr2) = (evalA expr1) + (evalA expr2) eval...
tcoenraad/functioneel-programmeren
2012/opg2a.hs
mit
683
0
9
194
301
152
149
18
1
{- hpodder component Copyright (C) 2006-2007 John Goerzen <jgoerzen@complete.org> 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 versio...
jgoerzen/hpodder
Commands.hs
gpl-2.0
3,278
0
12
684
440
252
188
59
2
module Main where import System.FilePath import System.Directory import Rm import System.Environment (getArgs) main :: IO () main = do args <- getArgs cur_path <- getCurrentDirectory home <- getHomeDirectory mapM_ (rmObject home cur_path) args rmObject :: FilePath -> FilePath -> FilePath -> IO Bool rmOb...
sebiva/rm.hs
src/Main.hs
gpl-2.0
762
0
14
220
260
137
123
20
2
solve :: [String] -> String solve xs = map head xs main :: IO () main = do c <- getLine putStrLn $ solve (words c)
m00nlight/hackerrank
functional/contests/Lambda-Calculi-10/A.hs
gpl-2.0
120
0
10
31
64
31
33
6
1
-- Aufgabe 12.5 -- a) data Term = Lit Int | Add Term Term | Mult Term Term deriving Show -- b) -- This is the solution given in the text book all credit to the author eval' :: Term -> Term eval' t = Lit (eval'' t) eval'' :: Term -> Int eval'' (Add t1 t2) = (eval'' t1) + (eval'' t2) eval'' (Mult t1 t2) = (eval'' t...
KaliszAd/programmierung2012
aufgabe12_5.hs
gpl-2.0
521
20
9
132
250
133
117
12
2
module Luhn (addends, checkDigit, checksum, create, isValid) where import Data.Digits checkDigit :: Integer -> Integer checkDigit = last . digits 10 addends :: Integer -> [Integer] addends = reverse . dblEveryOther . digitsRev 10 where dblEveryOther = everyOther' (clean . (*2)) clean n = if n < ...
ciderpunx/exercismo
src/Luhn.hs
gpl-3.0
999
0
14
248
333
186
147
21
2
-- Print out the nth prime, where n is the 1st argument module Main where import NaiveSieveLimit (primesToNth) import System (getArgs) printNthPrime :: Int -> IO () printNthPrime n = print (n, last(primesToNth n)) main = do args <- getArgs printNthPrime $ read $ head args
dkensinger/haskell
haskell-primes/NaiveSieveLimitTest.hs
gpl-3.0
286
0
9
59
87
46
41
8
1
{-# LANGUAGE TypeApplications #-} layoutPatternBindFinal alignmentToken binderDoc mPatDoc clauseDocs = do docAlt $ -- one-line solution [ docCols (ColBindingLine alignmentToken) [ docSeq (patPartInline ++ [guardPart]) , docSeq [ appSep $ return binderDoc ...
lspitzner/brittany
data/Test308.hs
agpl-3.0
1,790
0
21
664
435
227
208
41
3
module Sieve where findPrime :: [Int] -> [Int] findPrime [] = [] findPrime (x : xs) = x : (findPrime $ filter (\a -> a `mod` x /= 0) xs) primes :: Int -> [Int] primes n = findPrime [2 .. n]
ice1000/OI-codes
codewars/101-200/sieve-of-eratosthenes.hs
agpl-3.0
198
0
12
50
109
61
48
6
1
{- Small tool for converting old FP (FixedPrecision) files to a binary IEEE format float files. Old file is retained, with an -old prefix Usage: ./FP2floats [all|w|rr|rbs] infile w - reads FP-formatted infile, writes float-formatted outfile all - specify directory as infile, converts all .dat files to ...
kvelicka/Fizz
FP2floats.hs
lgpl-2.1
2,919
0
14
615
860
436
424
71
5
module Main where import E main :: IO () main = lq
haroldcarr/learn-haskell-coq-ml-etc
haskell/topic/existentials/2017-03-arnaud-bailly-understanding-existentials/app/Main.hs
unlicense
54
0
6
15
22
13
9
4
1
{-# OPTIONS_GHC -Wall -} {- - Module about terms. Used after parsing eMOD - - - 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 complian...
DatePaper616/code
Terms.hs
apache-2.0
1,324
32
8
299
273
166
107
-1
-1
{-# LANGUAGE LambdaCase, Rank2Types #-} module Drasil.ExtractDocDesc (getDocDesc, egetDocDesc, ciGetDocDesc, sentencePlate) where import Control.Lens((^.)) import Drasil.DocumentLanguage.Core import Drasil.Sections.SpecificSystemDescription (inDataConstTbl, outDataConstTbl) import Language.Drasil hiding (Manual, Vecto...
JacquesCarette/literate-scientific-software
code/drasil-docLang/Drasil/ExtractDocDesc.hs
bsd-2-clause
7,905
0
27
1,895
3,626
1,895
1,731
190
17
module Permissions.Onping.InternalSpec (main, spec) where import Test.Hspec import Permissions.Onping.Internal import Database.Persist import Persist.Mongo.Settings import Data.Aeson import Control.Applicative import qualified Data.Yaml as Y import Data.Traversable import Data.Maybe main :: IO () main = do hspec $...
smurphy8/onping-permissions
test/Permissions/Onping/InternalSpec.hs
bsd-3-clause
920
0
22
275
236
121
115
27
2
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, PatternGuards #-} {- Implements a proof state, some primitive tactics for manipulating proofs, and some high level commands for introducing new theorems, evaluation/checking inside the proof system, etc. --} module Idris.Core.ProofTerm(ProofTerm, Goal(..), ...
andyarvanitis/Idris-dev
src/Idris/Core/ProofTerm.hs
bsd-3-clause
12,408
0
17
4,365
5,053
2,569
2,484
228
20
module Main (main) where import Control.Arrow import Crypto.Random import Data.Ratio import Crypto.Ed25519.Pure import Text.Read import Data.Thyme.Clock import System.IO import System.FilePath import qualified Data.Yaml as Y import qualified Data.Set as Set import Data.Map.Strict (Map) import qualified Data.Map.Stric...
haroldcarr/juno
app/GenerateConfigFiles.hs
bsd-3-clause
3,940
0
22
884
1,231
650
581
80
2
{-# LANGUAGE DeriveDataTypeable #-} module Internal.Types ( DTree (..) , DElemType (..) , DAttr (..) ) where import qualified Data.Text as T import Data.Data import qualified Data.Map as M -- DOM tree: either a text node or an element with some children data DTree = DText T.Text | DElem DEl...
qnnguyen/howser
src/Internal/Types.hs
bsd-3-clause
1,354
0
14
463
419
227
192
38
0