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 DeriveDataTypeable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE Trustworthy #-} -------------------------------------------------------------------- -- | -- Module : Data.MessagePack.Types.Assoc -- Copyright : (c) Daiki Handa, 2010-2011 -- License : BSD3 -- -- M...
SX91/hs-msgpack-types
src/Data/MessagePack/Types/Assoc.hs
bsd-3-clause
1,147
0
7
237
152
98
54
14
0
module TranslationLister where import Control.Monad ( forM ) import System.Directory ( getDirectoryContents, doesFileExist, doesDirectoryExist ) import System.FilePath ( (</>) ) import Data.List ( isSuffixOf, stripPrefix, groupBy ) -- Directly lifted from http://book.realworldhaskell.org/read/io-case-study-a-library-...
sebug/TranslationLister
TranslationLister.hs
bsd-3-clause
2,715
0
16
657
807
418
389
60
4
{-# LANGUAGE TemplateHaskell #-} module HNN.Optimize.Vanilla ( VanillaT , runVanilla , vanilla ) where import Control.Monad.Reader import Data.VectorSpace import Control.Lens data VanillaReader s = VanillaReader { _learningRate :: s } makeLenses ''VanillaReader type VanillaT s = ReaderT (VanillaReader ...
alexisVallet/hnn
src/HNN/Optimize/Vanilla.hs
bsd-3-clause
575
0
11
108
181
96
85
18
1
{-# language DataKinds #-} {-# language TypeFamilies #-} {-# language GADTs #-} {-# language MultiParamTypeClasses #-} {-# language DeriveDataTypeable #-} {-# language StandaloneDeriving #-} {-# language FlexibleInstances #-} {-# language FlexibleContexts #-} {-# language UndecidableInstances #-} {-# language Rank2Type...
paolino/book-a-visit
client/UI/Proposal.hs
bsd-3-clause
3,932
0
21
790
1,310
706
604
101
2
module Main where import Rsdlsb.Init main :: IO () main = run
Raveline/rsdlsb
app/Main.hs
bsd-3-clause
64
0
6
14
24
14
10
4
1
module Phil.Core.AST.Pattern where import Data.Monoid import Data.Text (Text) import qualified Data.Text as T import Phil.Core.AST.Identifier import Phil.Core.AST.Literal import Text.PrettyPrint.ANSI.Leijen hiding ((<>)) data Pattern = PatId Ident | PatCon Ctor [Ident] | PatLit Literal | PatWildcard deri...
LightAndLight/hindley-milner
src/Phil/Core/AST/Pattern.hs
bsd-3-clause
610
0
8
98
208
117
91
19
1
module Main where -- | Unfortunately there is no test. There is only use cases -- where you can find how you can use telegram bot api methods import Control.Lens.Basic import Data.Text (Text) import Control.Applicative ((<$>)) import Data.Maybe (maybe) import Data.Configurator (Worth (Required)) imp...
DbIHbKA/telegram-client
test/Spec.hs
bsd-3-clause
1,934
0
18
609
546
281
265
-1
-1
{-# LANGUAGE BangPatterns #-} module Yarn ( Yarn (..) , IOMode (..) , stdin , stdout , withFile , openFile , close , foldl , foldl' , insert ) where import Control.Applicative import Control.Exception import Control.Monad import qualified Data.A...
yuttie/fibers
Yarn.hs
bsd-3-clause
3,924
0
25
1,557
1,304
644
660
111
5
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE Overloa...
jamshidh/ethereum-data-sql
src/Blockchain/Data/Transaction.hs
bsd-3-clause
8,805
0
26
2,281
2,226
1,225
1,001
204
4
{-# LANGUAGE BangPatterns #-} ----------------------------------------------------------------------------- -- | Copyright : (c) 2010 Jasper Van der Jeugt -- (c) 2010-2011 Simon Meier -- License : BSD3-style (see LICENSE) -- -- Maintainer : Simon Meier <iridcode@gmail.com> -- Portability : GHC -...
markflorisson/hpack
testrepo/bytestring-0.10.2.0/Data/ByteString/Builder/Extra.hs
bsd-3-clause
7,459
0
22
1,663
962
563
399
108
5
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.Raw.NVX -- Copyright : (c) Sven Panne 2015 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portable -- -- A conveni...
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/NVX.hs
bsd-3-clause
756
0
5
86
62
51
11
5
0
{-# LANGUAGE CPP #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE Fle...
conal/shaped-types
src/ShapedTypes/Vec.hs
bsd-3-clause
6,627
23
12
1,325
1,055
633
422
-1
-1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} module Autonix.Analyze ( Analyzer , analyzeFiles , analyzePackages ) where import Codec.Archive import Control.Lens import Control.Monad.State import Control.Monad.Trans.Resource import Data.ByteString (ByteString) import...
ttuegel/autonix-deps
src/Autonix/Analyze.hs
bsd-3-clause
1,864
0
15
382
619
332
287
-1
-1
{-# LANGUAGE ExistentialQuantification, DeriveDataTypeable , FlexibleInstances, MultiParamTypeClasses, OverloadedStrings, CPP #-} module Transient.MapReduce ( Distributable(..),distribute, getText, getUrl, getFile,textUrl, textFile, mapKeyB, mapKeyU, reduce,eval, --v* internals DDS(..),Partition(..),PartRef(..)) wh...
transient-haskell/transient-universe
src/Transient/MapReduce.hs
mit
17,359
0
6
5,762
228
131
97
-1
-1
{-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE OverloadedLists #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} module Main where import qualified Yesod.Cor...
Operational-Transformation/ot-demo
backends/haskell/OTDemo.hs
mit
5,137
0
22
1,011
1,569
811
758
123
3
{- | Module : $Header$ Description : pretty printing for CSMOF Copyright : (c) Daniel Calegari Universidad de la Republica, Uruguay 2013 License : GPLv2 or higher, see LICENSE.txt Maintainer : dcalegar@fing.edu.uy Stability : provisional Portability : portable -} module CSMOF.Print where import ...
keithodulaigh/Hets
CSMOF/Print.hs
gpl-2.0
3,771
0
22
904
1,273
627
646
92
0
module Data.Bson.Binary.Tests ( tests ) where import Test.Framework (Test, testGroup) tests :: Test tests = testGroup "Data.Bson.Binary.Tests" []
mongodb-haskell/bson
tests/Data/Bson/Binary/Tests.hs
apache-2.0
155
0
6
27
43
26
17
5
1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : Qt.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:01:40 Warning : this file is machine generated - do not modify...
keera-studios/hsQt
Qt.hs
bsd-2-clause
481
0
4
98
24
18
6
6
0
{-# LANGUAGE Haskell98 #-} {-# LINE 1 "Data/Attoparsec/Internal/Fhthagn.hs" #-} {-# LANGUAGE BangPatterns, Rank2Types, OverloadedStrings, RecordWildCards, MagicHash, UnboxedTuples #-} module Data.Attoparsec.Internal.Fhthagn ( inlinePerformIO ) where import GHC.Base (realWorld#) import GHC.IO (IO(IO)...
phischu/fragnix
tests/packages/scotty/Data.Attoparsec.Internal.Fhthagn.hs
bsd-3-clause
716
0
8
119
89
54
35
12
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-elasticbeanstalk/gen/Network/AWS/ElasticBeanstalk/DescribeApplications.hs
mpl-2.0
4,331
0
10
812
530
319
211
62
1
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_HADDOCK show-extensions #-} -- | -- Module : Yi.Keymap.Vim.NormalMap -- License : GPL-2 -- Maintainer : yi-devel@googlegroups.com -- Stability : experimental -- Portability : portable module Yi.Keymap.Vim.NormalMap (def...
siddhanathan/yi
yi-keymap-vim/src/Yi/Keymap/Vim/NormalMap.hs
gpl-2.0
21,110
120
21
6,206
5,563
2,998
2,565
405
4
{-| Auto-repair task of the maintenance daemon. This module implements the non-pure parts of harep-style repairs carried out by the maintenance daemon. -} {- Copyright (C) 2015 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided t...
leshchevds/ganeti
src/Ganeti/MaintD/Autorepairs.hs
bsd-2-clause
10,592
0
27
3,754
2,135
1,106
1,029
171
6
{-# LANGUAGE DeriveGeneric #-} module Auto.G.BigProduct where import Control.DeepSeq import Data.Aeson import GHC.Generics (Generic) import Options data BigProduct = BigProduct !Int !Int !Int !Int !Int !Int !Int !Int !Int !Int !Int !Int !Int !Int !Int !Int !Int !Int !Int !Int !Int !Int !Int !Int ...
dmjio/aeson
benchmarks/bench/Auto/G/BigProduct.hs
bsd-3-clause
808
1
7
254
255
121
134
76
1
----------------------------------------------------------------------------- -- | -- Module : XMonad.Actions.DynamicWorkspaces -- Copyright : (c) David Roundy <droundy@darcs.net> -- License : BSD3-style (see LICENSE) -- -- Maintainer : none -- Stability : unstable -- Portability : unportable -- -- ...
adinapoli/xmonad-contrib
XMonad/Actions/DynamicWorkspaces.hs
bsd-3-clause
8,186
0
18
2,551
1,770
921
849
98
4
module PackageTests.BuildDeps.GlobalBuildDepsNotAdditive1.Check where import Test.HUnit import PackageTests.PackageTester import System.FilePath import Data.List import Control.Exception import Prelude hiding (catch) suite :: FilePath -> Test suite ghcPath = TestCase $ do let spec = PackageSpec ("PackageTests" <...
jwiegley/ghc-release
libraries/Cabal/cabal/tests/PackageTests/BuildDeps/GlobalBuildDepsNotAdditive1/Check.hs
gpl-3.0
780
0
16
163
196
101
95
19
1
-- This script processes the following source file: -- -- http://unicode.org/Public/UNIDATA/SpecialCasing.txt module SpecialCasing ( SpecialCasing(..) , Case(..) , parseSC , mapSC ) where import Arsec data SpecialCasing = SC { scComments :: [Comment], scCasing :: [Case] } ...
spencerjanssen/text
scripts/SpecialCasing.hs
bsd-2-clause
1,761
0
19
558
610
325
285
42
1
{-# LANGUAGE TypeFamilies #-} module T4179 where class DoC a where type A2 a type A3 a op :: a -> A2 a -> A3 a data Con x = InCon (x (Con x)) type FCon x = x (Con x) -- should have been changed to this, which works -- foldDoC :: Functor f => (f a -> a) -> A2 (FCon f) -> Con f -> a -- foldDoC f i (In...
urbanslug/ghc
testsuite/tests/indexed-types/should_fail/T4179.hs
bsd-3-clause
814
0
10
209
280
145
135
-1
-1
-- Copyright 2012 Mitchell Kember. Subject to the MIT License. -- | The 'Scene' type, several other types that it contains, and the 'trace' -- function for ray tracing scenes. This module is responsible for transforming -- a single ray into a colour. module Luminosity.Trace ( -- * Types Scene(..) , Settings(..) , Wo...
mk12/luminosity
src/Luminosity/Trace.hs
mit
3,985
0
18
1,068
1,057
605
452
92
3
module Main where -- initialized import Init -- Handlers import Handler.Home mkYesodDispatch "Ember" resourcesEmber main :: IO () main = do pool <- createSqlitePool "database.sqlite" 10 -- create a new pool -- perform any necessary migration runSqlPersistMPool (runMigration migrateAll) pool manager ...
mkrull/yesod-ember-skel
src/Main.hs
mit
424
0
9
87
89
45
44
-1
-1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE CPP #-} module Data.Aeson.Config.Parser ( Parser , runParser , typeMismatch , withObject , withText , withString , withArray , withNumber , withBool , explicitParseField , explicitParseFieldMayb...
sol/hpack
src/Data/Aeson/Config/Parser.hs
mit
4,847
0
23
1,070
1,791
936
855
117
6
module GHCJS.DOM.SVGScriptElement ( ) where
manyoo/ghcjs-dom
ghcjs-dom-webkit/src/GHCJS/DOM/SVGScriptElement.hs
mit
46
0
3
7
10
7
3
1
0
{-| Module : Main Description : Entry point for GGg Copyright : (c) Carter Hinsley, 2015 License : MIT Maintainer : carterhinsley@gmail.com -} module Main where import CLI import System.Environment -- | Retrieve command-line arguments and process them. main :: IO () main = parseArgs =<< getArgs
xnil/GGg
src/Main.hs
mit
311
0
6
62
33
20
13
5
1
{-# htermination showList :: [()] -> String -> String #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_showList_2.hs
mit
58
0
2
10
3
2
1
1
0
{-# LANGUAGE CPP #-} module GHCJS.DOM.SVGFilterElement ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.SVGFilterElement #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/SVGFilterElement.hs
mit
361
0
5
33
33
26
7
4
0
-- file: ch03/add.hs myNot True = False myNot False = True -- We've defined a function as a series of equations. -- Another example: sumList (x:xs) = x + sumList xs sumList [] = 0
supermitch/learn-haskell
real-world-haskell/ch03/add.hs
mit
188
0
7
43
52
27
25
4
1
module FrontEnd.Lex.Parse(parseM,parse,parseStmt) where import Util.Std import FrontEnd.HsSyn import FrontEnd.Lex.Layout import FrontEnd.Lex.Lexer import FrontEnd.Lex.ParseMonad import FrontEnd.Warning import Options import PackedString import qualified FlagDump as FD import qualified FrontEnd.Lex.Parser as P parseM...
m-alvarez/jhc
src/FrontEnd/Lex/Parse.hs
mit
2,170
0
23
742
805
389
416
53
4
module GraphGen ( list, GraphGen.cycle, star, complete, binaryTree, ) where import qualified Graph (graphFromEdgeList, LabeledGraph) list :: (Enum a, Num a, Show a) => a -> Graph.LabeledGraph list n = Graph.graphFromEdgeList [(show v, show (v+1)) | v <- [1..(n-1)]] cycle :: (Integral a, Show a) =>...
cjlarose/Haskell-Graphs
GraphGen.hs
mit
1,138
0
14
285
660
358
302
26
1
{-# LANGUAGE NoImplicitPrelude, OverloadedStrings, TupleSections, GADTs #-} module Day21 where import AdventPrelude import qualified Data.Sequence as S input :: IO Text input = readFile "data/day21.txt" -- input = pure -- "swap position 4 with position 0\n\ -- \swap letter d with letter b\n\ -- \reverse positi...
farrellm/advent-2016
src/Day21.hs
mit
2,786
0
22
751
1,098
565
533
72
2
{-# LANGUAGE CPP #-} module GHCJS.DOM.SVGLengthList ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.SVGLengthList #else #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) import GHCJS.DOM.JSFFI.Gener...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/SVGLengthList.hs
mit
352
0
5
33
33
26
7
4
0
import Test.Hspec import Test.Hspec.QuickCheck import Test.QuickCheck import qualified TestWeighted import qualified TestEnumerator import qualified TestPopulation import qualified TestSequential import qualified TestTrace import qualified TestInference import qualified TestSMCObservations import qualified TestGradien...
ocramz/monad-bayes
test/Spec.hs
mit
6,086
0
19
1,236
1,026
507
519
98
1
module Test where -- (append xs ys) returns the lists xs and ys appended -- For example: -- append [1,2,3] [5,2] = [1,2,3,5,2] append :: [a] -> [a] -> [a] append [] ys = ys append (x:xs) ys = x : (append xs ys) -- addup xs returns the sum of the numbers in -- the list xs. For example: -- addup ...
ladinu/cs457
src/Test.hs
mit
3,459
0
12
1,052
1,391
754
637
61
1
{-# LANGUAGE FlexibleInstances, FlexibleContexts, TypeFamilies, OverloadedStrings #-} module Main where import Happstack.Server import Text.Blaze ((!)) import qualified Control.Monad as CM import qualified Data.Monoid as DM import qualified Control.Applicative.Indexed as CAI im...
lhoghu/yahoo-portfolio-manager
ypm-server/Data/YahooPortfolioManager/Server/Main.hs
mit
6,168
0
15
1,871
1,741
884
857
133
2
{-# LANGUAGE OverloadedStrings, TypeFamilies, RankNTypes, DeriveFunctor #-} {- | Module : Routes.Monad Copyright : (c) Anupam Jain 2013 License : MIT (see the file LICENSE) Maintainer : ajnsit@gmail.com Stability : experimental Portability : non-portable (uses ghc extensions) Defines a Routing Mo...
ajnsit/wai-routes
src/Routes/Monad.hs
mit
2,729
0
10
550
499
275
224
43
2
{-# LANGUAGE UnicodeSyntax #-} {-# LANGUAGE OverloadedStrings #-} -- | -- Module: Main -- Description: Exampe for using wai-cors with scotty -- Copyright: © 2015 Lars Kuhtz <lakuhtz@gmail.com> -- License: MIT -- Maintainer: Lars Kuhtz <lakuhtz@gmail.com> -- Stability: experimental -- module Main ( main ) where import...
larskuhtz/wai-cors
examples/Scotty.hs
mit
470
0
9
80
72
42
30
10
1
{- | Copyright : (c) Takayuki Muranushi, 2015 License : MIT Maintainer : muranushi@gmail.com Stability : experimental A virtual machine with multidimensional vector instructions that operates on structured lattices, as described in http://arxiv.org/abs/1204.4779 . -} {-# LANGUAGE DataKinds, DeriveDataTypeabl...
nushio3/formura
src/Formura/OrthotopeMachine/Graph.hs
mit
7,729
0
14
1,533
2,372
1,264
1,108
133
9
module Example.Example05 where import qualified Com.Mysql.Cj.Mysqlx.Protobuf.Ok as POk import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as BL import DataBase.MySQLX.Util import DataBase.MySQLX.Model example01 = do putStrLn "start Example02#exampl...
naoto-ogawa/h-xproto-mysql
src/Example/Example05.hs
mit
938
0
11
158
155
84
71
18
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-licensespecification.html module Stratosphere.ResourceProperties.EC2InstanceLicenseSpecification...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/EC2InstanceLicenseSpecification.hs
mit
1,763
0
13
164
174
100
74
23
1
-------------------------------------------------------------------------------- {- | Module : Data.Acid.Centered Copyright : MIT Maintainer : max.voit+hdv@with-eyes.net Portability : non-portable (uses GHC extensions) A replication backend for acid-state that is centered around a Master node. ...
sdx23/acid-state-dist
src/Data/Acid/Centered.hs
mit
3,339
0
4
728
104
86
18
14
0
module AnotherParser where import List import Data.Char import System.IO -- |A line is string of characters (end-of-line has been stripped) paired with -- its line number. type Line = (Int, String) -- |A line group is either a list of a single line representing a directive or -- a list of multiple lines representing...
mgax/beancount
lib/haskell/AnotherParser.hs
gpl-2.0
1,931
0
13
454
410
221
189
26
2
import qualified Data.Map as M import System.Environment (getArgs) type Prog = [[String]] data LabelData = L (M.Map String LabelData) Prog value v vs = M.findWithDefault False v vs x `nand` y = not (x && y) runCmds :: M.Map String Bool -> M.Map String LabelData -> [[String]] -> String runCmds vars labels prog@([labe...
shinh/ags
be/fetcher/fernando.hs
gpl-2.0
1,208
0
14
295
543
283
260
28
3
{- arch-tag: srcinst main file Copyright (C) 2004 John Goerzen <jgoerzen@complete.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later v...
jgoerzen/srcinst
srcinst.hs
gpl-2.0
1,361
0
10
273
130
65
65
18
2
{- | Module : $Header$ Copyright : (c) T.Mossakowski, W.Herding, C.Maeder, Uni Bremen 2004-2006 License : GPLv2 or higher, see LICENSE.txt Maintainer : till@informatik.uni-bremen.de Stability : provisional Portability : portable Abstract syntax for modal logic extension of CASL Only the added sy...
nevrenato/HetsAlloy
Modal/AS_Modal.der.hs
gpl-2.0
1,446
0
10
369
231
130
101
18
0
{- - A simple interpreter for a Turing machine - This is all the machinery for actually simulating the running of such a machine - It can move the tape, write to the tape, read from the tape - When run is supplied with a transition function and initial tape, it should output the final result of the TM - Each TM is...
icendoan/Fun
haskell/turing.hs
gpl-2.0
7,339
0
13
1,479
3,064
1,665
1,399
134
8
module Render (clearCanvas, CPosition(..), CSize(..), toDouble, renderWave, renderTurtle, renderPngFit, renderPngInline, renderLayoutG, renderLayoutM, yposSequence, renderSlide) where import System.FilePath ((</>),(<.>)) import Control.Monad import Control.Monad.Reader impor...
uemurax/carettah
Render.hs
gpl-2.0
7,947
11
17
1,968
2,958
1,497
1,461
183
3
{-# LANGUAGE CPP #-} {- | Module : $Header$ Description : Writing various formats, according to Hets options Copyright : (c) Klaus Luettich, C.Maeder, Uni Bremen 2002-2006 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portability : non-por...
nevrenato/Hets_Fork
Driver/WriteFn.hs
gpl-2.0
15,112
289
21
4,520
4,304
2,228
2,076
312
21
{-# LANGUAGE NoImplicitPrelude, OverloadedStrings, RecordWildCards #-} module Lamdu.GUI.ParamEdit ( Info(..), make , eventMapAddFirstParam , diveToNameEdit ) where import Control.Lens.Operators import Control.Lens.Tuple import Control.MonadA (MonadA) import qualified Data....
rvion/lamdu
Lamdu/GUI/ParamEdit.hs
gpl-3.0
5,151
0
17
1,140
1,248
664
584
-1
-1
-- Haskell Practical 3 Code - N1 Parser -- By James Cowgill import Prac2.Alex import Prac3.LLParser {- Original Grammar e = e + e | e - e | e * e | N | V | (e) b = not b (logical) | b and b (logical) | b or b (logical) | e = e ...
jcowgill/cs-work
syac/compilers/Prac3/5NParser.hs
gpl-3.0
4,104
0
9
1,678
1,008
516
492
43
1
import Data.List keepsInside :: [[Int]] -> (Int -> Int) -> [[Int]] keepsInside matrix f = filter isMember (transpose matrix) where isMember x = helper x x where helper (x:xs) y = if (elem (f x) y) then helper xs y else False helper [] y = True main :: IO() main = do print (keepsInsi...
deni-sl/Functional-programming
Homework 3/hw3.81275.task1.hs
gpl-3.0
354
8
13
95
209
111
98
12
3
{-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE GHCForeignImportPrim #-} -- foreign import prim {-# LANGUAGE MagicHash #-} -- postfix # on identifiers {-# LANGUAGE UnboxedTuples #-} -- (# #) {-# LANGUAGE UnliftedFFITypes #-} -- argument type of foreign import {-# LANGUAGE BangPatterns #-} -- | module ...
comius/haskell-mpfr
src/Data/Approximate/MPFR/Types.hs
lgpl-3.0
6,714
12
16
1,548
1,983
1,074
909
-1
-1
module GCrypt.MPI.Comp ( cmp, cmpUi, ) where import GCrypt.Base import GCrypt.Util cmp :: MPI -> MPI -> IO Ordering cmp u v = gcry_mpi_cmp u v >>= return . int2ord cmpUi :: MPI -> ULong -> IO Ordering cmpUi u v = gcry_mpi_cmp_ui u v >>= return . int2ord int2ord :: Integral a => a -> Ordering int2ord a | a <...
sw17ch/hsgcrypt
src/GCrypt/MPI/Comp.hs
lgpl-3.0
379
0
8
107
160
81
79
13
1
module Main where import Test.QuickCheck import Test.Framework (defaultMain, testGroup) import Test.Framework.Providers.QuickCheck2 (testProperty) main = defaultMain tests tests = [ testGroup "boring" boringTests ] -- boring tests! boring :: Int -> Bool boring x = const "hell...
k0001/hacker-rank
tests/Main.hs
unlicense
384
0
6
91
95
54
41
10
1
import System.IO main = do contents <- readFile "./Learn_You_a_Haskell_programs/girlfriend.txt" putStr contents {- equivalent to all: main = do withFile "./Learn_You_a_Haskell_programs/girlfriend.txt" ReadMode (\handle -> do contents <- hGetContents handle putStr contents)...
haroldcarr/learn-haskell-coq-ml-etc
haskell/book/2011-Learn_You_a_Haskell/girlfriend.hs
unlicense
488
0
8
110
28
13
15
4
1
{-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE NoImplicitPrelude, OverloadedStrings, UnicodeSyntax, TypeOperators, TypeFamilies, FlexibleInstances, FlexibleContexts, MultiParamTypeClasses, ScopedTypeVariables, DataKinds, QuasiQuotes, TemplateHaskell, DeriveGeneric, LambdaCase #-} -- | The IndieAuth/rel-me-auth imp...
myfreeweb/sweetroll
sweetroll-be/library/Sweetroll/Auth.hs
unlicense
8,920
0
22
2,336
2,442
1,251
1,191
155
4
----------------------------------------------------------------------------- -- -- Module : IniConfiguration -- Description : -- Copyright : (c) Tobias Reinhardt, 2015 <tobioso92_@hotmail.com -- License : Apache License, Version 2.0 -- -- Maintainer : Tobias Reinhardt <tobioso92_@hotmail.com> -- Portab...
tobiasreinhardt/show
IniConfiguration/src/IniConfiguration.hs
apache-2.0
672
0
4
99
47
37
10
9
0
module RemainderGame.A268060 (a268060) where import Helpers.RemainderGame (shrinkingDivisorIterations) import RemainderGame.A268058 (a268058) import Data.Maybe (fromJust) import Data.List (find) a268060 :: Int -> Integer a268060 n = toInteger $ fromJust $ find f [1..n] where f k = shrinkingDivisorIterations n k == a...
peterokagey/haskellOEIS
src/RemainderGame/A268060.hs
apache-2.0
329
0
8
44
108
59
49
8
1
module Emulator.Types where import Data.Array.IO import Data.Array.Unboxed import qualified Data.Word type Byte = Data.Word.Word8 type HalfWord = Data.Word.Word16 type MWord = Data.Word.Word32 type Address = Data.Word.Word32 type DWord = Data.Word.Word64 type RegisterVal = Address type Memory = UArray Address B...
intolerable/GroupProject
src/Emulator/Types.hs
bsd-2-clause
511
0
6
84
159
96
63
16
0
module Database.VCache.Read ( readAddrIO , readRefctIO , withBytesIO ) where import Control.Monad import qualified Data.Map.Strict as Map import Control.Concurrent.MVar import Data.Word import Foreign.Ptr import Foreign.Storable import Foreign.Marshal.Alloc import Database.LMDB.Raw import Database.V...
dmbarbour/haskell-vcache
hsrc_lib/Database/VCache/Read.hs
bsd-2-clause
3,203
0
27
846
854
445
409
-1
-1
import qualified Platform.Test as Test main = Test.main
mit-plv/riscv-semantics
src/Platform/MainTest.hs
bsd-3-clause
58
0
5
10
16
10
6
2
1
{-# OPTIONS -Wall #-} module Language.Pck.Tool ( -- * Assembler parseInst , parseInstFile -- * Debugger , runDbg , runDbgIO , DbgTrc(..) , DbgBrk(..) , DbgOrd(..) , TrcLog -- * Interactive Debugger , runIdbIO --...
takenobu-hs/processor-creative-kit
Language/Pck/Tool.hs
bsd-3-clause
746
0
6
249
160
111
49
20
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE KindSignatures #-} module Servant.API.WithNamedContext where import GHC.TypeLits -- | 'WithNamedContext' names a specific tagged context to use for the -- combinators in the API. (See also in @servant-server@, -- @Servant.Server.Context@.) For example: -- -- > type UseNamedCon...
zerobuzz/servant
servant/src/Servant/API/WithNamedContext.hs
bsd-3-clause
715
0
6
109
48
38
10
-1
-1
{-# LANGUAGE PackageImports #-} module Control.Monad.ST.Lazy (module M) where import "base" Control.Monad.ST.Lazy as M
silkapp/base-noprelude
src/Control/Monad/ST/Lazy.hs
bsd-3-clause
124
0
4
18
25
19
6
3
0
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE...
nazrhom/vcs-clojure
src/VCS/Multirec.hs
bsd-3-clause
8,949
1
13
2,268
4,444
2,264
2,180
-1
-1
{-# language CPP #-} -- | = Name -- -- VK_EXT_sampler_filter_minmax - device extension -- -- == VK_EXT_sampler_filter_minmax -- -- [__Name String__] -- @VK_EXT_sampler_filter_minmax@ -- -- [__Extension Type__] -- Device extension -- -- [__Registered Extension Number__] -- 131 -- -- [__Revision__] -- 2 -...
expipiplus1/vulkan
src/Vulkan/Extensions/VK_EXT_sampler_filter_minmax.hs
bsd-3-clause
8,690
0
8
1,622
504
367
137
-1
-1
{- The following is modified by Lee Pike (2014) and still retains the following license: Copyright (c) 2000-2012, Koen Claessen Copyright (c) 2006-2008, Björn Bringert Copyright (c) 2009-2012, Nick Smallbone All rights reserved. Redistribution and use in source and binary forms, with or without modification, are per...
markus1189/SmartCheck
src/Test/SmartCheck/Test.hs
bsd-3-clause
15,241
0
22
5,208
4,005
2,054
1,951
268
5
{-# LANGUAGE DeriveGeneric #-} {-# OPTIONS_GHC -fplugin Brisk.Plugin #-} {-# OPTIONS_GHC -fplugin-opt Brisk.Plugin:runDataNode #-} module Managed where import Data.Binary import GHC.Generics (Generic) import qualified Data.HashMap.Strict as M import Control.Distributed.Process hiding (call) import Control.Distributed....
abakst/brisk-prelude
examples/Managed.hs
bsd-3-clause
2,213
0
14
417
543
297
246
54
2
{-# LANGUAGE DeriveGeneric #-} module Interfaces.Entropia ( queryEntropia , formatEntropia ) where import Data.Aeson (eitherDecode, FromJSON(..)) import Control.Applicative ((<$>)) import GHC.Generics import Network.Curl import Interfaces.HTML (fetchLazy) -- |URL to Entropia's JSON status file entropiaJS...
vehk/Indoril
src/Interfaces/Entropia.hs
bsd-3-clause
1,212
0
8
304
195
116
79
22
2
{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module : Main -- Copyright : (c) David Himmelstrup 2005 -- License : BSD-like -- -- Maintainer : lemmih@gmail.com -- Stability : provisional -- Portability : portable -- -- Entry point to the ...
randen/cabal
cabal-install/Main.hs
bsd-3-clause
57,895
0
24
15,538
10,567
5,500
5,067
942
13
#!/usr/bin/env stack -- stack --resolver lts-3.2 --install-ghc runghc --package hedis --package disque {-# LANGUAGE OverloadedStrings #-} import Control.Monad.IO.Class import Database.Disque main :: IO () main = do conn <- connect disqueConnectInfo runDisque conn $ do let timeout = 0 addjob "test_queue" ...
creichert/disque.hs
example.hs
bsd-3-clause
404
0
13
73
95
47
48
10
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} module Json ( JValue(..) , JAry(..) , JObj(..) ) where import Control.Arrow (second) import ApplicativeParsec import qualified Numeric as N newtype JAry a = JAry { fro...
Danl2620/htads
src/Json.hs
bsd-3-clause
5,267
0
18
1,526
1,513
789
724
112
3
module Internal.Sparc.Default where import Foreign import Foreign.C.Types import Hapstone.Internal.Sparc import Test.QuickCheck import Test.QuickCheck.Instances -- generators for our datatypes instance Arbitrary SparcCc where arbitrary = elements [minBound..maxBound] instance Arbitrary SparcHint where arbi...
ibabushkin/hapstone
test/Internal/Sparc/Default.hs
bsd-3-clause
1,097
0
9
203
263
143
120
28
0
-- | Provide a Buck/Bazel style UI. module Development.Shake.Internal.CompactUI( compactUI ) where import Development.Shake.Internal.CmdOption import Development.Shake.Internal.Options import Development.Shake.Internal.Progress import System.Time.Extra import General.Extra import Control.Exception import Gen...
ndmitchell/shake
src/Development/Shake/Internal/CompactUI.hs
bsd-3-clause
2,824
0
16
730
1,031
542
489
55
5
{-# LANGUAGE StandaloneDeriving, GeneralizedNewtypeDeriving, OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Data.Hangouts.SQLite (dumpToSQLite, extendSQLite, initSQLite) where import Data.Hangouts import Database.SQLite.Simple import Database.SQLite.Simple.ToField import qu...
valderman/hangouts-logbaker
Data/Hangouts/SQLite.hs
bsd-3-clause
3,242
0
14
737
583
297
286
51
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-ses/gen/Network/AWS/SES/GetSendQuota.hs
mpl-2.0
4,575
0
14
964
639
384
255
80
1
module Language.K3.TypeSystem.Data.Result where import Data.Map import Data.Monoid import Language.K3.Core.Annotation import Language.K3.Core.Common import Language.K3.Core.Type import Language.K3.TypeSystem.Data.Types import Language.K3.TypeSystem.Data.ConstraintSet import Language.K3.TypeSystem.Data.Environments.T...
DaMSL/K3
src/Language/K3/TypeSystem/Data/Result.hs
apache-2.0
1,290
0
13
227
284
170
114
22
0
{-# LANGUAGE CPP, NamedFieldPuns, NondecreasingIndentation #-} {-# OPTIONS_GHC -fno-cse #-} -- -fno-cse is needed for GLOBAL_VAR's to behave properly ----------------------------------------------------------------------------- -- -- GHC Driver -- -- (c) The University of Glasgow 2005 -- ------------------------------...
olsner/ghc
compiler/main/DriverPipeline.hs
bsd-3-clause
102,547
0
31
34,471
16,297
8,260
8,037
1,378
43
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE OverloadedStrings #-} -- | Constants used throughout the project. module Stack.Constants (buildPlanDir ,distDirFromDir ,workDirFromDir ,distRelativeDir ,haskellModuleExts ,imageStagingDir ,projectDockerSandboxDir ,stackDotYaml ,stackWor...
mrkkrp/stack
src/Stack/Constants.hs
bsd-3-clause
11,753
0
13
2,649
2,107
1,158
949
250
2
-- an example where we want to compile and load a file import System.Plugins import API main = do make "../Null.hs" ["-i../api"] m_v <- load "../Null.o" ["../api"] [] "resource" v <- case m_v of LoadSuccess _ v -> return v _ -> error "load failed" putStrLn ( show (a v)...
abuiles/turbinado-blog
tmp/dependencies/hs-plugins-1.3.1/testsuite/make/null/prog/Main.hs
bsd-3-clause
323
0
11
101
99
47
52
9
2
module Cabal2Nix.Package where import qualified Cabal2Nix.Hackage as DB import Control.Applicative import qualified Control.Exception as Exception import Control.Monad import Control.Monad.IO.Class import Control.Monad.Trans.Maybe import Data.List ( isSuffixOf, isPrefixOf ) import Data.Maybe import Data.Version import...
jb55/cabal2nix
src/Cabal2Nix/Package.hs
bsd-3-clause
6,438
0
21
1,280
1,558
792
766
-1
-1
module Grammatik.CF.Kettenfrei where -- -- $Id$ import Grammatik.Type import Autolib.Fix import Autolib.Set import Autolib.FiniteMap import qualified Autolib.Relation as Relation import Data.List (partition) import Control.Monad (guard) -- | eingabe: kontextfreie Grammatik G1 -- ausgabe: kontextfreie Grammatik G2 ...
florianpilz/autotool
src/Grammatik/CF/Kettenfrei.hs
gpl-2.0
1,134
12
13
326
387
212
175
32
2
{-# LANGUAGE FlexibleInstances, GADTs, MultiParamTypeClasses, TypeOperators, TypeSynonymInstances, ViewPatterns #-} module Data.Type.Equality.Generics where import Data.Type.Equality import GHC.Generics import Unsafe.Coerce (unsafeCoerce) sameRep' :: (Generic a, Generic b, Rep a ~ D1 d f, Rep b ~ D1 d' f', Datatype ...
minad/omega
mosaic/TyEqGen.hs
bsd-3-clause
1,892
6
11
452
827
416
411
30
1
{-# LANGUAGE NoImplicitPrelude #-} import Prelude (Bool, Char) class Eq a where (==) :: a -> a -> Bool undefined = undefined not :: Bool -> Bool not = undefined const :: a -> b -> a const = undefined toUpper :: Char -> Char toUpper = undefined test x = let y = x == x in not x
themattchan/tandoori
input/boolchar-class.hs
bsd-3-clause
294
0
9
77
120
63
57
13
1
module A2 where --Any type/data constructor name declared in this module can be renamed. --Any type variable can be renamed. --Rename type Constructor 'BTree' to 'MyBTree' data BTree a = Empty | T a (BTree a) (BTree a) deriving Show buildtree :: Ord a => [a] -> BTree a buildtree [] = Empty buildtree...
SAdams601/HaRe
old/testing/unfoldAsPatterns/A2_TokOut.hs
bsd-3-clause
610
0
8
152
232
119
113
13
1
module D4 where {- generalise function 'f' on the sub-expression '1' with a new parameter 'z', This refactoring affects the modules 'D4' and 'A4'-} y=0 f x =x + ( y + 1) sumFun xs = sum $ map f xs
RefactoringTools/HaRe
test/GenDef/D4.hs
bsd-3-clause
206
0
7
50
46
25
21
4
1
{- | Module : Language.Javascript.JMacro Copyright : (c) Gershom Bazerman, 2010 License : BSD 3 Clause Maintainer : gershomb@gmail.com Stability : experimental Simple DSL for lightweight (untyped) programmatic generation of Javascript. A number of examples are available in the source of "Language.J...
k-bx/ghcjs
src/Compiler/JMacro.hs
mit
3,494
0
5
597
94
63
31
13
1
{-# LANGUAGE TypeOperators #-} module T7609 where data X a b f :: (a `X` a, Maybe) f = undefined g :: (a `X` a) => Maybe g = undefined
urbanslug/ghc
testsuite/tests/typecheck/should_fail/T7609.hs
bsd-3-clause
138
0
7
33
57
36
21
-1
-1
{-# LANGUAGE ImpredicativeTypes, FlexibleContexts #-} module T2846 where f :: String f = show ([1,2,3] :: [Num a => a])
siddhanathan/ghc
testsuite/tests/typecheck/should_fail/T2846b.hs
bsd-3-clause
122
0
9
22
43
26
17
-1
-1
{- rrdgraph-haskell – Haskell DSL for rendering RRD graphs using RRDtool Copyright © 2011 Johan Kiviniemi <devel@johan.kiviniemi.name> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission no...
ion1/rrdgraph-haskell
Data/RRDGraph/VDef.hs
isc
2,120
0
8
406
473
264
209
43
1
{-# LANGUAGE DeriveFunctor #-} module Shakespeare.Dynamic.Event where import Data.Aeson import Control.Applicative import Control.Monad import Data.Foldable import Data.Monoid import Data.Traversable -- | An event type that allows for a base event type -- so that y...
plow-technologies/shakespeare-dynamic
ghcjs-shakespeare-dynamic/src/Shakespeare/Dynamic/Event.hs
mit
1,730
0
9
448
627
317
310
50
1
{-# LANGUAGE TypeFamilies #-} module Light.Geometry.AABB -- ADT ( AABB(..), isEmpty, fromPoint, fromPoints -- Arithmetic , addPoint, addPoints, aabbUnion, overlaps, isInside, aabbSurfaceArea, volume, corners ) where import Light.Geometry.Point import Light.Geometry.Vector data AABB = EmptyAABB |...
jtdubs/Light
src/Light/Geometry/AABB.hs
mit
2,240
0
16
659
1,104
566
538
55
1
{-# htermination fmToList_GE :: (Ord a, Ord k) => FiniteMap (a,k) b -> (a,k) -> [((a,k),b)] #-} import FiniteMap
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/FiniteMap_fmToList_GE_12.hs
mit
114
0
3
20
5
3
2
1
0