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
{- Copyright (C) 2010, 2011, 2012 Jeroen Ketema and Jakob Grue Simonsen This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ...
jeroenk/iTRSsImplemented
Substitution.hs
agpl-3.0
2,585
0
11
578
565
294
271
40
3
module Handler.SupplierActions where import Import import Handler.Common import qualified Data.Text as T import Text.Blaze getSupplierActionsR :: SupplierId -> Handler Html getSupplierActionsR sId = do mSup <- runDB $ get sId case mSup of Just sup -> defaultLayout $ do setTitleI (MsgSupplierActi...
nek0/yammat
Handler/SupplierActions.hs
agpl-3.0
4,804
0
18
1,756
707
343
364
-1
-1
module Git.Command.UpdateRef (run) where run :: [String] -> IO () run args = return ()
wereHamster/yag
Git/Command/UpdateRef.hs
unlicense
87
0
7
15
42
23
19
3
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE TemplateHaskell #-} module Main where import Data.Foldable (traverse_) import Data.Default import Control.Monad.State import Control.Lens (makeFields, (%...
shockkolate/gameai-chess
src/Main.hs
unlicense
2,773
0
12
708
857
464
393
71
1
module Main ( main ) where import Control.Monad (void) import System.Environment (getArgs) import Language.JavaScript import Language.JavaScript.Parser import Language.JavaScript.Host.Console main :: IO () main = do (file:_) <- getArgs source <- readFile file let eAST = parseJavaScript source void $ ...
fabianbergmark/ECMA-262
Main.hs
bsd-2-clause
355
0
10
61
110
59
51
13
1
module SetConsole where import Life.Engine.Set import Life.Display.Console import Life.Types --import Life.Scenes -- or import Life.Formations -- Runs Life indefinitely life :: Config -> Scene -> IO Board life c b = lifeConsole (scene c b :: Board) -- Runs Life for the specified number of generations -- Then it pri...
ku-fpg/better-life
examples/simulations/SetConsole.hs
bsd-2-clause
648
0
8
116
158
89
69
11
1
module Main where import ProjectEuler.Problem001 import ProjectEuler.Problem002 import ProjectEuler.Problem003 import ProjectEuler.Problem004 import ProjectEuler.Problem005 import ProjectEuler.Problem006 import ProjectEuler.Problem007 import ProjectEuler.Problem008 import ProjectEuler.Problem009 import ProjectEuler.Pr...
ThermalSpan/haskell-euler
src/Main.hs
bsd-3-clause
1,150
0
15
279
333
186
147
35
3
module IrcScanner.LogWatcher(watchLogFile) where import IrcScanner.Types import Data.IORef import System.INotify import Control.Monad.Trans.Reader as R import Control.Monad.IO.Class(liftIO) import System.IO as I import Data.Time.LocalTime(localTimeToUTC)--, hoursToTimeZone) import Parser.Irssi.Log.Util.Impor...
redfish64/IrcScanner
src/IrcScanner/LogWatcher.hs
bsd-3-clause
2,944
0
17
667
674
366
308
47
3
{-# LANGUAGE ForeignFunctionInterface, EmptyDataDecls, FlexibleContexts, FlexibleInstances, RankNTypes,MultiParamTypeClasses #-} module Language.Java.JVM.API where import Language.Java.JVM.Types import Control.Monad import qualified Data.Map as Map import Foreign.C import Foreign.Ptr import Foreign.Marshal.Alloc imp...
JPMoresmau/HJVM
src/Language/Java/JVM/API.hs
bsd-3-clause
25,997
0
25
5,663
8,081
4,121
3,960
370
2
module Fibon.Analyse.Analysis ( Analysis(..) , runAnalysis , computeRows , Normalize(..) , NormMethod ) where import Data.List import Data.Maybe import qualified Data.Map as M import Control.Monad.Error import Fibon.Result import Fibon.Analyse.AnalysisRoutines import Fibon.Analyse.Parse import Fibon....
dmpots/fibon
tools/fibon-analyse/Fibon/Analyse/Analysis.hs
bsd-3-clause
7,781
0
15
2,120
2,463
1,268
1,195
174
6
-- ------------------------------------------------------------ {- | Module : Yuuko.Text.XML.HXT.Arrow.XmlIOStateArrow Copyright : Copyright (C) 2005 Uwe Schmidt License : MIT Maintainer : Uwe Schmidt (uwe@fh-wedel.de) Stability : experimental Portability: portable Version : $Id: XmlI...
nfjinjing/yuuko
src/Yuuko/Text/XML/HXT/Arrow/XmlIOStateArrow.hs
bsd-3-clause
26,577
421
17
6,340
5,354
2,910
2,444
538
4
{-# LANGUAGE ExtendedDefaultRules, OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-type-defaults #-} module Main where import Interpreter import Language.Haskell.TH.Expand import Control.Exception (throwIO) import Control.Monad (filterM) import Con...
konn/expandth
app/Main.hs
bsd-3-clause
2,473
0
16
796
604
327
277
47
3
{-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} module Text.Scalar ( module Text.Scalar.Types , readScalarString , readScalarFile , parseScalar , orderPages ) where import Data.Maybe (mapMaybe) import Data...
corajr/scalar-convert
src/Text/Scalar.hs
bsd-3-clause
2,092
0
15
461
521
272
249
39
3
module Fifteen where import Data.Foldable (maximumBy) import Data.Ord (comparing) import Text.Parsec hiding (State) import Text.Parsec.String data Properties = Properties { capacity :: Int , durability :: Int ...
purcell/adventofcodeteam
app/Fifteen.hs
bsd-3-clause
3,089
0
19
964
862
454
408
53
3
module Sprite.Ship where import Graphics.Rendering.OpenGL import Sprite.Class import Sprite.Colors data Ship = Ship (Vector3 Float) Float instance Sprite Ship where pos (Ship p v) = p draw (Ship p v) = do preservingMatrix $ do translate p rotate (45 * v) (Vector3 0 1 0) scale 0.1 0.1 (0.1:...
flazz/tooHS
src/Sprite/Ship.hs
bsd-3-clause
808
0
17
277
322
158
164
23
0
-- | -- Module : Data.Array.Nikola.Backend.Flags -- Copyright : (c) Geoffrey Mainland 2012 -- License : BSD-style -- -- Maintainer : Geoffrey Mainland <mainland@apeiron.net> -- Stability : experimental -- Portability : non-portable module Data.Array.Nikola.Backend.Flags ( Dialect(..), Flags(..), ...
mainland/nikola
src/Data/Array/Nikola/Backend/Flags.hs
bsd-3-clause
2,497
0
10
803
622
360
262
68
2
-- 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.Temperature.IT.Corpus ( corpus ) where import Data.String i...
facebookincubator/duckling
Duckling/Temperature/IT/Corpus.hs
bsd-3-clause
1,345
0
9
454
225
134
91
34
1
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ViewPatterns #-} module Language.JQuery.Functions where import Text.Blaze.Html --import Language.JavaScript.AST imp...
mcmaniac/hs-jquery
src/Language/JQuery/Functions.hs
bsd-3-clause
1,505
0
10
249
334
182
152
25
1
{-# LANGUAGE DeriveDataTypeable, FlexibleContexts, OverloadedStrings #-} module Main where import Control.Applicative ((<$>), (<*>)) import Control.Failure (Failure) import Control.Monad (liftM, when) import Data.Aeson import qualified Data.Aeson.Generic as AG import qualified Data.ByteString as BS import qualified Da...
ronwalf/ba-winter-challenge
src/ba-winter-challenge.hs
bsd-3-clause
7,260
0
24
1,700
2,276
1,187
1,089
146
4
{-# LANGUAGE OverloadedStrings #-} module HelloWorld where import Network.Miku import Network.HTTP.Pony.Serve (run) import Network.HTTP.Pony.Serve.Wai (fromWAI) import Network.HTTP.Pony.Transformer.HTTP (http) import Network.HTTP.Pony.Transformer.CaseInsensitive (caseInsensitive) import Network.HTTP.Pony.T...
nfjinjing/miku
test/HelloWorld.hs
bsd-3-clause
554
0
13
98
146
88
58
19
1
{-# LANGUAGE FlexibleContexts #-} module Language.Gator.Ops.Output ( newOutput, newOutputN, ) where import Language.Gator.Logic import Language.Gator.General import Language.Gator.Gates import Language.Gator.Gates.Output import Language.Gator.Ops.General import Control.Monad.State nextOutput :: (MonadState L...
sw17ch/gator
src/Language/Gator/Ops/Output.hs
bsd-3-clause
687
0
10
138
215
117
98
23
1
module MessagesSpec where import Test.Hspec import Test.QuickCheck import Data.List (intercalate) import Data.Maybe import qualified Data.UUID as UUID import System.Random import Messages import Models instance Arbitrary UUID.UUID where arbitrary = (fst . random . mkStdGen) <$> arbitrary spec :: Spec spec = do ...
shterrett/peer-chat
test/MessagesSpec.hs
bsd-3-clause
2,105
0
20
525
482
232
250
44
1
module Yesod.Goodies.PNotify.Modules.Desktop ( Desktop(..) , defaultDesktop )where import Data.Aeson import Data.Text (Text) import Yesod.Goodies.PNotify.Types import Yesod.Goodies.PNotify.Types.Instances data Desktop = Desktop { _desktop :: Maybe Bool , _fallback :: Ma...
cutsea110/yesod-pnotify
Yesod/Goodies/PNotify/Modules/Desktop.hs
bsd-3-clause
1,411
0
15
645
367
207
160
-1
-1
{-# LANGUAGE MagicHash #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE UnliftedFFITypes #-} module MCL.Curves.Fp254BNb.G1 ( G1 , mkG1 , mapToG1 , g1_zero , g1_isZero , g1_affineCoords , g1_getYfromX , g1_powFr ) where import Control.DeepSeq import Data.Binary import Data.Bits import Data.Grou...
arybczak/haskell-mcl
src/MCL/Curves/Fp254BNb/G1.hs
bsd-3-clause
5,335
0
13
1,032
1,142
615
527
114
1
module Kagamin.Modules where import Data.Text (Text) import Web.Slack (Slack, ChannelId, Submitter) -- | Result of executing a given hook: either the hook did nothing, modified -- the message text for the next hook in the pipeline, or requested -- processing to cease. data HookResult = Next | Modify Text | Stop -...
valderman/kagamin
Kagamin/Modules.hs
mit
1,256
0
11
286
220
131
89
20
1
module Data.Wright.RGB.Model.PALSECAMRGB (pALSECAMRGB) where import Data.Wright.Types (Model(..), Primary(..), Gamma(..)) import Data.Wright.CIE.Illuminant.D65 (d65) pALSECAMRGB :: Model pALSECAMRGB = d65 { gamma = Gamma 2.2 , red = Primary 0.6400 0.3300 0.222021 , green = Primary 0.2900 0.6000 0.706645 , b...
fmap-archive/wright
src/Data/Wright/RGB/Model/PALSECAMRGB.hs
mit
361
0
7
59
116
72
44
9
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module PureScript.Ide.Pursuit where import qualified Control.Exception as E import Control.Lens hiding (noneOf) import Control.Monad import Data.Aeson import Data.Aeson.Lens import Da...
kRITZCREEK/psc-ide
src/PureScript/Ide/Pursuit.hs
mit
3,534
0
15
1,040
954
495
459
-1
-1
-- Model fitting to derive coefficients in -- Math.NumberTheory.Primes.Sequence.chooseAlgorithm module Main where import Numeric.GSL.Fitting -- | Benchmarks Sequence/filterIsPrime -- ([start, length], ([time in microseconds], weight)) filterIsPrimeBenchData :: [([Double], ([Double], Double))] filterIsPrimeBenchData ...
Bodigrim/arithmoi
app/SequenceModel.hs
mit
3,047
0
12
511
1,364
849
515
60
1
-- Copyright 2017 Google Inc. -- -- 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 agreed to in ...
google/haskell-indexer
haskell-indexer-pathutil/src/Language/Haskell/Indexer/Util/Path.hs
apache-2.0
1,696
0
12
340
289
165
124
20
4
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-missing-fields #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -------------------...
sinjar666/fbthrift
thrift/compiler/test/fixtures/service-fuzzer/gen-hs/TestService_Fuzzer.hs
apache-2.0
6,071
0
26
1,076
1,960
1,124
836
103
2
{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances #-} {-# LANGUAGE PatternGuards #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Layout.Stoppable -- Copyright : (c) Anton Vorontsov <anton@enomsg.org> 2014 -- License : BSD-style (as xmonad) -...
f1u77y/xmonad-contrib
XMonad/Layout/Stoppable.hs
bsd-3-clause
5,105
0
11
938
742
412
330
50
1
yes = fromInteger 12
mpickering/hlint-refactor
tests/examples/Default61.hs
bsd-3-clause
20
0
5
3
9
4
5
1
1
module InOut where import PointlessP.Functors import PointlessP.Combinators import PointlessP.Isomorphisms import PointlessP.RecursionPatterns {- imports will be added for the PointlessP librasies -} -- the whole expression will be selected for translation. tail' = app . (((curry ...
kmate/HaRe
old/testing/pointwiseToPointfree/InOut_TokOut.hs
bsd-3-clause
658
0
27
296
141
83
58
14
1
module Test2 where -- folding against simple function where the variable is on rhs of infix operator f x = 1 + x g = 1 + 2
kmate/HaRe
old/testing/refacFunDef/Test2.hs
bsd-3-clause
128
0
5
33
26
15
11
3
1
module Main (main ) where import Debug.Trace foo :: (a,b) -> a foo (x,y) = x {-# NOINLINE foo #-} wwMe :: Int -> (Int,Int) -> (Int, Int) wwMe 0 p = let a = fst p b = snd p -- This ensure sharing of b, as seen by the demand analyzer in foo p `seq` -- This ensures that wwMe is strict in...
tjakway/ghcjvm
testsuite/tests/simplCore/should_run/T11731.hs
bsd-3-clause
860
0
12
255
269
148
121
21
1
module CompactTests where import Test.QuickCheck import Thrift.Protocol.Compact import Util main :: IO () main = aggregateResults [ quickCheckResult $ propRoundTrip CompactProtocol , quickCheckResult $ propRoundTripMessage CompactProtocol ]
chjp2046/fbthrift
thrift/lib/hs/tests/CompactTests.hs
apache-2.0
265
0
8
51
56
31
25
8
1
-- ----------------------------------------------------------------------------- -- -- (c) The University of Glasgow, 2011 -- -- Generate code to initialise cost centres -- -- ----------------------------------------------------------------------------- module ProfInit (profilingInitCode) where import CLabel import C...
urbanslug/ghc
compiler/profiling/ProfInit.hs
bsd-3-clause
1,556
0
15
308
328
170
158
27
2
{-# LANGUAGE CPP #-} module T9032 where #ifdef ERR import T9032 #endif f x = x
urbanslug/ghc
testsuite/tests/rename/should_fail/T9032.hs
bsd-3-clause
85
0
5
22
18
12
6
3
1
{-# LANGUAGE FlexibleInstances #-} module ShouldFail where class Foo a where op :: a -> a instance {-# OVERLAPPABLE #-} Foo a => Foo [a] instance {-# OVERLAPPING #-} Foo [Int] foo :: Foo a => [a] -> [a] foo x = op x -- Correct instance depends on instantiation of 'a'
urbanslug/ghc
testsuite/tests/typecheck/should_fail/tcfail121.hs
bsd-3-clause
277
0
7
61
86
46
40
8
1
{-# OPTIONS_GHC -Wall #-} module Foo where -- We should complain that the first r shadows the second one, and give -- the right locations for the two of them. (trac #2137) z :: a z = r where _a = 'a' _f r = r _b = 'b' r = undefined _c = 'c'
urbanslug/ghc
testsuite/tests/rename/should_compile/rn064.hs
bsd-3-clause
290
0
7
104
47
29
18
9
1
-- Squares sequence -- http://www.codewars.com/kata/5546180ca783b6d2d5000062/ module Codewars.Exercise.Squares where squares :: Integer -> Int -> [Integer] squares x n = take n . iterate (^2) $ x
gafiatulin/codewars
src/Beta/Squares.hs
mit
198
0
8
28
53
30
23
3
1
{-# LANGUAGE Rank2Types #-} {-# LANGUAGE OverloadedStrings #-} module Web.Growler.Handler where import Blaze.ByteString.Builder (Builder) import Control.Applicative import Control.Lens import Control.Monad import Control.Monad.Trans import Contr...
iand675/growler
src/Web/Growler/Handler.hs
mit
7,709
0
19
1,920
2,125
1,081
1,044
143
3
module Tree where data Tree a = Empty | Node (Tree a) a (Tree a) insert :: (Ord a) => a -> Tree a -> Tree a insert e Empty = Node Empty e Empty insert e (Node t0 n t1) | e < n = Node (insert e t0) n t1 | e >= n = Node t0 n (insert e t1) buildTree :: (Ord a) => [a] -> Tree a buildTree = foldr...
slon1024/functional_programming
haskell/Tree.hs
mit
555
0
9
166
304
154
150
13
1
module Main (main, spec) where import Test.Hspec import Game.FizzBuzz main :: IO () main = hspec spec spec :: Spec spec = do describe "fizzbuzz" $ do it "should return Fizz if int is dividable by 3" $ fizzbuzz 3 `shouldBe` "Fizz" it "should return Buzz if int is dividable by 5" $ ...
to4iki/fizzbuzz-hs
test/Spec.hs
mit
584
0
12
182
136
69
67
16
1
module P028 (main, solveBasic) where {- Starting with the number 1 and moving to the right in a clockwise direction a 5 by 5 spiral is formed as follows: 21 22 23 24 25 20 7 8 9 10 19 6 1 2 11 18 5 4 3 12 17 16 15 14 13 It can be verified that the sum of the numbers on the diagonals is 1...
yyotti/euler_haskell
src/P028.hs
mit
1,926
0
14
482
158
104
54
9
1
-- 1. Given the type type Gardener = String -- What is the normal form of Garden? data Garden = Gardenia Gardener | Daisy Gardener | Rose Gardener | Lilac Gardener deriving Show
diminishedprime/.org
reading-list/haskell_programming_from_first_principles/11_10.hs
mit
191
0
6
46
36
22
14
7
0
module Lang where import Debug.Trace import Data.List import Data.Function data MOp = Neg | Not deriving (Eq,Ord) data BOp = Plus | Minus | Times | Div | And | Or | Equal | LessThan | GreaterThan deriving (Eq,Ord) type Name = String dat...
jdublu10/toy_lang
src/Lang.hs
mit
7,631
0
12
2,123
3,451
1,736
1,715
197
3
import System.Random -- Problem 25 -- Generate a random permutation of the elements of a list. -- Remove the K'th element from a list. removeAt :: Int -> [a] -> (a,[a]) removeAt i (x:xs) | i > 1 = (xz,x:yz) | otherwise = (x,xs) where (xz,yz) = removeAt (i-1) xs rndPermutationG :: RandomGen g ...
baldore/haskell-99-exercises
25.hs
mit
684
0
12
171
306
158
148
19
1
module BetaBin where -- The beta-binomial model in latent variable and urn model representations. -- The two formulations should be exactly equivalent, but only urn works with Dist. import Control.Monad.State.Lazy (get,put,evalStateT) import Control.Monad.Bayes.Class -- | Beta-binomial model as an i.i.d. sequence ...
ocramz/monad-bayes
models/BetaBin.hs
mit
1,517
0
18
385
472
241
231
29
2
module Joy.EnumSet ( EnumSet, enumInSet, emptyEnumSet, fullEnumSet, inverseEnumSet, rangeEnumSet, enumerationEnumSet, negativeEnumerationEnumSet, ...
IreneKnapp/Joy
Joy/EnumSet.hs
mit
16,197
0
19
6,876
3,990
2,119
1,871
363
6
{-# LANGUAGE PackageImports #-} {-# OPTIONS_GHC -fno-warn-dodgy-exports -fno-warn-unused-imports #-} -- | Reexports "Foreign.ForeignPtr.Unsafe.Compat" -- from a globally unique namespace. module Foreign.ForeignPtr.Unsafe.Compat.Repl.Batteries ( module Foreign.ForeignPtr.Unsafe.Compat ) where import "this" Foreign.For...
haskell-compat/base-compat
base-compat-batteries/src/Foreign/ForeignPtr/Unsafe/Compat/Repl/Batteries.hs
mit
342
0
5
31
32
25
7
5
0
{-# LANGUAGE BangPatterns, DataKinds, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module Hadoop.Protos.RefreshAuthorizationPolicyProtocolProtos.RefreshServiceAclRequestProto (RefreshServiceAclRequestProto(..)) where import Prelude ((+), (/)) impor...
alexbiehl/hoop
hadoop-protos/src/Hadoop/Protos/RefreshAuthorizationPolicyProtocolProtos/RefreshServiceAclRequestProto.hs
mit
3,090
1
16
546
554
291
263
53
0
{-# LANGUAGE PackageImports, BangPatterns, QuasiQuotes, PatternGuards, MagicHash, ScopedTypeVariables, TypeFamilies #-} {-# OPTIONS -Wall -fno-warn-missing-signatures -fno-warn-incomplete-patterns #-} -- | Canny edge detector. -- -- NOTE: for best performance this needs to be compiled with the following...
eklinkhammer/robot-vision
src/canny_demo.hs
mit
12,693
0
24
5,056
3,038
1,545
1,493
253
9
module Graphics.TUIO.Types ( Vec2D , Vec3D , Rot2D , Rot3D , ClassId , SessionId ) where type Vec2D = (Float, Float) type Vec3D = (Float, Float, Float) type Rot2D = Float type Rot3D = (Float, Float, Float) type ClassId = Integer type SessionId = Integer
peacememories/tuio-haskell
src/Graphics/TUIO/Types.hs
mit
259
0
5
50
87
58
29
13
0
{-# LANGUAGE Arrows #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module OAuthLogin ( -- * Queries create , findUserQuery ) where import Control.Arrow (retur...
robertjlooby/scotty-story-board
app/models/OAuthLogin.hs
mit
2,266
1
12
600
513
281
232
45
1
{- Copyright (c) 2007 John Goerzen <jgoerzen@complete.org> Please see the COPYRIGHT file -} import System.IO import Control.Concurrent.MVar import RsyncParser import RsyncGUI import System.Environment import System.Process import System.Posix.IO import System.Posix.Signals import System.Posix.Process import System....
jgoerzen/gtkrsync
gtkrsync.hs
gpl-2.0
2,509
0
17
704
647
300
347
56
3
{-# LANGUAGE ViewPatterns, TemplateHaskell, TypeFamilies, FlexibleInstances, TypeSynonymInstances, MultiParamTypeClasses #-} {-# LANGUAGE UndecidableInstances #-} {-# OPTIONS -Wall -fno-warn-orphans #-} -- | The tetrahedron module AbsTet where import TIndex import Tetrahedron.Vertex import HomogenousTuples import Tetr...
DanielSchuessler/hstri
AbsTet.hs
gpl-3.0
3,756
0
16
728
1,005
517
488
76
1
module Repl() where import Parser import TypeInference import Control.Monad.Trans.Class import Control.Monad.IO.Class import Text.PrettyPrint.ANSI.Leijen readInput env input = do func <-lift $ parseFunction input inferFunction env func repl :: MonadIO m => TypeEnvironment -> [Named TypedExpr] -> InferenceMona...
bruno-cadorette/Baeta-Compiler
src/Repl.hs
gpl-3.0
461
0
9
89
167
86
81
15
1
module Sound.SC3.Server.Utils ( withSynthOutput , quickSynth , module Sound.SC3.Server.State.Monad , module Sound.SC3.Server.State.Monad.Command ) where import Sound.SC3.Server.State.Monad import Sound.SC3.Server.State.Monad.Command import Sound.SC3.Server.State.Monad.Process ( withSynth ) import Sound.SC3.Server.Pro...
cdxr/hsc3-server-utils
Sound/SC3/Server/Utils.hs
gpl-3.0
1,089
0
12
209
304
169
135
25
2
module Global where { import System.IO.Unsafe; import Network.BSD; import Control.Concurrent; local_hostent :: MVar HostEntry; local_hostent = unsafePerformIO newEmptyMVar}
ckaestne/CIDE
CIDE_Language_Haskell/test/WSP/Webserver/Global.hs
gpl-3.0
185
0
5
30
42
27
15
6
1
{-# LANGUAGE GeneralizedNewtypeDeriving, DeriveDataTypeable #-} {- | Module : Postmaster.FSM.SessionState Copyright : (c) 2004-2008 by Peter Simons License : GPL2 Maintainer : simons@cryp.to Stability : provisional Portability : Haskell 2-pre -} module Postmaster.FSM.SessionStat...
richardfontana/postmaster
Postmaster/FSM/SessionState.hs
gpl-3.0
869
0
9
163
138
80
58
13
1
-- -- Dummy stub -- import System.Environment import System.Exit -- Business logic {-!app-name!-}::[FilePath] -> IO () {-!app-name!-} args = putStrLn "{-!app-synopsis!-}" >> exitFailure -- Entry Point main :: IO () main = do args <- getArgs {-!app-name!-} args
whitebonobo/gensp
templates/sublime-haskell/{-!app-name!-}/{-!App-name!-}.hs
gpl-3.0
279
2
9
56
66
38
28
-1
-1
{-# LANGUAGE OverloadedStrings, Rank2Types#-} module Main(main) where import Control.Applicative ((<$>), (<*)) import Control.Concurrent (threadDelay, forkIO, ThreadId) import Control.Concurrent.MVar import Control.Lens.Operators import Control.Monad (unless, forever) import Control.Monad.Trans.Class (lift) import Con...
MatiasNAmendola/lamdu
Lamdu/Main.hs
gpl-3.0
13,520
0
19
2,559
3,878
2,034
1,844
308
6
-- Written by Siddharth Trehan module Main where import Round import System.IO main = do contents <- getContents let round = getround "Rohan Deshpande" contents print round getround authors contents = Round qs where qs = dropMaybe . questionup (hasbonus . lines $ contents) . map (toquestion ...
trehansiddharth/mlsciencebowl
git/hs/compile.hs
gpl-3.0
521
18
18
121
170
89
81
12
2
-- UUAGC 0.9.42.1 (Diff.ag) -- List -------------------------------------------------------- data List = Nil | Cons (Float) (List) deriving ( Show) -- cata sem_List (Nil) = (sem_List_Nil) sem_List (Cons _head _tail) = (sem_List_Cons _head (sem_List _tail)) sem_List_Nil = (\ _lhsIavg -...
haraldsteinlechner/lambdaWolf
report/Diff.hs
gpl-3.0
1,330
0
14
499
307
171
136
40
1
-- import AfterExp import Occasionally -- import SuperSampling main :: IO () main = testOccasionallySuperSampling
thalerjonathan/phd
coding/papers/FrABS/Haskell/prototyping/SamplingTests/Main.hs
gpl-3.0
116
0
6
17
21
12
9
3
1
{- ============================================================================ | Copyright 2011 Matthew D. Steele <mdsteele@alum.mit.edu> | | | | This file is part of Fallback. | ...
mdsteele/fallback
src/Fallback/Scenario/Triggers/IronMine.hs
gpl-3.0
16,463
0
25
4,427
3,101
1,530
1,571
-1
-1
module Language.Mulang.Edl ( parseQuery, parseExpectation, parseExpectations, parseExpectations', Expectation(..)) where import Codec.Binary.UTF8.String (encode) import Language.Mulang.Edl.Lexer (evalP) import qualified Language.Mulang.Edl.Parser as P import Language.Mulang.Edl...
mumuki/mulang
src/Language/Mulang/Edl.hs
gpl-3.0
985
0
11
195
269
154
115
22
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-ec2/gen/Network/AWS/EC2/DescribeSpotInstanceRequests.hs
mpl-2.0
10,115
0
10
1,785
693
467
226
70
1
-- | Query and update documents {-# LANGUAGE OverloadedStrings, RecordWildCards, NamedFieldPuns, TupleSections, FlexibleContexts, FlexibleInstances, UndecidableInstances, MultiParamTypeClasses, GeneralizedNewtypeDeriving, StandaloneDeriving, TypeSynonymInstances, TypeFamilies, CPP, DeriveDataTypeable, ScopedTypeVariab...
VictorDenisov/mongodb
Database/MongoDB/Query.hs
apache-2.0
69,002
1
28
19,952
15,853
8,292
7,561
1,066
9
{-| Module : Learning.TinCan.Statement Description : Statements and related Experience API objects. Copyright : (c) Thomas Sutton License : BSD2 Maintainer : me@thomas-sutton.id.au Stability : experimental Portability : portable This module defines data types and functions to manipulate Statement...
thsutton/tincan
src/Learning/TinCan/Statement.hs
bsd-2-clause
4,387
0
10
1,256
517
314
203
55
1
{-# LANGUAGE NoImplicitPrelude #-} import qualified Hakflow.Abstraction as A import Hakflow.Makeflow import Hakflow.Monad import Hakflow.Util import Hakflow.Magma import Hakflow.Instances.Vector import Data.Default import Data.Vector (Vector) import qualified Data.Vector as V import Data.Text (Text) import quali...
badi/hakflow
tests/Abstraction.hs
bsd-2-clause
962
0
18
333
272
158
114
25
1
{-# LANGUAGE DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses, OverloadedStrings, TemplateHaskell, TypeSynonymInstances #-} module TH.APIs where import Language.Haskell.TH import qualified Data.TH.API as TH import Data.TH.Convert () import...
fabianbergmark/APIs
src/TH/APIs.hs
bsd-2-clause
718
0
17
256
177
92
85
23
0
{-# LANGUAGE CPP, GeneralizedNewtypeDeriving, ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -- | -- Module: System.FilePath.Find -- Copyright: Bryan O'Sullivan -- License: BSD3 -- Maintainer: Bryan O'Sullivan <bos@serpentine.com> -- Stability: unstable -- Portability: Unix-like systems (r...
bos/filemanip
System/FilePath/Find.hs
bsd-3-clause
17,036
0
19
3,765
3,226
1,844
1,382
274
3
module Text.ICalendar.Component.VCalendarSpec ( main , spec ) where -- haskell platform libraries import Data.List -- foreign libraries import Test.Hspec -- native libraries import Spec.Expectations import Spec.Helpers import Text.ICalendar.Component.VCalendar main :: IO () main = hspec spec spec :: Spec spec = do...
Jonplussed/iCalendar
test/Text/ICalendar/Component/VCalendarSpec.hs
bsd-3-clause
3,121
0
21
792
732
332
400
67
1
{-# LANGUAGE OverloadedStrings, QuasiQuotes, TypeApplications, FlexibleContexts #-} module Main (main) where import Control.Monad.Trans import Data.Int import Data.Word import Numeric.Natural import Data.Scientific import Data.Maybe import Data.S...
vapourismo/pg-store
tests/Entities.hs
bsd-3-clause
4,002
48
15
942
1,282
663
619
88
3
module Main where import qualified PureFlowy.Api as Api main :: IO () main = Api.main
parsonsmatt/pureflowy
app/Main.hs
bsd-3-clause
88
0
6
17
29
18
11
4
1
-- |Model for mutually recursive data module Data.Timeless.Mutual where import ZM.Types import Data.Word -- Mutual recursive data types -- Test data Forest a = Forest (List (Tree a)) data Tree a = Tree a (Forest a) data List a = Cons a (List a) | Nil type MutualADTEnv = [(MutualAbsRef,MutualAbsADT)] ...
tittoassini/typed
src/Data/Timeless/Mutual.hs
bsd-3-clause
920
0
10
182
216
129
87
18
0
{-# LANGUAGE OverloadedStrings #-} module Bort.ServerMessage where import Bort.Types import Control.Applicative ((<$>)) import Data.Attoparsec.ByteString.Char8 import qualified Data.ByteString.Char8 as C -- :letsbreelhere!~textual@50-205-32-182-static.hfc.comcastbusiness.net PRIVMSG ##botopia :hi serverMessage :: ...
breestanwyck/bort
src/Bort/ServerMessage.hs
bsd-3-clause
810
0
11
115
252
133
119
19
1
-- Exercises/Ch2/Pt1/Ex6.hs module Ex6 where -- Exercise 6 -- Add a `Float` constructor to `LispVal`, and create a parser for character -- literals as described in R5RS. import Data.Char (digitToInt, isSpace) import Control.Monad import Numeric import System.Environment import Text.ParserC...
EFulmer/haskell-scheme-wikibook
src/Exercises/Ch2/Pt1/Ex6.hs
bsd-3-clause
3,391
0
18
957
962
476
486
89
2
{-# LANGUAGE CPP #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE CPP #-} module Game.Pal.Window where import Graphics.UI.GLFW.Pal import Graphics.VR.OpenVR import Control.Monad import System.Hardware.Hydra import Control.Monad.Trans import Linear.Extra import Game.Pal.View import Game.Pal....
cabbibo/loom-haskell
src/Game/Pal/Window.hs
bsd-3-clause
4,489
0
27
1,169
1,278
622
656
94
4
{-# language CPP #-} -- | = Name -- -- VK_KHR_dedicated_allocation - device extension -- -- == VK_KHR_dedicated_allocation -- -- [__Name String__] -- @VK_KHR_dedicated_allocation@ -- -- [__Extension Type__] -- Device extension -- -- [__Registered Extension Number__] -- 128 -- -- [__Revision__] -- 3 -- -...
expipiplus1/vulkan
src/Vulkan/Extensions/VK_KHR_dedicated_allocation.hs
bsd-3-clause
9,935
0
8
2,481
430
348
82
-1
-1
import System.Cmd import System.Environment import Control.Monad import System.FilePath main :: IO () main = do fps <- getArgs forM fps $ \fp -> do rawSystem "md5sum" [fp] rawSystem "md5sum" [outFilePath fp] putStrLn "" return () outFilePath infp = takeDirectory infp `combine` "out" `combine` takeFileName i...
YoshikuniJujo/iccp-file
tools/showmd5.hs
bsd-3-clause
324
2
13
57
125
61
64
14
1
-- | -- Statistics for per-module compilations -- -- (c) The GRASP/AQUA Project, Glasgow University, 1993-1998 -- module HscStats ( ppSourceStats ) where import Bag import HsSyn import Outputable import RdrName import SrcLoc import Util import Data.Char -- | Source Statistics ppSourceStats :: Bool -> Located (HsModu...
nomeata/ghc
compiler/main/HscStats.hs
bsd-3-clause
6,587
0
20
2,154
2,486
1,446
1,040
128
24
module Main where import BeanParser import System.Environment import Data.List.Split import Data.Maybe -- id=someidentifier;class=somdidentifier queryKeyValuePairs :: String -> Maybe [(String, String)] queryKeyValuePairs s | all (\x -> length x == 2) l = Just $ map (\a -> (head a, a!!1)) l ...
chainone/HBeanParser
app/Main.hs
bsd-3-clause
1,515
0
12
408
432
228
204
30
2
-- | -- Module : $Header$ -- Copyright : (c) 2013-2014 Galois, Inc. -- License : BSD3 -- Maintainer : cryptol@galois.com -- Stability : provisional -- Portability : portable module Cryptol.Prims.Types (typeOf) where import Cryptol.Prims.Syntax import Cryptol.TypeCheck.AST import Cryptol.Utils.Pani...
TomMD/cryptol
src/Cryptol/Prims/Types.hs
bsd-3-clause
10,070
0
18
4,343
3,419
1,801
1,618
227
51
module LaTeXGrapher.Data.Markup ( Markup(..) , isView , isLabel ) where import LaTeXGrapher.Data.Function import LaTeXGrapher.Data.Expression data Markup = View [EPoint] | Label EPoint String | Points [EPoint] | Line [EPoint] | Segment [EPoint] ...
fryguybob/LaTeXGrapher
src/LaTeXGrapher/Data/Markup.hs
bsd-3-clause
611
0
7
218
173
100
73
22
1
module Language.Lambda.Syntax.Named.Parser ( expression , exprP ) where {- === Grammar <expr> = <variable> | <expr> <expr> | \<var>.<expr> | let <expr> in <expr> | (<expr>) Todo: constants (Integers, Chars, Strings, ...) -} import Control.Applicative import qualified T...
julmue/UntypedLambda
src/Language/Lambda/Syntax/Named/Parser.hs
bsd-3-clause
2,074
0
11
508
692
365
327
66
1
module Main where import Control.Monad (liftM) import IRTS.CodegenCil import IRTS.CodegenCommon import IRTS.Compiler import Idris.AbsSyntax import Idris.ElabDecls import Idris.Main import System.Environment import System.Exit data Opts = Opts { inputs :: [FilePath] , output :: FilePath } main :: ...
bamboo/idris-cil
main/Main.hs
bsd-3-clause
1,066
0
12
256
336
175
161
32
3
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-} module NPNTool.NPNConstr ( -- * Datatypes NPNConstr(..), NPNConstrM, -- * Operations new, -- * Monadic interface run, addElemNet, mkPlace, mkTrans, label, insPlace, inT, outT, mark, marks, -- ** 'PTC.PTConstrM' and 'PTNet' interface l...
co-dan/NPNTool
src/NPNTool/NPNConstr.hs
bsd-3-clause
6,991
0
17
2,070
2,582
1,360
1,222
154
2
-- Signature module Skolem ( simplify , nnf , prenex , pnf , specialize , skolem , skolemize , askolemize ) where -- Imports import Prelude hiding (print) import qualified Fol as Fol import FormulaSyn import qualified Prop as Prop import Util.Lib((⟾)) import qualified Data.List as List -- Simpli...
etu-fkti5301-bgu/alt-exam_automated_theorem_proving
src/Skolem.hs
bsd-3-clause
4,895
0
15
1,378
2,096
1,176
920
-1
-1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE NoMonomorphismRestriction #-} import Test.Hspec import Todo.Todo import Control.Lens import Data.Time import System.Random import Control.Monad.State tstM :: State TaskStat () tstM = do actives .= [] pool .= [] today .= read "2010-01-01" rand .= mkStdGen 0 tst =...
neosam/haskelltodo
src/HSpecTests.hs
bsd-3-clause
831
0
20
184
289
149
140
-1
-1
{-# LANGUAGE ScopedTypeVariables #-} module Properties.Screen where import Utils import Test.QuickCheck import Instances import Control.Applicative import XMonad.StackSet hiding (filter) import XMonad.Operations import Graphics.X11.Xlib.Types (Dimension) import Graphics.X11 (Rectangle(Rectangle)) import XMonad.Layou...
xmonad/xmonad
tests/Properties/Screen.hs
bsd-3-clause
2,112
0
15
493
915
511
404
48
1
----------------------------------------------------------------------------- -- | -- Module : Main -- Copyright : (c) 2010 Bernie Pope -- License : BSD-style -- Maintainer : florbitous@gmail.com -- Stability : experimental -- Portability : ghc -- -- The Main module of Berp. Both the compiler and the inte...
bjpop/berp
compiler/src/Berp/Main.hs
bsd-3-clause
6,669
0
19
1,598
1,571
843
728
159
3
module WebParser ( langAttr2StemAlgo , parseBody , parseFeedLink , parseHeadlines , parseLang , parseLinkTexts , parseMain , parseMeta , parseTitles , tld2StemAlgo ) where import Data.List (intersect, isSuffixOf) import Data.List.Utils (replace) import Data.Maybe (isJust, mapMaybe) import Network.Shpider (gatherLinks,...
dawedawe/kripkeweb
src/WebParser.hs
bsd-3-clause
14,078
0
21
3,107
4,222
2,465
1,757
248
3
-- | -- Module : Crypto.Number.Generate -- License : BSD-style -- Maintainer : Vincent Hanquez <vincent@snarc.org> -- Stability : experimental -- Portability : Good module Crypto.Number.Generate ( GenTopPolicy(..) , generateParams , generateMax , generateBetween ) where import ...
nomeata/cryptonite
Crypto/Number/Generate.hs
bsd-3-clause
4,693
0
19
1,618
1,188
630
558
85
5
-- ellipticcurves.hs module MPS.Math.EllipticCurves where -- import MPS.Math.MPoly import MPS.Math.FF import MPS.Math.QQ import MPS.Math.Primes -- (primePowerFactors) import MPS.Math.NumberTheoryFundamentals (divides, power, intSqrt, legendreSymbol, sqrtsmodp) import MPS.Math.RedBlackTree import MPS.Math.Ra...
nfjinjing/mps
src/MPS/Math/EllipticCurves.hs
bsd-3-clause
12,757
40
19
3,392
3,932
2,062
1,870
148
3
-- | Common functions used by different parts of LRC DB. module Pos.DB.Lrc.Common ( -- * Getters getEpoch -- * Initialization , prepareLrcCommon -- * Helpers , dbHasKey , getBi , putBi , putBatch , putBatchBi , delete ,...
input-output-hk/pos-haskell-prototype
db/src/Pos/DB/Lrc/Common.hs
mit
3,187
0
9
609
607
348
259
54
1
module System.Build.ManningBook ( module System.Build.ManningBook.Config , module System.Build.ManningBook.Build ) where import System.Build.ManningBook.Config import System.Build.ManningBook.Build
tonymorris/manning-book
src/System/Build/ManningBook.hs
bsd-3-clause
201
0
5
17
39
28
11
5
0
-- Enthropy source for dieharder tests. -- See run-dieharder-test.sh for details import Control.Monad (forever) import Data.Word (Word32) import System.IO (hPutBuf,stdout) import Foreign.Marshal.Alloc (alloca) import Foreign.Storable (poke) import System.Random.PCG main ...
rrnewton/pcg-random
test/diehard-source.hs
bsd-3-clause
461
0
16
125
135
74
61
12
1