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 CPP #-} ----------------------------------------------------------------------------- -- -- Generating machine code (instruction selection) -- -- (c) The University of Glasgow 1996-2013 -- ----------------------------------------------------------------------------- {-# LANGUAGE GADTs #-} module SPARC.Co...
sdiehl/ghc
compiler/nativeGen/SPARC/CodeGen.hs
bsd-3-clause
23,833
0
29
7,876
4,926
2,440
2,486
413
68
-------------------------------------------------------------------------------- -- | -- Module : Network.Cosmodesic.Values -- Copyright : (C) 2015 Yorick Laupa -- License : (see the file LICENSE) -- -- Maintainer : Yorick Laupa <[email protected]> -- Stability : provisional -- Portability : non-portable -- ----------...
YoEight/cosmodesic
Network/Cosmodesic/Values.hs
bsd-3-clause
2,028
0
11
196
301
170
131
22
2
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} module Language.Haskell.Liquid.Types.Variance ( Variance(..), VarianceInfo ) where import Prelude hiding (error) import Control.DeepSeq import Data.Typeable import Data.Data import GHC.Generics type VarianceInfo = [Variance] data Variance = Inva...
ssaavedra/liquidhaskell
src/Language/Haskell/Liquid/Types/Variance.hs
bsd-3-clause
447
0
6
72
103
64
39
12
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. {-# LANGUAGE Over...
rfranek/duckling
Duckling/Time/FR/Corpus.hs
bsd-3-clause
28,593
0
11
11,884
8,909
5,464
3,445
583
1
{-# LANGUAGE OverloadedStrings #-} import Web.Scotty import Data.Monoid (mconcat) main = scotty 3000 $ do get "/:word" $ do beam <- param "word" html $ mconcat ["<h1>Scotty, ", beam, " me up!</h1>"]
jhedev/sloppy-test
app/Main.hs
bsd-3-clause
212
0
13
45
68
34
34
7
1
module LambdaQuest.LetPoly.PrettyPrint (prettyPrintTypeP ,prettyPrintType ,prettyPrintTypeSchemeP ,prettyPrintTermP ,prettyPrintTerm ) where import LambdaQuest.LetPoly.Type import LambdaQuest.LetPoly.Parse (NameBinding(..)) varNames :: [NameBinding] -> [String] varNames = foldr (\x ys -> case x of ...
minoki/LambdaQuest
src/LambdaQuest/LetPoly/PrettyPrint.hs
bsd-3-clause
4,913
0
18
1,341
1,485
718
767
78
26
{-# LANGUAGE MultiParamTypeClasses, TypeFamilies, FlexibleContexts #-} {-# LANGUAGE TemplateHaskell, Rank2Types, ScopedTypeVariables #-} {-# OPTIONS -Wall #-} module TuringMachine.State ( TMState(TMState), -- TMState1, initialTMState, TMTrans, compile, --TMState2, initialTMState2, TMTrans2, compile2, ...
davidzhulijun/TAM
TuringMachine/State.hs
bsd-3-clause
2,847
2
13
596
879
476
403
44
1
{-# LANGUAGE CPP, ScopedTypeVariables, OverloadedStrings, LambdaCase #-} ----------------------------------------------------------------------------- -- -- Module : IDE.Leksah -- Copyright : (c) Juergen Nicklisch-Franken, Hamish Mackenzie -- License : GNU-GPL -- -- Maintainer : <maintainer at leksah.or...
jaccokrijnen/leksah
src/IDE/Leksah.hs
gpl-2.0
25,932
0
21
9,151
5,764
2,933
2,831
497
12
-- this example show a image gallery. It advances each 20 seconds and by pressing the button {-# LANGUAGE DeriveDataTypeable #-} import Haste.HPlay.View import Data.Typeable import Control.Applicative newtype GalleryIndex= G Int deriving Typeable main= runBody gallery gallery :: Widget () gallery = p "this example...
agocorona/tryhplay
examples/gallery.hs
gpl-3.0
1,372
0
19
221
225
117
108
24
2
<?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="ro-RO"> <title>Replacer | ZAP Extension</title> <maps> <homeID>top</homeID> <mapref lo...
veggiespam/zap-extensions
addOns/replacer/src/main/javahelp/org/zaproxy/zap/extension/replacer/resources/help_ro_RO/helpset_ro_RO.hs
apache-2.0
970
80
66
159
413
209
204
-1
-1
module CoinJam where import Data.List import Data.Set (Set) import qualified Data.Set as Set import Prime import Data.Maybe getCoinJam :: String -> String getCoinJam x = getCoinJamByNum y z where datas = words x y = read (head datas)::Int z = read (last datas)::Int getCoinJamByNum :: Int -> Int...
lihlcnkr/codejam
src/QR/CoinJam.hs
apache-2.0
1,285
0
18
281
626
342
284
30
2
{- | Module : $Header$ Description : symbol map analysis for the CASL logic. Copyright : (c) Till Mossakowski, C. Maeder and Uni Bremen 2002-2005 License : GPLv2 or higher, see LICENSE.txt Maintainer : [email protected] Stability : provisional Portability : portable Symbol map analysis for...
keithodulaigh/Hets
CASL/SymbolMapAnalysis.hs
gpl-2.0
26,714
0
24
7,738
6,304
3,184
3,120
396
6
module Base.Application ( appState, runAppState, setRenderable, ) where import Control.Monad.State.Strict (get, evalStateT) import Graphics.Qt import Utils import Base.Types import Base.Renderable.Common () appState :: Renderable r => r -> M AppState -> AppState appState r = AppState (RenderableI...
geocurnoff/nikki
src/Base/Application.hs
lgpl-3.0
1,873
0
11
398
638
302
336
46
1
{-# LANGUAGE TemplateHaskell, FlexibleInstances, MultiParamTypeClasses #-} -- | Talk to hot chixxors. -- (c) Mark Wotton -- Serialisation (c) 2007 Don Stewart module Plugin.Vixen where -- import Data.Int (for code to read old state data) import Data.Binary import Data.Binary.Put import Data.Binary.Get import Contr...
zeekay/lambdabot
Plugin/Vixen.hs
mit
3,530
0
20
1,044
802
427
375
58
1
module Syntax where data Expr = Var String | Num Int | Print Expr | Assign String Int deriving (Eq,Show)
FranklinChen/write-you-a-haskell
chapter9/assign/Syntax.hs
mit
116
0
6
31
41
24
17
7
0
<?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="ms-MY"> <title>Automation Framework</title> <maps> <homeID>top</homeID> <mapref locatio...
kingthorin/zap-extensions
addOns/automation/src/main/javahelp/org/zaproxy/addon/automation/resources/help_ms_MY/helpset_ms_MY.hs
apache-2.0
965
77
66
156
407
206
201
-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="tr-TR"> <title>ToDo-List</title> <maps> <homeID>todo</homeID> <mapref location="map.jhm...
thc202/zap-extensions
addOns/todo/src/main/javahelp/help_tr_TR/helpset_tr_TR.hs
apache-2.0
955
77
67
155
408
207
201
-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="id-ID"> <title>Aturan Pindai Pasif | Eksistensi ZAP</title> <maps> <homeID>top</homeID> ...
thc202/zap-extensions
addOns/pscanrules/src/main/javahelp/org/zaproxy/zap/extension/pscanrules/resources/help_id_ID/helpset_id_ID.hs
apache-2.0
980
78
66
160
415
210
205
-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="ro-RO"> <title>AdvFuzzer Add-On</title> <maps> <homeID>top</homeID> <mapref location="m...
kingthorin/zap-extensions
addOns/fuzz/src/main/javahelp/org/zaproxy/zap/extension/fuzz/resources/help_ro_RO/helpset_ro_RO.hs
apache-2.0
961
77
67
156
411
208
203
-1
-1
{-# LANGUAGE CPP, BangPatterns #-} {-# OPTIONS_GHC -Wall -fno-warn-name-shadowing #-} module Main ( main, test, maxDistances ) where import System.Environment import Data.Array.Repa -- <<Graph type Weight = Int type Graph r = Array r DIM2 Weight -- >> -- -------------------------------------------------------------...
prt2121/haskell-practice
parconc/fwdense.hs
apache-2.0
2,331
0
17
785
836
476
360
50
1
<?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="en-GB"> <title>Code Dx | ZAP Extension</title> <maps> <homeID>top</homeID> ...
thc202/zap-extensions
addOns/codedx/src/main/javahelp/org/zaproxy/zap/extension/codedx/resources/help/helpset.hs
apache-2.0
981
90
29
172
403
219
184
-1
-1
{-# LANGUAGE NoImplicitPrelude, MagicHash #-} module GHC.Char (chr) where import GHC.Base import GHC.Show import GHC.HasteWordInt -- | The 'Prelude.toEnum' method restricted to the type 'Data.Char.Char'. chr :: Int -> Char chr i@(I# i#) | isTrue# (i2w i# `leWord#` 0x10FFFF##) = C# (chr# i#) | otherwise = erro...
beni55/haste-compiler
libraries/ghc-7.8/base/GHC/Char.hs
bsd-3-clause
385
0
11
68
116
61
55
10
1
{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Client.Setup -- Copyright : (c) David Himmelstrup 2005 -- License : BSD-like -- -- Maintainer : [email protected] -- Stability : provisional -- Portability : portable -- --...
gridaphobe/cabal
cabal-install/Distribution/Client/Setup.hs
bsd-3-clause
92,305
0
40
25,805
18,729
10,545
8,184
1,787
5
import Control.Concurrent import Control.Exception import Control.Monad import System.IO import System.Environment -- test for deadlocks main = do hSetBuffering stdout NoBuffering [n] <- getArgs replicateM_ (read n) $ do chan <- newChan wid <- forkIO $ forever $ writeChan chan (5::Int) ...
holzensp/ghc
libraries/base/tests/Concurrent/Chan002.hs
bsd-3-clause
505
1
13
141
158
72
86
17
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeFamilies #-} -- | An unstructured grab-bag of various tools and inspection -- functions that didn't really fit anywhere else. module Futhark.Tools ( module Futhark.Construct, redomapToMapAndReduce, dissectScrema, sequentialStreamWholeArray, partition...
HIPERFIT/futhark
src/Futhark/Tools.hs
isc
5,396
0
18
1,132
1,414
721
693
107
2
-- Weather proxy device module Main where import System.ZMQ4.Monadic main :: IO () main = runZMQ $ do -- This is where the weather service sits frontend <- socket XSub connect frontend "tcp://192.168.55.210:5556" -- This is our public endpoint for subscribers backend <- socket XPub bind bac...
soscpd/bee
root/tests/zguide/examples/Haskell/wuproxy.hs
mit
433
0
9
99
79
39
40
9
1
{-# htermination foldFM_LE :: (Float -> b -> c -> c) -> c -> Float -> FiniteMap Float b -> c #-} import FiniteMap
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/FiniteMap_foldFM_LE_6.hs
mit
114
0
3
24
5
3
2
1
0
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.SVGFilterPrimitiveStandardAttributes (js_getX, getX, js_getY, getY, js_getWidth, getWidth, js_getHeight, getHeight, js_getResult, getResult, SVGFilterPrimitiveStandardAttributes, cas...
manyoo/ghcjs-dom
ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/SVGFilterPrimitiveStandardAttributes.hs
mit
3,633
30
10
513
727
424
303
56
1
-- and [] = True -- and (x:xs) = x && and xs and' :: [Bool] -> Bool and' [] = True and' (False:_) = False and' (True:xs) = and' xs concat' :: [[a]] -> [a] concat' [] = [] concat' (x:xs) = x ++ concat xs replicate' :: Int -> a -> [a] replicate' 0 _ = [] replicate' n x = x : replicate' (n - 1) x (!!!) :: [a] -> Int -...
fabioyamate/programming-in-haskell
ch06/ex03.hs
mit
746
1
10
209
461
245
216
27
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE MultiParamTypeClasses #-} module Data.Functors.Wrapped where import Prelude hiding (Functor, fmap) import qualified Prelude import qualified Data.Functor.Contravariant as Contravariant import qualified Data.Functor.Invariant as Invariant import qualified Data.Bifunctor as Bifu...
srijs/haskell-generalized-functors
src/Data/Functors/Wrapped.hs
mit
2,383
0
9
340
728
394
334
34
0
-- 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, RecordWildCards #-} {-# OPTIONS_GHC -Wwarn #-} module Language.Bond.Codegen.Cpp.Util ( openNamespace , closeNamesp...
alfpark/bond
compiler/src/Language/Bond/Codegen/Cpp/Util.hs
mit
5,770
0
16
965
1,330
761
569
-1
-1
module IODiscrete (displayTasks, getFiles, getNewTask, initIO, isGui) where import Data.Char (toLower) import Data.List (stripPrefix) import Data.Map (Map) import qualified Data.Map as Map import Numeric.Natural import System.Directory (doesDirectoryExist, listDirectory) import System.IO import System.IO.Error impo...
dragonrider7225/TodoList
src/IOCmd.hs
mit
3,013
0
17
838
852
450
402
63
6
{-# LANGUAGE CPP #-} module GHCJS.DOM.SVGPathSegArcRel ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.SVGPathSegArcRel #else #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) import GHCJS.DOM.JSFFI...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/SVGPathSegArcRel.hs
mit
361
0
5
33
33
26
7
4
0
module SvgArcSegment ( convertSvgArc ) where import Types radiansPerDegree :: Double radiansPerDegree = pi / 180.0 calculateVectorAngle :: Double -> Double -> Double -> Double -> Double calculateVectorAngle ux uy vx vy | tb >=...
domoszlai/juicy-gcode
src/SvgArcSegment.hs
mit
3,563
0
20
1,287
1,328
698
630
61
1
module Main where import Test.DocTest main :: IO () main = doctest ["src"]
bioboxes/signature-validator
doctest.hs
mit
77
0
6
15
30
17
13
4
1
module GHCJS.DOM.XMLSerializer ( ) where
manyoo/ghcjs-dom
ghcjs-dom-webkit/src/GHCJS/DOM/XMLSerializer.hs
mit
43
0
3
7
10
7
3
1
0
import Text.Printf main = do line <- getLine let arr = (map read $ words line) :: [Double] putStrLn . printf "%.3f" $ sum arr / 3
Voleking/ICPC
references/aoapc-book/BeginningAlgorithmContests/haskell/ch1/ex1-1.hs
mit
137
0
12
34
67
32
35
5
1
{-# LANGUAGE OverloadedStrings #-} -- | Querying for a financial organization takes a -- FinancialOrganizationPermalink, which can be obtained from a -- search. module Data.API.CrunchBase.FinancialOrganizationQuery ( FinancialOrganizationQuery(..) , FinancialOrganizationPermalink(..) ) where i...
whittle/crunchbase
Data/API/CrunchBase/FinancialOrganizationQuery.hs
mit
1,039
0
10
159
200
120
80
20
0
{-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE DeriveG...
SebastianCallh/liu-courses
src/Db/Model.hs
mit
1,306
0
8
296
200
118
82
29
1
-- -- Programazio Funtzionala - 2002/2003 PRAKTIKA Huffman kodeketa -- import DmaAVL import DmaZuBiP --------------------------------------------------------------------------------------- -- OHARRA: txertatuRAVL funtzioaren inplementazioa DmaAVL.hs fitxategian dago -- -- eta modulu horrek esportatu egi...
erral/huffman_kodeketa
praktika.hs
gpl-2.0
4,757
7
16
934
1,728
939
789
77
3
module Test where { f x = let {g y = a + y;a=10} in g 3; }
bredelings/BAli-Phy
tests/optimizer/3/test.hs
gpl-2.0
59
0
9
18
44
25
19
2
1
module Ch7_2 where import qualified Data.Char as C -- given a function that takes pair as parameter add :: Num a => (a,a) -> a add (x,y) = x + y -- Given the curry function cur :: ((a,b) -> c) -> a -> b -> c cur f = \x -> \y -> f (x,y) -- here are examples: -- *Ch7_2> (cur add) 1 2 -- 3 -- *Ch7_2> ((cur add) 1) 2 -...
ardumont/haskell-lab
src/programming-in-haskell/ch7_2.hs
gpl-2.0
3,451
0
12
765
1,139
647
492
51
1
{-# LANGUAGE OverloadedStrings #-} module Estuary.Help.Saborts where import Reflex import Reflex.Dom import Data.Text import GHCJS.DOM.EventM import Estuary.Widgets.Reflex import Estuary.Widgets.Reflex sabortsHelpFile :: MonadWidget t m => m () sabortsHelpFile = divClass "languageHelpContainer" $ divClass "languageHe...
d0kt0r0/estuary
client/src/Estuary/Help/Saborts.hs
gpl-3.0
2,732
0
11
446
654
305
349
77
1
module AutoRefresh (AutoSignal(..), autoSignal, autoRunner) where import Control.Applicative import Control.Concurrent import Control.Exception import Control.Monad import Network.Tremulous.MicroTime import Monad2 import Config data AutoSignal = AutoUpdate | AutoStop | AutoStart | AutoPause | AutoResume deriving Sho...
Cadynum/Apelsin
src/AutoRefresh.hs
gpl-3.0
1,830
4
21
392
628
300
328
52
9
{-# LANGUAGE ScopedTypeVariables #-} module Math.Structure.Tasty.NonZero.SmallCheck where import Data.Functor.Identity import Test.SmallCheck.Series import Math.Structure.Additive instance (Monad m, DecidableZero a, Serial Identity a) => Serial m (NonZero a) where series = generate $ \d -> ...
martinra/algebraic-structures
src/Math/Structure/Tasty/NonZero/SmallCheck.hs
gpl-3.0
409
0
12
91
118
66
52
-1
-1
import Minitel.Minitel import Minitel.Generate.Generator import Minitel.Generate.Configuration import Minitel.Type.MString import Minitel.Type.Videotex import Minitel.UI.Widget import Minitel.UI.Interface import Minitel.UI.Dispatcher import Minitel.UI.TextField -- | Defines the background of our textual user interfac...
Zigazou/HaMinitel
example/testInterface.hs
gpl-3.0
2,063
0
10
793
468
253
215
54
1
module Exprs where data Val = IntV Integer | FloatV Float | CharV Char | StringV String | BooleanV Bool -- since we are implementing a Functional language, functions are -- first class citizens. | LambdaV [String] Expr Env deriving (Show, Eq) ---------------------------------------...
2016-Fall-UPT-PLDA/labs
week-04/Exprs.hs
gpl-3.0
1,695
0
7
601
192
117
75
23
0
module Language.VHDL.Quote.Quoters ( ident , name , expr , seqstm , seqstms , constm , constms , designfile , designunit , libraryunit , primaryunit , contextitem , contextitems , blockdecl , blockdecls , assocel , assocels , wave , procdecl , procdecls , lit , slit , clit ...
truls/language-vhdl-quote
src/Language/VHDL/Quote/Quoters.hs
mpl-2.0
1,837
0
5
304
402
249
153
61
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-cloudprivatecatalogproducer/gen/Network/Google/Resource/CloudPrivateCatalogProducer/Catalogs/TestIAMPermissions.hs
mpl-2.0
5,685
0
16
1,198
778
454
324
115
1
-- A regression test for <https://bugs.freedesktop.org/show_bug.cgi?id=44714>. -- -- log-with-h.bustle is a log file containing a file handle. This used to make -- readPcap call 'error'. module Main where import System.Exit (exitFailure) import Bustle.Loader.Pcap (readPcap) path = "Test/data/log-with-h.bustle" main ...
wjt/bustle
Test/PcapCrash.hs
lgpl-2.1
633
0
15
159
106
56
50
11
2
module Moonbase.Util.Cairo where import qualified Graphics.Rendering.Cairo as Cairo import Moonbase.Core import Moonbase.Theme import Moonbase.Util.Gtk sourceColor :: Color -> Cairo.Render () sourceColor color = Cairo.setSourceRGBA r g b a where (r,g,b,a) = clamp $ parseColorTuple...
felixsch/moonbase-ng
src/Moonbase/Util/Cairo.hs
lgpl-2.1
327
0
8
74
94
54
40
8
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE PartialTypeSignatures #-} {-# LANGUAGE TypeFamilies #-} module Main where ------------------------------------------------------------------------------- import Aws import Aws.D...
alanz/aws-dynamodb-play
src/DynamoDb.hs
unlicense
3,601
0
20
862
947
461
486
82
1
module SimpleJSON ( JValue(..), getString, getInt, getDouble, getBool, getObject, getArray, isNull ) where data JValue = JString String | JNumber Double | JBool Bool | JNull | JObject [(String,...
shashikiranrp/RealWorldHaskell
Chapter 5/SimpleJSON.hs
apache-2.0
994
0
8
310
354
188
166
37
1
module Network.HTTPMock.RequestMatchers ( matchPath , matchEverything , matchMethod , matchPathAndMethod) where import Prelude (and) import ClassyPrelude import Network.HTTPMock.Types import Network....
MichaelXavier/HTTPMock
src/Network/HTTPMock/RequestMatchers.hs
bsd-2-clause
992
0
10
238
239
131
108
22
1
{-# LANGUAGE PatternGuards #-} module IRTS.CodegenJavaScript (codegenJavaScript, codegenNode, JSTarget(..)) where import Idris.AbsSyntax hiding (TypeCase) import IRTS.Bytecode import IRTS.Lang import IRTS.Simplified import IRTS.CodegenCommon import Idris.Core.TT import Paths_idris import Util.System import Control.A...
DanielWaterworth/Idris-dev
src/IRTS/CodegenJavaScript.hs
bsd-3-clause
81,010
0
30
28,092
30,829
15,476
15,353
1,902
17
{-# LANGUAGE TemplateHaskell #-} module Player where import Common import Prelude() type Cooldown = Time data Player = Player { _position :: Position , _velocity :: Velocity , _direction :: Direction , _cooldown :: Cooldown } deriving Show friction = 100 *~ newton engineForce = 100 *~ newton enginePower =...
Rotsor/wheeled-vehicle
Player.hs
bsd-3-clause
1,093
0
13
260
413
220
193
30
1
module Parse.TemplateParserTest(tests) where import Test.HUnit import Test.Framework import Test.Framework.Providers.HUnit import Except.TypeDef import Parse.TemplateParser import Tree.TemplateExpression testIncorrect1 = TestCase (assertEqual "Incorrect text" (Left (ParseException "")) (parseText "incorrect {{input...
sergioifg94/Hendoman
test/Parse/TemplateParserTest.hs
bsd-3-clause
1,032
0
11
119
281
146
135
18
1
-- | -- Module : $Header$ -- Copyright : (c) 2013-2015 Galois, Inc. -- License : BSD3 -- Maintainer : [email protected] -- Stability : provisional -- Portability : portable {-# LANGUAGE PatternGuards #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE RecordWildCards #-...
ntc2/cryptol
src/Cryptol/ModuleSystem/Renamer.hs
bsd-3-clause
20,524
0
18
6,340
6,918
3,380
3,538
445
15
module Hans.Simple ( -- * UDP Messages renderUdp , renderIp4 -- * Ident , Ident , newIdent , nextIdent ) where import Hans.Address.IP4 (IP4) import Hans.Message.Ip4 (IP4Packet(..),IP4Header(..),IP4Protocol(..) ,mkIP4PseudoHeader,splitPacket,renderIP4Packet ...
Tener/HaNS
src/Hans/Simple.hs
bsd-3-clause
1,786
0
14
412
573
315
258
42
1
module Level where -- | Experience points. newtype Experience = Experience Int deriving (Eq, Show, Read) -- | Levels are calculated from experience points -- using the function toLevel. newtype Level = Level Int deriving (Eq, Show, Read) -- | The calculation for the Level. -- Basical...
Megaleo/Minehack
src/Level.hs
bsd-3-clause
675
0
11
147
184
102
82
10
1
{-# LANGUAGE DeriveDataTypeable, DeriveGeneric #-} -- -- Module : Event -- Copyright : Copyright © 2014, Quixoftic, LLC <[email protected]> -- License : BSD3 (see LICENSE file) -- Maintainer : [email protected] -- Stability : experimental -- Portability : GHC -- -- SXSW music event representation. -...
quixoftic/Sxcrape
src/Event.hs
bsd-3-clause
1,168
0
10
337
183
116
67
18
0
module Brain.Submitted where import Core import Logic import Brain import MonadBrain import BUtils import Control.Arrow import Control.Applicative import Control.Monad (forever, when) import Data.Maybe import Data.List (sort, (\\), sortBy) import qualified Data.Vector as V import Prelude hiding (break) import Data.Or...
sjoerdvisscher/icfp2011
src/Brain/Submitted.hs
bsd-3-clause
4,093
0
17
1,106
1,579
810
769
-1
-1
module Main where import Conduit.Simple as S import Control.Exception import Criterion.Main import Data.Conduit as C import Data.Conduit.Combinators as C import Fusion as F import Pipes as P import qualified Pipes.Prelude as P import Test....
jwiegley/streaming-tests
test/Main.hs
bsd-3-clause
2,404
0
15
868
865
453
412
64
1
module Text.RE.Tools ( -- * The Tools -- $tools -- * Sed sed , sed' -- * Grep , grep , grepLines , GrepScript , grepScript , linesMatched -- * Lex , alex , alex' -- * IsRegex , IsRegex(..) -- * Edit , Edits(..) , Edit(..) , LineEdit(..) , applyEdits , applyEdit , apply...
Lainepress/easy
Text/RE/Tools.hs
bsd-3-clause
609
0
5
202
137
97
40
28
0
module Astro.Time.Barycentric.TestAsA2009 where -- TODO: Clean out an keep only TDB/TCB test cases. import Numeric.Units.Dimensional.Prelude import qualified Prelude import Astro import Astro.DefaultData import Astro.Time import Astro.Time.Convert import Astro.Time.Barycentric.AsA2009 --import Astro.Time.TDB.TT impor...
bjornbm/astro
test/Astro/Time/Barycentric/TestAsA2009.hs
bsd-3-clause
5,810
0
14
1,363
1,631
819
812
76
1
module LGtk.Demos.Maze.Types where import Data.Array (Array) import Data.Vector (Vector) {- Common types are presented in this file. -} {- Small typedefs -} type Length = Int type Coord = Int type Size = (Length, Length) type Point = Size type Dir = Size type Time = Int type Fitness = Int {- The cardinal directions...
divipp/lgtk
lgtkdemo/LGtk/Demos/Maze/Types.hs
bsd-3-clause
645
0
6
130
167
104
63
14
0
module Main where import Control.Lens ((%~)) import Control.Monad (foldM_) import Data.Function ((&)) import SNEK.Check (checkVE, emptyE, eKSs, eTSs, eVSs, runCheck, veT) import SNEK.Parse (parseVE) import SNEK.PHP (runPHPGen, ve2PHPM) import SNEK.Read (readData) import SNEK.Symbol (KS(..), TS(..), VS(..)) import SNEK...
rightfold/snek
app/Main.hs
bsd-3-clause
1,380
0
18
440
520
276
244
35
3
{-# OPTIONS_GHC -F -pgmF htfpp #-} module VectorTests.Matrix4x4 where import Geometry.Space import Test.Framework import VectorTests.VectorGenerators () prop_inverse :: Matrix4x4 Double -> Bool prop_inverse a = (abs (det a) <= 1e-15) || ( (abs (det (prod a (invert a) .- eye)) <= 1e-15) && (ab...
achirkin/fgeom
test/VectorTests/Matrix4x4.hs
bsd-3-clause
367
0
17
81
140
74
66
9
1
{-# LANGUAGE DeriveFunctor, DeriveFoldable, DeriveTraversable #-} -- | An implementation of the lambda calculus. module Language.BLC.Core ( Expr(..) -- * Construction , lam , app -- * Reduction , reduce ) where import Prelude hiding (sequence) import Bound import Control.Ap...
knrafto/blc
src/Language/BLC/Core.hs
bsd-3-clause
1,870
0
14
514
661
339
322
49
3
{-# LANGUAGE FlexibleContexts #-} module Control.ConstraintClasses.Ap ( -- * Constraint Apply CAp (..) , (<*>:) ) where import Control.ConstraintClasses.Domain import Control.ConstraintClasses.Apply -- base import Data.Functor.Product import Data.Functor.Sum import Data.Functor.Compose -- vector import ...
guaraqe/constraint-classes
src/Control/ConstraintClasses/Ap.hs
bsd-3-clause
1,070
0
11
170
261
156
105
25
1
-- | Re-exports of base functionality. Note that this module is just -- used inside the compiler. It's not compiled to JavaScript. -- Based on the base-extended package (c) 2013 Simon Meier, licensed as BSD3. module Fay.Compiler.Prelude ( module Prelude -- Partial -- * Control modules , module Control.Appl...
fpco/fay
src/Fay/Compiler/Prelude.hs
bsd-3-clause
2,222
0
13
638
556
332
224
47
3
module Chapter4 where isPalindrome :: Eq a => [a] -> Bool isPalindrome xs = xs == reverse xs myAbs :: Integer -> Integer myAbs x = if x < 0 then negate x else x f :: (a, b) -> (c, d) -> ((b, d), (a, c)) f x y = ((snd x, snd y), (fst x, fst y))
taojang/haskell-programming-book-exercise
src/ch04/chapter4.hs
bsd-3-clause
247
0
8
62
153
85
68
7
2
module IRTS.Lang where import Control.Monad.State hiding (lift) import Core.TT import Data.List import Debug.Trace data LVar = Loc Int | Glob Name deriving (Show, Eq) data LExp = LV LVar | LApp Bool LExp [LExp] -- True = tail call | LLazyApp Name [LExp] -...
christiaanb/Idris-dev
src/IRTS/Lang.hs
bsd-3-clause
9,844
0
14
3,576
3,896
1,984
1,912
190
4
module Sexy.Instances.Functor () where import Sexy.Instances.Functor.List () import Sexy.Instances.Functor.Maybe () import Sexy.Instances.Functor.Either () import Sexy.Instances.Functor.Function () import Sexy.Instances.Functor.IO ()
DanBurton/sexy
src/Sexy/Instances/Functor.hs
bsd-3-clause
235
0
4
20
60
42
18
6
0
module MAAM.Instances.MonadStep where import FP import MAAM.Classes.MonadStep -- ID {{{ instance MonadStep ID where type SS ID = ID type SSC ID = Universal mstep :: (SSC ID a, SSC ID b) => (a -> ID b) -> (SS ID a -> SS ID b) mstep f = f . runID munit :: (SSC ID a) => P ID -> a -> SS ID a munit P = ID --...
davdar/quals
src/MAAM/Instances/MonadStep.hs
bsd-3-clause
3,861
0
13
851
1,953
1,009
944
-1
-1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} module Snooze.Balance.Serial ( balanceTableToText , balanceTableFromText , balanceTableParser , balanceEntryParser ) where import Data.Attoparsec.Text import Data.String (String) import Data.Text as T impor...
ambiata/snooze
src/Snooze/Balance/Serial.hs
bsd-3-clause
1,091
0
12
208
280
149
131
29
1
{-# OPTIONS_HADDOCK hide #-} {-# LANGUAGE ScopedTypeVariables, RankNTypes #-} module Graphics.Gloss.Internals.Interface.ViewState.Motion (callback_viewState_motion) where import Graphics.Gloss.Data.ViewState import Graphics.Gloss.Internals.Interface.Callback import Graphics.Gloss.Internals.Interface.Backend im...
ardumont/snake
deps/gloss/Graphics/Gloss/Internals/Interface/ViewState/Motion.hs
bsd-3-clause
1,062
0
12
236
177
97
80
23
2
{-# LANGUAGE Haskell98 #-} {-# LINE 1 "Data/Tree.hs" #-} {-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-} {-# LANGUAGE Trustworthy #-} ...
phischu/fragnix
benchmarks/containers/Data.Tree.hs
bsd-3-clause
5,675
0
14
1,617
1,796
956
840
97
4
{-# LINE 1 "GHC.IOArray.hs" #-} {-# LANGUAGE Unsafe #-} {-# LANGUAGE NoImplicitPrelude, RoleAnnotations #-} {-# OPTIONS_GHC -funbox-strict-fields #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.IOArray -- Copyright : (c) The U...
phischu/fragnix
builtins/base/GHC.IOArray.hs
bsd-3-clause
2,476
0
10
453
492
269
223
32
1
module Main where import Control.Exception import Test.Tasty import Test.Tasty.HUnit import Kite.Test.Exception import Kite.Test.Lexer import Kite.Test.TypeCheck import Kite.Test.Parser import Kite.Test.Inference main :: IO () main = defaultMain tests tests :: TestTree tests = testGroup "Kite Tests" [ ...
kite-lang/kite
tests/Main.hs
mit
643
0
11
161
162
94
68
24
1
{- | Module : $Header$ Description : resolve empty conjunctions and other trivial cases Copyright : (c) Christian Maeder, Uni Bremen 2005 License : GPLv2 or higher, see LICENSE.txt Maintainer : [email protected] Stability : provisional Portability : portable Resolve empty conjunctions and ...
keithodulaigh/Hets
CASL/Simplify.hs
gpl-2.0
2,829
0
18
885
1,038
518
520
64
7
module Graphics.Renderable where import Graphics.Rendering.OpenGL class Renderable a where render :: a -> IO () renderWith :: a -> (Program -> IO ()) -> IO ()
sgillis/HaskHull
src/Graphics/Renderable.hs
gpl-3.0
169
0
12
36
65
34
31
5
0
module EvaluatorBase where import DataBase -- Operation for expression evaluation class Exp x => Evaluate x where evaluate :: x -> Int instance Evaluate Lit where evaluate (Lit i) = i instance (Evaluate l, Evaluate r) => Evaluate (Add l r) where evaluate (Add l r) = evaluate l + evaluate r
egaburov/funstuff
Haskell/tytag/xproblem_src/samples/expressions/Haskell/OpenDatatype2/EvaluatorBase.hs
apache-2.0
308
0
8
69
112
57
55
8
0
{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- -- Stg to C-- code generation -- -- (c) The University of Glasgow 2004-2006 -- ----------------------------------------------------------------------------- module StgCmm ( codeGen ) where #include "HsVersions.h" i...
vikraman/ghc
compiler/codeGen/StgCmm.hs
bsd-3-clause
10,429
1
21
3,092
1,462
771
691
132
1
{-# LANGUAGE DeriveDataTypeable #-} module System.TimeManager ( -- ** Types Manager , TimeoutAction , Handle -- ** Manager , initialize , stopManager , killManager , withManager -- ** Registration , register , registerKillThread -- ** Control , tickle , cancel , pause , resume -- ...
kazu-yamamoto/wai
time-manager/System/TimeManager.hs
mit
4,759
0
16
1,039
904
482
422
91
4
module Main where import Graphics.X11.Turtle import System.Environment import Control.Monad main :: IO () main = do f <- openField getArgs >>= flip unless (topleft f) . null t <- newTurtle f shape t "turtle" shapesize t 2 2 pensize t 10 pencolor t (0, 127, 0) onclick f $ \_ x y -> print (x, y) >> goto t x y >...
YoshikuniJujo/wxturtle
tests/testOnClick.hs
bsd-3-clause
363
0
12
80
175
83
92
16
1
-- Copyright 2016 TensorFlow authors. -- -- 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 law or agree...
judah/tensorflow-haskell
tensorflow-ops/tests/TracingTest.hs
apache-2.0
1,743
0
12
326
302
177
125
27
1
{-# LANGUAGE CPP #-} module InfoSpec where import Control.Applicative ((<$>)) import Data.List (isPrefixOf) import Language.Haskell.GhcMod import Language.Haskell.GhcMod.Cradle #if __GLASGOW_HASKELL__ < 706 import System.Environment.Executable (getExecutablePath) #else import System.Environment (getExecutablePath) #en...
yuga/ghc-mod
test/InfoSpec.hs
bsd-3-clause
2,794
0
18
786
559
282
277
52
1
{-# LANGUAGE FlexibleContexts, FlexibleInstances, MultiParamTypeClasses #-} module Opaleye.Internal.Join where import qualified Opaleye.Internal.Tag as T import qualified Opaleye.Internal.PackMap as PM import Opaleye.Internal.Column (Column, Nullable) import qualified Opaleye.Column as C import D...
alanz/haskell-opaleye
src/Opaleye/Internal/Join.hs
bsd-3-clause
1,320
0
11
222
393
221
172
25
1
{-| Module describing an NIC. The NIC data type only holds data about a NIC, but does not provide any logic. -} {- Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc. 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 Fre...
vladimir-ipatov/ganeti
src/Ganeti/HTools/Nic.hs
gpl-2.0
2,844
0
12
720
290
179
111
31
1
{-# LANGUAGE StandaloneKindSignatures #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} module T16723 where import Data.Kind type D :: forall a. Type data D
sdiehl/ghc
testsuite/tests/saks/should_compile/T16723.hs
bsd-3-clause
178
0
5
28
26
18
8
-1
-1
module Mod1 where f1 0 l = take 42 l f1 n l = take n l f2 0 l = drop 0 l f2 n l = drop n l g = 42
kmate/HaRe
old/testing/instantiate/Mod1AST.hs
bsd-3-clause
103
0
5
39
69
34
35
6
1
module PackageTests.Haddock.Check (suite) where import Control.Monad (unless, when) import Data.List (isInfixOf) import System.FilePath ((</>)) import System.Directory (doesDirectoryExist, removeDirectoryRecursive) import Test.Tasty.HUnit (Assertion, assertFailure) import Distribution.Simple.Utils (withFileContents)...
enolan/cabal
Cabal/tests/PackageTests/Haddock/Check.hs
bsd-3-clause
1,497
0
15
392
361
200
161
33
1
{-# LANGUAGE UnboxedTuples #-} module T9964 where import GHC.Base crash :: IO () crash = IO (\s -> let {-# NOINLINE s' #-} s' = s in (# s', () #))
urbanslug/ghc
testsuite/tests/codeGen/should_compile/T9964.hs
bsd-3-clause
161
0
11
45
55
31
24
9
1
module Control.Concurrent.STM.TMapSpec ( spec ) where import Control.Concurrent.STM import Control.Concurrent.STM.TMap import Control.Monad import Prelude hiding (null, lookup) import Test.Hspec spec :: Spec spec = do describe "newTMap" $ it "creates a new empty TMap" $ do isEmpty <- atomicall...
nahiluhmot/hasqueue
spec/Control/Concurrent/STM/TMapSpec.hs
mit
4,986
0
20
2,177
1,256
580
676
120
1
{-# LANGUAGE OverloadedStrings #-} module Network.API.Mandrill.Senders where import Network.API.Mandrill.Response import Network.API.Mandrill.Types import Network.API.Mandrill.Utils -- | Return the senders that have tried to use this account. list :: (MonadIO m) => MandrillT m (Either ApiError [Sender]) list = perfo...
krgn/hamdrill
src/Network/API/Mandrill/Senders.hs
mit
2,417
0
10
553
403
222
181
32
1
module Handler.Echo where import Import getEchoR :: Text -> Handler Html getEchoR theText = defaultLayout $(widgetFile "echo")
zhy0216/haskell-learning
yosog/Handler/Echo.hs
mit
130
0
8
20
39
20
19
4
1
{-# LANGUAGE RankNTypes, LambdaCase, ScopedTypeVariables #-} -------------------------------------------------- -------------------------------------------------- module Enumerate.Function.Extra ( module Enumerate.Function.Extra , module Prelude.Spiros , module Control.DeepSeq , module Data.Semigroup , module...
sboosali/enumerate
enumerate-function/sources/Enumerate/Function/Extra.hs
mit
7,283
0
13
1,024
1,398
798
600
-1
-1
{-# LANGUAGE BangPatterns, DataKinds, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module Hadoop.Protos.ClientNamenodeProtocolProtos.RefreshNodesResponseProto (RefreshNodesResponseProto(..)) where import Prelude ((+), (/)) import qualified Prelude as Prel...
alexbiehl/hoop
hadoop-protos/src/Hadoop/Protos/ClientNamenodeProtocolProtos/RefreshNodesResponseProto.hs
mit
2,953
1
16
535
554
291
263
53
0
module System.Mesos.Raw.ResourceUsage where import System.Mesos.Internal import System.Mesos.Raw.ExecutorId import System.Mesos.Raw.FrameworkId import System.Mesos.Raw.ResourceStatistics import System.Mesos.Raw.SlaveId import System.Mesos.Raw.TaskId type Reso...
jhedev/hs-mesos
src/System/Mesos/Raw/ResourceUsage.hs
mit
2,241
0
15
584
658
315
343
69
0