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 OverloadedStrings #-} module Test.Highlights where import Test.Common import Test.Import import qualified Data.Map as M initHighlights :: Text -> BH IO (Either EsError (Maybe HitHighlight)) initHighlights fieldName = do _ <- insertData _ <- insertOther let query = QueryMatchQuery $ mkMatchQuery (...
bitemyapp/bloodhound
tests/Test/Highlights.hs
bsd-3-clause
1,046
0
19
214
282
139
143
26
1
-- | Ch03 module Ch03 where data IntList = Empty | Cons Int IntList deriving Show absAll :: IntList -> IntList absAll Empty = Empty absAll (Cons i is) = Cons (abs i) (absAll is) squareAll :: IntList -> IntList squareAll Empty = Empty squareAll (Cons i is) = Cons (i * i) (squareAll is) exampleList = Co...
codingiam/sandbox-hs
src/Ch03.hs
bsd-3-clause
1,203
2
12
287
616
307
309
36
1
{-# LANGUAGE TypeFamilies, BangPatterns, TypeOperators, FlexibleContexts, FlexibleInstances, ScopedTypeVariables #-} module Main where import Data.NeuralNetwork import Data.NeuralNetwork.Backend.HMatrix import Numeric.LinearAlgebra import Numeric.LinearAlgebra.Devel import Parser import Data.List(foldl',part...
pierric/neural-network
Backend-hmatrix/Example/MNIST/Main.hs
bsd-3-clause
3,676
0
21
1,060
1,463
707
756
74
2
{-# LANGUAGE FlexibleInstances, ScopedTypeVariables, TupleSections,TypeFamilies #-} import Control.Exception (ErrorCall(..), try) import Control.Monad.IO.Class (liftIO) import Control.Monad.Random (evalRand, Rand, RandT) import Data.Functor.Identity (Identity) import Data.IORef (newIORef, readIORef, writeIORef) import ...
enolan/reducecase
test/Main.hs
bsd-3-clause
5,198
2
24
1,771
1,609
811
798
110
2
{-# LANGUAGE RebindableSyntax #-} -- Copyright : (C) 2009 Corey O'Connor -- License : BSD-style (see the file LICENSE) import Bind.Marshal.Prelude import Bind.Marshal.Verify import Bind.Marshal.Action import Bind.Marshal.DesAction.Base import Bind.Marshal.DesAction.Static import Bind.Marshal.DesAction.Verify ...
coreyoconnor/bind-marshal
test/verify_desaction_static_loops.hs
bsd-3-clause
1,076
2
14
186
272
147
125
-1
-1
module Main where import Test.QuickCheck import Opardum.OperationalTransforms import Control.Applicative((<$>)) import Data.Maybe import Debug.Trace instance Arbitrary OpComponent where arbitrary = oneof [randomInsert, randomDelete, randomRetain] where randomInsert = Insert <$> arbitrary rando...
liamoc/opardum-server
Opardum/Tests/OperationalTransforms.hs
bsd-3-clause
1,146
0
13
299
396
211
185
-1
-1
module Types.EType where import Control.Monad (replicateM) newtype TV = TV Int deriving (Eq, Ord) instance Show TV where show (TV i) = names !! i where names = [1..] >>= flip replicateM ['a'..'z'] infixr 0 :-> data EType = Ty String | TyVar TV | EType :-> EType deriving (Eq, Ord) in...
letsbreelhere/egg
src/Types/EType.hs
bsd-3-clause
613
0
11
226
228
120
108
19
0
{-| Module : Idris.Core.ProofState Description : Proof state implementation. Copyright : License : BSD3 Maintainer : The Idris Community. Implements a proof state, some primitive tactics for manipulating proofs, and some high level commands for introducing new theorems, evaluation/checking inside the proof...
uuhan/Idris-dev
src/Idris/Core/ProofState.hs
bsd-3-clause
51,406
1,195
22
20,205
17,684
9,427
8,257
966
36
{-# LANGUAGE DeriveGeneric #-} module Blockchain.SHA ( SHA(..), hash --rlp2Word512, --word5122RLP ) where import Control.Monad import qualified Crypto.Hash.SHA3 as C import Data.Binary import qualified Data.ByteString.Base16 as B16 import qualified Data.ByteString as B import qualified Data.ByteString.Char8...
jamshidh/ethereum-util
src/Blockchain/SHA.hs
bsd-3-clause
1,729
4
17
300
544
290
254
38
1
-- Idea courtesy of William Lee Irwin. {-- snippet type --} import Data.Char (digitToInt) -- we'll need ord shortly asInt :: String -> Int {-- /snippet type --} {-- snippet loop --} loop :: Int -> String -> Int asInt xs = loop 0 xs {-- /snippet loop --} {-- snippet base --} loop acc [] = acc {-- /snippet base --} ...
binesiyu/ifl
examples/ch04/IntParse.hs
mit
461
0
10
111
112
61
51
7
1
{-# LANGUAGE CPP, BangPatterns, NondecreasingIndentation, ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-warnings-deprecations #-} -- NB: we specifically ignore deprecations. GHC 7.6 marks the .QSem module as -- deprecated, although it became un-deprecated later. As a result, using 7.6 -- as your bootstrap compiler ...
pparkkin/eta
compiler/ETA/Main/GhcMake.hs
bsd-3-clause
87,529
20
35
27,667
14,363
7,412
6,951
-1
-1
{-# LANGUAGE CPP #-} #if !defined(TESTING) && __GLASGOW_HASKELL__ >= 703 {-# LANGUAGE Safe #-} #endif #include "containers.h" ----------------------------------------------------------------------------- -- | -- Module : Data.IntSet -- Copyright : (c) Daan Leijen 2002 -- (c) Joachim Breitner 2...
DavidAlphaFox/ghc
libraries/containers/Data/IntSet.hs
bsd-3-clause
4,156
0
5
1,461
259
199
60
52
0
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude , BangPatterns , ForeignFunctionInterface , EmptyDataDecls , MagicHash , UnliftedFFITypes #-} -- ---------------------------------------------------------------------------- -- -- (c) The University o...
akru/haste-compiler
libraries/ghc-7.8/base/GHC/Fingerprint.hs
bsd-3-clause
2,507
0
15
473
559
308
251
52
1
-- Regression test for #495 -- inlining an undeclared identifier should give error, not panic... {-# INLINE blarg #-} -- even if the identifier is imported in the Prelude... {-# INLINE lookup #-}
sdiehl/ghc
testsuite/tests/rename/should_fail/T495.hs
bsd-3-clause
198
0
2
35
7
6
1
2
0
-- BANNERSTART -- - Copyright 2006-2008, Galois, Inc. -- - This software is distributed under a standard, three-clause BSD license. -- - Please see the file LICENSE, distributed with this software, for specific -- - terms and conditions. -- Author: Adam Wick <awick@galois.com> and Magnus Carlsson <magnus@galois.com> --...
ggkitsas/HaLVM
examples/IVC/SpeedTest/Common.hs
bsd-3-clause
1,151
0
9
160
260
152
108
21
1
{-# LANGUAGE Unsafe #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Monad.ST -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries@haskell.org -- Stability ...
spacekitteh/smcghc
libraries/base/Control/Monad/ST.hs
bsd-3-clause
1,122
0
4
244
55
45
10
8
0
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE FlexibleContexts, Rank2Types #-} module Test where type Constrained x y r = (Eq x, Eq y) => x -> y -> r f :: Constrained String String () f = undefined
urbanslug/ghc
testsuite/tests/typecheck/should_compile/T7541.hs
bsd-3-clause
220
0
7
40
57
34
23
6
1
{-# LANGUAGE MagicHash #-} {- If the (unboxed, hence strict) "let thunk =" would survive to the CallArity stage, it might yield wrong results (eta-expanding thunk and hence "cond" would be called multiple times). It does not actually happen (CallArity sees a "case"), so this test just safe-guards against future chang...
ghc-android/ghc
testsuite/tests/callarity/should_run/StrictLet.hs
bsd-3-clause
793
0
16
225
208
106
102
17
3
import qualified Data.Hash.MD5 as MD5 doorId = "ojvtpuvg" hash :: String -> Int -> String hash door x = (MD5.md5s . MD5.Str) (door ++ (show x)) password door len = (fst . (until ((\(p, _) -> length p == len)) next)) ("", 0) where next (p, i) = if (isInPassword . hash') i then (p ++ [((!! 5) . hash') i], i + 1) e...
ajm188/advent_of_code
2016/05/Main.hs
mit
1,279
0
14
322
642
352
290
25
2
-- Copyright (c) 2011 Alexander Poluektov (alexander.poluektov@gmail.com) -- -- Use, modification and distribution are subject to the MIT license -- (See accompanying file MIT-LICENSE) module Domino.Strategy.Simple ( simpleStrat ) where import Domino.Game import Domino.GameState import Domino.Strategy ...
apoluektov/domino
src/Domino/Strategy/Simple.hs
mit
989
0
15
300
247
126
121
20
2
module Language.Camle.Parser where import Text.Parsec hiding (parse, string) import Text.Parsec.String (Parser) import qualified Text.Parsec as Parsec import qualified Text.Parsec.Expr as Expr import Language.Camle.Data.AbstractSyntaxTree import Language.Camle.Lexer parse :: String -> Either ParseError Program pars...
willprice/camle-compiler
src/Language/Camle/Parser.hs
mit
4,460
0
12
1,164
1,249
608
641
110
1
----------------------------------------------------------------------------- -- -- Module : Language.PureScript.Parser -- Copyright : (c) Phil Freeman 2013 -- License : MIT -- -- Maintainer : Phil Freeman <paf31@cantab.net> -- Stability : experimental -- Portability : -- -- | -- A collection of pars...
michaelficarra/purescript
src/Language/PureScript/Parser.hs
mit
1,229
0
4
145
102
84
18
8
0
-- Expr.hs -- Copyright (c) 2013 Well-Typed LLP -- Start with a simple expression datatype such as this one: type Name = String data Expr = Num Int -- number literal | Add Expr Expr -- addition deriving (Eq, Show) eval :: Expr -> Int eval (Num n) = n eval (Add e1 e2) ...
NickAger/LearningHaskell
well-typed at skills matter/advanced-haskell/exercises/4/Expr.hs
mit
1,970
0
9
585
204
131
73
10
1
import Data.Int primes :: Int64 -> [Int64] primes how_much = sieve [2..how_much] where sieve (p:x) = p : (if p <= mybound then sieve (remove (p*p) x) else x) where remove what (a:as) | what > how_much = (a:as) | a < w...
shlomif/Project-Euler-Problem-10-Comparison
project-euler-prob-10/10.hs
mit
728
0
14
310
306
159
147
16
5
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.SVGFEDistantLightElement (js_getAzimuth, getAzimuth, js_getElevation, getElevation, SVGFEDistantLightElement, castToSVGFEDistantLightElement, gTypeSVGFEDistantLightElement) where impo...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/JSFFI/Generated/SVGFEDistantLightElement.hs
mit
2,072
12
11
290
471
287
184
36
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ViewPatterns #-} module Unison.CommandLine.Main where import Unison.Prelude import Control.Concurrent.STM (atomically) import Control.Exception (finally, catch, AsyncException(UserInterrupt), asyncExceptionFromException) im...
unisonweb/platform
parser-typechecker/src/Unison/CommandLine/Main.hs
mit
9,582
0
32
2,924
2,512
1,298
1,214
-1
-1
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE StandaloneDeriving #-} module Snap.Snaplet.Auth.Types.Exts where ------------...
hpacheco/HAAP
packages/snap-exports/Snap/Snaplet/Auth/Types/Exts.hs
mit
13,043
0
44
3,240
2,138
1,189
949
198
1
module Main where import Control.Monad import System.Environment import Text.ParserCombinators.Parsec hiding (spaces) import Numeric import Data.Ratio import Data.Complex import Data.Function data LispVal = Atom String | List [LispVal] | DottedList [LispVal] LispVal | Number Inte...
diminishedprime/.org
programmey_stuff/write_yourself_a_scheme/ch_02/hello.hs
mit
6,297
0
17
1,758
1,610
838
772
142
4
{-# LANGUAGE DisambiguateRecordFields #-} {-# LANGUAGE RecordWildCards #-} module Commands where import Control.Applicative import Data.Char import Machine import Colours import Direction import Helpers updMemWith :: ([Integer] -> [Integer]) -> Machine -> Machine updMemWith f m@(Machine {..}) = m {mem = f mem} updMe...
lesguillemets/lampiet
Piet/Commands.hs
mit
3,364
0
13
972
1,501
812
689
84
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE RecordWildCards #-} module Main where import Control.Exception import Control.Monad (forever) import Data.List (intersperse) import Data.Text (Text) import qualified Data.Text as T import Data.Text.Encoding (decodeUtf8, encodeUtf8) import Da...
NickAger/LearningHaskell
HaskellProgrammingFromFirstPrinciples/Chapter31/fingerd/src/Main.hs
mit
3,996
0
15
863
1,176
616
560
112
3
{-# htermination intersectFM_C :: Ord a => (b1 -> b2 -> b3) -> FiniteMap (Maybe a) b1 -> FiniteMap (Maybe a) b2 -> FiniteMap (Maybe a) b3 #-} import FiniteMap
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/FiniteMap_intersectFM_C_9.hs
mit
159
0
3
30
5
3
2
1
0
module App.Config ( getConfig , Config(..), ServerConfig(..), EkgConfig(..), ClientConfig(..) ) where import App.Prelude import Data.Yaml (decodeFile) import qualified Data.Aeson as A import qualified Data.Text as T import qualified Data.Scientific as S import Data.HashMap.Str...
ruicc/chat-server
src/App/Config.hs
mit
2,153
0
13
713
582
308
274
60
5
module Syntax where import qualified Data.Complex as ComplexData import qualified Data.Ord as OrdData type Identifier = String type Package = Identifier type SliceStart = Integer type SliceEnd = Integer type SliceStep = Integer type Ellipsis = () type ArrayLength = Integer type ReadChannel = () type WriteChannel = ()...
waterlink/hgo
Syntax.hs
mit
7,670
0
11
1,514
2,238
1,269
969
249
0
module SRC.List ( deleteAt , pickAmong , several ) where import System.Random (StdGen, randomR) {- conditionalEdition :: (a -> a) -> (a -> Bool) -> a -> a conditionalEdition editor p x = if p x then editor x else id x deleteAtIf p index = conditionalEdition (deleteAt index) p -} deleteAt :: (Num a, Ord ...
Fornost461/drafts-and-stuff
Haskell/projects/watcher/SRC/List.hs
cc0-1.0
1,409
0
11
524
390
215
175
25
1
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable #-} module PL.Param where import PL.Type import Autolib.Reader import Autolib.ToDoc import Data.Typeable data Param = Param { model_size :: Int -- TODO: Atleast, Atmost, ... , formel :: Formel } deriving ( Typeable ) example :: Param example = Pa...
Erdwolf/autotool-bonn
src/PL/Param.hs
gpl-2.0
484
6
9
102
115
69
46
15
1
-- | Refs are references to git objects stored outside of the object database. -- Typically they live as text files under @.git\/refs@ but they can also be -- \"packed\" into @.git\/packed-refs@. module Refs ( fullNameRef , resolveRef ) where import Control.Exception import Control.Monad.Error import System.IO.U...
martine/gat
Refs.hs
gpl-2.0
3,518
0
20
848
913
467
446
74
3
{-# OPTIONS_GHC -pgmF marchup -F #-} import MarchUp.Pandoc import Text.Pandoc text = Pandoc (Meta @" A very simple test @" [@"JP Bernardy@"] []) @" @Header(1){Introduction} As the sage says: @BlockQuote{ blah blah arsarst arsa rsdhwp } Do not forget: @Emph{this}! @Header(1){Conclusion} @" main = do print t...
jyp/MarXup
examples/Pandoc.hs
gpl-2.0
379
6
13
68
126
68
58
-1
-1
module Storage.Hashed.Diff where import Prelude hiding ( lookup, filter ) import qualified Data.ByteString.Lazy.Char8 as BL import Storage.Hashed.Tree import Storage.Hashed.AnchoredPath import Data.List.LCS import Data.List ( groupBy ) unidiff :: Tree IO -> Tree IO -> IO BL.ByteString unidiff l r = do (from, to) ...
DavidAlphaFox/darcs
hashed-storage/Storage/Hashed/Diff.hs
gpl-2.0
5,523
0
19
1,928
1,993
1,006
987
105
8
{- Given: Six positive integers, each of which does not exceed 20,000. The integers correspond to the number of couples in a population possessing each genotype pairing for a given factor. In order, the six given integers represent the number of couples having the following genotypes: AA-AA AA-Aa AA-aa Aa-Aa Aa-aa...
forgit/Rosalind
iev.hs
gpl-2.0
784
0
11
183
94
56
38
3
1
module QHaskell.Expression.Conversions.Unquoting () where import QHaskell.MyPrelude import qualified QHaskell.Expression.ADTUntypedNamed as AUN import qualified Language.Haskell.TH.Syntax as TH import qualified Language.Haskell.TH.Desugar as DTH import qualified Language.Haskell.TH.Desugar.MiniCore as DTH import qu...
shayan-najd/QHaskell
QHaskell/Expression/Conversions/Unquoting.hs
gpl-3.0
6,349
18
23
2,578
2,605
1,305
1,300
-1
-1
{-# LANGUAGE OverloadedStrings #-} import Tman.Task (Task(..), TaskSpec(..), tSubmit, tStatus, tClean, tLog, TaskStatus(..), TaskRunInfo(..), RunInfo(..), tRunInfo) import Tman.Project (Project(..), loadProject, saveProject, addTask) import Control.Applicative ((<|>)) import Control.Error (runScript, Script, scriptIO...
stschiff/tman
src-tman/Main.hs
gpl-3.0
16,380
0
25
4,437
5,164
2,604
2,560
308
11
module Chap03.Data.RedBlackTree.Test where import Chap02.Data.Set import Chap03.Data.RedBlackTree import Test.Framework (Test) import Test.Framework.Providers.QuickCheck2 (testProperty) import Test.QuickCheck (Arbitrary) prop_RedInv :: (Ord a, Set t a) => (t a -> RedBlackTree a) -> a -...
stappit/okasaki-pfds
test/Chap03/Data/RedBlackTree/Test.hs
gpl-3.0
869
0
9
288
306
160
146
25
1
-- grid is a game written in Haskell -- Copyright (C) 2018 karamellpelle@hotmail.com -- -- This file is part of grid. -- -- grid is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the Lice...
karamellpelle/grid
designer/source/MEnv/Env/TickObject.hs
gpl-3.0
885
0
5
165
47
40
7
4
0
{- This file is part of pia. pia is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version. pia is distributed in the hope that it will be usef...
swoertz/pia
src/Parser/Polynomial.hs
gpl-3.0
3,285
0
13
882
680
339
341
72
1
import Tree (Tree(Branch, Leaf))
evolutics/haskell-formatter
testsuite/resources/source/orders_parts/nested_import_entities/Output.hs
gpl-3.0
33
0
6
4
15
10
5
1
0
module Main where import Data.List (sort,nub) import Test.QuickCheck import Chapter11_adt import Chapter15_monoids propSorted :: [Int] -> Bool propSorted xs = inorder_elems == sorted where inorder_elems = inorder $ fromList xs sorted = sort $ nub xs propMapped :: [Int] -> Bool propMapped xs = mapped_elems == map...
maruks/haskell-book
test/Spec.hs
gpl-3.0
1,176
0
10
192
352
182
170
32
1
{- Compiler Messages This file is part of AEx. Copyright (C) 2016 Jeffrey Sharp AEx is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your op...
sharpjs/haskell-learning
src/Aex/Message.hs
gpl-3.0
2,121
0
11
517
336
185
151
45
1
{-# LANGUAGE OverloadedStrings #-} module Slidecoding.Template ( Configuration(..) , Theme(..) , distributeAssets , mkSection , template , wrapSection , asComment -- Reexport Text.Blaze utilities: , Html , renderHtml ) where import Slidecoding.Assets import Slidecoding.Type...
ptitfred/slidecoding
src/Slidecoding/Template.hs
gpl-3.0
6,407
0
15
1,413
1,661
857
804
142
2
import Control.Monad import Data.Functor import Data.List import Data.List.Split import System.Console.GetOpt import System.Directory import System.Environment import System.FilePath import System.IO import Text.Blaze.Html import Text.Blaze.Html.Renderer.String import Text.Pandoc import Wrapper data CLIFlag = Init S...
phaazon/leaf
src/Leaf.hs
gpl-3.0
3,342
0
22
741
1,022
513
509
85
3
{-# LANGUAGE OverloadedLabels #-} {-# LANGUAGE OverloadedStrings #-} -- original author: -- Mirco "MacSlow" Mueller <macslow@bangang.de> -- -- created: -- 10.1.2006 (or so) -- -- http://www.gnu.org/licenses/licenses.html#GPL -- -- ported to Haskell (gtk2hs) by: -- Duncan Coutts <duncan.coutts@worc.ox.ac.uk> -...
shnarazk/satter
learn-gi/Cairo.hs
gpl-3.0
12,156
0
19
3,142
3,973
1,847
2,126
349
5
{-# LANGUAGE OverloadedStrings #-} module PredictabilitySpec where import Test.Hspec import Test.QuickCheck import Shelly import Options import Control.Monad (liftM) import Data.List (sort,isPrefixOf,isInfixOf) import Predictability -- SUT -- Shortcut for a quiet shelly sh = shellyNoDir . silently spec :: Spec spec...
gdetrez/rgl-stats
test/PredictabilitySpec.hs
gpl-3.0
7,098
0
18
2,409
1,838
975
863
142
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-servicenetworking/gen/Network/Google/Resource/ServiceNetworking/Services/DNSZones/Remove.hs
mpl-2.0
5,751
0
17
1,257
789
463
326
116
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ViewPatterns #-} -- Module : Keiretsu.Config -- Copyright : (c) 2013-2015 Brendan Hay <brendan.g.hay@gmail.com> -- License : This Source Code Form is subject to the terms of -- ...
brendanhay/keiretsu
src/Keiretsu/Config.hs
mpl-2.0
3,866
0
17
1,271
1,092
556
536
-1
-1
-- Copyright 2012-2013 Greg Horn -- -- This file is part of rawesome. -- -- rawesome is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- (at your option) any later v...
ghorn/rawesome
kite_sysid/viz/Multi.hs
lgpl-3.0
2,753
0
12
755
592
331
261
48
1
{-# LANGUAGE ScopedTypeVariables, TypeOperators #-} module TypesMt where import General import Invariant ------------------------------------------------------------------------------ -- Trying to mimic GF syntax (!) = ($) type a ==> b = a -> b infixr ==> ----------------------------------------------------------...
johnjcamilleri/maltese-functional-morphology
malti/TypesMt.hs
lgpl-3.0
12,182
0
12
2,732
1,437
897
540
110
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Openshift.V1.ImageStreamMapping where import GHC.Generics import Data.Text import Kubernetes.V1.ObjectMeta import Openshift.V1.Image import qua...
minhdoboi/deprecated-openshift-haskell-api
openshift/lib/Openshift/V1/ImageStreamMapping.hs
apache-2.0
1,287
0
9
194
129
80
49
20
0
{- Copyright 2014 David Farrell <shokku.ra@gmail.com> - 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...
shockkolate/lambdircd
src.old/Main.hs
apache-2.0
771
0
9
139
57
31
26
7
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE ConstraintKinds #-} -- |The common types used by the other modules. -- -- This module also includes a hierarchy of errors type...
jtapolczai/Hephaestos
Crawling/Hephaestos/Fetch/Types.hs
apache-2.0
3,966
0
12
901
488
327
161
71
0
{- Copyright 2014 huwei04@hotmail.com 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 t...
wehu/hw
src/AST.hs
apache-2.0
5,277
0
17
1,385
2,641
1,341
1,300
88
1
<?xml version='1.0' encoding='ISO-8859-1'?> <!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"> <title>NbGzip Help</title> <maps> <homeID>nbgzip</homeID> <m...
bernhardhuber/netbeansplugins
nb-gzip/javahelp/org/huberb/nbgzip/nbgzip.hs
apache-2.0
956
73
57
188
373
191
182
-1
-1
-- http://www.codewars.com/kata/53369039d7ab3ac506000467 module YesNo where boolToWord :: Bool -> String boolToWord x = if x then "Yes" else "No"
Bodigrim/katas
src/haskell/8-Convert-boolean-values-to-strings-Yes-or-No.hs
bsd-2-clause
146
0
5
19
30
18
12
3
2
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} -- | A @Map@-like structure th...
supki/meep
src/Data/Meep.hs
bsd-2-clause
6,309
0
15
1,474
2,132
1,137
995
120
2
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QGraphicsItemGroup.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:35 Warning : this file is machine generated...
uduki/hsQt
Qtc/Enums/Gui/QGraphicsItemGroup.hs
bsd-2-clause
2,434
0
18
509
572
288
284
48
1
-- | Settings are centralized, as much as possible, into this file. This -- includes database connection settings, static file locations, etc. -- In addition, you can configure a number of different aspects of Yesod -- by overriding methods in the Yesod typeclass. That instance is -- declared in the Foundation.hs file....
lubomir/dot-race
Settings.hs
bsd-3-clause
5,905
0
12
1,604
827
474
353
-1
-1
{-| Copyright : (c) Dave Laing, 2017 License : BSD3 Maintainer : dave.laing.80@gmail.com Stability : experimental Portability : non-portable -} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} module Fragment.PtVar.Rules.Type.Infer.Offline ( PtVarInferTypeContext , ptVarInferTypeRules ...
dalaing/type-systems
src/Fragment/PtVar/Rules/Type/Infer/Offline.hs
bsd-3-clause
689
0
8
135
144
87
57
12
1
{-# LANGUAGE TemplateHaskell, CPP #-} -- | This module contains the TemplateHaskell helper to define -- QObjects, along with supporting data types and helpers used in the -- TH expansion. module Graphics.QML.Internal.TH ( -- * Types ClassDefinition(..), QPointer, -- * Functions defClass, defSignal, regis...
travitch/hsqml
src/Graphics/QML/Internal/TH.hs
bsd-3-clause
18,245
0
18
4,488
4,652
2,414
2,238
278
3
{-# LANGUAGE PolyKinds #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TypeOperators ...
ericnething/twilio
src/Twilio/Message.hs
bsd-3-clause
4,181
0
41
1,000
791
450
341
117
0
-- Copyright (c) 2015, Travis Bemann -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- o Redistributions of source code must retain the above copyright notice, this -- list of conditio...
tabemann/amphibian
src_old/Network/IRC/Client/Amphibian/UserServer.hs
bsd-3-clause
9,787
4
26
2,972
2,269
1,079
1,190
195
15
{-# LANGUAGE DeriveDataTypeable, FlexibleInstances #-} module HarkerIRC.Types -- type definitions ( Nick , User , Chan , Message , InMessageQueue , OutMessageQueue , RawIRCString -- data/newtype definitions , IRCInPrivMsg (..) , IRCOutPrivMsg (..) , IRCSystemMsg (..) ...
mikeyhc/harkerirc
src/HarkerIRC/Types.hs
bsd-3-clause
4,239
0
12
1,481
1,104
622
482
109
1
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, CPP #-} module Language.Haskell.GhcMod.Gap ( Language.Haskell.GhcMod.Gap.ClsInst , mkTarget , withStyle , setLogAction , getSrcSpan , getSrcFile , withContext , fOptions , toStringBuffer , showSeverityCaption , setCabalPkg , setHideAllPack...
carlohamalainen/ghc-mod
Language/Haskell/GhcMod/Gap.hs
bsd-3-clause
10,979
0
16
1,873
1,964
1,102
862
166
1
import Foreign.C.String import Data.Word import qualified Data.ByteString.Lazy as BS import Control.Concurrent import Control.Monad import Data.Maybe import qualified Graphics.XHB as X import qualified Graphics.XHB.Gen.Xinerama as Xinerama import System.IO main = do connectionM <- X.connect case connectionM ...
aslatter/xhb
Demo.hs
bsd-3-clause
5,256
2
13
1,406
1,472
717
755
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE QuasiQuotes #-} module HTML5Slide ( HTML5SlideOptions(..), def, writeHTML5Slide, writeHTML5SlideString, ) where import Data.Default import Data.Generics import Data.List import qualified Data.Text.Lazy as L import Text.Blaze.Html...
tanakh/pandoc-html5slide
HTML5Slide.hs
bsd-3-clause
7,671
0
14
1,793
1,552
854
698
154
21
{-# LANGUAGE CPP, ForeignFunctionInterface #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Client.Win32SelfUpgrade -- Copyright : (c) Duncan Coutts 2008 -- License : BSD-like -- -- Maintainer : cabal-devel@haskell.org -- Stability : prov...
typelead/epm
epm/Distribution/Client/Win32SelfUpgrade.hs
bsd-3-clause
7,636
31
17
1,475
1,202
636
566
12
1
{-# LANGUAGE FlexibleContexts #-} module LambdaLudo.EDSL where import LambdaLudo.Types import SDL (Texture) import Control.Monad.Random (getRandomR,MonadRandom(..)) import qualified Control.Monad.RWS as RWS import qualified Control.Monad.State as S findSquare :: (Int,Int) -> Board -> Maybe Square findSquare (x,y)...
tauli/LambdaLudo
src/LambdaLudo/EDSL.hs
bsd-3-clause
2,682
0
14
560
1,221
631
590
57
2
module Inline (inline) where import Data.List import Language.Verilog inline :: [Module] -> Module inline libs = Module topName [] $ moduleItems (initDB topName libs) topItems where Module topName _ topItems = case [ m | m@(Module _ [] _) <- libs ] of [] -> error "Top module not found. All modules provided ...
tomahawkins/verilog-gt
Inline.hs
bsd-3-clause
7,043
0
24
2,249
3,036
1,497
1,539
151
67
module Data.Char.Properties ( module Data.Char.Properties.Version, module Data.Char.Properties.GeneralCategory, module Data.Char.Properties.BidiCategory, module Data.Char.Properties.Decomposition, module Data.Char.Properties.Misc, module Data.Char.Properties.Case ) where { import Data.Char.Properties.Case; impo...
seereason/unicode-properties
Data/Char/Properties.hs
bsd-3-clause
523
24
5
43
131
92
39
14
0
import BasicTest main = basicTest $ defaultConfig { message = "Basic Test Version 2.0" }
bitemyapp/dyre
Tests/basic/goodConfig.hs
bsd-3-clause
89
0
7
15
21
12
9
2
1
module Data.Holumn.Type where import Data.Holumn.NameSpace (NS) import Data.Holumn.Range (Range) -- So how is this all meant to fit together? -- -- Language specific API -- Library of standard types (map, list, ieee double, decimal to various precisions, unsigned long, 32 bit int, dword, byte, unit, constants, etc) -...
SamRoberts/holumn-experimental
Data/Holumn/Type.hs
bsd-3-clause
1,125
0
8
236
97
65
32
8
0
-- !!! Testing bogus (or existential) type variables data T a = K a b
FranklinChen/Hugs
tests/static/mod25.hs
bsd-3-clause
70
0
6
15
14
8
6
1
0
module Keenser.Util where import Data.Aeson import Data.Attoparsec.ByteString (Parser, parseOnly) import qualified Data.ByteString.Char8 as BSC import qualified Data.ByteString.Lazy as LBS import qualified Data.List as L import Database.Redis (...
jamesdabbs/keenser
src/Keenser/Util.hs
bsd-3-clause
1,589
0
10
391
605
309
296
-1
-1
{-# LANGUAGE GADTs, StandaloneDeriving, ScopedTypeVariables, DataKinds, KindSignatures, PolyKinds, TypeOperators, FlexibleInstances #-} module Tests.Geordi.UrlPattern where import Test.Framework import Test.QuickCheck import Test.Framework.Providers.QuickCheck2 import Tests.Util.TypeEquality import Control.Applicative...
liamoc/geordi
Tests/Geordi/UrlPattern.hs
bsd-3-clause
5,608
0
26
1,657
2,120
1,078
1,042
-1
-1
data List a = Empty | Cons a (List a) deriving (Show) instance Functor List where fmap f Empty = Empty fmap f (Cons a b) = Cons (f a) (fmap f b) instance Alternative List where empty = Empty Empty <|> b = b (Cons a t1) <|> b = Cons a (t1 <|> b) instance Applicative List where pure = Cons (a Empty...
gahara/parsers-for-dummies
test6.hs
bsd-3-clause
934
0
8
197
301
151
150
19
1
module Data ( PersonName , MovieTitle , Item(..) , allItems , tryMatchRates , tryFindByName ) where import Utils as Utils(tryList, matchBy, sortBy) -- ---------------------------------------------------------------------------------- -- Private Part. Data and enviro...
vprokopchuk256/programming-collective-intelligence
src/Data.hs
bsd-3-clause
3,469
0
10
1,007
837
512
325
69
1
{-# OPTIONS_GHC -F -pgmF htfpp #-} ----------------------------------------------------------------------------- -- | -- Module : Data.LinkedList -- Copyright : (c) Daniel Pek 2014 -- License : see LICENSE -- -- Maintainer : pekdaniel@gmail.com -- -- Simple implementation of a simply-linked list with re...
pdani/HLinkedList
src/Data/LinkedList.hs
bsd-3-clause
3,668
0
15
717
1,021
530
491
50
2
{-# LANGUAGE GADTs #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} -- -- Copyright (c) 2009-2011, ERICSSON AB -- All rights reserved. -- -- Redistribution and use in source and binary forms,...
rCEx/feldspar-lang-small
src/Feldspar/Core/Constructs/Fractional.hs
bsd-3-clause
3,494
0
12
713
598
323
275
-1
-1
module Graph.Graceful.Central where -- $Id$ import Graph.Util import Graph.Color import Graph.Cage.Config import Autolib.Graph.Ops ( gmap ) import Autolib.Dot ( peng, Layout_Program (..) ) import Inter.Types import Autolib.ToDoc import Autolib.Hash import Autolib.Size import Autolib.FiniteMap import Autolib.Util....
florianpilz/autotool
src/Graph/Graceful/Central.hs
gpl-2.0
2,274
22
16
660
791
427
364
-1
-1
{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances #-} {- | Module : ./Comorphisms/Prop2CommonLogic.hs Description : Coding of Propositional into CommonLogic Copyright : (c) Eugen Kuksa and Uni Bremen 2011 License : GPLv2 or higher, see LICENSE.txt Maintainer : eugenk@informat...
spechub/Hets
Comorphisms/Prop2CommonLogic.hs
gpl-2.0
5,221
0
14
1,111
1,216
652
564
113
8
-- | -- Copyright : (c) 2010-2012 Benedikt Schmidt -- License : GPL v3 (see LICENSE) -- -- Maintainer : Benedikt Schmidt <beschmi@gmail.com> -- -- Convenience abbreviations, mostly used for testing and debugging. module Term.Builtin.Convenience where import Term.Term import Term.LTerm import Term.Builtin.Signa...
ekr/tamarin-prover
lib/term/src/Term/Builtin/Convenience.hs
gpl-3.0
4,324
0
8
932
1,932
1,097
835
144
1
{- | Module : Neovim.Plugin.Startup Description : Startup utilities for plugins Copyright : (c) Sebastian Witte License : Apache-2.0 Maintainer : woozletoff@gmail.com Stability : experimental Portability : GHC This plugin only exists due to cyclic dependencies. -} module Neovim.Plugin.Startup ...
gibiansky/nvim-hs
library/Neovim/Plugin/Startup.hs
apache-2.0
1,291
0
12
285
74
51
23
5
0
module SimpleIndent where main = undefined
Atsky/haskell-idea-plugin
data/indentTests/SimpleIndent.hs
apache-2.0
43
0
4
6
9
6
3
2
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RebindableSyntax #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} module Main where import Control.Monad import Foundation import Foundation.Monad import Foundation.Numerical import Foundation.Time.Bindings import Foundation.Time.Types import Foundation.Time.StopWa...
vincenthz/hs-foundation
programs/Time.hs
bsd-3-clause
4,359
0
15
1,337
1,122
563
559
-1
-1
-- | -- Module : Foundation.Network.IPv4 -- License : BSD-style -- Maintainer : Nicolas Di Prima <nicolas@primetype.co.uk> -- Stability : experimental -- Portability : portable -- -- IPv4 data type -- {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GeneralizedNewtypeDerivin...
vincenthz/hs-foundation
foundation/Foundation/Network/IPv4.hs
bsd-3-clause
3,274
0
15
824
1,029
558
471
85
2
import System import Data.List import Distribution.Simple import Distribution.Simple.UserHooks import Distribution.PackageDescription import Distribution.Simple.LocalBuildInfo import Distribution.Simple.Setup -- All right. So, if we want to compile that damned thing, we have to -- call |src/Makefile|. We don't do t...
larrytheliquid/pigit
Setup.hs
mit
1,639
0
22
348
262
140
122
27
3
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-do-bind #-} module Vimus.Run (main) where import Prelude hiding (getChar) import UI.Curses hiding (err, wgetch, wget_wch, ungetch, mvaddstr) import qualified UI.Curses as Curses import Control.Exception (finally) import ...
haasn/vimus
src/Vimus/Run.hs
mit
9,253
0
24
2,515
2,255
1,146
1,109
171
5
--{-# LANGUAGE NamedFieldPuns, Safe #-} {-# LANGUAGE NamedFieldPuns #-} import Control.Concurrent.MVar (takeMVar) import Control.Monad (forM, forM_, replicateM) import Data.List (group, intercalate) import Debug.Trace (trace) import RP ( RP, RPE, RPR, RPW, ThreadState(..), tid, runRP, forkRP, joinRP, synchronizeRP, th...
anthezium/MonadicRP
src/RPListMoveTest.hs
gpl-3.0
4,357
0
19
1,231
1,301
636
665
81
1
-- | -- Module : FileUtils -- Copyright : (C) 2014 Jens Petersen -- -- Maintainer : Jens Petersen <petersen@fedoraproject.org> -- Stability : alpha -- Portability : portable -- -- Explanation: Command line option processing for building RPM -- packages. -- This program is free software: you can redistr...
mathstuf/cabal-rpm
src/FileUtils.hs
gpl-3.0
2,445
0
14
606
474
255
219
43
3
{-# Language PolyKinds #-} {-# Language TypeApplications #-} {-# Language ImpredicativeTypes #-} {-# Language LiberalTypeSynonyms #-} module T15859 where import Data.Kind data A k :: k -> Type type KindOf (a :: k) = k a = (undefined :: KindOf A) @Int
sdiehl/ghc
testsuite/tests/dependent/should_fail/T15859.hs
bsd-3-clause
267
0
7
58
56
36
20
-1
-1
{-# LANGUAGE CPP #-} module Distribution.Simple.Program.GHC ( GhcOptions(..), GhcMode(..), GhcOptimisation(..), GhcDynLinkMode(..), GhcProfAuto(..), ghcInvocation, renderGhcOptions, runGHC, ) where import Distribution.Simple.GHC.ImplInfo ( getImplInfo, GhcImplInfo(..) ) import Dist...
x-y-z/cabal
Cabal/Distribution/Simple/Program/GHC.hs
bsd-3-clause
22,083
0
20
6,232
4,095
2,291
1,804
372
26
-- Copyright (c) 2000 Galois Connections, Inc. -- All rights reserved. This software is distributed as -- free software under the license in the file "LICENSE", -- which is included in the distribution. module Data where import Data.Array import CSG import Geometry import Illumination import Primitives import Surfa...
urbanslug/ghc
testsuite/tests/programs/galois_raytrace/Data.hs
bsd-3-clause
13,148
194
17
3,647
4,022
2,258
1,764
312
1
module Meas () where import Language.Haskell.Liquid.Prelude {-@ include <len.hquals> @-} {-@ measure rlen :: [a] -> Int rlen ([]) = {v | v = 0} rlen (y:ys) = {v | v = (1 + rlen(ys))} @-} {-@ foo :: a -> {v:[b] | rlen(v) = 0} @-} foo x = [] {-@ mylen :: xs:[a] -> {v:Int | v = rlen(xs)} @-} mylen ...
abakst/liquidhaskell
tests/pos/meas8.hs
bsd-3-clause
514
0
7
149
122
68
54
8
1