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 NoImplicitPrelude #-} module UtilSpec (spec) where import Import import Util import Test.Hspec import Test.Hspec.QuickCheck spec :: Spec spec = do describe "plus2" $ do it "basic check" $ plus2 0 `shouldBe` 2 it "overflow" $ plus2 maxBound `shouldBe` minBound + 1 prop "minus 2" $ \i -> plus...
haroldcarr/learn-haskell-coq-ml-etc
haskell/course/2018-06-roman-gonzales-rock-solid-haskell-services-lambdaconf/hc/test/UtilSpec.hs
unlicense
341
0
14
71
117
62
55
12
1
-- A Functor is any data type that defines how fmap [alias ($)]applies to it -- Maybe is a Functor, Applicative Functor and Monad instance Functor Maybe where fmap f (Just a) = Just (f a) fmap f Nothing = Nothing -- Control.Applicative defines <*>, which knows how to apply a function wrapped in a context to a val...
dongarerahul/edx-haskell
FunctorToMonad.hs
apache-2.0
896
0
11
226
254
126
128
-1
-1
module Main where import Tokenizer import Types import Grammar import FP_ParserGen -- Touching this file leaves you at your own devices import ASTBuilder import Checker import CodeGen import Simulation import System.FilePath main :: IO() main = do putStrLn "What file do you want to run? Please provide the...
wouwouwou/2017_module_8
src/haskell/PP-project-2016/Main.hs
apache-2.0
880
0
16
235
195
98
97
27
1
{-# LANGUAGE OverloadedStrings #-} module Actions.LoginScreen.Login.Handler (handler) where import qualified Data.Text.Lazy as TL import qualified Text.Digestive as D import Web.Scotty (redirect) import Text.Digestive.Scotty (runForm) import App (Action, PGPool, runQuery) import Auth (doLoginAction) import qualified...
DataStewardshipPortal/ds-wizard
DSServer/app/Actions/LoginScreen/Login/Handler.hs
apache-2.0
1,859
0
22
416
503
269
234
38
5
{- let w = "white" let b = "blue" let o = "orange" let g = "green" let r = "red" let y = "yellow" let u = "up" let d = "down" let f = "front" let x = "back" let l = "left" let t = "right" let colors = ("white", "blue", "orange", "green", "red", "yellow") let sides = ("up", "down", "front", "back", "left", "right") le...
gijzelaerr/HasSolved
main.hs
apache-2.0
700
0
8
167
52
28
24
3
1
{-# LANGUAGE CPP #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# OPTIONS -fno-warn-unused-top-binds #-} -- for lenses module Pos.WorkMode ( WorkMode , MinWorkMode -- * Actual modes , RealMode , RealModeContext(..) ...
input-output-hk/cardano-sl
lib/src/Pos/WorkMode.hs
apache-2.0
7,136
0
11
1,562
1,437
839
598
-1
-1
-- Based on Examples from HUnit user's guide module KakuroTest where import Test.HUnit import Kakuro foo :: Int -> (Int, Int) foo x = (1, x) partA :: Int -> IO (Int, Int) partA v = return (v+2, v+3) partB :: Int -> IO Bool partB v = return (v > 5) test1 :: Test test1 = TestCase (assertEqual "for ...
gavilancomun/kakuro-haskell
KakuroTest.hs
apache-2.0
1,322
0
13
430
530
264
266
36
1
{-# LANGUAGE OverloadedStrings #-} {- Copyright 2019 The CodeWorld Authors. All rights 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/LICENS...
alphalambda/codeworld
codeworld-error-sanitizer/src/ErrorSanitizer.hs
apache-2.0
5,996
0
8
1,280
754
493
261
98
1
{-# LANGUAGE Arrows #-} {- | An experiment in using Haskell Arrows, see <http://www.haskell.org/arrows/>, to automagically compute Lipschitz constants of maps. Something like this can also be used to compute derivatives of functions. Here we use floats, but later we intend to replace them with exact reals. -...
comius/haskell-fast-reals
src/Data/Reals/Lipschitz.hs
bsd-2-clause
1,463
0
13
460
509
289
220
20
0
module Aws.Sqs.Commands.Message where import Aws.Core import Aws.Sqs.Core import Control.Applicative import Control.Monad.Trans.Resource (MonadThrow) import Data.Maybe import Text.XML.Cursor (($/), ($//), (&/), (&|)) import qualified Data.ByteString.Ch...
RayRacine/aws
Aws/Sqs/Commands/Message.hs
bsd-3-clause
8,219
2
19
2,361
1,773
955
818
-1
-1
{-# LANGUAGE Arrows, TupleSections, OverloadedStrings #-} module Scoutess.DataFlow where import Control.Applicative ((<$>)) import Control.Arrow import Control.Monad (when, forM_) import Control.Monad.Error import Control.Monad.Trans import Control.Monad.Trans.Maybe import Control.Monad.Write...
cartazio/scoutess
Scoutess/DataFlow.hs
bsd-3-clause
14,517
1
18
3,604
2,416
1,274
1,142
176
3
module Client255.Printer ( printTweet ) where import qualified Data.Text.IO as T import Client255.Type printTweet :: Tweet -> IO () printTweet t = do T.putStr $ (screenName . user) t putStr $ " [" ++ (show . tweetId) t ++ "] " T.putStrLn $ text t
c000/twitter-client255
Client255/Printer.hs
bsd-3-clause
269
0
11
67
103
54
49
9
1
module Scheme.Evaluator.Micro ( module Scheme.Evaluator.Eval, microGEnv, evalCar, evalCdr, evalCons, evalPair, evalSet, evalSetCar, evalSetCdr, evalEq, evalApply, evalQuote, evalIf, evalLambda, evalDef, evalY, evalDefMacro, ) where import Scheme.Evaluator.Eval import Scheme.DataType....
ocean0yohsuke/Scheme
src/Scheme/Evaluator/Micro.hs
bsd-3-clause
25,277
0
48
12,106
6,666
3,390
3,276
319
10
{- Copyright (c) 2008 David Roundy All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following...
droundy/franchise
Distribution/Franchise/VersionControl.hs
bsd-3-clause
8,251
0
14
2,770
1,330
667
663
105
3
{-# LANGUAGE PatternSynonyms #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.EXT.GeometryShader4 -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portabil...
haskell-opengl/OpenGLRaw
src/Graphics/GL/EXT/GeometryShader4.hs
bsd-3-clause
1,595
0
5
177
152
100
52
28
0
{-# LANGUAGE GADTs #-} {-# LANGUAGE QuasiQuotes #-} module Test.BigOh.Fit.R where import Data.Ix import Data.Monoid import Data.Vector.SEXP import qualified Foreign.R as R import Language.R.HExp import Language.R.Instance as R import Language....
tranma/big-oh
src/Test/BigOh/Fit/R.hs
bsd-3-clause
1,894
0
16
630
493
278
215
54
7
------------------------------------------------------------------------------- -- | -- Module : Generator.Printer.Util -- Copyright : (c) 2016 Michael Carpenter -- License : BSD3 -- Maintainer : Michael Carpenter <oldmanmike.dev@gmail.com> -- Stability : experimental -- Portability : portable -- --...
oldmanmike/hs-minecraft-protocol
generate/src/Generator/Printer/Util.hs
bsd-3-clause
1,150
0
12
230
226
126
100
20
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} module Web.Trello where import qualified Data.Text as T import Data.Aeson import GHC.Generics import Servant import Web.Trello.Card import Control.Monad.Trans.Eithe...
nicklawls/lessons
src/Web/Trello.hs
bsd-3-clause
1,815
0
12
498
427
239
188
49
1
{-# LANGUAGE TemplateHaskell #-} module Main where import Test.Framework.TH (defaultMainGenerator) import Test.HUnit import Test.Framework.Providers.HUnit (testCase) import Test.QuickCheck import Test.Framework.Providers.QuickCheck2 (testProperty) import qualified Data.List as List import Euler.Problem12 (firstTr...
FranklinChen/project-euler-haskell
Test/Test12.hs
bsd-3-clause
1,680
0
12
365
409
230
179
41
1
module Astro.Orbit.Interpolate where import qualified Prelude import Control.Applicative import Numeric.Units.Dimensional.Prelude import Numeric.Units.Dimensional.LinearAlgebra import Astro.Orbit.Types import Astro.Time import Astro.Time.At import Astro.Util.Cyclic import Astro.Orbit.MEOE import Astro.Trajectory (Da...
bjornbm/astro
src/Astro/Orbit/Interpolate.hs
bsd-3-clause
4,044
0
12
995
1,289
689
600
59
1
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.Raw.KHR.TextureCompressionASTCLDR -- Copyright : (c) Sven Panne 2015 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability :...
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/KHR/TextureCompressionASTCLDR.hs
bsd-3-clause
1,791
0
4
159
118
85
33
30
0
{-# LANGUAGE CPP #-} module Distribution.Compat.Filesystem.Portable (pathCoerceToDirectory, pathCoerceToFile, pathIsAbsolute, pathIsRelative, pathIsDirectory, pathIsFile, (</>)) where #ifdef VERSION_unix import {-# SOURCE #-} Distribution.Compat.Filesystem.Posix #else import Distribution.Compat.F...
IreneKnapp/Faction
libfaction/Distribution/Compat/Filesystem/Portable.hs
bsd-3-clause
1,227
0
8
208
294
164
130
37
2
{-# LANGUAGE DeriveDataTypeable, GeneralizedNewtypeDeriving #-} module WSC.Main where import Control.Monad.Error import Control.Monad.State import System.Console.CmdArgs.Implicit import System.Exit import Text.Groom import Text.Printf import WSC.AST as AST import WSC.Arity import WSC.Driver import WSC.Parser (parse...
DylanLukes/Winchester-STG-Compiler
WSC/Main.hs
bsd-3-clause
1,523
0
17
402
431
224
207
55
2
{-| CRUD functionality for 'Document's. -} module Database.OrgMode.Internal.Query.Document where import Database.Esqueleto import qualified Database.Persist as P import Database.OrgMode.Internal.Import import Database.OrgMode.Internal.Types import qualified Database.OrgMode.Internal.Quer...
rzetterberg/orgmode-sql
lib/Database/OrgMode/Internal/Query/Document.hs
bsd-3-clause
1,756
0
14
365
310
173
137
22
1
module Data.OrdPSQ.Tests ( tests ) where import Data.List (isInfixOf) import Test.Framework (Test) import Test.Framework.Providers.HUnit (testCase) import Test.Framework.Providers.QuickCheck2 (testProperty) import ...
meiersi/psqueues-old
tests/Data/OrdPSQ/Tests.hs
bsd-3-clause
3,479
0
11
774
850
445
405
56
3
{-# LANGUAGE CPP #-} #if defined(__GLASGOW_HASKELL__) && (__GLASGOW_HASKELL__ >= 702) {-# LANGUAGE Trustworthy #-} #endif {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FunctionalDependencies #-} -- These extensions are only for MTL stuff where it is required {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE Undeci...
scslab/iterIO
Data/IterIO/Trans.hs
bsd-3-clause
16,688
0
18
4,740
3,793
2,065
1,728
-1
-1
{-| Module : Idris.REPL Description : Entry Point for the Idris REPL and CLI. License : BSD3 Maintainer : The Idris Community. -} {-# LANGUAGE CPP, DeriveFunctor, FlexibleInstances, MultiParamTypeClasses, PatternGuards #-} module Idris.REPL ( idemodeStart , startServer , runClient , proce...
eklavya/Idris-dev
src/Idris/REPL.hs
bsd-3-clause
69,704
0
22
25,821
22,189
10,782
11,407
1,361
73
{-| Module : Game.GoreAndAsh.Core.Dispense Description : Helpers for item dispensing from collections. Copyright : (c) Anton Gushcha, 2016-2017 License : BSD3 Maintainer : ncrashed@gmail.com Stability : experimental Portability : POSIX -} module Game.GoreAndAsh.Core.Dispense( ItemRoller , itemRoller...
Teaspot-Studio/gore-and-ash
src/Game/GoreAndAsh/Core/Dispense.hs
bsd-3-clause
1,312
0
17
281
365
203
162
21
4
{-# LANGUAGE BangPatterns #-} module Network.Wai.Handler.Warp.HashMap where import Data.Hashable (hash) import Data.IntMap.Strict (IntMap) import qualified Data.IntMap.Strict as I import Data.Map.Strict (Map) import qualified Data.Map.Strict as M import Prelude hiding (lookup) ---------------------------------------...
kazu-yamamoto/wai
warp/Network/Wai/Handler/Warp/HashMap.hs
mit
1,196
0
9
182
281
157
124
18
1
-- Resource getter. Used by everything else module Haskmon.Resource(getResource) where import Data.Aeson import Network.Http.Client import qualified Data.ByteString as B import qualified Data.ByteString.Char8 as B8 -- | Host of the API host :: String host = "http://pokeapi.co/" -- | Uri of the resource type Uri = St...
bitemyapp/Haskmon
src/Haskmon/Resource.hs
mit
838
0
10
184
171
97
74
14
1
-- | <http://strava.github.io/api/v3/oauth/> module Strive.Actions.Authentication ( buildAuthorizeUrl , exchangeToken , deauthorize ) where import Data.ByteString.Char8 (unpack) import Network.HTTP.Types (Query, renderQuery, toQuery) import Strive.Aliases (ApplicationId, ApplicationSecret, AuthorizationCode, ...
liskin/strive
library/Strive/Actions/Authentication.hs
mit
1,634
0
11
240
360
205
155
33
1
{-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Main -- Copyright : (c) 2013-2015 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) -- module Main (main)...
fmapfmapfmap/amazonka
amazonka-cloudsearch-domains/test/Main.hs
mpl-2.0
567
0
8
103
76
47
29
9
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-opsworks/gen/Network/AWS/OpsWorks/DeregisterInstance.hs
mpl-2.0
3,571
0
9
710
362
223
139
48
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- ...
fmapfmapfmap/amazonka
amazonka-cloudformation/gen/Network/AWS/CloudFormation/CancelUpdateStack.hs
mpl-2.0
3,379
0
9
643
369
228
141
51
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="fil-PH"> <title>Pagscript ng Ruby</title> <maps> <homeID>top</homeID> <mapref location...
veggiespam/zap-extensions
addOns/jruby/src/main/javahelp/org/zaproxy/zap/extension/jruby/resources/help_fil_PH/helpset_fil_PH.hs
apache-2.0
975
84
52
160
400
210
190
-1
-1
{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- -- (c) The University of Glasgow 2006 -- -- The purpose of this module is to transform an HsExpr into a CoreExpr which -- when evaluated, returns a (Meta.Q Meta.Exp) computation analogous to the -- input HsExpr. We do...
spacekitteh/smcghc
compiler/deSugar/DsMeta.hs
bsd-3-clause
114,141
2,313
23
30,470
26,514
14,800
11,714
1,903
16
module Optimization.Constrained.ProjectedSubgradient ( -- * Projected subgradient method projSubgrad , linearProjSubgrad -- * Step schedules , StepSched , optimalStepSched , constStepSched , sqrtKStepSched , invKStepSched -- * Linear constraints , Constraint(..) , l...
ocramz/optimization
src/Optimization/Constrained/ProjectedSubgradient.hs
bsd-3-clause
4,472
1
18
1,592
1,137
601
536
83
4
{-# LANGUAGE CPP, TypeFamilies #-} ----------------------------------------------------------------------------- -- -- Machine-dependent assembly language -- -- (c) The University of Glasgow 1993-2004 -- ----------------------------------------------------------------------------- module X86.Instr (Instr(..), Operand...
shlevy/ghc
compiler/nativeGen/X86/Instr.hs
bsd-3-clause
41,389
0
17
13,135
9,827
4,977
4,850
632
104
module Dotnet.System.IO.DirectoryInfo ( module Dotnet.System.IO.DirectoryInfo ) where import qualified Dotnet.System.Object data DirectoryInfo_ a type DirectoryInfo a = Dotnet.System.Object.Object (DirectoryInfo_ a)
FranklinChen/Hugs
dotnet/lib/Dotnet/System/IO/DirectoryInfo.hs
bsd-3-clause
221
2
7
25
51
34
17
-1
-1
{-# LANGUAGE TemplateHaskell #-} {-| Ganeti monitoring agent daemon -} {- Copyright (C) 2013 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain ...
leshchevds/ganeti
src/ganeti-mond.hs
bsd-2-clause
2,310
0
13
397
219
128
91
29
1
{-# LANGUAGE QuasiQuotes, TypeFamilies, TemplateHaskell, MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances, ViewPatterns #-} {-# LANGUAGE OverloadedStrings #-} -- the module name is a lie!!! module YesodCoreTest.NoOverloadedStrings (noOverloadedTest, Widget) where import Test.Hspec import YesodCoreTest.NoOverlo...
meteficha/yesod
yesod-core/test/YesodCoreTest/NoOverloadedStrings.hs
mit
2,544
0
13
511
760
382
378
65
1
{-# LANGUAGE PatternSynonyms, ViewPatterns, ConstraintKinds, TypeFamilies, PolyKinds, KindSignatures #-} module T10997_1a where import GHC.Exts type family Showable (a :: k) :: Constraint where Showable (a :: *) = (Show a) Showable a = () extractJust :: Maybe a -> (Bool, a) extractJust (Just a) = (True, a)...
sgillespie/ghc
testsuite/tests/patsyn/should_compile/T10997_1a.hs
bsd-3-clause
482
0
9
100
168
94
74
12
1
{-# LANGUAGE Safe #-} {-# LANGUAGE NoImplicitPrelude #-} ----------------------------------------------------------------------------- -- | -- Module : Text.Show -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries@...
tolysz/prepare-ghcjs
spec-lts8/base/Text/Show.hs
bsd-3-clause
889
0
7
153
89
64
25
16
1
module Main where import System.Environment import DrvGM import GCompiler import GPrinter import NParser import Iseq main :: IO () main = do args <- getArgs case (length args) of 0 -> interp 1 -> do stream <- readFile (args !! 0) putStrLn(source stream) ...
typedvar/hLand
hcore/Main.hs
mit
1,227
0
16
340
409
202
207
42
4
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE DataKinds #-} module Web.Apiary.Helics ( Helics -- * initializer , HelicsConfig(..) , initHelics , initHerokuHelics -- * action -- ** raw , transa...
philopon/apiary
apiary-helics/src/Web/Apiary/Helics.hs
mit
6,146
0
18
1,621
1,758
944
814
147
1
#!/usr/local/bin/runghc -i/home/martyn/bin/hlib {-# LANGUAGE FlexibleInstances , NoMonomorphismRestriction , OverlappingInstances , ScopedTypeVariables , TemplateHaskell , TypeSynonymInstances #-} -- base -------------------------------- import Control.Excepti...
sixears/getopt
t/OptDesc.hs
mit
16,815
0
14
6,204
3,689
1,955
1,734
296
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Google.Cloud.Internal.Token where import Control.Applicative import Control.Concurrent.STM import Control.Monad.Reader import Data.Text (Text) import Data.Text.Encoding import Data.Monoid import Data.Time import Network.HTTP.Types.Header ...
wereHamster/google-cloud
src/Google/Cloud/Internal/Token.hs
mit
2,636
0
18
576
416
220
196
46
3
module Y2020.M10.D12.Exercise where import Data.Map (Map) import Data.Text import Data.Aeson -- Okay, we have a query that we want to make to wikidata. Let's make it. -- import Wikidata.Query.Builder -- Okay, that doesn't work with newer versions of GHCI. Oh, well. {-- The SPARQL query: SELECT ?item ?itemLabel ?...
geophf/1HaskellADay
exercises/HAD/Y2020/M10/D12/Exercise.hs
mit
1,625
0
9
341
216
129
87
24
1
{-# LANGUAGE TemplateHaskell #-} module UnitTest.CallbackParse.ThreadControl where import Data.Aeson (Value) import Data.Yaml.TH (decodeFile) import Test.Tasty as Tasty import Web.Facebook.Messenger import UnitTest.Internal -------------------- -- THREAD CONTROL -- -------------------- threadControlTests :: TestT...
Vlix/facebookmessenger
test/UnitTest/CallbackParse/ThreadControl.hs
mit
1,730
0
9
396
286
154
132
-1
-1
{-# LANGUAGE Rank2Types #-} module SoOSiM.Components.Common where import Data.Maybe import Control.Monad import SoOSiM type GUID = Int type AppId = GUID type ProcessId = ComponentId type ThreadId = ProcessId data Code = Code data Architecture = Architecture data ResourceDescription = Res...
christiaanb/SoOSiM-components
src/SoOSiM/Components/Common.hs
mit
995
0
11
286
510
267
243
41
2
{-# LANGUAGE UnicodeSyntax #-} module JavaScript.Famous.Common where import JavaScript.Famous.Types import GHCJS.Foreign (jsUndefined) import GHCJS.Marshal (ToJSRef, toJSRef) import Unsafe.Coerce (unsafeCoerce) instance ToJSRef Size where toJSRe...
eallik/ghcjs-famous
src/JavaScript/Famous/Common.hs
mit
596
0
8
190
159
88
71
11
0
module Graphics.UI.GLFW.Netwire.Window.Core ( WindowHandle, Window(..), WindowRecord(..), GLContext(..), getWindowSize, setWindowSize, inWindow, InputBuffer(..), annotateWindow, getStateWire, setStateWire, modifyStateWire, windowRecord, attachWire --VideoM...
barendventer/netwire-glfw-b
src/Graphics/UI/GLFW/Netwire/Window/Core.hs
mit
5,777
0
14
1,212
1,015
541
474
78
2
module Model.Mechanics (module System.Random ,module Model.Object ,tag ,mergeCollading ,createNew ,move ) where import Data.Maybe import System.Random import Model.Object {- findPointed function. Extracts an object from an object list which contains a supplied point. It is assumed that there might ...
wowofbob/circles
src/Model/Mechanics.hs
mit
6,009
0
14
1,955
1,224
667
557
75
2
{-# LANGUAGE OverloadedStrings, DeriveGeneric #-} module Model.Run.Api ( addUser, setUserToken, listLanguageVersions, runSnippet ) where import Import.NoFoundation hiding (error, stderr, stdout) import Util.Api (createUser, updateUser) import Data.Aeson (decode) import Data.Maybe (fromJust) import Util...
vinnymac/glot-www
Model/Run/Api.hs
mit
2,752
0
16
541
812
419
393
67
3
module Dupes.FileStat (FileStat, UnixFileStat(..), create, toByteString) where import Data.Binary import qualified Data.ByteString as B import Database.SQLite.Simple.FromField import Database.SQLite.Simple.ToField import System.PosixCompat newtype FileStat = Fi...
danstiner/dupes
src/Dupes/FileStat.hs
mit
1,063
0
8
273
259
150
109
30
1
{-# htermination mzero :: [] a #-} import Monad
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Monad_mzero_1.hs
mit
48
0
3
9
5
3
2
1
0
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE UndecidableInstances #-} module Betfair.APING.Types.RunnerCatalog ( RunnerCa...
joe9/betfair-api
src/Betfair/APING/Types/RunnerCatalog.hs
mit
839
0
10
198
141
89
52
21
0
module Feature.UnicodeSpec where import Test.Hspec import Test.Hspec.Wai import Test.Hspec.Wai.JSON import Network.Wai (Application) import Control.Monad (void) import Protolude hiding (get) spec :: SpecWith Application spec = describe "Reading and writing to unicode schema and table names" $ it "Can read and ...
NotBrianZach/postgrest
test/Feature/UnicodeSpec.hs
mit
608
0
9
120
124
72
52
-1
-1
module Diamond where import Data.List inner :: Char -> String inner c | c == 'A' = "" | c == 'B' = " " | otherwise = replicate ((length $ inner $ pred c) + 2) ' ' outer :: Int -> Char -> String outer maxLen 'A' = replicate ((maxLen - 1) `div` 2) ' ' outer maxLen c = replicate ((maxLen - ((length...
fonzerelly/diamondKata
Diamond.hs
mit
915
0
15
209
404
213
191
22
1
module Main where import Web.Scotty import Data.Text (Text) import Data.Text.IO (readFile, writeFile) import Database.HDBC.Sqlite3 (connectSqlite3, Connection) import Database.HDBC (prepare, execute, commit, fetchAllRows) import Database.HDBC.SqlValue (SqlValue, fromSql, toSql) import Data.Time (UTCTime, getCurrentTime...
thedufer/TomeOfStories
Main.hs
mit
976
0
10
139
313
180
133
29
1
Preprocessing executable 'VisualizingHaskellAST' for VisualizingHaskellAST-0.1.0.0... {Bag(Located (HsBind Var)): [ (L {testing/A.hs:6:4-14} (AbsBinds [{Var: a}] [{Var: $dNum}] [ (ABE {Var: A.b} {Var: b} (WpCompose (WpCompose (WpCompose (WpTyLam {...
fodder008/VisualizingHaskellAST
testing/sampleShowData.hs
mit
8,190
336
53
4,536
2,610
1,503
1,107
-1
-1
-- -- -- (C) 2011-16 Nicola Bonelli <nicola@pfq.io> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- T...
pfq/PFQ
user/pfqd/src/Daemon.hs
gpl-2.0
2,819
0
15
596
648
342
306
53
2
{- | Module : ./OWL2/XMLKeywords.hs Copyright : (c) Felix Gabriel Mance License : GPLv2 or higher, see LICENSE.txt Maintainer : f.mance@jacobs-university.de Stability : provisional Portability : portable Kewyords used for XML conversions -} module OWL2.XMLKeywords where ontologyIRIK :: String on...
spechub/Hets
OWL2/XMLKeywords.hs
gpl-2.0
8,390
0
5
885
1,237
753
484
224
1
module Probability.BivariateDistributions.Terms where import Notes makeDefs [ "stochastic tuple" , "stochastic vector" , "bivariate distribution function" ]
NorfairKing/the-notes
src/Probability/BivariateDistributions/Terms.hs
gpl-2.0
187
0
6
47
25
15
10
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-| module : WebParsing.PrerequisiteParsing Description : converts a T.Text representation of prerequisites into prereq format Stability : experimental Currently parses prerequisites for Arts & Science only. Attempts to preserve only the most basic internal logic ...
arkon/courseography
hs/WebParsing/PrerequisiteParsing.hs
gpl-3.0
2,957
0
14
686
585
329
256
38
5
module Model ( SIRState (..) , SIRMsg (..) , SIRAgentState (..) , SIREnvironment , SIRAgentDef , SIRAgentBehaviour , SIRAgentIn , SIRAgentOut , SIRAgentObservable , SIRAgentPureReadEnvBehaviour , SIRAgentMonadicReadEnvBehaviour , contactRate , illnessDuration , infectionProbabil...
thalerjonathan/phd
coding/libraries/chimera/examples/ABS/SIRExamples/SIR/Model.hs
gpl-3.0
1,995
0
8
250
270
164
106
37
1
module Properties where import Prelude (Bool(..),error,toEnum,fromEnum,pred,succ,sqrt,round ,Enum,Eq,Ord,Show,return,(.),undefined) import HipSpec import Definitions prop_01 n xs = (take n xs ++ drop n xs =:= xs) prop_02 n xs ys = (count n xs + count n ys =:= count n (xs ++ ys)) prop_03 n xs ys ...
danr/hipspec
testsuite/zeno/Properties.hs
gpl-3.0
7,823
0
12
2,142
4,957
2,556
2,401
-1
-1
{-# LANGUAGE GeneralizedNewtypeDeriving, MultiParamTypeClasses, FlexibleInstances #-} {-# LANGUAGE TypeSynonymInstances, PackageImports, RankNTypes, CPP, OverloadedStrings #-} {-# LANGUAGE ViewPatterns, TemplateHaskell #-} module Database.Persist.Riak ( withRiakConn , runRiakConn , R.Connection , Co...
shoehn/persistent-riak
Database/Persist/Riak.hs
gpl-3.0
5,882
23
12
1,516
1,340
729
611
100
1
module HipSpec.Lang.CoreLint where import Bag import CoreLint import CoreSyn import HipSpec.GHC.Utils import System.IO coreLint :: [CoreBind] -> IO () coreLint bs = do let (msgs1,msgs2) = lintCoreBindings bs mapM_ (mapBagM_ (hPutStrLn stderr . portableShowSDoc)) [msgs1,msgs2]
danr/hipspec
src/HipSpec/Lang/CoreLint.hs
gpl-3.0
291
0
12
49
101
55
46
10
1
import System.Random import System.Exit import System.Environment import Data.List import Data.Maybe import Data.Foldable (toList) import qualified Data.Sequence as Seq data Tile = Small Color | Dbl Color | NewRow deriving (Show,Eq) type TileWidth = Int type Color = Int -- TODO da...
dynnamitt/tile-gen
tile-gen.hs
gpl-3.0
4,832
0
14
1,336
1,658
851
807
140
3
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/ChangeRenewalSettings.hs
mpl-2.0
4,366
0
17
989
469
279
190
82
1
instance MyClass Int where type MyType = String myMethod :: MyType -> Int myMethod x = x + 1 type MyType = Int
lspitzner/brittany
data/Test201.hs
agpl-3.0
119
0
6
31
44
23
21
-1
-1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeFamilies #-} {- | Module : $Header$ Description : Attributes functions. Copyright : (c) plaimi 2014-2015 License : AGPL-3 Maintainer : tempuhs@plaimi.net -} module Tempuhs.Se...
plaimi/tempuhs-server
src/Tempuhs/Server/Requests/Attributes/Poly.hs
agpl-3.0
7,763
0
23
2,658
2,112
1,150
962
198
5
module Ex.String(mkString, strs, strs', MultiLineShow(..), ind, showOp, showOp', cap, MathTp(..), BoolTp(..), tryCon, zipWithIndex, startsWith, lines2, pstrs, pstrs', pmkString, mapFirst, mapLast, appendLast, appp, glue, glueAll, mapNotFirst, wrapStr, splitOn) where import Data.Char startsWith :: (Eq a) ...
antonzherdev/objd
src/Ex/String.hs
lgpl-3.0
3,633
6
14
928
2,031
1,083
948
109
3
import System.Posix.Daemon import Control.Pipe.* import System.IO import Data.* import Text.* import qualified Data.ByteString as BS import Network.* import HTTP.* module Pusher where jsonFile :: FilePath jsonFile = "../xanon/xanon/square.json" def readJSON = do a : Yodlee | a <- p_value | encode a -> A...
dgomez10/xanon
Pusher.hs
apache-2.0
3,123
113
17
660
1,025
584
441
-1
-1
module Delahaye.A338012Spec (main, spec) where import Test.Hspec import Delahaye.A338012 (a338012) main :: IO () main = hspec spec spec :: Spec spec = describe "A338012" $ it "correctly computes the first 20 elements" $ take 20 (map a338012 [1..]) `shouldBe` expectedValue where expectedValue = [0, 3, 4, 1...
peterokagey/haskellOEIS
test/Delahaye/A338012Spec.hs
apache-2.0
396
0
10
78
160
95
65
10
1
{-# LANGUAGE EmptyDataDecls #-} module Data.FFI where type AgdaList a b = [b] type AgdaMaybe a b = Maybe b type AgdaEither a b c d = Either c d data AgdaEmpty data AgdaStream a = Cons a (AgdaStream a)
qwe2/try-agda
agda-stdlib-0.9/ffi/Data/FFI.hs
apache-2.0
205
0
8
44
65
42
23
-1
-1
{-# LANGUAGE DeriveFunctor #-} module Data.Predictor.Probability ( Pr(..) , binomial , collapse , (.*) , delay ) where import Control.Applicative import Control.Lens import Control.Monad import Data.Bifunctor import Data.Map as M import Numeric.Log as Log data Pr a = Pr { runPr :: [(Log Double, Either a (...
ekmett/predictors
src/Data/Predictor/Probability.hs
bsd-2-clause
1,503
0
16
387
808
434
374
-1
-1
{-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TemplateHaskell #-} module Network.Kafka.Fields where import Control.Applicative import Control.Lens...
iand675/hs-kafka
src/Network/Kafka/Fields.hs
bsd-3-clause
2,116
0
6
180
451
197
254
64
0
module Main where import Criterion.Main import Data.Vector ((//)) import qualified Data.Vector as V vec :: V.Vector Int vec = V.fromList [1..10000] slow :: Int -> V.Vector Int slow n = go n vec where go 0 v = v go n v = go (n-1) (v // [(n, 0)]) batchList :: Int -> V.Vector Int batchList n = vec // update...
dmvianna/strict
src/update.hs
bsd-3-clause
670
0
11
152
319
170
149
-1
-1
-- © 2001-2005 Peter Thiemann module Main where import Data.Char import Prelude hiding (head, span, map) import WASH.CGI.CGI hiding (div) main = run mainCGI mainCGI = calc "0" id calc dstr f = standardQuery "Calculator" $ table $ do dsp <- tr (td (textInputField (fieldVALUE dstr) ## attr "colspan" "4")) ...
nh2/WashNGo
Examples/old/Calculator.hs
bsd-3-clause
947
5
17
236
443
221
222
26
4
{-# LANGUAGE TemplateHaskell, OverloadedStrings, FlexibleContexts, CPP #-} module PEPParser where #if __GLASGOW_HASKELL__ < 710 import Control.Applicative ( (<|>), (<$>), (<*>), (*>), (<*), many, pure ) #else import Control.Applicative ( (<|>), many ) #endif import Control.Lens ( makeLenses ) import Control.Monad ( v...
owst/Penrose
src/PEPParser.hs
bsd-3-clause
16,147
0
16
4,276
3,950
2,085
1,865
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Bead.View.Content.SubmissionList.Page ( submissionList ) where import Control.Monad import Control.Monad.Trans.Class import Control.Monad.IO.Class import Data.String (fromString) import Data.Time import Data.Lis...
andorp/bead
src/Bead/View/Content/SubmissionList/Page.hs
bsd-3-clause
5,333
0
26
1,310
1,350
691
659
110
4
module Process.Peer.Receiver ( runReceiver , specReceiver ) where import Control.Concurrent.STM import Control.Monad.Reader (liftIO, asks) import Data.ByteString (ByteString) import qualified Data.ByteString as B import Network.Socket (Socket) import qualified Network.Socket.ByteString as SB import Pr...
artems/FlashBit
src/Process/Peer/Receiver.hs
bsd-3-clause
1,786
0
11
407
530
273
257
51
2
{-# LANGUAGE PackageImports #-} module GHC.MVar (module M) where import "base" GHC.MVar as M
silkapp/base-noprelude
src/GHC/MVar.hs
bsd-3-clause
98
0
4
18
21
15
6
3
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE ImpredicativeTypes #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} module Lib where import Control.Exception (assert) import qualified Data.Map.Lazy ...
sleexyz/untyped
src/Lib.hs
bsd-3-clause
4,381
0
20
1,322
1,395
726
669
82
5
-- 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. {-# LANGUAGE OverloadedStrings #-} module Duckling.Time.IT.Corpus ( corpus , negativeCorpus ) where impor...
facebookincubator/duckling
Duckling/Time/IT/Corpus.hs
bsd-3-clause
31,606
0
11
13,090
9,351
5,707
3,644
656
1
module Problem13 where main :: IO () main = do contents <- readFile "txt/13.txt" putStrLn . take 10 . show . sum . map read . lines $ contents
adityagupta1089/Project-Euler-Haskell
src/problems/Problem13.hs
bsd-3-clause
152
0
13
38
62
30
32
5
1
-- Push the load average (read from /proc/loadavg) to graphite (i.e. to the -- carbon-cache process in a normal graphite setup). -- Code similar to the graphite-client.py example program. module Main (main) where import Control.Applicative ((<$>)) import Data.Time.Clock.POSIX (getPOSIXTime) import Network.Socket impor...
noteed/curved
bin/curved-load-average.hs
bsd-3-clause
1,324
0
13
244
383
197
186
26
1
{-| module: Bot.Scripting Defines the callbacks that will be called on events. The bot /tries/ to apply all callbacks to all events, but will ignore any that fail to pattern-match on their arguments. This means that to define a callback for a certain message, you just need to write a fuction that only pattern-matches ...
cyclohexanamine/haskbot
src/Bot/Scripting.hs
bsd-3-clause
1,664
0
8
341
123
81
42
13
1
{-# LANGUAGE EmptyDataDecls #-} module Code06 where import Data.List type Data = [Datum] -- Specification candidates :: Data -> [Candidate] value :: Candidate -> Value good :: Value -> Bool solutions :: Data -> [Candidate] solutions0 :: Data -> [Candidate] solutions0 = filter (good . val...
sampou-org/pfad
Code/Code06.hs
bsd-3-clause
3,879
0
11
944
1,939
1,091
848
95
1
module Rules.Test (testRules, runTestGhcFlags, timeoutProgPath) where import Base import Expression import GHC import Oracles.Flag import Oracles.Setting import Target import Utilities import System.Environment -- TODO: clean up after testing testRules :: Rules () testRules = do root <- buildRootRules root ...
bgamari/shaking-up-ghc
src/Rules/Test.hs
bsd-3-clause
3,604
4
17
1,033
710
337
373
72
3
-- (c) 2000-2005 by Martin Erwig [see file COPYRIGHT] -- | Graph Voronoi Diagram -- -- These functions can be used to create a /shortest path forest/ -- where the roots are specified. module Data.Graph.Inductive.Query.GVD ( Voronoi,LRTree, gvdIn,gvdOut, voronoiSet,nearestNode,nearestDist,nearestPath, --...
scolobb/fgl
Data/Graph/Inductive/Query/GVD.hs
bsd-3-clause
2,767
0
16
550
621
349
272
26
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE NoImplicitPrelude #-} -- | The client. module Language.Fay.ReactiveMvc where import Language.Fay.FFI import Language.Fay.Guid import Language.Fay.Prelude import Language.Fay.Ref ------------------------------...
faylang/fay-server
modules/library/Language/Fay/ReactiveMvc.hs
bsd-3-clause
3,728
0
13
777
1,188
592
596
76
1
{-# LANGUAGE TypeOperators #-} module Zero.Account.Server ( accountViewServer , accountServer ) where import Servant (Server) import Servant.API import Zero.Persistence import Zero.Account.API import Zero.Index.Handlers (index) import Zero...
et4te/zero
server/src/Zero/Account/Server.hs
bsd-3-clause
865
0
7
203
153
90
63
22
1
{-# LANGUAGE FlexibleInstances #-} module Ebitor.Events.JSON ( Key(..) , Modifier(..) , Button(..) , Event(..) , eventToString , eventsToString ) where import Control.Applicative (pure) import Control.Monad (mzero) import Data.List (foldl') import Data.Aeson import Data.List import qualifi...
benekastah/ebitor
src/Ebitor/Events/JSON.hs
bsd-3-clause
2,064
0
11
381
660
348
312
65
1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} -------------------------------------------------------------------------------- -- | The LLVM Type System. -- module Llvm.Types where #include "HsVersions.h" import Data.Char import Data.Int import Numeric import DynFlags import FastString import Outputable import Uniqu...
a-ford/notghc
Llvm/Types.hs
bsd-3-clause
35,505
0
16
8,492
6,416
3,409
3,007
515
4
{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE...
andrewthad/vinyl-vectors
src/Data/Vector/Vinyl/Default/NonEmpty/Tagged/Internal.hs
bsd-3-clause
13,615
0
17
3,178
4,678
2,442
2,236
226
1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE ScopedTypeVariables #-} module CO4.Thesis.NatBuiltIn where import Language.Haskell.TH (runIO) import qualified Satchmo.Core.SAT.Minisat import qualified S...
apunktbau/co4
test/CO4/Thesis/NatBuiltIn.hs
gpl-3.0
832
0
9
296
112
67
45
16
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="hu-HU"> <title>Code Dx | ZAP Extension</title> <maps> <homeID>top</homeID> <mapref loc...
veggiespam/zap-extensions
addOns/codedx/src/main/javahelp/org/zaproxy/zap/extension/codedx/resources/help_hu_HU/helpset_hu_HU.hs
apache-2.0
969
80
66
160
415
210
205
-1
-1