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 FlexibleInstances #-} -- This is to make GetCfg's getItem work with String result as well. {-# LANGUAGE TypeSynonymInstances #-} -- Same topic. Both seem to be widely used. -- | Author: Thorsten Rangwich -- | See file LICENSE for details on using this code. -- | This module contains some base tools like re...
tnrangwi/CompareProgrammingUsingHolidayManager
haskell/BaseTools.hs
mit
14,804
0
18
4,198
2,745
1,497
1,248
205
4
module Rebase.GHC.Read ( module GHC.Read ) where import GHC.Read
nikita-volkov/rebase
library/Rebase/GHC/Read.hs
mit
68
0
5
12
20
13
7
4
0
{-# OPTIONS_GHC -fno-warn-orphans #-} module Unison.Codebase.MemCodebase where import Data.List import Unison.Codebase (Codebase) import Unison.Codebase.Store (Store) import Unison.Note (Noted) import Unison.Hash (Hash) import Unison.Reference (Reference(Derived)) import Unison.Term (Term) import Unison.Type (Type) i...
nightscape/platform
shared/src/Unison/Codebase/MemCodebase.hs
mit
2,174
0
17
343
726
398
328
50
1
module Main ( main , boolP, maybeP, listP, listP', treeP ) where import Combinators import Test.HUnit import Data.Char goodChar :: Char -> Parser Char goodChar ch = satisfy (== ch) sat :: String -> Parser String sat [] = pure [] sat (x : xs) = (:) <$> goodChar x <*> (sat xs <|> pure []) true :: Parser S...
nkartashov/haskell
hw08/Main.hs
gpl-2.0
9,231
0
43
2,054
4,064
2,125
1,939
174
1
{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses #-} module LanguageDef.Data.Proof where {- Creates a proof for a bunch of rules -} import Utils.All import LanguageDef.Utils.LocationInfo import LanguageDef.Utils.ExceptionInfo import LanguageDef.Data.Relation import LanguageDef.Data.Rule import LanguageDef.Data.E...
pietervdvn/ALGT2
src/LanguageDef/Data/Proof.hs
gpl-3.0
3,474
134
16
700
1,181
622
559
68
4
module Tests.Testable where import Tests.TestResults data Test = Test { description :: String , result :: TestResult } instance Show Test where show t = (show.result $ t) ++ " " ++ description t class Testable a where test :: a -> TestResult instance Testable Bool where test True = TestPassed test Fa...
bogwonch/SecPAL
tests/Tests/Testable.hs
gpl-3.0
345
0
10
75
113
60
53
12
0
import Control.Monad( replicateM_ ) palindrome :: Int -> Bool palindrome n = reverse sn == sn where sn = show n testCase = do n <- getLine print . head . dropWhile (not.palindrome) $ [(read n) + 1 ..] main = do num <- getLine replicateM_ (read num) testCase
zhensydow/ljcsandbox
lang/haskell/spoj/PALIN.hs
gpl-3.0
281
0
11
72
121
60
61
10
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
dysinger/amazonka
amazonka-storagegateway/gen/Network/AWS/StorageGateway/DescribeGatewayInformation.hs
mpl-2.0
7,015
0
22
1,437
889
526
363
97
1
data Foo = Bar { foo :: Baz }
lspitzner/brittany
data/Test45.hs
agpl-3.0
34
2
5
13
17
9
8
2
0
-- | 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....
sir-murray/lol
Settings.hs
agpl-3.0
5,420
0
13
1,449
711
403
308
-1
-1
{-# LANGUAGE ScopedTypeVariables, MultiParamTypeClasses #-} module V5D (V5Dfile(..), V5DGrid(..), V5D_field(..), readV5Dfile, showGrid, showFile, dataset) where import System.IO import System.IO.Unsafe(unsafePerformIO) import Foreign.Marshal.Alloc import Foreign.Ptr import Foreign.Storable import Foreign.Marshal.Arra...
kvelicka/Fizz
UNUSED_V5D.hs
lgpl-2.1
17,941
12
19
6,959
4,955
2,648
2,307
329
7
{-| Module : Data.JustParse.Common Description : Common char parsers Copyright : Copyright Waived License : PublicDomain Maintainer : grantslatton@gmail.com Stability : experimental Portability : portable Several useful parsers for dealing with 'String's. -} {-# LANGUAGE Safe #-} module Data.JustParse.C...
grantslatton/JustParse
src/Data/JustParse/Char.hs
unlicense
3,442
0
8
728
756
405
351
-1
-1
{- teapot.hs - Scene containing the teapot. - - Timothy A. Chagnon - CS 636 - Spring 2009 -} import RayTracer main = do rayTracer scene scene = Scene { outfile = "teapot.ppm", width = 512, height = 512, camera = Camera { dist = 3, ...
tchagnon/cs636-raytracer
a1/teapot.hs
apache-2.0
631
0
11
319
126
73
53
19
1
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances #-} module Language.C.Obfuscate.CFF where import Data.Char import Data.List (nubBy) import Data.Maybe import qualified Data.Map as M import qualified Data.Set as S import qualified Language.C.Syntax.AST as AST import qualified Languag...
luzhuomi/cpp-obs
Language/C/Obfuscate/CFF.hs
apache-2.0
16,226
0
31
4,923
3,584
1,889
1,695
181
3
-- Copyright 2020 Google LLC -- -- 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/cabal2bazel
bzl/tests/ffi/LinkInputsTest.hs
apache-2.0
646
0
6
114
42
29
13
3
1
{-# LANGUAGE TemplateHaskell, CPP, FlexibleContexts, FlexibleInstances, MultiParamTypeClasses, FunctionalDependencies, UndecidableInstances #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Type.Hex.Stage3 -- Copyright : (C) 2006-2011 Edward Kmett -- Licens...
ekmett/type-int
Data/Type/Hex/Stage3.hs
bsd-2-clause
14,658
0
18
5,485
6,800
3,488
3,312
-1
-1
{-# OPTIONS_HADDOCK hide #-} module Network.Xmpp.Concurrent.Basic where import Control.Applicative import Control.Concurrent.STM import qualified Control.Exception as Ex import Control.Monad.State.Strict import qualified Data.ByteString as BS import Network.Xmpp.Concurrent.Types...
Philonous/pontarius-xmpp
source/Network/Xmpp/Concurrent/Basic.hs
bsd-3-clause
2,878
0
13
621
712
368
344
53
3
{-# LANGUAGE DisambiguateRecordFields #-} module Data.Cov.Jac where import Prelude.Extended data Jac a b = Jac { v :: Array Number, nr :: Int }
LATBauerdick/fv.hs
src/Data/Cov/Jac.hs
bsd-3-clause
150
0
9
30
39
25
14
4
0
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE OverloadedStrings #-} module Language.Eiffel.TypeCheck.TypedExpr where import Control.Applicative import Data.DeriveTH import Data.Binary import qualified Data.Text as Text import Data.Text (Text) import qualified Language.Eiffel....
scottgw/eiffel-typecheck
Language/Eiffel/TypeCheck/TypedExpr.hs
bsd-3-clause
5,551
0
11
1,138
2,165
1,110
1,055
153
1
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedLabels #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TupleSections #-} module Main (main) where import Prelude (error) import Control.Applicative ((<*>), pure) import Control.Monad ((=<<), (>...
trskop/yx
src/Main.hs
bsd-3-clause
10,161
0
18
2,499
2,601
1,386
1,215
218
8
-- Source: https://github.com/bsl/GLFW-b-demo module Util where -------------------------------------------------------------------------------- import Control.Concurrent.STM (TQueue, atomically, writeTQueue) import Control.Monad (when) import Control.Monad.RWS.Strict (l...
cmahon/opengl-examples
library/Util.hs
bsd-3-clause
12,796
0
25
4,063
3,313
1,638
1,675
298
6
module Core where import Control.DeepSeq import GHC.Generics import Control.Monad.Catch import Control.Monad.Fix import Control.Monad.IO.Class import Data.Proxy import Control.Wire import Prelude hiding ((.), id) import Game.GoreAndAsh import Game.GoreAndAsh.GLFW import Game.GoreAndAsh.LambdaCube -- | Appl...
Teaspot-Studio/model-gridizer
src/Core.hs
bsd-3-clause
1,626
0
12
298
488
264
224
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TupleSections #-} module Gen.State ( getDB , getPackageInfos , listAllModuleSorted , packageModulesIface ) where import Control.Monad import Control.Monad.Trans.State import Data.Function (on) import ...
rvion/ride
jetpack-gen/src/Gen/State.hs
bsd-3-clause
4,341
1
20
1,026
1,026
560
466
79
3
{-# LANGUAGE OverloadedStrings #-} module Main where import Prelude hiding (FilePath) import Control.Applicative import Control.Monad import Control.Exception import Control.Conditional (ifM) import Data.String (fromString) import Data.Trees.MTree import Data.Bitraversable import qualified Data.Text as T import q...
ratatosk/tripping-ironman
Main.hs
bsd-3-clause
2,220
0
12
453
703
362
341
58
3
{-# LANGUAGE CPP #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE MultiWayIf #-} module Main where import Graphics.BothGL import Data.Bits import Data.ByteString (ByteString) import Data.ByteString.Char8 (unpack) import Data.FileEmbed (embedFile) import Data.Coer...
bergey/bothgl
examples/webgl-01-triangle/src/Main.hs
bsd-3-clause
7,546
5
10
1,507
1,173
583
590
145
2
module Callback.Key where #include "Utils.cpp" import Control.Arrow ((&&&)) import Control.Monad (when) import Control.Applicative ((<$>)) import qualified Data.IORef as R import System.Exit (exitSuccess) import qualified Graphics.UI.GLFW as GLFW import Gamgine.Control ((?)) import qualified AppData as AP import quali...
dan-t/layers
src/Callback/Key.hs
bsd-3-clause
1,774
0
18
449
491
263
228
-1
-1
{-# LANGUAGE ViewPatterns, TupleSections, RecordWildCards, ScopedTypeVariables, PatternGuards, DeriveDataTypeable #-} module Output.Items(writeItems, lookupItem, listItems) where import Control.Monad import Data.List.Extra import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy.Char8 as LBS impor...
BartAdv/hoogle
src/Output/Items.hs
bsd-3-clause
2,787
14
25
698
853
468
385
54
4
{-# LANGUAGE OverloadedStrings #-} module Snap.Utilities.Configuration.Lookup ( cfgLookup, cfgLookupWithDefault, stringValue, listValue ) where import qualified Data.Configurator as C import qualified Data.Configurator.Types as CT import Data.List (groupBy, intercalate, find, sortBy) import Data.HashMap.Strict...
anchor/snap-configuration-utilities
lib/Snap/Utilities/Configuration/Lookup.hs
bsd-3-clause
1,441
6
10
233
448
247
201
26
1
{-| Copyright : (c) Dave Laing, 2017 License : BSD3 Maintainer : dave.laing.80@gmail.com Stability : experimental Portability : non-portable -} module Fragment.Case.Helpers ( tmAlt , tmCase ) where import Data.Foldable (toList) import Data.List (elemIndex) import Bound (abstract) import Control.Lens ...
dalaing/type-systems
src/Fragment/Case/Helpers.hs
bsd-3-clause
1,012
0
11
214
373
199
174
21
2
----------------------------------------------------------------------------- -- | -- Module : XMonad.Layout.IndependentScreens -- Copyright : (c) 2009 Daniel Wagner -- License : BSD3 -- -- Maintainer : <daniel@wagner-home.com> -- Stability : unstable -- Portability : unportable -- -- Utility functi...
MasseR/xmonadcontrib
XMonad/Layout/IndependentScreens.hs
bsd-3-clause
6,463
0
10
1,253
865
512
353
53
1
{-# LANGUAGE OverloadedStrings, DeriveGeneric #-} import System.Environment import Text.XML.HXT.Core import Data.Aeson import Data.Aeson.Encode.Pretty import GHC.Generics import qualified Data.ByteString.Lazy as B import Data.Monoid import Data.Ord import qualified Data.Text as T -- A very simple structure for the an...
alexDarcy/myanimelist-backup
MyAnimeList.hs
bsd-3-clause
1,429
0
12
300
410
219
191
43
1
{-# LANGUAGE FlexibleContexts, FlexibleInstances, DefaultSignatures , ViewPatterns, RankNTypes, TypeOperators, DataKinds, KindSignatures, PolyKinds , MultiParamTypeClasses, TypeFamilies, FunctionalDependencies #-} module System.Console.YAOP ( module System.Console.YAOP.Selector , module System.Console.YAOP...
esmolanka/yaop
System/Console/YAOP.hs
bsd-3-clause
9,945
0
19
2,878
3,453
1,898
1,555
199
3
{-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} -- | All high-level logic of Toil. It operates in 'LocalToilM' and -- 'GlobalToilM'. module Pos.Chain.Txp.Toil.Logic ( verifyToil , applyToil , roll...
input-output-hk/pos-haskell-prototype
chain/src/Pos/Chain/Txp/Toil/Logic.hs
mit
10,144
0
15
2,360
1,893
1,041
852
-1
-1
{-# LANGUAGE OverloadedStrings #-} -- | A utility type for saving memory in the presence of many duplicate ByteStrings, etc. If you have data that may be -- a redundant duplicate, try pinning it to a pin board, and use the result of that operation instead. -- -- Without a pin board: -- -- x ───── "38dce848c8c829...
unisonweb/platform
parser-typechecker/src/Unison/Util/PinBoard.hs
mit
5,021
0
14
1,155
1,236
655
581
-1
-1
module Pos.DB.Ssc.Logic ( module Pos.DB.Ssc.Logic.Global , module Pos.DB.Ssc.Logic.Local , module Pos.DB.Ssc.Logic.VAR ) where import Pos.DB.Ssc.Logic.Global import Pos.DB.Ssc.Logic.Local import Pos.DB.Ssc.Logic.VAR
input-output-hk/pos-haskell-prototype
db/src/Pos/DB/Ssc/Logic.hs
mit
275
0
5
78
61
46
15
7
0
{-# LANGUAGE OverloadedStrings, TupleSections #-} module Parse where import Prelude hiding (takeWhile) import Control.Applicative import Control.Monad import Data.Text (Text) import qualified Data.Text as Text import ParseUtil import Internal parseConfig ...
sol/config-ng
src/Parse.hs
mit
3,297
0
13
742
1,111
594
517
70
3
-- | Haskell AST utilities to work with @import@ section. module Importify.Syntax.Import ( getImportModuleName , importNamesWithTables , importSlice , isImportImplicit , switchHidingImports ) where import Universum import qualified Data.List.NonEmpty ...
serokell/importify
src/Importify/Syntax/Import.hs
mit
4,637
0
13
1,625
842
466
376
-1
-1
---------------------------------------------------- -- -- -- HyLoRes.Core.Rule.Metadata: -- -- Miscelaneous rule data/info, that probably -- -- should go in Rules.Base but didn't work due to -- -- mutually recursive modules and the 'deriving' -- --...
nevrenato/HyLoRes_Source
src/HyLoRes/Core/Rule/Metadata.hs
gpl-2.0
3,210
0
6
1,092
229
156
73
29
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-redshift/gen/Network/AWS/Redshift/CreateCluster.hs
mpl-2.0
21,017
0
13
4,327
2,536
1,558
978
270
1
-- | -- Module : Test.MiniUnit -- Copyright : (c) 2004 Oleg Kiselyov, Alistair Bayley -- License : BSD-style -- Maintainer : oleg@pobox.com, alistair@abayley.org -- Stability : experimental -- Portability : portable -- -- This is just a simple one-module unit test framework, with the same ...
paulrzcz/takusen-oracle
Test/MiniUnit.hs
bsd-3-clause
6,608
0
18
1,448
1,446
755
691
96
3
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE LambdaCase #-} -- | Definitions used by various garbage collection algorithms. module Stg.Machine.GarbageCollection.Common ( splitHeapWith, GarbageCollectionAlgorithm(..), Addresses(addrs), UpdateAddrs(..), ) where import Data.Map ...
quchen/stg
src/Stg/Machine/GarbageCollection/Common.hs
bsd-3-clause
4,458
0
15
1,113
1,074
549
525
91
2
-- | Test maps, sums and enumerations. import Timing import Randomish import System.Environment import qualified Vector as V import qualified Vectorised as Z import qualified Data.Vector.Unboxed as V main :: IO () main = do args <- getArgs case args of [alg, len] -> run alg (read len) ...
mainland/dph
dph-examples/examples/smoke/prims/SumSquares/dph/Main.hs
bsd-3-clause
742
28
11
188
271
143
128
26
2
-- | -- Statistics for per-module compilations -- -- (c) The GRASP/AQUA Project, Glasgow University, 1993-1998 -- {-# LANGUAGE FlexibleContexts #-} module HscStats ( ppSourceStats ) where import GhcPrelude import Bag import HsSyn import Outputable import SrcLoc import Util import Data.Char import Data.Foldable (fo...
ezyang/ghc
compiler/main/HscStats.hs
bsd-3-clause
7,090
0
15
2,431
2,597
1,516
1,081
140
24
{-# OPTIONS_GHC -fno-implicit-prelude #-} ----------------------------------------------------------------------------- -- | -- Module : Foreign.C.String -- Copyright : (c) The FFI task force 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : ffi@haskell.org -- Stabili...
alekar/hugs
packages/base/Foreign/C/String.hs
bsd-3-clause
15,152
0
16
3,132
1,579
938
641
109
1
module PL where import PL.Type import PL.Struktur import PL.Interpretation import PL.Semantik
Erdwolf/autotool-bonn
src/PL.hs
gpl-2.0
102
0
4
19
24
15
9
5
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE ImpredicativeTypes #-} {-# LANGUAGE ScopedTypeVariables#-} module Main where import OpenCog.AtomSpace import OpenCog.Lojban import Control.Concurrent import Cont...
ruiting/opencog
opencog/nlp/lojban/HaskellLib/app/Main.hs
agpl-3.0
1,259
0
10
325
160
84
76
26
2
module Text.Blaze.Html.Renderer.Utf8 ( renderHtmlBuilder , renderHtml , renderHtmlToByteStringIO ) where import Blaze.ByteString.Builder (Builder) import Data.ByteString (ByteString) import Text.Blaze.Html (Html) import qualified Data.ByteString.Lazy as BL import qualified Text.Blaze.Renderer.Utf8 as R...
iblech/blaze-html
src/Text/Blaze/Html/Renderer/Utf8.hs
bsd-3-clause
590
0
9
79
142
87
55
15
1
{-# LANGUAGE UnicodeSyntax #-} {-# LANGUAGE Arrows #-} {-# LANGUAGE ExplicitForAll #-} {-# LANGUAGE KindSignatures #-} module Simple1 where foo ∷ ∀ a. Eq (a ∷ ★) ⇒ a → IO () foo _ = do i ← return () return i bar x = proc x → id ⤙ x + 1 baz x = proc x → id ⤛ x + 1 bar' x = proc x → x + 1 ⤚ id baz' x = proc x → x ...
siddhanathan/yi
yi-mode-haskell/test/test_data/Simple1Unicode.hs
gpl-2.0
406
12
9
103
178
88
90
-1
-1
yes = foo ((x y), z)
mpickering/hlint-refactor
tests/examples/Bracket11.hs
bsd-3-clause
20
0
8
5
21
11
10
1
1
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="el-GR"> <title>Alert Filters | ZAP Extension</title> <maps> <homeID>top</homeID> <mapre...
kingthorin/zap-extensions
addOns/alertFilters/src/main/javahelp/org/zaproxy/zap/extension/alertFilters/resources/help_el_GR/helpset_el_GR.hs
apache-2.0
974
78
66
159
413
209
204
-1
-1
{-# LANGUAGE DeriveDataTypeable, PatternGuards, FlexibleInstances, MultiParamTypeClasses, CPP #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Hooks.ManageDocks -- Copyright : (c) Joachim Breitner <mail@joachim-breitner.de> -- License : BSD -- -- Ma...
pjones/xmonad-test
vendor/xmonad-contrib/XMonad/Hooks/ManageDocks.hs
bsd-2-clause
11,313
0
17
2,765
2,678
1,469
1,209
133
5
module FunDep4 where class A e a | a->e where a :: a->a; e :: a->e class B a where b :: a->a class (A e a,B a) => C e a instance (A e a,B a) => C e a f :: C e a => a->a f x = a (b x)
forste/haReFork
tools/base/tests/FunDep4.hs
bsd-3-clause
187
0
7
58
145
75
70
-1
-1
-- Based on https://github.com/idris-lang/Idris-dev/blob/v0.9.10/libs/effects/Effects.idr {-# LANGUAGE TypeInType, ScopedTypeVariables, TypeOperators, TypeApplications, GADTs, TypeFamilies, AllowAmbiguousTypes #-} module T12442 where import Data.Kind data family Sing (a :: k) data TyFun :: Type -> Type...
olsner/ghc
testsuite/tests/dependent/should_compile/T12442.hs
bsd-3-clause
1,774
3
13
441
755
424
331
-1
-1
-- | Configuration of compiler behaviour that is universal to all backends. module Futhark.Compiler.Config ( FutharkConfig (..), newFutharkConfig, Verbosity (..), ) where import Futhark.IR import Futhark.Pipeline -- | The compiler configuration. This only contains options related -- to core compiler func...
diku-dk/futhark
src/Futhark/Compiler/Config.hs
isc
1,198
0
10
256
161
108
53
22
1
{-# LANGUAGE OverloadedStrings #-} module Main where import Control.Applicative (optional, (<$>)) import Control.Monad.IO.Class import Data.List import Data.Maybe (fromMaybe, isJust, fromJust) import Data.Monoid import Data.Either import Data.Text (...
gianlucagiorgolo/lambek-monad
Main.hs
mit
10,062
0
26
3,102
2,911
1,468
1,443
-1
-1
module ParseSpec (spec) where import Test.Hspec import Test.QuickCheck import Parse (parse) import LambdaWithSynonyms instance Arbitrary Expr' where arbitrary = do n <- choose (0, 3) :: Gen Int case n of 0 -> do name <- possibleNames return $ V' name 1 -> do name <- possible...
hughfdjackson/abattoir
test/ParseSpec.hs
mit
1,236
0
16
384
406
201
205
31
2
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE CPP #-} module Yesod.Content ( -- * Content Content (..) , emptyContent , ToContent (..) -- * Mime types -- ** Data type , ContentType ...
piyush-kurur/yesod
yesod-core/Yesod/Content.hs
mit
7,602
0
17
1,608
1,646
936
710
184
3
{-# language DeriveTraversable #-} {-# language GeneralizedNewtypeDeriving #-} module Unison.Util.EnumContainers ( EnumMap , EnumSet , EnumKey(..) , mapFromList , setFromList , setToList , mapSingleton , setSingleton , mapInsert , unionWith , keys , restrictKeys , withoutKeys , member , l...
unisonweb/platform
parser-typechecker/src/Unison/Util/EnumContainers.hs
mit
3,041
0
10
727
1,344
682
662
-1
-1
module Graphics.UI.GLFW.Netwire.Input.Types(WindowHandle, ModifierKeys, KeyState, Scancode, Key, Mou...
barendventer/netwire-glfw-b
src/Graphics/UI/GLFW/Netwire/Input/Types.hs
mit
1,262
0
7
582
213
134
79
26
0
module MonadUtils ( breakM , takeWhileM ) where breakM :: (Eq a, Monad m) => (a -> m Bool) -> [a] -> m ([a], [a]) breakM _ xs@[] = return (xs, xs) breakM predM l@(x:xs) = do val <- predM x case val of True -> return ([], l) _ -> do (ys, zs) <- breakM predM xs ret...
arekfu/project_euler
common/MonadUtils.hs
mit
603
0
14
221
322
165
157
21
2
{- HAAP: Haskell Automated Assessment Platform This module provides documentation analysis functions by resorting to the _SourceGraph_ library (<https://hackage.haskell.org/package/SourceGraph>). -} {-# LANGUAGE OverloadedStrings, ViewPatterns, ScopedTypeVariables, DeriveGeneric #-} module HAAP.Code.Analysis.Source...
hpacheco/HAAP
src/HAAP/Code/Analysis/SourceGraph.hs
mit
8,361
0
15
1,680
2,361
1,281
1,080
141
3
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} module Keter.Types.Common ( module Keter.Types.Common , FilePath , Text , ByteString , Set , Map , Exception , SomeException ) where impor...
snoyberg/keter
Keter/Types/Common.hs
mit
8,876
0
21
2,932
2,259
1,197
1,062
222
1
{-# LANGUAGE OverloadedStrings #-} module Y2020.M11.D09.Exercise where {-- The previous exercise had you parse the European Union's member states then add that to the AllianceMap of the world. That was easy, because those data were available as wikidata.org JSON. Not so for the United Nations (which we will do toda...
geophf/1HaskellADay
exercises/HAD/Y2020/M11/D09/Exercise.hs
mit
2,158
0
7
353
238
145
93
23
1
module Rebase.GHC.ConsoleHandler ( module GHC.ConsoleHandler ) where import GHC.ConsoleHandler
nikita-volkov/rebase
library/Rebase/GHC/ConsoleHandler.hs
mit
98
0
5
12
20
13
7
4
0
{-# LANGUAGE FunctionalDependencies #-} module Query.Transformers ( Grouping, groupedAs, groupedBs, unwrapGrouped, RightGrouped(), unRightGrouped, unsafeLiftGrouped, groupRight, unGroupRight, RightCollapsed(), unRightCollapsed, unsafeLiftRightCollapsed, collapseR...
ForestPhoenix/FPSurvey
Query/Transformers.hs
mit
3,249
0
12
674
1,111
606
505
-1
-1
{-# LANGUAGE OverloadedStrings, QuasiQuotes #-} module Y2017.M11.D22.Exercise where {-- You send me an article id, I send you the full text of the article. Simple as that. ... of course, it's never as simple as that, is it. The article needs to be cleaned of special characters. Also, some articles have this annoyi...
geophf/1HaskellADay
exercises/HAD/Y2017/M11/D22/Exercise.hs
mit
1,871
0
9
369
279
168
111
30
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE NoImplicitPrelude #-} module System.Etc.Internal.Errors where import RIO import qualified Data.Aeson as JSON import System.Etc.Internal.Spec.Types -- | Thrown when calling the 'getCo...
roman/Haskell-etc
etc/src/System/Etc/Internal/Errors.hs
mit
3,462
0
11
682
511
300
211
84
0
{-# LANGUAGE TypeFamilies, MultiParamTypeClasses, OverloadedStrings, FlexibleInstances, FlexibleContexts, ScopedTypeVariables, TupleSections #-} module Config ( Conf , parseConfig , readMimeTypesFile , gititConfigFromConf ,...
thkoch2001/gitit2
src/Config.hs
gpl-2.0
6,347
0
54
2,036
1,331
754
577
134
3
{-| Implementation of the runtime configuration details. -} {- Copyright (C) 2011, 2012, 2013 Google Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at yo...
vladimir-ipatov/ganeti
src/Ganeti/Runtime.hs
gpl-2.0
7,260
0
19
1,604
1,399
737
662
139
2
{-# LANGUAGE Arrows, FlexibleContexts, FlexibleInstances, MultiParamTypeClasses, NoMonomorphismRestriction, RankNTypes, TypeOperators, UndecidableInstances #-} {- A puzzle from Raymond Smullyan's "The Lady or the Tiger?", OUP, 1982. - Copyright : (C)opyright 2011 peteg42 at gmail dot com - License : GPL (see ...
peteg/ADHOC
Apps/Smullyan/TheLadyOrTheTiger/MetaPuzzle3.hs
gpl-2.0
4,806
4
18
890
764
421
343
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_HADDOCK show-extensions #-} -- | -- Module : Yi.Mode.JavaScript -- License : GPL-2 -- Maintainer : yi-devel@googlegroups.com -- Stability : experimental -- Portability : porta...
atsukotakahashi/wi
src/library/Yi/Mode/JavaScript.hs
gpl-2.0
5,302
1
15
1,390
1,218
675
543
104
3
module Lamdu.GUI.Expr.EventMap ( add, makeBaseEvents , Options(..), defaultOptions , extractCursor , addLetEventMap , makeLiteralNumberEventMap , makeLiteralCharEventMap , makeLiteralEventMap , allowedSearchTerm, isAlphaNumericName, recordOpener , parenKeysEvent , closeParenEvent...
lamdu/lamdu
src/Lamdu/GUI/Expr/EventMap.hs
gpl-3.0
12,244
0
20
3,049
3,602
1,864
1,738
-1
-1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeSynonymInstances #-} module MulSYM where import ExpSYM import qualified ExpSYM class MulSYM repr where mul :: repr -> repr -> repr tfm1 :: (ExpSYM repr, MulSYM repr) => repr tfm1 = add (lit 7) (neg (mul (lit 1) (lit 2))) tfm2 :: (ExpSYM repr, MulS...
capitanbatata/sandbox
tagless/src/MulSYM.hs
gpl-3.0
675
0
11
125
187
102
85
15
1
module FOOL.AST where -- Simplified FOOL Terms data FOOLTerm = IConst Integer | BConst Bool | Var String | TypedVar String Type | ITE FOOLTerm FOOLTerm FOOLTerm | Tuple [FOOLTerm] | FunApp String [FOOLTerm] | Store FOOL...
emptylambda/BLT
src/FOOL/AST.hs
gpl-3.0
1,289
0
8
486
353
206
147
33
0
-- import Control.Wire -- import Render.Render -- import Utils.Helpers (wee) import Control.Category import Control.Monad import Control.Monad.Fix import Data.Traversable import FRP.Netwire import Linear.V3 import Linear.Vector import Physics import Prelude hiding ((.), id) import Render.Backend.GNUPlot ...
mstksg/netwire-experiments
src/Experiment/Room.hs
gpl-3.0
1,597
0
13
452
703
363
340
-1
-1
module Ant where import Data.Array.Repa (Z(..),(:.)(..),(!)) import qualified Data.Array.Repa as R {- Direction 0 3 1 2 -} type Dir = Int type Ant = (Int, Int) type Grid = R.Array R.U R.DIM2 Int -- When n = 1, turn right -- When n = 3, turn left turn :: Dir -> Int -> Dir turn d n ...
iurdan/haskell-langton
src/Ant.hs
gpl-3.0
799
0
12
265
398
223
175
20
2
-- Copyright (C) 2013 Michael Zuser mikezuser@gmail.com -- -- 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 3 of the License, or -- (at your option) any later version. -- -...
bacchanalia/KitchenSink
KitchenSink/ChainCmp.hs
gpl-3.0
2,360
0
9
581
611
378
233
38
1
{-# LANGUAGE NoImplicitPrelude, TemplateHaskell, OverloadedStrings #-} module Graphics.UI.Bottle.Widgets.FlyNav ( make, makeIO , Config(..) , State , initState ) where import Prelude.Compat import Control.Applicative (liftA2) import Control.Lens (Lens') import qualifi...
rvion/lamdu
bottlelib/Graphics/UI/Bottle/Widgets/FlyNav.hs
gpl-3.0
6,884
0
16
1,790
2,100
1,122
978
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Workspaces/Zones/List.hs
mpl-2.0
5,945
0
18
1,309
789
460
329
122
1
{-# LANGUAGE CPP #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE UnicodeSyntax #-} {-| Module : $Header$ Description : functions necessary for deploying the application as a webservice Copyright : (c) Justus Adam, 2015 License : LGPL-3 Maintainer : de...
JustusAdam/schedule-planner
src/SchedulePlanner/Server.hs
lgpl-3.0
2,486
0
15
638
463
257
206
-1
-1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module P1 where import Control.Monad.Except import Control.Monad.Reader import Data.Text as T import Data.Text.IO as T import P0 data DbConfig = DbConfig { db...
haroldcarr/learn-haskell-coq-ml-etc
haskell/topic/program-structure/2015-06-george-wilson-classy-optics/src/P1.hs
unlicense
2,588
0
12
738
579
322
257
65
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-frontend-kythe/src/Language/Haskell/Indexer/Frontend/Kythe.hs
apache-2.0
13,850
0
17
3,300
2,519
1,321
1,198
214
4
module MaxSequence where import Data.List -- Return the greatest subarray sum within the array of integers passed in. maxSequence :: [Int] -> Int maxSequence = foldl1 max . map (foldl (+) 0) . foldl1 (++) . map inits . tails t1 = [-2, 1, -3, 4, -1, 2, 1, -5, 4] :: [Int]
lisphacker/codewars
MaxSequence.hs
bsd-2-clause
274
0
11
56
113
66
47
5
1
-- Copyright (c) 2012-2017, Christoph Pohl -- BSD License (see http://www.opensource.org/licenses/BSD-3-Clause) ------------------------------------------------------------------------------- -- -- Project Euler Problem 30 -- -- Surprisingly there are only three numbers that can be written as the sum of -- fourth power...
Psirus/euler
src/euler030.hs
bsd-3-clause
1,066
0
9
235
166
93
73
12
1
-- | -- Module : Main -- Copyright : [2013] Manuel M T Chakravarty & Leon A Chakravarty -- License : BSD3 -- -- Maintainer : Manuel M T Chakravarty <chak@cse.unsw.edu.au> -- Portability : haskell2011 -- -- /Usage/ -- -- Provide the filename as the single command line argument. -- -- Left mouse button ...
mchakravarty/BigPixel
src/BigPixel.hs
bsd-3-clause
25,205
1
23
7,623
6,716
3,666
3,050
385
8
module Main(main) where import System.Environment (getArgs) --import Control.Parallel import GHC.Conc import Data.Int type FibType = Int64 main = do [arg1,arg2] <- getArgs let n = read arg1 :: FibType -- input for nfib t = read arg2 :: FibType -- threshold res = parfi...
rrnewton/Haskell-CnC
Intel/HCilk/parfib_threshold.hs
bsd-3-clause
762
1
12
240
287
151
136
20
1
{-# LANGUAGE PatternSynonyms #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.NV.LightMaxExponent -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portabil...
haskell-opengl/OpenGLRaw
src/Graphics/GL/NV/LightMaxExponent.hs
bsd-3-clause
694
0
5
95
52
39
13
8
0
{-# LANGUAGE RecordWildCards, ImplicitParams, TupleSections #-} module Internal.ITransducer(TxInstance(..), Transducer(..), TxPortRef(..)) where import Internal.CFA import Internal.IType import Internal.IVar data TxPortRef = TxInputRef String | T...
termite2/tsl
Internal/ITransducer.hs
bsd-3-clause
897
0
11
408
178
112
66
17
0
-- Copyright (c) 2016-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. {-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} module Duckling.Numeral.ZH...
facebookincubator/duckling
Duckling/Numeral/ZH/Rules.hs
bsd-3-clause
9,563
0
20
2,385
2,837
1,585
1,252
298
2
module Control.Distributed.Task.DataAccess.SimpleDataSource where import qualified Data.ByteString.Lazy.Char8 as BLC import Control.Distributed.Task.Types.TaskTypes (TaskInput) import Control.Distributed.Task.Util.Logging import Control.Distributed.Task.Util.Configuration loadEntries :: FilePath -> IO TaskInput load...
michaxm/task-distribution
src/Control/Distributed/Task/DataAccess/SimpleDataSource.hs
bsd-3-clause
547
0
14
70
134
76
58
12
1
-------------------------------------------------------------------------------- {-# LANGUAGE OverloadedStrings #-} import Data.List (intersperse) import Data.Maybe (fromMaybe) import Data.Monoid ((<>)) import Control.Applicative ((<|>)) imp...
galexy/galexy.github.io
app/Main.hs
bsd-3-clause
7,100
12
25
2,128
1,311
615
696
128
1
{-# LANGUAGE FlexibleContexts, FlexibleInstances, MultiParamTypeClasses #-} module Opaleye.Internal.RunQuery where import Database.PostgreSQL.Simple.Internal (RowParser) import Database.PostgreSQL.Simple.FromField (FieldParser, FromField, from...
silkapp/haskell-opaleye
src/Opaleye/Internal/RunQuery.hs
bsd-3-clause
6,650
0
13
1,354
1,478
805
673
107
2
{-# LANGUAGE BangPatterns #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Data.Binary.Serialise.CBOR.Aeson () where import Data.Aeson import Data.Scientific import qualified Data.Vector as Vec import qualified Data.HashMap.Lazy as HashMap import Data.Binary.Serialise.CBOR.Encoding import Data.Binary.Serialise.CBOR.D...
thoughtpolice/binary-serialise-cbor
examples/Aeson.hs
bsd-3-clause
2,555
0
12
705
716
364
352
63
12
{-| module: Bot.Scripting.Core Implements the core IRC-related functionality, like user registration, responding to pings, joining and leaving channels, and so on. -} module Bot.Scripting.Core ( callbacks, -- * Connection connected, disconnected, manageReadyStatus, respondToEndOfMOTD, managePingT...
cyclohexanamine/haskbot
src/Bot/Scripting/Core.hs
bsd-3-clause
11,472
0
17
2,484
2,853
1,464
1,389
177
4
module Main where import Graphics.HsCharts import Graphics.Gloss main :: IO () main = do let disp = InWindow "HsCharts Demo" (windowW, windowH) (50, 50) display disp white $ pictures [ q 0 0 pointChart , q 1 0 lineChart , q 2 0 bubbleChart ...
maciej-wichrowski/HsCharts
demo/Main.hs
bsd-3-clause
7,621
0
16
2,729
2,398
1,280
1,118
144
1
{-| Module : Idris.IBC Description : Core representations and code to generate IBC files. Copyright : License : BSD3 Maintainer : The Idris Community. -} {-# LANGUAGE TypeSynonymInstances #-} {-# OPTIONS_GHC -fwarn-incomplete-patterns #-} module Idris.IBC (loadIBC, loadPkgIndex, writeIBC,...
ozgurakgun/Idris-dev
src/Idris/IBC.hs
bsd-3-clause
100,046
0
21
55,355
27,569
12,662
14,907
2,406
17
{-# LANGUAGE OverloadedStrings #-} module Cauterize.Dynamic.Common ( isNameOf , lu , fieldsToNameMap , fieldsToIndexMap , fieldNameSet , isSynonym , isRange , isArray , isVector , isEnumeration , isRecord , isCombination , isUnion ) where import Cauterize.Dynamic.Types import Control.Excep...
cauterize-tools/cauterize
src/Cauterize/Dynamic/Common.hs
bsd-3-clause
2,303
0
11
458
922
497
425
71
1
module Type where import qualified Data.IntMap as IM import Data.Maybe import qualified Data.Set as Set import Data.List import Name import FreeEnvironment type Dictionary = FreeEnv String type Type = TypeA () data TypeInstance = TDouble | TBool deriving (Eq, Show) -- TODO repla...
kwibus/myLang
src/Type.hs
bsd-3-clause
4,102
1
17
1,051
1,638
833
805
90
5
{-# LANGUAGE PatternGuards, TypeSynonymInstances, FlexibleInstances #-} -- | Duck Operator Tree Parsing -- -- Since the precedence of operators is adjustable, we parse expressions -- involving operators in two passes. This file contains the second pass. -- Partially borrowed from <http://hackage.haskell.org/trac/haske...
girving/duck
duck/ParseOps.hs
bsd-3-clause
4,021
0
14
976
1,933
1,039
894
120
9
{-# LANGUAGE DeriveDataTypeable #-} module Language.Lambda.SimplyTyped.Syntax where import Data.Data data Type a = Base a | Arrow (Type a) (Type a) deriving(Show, Eq, Data, Typeable) data Expr s a c = Var s | App (Expr s a c) (Expr s a c) | Lam s (Type a) (Expr s a c) ...
jfischoff/LambdaAST
src/Language/Lambda/SimplyTyped/Syntax.hs
bsd-3-clause
401
0
8
143
150
84
66
10
0