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 -Wall #-} module File.Watcher where import Control.Concurrent (forkIO, threadDelay) import Control.Concurrent.Chan (newChan, readChan, writeChan) import qualified System.FSNotify as Notify import qualified Elm.Project as Project import Elm.Project (Project) -- GRAPH data Graph = Graph { _el...
evancz/builder
src/File/Watcher.hs
bsd-3-clause
1,394
7
15
379
450
235
215
-1
-1
{-# LANGUAGE LambdaCase, TupleSections #-} module Transformations.Optimising.EvaluatedCaseElimination where import Data.Functor.Foldable as Foldable import Grin.Grin evaluatedCaseElimination :: Exp -> Exp evaluatedCaseElimination = ana builder where builder :: Exp -> ExpF Exp builder = \case ECase val alts | ...
andorp/grin
grin/src/Transformations/Optimising/EvaluatedCaseElimination.hs
bsd-3-clause
476
0
16
85
138
72
66
12
2
-- | Uhit test that seeds a 3D grid with a few points, computes the -- Euclidean distance transform of that grid, then checks a few points -- to see if the distance transformed grid agrees with an exhaustive -- nearest-neighbor search. module Main (main) where import qualified Data.Vector.Unboxed as V import qualified ...
acowley/DistanceTransform
src/tests/Main.hs
bsd-3-clause
1,907
0
16
647
652
346
306
45
1
{-# LANGUAGE TypeFamilies, Rank2Types #-} ----------------------------------------------------------------------------- -- | -- Module : System.Mem.StableName.Dynamic -- Copyright : (c) Edward Kmett 2010 -- License : BSD3 -- Maintainer : ekmett@gmail.com -- Stability : experimental -- Portability : ...
FranklinChen/stable-maps
System/Mem/StableName/Dynamic.hs
bsd-3-clause
3,405
0
9
587
219
126
93
20
1
module Database.Persist.SqlBackend.Internal.IsolationLevel where import Data.String (IsString(..)) -- | Please refer to the documentation for the database in question for a full -- overview of the semantics of the varying isloation levels data IsolationLevel = ReadUncommitted | ReadCommitted ...
paul-rouse/persistent
persistent/Database/Persist/SqlBackend/Internal/IsolationLevel.hs
mit
760
0
8
183
128
73
55
13
4
{-# LANGUAGE DeriveDataTypeable #-} {- | Module : ./CommonLogic/Morphism.hs Description : Morphism of Common Logic Copyright : (c) Uni Bremen DFKI 2010 License : GPLv2 or higher, see LICENSE.txt Maintainer : eugenk@informatik.uni-bremen.de Stability : experimental Portability : non-portable (via L...
spechub/Hets
CommonLogic/Morphism.hs
gpl-2.0
7,064
0
23
1,770
2,287
1,169
1,118
144
8
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-codedeploy/gen/Network/AWS/CodeDeploy/ListDeploymentInstances.hs
mpl-2.0
6,030
0
12
1,202
686
415
271
78
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-cloudhsm/gen/Network/AWS/CloudHSM/DeleteHsm.hs
mpl-2.0
3,285
0
9
777
461
280
181
57
1
module Main where import HEP.Kinematics.TwoBody import Control.Applicative (liftA2) import Control.Monad (replicateM) import System.Random.MWC main :: IO () main = do rs <- createSystemRandom >>= genRandoms 10 let twobodies = map (mkTwoBodyEvent 250 (0, 0, 125, 91)) rs mapM_ print (twobodies ...
cbpark/hep-kinematics
examples/twobody.hs
bsd-3-clause
498
0
13
110
186
100
86
13
1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 TcMatches: Typecheck some @Matches@ -} {-# LANGUAGE CPP #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE FlexibleContexts #-} module TcMatches ( tcMatchesFun, tcGRHS...
olsner/ghc
compiler/typecheck/TcMatches.hs
bsd-3-clause
48,118
4
21
15,999
9,668
5,122
4,546
631
7
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section[PatSyntax]{Abstract Haskell syntax---patterns} -} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE Undecida...
bitemyapp/ghc
compiler/hsSyn/HsPat.hs
bsd-3-clause
20,048
0
18
6,375
3,893
2,106
1,787
253
21
{-# language OverloadedLists #-} {-# language OverloadedStrings #-} {-# language TypeFamilies #-} module Planetary.Core.Syntax.Test (unitTests) where import Network.IPLD import EasyTest import Planetary.Core import Planetary.Support.Ids unitTy :: ValTy Cid unitTy = DataTy (UidTy unitId) [] unitTests :: Test () unit...
joelburget/interplanetary-computation
src/Planetary/Core/Syntax/Test.hs
bsd-3-clause
897
0
16
192
257
136
121
25
1
-- fundamental problem noted by slava: -- too complicated. too hard to optimize. too "programmy" instead of -- "relational". module RethinkDB where -- A Symbol is essentially an identifier, a way to refer to other -- entities (tables, attributes, etc.) in the AST. type Symbol = String -- These are Aliases to symbol...
jfriedly/rethinkdb
docs_internal/qlspec3.hs
agpl-3.0
5,183
0
8
1,415
609
392
217
79
0
{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-tabs #-} -- The above warning supression flag is a temporary kludge. -- While working on this module you are encouraged to remove it and -- detab the module (please do the detabbing in a separate patch). See -- http://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyl...
frantisekfarka/ghc-dsi
compiler/nativeGen/X86/RegInfo.hs
bsd-3-clause
2,135
10
11
700
532
314
218
52
4
{-# LANGUAGE TypeFamilies, MonoLocalBinds #-} module T12526 where import Data.Kind (Type) type family P (s :: Type -> Type) :: Type -> Type -> Type type instance P Signal = Causal type family S (p :: Type -> Type -> Type) :: Type -> Type type instance S Causal = Signal class (P (S p) ~ p) => CP p instance CP Causal...
sdiehl/ghc
testsuite/tests/indexed-types/should_compile/T12526.hs
bsd-3-clause
1,133
0
10
315
213
122
91
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE Trustworthy #-} -- can't use Safe due to IsList instance {-# LANGUAGE TypeFamilies #-} ----------------------------------------------------------------------------- -- | -- Module : Data.List.NonEmpty -- Copyright : (C) 2011-2015 ...
tolysz/prepare-ghcjs
spec-lts8/base/Data/List/NonEmpty.hs
bsd-3-clause
18,806
0
13
4,784
4,320
2,370
1,950
247
2
{- - Id Example Program - Ensnaffled by SLPJ from MIT via - RPaul <rpaul@juicy-juice.lcs.mit.edu> 93/08/26. - Original author: Steve Heller -} module Main (main) where import Data.Array import System.Environment -- Generation of radicals data Radical = H | C Radical Radical Radical three_partitions :: Int -> [...
seereason/ghcjs
test/nofib/imaginary/paraffins/Main.hs
mit
2,657
0
18
566
1,373
744
629
62
4
{-# LANGUAGE ImplicitParams #-} -- !!! Implicit parameter test module Main where main = do { let ?x = 13 in putStrLn $ show $ foo ; let ?x = 14 in putStrLn $ show $ baz () } foo :: (?x :: Int) => Int foo = ?x -- Check that defaulting works too baz () = ?x
ezyang/ghc
testsuite/tests/typecheck/should_run/tcrun012.hs
bsd-3-clause
272
0
11
75
93
51
42
7
1
module Q where q = "DO NOT SEE ME"
mydaum/cabal
cabal-testsuite/PackageTests/InternalLibraries/q/Q.hs
bsd-3-clause
35
0
4
9
9
6
3
2
1
---------------------------------------------------------------- -- -- | aartifact -- http://www.aartifact.org/ -- -- Contributors to this module: -- Andrei Lapets -- David House -- -- @src\/ContextHypergraph.hs@ -- -- Data structure for a hypergraph with a defined closure -- function. -- -----------------...
aartifact/aartifact-verifier
src/ContextHypergraph.hs
mit
5,263
14
24
1,440
2,911
1,621
1,290
90
20
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} module Data.Matrix.Hermitian.Banded (BandedHMatrix(..) ,vecChangeRep ,TriangularRepr ,upperRep ,lowerRep ...
lensky/hs-matrix
lib/Data/Matrix/Hermitian/Banded.hs
mit
8,204
0
18
2,936
2,585
1,391
1,194
178
4
{-# LANGUAGE ScopedTypeVariables #-} module Real ( real ) where import Test.QuickCheck.Checkers (EqProp, inverseL) import Test.Tasty (testGroup, TestTree) import Test.Tasty.QuickCheck (testProperty, Arbitrary) real :: forall a. (Arbitrary a, EqProp a, Show a, Fractional a, Real a) => (a -> Rational) -> T...
expipiplus1/exact-real
test/Real.hs
mit
845
0
15
308
205
113
92
16
1
{-# LANGUAGE TemplateHaskell #-} module Main where import Criterion.Main import Language.Haskell.TH import Language.Haskell.TH.Syntax import Examples import Database.HLINQ.Deconstructor import Database.HLINQ.Utilities import System.IO.Unsafe import qualified Query as HDB normalisedCompose fun = do exp <- runQ $ (no...
juventietis/HLINQ
benchmark/Main.hs
mit
4,599
35
11
1,113
341
197
144
-1
-1
-- This module manages the movement through Hyperspace -- and the transistion from a ship being in Hyperspace -- to being landed on a destination planet module IX.Universe.HyperSpace (manageTravel ,evalHyp ,evalSetSpeed ,evalHypComm ,evalMove ,commTransitions ,changeShip ,getName ,getPlanet ...
mlitchard/IX
src/IX/Universe/HyperSpace.hs
mit
9,033
0
17
3,292
2,306
1,201
1,105
187
8
-- Imports import qualified Data.Map.Strict as M import Data.Map.Strict((!)) import Utils import System.Environment --import Debug.Trace import qualified FeatherweightJava as FJ -- Data types type KlassName = String type MethodName = String type FieldName = String type ObjectName = String data KlassType = SimpleKlas...
swistak35/fgj_interpreter
main_fgj.hs
mit
19,542
0
17
5,418
6,138
3,154
2,984
282
5
{-# LANGUAGE CPP #-} {-# LANGUAGE BangPatterns #-} module Control.Applicative.Extra ( dispatchA , dispatchByA , dispatchWhenA ) where import Prelude (error) import Data.List import Data.String import Data.Bool import Data.Eq import Data.Function import Data.Int -- import Data.Ord import Data.Functor import Saf...
circuithub/circuithub-prelude
Control/Applicative/Extra.hs
mit
4,005
0
14
813
976
547
429
50
5
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE OverloadedStrings #-} module Text.Html.PigLet.Th ( makeTemplate , setContent , embedContent , addAttr , pass , Selector (..)) where import Util.BlazeFromHtml hiding (main) import Util.GenerateHtmlCombinators hiding (main) import Text.HTML.TagSoup im...
kkspeed/PigLet
src/Text/Html/PigLet/Th.hs
mit
5,284
1
14
1,222
1,551
831
720
111
3
module Parser where import Text.ParserCombinators.Parsec import Control.Applicative hiding ((<|>)) import Stack number :: Parser String number = many1 digit minus :: Parser String minus = (:) <$> char '-' <*> number integer :: Parser String integer = {- plus <|> -} minus <|> number float :: Parser Float float = ...
JonHarder/RPNCalc
src/Parser.hs
mit
1,330
0
12
331
500
251
249
52
6
{-# OPTIONS_GHC -fno-warn-orphans #-} module Integration.Foreign.Lua.APISpec (spec) where import qualified Data.Text as T import TestImport hiding (assertEqual) import Test.HUnit (assertEqual, assertFailure) import qualified Foreign.Lua as Lua import Foreign.Lua.Types (LuaExtra(LuaExtra...
rzetterberg/alven
src/test/Integration/Foreign/Lua/APISpec.hs
mit
3,498
0
20
1,053
730
349
381
67
2
riffle :: [a] -> [a] -> [a] riffle xs ys = concat [[x,y] | (x,y) <- xs `zip` ys]
AkronCodeClub/edX-FP101x-Oct-2014
ryan_p/HW1029/Riffle.hs
mit
81
0
9
19
69
38
31
2
1
module Auth0.API.Management where
kelecorix/api-auth0
src/Auth0/API/Management.hs
mit
35
0
3
4
7
5
2
1
0
{-# OPTIONS_GHC -Wall #-} module LogAnalysis ( module Log , parseMessage , parse , insert , build , inOrder , whatWentWrong ) where import Log parseMessage :: String -> LogMessage parseMessage line = cas...
mgrabovsky/upenn-cis194
hw02/LogAnalysis.hs
cc0-1.0
1,556
0
12
515
557
287
270
37
4
module System.DevUtils.MySQL.Helpers.Databases.Default ( default', default'List ) where import System.DevUtils.MySQL.Helpers.Databases.Include (Databases(..)) default' :: Databases default' = Databases { _database = Nothing } default'List :: [Databases] default'List = []
adarqui/DevUtils-MySQL
src/System/DevUtils/MySQL/Helpers/Databases/Default.hs
gpl-3.0
278
0
6
33
69
46
23
9
1
-------------------------------------------------------------------------------- {-# LANGUAGE GeneralizedNewtypeDeriving #-} -------------------------------------------------------------------------------- -- | -- Module : Melkor.BuildMap -- Description : 'BuildMap' type definition -- Copyright : (c) Boris Bul...
d12frosted/environment
melkor/src/Melkor/BuildMap.hs
gpl-3.0
3,452
0
16
650
744
403
341
84
2
{-# LANGUAGE PackageImports #-} import "audidoza" Application (getApplicationDev) import Network.Wai.Handler.Warp (runSettings, defaultSettings, setPort) import Control.Concurrent (forkIO) import System.Directory (doesFileExist, removeFile) import System.Exit (exitSuccess) import Control.Concurrent (threadDelay) m...
c0c0n3/audidoza
devel.hs
gpl-3.0
679
2
10
104
193
100
93
21
2
-- Print out the nth prime, where n is the 1st argument module Main where import GalePrimes2 (primes) import System (getArgs) printNthPrime :: Int -> IO () printNthPrime n = print (n, primes !! (n - 1)) main = do args <- getArgs printNthPrime $ read $ head args
dkensinger/haskell
haskell-primes/GalePrimes2Test.hs
gpl-3.0
275
0
9
62
89
48
41
8
1
-- Copyright 2015 Oleg Plakhotniuk -- -- This file is part of Hinance. -- -- Hinance is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- (at your option) any later version....
hinance/hinance
src/hs/user_type.hs
gpl-3.0
1,314
0
9
240
260
161
99
15
0
-- | All possible runtime errors in Mintette module RSCoin.Mintette.Error ( MintetteError (..) , isMEInactive , logMintetteError ) where import Control.Exception (Exception (..), SomeException) import Control.Monad.Trans (MonadIO) import Data.Message...
input-output-hk/rscoin-haskell
src/RSCoin/Mintette/Error.hs
gpl-3.0
5,047
0
12
1,658
1,029
565
464
91
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-compute/gen/Network/Google/Resource/Compute/HealthChecks/Delete.hs
mpl-2.0
3,342
0
15
774
388
233
155
65
1
module Game.Toliman.Graphical.SDL.Events where import Data.Functor ((<$>)) import Foreign.Storable (peekElemOff) import Control.Monad.Lift.IO (liftIO) import Graphics.UI.SDL as SDL (Event, pumpEvents, peepEvents, pattern SDL_GETEVENT, pattern SDL_FIRSTEVENT, pattern SDL_LASTEVENT) import Game.Toliman.Inte...
duncanburke/toliman-graphical
src-lib/Game/Toliman/Graphical/SDL/Events.hs
mpl-2.0
983
0
21
176
298
168
130
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-analytics/gen/Network/Google/Resource/Analytics/Management/AccountUserLinks/Update.hs
mpl-2.0
4,204
0
16
937
466
278
188
80
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/Projects/Locations/WorkLoadIdentityPools/List.hs
mpl-2.0
7,376
0
19
1,613
964
558
406
147
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/Hl7V2Stores/TestIAMPermissions.hs
mpl-2.0
7,508
0
16
1,444
791
467
324
126
1
---------------------------------------------------------------------- -- | -- Module : Graphics.UI.Awesomium.Javascript.JSArray -- Copyright : (c) 2012 Maksymilian Owsianny -- License : LGPL-3 (see the file LICENSE) -- -- Maintainer : Maksymilian.Owsianny+Awesomium@gmail.com -- Stability : Experime...
MaxOw/awesomium
src/Graphics/UI/Awesomium/Javascript/JSArray.hs
lgpl-3.0
1,113
0
11
200
228
131
97
22
1
-- | -- Module : Numeric.Optimization.Hopty -- Maintainer : Yakov Shklarov <yshklarov@gmail.com> module Numeric.Optimization.Hopty (newton, graddes, patternsearch, coorddes) where import Data.List import Data.Ord -- | Larger values will cause less precise results. epsilon :: RealFloat a => a ep...
yshklarov/hopty
Numeric/Optimization/Hopty.hs
unlicense
4,254
0
16
1,419
1,128
593
535
76
1
{- Copyright 2016, Dominic Orchard, Andrew Rice, Mistral Contrastin, Matthew Danish 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 the License at http://www.apache.org/licenses/LICENSE-2.0 ...
dorchard/camfort
src/Camfort/Specification/Stencils/Syntax.hs
apache-2.0
10,412
1
15
2,708
3,084
1,612
1,472
197
3
{- Copyrights (c) 2016. Samsung Electronics Ltd. All right reserved. 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 the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable l...
ryzhyk/cocoon
cocoon/P4/Header.hs
apache-2.0
5,613
0
11
1,694
218
124
94
34
5
--Modules. --import Data.List -- :m + Data.List Data.Map Data.Set --No GHCI -- import Data.List (nub, sort) --Métodos específicos -- import Data.List hiding (nub) --Retira método específico -- import qualified Data.Map as M -- Com namespace (customizado) import Data.List import Data.Char import qualified Data.Map as ...
WillGluck/HaskellPlayground
modulesPlayground.hs
apache-2.0
8,070
10
12
1,381
1,011
596
415
38
2
module Auth0.Management.Rules where -------------------------------------------------------------------------------- import Data.Aeson import Data.Proxy import Data.Text import GHC.Generics import Servant.API import Servant.Client -------------------------------------------------------------------------------- import ...
alasconnect/auth0
src/Auth0/Management/Rules.hs
apache-2.0
3,305
0
11
564
726
385
341
-1
-1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QTextFrame.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:21 Warning : this file is machine generated - do no...
uduki/hsQt
Qtc/Gui/QTextFrame.hs
bsd-2-clause
11,437
0
14
1,867
3,559
1,800
1,759
-1
-1
-- {-# INCLUDE <FTGL/ftgl.h> #-} {-# LANGUAGE ForeignFunctionInterface #-} {-# OPTIONS_GHC -O2 -fglasgow-exts #-} -- | * Author: Jefferson Heard (jefferson.r.heard at gmail.com) -- -- * Copyright 2008 Renaissance Computing Institute < http://www.renci.org > -- -- * License: GNU LGPL -- -- * Compatibility GHC...
rvion/ftgl-haskell
Graphics/Rendering/FTGL.hs
bsd-2-clause
13,377
0
13
2,283
2,552
1,349
1,203
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE LambdaCase #-} ...
oisdk/Expr
expr-playgrounds/src/Numeric/Expr.hs
bsd-3-clause
15,483
0
18
5,124
7,232
3,712
3,520
-1
-1
module ParsecExpr(module Text.ParserCombinators.Parsec.Expr) where import Text.ParserCombinators.Parsec.Expr
OS2World/DEV-UTIL-HUGS
oldlib/ParsecExpr.hs
bsd-3-clause
109
0
5
6
21
15
6
2
0
-- Copyright (c) 2016-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. An additional grant -- of patent rights can be found in the PATENTS file in the same directory. module Duckling.D...
rfranek/duckling
tests/Duckling/Distance/KO/Tests.hs
bsd-3-clause
603
0
9
96
80
51
29
11
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} module Path.CheckInstall where import Control.Monad.Extra (anyM, (&&^)) import qualified Data.Text as T import Stack.Prelude import qualified System.Directory as D import qualified System.FilePa...
MichielDerhaeg/stack
src/Path/CheckInstall.hs
bsd-3-clause
2,507
0
24
1,051
417
219
198
46
3
{-# LANGUAGE RankNTypes #-} module FreeM where import Control.Monad import Data.Profunctor newtype FreeM a = FreeM { foldM :: forall m. Monoid m => (a -> m) -> m } instance Monoid (FreeM a) where mempty = FreeM $ const mempty mappend (FreeM a) (FreeM b) = FreeM $ liftM2 mappend a b lift :: a -> FreeM a lift a ...
isovector/category-theory
src/FreeM.hs
bsd-3-clause
412
0
11
93
177
94
83
12
1
{-# LANGUAGE CPP #-} #if __GLASGOW_HASKELL__ >= 800 {-# LANGUAGE TemplateHaskellQuotes #-} #else {-# LANGUAGE TemplateHaskell #-} #endif ------------------------------------------------------------------------------ -- | -- Module: Database.PostgreSQL.Simple.TypeInfo.Macro -- Copyright: (c) 2013 Leon P Smith --...
tomjaguarpaw/postgresql-simple
src/Database/PostgreSQL/Simple/TypeInfo/Macro.hs
bsd-3-clause
1,721
0
12
303
330
188
142
22
1
module System.Timeout.Resettable ( module System.Timeout.Resettable.ADT ) where import System.Timeout.Resettable.ADT
basvandijk/resettable-timeouts
System/Timeout/Resettable.hs
bsd-3-clause
117
0
5
9
24
17
7
2
0
{-# LANGUAGE NoImplicitPrelude #-} -- -- Photon map generator -- module Main where import Control.Monad import NumericPrelude import Ray.Algebra import Ray.Physics import Ray.Light import Tracer import Scene nphoton = 10000 :: Int main :: IO () main = do let tflux = sum $ map flux lgts putStrLn $ show (tflux...
eijian/raytracer
app/old/Main-0.hs
bsd-3-clause
529
0
13
113
192
97
95
20
1
{-# Language DeriveDataTypeable #-} {-# Language LambdaCase #-} {-# Language OverloadedStrings #-} {-# Language TemplateHaskell #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Test.River.Arbitrary ( X(..) ) where import Data.Char (ord) import qualified Data.HashSet as HashSet import qualified Data.Tex...
jystic/river
test/Test/River/Arbitrary.hs
bsd-3-clause
4,479
0
16
1,157
1,257
653
604
151
5
{-# LANGUAGE Rank2Types, TemplateHaskell, BangPatterns, MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances, UndecidableInstances, ScopedTypeVariables #-} ----------------------------------------------------------------------------- -- | -- Module : Numeric.AD.Mode.Chain -- Copyright : (c) Edward ...
yairchu/ad
src/Numeric/AD/Mode/Chain.hs
bsd-3-clause
8,247
0
14
1,684
2,239
1,181
1,058
78
1
{-# LANGUAGE CPP, NamedFieldPuns, NondecreasingIndentation #-} {-# OPTIONS_GHC -fno-cse #-} -- -fno-cse is needed for GLOBAL_VAR's to behave properly ----------------------------------------------------------------------------- -- -- GHC Driver -- -- (c) The University of Glasgow 2005 -- ------------------------------...
holzensp/ghc
compiler/main/DriverPipeline.hs
bsd-3-clause
97,028
0
31
33,916
15,933
8,042
7,891
1,383
44
-- Copyright (c) 2016-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. An additional grant -- of patent rights can be found in the PATENTS file in the same directory. {-# LANGUAGE GADT...
rfranek/duckling
Duckling/Rules/IT.hs
bsd-3-clause
1,397
0
7
196
350
207
143
29
1
-- Copyright (c) 2016-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. An additional grant -- of patent rights can be found in the PATENTS file in the same directory. {-# LANGUAGE Over...
rfranek/duckling
Duckling/Numeral/CS/Corpus.hs
bsd-3-clause
1,094
0
9
353
190
114
76
28
1
{-# LANGUAGE OverloadedStrings #-} module Is_Point_In_Path where import Graphics.Blank import Wiki -- (400,400) main :: IO () main = blankCanvas 3000 $ \ context -> do send context $ do strokeStyle "blue"; beginPath(); rect(100,100,200,200) cmds <- sequence [ do ...
ku-fpg/blank-canvas
wiki-suite/Is_Point_In_Path.hs
bsd-3-clause
824
0
22
349
263
131
132
23
2
module ScrabbleScoreKata.Day8Spec (spec) where import Test.Hspec import ScrabbleScoreKata.Day8 (score) spec :: Spec spec = do it "is zero when given an empty input" $ do score "" `shouldBe` 0 it "is 1 when given lowercase 'a'" $ do score "a" `shouldBe` 1 ...
Alex-Diez/haskell-tdd-kata
old-katas/test/ScrabbleScoreKata/Day8Spec.hs
bsd-3-clause
1,080
0
11
391
268
128
140
26
1
{-# LANGUAGE FlexibleContexts #-} import Plots import Plots.Axis import Plots.Types hiding (B) import Data.List import Dataset import Diagrams.Prelude import Diagrams.Backend.Rasterific mydata1 = [(1,3), (2,5.5), (3.2, 6), (3.5, 6.1)] mydata2 = mydata1 & each . _1 *~ 0.5 mydata3 = [V2 1.2 2.7, V2 2 5.1, V2 3.2 2.6,...
bergey/plots
examples/others.hs
bsd-3-clause
1,113
8
9
236
527
283
244
-1
-1
{-#Language DeriveFunctor , DeriveFoldable , DeriveTraversable #-} module Language.TheExperiment.AST.Module where import Text.Parsec.Pos import Data.Foldable import Data.Traversable import Language.TheExperiment.AST.Statement data Module a = Module SourcePos [Definition a] deriving...
jvranish/TheExperiment
src/Language/TheExperiment/AST/Module.hs
bsd-3-clause
370
0
8
72
77
46
31
10
0
import Test.DocTest main = doctest ["-isrc:console", "Main"]
garethrowlands/marsrover
src/Doctests.hs
bsd-3-clause
61
0
6
7
20
11
9
2
1
-- Applicative parser for infix arithmetic expressions without any -- dependency on hackage. Builds an explicit representation of the -- syntax tree to fold over using client-supplied semantics. module Spring13.Week5.Parser (parseExp) where import Control.Applicative hiding (Const) import Control.Arrow import Data.Char...
bibaijin/cis194
src/Spring13/Week5/Parser.hs
bsd-3-clause
3,758
0
15
977
1,144
598
546
65
3
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeOperators #-} ----------------------------------------------------------------------------- -- | -- Module : Servant.Matlab -- License : BSD3 -- Maintainer : Greg Hale <imalsogreg@g...
imalsogreg/servant-matlab
src/Servant/Matlab.hs
bsd-3-clause
4,665
0
12
1,130
529
323
206
45
1
{-# LANGUAGE RecordWildCards #-} module System.IO.Streams.Realtime where ------------------------------------------------------------------------------ import Control.Concurrent (threadDelay) import Control.Monad (when,(>=>)) import Data.Time ...
imalsogreg/realtime-streams
src/System/IO/Streams/Realtime.hs
bsd-3-clause
3,100
0
14
796
670
350
320
44
1
{- SockeyeASTMeta.hs: AST metadata for Sockeye Part of Sockeye Copyright (c) 2018, ETH Zurich. All rights reserved. This file is distributed under the terms in the attached LICENSE file. If you do not find this file, copies can be found by writing to: ETH Zurich D-INFK, CAB F....
kishoredbn/barrelfish
tools/sockeye/SockeyeASTMeta.hs
mit
741
0
9
182
111
60
51
9
0
{-# OPTIONS_GHC -F -pgmF htfpp -fno-warn-missing-signatures #-} module MultiTrieTest where import Prelude hiding (null, repeat, map) import Data.MultiTrie import Data.Int import qualified Data.Map as M import qualified Data.List as L import Test.Framework {-# ANN module "HLint: ignore Use camelCase" #-} type TestMu...
vadimvinnik/multi-trie
tests/MultiTrieTest.hs
mit
6,168
0
13
2,128
2,643
1,381
1,262
159
1
-- | Open a window and get an OpenGL context. module Window (UI(..), initGL, terminate, EventKey(..)) where import Control.Concurrent.STM (TQueue, atomically, newTQueueIO, tryReadTQueue, writeTQueue) import Prelude hiding (init) import Control.Applicative import Control.Monad (when) import Data.IORef import Data.Ma...
bgaster/blocks
Window.hs
mit
3,987
0
15
900
1,052
523
529
82
1
{-# LANGUAGE CPP #-} {- Copyright (C) 2009 John MacFarlane <jgm@berkeley.edu>, Anton van Straaten <anton@appsolutions.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 2 of the Lice...
bergmannf/gitit
src/Network/Gitit/ContentTransformer.hs
gpl-2.0
29,756
0
27
9,057
5,384
2,815
2,569
507
21
<?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="fr-FR"> <title>Python Scripting</title> <maps> <homeID>top</homeID> <mapref location="...
veggiespam/zap-extensions
addOns/jython/src/main/javahelp/org/zaproxy/zap/extension/jython/resources/help_fr_FR/helpset_fr_FR.hs
apache-2.0
967
79
66
157
409
207
202
-1
-1
{-# LANGUAGE DeriveFoldable, DeriveFunctor, DeriveTraversable #-} module Ermine.Core.Module ( Module(Module) , definitions , termExports , instances , types , dataDecls ) where import Control.Applicative import Control.Lens import Data.Binary as Binary import Data.Bytes.Serial import Data.ByteString import Data...
PipocaQuemada/ermine
src/Ermine/Core/Module.hs
bsd-2-clause
2,792
0
14
552
1,074
562
512
70
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE Safe #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Functor.Compose -- Copyright : (c) Ross Paterson 2010 -- License : BSD-style (see the file...
vTurbine/ghc
libraries/base/Data/Functor/Compose.hs
bsd-3-clause
3,246
0
10
676
985
532
453
50
0
{-# LANGUAGE NamedFieldPuns #-} -- | Pure functions for working with CompileState module Fay.Compiler.State where import Fay.Compiler.Misc import Fay.Compiler.QName import qualified Fay.Exts.NoAnnotation as N import Fay.Types import qualified Data.Map as M import ...
beni55/fay
src/Fay/Compiler/State.hs
bsd-3-clause
2,774
0
15
622
729
408
321
42
4
-- | -- Module : Crypto.Cipher.Types -- License : BSD-style -- Maintainer : Vincent Hanquez <vincent@snarc.org> -- Stability : Stable -- Portability : Excellent -- -- Symmetric cipher basic types -- {-# LANGUAGE DeriveDataTypeable #-} module Crypto.Cipher.Types ( -- * Cipher classes Cipher(..)...
vincenthz/cryptonite
Crypto/Cipher/Types.hs
bsd-3-clause
878
0
5
210
139
103
36
22
0
{-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE DataKinds #-} module Haskell.Ide.Engine.Transport.JsonHttp.Undecidable where import Data.Singletons.Prelude import Haskell.Ide.Engine.PluginDescriptor data ContextMappingFun...
JPMoresmau/haskell-ide-engine
src/Haskell/Ide/Engine/Transport/JsonHttp/Undecidable.hs
bsd-3-clause
567
0
8
67
97
61
36
-1
-1
-- -- Copyright © 2013-2015 Anchor Systems, Pty Ltd and Others -- -- The code in this file, and the program it is a part of, is -- made available to you by its authors as open source software: -- you can redistribute it and/or modify it under the terms of -- the 3-clause BSD licence. -- {-# LANGUAGE DeriveDataTypeable...
jasonzoladz/oauth2-server
lib/Network/OAuth2/Server/Types/Client.hs
bsd-3-clause
7,280
0
15
2,299
1,127
654
473
111
4
{- | Module : $Header$ Description : convert global annotations to a list of annotations Copyright : (c) Carsten Fischer and Uni Bremen 2003-2006 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portability : portable Convert global annotati...
keithodulaigh/Hets
Common/ConvertGlobalAnnos.hs
gpl-2.0
3,437
0
19
819
1,058
558
500
72
4
module Prolog.Substitution where import Prolog.Data import Data.Map (Map) import qualified Data.Map as M import Data.Set (Set) import qualified Data.Set as S import Control.Monad ( guard ) type Substitution = Map Identifier Term apply :: Substitution -> Term -> Term apply sub t = case t of Variable v -> case...
Erdwolf/autotool-bonn
src/Prolog/Substitution.hs
gpl-2.0
806
0
11
234
334
174
160
28
3
----------------------------------------------------------------------------- -- Dummy module to import all of the Hugs libraries; programmers should -- normally be more selective than this when it comes to specifying the -- modules that a particular program depends on. -- -- Suitable for use with Hugs 98 -------------...
OS2World/DEV-UTIL-HUGS
oldlib/HugsLibs.hs
bsd-3-clause
652
0
3
70
42
31
11
11
0
module SortTest where import Util.Sort import Test.HUnit tests = test [ "test1" ~: "quicksort [0]," ~: [0] ~=? (quicksort [0]), "test2" ~: "quicksort [1,0,2]," ~: [0,1,2] ~=? (quicksort [1,0,2]) ] -- test1 = TestCase (assertEqual "quicksort [0]," [0] (quicksort [0])) -- test2 = TestCase (assertEqual "...
tohosokawa/haskell-dev-env
Test/SortTest.hs
bsd-3-clause
440
0
10
78
91
54
37
5
1
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="da-DK"> <title>SVN Digger Files</title> <maps> <homeID>svndigger</homeID> <mapref locat...
thc202/zap-extensions
addOns/svndigger/src/main/javahelp/help_da_DK/helpset_da_DK.hs
apache-2.0
967
77
66
157
409
207
202
-1
-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="es-ES"> <title>DOM XSS Active Scan Rule | ZAP Extension</title> <maps> <homeID>top</homeID> ...
kingthorin/zap-extensions
addOns/domxss/src/main/javahelp/org/zaproxy/zap/extension/domxss/resources/help_es_ES/helpset_es_ES.hs
apache-2.0
985
78
66
162
419
212
207
-1
-1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE OverloadedStrings #-} -- | Test suite for "Stack.Solver" module Stack.SolverSpec where import Data.Text (unpack) import Stack.Prelude import Stack.Types.FlagName import Stack.Types.PackageName impor...
MichielDerhaeg/stack
src/test/Stack/SolverSpec.hs
bsd-3-clause
1,546
0
13
350
294
154
140
38
1
module Case3 where data T = C2 Int caseIt x = case x of 42 -> 1 + (f ((error "C1 no longer defined for T at line: 3") 1 2)) where f x = 9
kmate/HaRe
old/testing/removeCon/Case3AST.hs
bsd-3-clause
280
0
14
178
65
34
31
9
1
module AddOneParameter.C2 where import AddOneParameter.D2 sumSquares1 (x:xs) = (sq sq_f) x + sumSquares1 xs sumSquares1 [] = 0 sq_f_1 = 0
RefactoringTools/HaRe
test/testdata/AddOneParameter/C2.expected.hs
bsd-3-clause
145
0
8
28
57
30
27
5
1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP, MagicHash, NoImplicitPrelude #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.Event.IntMap -- Copyright : (c) Daan Leijen 2002 -- (c) Andriy Palamarchuk 2008 -- License : BSD-style -- Maint...
mightymoose/liquidhaskell
benchmarks/ghc-7.4.1/Event/IntMap.hs
bsd-3-clause
12,045
0
26
3,282
2,960
1,547
1,413
174
4
f :: Int -> Int -> Int f x y = x + y g :: (Int, Int) -> Int g (x,y) = x + y main = do print $ curry g 3 4 print $ uncurry f (3,4)
manyoo/ghcjs
test/fay/curry.hs
mit
137
0
9
47
98
51
47
7
1
{-# LANGUAGE FlexibleContexts, MultiParamTypeClasses, FlexibleInstances #-} module T13526 where class C a where op :: a -> a instance {-# OVERLAPPING #-} C [Char] where op x = x instance C a => C [a] where op (x:xs) = [op x] instance C a => C (Maybe a) where op x = error "urk" -- We should get no complain...
ezyang/ghc
testsuite/tests/typecheck/should_compile/T13526.hs
bsd-3-clause
418
0
8
104
193
99
94
14
1
---------------------------------------------------------------------------- -- demo_cqm_recipient.hs demonstrator code how to use CMQ. -- Copyright : (c) 2012 Joerg Fritsch -- -- License : BSD-style -- Maintainer : J.Fritsch@cs.cardiff.ac.uk -- Stability : experimental -- Portability : GHC -- -- Receives and ...
viloocity/CMQ
examples/0.0.1/demo_cmq_recipient.hs
mit
893
0
12
159
136
73
63
13
1
{-# LANGUAGE DeriveGeneric, ViewPatterns, RecordWildCards, OverloadedStrings, CPP #-} module ReportTypes where import qualified Data.Map as M import Data.Aeson import Data.Aeson.Types import GHC.Generics import Text.Printf import Data.List import Data.Char import Paths import ReadResult import qualified BenchmarkSet...
nomeata/gipeda
src/ReportTypes.hs
mit
9,495
0
16
2,369
2,523
1,356
1,167
217
2
-- if we want to map an IO function -- through a list we might make: -- map print [1, 2, 3] will make [print 1, print 2, print 3] -- we need to make instead: -- sequence (map print [1, 2, 3, 4, 5]) -- or better yet: main = mapM print [1, 2, 3]
fabriceleal/learn-you-a-haskell
09/mapMs.hs
mit
255
0
6
67
26
17
9
1
1
{-# htermination addListToFM_C :: Ord a => (b -> b -> b) -> FiniteMap a b -> [(a,b)] -> FiniteMap a b #-} import FiniteMap
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/FiniteMap_addListToFM_C_1.hs
mit
123
0
3
25
5
3
2
1
0
{-# LANGUAGE ViewPatterns #-} module Core.LambdaLift.Abstract.Naive ( abstract ) where import Common import Core.AST import Core.AnnotAST import qualified Data.Set as S abstract :: AnnotProgram (S.Set Name) Name -> Program Name abstract = Program . map abstractSC . getProgramF where abstractSC (SupercombF name ar...
meimisaki/Rin
src/Core/LambdaLift/Abstract/Naive.hs
mit
1,117
0
15
226
454
229
225
25
7