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
-- | Contains useful methods to work with the defined types (both from the language -- specification/bnfc and the 'ApiSpec' module). module LangUtils where import qualified Data.Set as S import Language.Abs import qualified TypeCheck.ApiSpec as AS -- | Extracts the name of the 'Specification' (AST)...
SantiMunin/harmony
src/LangUtils.hs
gpl-3.0
3,427
0
11
860
713
392
321
56
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-glacier/gen/Network/AWS/Glacier/AbortMultipartUpload.hs
mpl-2.0
5,329
0
9
1,058
517
320
197
65
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-shopping-content/gen/Network/Google/Resource/Content/ReturnpolicyOnline/Patch.hs
mpl-2.0
5,816
0
19
1,352
878
509
369
129
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-spanner/gen/Network/Google/Resource/Spanner/Projects/Instances/TestIAMPermissions.hs
mpl-2.0
6,549
0
16
1,355
790
465
325
121
1
module TesML.Data.Plugin where import TesML.Data.Types import qualified TesML.Data.Group as GRP import qualified TesML.Data.RecordHeader as RH import qualified TesML.Data.Path as PTH import Data.Either (partitionEithers) import Data.Binary.Get (Get , bytesRead , isEmpty ...
Kromgart/tesML
lib/TesML/Data/Plugin.hs
agpl-3.0
2,894
0
16
1,031
821
425
396
47
6
import Data.IORef magic :: IORef (Maybe Int) -> IO () magic ref = do value <- readIORef ref case value of Just _ -> return () Nothing -> writeIORef ref (Just 42) main :: IO () main = do ref <- newIORef Nothing magic ref val <- readIORef ref case val of Just x -> print x Nothing -> print "...
omefire/HaskellProjects
ioref-Maybe.hs
apache-2.0
330
0
12
95
154
69
85
15
2
{-# LANGUAGE RankNTypes, FlexibleContexts #-} -- Interface to SMT2 format module Builtins( Builtin(..) , builtins) where import Text.PrettyPrint import Control.Monad.Except import Syntax import Name import Pos import Type import PP import Boogie.Boogie import Boogie.BoogieHelpers import Util import q...
ryzhyk/cocoon
cocoon/Builtins.hs
apache-2.0
4,677
0
20
1,465
1,454
754
700
90
3
-- Copyright (c) 2015 Jonathan M. Lange <jml@mumak.net> -- -- 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 appli...
jml/hazard
lib/Hazard/GameAPI.hs
apache-2.0
4,623
0
24
888
1,136
605
531
70
2
module Graphics.ImageMagick.MagickCore.Mime ( toMime ) where import Control.Applicative import Control.Monad.IO.Class import Control.Monad.Trans.Resource import Data.ByteString (packCString, ...
flowbox-public/imagemagick
Graphics/ImageMagick/MagickCore/Mime.hs
apache-2.0
832
0
11
343
162
92
70
18
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TemplateHaskell #-} module Openshift.V1.ImageStreamImportStatus where import GHC.Generics import Openshift.V1.ImageImportStatus import Op...
minhdoboi/deprecated-openshift-haskell-api
openshift/lib/Openshift/V1/ImageStreamImportStatus.hs
apache-2.0
1,064
0
18
153
180
107
73
18
0
{-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE FlexibleInstances #-} module ArbitraryType (arbitraryType) where import Test.QuickCheck.Gen import Test.QuickCheck import Type import MakeType instance Arbitrary Type where arbitrary = sized arbitraryType -- TODO Beter Arbitrary type possible ? arbitraryType :...
kwibus/myLang
tests/ArbitraryType.hs
bsd-3-clause
762
0
11
162
218
111
107
23
1
module ProjectEuler.Problem007 (solution007) where import Util import Primes --10001 prime, when indexing starts at 0 is 10000 solution007 :: Integer solution007 = primes !! 10000
ThermalSpan/haskell-euler
src/ProjectEuler/Problem007.hs
bsd-3-clause
184
0
5
29
32
20
12
5
1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE FlexibleContexts #-} module Search.Common ( Identifier, IdType, unboxId, boxId, putId, getId , Token(Token), DocId(DocId), unToken, unDocId , TokenDoc, docFromTokens, tokensFromDoc, tokenDocLength, termFrequencies, vectorFromDoc, docFromVector ...
jdimond/diplomarbeit
lib/Search/Common.hs
bsd-3-clause
3,051
0
14
704
950
530
420
90
1
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.Raw.SGIX.ReferencePlane -- Copyright : (c) Sven Panne 2015 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portable...
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/SGIX/ReferencePlane.hs
bsd-3-clause
788
0
4
91
52
42
10
6
0
module Distribution.Client.Dependency.Modular.IndexConversion ( convPIs ) where import Data.List as L import Data.Map as M import Data.Maybe import Data.Monoid as Mon import Prelude hiding (pi) import qualified Distribution.Client.PackageIndex as CI import Distribution.Client.Types import Distribution.Client....
lukexi/cabal
cabal-install/Distribution/Client/Dependency/Modular/IndexConversion.hs
bsd-3-clause
10,640
0
20
2,593
2,754
1,451
1,303
131
9
-- (c) 1999-2005 by Martin Erwig [see file COPYRIGHT] -- | Static and Dynamic Inductive Graphs module Data.Graph.Inductive.Graph ( -- * General Type Defintions -- ** Node and Edge Types Node,LNode,UNode, Edge,LEdge,UEdge, -- ** Types Supporting Inductive Graph View Adj,Context,MContext,Decomp,GD...
scolobb/fgl
Data/Graph/Inductive/Graph.hs
bsd-3-clause
19,532
0
15
4,689
6,348
3,498
2,850
-1
-1
{-# LANGUAGE OverloadedStrings, TypeFamilies, FlexibleContexts, PackageImports #-} module Network.XMPiPe.Core.S2S.Server ( -- * Types and Values Mpi(..), XmppState(..), Tags(..), tagsNull, tagsType, SaslState, SaslError, -- * Functions starttls, sasl, begin, input, output, ) where import "monads-tf" Control.Mona...
YoshikuniJujo/xmpipe
core/Network/XMPiPe/Core/S2S/Server.hs
bsd-3-clause
4,026
71
20
767
1,736
898
838
103
3
#!/usr/local/bin/runhaskell -- begin example import Text.Hastache import Text.Hastache.Context import qualified Data.Text.Lazy.IO as TL main = hastacheStr defaultConfig (encodeStr template) (mkStrContext context) >>= TL.putStrLn template = "Hello, {{name}}!\n\nYou have {{unread}} unread messages." context "na...
lymar/hastache
examples/variables.hs
bsd-3-clause
390
2
7
53
89
50
39
8
1
module Paths_new_template ( version, getBinDir, getLibDir, getDataDir, getLibexecDir, getDataFileName, getSysconfDir ) where import qualified Control.Exception as Exception import Data.Version (Version(..)) import System.Environment (getEnv) import Prelude catchIO :: IO a -> (Exception.IOException -> IO...
wstrinz/hask_bsb
.stack-work/dist/x86_64-windows/Cabal-1.18.1.5/build/autogen/Paths_new_template.hs
bsd-3-clause
1,653
0
10
182
371
213
158
28
1
module Singletons.AsPattern where import Data.Proxy import Data.Singletons import Data.Singletons.TH import Data.Singletons.Prelude.Maybe import Data.Singletons.Prelude.List import Singletons.Nat import Data.Singletons.SuppressUnusedWarnings $(singletons [d| maybePlus :: Maybe Nat -> Maybe Nat maybePlus (Just n) ...
int-index/singletons
tests/compile-and-dump/Singletons/AsPattern.hs
bsd-3-clause
724
0
7
171
61
39
22
-1
-1
-- 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. An additional grant -- of patent rights can be found in the PATENTS file in the same directory. ------------------...
rfranek/duckling
Duckling/Ranking/Classifiers/IT.hs
bsd-3-clause
128,512
0
15
63,656
21,613
13,468
8,145
2,071
1
import Web.TouchnGo import Data.Time import System.Locale main = do accounts <- fmap read $ readFile "touchngo.cfg" mapM_ writeData (accounts :: [Account]) writeData account = do timestamp <- fmap (formatTime defaultTimeLocale "%Y%m%d.%H%M%S") getCurrentTime putStrLn $ "Retrieving data for " ++ userid accoun...
womfoo/touchngo-scrape
touchngo-scrape.hs
bsd-3-clause
502
0
12
90
161
76
85
14
1
{-# LANGUAGE ScopedTypeVariables #-} module Main where import qualified Data.Map as M import Control.Applicative import Control.Monad (unless) import Control.Monad.Trans import Control.Monad.Reader import qualified Control.Exception as E import Graphics.UI.Gtk import Graphics.UI.Gtk.Vte.Vte import System.Exit import S...
vincenthz/haterm
src/Haterm.hs
bsd-3-clause
6,294
0
25
2,188
1,671
841
830
142
10
module RopeWalking where type Birds = Int type Pole = (Birds, Birds) -- Before Monads --landLeft :: Birds -> Pole -> Pole --landLeft n (left,right) = (left + n,right) --landRight :: Birds -> Pole -> Pole --landRight n (left,right) = (left,right + n) landLeft :: Birds -> Pole -> Maybe Pole landLeft n (left...
Abhiroop/Haskell-First-Principle
src/RopeWalking.hs
bsd-3-clause
865
2
14
238
251
132
119
17
1
module Minesweeper where import Data.List data Field = Marked | Unmarked | Open Int | Mine deriving (Show, Eq) type Board = [[Field]] data GameState = GameState { board :: Board , mines :: [Coordinates] , state :: State } deriving (S...
FAumeier/Minesweeper
src/Minesweeper.hs
bsd-3-clause
4,570
0
14
1,625
1,443
785
658
84
4
import qualified AtomicExpr as AE import qualified Data.List as L import qualified Data.Map as M import qualified System.IO as IO allTheSame :: (Eq a) => [a] -> Bool allTheSame xs = and $ map (== head xs) (tail xs) unique = reverse . L.nub . reverse allTheSameF xs func = and $ map (func (head xs)) (tail xs) hasV...
ytakano/tsukuyomi
tests/unification/robinson.hs
bsd-3-clause
5,546
3
14
1,709
2,177
1,098
1,079
148
4
module ELc.ParserSpec where import Language.ELc import Language.ELc.Parser import Language.Lc import ELc.Arbitrary () import Test.Hspec import Test.QuickCheck import Text.Megaparsec import Text.PrettyPrint.HughesPJ import Text.PrettyPrint.HughesPJClass (Pretty(..)) -----------------------------------------------...
d-dorazio/lc
test/ELc/ParserSpec.hs
bsd-3-clause
1,071
0
18
211
365
199
166
24
1
{-# LANGUAGE MagicHash, UnboxedTuples #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE UnliftedFFITypes #-} {-# LANGUAGE DeriveDataTypeable #-} module Data.Text where import GHC.Prim import GHC.Types import GHC.Exts (build) import Data.Primitive.PrimArray import qualified Data.Vector as V import Data.Array import Contr...
winterland1989/stdio
Data/Text.hs
bsd-3-clause
11,234
5
21
3,245
3,592
1,847
1,745
245
3
{-# LANGUAGE BangPatterns, ViewPatterns #-} ------------------------------------------------------------------------------ -- Module: Database.PostgreSQL.Simple.Time.Internal.Printer -- Copyright: (c) 2012-2015 Leon P Smith -- License: BSD3 -- Maintainer: Leon P Smith <leon@melding-monads.com> -- Stability...
tolysz/postgresql-simple
src/Database/PostgreSQL/Simple/Time/Internal/Printer.hs
bsd-3-clause
4,116
0
13
880
1,441
832
609
-1
-1
module T323 where import Data.Type.Equality import Prelude.Singletons test :: f .@#@$$$ (g .@#@$$$ h) :~: f .@#@$$$ g .@#@$$$ h test = Refl
goldfirere/singletons
singletons-base/tests/compile-and-dump/Singletons/T323.hs
bsd-3-clause
142
0
8
25
48
28
20
-1
-1
{-# LANGUAGE QuasiQuotes, TypeFamilies, GeneralizedNewtypeDeriving #-} {-# LANGUAGE FlexibleContexts, FlexibleInstances, TemplateHaskell, OverloadedStrings #-} {-# LANGUAGE GADTs, MultiParamTypeClasses, TypeSynonymInstances #-} {-# LANGUAGE ViewPatterns #-} import Yesod import Yesod.Auth import Yesod.Auth.Account impor...
maxhowald/haskset
Setserve.hs
bsd-3-clause
16,925
6
31
6,253
4,433
2,206
2,227
299
5
module Main where import Test.Framework (defaultMain, testGroup) ------------------------------------------------------------------------------ import qualified Snap.Internal.Http.Server.Parser.Tests as Parser --------------------------------------------------------------------------...
afcowie/new-snap-server
test/TestSuite.hs
bsd-3-clause
432
0
9
84
66
41
25
6
1
{-# OPTIONS_HADDOCK hide #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GL.FramebufferObjects.FramebufferObjectAttachment -- Copyright : (c) Sven Panne 2013 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.c...
hesiod/OpenGL
src/Graphics/Rendering/OpenGL/GL/FramebufferObjects/FramebufferObjectAttachment.hs
bsd-3-clause
4,551
0
12
640
703
376
327
67
5
module Karamaan.Opaleye.ExprArr where import Prelude hiding ((.), id, or) import qualified Data.Map as Map import Data.Map (Map) import Database.HaskellDB.PrimQuery (PrimExpr, extend, Literal) import Control.Arrow (Arrow, arr, first, (&&&), (***)) import Control.Category (Category, id, (.), (<<<)) import Karamaan.Opal...
dbp/karamaan-opaleye
Karamaan/Opaleye/ExprArr.hs
bsd-3-clause
5,378
0
12
1,183
1,878
1,036
842
102
1
{-# LANGUAGE TemplateHaskell #-} module AWS.EC2.Types.NetworkInterface ( NetworkInterface(..) , NetworkInterfaceAssociation(..) , NetworkInterfaceAttachment(..) , NetworkInterfaceParam(..) , NetworkInterfacePrivateIpAddress(..) , NetworkInterfaceStatus(..) , SecondaryPrivateIpAddressParam(....
IanConnolly/aws-sdk-fork
AWS/EC2/Types/NetworkInterface.hs
bsd-3-clause
4,068
0
9
739
622
380
242
90
0
{-# LANGUAGE TypeFamilies #-} {- Theoretical Type Family Design. Problem: I still need a type class, so while I find this in some ways more elegant with the type class and data tied together it doesn't buy me anything really at the cost of using a more advance and recent extension. -} module D5...
dterei/Scraps
haskell/prettyGenerics/D5.hs
bsd-3-clause
1,063
0
11
314
337
171
166
-1
-1
module Feature.RangeSpec where import Test.Hspec import Test.Hspec.Wai import Test.Hspec.Wai.JSON import Network.HTTP.Types import Network.Wai.Test (SResponse(simpleHeaders,simpleStatus)) import SpecHelper spec :: Spec spec = beforeAll (clearTable "items" >> createItems 15) . afterAll_ (clearTable "items") . aroun...
pap/postgrest
test/Feature/RangeSpec.hs
mit
4,363
0
21
1,485
872
452
420
-1
-1
module SubsAst where data Program = Prog [Stm] deriving (Show, Eq) data Stm = VarDecl Ident (Maybe Expr) | ExprAsStm Expr deriving (Show, Eq) data Expr = Number Int | String String | Array [Expr] | Undefined | TrueConst | FalseConst ...
Rathcke/uni
ap/exam/src/subs/SubsAst.hs
gpl-3.0
711
0
8
270
201
117
84
24
0
module Main (main) where import Control.Monad import qualified Data.IntMap as IntMap import qualified Data.List as List import Data.Monoid ((<>)) import Data.Text.Prettyprint.Doc (Pretty (..)) impo...
Verites/verigraph
src/CLI/ModelChecker.hs
apache-2.0
6,350
0
16
1,671
1,643
857
786
147
3
-- Copyright (c) 2015 Eric McCorkle. All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions -- are met: -- -- 1. Redistributions of source code must retain the above copyright -- notice, this list of conditi...
emc2/saltlang
test/library/Tests/Control/Monad.hs
bsd-3-clause
1,674
0
7
285
72
56
16
4
1
{-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE UndecidableInstances, FlexibleInstances #-} module Util.Nesting where import Control.Monad import Util.Array (Array) import Data.Vector (Vector) import qualified Util.Array as A import qualified Data.Vector as V -- | Class of neste...
mainland/dph
dph-test/framework/Util/Nesting.hs
bsd-3-clause
1,726
0
10
490
514
270
244
-1
-1
{- (c) The GRASP Project, Glasgow University, 1994-1998 \section[TysWiredIn]{Wired-in knowledge about {\em non-primitive} types} -} {-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} -- | This module is about types that can be defined in Haskell, but which -- must be wired into the compiler nonetheless. C.f ...
snoyberg/ghc
compiler/prelude/TysWiredIn.hs
bsd-3-clause
57,940
0
15
15,072
8,894
4,890
4,004
776
8
module Llvm.Asm.Parser.Block where import Llvm.Asm.Data import Llvm.Asm.Parser.Basic import Llvm.Asm.Parser.Instruction ------------------------------------------------------------------------------- pBlocks :: P [Block] pBlocks = try (many block) where block :: P Block block = do { n <- pBlockLabel ...
mlite/hLLVM
src/Llvm/Asm/Parser/Block.hs
bsd-3-clause
1,189
0
14
428
301
159
142
19
3
-- | Fake cabal module for local building {-# OPTIONS_GHC -w #-} module Paths_bake where import Data.Version import System.IO.Unsafe import System.Directory import Control.Exception import System.Environment.Extra getDataDir :: IO FilePath getDataDir = unsafePerformIO $ do -- so that it gets cached the first ti...
capital-match/bake
src/Paths.hs
bsd-3-clause
535
0
12
105
125
69
56
15
1
--http://mitpress.mit.edu/sites/default/files/titles/content/sicm/book-Z-H-4.html#%_toc_start data Vec = Vec { xComp :: Double ,yComp :: Double ,zComp :: Double} type Time = Double type Displacement = Vec type Velocity = Vec type State = (Time, Displacement,...
junnf/Functional-Programming
codes/physics.hs
unlicense
591
0
8
180
79
53
26
8
0
-- %************************************************************************ -- %* * -- The known-key names for Template Haskell -- %* * -- %**********************************...
urbanslug/ghc
compiler/prelude/THNames.hs
bsd-3-clause
36,571
0
8
7,332
6,948
4,029
2,919
628
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Main where import Control.Applicative import Control.Exception import Control.Monad import Control.Monad.Reader import ...
sjfloat/bloodhound
tests/tests.hs
bsd-3-clause
34,427
0
26
9,560
9,413
4,559
4,854
663
2
{-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE CPP #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} ------------------------------------------------------------------------------- -- -- Module : Yesod.RssFeed -- Copyright : Patrick Brisbin -- Lice...
MaxGabriel/yesod
yesod-newsfeed/Yesod/RssFeed.hs
mit
4,038
0
22
973
1,021
537
484
73
2
{-# LANGUAGE RebindableSyntax #-} module Lib where import Prelude (IO) pure = undefined foo :: IO () foo = do pure ()
shlevy/ghc
testsuite/tests/rebindable/T14670.hs
bsd-3-clause
124
0
8
28
41
23
18
7
1
-- !!! Empty export list module M(,) where x = 2
urbanslug/ghc
testsuite/tests/module/mod99.hs
bsd-3-clause
50
0
4
12
14
10
4
2
1
module Pet.Arguments where import Pet.Errors import System.Console.GetOpt import System.Environment import System.Exit data Options = Options { optShowVersion :: Bool , optShowHelp :: Bool , optVerbose :: Bool , optAdd :: [String] ...
fredmorcos/attic
projects/pet/archive/pet_haskell_modular_1/Pet/Arguments.hs
isc
2,656
0
16
1,015
733
410
323
71
5
{-| Contains functions for composing units of time and signals that sample from the game clock. -} module FRP.Helm.Time ( -- * Types Time, -- * Composing millisecond, second, minute, hour, inMilliseconds, inSeconds, inMinutes, inHours, fps, -- * Clock State running, delta, delay ) where ...
gamebytes/helm
src/FRP/Helm/Time.hs
mit
2,504
0
11
507
487
276
211
48
1
module Data.TicTacToe where -- ######### -- # Types # -- ######### data Mark = B | O | X deriving(Eq) instance Show Mark where show B = " " show O = "O" show X = "X" type Board = (Row, Row, Row) type Row = (Mark,Mark,Mark) -- ################## -- # Show instance # -- ################## showBoa...
agomezl/TicTacToe
src/Data/TicTacToe.hs
mit
2,147
0
13
562
1,374
810
564
60
1
module Graphics.CG.Primitives.Triangulation where import Data.HashMap.Strict (HashMap, empty) import Data.HashSet (HashSet) import Graphics.Gloss.Data.Point import Graphics.CG.Primitives.UnorderedPair type Triangulation = HashMap Point (HashSet (UnorderedPair ...
jagajaga/CG-Haskell
Graphics/CG/Primitives/Triangulation.hs
mit
392
0
9
89
79
49
30
8
1
{- | Cubie representation. A Rubik's cube is the cartesian product of a permutation of cubies and an action on their orientations. -} module Rubik.Cube.Cubie ( -- * Complete cube CubeAction (..), FromCube (..), Cube (..), -- ** Solvability test solvable, -- * Corners numCorners, CornerPer...
Lysxia/twentyseven
src/Rubik/Cube/Cubie.hs
mit
1,146
0
5
239
176
123
53
45
0
{-# LANGUAGE RebindableSyntax, GADTs, TypeFamilies, ScopedTypeVariables #-} module EnumVect where import Data.Vector.Unboxed hiding (foldl') import Data.Foldable (foldl') import Data.Ix import Control.Monad.Constrained hiding (replicate, zipWith) import Prob import qualified Prelude data EnumVect a where EnumVect ...
oisdk/constrained-monads
bench/EnumVect.hs
mit
2,574
0
14
820
911
497
414
76
1
main = print ((1::Object) + (2::Object)) data Object = Int class Python a where (+) :: a -> a -> a instance Python Object where (+) a b = (a::Object) + (b::Object)
jarble/transpiler
translated_functions/python_functions.hs
mit
172
0
8
40
95
54
41
6
1
{-# LANGUAGE GADTs #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE UndecidableInstances #-} -- |Improved arrows, with a whole host of minor optimisations and instances. module Control.Arrow.Improve(ImproveArrow, lowerImprove, getFunction) where import Prelude hiding (id, (.)...
prophile/arrow-improve
Control/Arrow/Improve.hs
mit
9,423
0
13
2,389
3,453
1,814
1,639
241
1
module Main where import Data.Int (Int32, Int64) import Data.Time.Clock (UTCTime) import System.Random (StdGen, getStdGen) import Criterion.Main (defaultMain, bench, bgroup, whnf) import Data.Text (Text) import Test.QuickCheck (Arbitrary, arbitrary, resize) import Test.QuickCheck.Gen (unGen) import Data.Bson (FromBs...
lambda-llama/bresson
benchmarks/Benchmarks.hs
mit
1,319
0
15
350
494
271
223
32
2
{-# LANGUAGE OverloadedStrings #-} {-| Module : Examples.Macros Description : Defines macros for use in predefined networks. Copyright : (c) Tessa Belder 2015 Defines macros for use in predefined networks. -} module Examples.Macros (delay, cc, mswitch, singleChannel)where import Madl.Network import Utils.Text...
julienschmaltz/madl
examples/Examples/Macros.hs
mit
4,651
0
10
1,054
1,143
689
454
88
1
{-# LANGUAGE TemplateHaskell #-} import System.Executable.Hash.Internal (injectedExecutableHash) main :: IO () main = case $(injectedExecutableHash) of Nothing -> fail "Expected executable hash." Just _ -> return ()
fpco/executable-hash
test/test-inject.hs
mit
238
0
9
49
60
31
29
7
2
module HashBench (benchHash, hashEnv) where import Criterion import Control.Monad import Crypto.Saltine.Core.Hash import Crypto.Saltine.Core.Utils import BenchUtils import Data.Maybe (fromJust) hashEnv :: IO (ShorthashKey, GenerichashKey, GenerichashOutLen) hashEnv = do shk <- newShorthashKey ghk <- fromJu...
tel/saltine
bench/HashBench.hs
mit
1,119
0
12
292
387
199
188
29
1
{-# LANGUAGE GeneralizedNewtypeDeriving, FlexibleContexts #-} module ScopeAnalyzer ( scopeAnalysis , printSAState , SAState(..) ) where import Data.Maybe import Data.List import Data.Typeable import Control.Monad.State import Control.Monad.Except import Debug.Trace (trace, traceShow) import Text.Pretty.Sim...
cservenka/ROOPLPPC
src/ScopeAnalyzer.hs
mit
10,884
0
19
3,567
3,439
1,736
1,703
240
22
module Data.LSH where import Data.Foldable (foldr) import Data.Hashable import Data.List.Split import qualified Data.LSH.MinHash as MH import qualified Data.Map as M import qualified Data.Set as S import Prelude hiding (foldr) data LSH k = LSH ...
DbIHbKA/lsh
src/Data/LSH.hs
mit
1,633
0
14
757
476
262
214
52
2
module Insert where insert :: Int -> [Int] -> [Int] insert e [] = [e] insert e (x:xs) | e > x = x:insert e xs | otherwise = e:x:xs
CristiBalu/HaskellWorkshops
BasicFunctions/Insert.hs
mit
138
0
8
37
91
47
44
7
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE UndecidableInstances #-} module Types ( module Types , module P , module Debug.Trace , module Text.LaTeX.LambdaTeX , module Text.LaTeX , module Text.LaTeX.Base.Class , module Text.LaTeX.Base.Pret...
NorfairKing/the-notes
src/Types.hs
gpl-2.0
3,821
0
9
1,631
717
478
239
90
0
{-@ LIQUID "--pruneunsorted" @-} -- | Formats Haskell source code as HTML with CSS and Mouseover Type Annotations module Language.Haskell.HsColour.ACSS ( hscolour , hsannot , AnnMap (..) , Loc (..) , breakS , srcModuleName ) where {-@ LIQUID "--totality" @-} import Language.Haskell.HsColour.General ...
nikivazou/hscolour
Language/Haskell/HsColour/ACSS.hs
gpl-2.0
5,555
0
16
1,542
1,726
943
783
115
2
{-# LANGUAGE TemplateHaskell #-} module Str ( str ) where import Language.Haskell.TH import Language.Haskell.TH.Quote str :: QuasiQuoter str = QuasiQuoter { quoteExp = stringE }
KenetJervet/mapensee
haskell/template-haskell/Sample2/Str.hs
gpl-3.0
192
0
6
39
41
27
14
6
1
module PropT36 where import Prelude(Bool(..)) import Zeno -- Definitions True && x = x _ && _ = False False || x = x _ || _ = True not True = False not False = True -- Nats data Nat = S Nat | Z (+) :: Nat -> Nat -> Nat Z + y = y (S x) + y = S (x + y) (*) :: Nat -> Nat -> Nat Z * _ = Z (S x) * y = y + (x...
danr/hipspec
testsuite/prod/zeno_version/PropT36.hs
gpl-3.0
3,008
0
11
923
2,021
1,055
966
114
2
module HEP.Automation.MadGraph.Dataset.Set20110316set1 where import HEP.Automation.MadGraph.Model import HEP.Automation.MadGraph.Machine import HEP.Automation.MadGraph.UserCut import HEP.Automation.MadGraph.Cluster import HEP.Automation.MadGraph.SetupType import HEP.Automation.MadGraph.Dataset.Common my_ssetup :: S...
wavewave/madgraph-auto-dataset
src/HEP/Automation/MadGraph/Dataset/Set20110316set1.hs
gpl-3.0
1,689
0
10
409
354
218
136
46
1
{- - Copyright (C) 2013 Alexander Berntsen <alexander@plaimi.net> - Copyright (C) 2013 Stian Ellingsen <stian@plaimi.net> - - This file is part of bweakfwu. - - bweakfwu 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 Fou...
plaimi/bweakfwu
src/bweakfwu/Movable/Paddle.hs
gpl-3.0
4,702
0
10
1,108
894
521
373
55
1
module UtilsSpec where import Test.Hspec import Utils spec :: Spec spec = do describe "Utils.strip" $ do context "when given the empty string" $ it "returns the empty string" $ strip "" `shouldBe` "" context "when given no whitespace," $ it "returns the sam...
jmittert/shush
test/UtilsSpec.hs
gpl-3.0
960
0
13
353
234
115
119
27
1
module KRPCHS.UI ( FontStyle(..) , MessagePosition(..) , TextAlignment(..) , TextAnchor(..) , Button , Canvas , InputField , Panel , RectTransform , Text , addCanvas , addCanvasStream , addCanvasStreamReq , buttonRemove , getButtonClicked , getButtonClickedStream , getButtonClickedStreamReq , getButtonRectTransform , g...
Cahu/krpc-hs
src/KRPCHS/UI.hs
gpl-3.0
50,942
0
12
7,618
11,728
5,961
5,767
895
1
{- This file is part of Deutsche Nummers. Deutsche Nummers 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. Deutsche Nu...
mgmillani/deutsche-helfer
deutscheNummers/Nummer.hs
gpl-3.0
2,202
0
13
430
705
387
318
22
7
-- | The core handling for event files. module Event ( Event(..) , Option(..) , event , eventOrNamespace )where import Scoped(EventId,Atom(..),Label) import Condition(Condition,condition) import Maker(Maker,(@@),(@?),(@@@),(/@@),(/@#),(<?>) ,checkKey,position,mapS...
joelwilliamson/validator
Event.hs
agpl-3.0
4,104
0
41
1,009
1,142
644
498
100
1
{- ORMOLU_DISABLE -} -- Implicit CAD. Copyright (C) 2011, Christopher Olah (chris@colah.ca) -- Copyright 2016, Julia Longtin (julial@turinglace.com) -- Released under the GNU AGPLV3+, see LICENSE -- Idealy, we'd like to parse a superset of openscad code, with some improvements. -- This file provides primitive objects...
colah/ImplicitCAD
Graphics/Implicit/ExtOpenScad/Primitives.hs
agpl-3.0
28,165
4
26
8,467
8,297
4,435
3,862
500
16
{- Gödel's System T -} data Exp = Var String | Z | S Exp | Rec Exp Exp String String Exp | Lam {- Typ -} String Exp | App Exp Exp deriving (Eq, Show) isClosed :: Exp -> Bool isClosed Z = True isClosed (S e) = isClosed e isClosed Lam{} = True isClosed _ = False subst :: String ->...
scturtle/fun.hs
T.hs
unlicense
1,185
0
15
417
674
329
345
38
9
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE TemplateHaskell #-} ----------------------------------------------------------------------------- -- -- Module : File -- Copyright : -- License : AllRightsReserved -- -- Maintainer : -- Stability : -- Portability : -- -- | -- -----------------------------...
uvNikita/FileService
src/File.hs
apache-2.0
1,547
0
11
389
505
278
227
41
0
module GameServer.AppSpec where import Control.Concurrent.STM.TVar import qualified Data.Aeson as A import Data.ByteString (ByteString) import Data.Maybe (fromJust) import Data.Text (Text) import qualified Data.Text as Text import Data.Text.Encoding (decodeUtf8, encodeUtf8) import GameServer.App import GameServer.Buil...
abailly/hsgames
game-server/test/GameServer/AppSpec.hs
apache-2.0
5,601
0
22
1,360
1,428
713
715
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module NLP.Concraft.Polish ( -- * Model C.Concraft , C.saveModel , C.loadModel -- * Tagging , tag , marginals -- * Analysis , macaPar -- * Training , TrainConf (..) , train -- * Pruning , C.prune -- -- * Analysis -- , anaSent -- , reAnaPar ) w...
kawu/concraft-pl
src/NLP/Concraft/Polish.hs
bsd-2-clause
5,083
0
13
1,245
1,193
685
508
97
2
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude, MagicHash, UnboxedTuples, BangPatterns #-} ----------------------------------------------------------------------------- -- | -- Module : Java.String -- Copyright : (c) Rahul Muttineni 2016 -- License : BSD-style (see the file libraries/base/LI...
alexander-at-github/eta
libraries/base/Java/String.hs
bsd-3-clause
3,405
4
22
840
1,028
530
498
-1
-1
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE CPP #-} ----------------------------------------------------...
reuleaux/pire
src/Pire/Syntax/Nm.hs
bsd-3-clause
2,575
0
11
464
512
283
229
48
1
{-# LANGUAGE PackageImports #-} module GHC.Exception (module M) where import "base" GHC.Exception as M
silkapp/base-noprelude
src/GHC/Exception.hs
bsd-3-clause
108
0
4
18
21
15
6
3
0
{-# LANGUAGE GADTs #-} {-# LANGUAGE ScopedTypeVariables #-} module Diagrams.Graph.Combinators where import Diagrams.Prelude hiding ((:&)) import Diagrams.Backend.SVG -- bar :: Double -> (res -> Double) -> res -> Diagram B -- bar w getHeight res = rect w h -- where h...
andrewthad/graphite
src/Diagrams/Graph/Combinators.hs
bsd-3-clause
2,030
0
20
434
707
360
347
32
1
{-# LANGUAGE OverloadedStrings #-} -- | Functions useful when writing Unix command-line programs. module Penny.Unix where import Control.Monad.IO.Class (MonadIO) import Data.ByteString (ByteString) import Data.Text (Text) import qualified Turtle import qualified Turtle.Bytes as Bytes -- | Generic options for @less@....
massysett/penny
penny/lib/Penny/Unix.hs
bsd-3-clause
982
0
11
148
204
112
92
21
1
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.Raw.EXT.TextureArray -- Copyright : (c) Sven Panne 2015 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portable --...
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/EXT/TextureArray.hs
bsd-3-clause
1,032
0
4
112
73
56
17
13
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. An additional grant -- of patent rights can be found in the PATENTS file in the same directory. module Duckling.T...
rfranek/duckling
tests/Duckling/Temperature/EN/Tests.hs
bsd-3-clause
614
0
9
98
80
51
29
11
1
module Main where import Network.Mail.Postie import Pipes.ByteString (stdout) settings :: Settings settings = def { settingsOnOpen = \sid _ -> putStrLn $ show sid ++ " session opened", settingsOnClose = \sid -> putStrLn $ show sid ++ " session closed", settingsOnMailFrom = \sid addr -> do pu...
alexbiehl/postie
examples/Simple.hs
bsd-3-clause
777
0
13
218
255
130
125
21
1
{-# LANGUAGE ScopedTypeVariables #-} -- example of the Workflow package . -- This demo shows inter-workflow communications. -- two workflows that interact by inspecting its other's state. One ask the user for a numbers. -- When the total number of tries -- is exhausted, update Data with termination and ends. ---It ca...
agocorona/Workflow
Demos/inspect.hs
bsd-3-clause
3,289
0
20
1,035
511
249
262
51
4
module Data.ASN1.Stream ( ASN1(..) , ASN1Repr , ASN1ConstructionType(..) , getConstructedEnd , getConstructedEndRepr ) where import Data.ASN1.Raw import Data.ByteString (ByteString) import qualified Data.ByteString.Lazy as L data ASN1ConstructionType = Sequence | Set | Container ASN1Class ASN1Tag deriving...
piyush-kurur/hs-asn1-data
Data/ASN1/Stream.hs
bsd-3-clause
2,275
12
13
509
979
556
423
60
7
import Criterion.Main import qualified VForth.LocationBench as LocationBench import qualified VForth.TextBench as TextBench main :: IO () main = defaultMain [ bgroup "Location" LocationBench.benchmarks , bgroup "Combine" TextBench.combineBenchmarks , bgroup "Length of Combine" TextBench.lengthCombineBenchmark...
budgefeeney/ventureforth
chap4/bench/Bench.hs
bsd-3-clause
326
0
8
46
70
39
31
8
1
module Handler.EntrySpec (spec) where import TestImport spec :: Spec spec = withApp $ do describe "getEntryR" $ do error "Spec not implemented: getEntryR" describe "postEntryR" $ do error "Spec not implemented: postEntryR"
sulami/hGM
test/Handler/EntrySpec.hs
bsd-3-clause
263
0
11
72
60
29
31
8
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Graph where import Control.Category (Category, (<<<)) import qualified Control.Category as Cat (id, (.)) import Control.DeepSeq (NFData, rnf) import Data.Array (Array, array, bou...
BlairArchibald/bones
apps/maxclique/src/Graph.hs
bsd-3-clause
8,968
0
13
2,250
2,195
1,203
992
121
3
module Section_2_5_2 where import Numeric.LinearAlgebra import Section_2_3_3 (and', nand, or') xor :: Double -> Double -> Double xor x1 x2 = let s1 = nand x1 x2 s2 = or' x1 x2 y = and' s1 s2 in y
lotz84/deep-learning-from-scratch
src/Section_2_5_2.hs
bsd-3-clause
216
0
9
59
82
44
38
9
1
-- (c) The University of Glasgow 2006 {-# LANGUAGE CPP #-} -- | Highly random utility functions -- module Util ( -- * Flags dependent on the compiler build ghciSupported, debugIsOn, ncgDebugIsOn, ghciTablesNextToCode, isWindowsHost, isDarwinHost, -- * General list processing ...
gridaphobe/ghc
compiler/utils/Util.hs
bsd-3-clause
40,443
0
19
12,215
10,482
5,736
4,746
599
7
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PackageImports #-} {-# LANGUAGE UnicodeSyntax #-} {-| [@ISO639-1@] sv [@ISO639-2B@] swe [@ISO639-3@] swe [@Native name@] svenska [@English name@] Swedish -} modul...
telser/numerals
src/Text/Numeral/Language/SWE.hs
bsd-3-clause
8,327
36
19
3,220
2,536
1,383
1,153
161
8
{-#LANGUAGE MultiParamTypeClasses #-} {-#LANGUAGE OverloadedStrings #-} module Twilio.Transcriptions ( -- * Resource Transcriptions(..) , Twilio.Transcriptions.get ) where import Control.Applicative import Control.Monad.Catch import Data.Aeson import Data.Maybe import Control.Monad.Twilio import Twilio.Int...
seagreen/twilio-haskell
src/Twilio/Transcriptions.hs
bsd-3-clause
1,059
0
9
145
210
123
87
30
1
{-# LANGUAGE TupleSections #-} module Haskell99Pointfree.P26 ( ) where import Control.Lens import Data.Maybe (fromJust) import Control.Monad.Extra (ifM) import Control.Monad (ap, join, replicateM) import Data.List.Extra (nubOn , uncons) import Data.Bool (bool) import Control.Applicative (liftA2) import Data.Li...
SvenWille/Haskell99Pointfree
src/Haskell99Pointfree/P26.hs
bsd-3-clause
1,245
2
22
286
628
349
279
18
1
-- | Lattice for type inference. module Language.Python.TypeInference.Analysis.MapLattice ( L, showL ) where import Data.List (intercalate) import Data.Map (Map) import Language.Analysis.DFA.Lattice import Language.Python.TypeInference.Analysis.TypeLattice import Language.Python.TypeInference.CFG.CFG import La...
lfritz/python-type-inference
python-type-inference/src/Language/Python/TypeInference/Analysis/MapLattice.hs
bsd-3-clause
871
0
10
175
220
128
92
17
1
{-# LANGUAGE OverloadedStrings #-} module MorteModules where import Morte.Core import Morte.Parser import Data.Text.Lazy data Module = ModuleVar Var | Binding Binding | Project Module Var | ModuleLam Var Signature Module | ModuleApp Module Module | Sealing Var Signature data Binding = Va...
phischu/morte-modules
src/MorteModules.hs
bsd-3-clause
995
0
13
235
357
203
154
32
1