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 BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE UndecidableInstances #-}
#if __GLASGOW_HASKELL__ >= 800
-- a) THQ works on cross-compilers and unregisterised GHCs
-- b) may make compilation faster as no... | tolysz/prepare-ghcjs | spec-lts8/aeson/Data/Aeson/TH.hs | bsd-3-clause | 97,103 | 4 | 28 | 30,176 | 18,108 | 9,669 | 8,439 | -1 | -1 |
-- Nasty hack, demonstatrates how to use HaskellDB's internals to
-- access non-standard database features.
import Database.HaskellDB
import Database.HaskellDB.DBLayout
import Database.HaskellDB.Database
import Database.HaskellDB.Query
import Database.HaskellDB.PrimQuery
import Database.HaskellDB.Sql hiding (tables)
... | m4dc4p/haskelldb | test/old/current-time.hs | bsd-3-clause | 883 | 0 | 9 | 154 | 241 | 126 | 115 | 24 | 1 |
--------------------------------------------------------------------
-- |
-- Module : Text.Atom.Pub
-- Copyright : (c) Galois, Inc. 2008
-- License : BSD3
--
-- Maintainer: Sigbjorn Finne <sof@galois.com>
-- Stability : provisional
-- Portability:
--
-- Types for the Atom Publishing Protocol (APP)
--
-------------... | GaloisInc/feed | Text/Atom/Pub.hs | bsd-3-clause | 1,138 | 0 | 10 | 225 | 213 | 139 | 74 | 24 | 0 |
{-# LANGUAGE PolyKinds, DataKinds, MagicHash, ScopedTypeVariables, MultiParamTypeClasses #-}
module Eta.Interop (SObject(..)) where
import Data.Proxy
import GHC.Base
import GHC.TypeLits
data {-# CLASS "java.lang.Object" #-} SObject (s :: Symbol) = SObject (Object# (SObject s))
instance (KnownSymbol s) => Class (SObj... | rahulmutt/ghcvm | libraries/base/Eta/Interop.hs | bsd-3-clause | 559 | 0 | 10 | 99 | 186 | 101 | 85 | 14 | 0 |
-- |
-- Module : Data.ASN1.BinaryEncoding
-- License : BSD-style
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
-- Stability : experimental
-- Portability : unknown
--
-- A module containing ASN1 BER and DER specification encoding/decoding.
--
{-# LANGUAGE EmptyDataDecls #-}
module Data.ASN1.BinaryEnco... | mboes/hs-asn1 | data/Data/ASN1/BinaryEncoding.hs | bsd-3-clause | 4,064 | 0 | 16 | 1,184 | 1,375 | 723 | 652 | 70 | 8 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-missing-fields #-}
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-------------------... | getyourguide/fbthrift | thrift/compiler/test/fixtures/qualified/gen-hs/Module1_Consts.hs | apache-2.0 | 2,426 | 0 | 8 | 424 | 488 | 343 | 145 | 43 | 1 |
module Distribution.Client.Dependency.Modular.IndexConversion (
convPIs
-- * TODO: The following don't actually seem to be used anywhere?
, convIPI
, convSPI
, convPI
) where
import Data.List as L
import Data.Map as M
import Data.Maybe
import Prelude hiding (pi)
import qualified Distribution.Client.Pa... | trskop/cabal | cabal-install/Distribution/Client/Dependency/Modular/IndexConversion.hs | bsd-3-clause | 10,637 | 0 | 20 | 2,556 | 2,771 | 1,457 | 1,314 | 134 | 9 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Maybe
-- Copyright : (c) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : lib... | ezyang/ghc | libraries/base/Data/Maybe.hs | bsd-3-clause | 7,435 | 0 | 10 | 1,555 | 785 | 522 | 263 | 57 | 2 |
module When (foo, fooOk) where
{-@ assume div :: x:_ -> y:{_ | y /= 0} -> _ @-}
{- when :: b:Bool -> {v:_ | ???} -> _ -}
when b x = if b then x else return ()
foo :: Int -> IO ()
foo x = when (x > 0) $ print (1 `div` x)
{-@ whenT :: b:_ -> ({v:_ | Prop b} -> _) -> _ @-}
whenT :: Bool -> (() -> IO ()) -> IO ()
when... | abakst/liquidhaskell | tests/todo/When.hs | bsd-3-clause | 432 | 0 | 10 | 122 | 201 | 107 | 94 | 8 | 2 |
-- |
-- Module : Data.Vector.Storable.Internal
-- Copyright : (c) Roman Leshchinskiy 2009-2010
-- License : BSD-style
--
-- Maintainer : Roman Leshchinskiy <rl@cse.unsw.edu.au>
-- Stability : experimental
-- Portability : non-portable
--
-- Ugly internal utility functions for implementing 'Storable'-base... | mightymoose/liquidhaskell | benchmarks/vector-0.10.0.1/Data/Vector/Storable/Internal.hs | bsd-3-clause | 1,386 | 0 | 8 | 285 | 277 | 157 | 120 | 19 | 1 |
import Test.Cabal.Prelude
-- Test if detailed-0.9 builds correctly and runs
-- when linked dynamically
-- See https://github.com/haskell/cabal/issues/4270
main = setupAndCabalTest $ do
skipUnless =<< hasSharedLibraries
skipUnless =<< hasCabalShared
skipUnless =<< hasCabalForGhc
setup_build ["--enable-tests", "-... | mydaum/cabal | cabal-testsuite/PackageTests/Regression/T4270/setup.test.hs | bsd-3-clause | 367 | 0 | 9 | 47 | 62 | 31 | 31 | 7 | 1 |
import P
main = putStrLn p
| ezyang/ghc | testsuite/tests/cabal/cabal08/Main.hs | bsd-3-clause | 27 | 0 | 5 | 6 | 12 | 6 | 6 | 2 | 1 |
module Rebase.Control.Monad.Writer.Strict
(
module Control.Monad.Writer.Strict
)
where
import Control.Monad.Writer.Strict
| nikita-volkov/rebase | library/Rebase/Control/Monad/Writer/Strict.hs | mit | 125 | 0 | 5 | 12 | 26 | 19 | 7 | 4 | 0 |
module HAD.Y2014.M02.D24.Exercise where
import Data.List
-- | Filter a list, keeping an element only if it is equal to the next one.
--
-- Examples:
-- >>> filterByPair []
-- []
-- >>> filterByPair [1 .. 10]
-- []
-- >>> filterByPair [1, 2, 2, 2, 3, 3, 4]
-- [2,2,3]
filterByPair :: Eq a => [a] -> [a]
filterByPair = ... | smwhr/1HAD | exercises/HAD/Y2014/M02/D24/Exercise.hs | mit | 337 | 0 | 7 | 66 | 56 | 38 | 18 | 4 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-customerrorresponse.html
module Stratosphere.ResourceProperties.CloudFrontDistributio... | frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/CloudFrontDistributionCustomErrorResponse.hs | mit | 3,963 | 0 | 13 | 309 | 448 | 254 | 194 | 38 | 1 |
pyths :: Int -> [(Int, Int, Int)]
pyths n = [(x, y, z) | x <- ns, y <- ns, z <- ns, x^2 + y^2 == z^2]
where ns = [1..n]
main = do
print $ pyths 10
| fabioyamate/programming-in-haskell | ch05/ex03.hs | mit | 156 | 0 | 11 | 48 | 117 | 63 | 54 | 5 | 1 |
{-|
Module: Y2015
Description: Advent of Code Day Solutions.
License: MIT
Maintainer: @tylerjl
Solutions to the set of problems for <adventofcode.com>.
Each day is broken up into an individual module with accompaying spec tests
and (possibly?) benchmarks.
Each day's module exports are re-exported here for c... | tylerjl/adventofcode | src/Y2015.hs | mit | 970 | 0 | 4 | 175 | 193 | 138 | 55 | 27 | 0 |
module Network.BitFunctor.Account.Tests where
import Network.BitFunctor.Account
import Network.BitFunctor.Account.Arbitrary()
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.HUnit (testCase)
import Test.Tasty.QuickCheck (testProperty)
import Test.HUnit (Assertion, (@?=))
tests :: TestTree
tests = testGrou... | BitFunctor/bitfunctor | test/src/Network/BitFunctor/Account/Tests.hs | mit | 1,082 | 0 | 9 | 107 | 215 | 120 | 95 | 18 | 1 |
-- Author: G4BB3R
-- Performance: 7643.2s (How to improve ?)
primes :: [Int]
primes = sieve [2..]
where sieve :: [Int] -> [Int] ;
sieve (p:xs) = p : sieve [x | x <- xs, x `rem` p /= 0] ;
sieve [] = []
main :: IO ()
main = print $ sum $ takeWhile (< 2000000) primes | DestructHub/ProjectEuler | Problem010/Haskell/solution_slow_1.hs | mit | 276 | 3 | 10 | 70 | 135 | 74 | 61 | 7 | 2 |
-- Much of the code in this file is adapted from
-- the ML version at here: http://www.cs.princeton.edu/~appel/modern/ml/chap8/canon.sml
module TigerCanon
(
linearize
, basicblocks
, tracesched
, canonicalize
)
where
import qualified TigerTemp as Tmp
import TigerITree
import TigerGenSymLabTmp
import q... | hengchu/tiger-haskell | src/tigercanon.hs | mit | 7,295 | 0 | 24 | 2,493 | 3,414 | 1,773 | 1,641 | 181 | 20 |
-- ------------------------------------------------------------
module Holumbus.Crawler.RobotTypes
where
import Control.DeepSeq
import Data.Binary (Binary)
import qualified Data.Binary as B
import Data.Char
import qualified Data.Map.Strict as M
import ... | ichistmeinname/holumbus | src/Holumbus/Crawler/RobotTypes.hs | mit | 3,693 | 0 | 18 | 1,507 | 567 | 312 | 255 | 64 | 2 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DeriveDataTypeable #-}
module NFA.AI where
import Autolib.NFA.Example
import Autolib.NFA.Type (NFA)
import Autolib.Set
import Autolib.ToDoc
import Autolib.Reader
import Data.Typeable
data AI = AI { name :: String -- abkürzung
, automat :: NFA Char Int
}
... | marcellussiegburg/autotool | collection/src/NFA/AI.hs | gpl-2.0 | 625 | 18 | 10 | 133 | 176 | 103 | 73 | 20 | 1 |
-- Copyright (c) 2015 Nicola Bonelli <nicola@pfq.io>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This p... | pandaychen/PFQ | user/pfq-load/pfq-load.hs | gpl-2.0 | 11,952 | 0 | 23 | 3,148 | 3,478 | 1,807 | 1,671 | 240 | 3 |
{-# LANGUAGE
RecordWildCards
, BangPatterns
, TypeSynonymInstances
, FlexibleContexts
#-}
module VirMat.Core.Packer
( runPacker
, runPacker2D
, setForce
, setDisp
) where
import Data.List (foldl')
import Data.IntMap (IntMap)
import Data.IntSet (IntSet)
import Data.Vector (Vector, (!))
import Line... | lostbean/VirMat | src/VirMat/Core/Packer.hs | gpl-3.0 | 6,418 | 0 | 23 | 1,995 | 2,940 | 1,537 | 1,403 | 156 | 2 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE TemplateHaskell #-}
-----------------------------------------------------------------------------
-- |
-- Module : Text.BlogLiterately.Options
-- Copyright : (c) 2008-2010 Robert Greayer, 2012 Brent Yorgey
-- License : GPL (see LICENSE)
-- Maintainer :... | byorgey/BlogLiterately | src/Text/BlogLiterately/Options.hs | gpl-3.0 | 13,763 | 0 | 14 | 4,939 | 2,625 | 1,418 | 1,207 | 301 | 1 |
{-# LANGUAGE QuasiQuotes, OverloadedStrings #-}
module ProceduralSpec (spec) where
import Test.Hspec
import Language.Mulang.Parsers.JavaScript
import Language.Mulang.Identifier
import Language.Mulang.Ast
import Language.Mulang.Inspector.Literal
import Langua... | mumuki/mulang | spec/ProceduralSpec.hs | gpl-3.0 | 4,313 | 0 | 26 | 1,195 | 1,054 | 498 | 556 | 79 | 1 |
module Handler.ProgramChairSpec (spec) where
import TestImport
spec :: Spec
spec = withApp $ do
describe "getProgramChairR" $ do
error "Spec not implemented: getProgramChairR"
describe "postProgramChairR" $ do
error "Spec not implemented: postProgramChairR"
| ackao/APRICoT | web/conference-management-system/test/Handler/ProgramChairSpec.hs | gpl-3.0 | 288 | 0 | 11 | 62 | 60 | 29 | 31 | 8 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-|
Module : System.Console.SneakyTerm.Tile
Maintainer : pmidden@secure.mailbox.org
-}
module System.Console.SneakyTerm.Tile where
import ClassyPrelude
import Control.Lens (makeLenses)
import System.Console.SneakyTerm.ColorPair
import ... | pmiddend/sneakyterm | src/System/Console/SneakyTerm/Tile.hs | gpl-3.0 | 641 | 0 | 9 | 140 | 97 | 60 | 37 | 16 | 0 |
import Numeric.Natural
collatz :: Natural -> [Natural]
collatz 1 = [1]
collatz x
| even x = x : collatz (x `div` 2)
| odd x = x : collatz (x * 3 + 1)
formatCollatz :: Natural -> IO ()
formatCollatz x = putStrLn (show x ++ ": " ++ (show . length . collatz) x)
main :: IO ()
main = mapM_ formatCollatz [1..]
| zeroxfourc/ludvigit | src/collatzall.hs | gpl-3.0 | 311 | 0 | 11 | 71 | 168 | 84 | 84 | 10 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-cloudshell/gen/Network/Google/Resource/CloudShell/Operations/Get.hs | mpl-2.0 | 4,468 | 0 | 15 | 1,040 | 698 | 409 | 289 | 98 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-logging/gen/Network/Google/Resource/Logging/Folders/Logs/Delete.hs | mpl-2.0 | 5,451 | 0 | 15 | 1,162 | 713 | 423 | 290 | 102 | 1 |
module Graphics.Blobs.Shape
(
Shape(..)
, ShapeStyle(..)
, circle
, logicalDraw
, logicalLineSegments
) where
import Graphics.Blobs.CommonIO
import qualified Graphics.UI.WX as WX
import Graphics.UI.WXCore hiding (Colour)
--import Graphics.UI.WXCore.Draw
import Graphic... | alanz/Blobs | src/Graphics/Blobs/Shape.hs | lgpl-2.1 | 10,268 | 4 | 17 | 3,648 | 2,197 | 1,164 | 1,033 | 146 | 4 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Kubernetes.V1.PersistentVolumeAccessMode where
import GHC.Generics
import qualified Data.Aeson
-- |
data PersistentVolumeAccessMode = Persist... | minhdoboi/deprecated-openshift-haskell-api | kubernetes/lib/Kubernetes/V1/PersistentVolumeAccessMode.hs | apache-2.0 | 493 | 1 | 6 | 60 | 69 | 42 | 27 | 12 | 0 |
module CostasLikeArrays.A320576Spec (main, spec) where
import Test.Hspec
import CostasLikeArrays.A320576 (a320576)
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "A320576" $
it "correctly computes the first 6 elements" $
map a320576 [1..6] `shouldBe` expectedValue where
expectedValue = [1, 1... | peterokagey/haskellOEIS | test/CostasLikeArrays/A320576Spec.hs | apache-2.0 | 335 | 0 | 8 | 62 | 112 | 64 | 48 | 10 | 1 |
-- This file is part of "Loopless Functional Algorithms".
-- Copyright (c) 2005 Jamie Snape, Oxford University Computing Laboratory.
--
-- 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
--
-- ... | snape/LooplessFunctionalAlgorithms | LooplessKoda.hs | apache-2.0 | 1,644 | 0 | 10 | 422 | 444 | 246 | 198 | 21 | 2 |
module Levels where
import Control.Arrow((***))
import Physics.Motion
import Constants
--import Resources
initialLevel :: Int
initialLevel = 0
numLevels :: Int
numLevels = length levels
data LevelSpec = LevelSpec
{ horizontalWallPos :: [Position]
, verticalWallPos :: [Position]
, positiveInfo :: [(Position,... | no-moree-ria10/utsuEater | src/Levels.hs | apache-2.0 | 1,174 | 0 | 10 | 335 | 390 | 228 | 162 | 32 | 1 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QCheckBox_h.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:22
Warning : this file is machine generated - do n... | keera-studios/hsQt | Qtc/Gui/QCheckBox_h.hs | bsd-2-clause | 56,487 | 0 | 18 | 12,271 | 18,825 | 9,082 | 9,743 | -1 | -1 |
-- PaperReaders.hs
--
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, TemplateHaskell #-}
module Parser.PaperReader (
parseHtml
, readerFromUrl
, readersFromUrl
, readerFromHtml
, readersFromHtml
, readersFromHtmlDoc
) where
import Parser.Import
import Control.Applicative
import Control.Lens hiding... | hirokai/PaperServer | Parser/PaperReader.hs | bsd-2-clause | 4,270 | 0 | 15 | 802 | 1,171 | 646 | 525 | 92 | 2 |
-- vim: sw=2: ts=2: set expandtab:
{-# LANGUAGE TemplateHaskell,
ScopedTypeVariables,
FlexibleInstances,
MultiParamTypeClasses,
FlexibleContexts,
UndecidableInstances,
OverloadedStrings,
CPP #-}
----------------------------------... | kyagrd/mininax | src/Syntax.hs | bsd-2-clause | 2,651 | 0 | 11 | 774 | 675 | 385 | 290 | 64 | 1 |
{-# LANGUAGE LambdaCase, TupleSections, ViewPatterns #-}
module Transformations.Optimising.ConstantFolding where
import Text.Printf
import Transformations.Util
import Data.Functor.Foldable
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import Grin.Grin
{-
HINT:
Constant folding is not part o... | andorp/grin | grin/src/Transformations/Optimising/ConstantFolding.hs | bsd-3-clause | 1,514 | 0 | 15 | 337 | 445 | 243 | 202 | 23 | 5 |
{-| This module contains some useful utilities copy-and-pasted from the @lens@
library to avoid a dependency which are used internally and also re-exported
for convenience
-}
module Dhall.Optics
( Optic
, Optic'
-- * Utilities
, rewriteOf
, transformOf
, rewriteMOf
, transformMOf... | Gabriel439/Haskell-Dhall-Library | dhall/src/Dhall/Optics.hs | bsd-3-clause | 2,728 | 0 | 13 | 595 | 802 | 435 | 367 | 50 | 1 |
import Control.Concurrent.Chan (Chan, readChan, writeChan)
import Control.Monad
import Control.ThreadPool (threadPoolIO)
import Data.List
import System.Directory
import System.Environment
import Text.HandsomeSoup
import Text.XML.HXT.Core
main = do
galleries <- parseTopPage
runPool 5 $ map printImageUrlsIfNotDownlo... | masaedw/scdownloader | scdownloader.hs | bsd-3-clause | 1,285 | 0 | 13 | 210 | 422 | 210 | 212 | 34 | 1 |
module BottomUpMergeSort where
import Control.Monad.Writer
import Data.Foldable (foldlM)
type Less a = a -> a -> Bool
data Sortable a = Sortable { _less :: Less a
, _size :: Int
, _segments :: [[a]] }
instance Show a => Show (Sortable a) where
show (Sortabl... | k-bx/bottom-up-merge-sort | src/BottomUpMergeSort.hs | bsd-3-clause | 1,843 | 0 | 13 | 644 | 793 | 410 | 383 | 48 | 4 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE UndecidableInstances #-}
------------------------------------------------------... | achirkin/easytensor | easytensor/src/Numeric/ProductOrd.hs | bsd-3-clause | 4,245 | 0 | 14 | 1,161 | 1,674 | 915 | 759 | 91 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Numeric.LinearAlgebra.Vector.Statistics
-- Copyright : Copyright (c) 2010, Patrick Perry <patperry@gmail.com>
-- License : BSD3
-- Maintainer : Patrick Perry <patperry@gmail.com>
-- Stability : experimental
--
-- Bas... | patperry/hs-linear-algebra | lib/Numeric/LinearAlgebra/Vector/Statistics.hs | bsd-3-clause | 3,675 | 0 | 17 | 1,154 | 1,061 | 534 | 527 | 76 | 2 |
{-# LANGUAGE FlexibleInstances, MonadComprehensions, MultiParamTypeClasses,
TupleSections, TypeFamilies #-}
{- |
Module : Data.Keyless.Map.Lazy
Description : Lazy Map-based lookup tables.
Copyright : (c) Ivan Lazar Miljenovic
License : 3-Clause BSD-style
Maintainer : Ivan.Miljen... | ivan-m/keyless-entry | Data/Keyless/Map/Lazy.hs | bsd-3-clause | 5,544 | 0 | 12 | 1,468 | 1,730 | 929 | 801 | 137 | 1 |
module Main
( main -- :: IO ()
) where
import Criterion.Main (bgroup, defaultMain)
-- Import our benchmark suites
import qualified Mini as Mini
import qualified Macro as Macro
import qualified Micro as Micro
import qualified Instances as Inst
import Utils (prepBenchmarkFi... | arianvp/binary-serialise-cbor | bench/Main.hs | bsd-3-clause | 597 | 0 | 9 | 148 | 119 | 73 | 46 | 14 | 1 |
module Y21.D02 where
import Imports
import Util
data Op = Down | Up | Forward deriving Show
data Command = Command { op :: Op, value :: Int } deriving Show
data PosDepth = PosDepth { pos, depth :: Int } deriving Show
data PosDepthAim = PosDepthAim { p... | oshyshko/adventofcode | src/Y21/D02.hs | bsd-3-clause | 1,425 | 0 | 14 | 494 | 543 | 300 | 243 | 36 | 3 |
-- | Internal module.
module Network.Hawk.Internal.Client.HeaderParser
( parseWwwAuthenticateHeader
, parseServerAuthorizationHeader
, WwwAuthenticateHeader(..)
, ServerAuthorizationHeader(..)
) where
import Data.ByteString (ByteString)
import Data.Time.Clock.POSIX (POSIXTime)
import Network.Hawk.Types
... | rvl/hsoz | src/Network/Hawk/Internal/Client/HeaderParser.hs | bsd-3-clause | 1,378 | 0 | 15 | 213 | 362 | 187 | 175 | 31 | 2 |
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE TypeApplications #-}
module Builder (builder) where
import Criterion.Main
import qualified Data.ByteString as BS
import qualified Data.ByteString.Builder as BB
import qualified Data.B... | winterland1989/stdio | bench/Builder.hs | bsd-3-clause | 3,855 | 0 | 16 | 645 | 1,247 | 650 | 597 | 66 | 1 |
-- | Get time zones.
module Data.Time.Zone where
import Data.Time.Format
import Data.Time.LocalTime
import System.Locale
-- | Get the time zone by name.
getZone :: String -> Maybe TimeZone
getZone zone =
case parseTime defaultTimeLocale "%F%T%Z" ("2000-01-0100:00:00" ++ zone) of
Just (ZonedTime _ timeZone) -> ... | chrisdone/chrisdone-xmonad | src/Data/Time/Zone.hs | bsd-3-clause | 357 | 0 | 10 | 68 | 90 | 49 | 41 | 10 | 2 |
{-# LANGUAGE GADTs #-}
import Prelude hiding (True, False)
data T where
True :: T
False :: T
If :: T -> T -> T -> T
O :: T
Succ :: T -> T
Pred :: T -> T
IsO :: T -> T
data V where
O :: V
Succ :: V -> V
data Eval where
ESucc :: (a -> b) -> T a -> T b
EPred ::
eval :: T -> T
eval (Succ t) = Su... | utky/lambda-cute | src/Language/Arith/Syntax.hs | bsd-3-clause | 326 | 1 | 8 | 111 | 156 | 87 | 69 | -1 | -1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Data.HashPSQ.Internal
( -- * Type
Bucke... | bttr/psqueues | src/Data/HashPSQ/Internal.hs | bsd-3-clause | 19,205 | 0 | 21 | 5,541 | 5,720 | 3,074 | 2,646 | 302 | 5 |
{-# LANGUAGE OverloadedStrings #-}
{-|
Module : Jobutil
Description : Helper functions for Jobpack module
-}
module Jobutil
where
import Data.List
import Reader (split_scheme_loc, http_reader)
import Data.Aeson
import Data.Maybe (fromJust)
import Control.Applicative ((<$>), (<*>), empty)
import Control.Monad... | zuzia/haskell_worker | src/Jobutil.hs | bsd-3-clause | 2,077 | 0 | 12 | 468 | 562 | 308 | 254 | 47 | 2 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE PatternGuards #-}
module Game
(
-- Initial position using default board representation and its type.
initialPosition
, GamePosition
-- Initial position (polymorphic).
, position0
-- Applying moves (one and many) to a position.
, doMove
, doMoves
--... | sphynx/hamisado | Game.hs | bsd-3-clause | 4,252 | 0 | 17 | 1,089 | 1,552 | 812 | 740 | 100 | 3 |
{-| The meat of the master node: Calls @gipeda@ and optionally deploys the
website via @rsync@.
Upon deployment, repositories are mapped to URLs via specific policies
verified in @sshSubPathTestFailures@.
-}
module FeedGipeda.Master.Finalize
( regenerateAndDeploy
) where
import Control.Log... | sgraf812/feed-gipeda | src/FeedGipeda/Master/Finalize.hs | bsd-3-clause | 6,992 | 0 | 15 | 1,730 | 1,548 | 829 | 719 | 127 | 2 |
-- |
-- Module : Language.SequentCore.Arity
-- Description : Arity analysis and eta-expansion
-- Maintainer : maurerl@cs.uoregon.edu
-- Stability : experimental
--
-- Arity and eta expansion
{-
%
% (c) The University of Glasgow 2006
% (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
%
Arity ... | lukemaurer/sequent-core | src/Language/SequentCore/Arity.hs | bsd-3-clause | 35,513 | 0 | 14 | 10,619 | 4,630 | 2,365 | 2,265 | 295 | 16 |
module Network.TeleHash.Hn
(
hn_fromjson
, hn_frompacket
, hn_getparts
, hn_path
, hn_get
, hn_address
) where
import Control.Exception
import Control.Monad
import Control.Monad.State
import Data.List
import Data.Maybe
import Prelude hiding (id, (.), head, either)
import System.Time
import Network.T... | alanz/htelehash | src/Network/TeleHash/Hn.hs | bsd-3-clause | 12,134 | 8 | 63 | 3,905 | 1,959 | 948 | 1,011 | 166 | 13 |
{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-|
Hoon's `map` and `set` types and conversions to/from Nouns.
-}
module Urbit.Noun.Tree
( HoonSet, setToHoonSet, setFromHoonSet
, HoonMap, mapToHoonMap, mapFromHoonMap
, mug
) where
import ClassyPrelude
import Co... | jfranklin9000/urbit | pkg/hs/urbit-king/lib/Urbit/Noun/Tree.hs | mit | 6,880 | 0 | 17 | 2,183 | 2,998 | 1,518 | 1,480 | -1 | -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-ec2/gen/Network/AWS/EC2/DescribeVPNGateways.hs | mpl-2.0 | 6,785 | 0 | 15 | 1,419 | 805 | 491 | 314 | 91 | 1 |
-- Contains HalfsState, the "global" data structure for tracking
-- filesystem state.
module Halfs.HalfsState
(
HalfsState(..)
)
where
import Data.Map as M
import Data.Word
import Halfs.BlockMap (BlockMap)
import Halfs.Errors (HalfsError)
import Halfs.Monad (HalfsT)
im... | hackern/halfs | Halfs/HalfsState.hs | bsd-3-clause | 1,929 | 0 | 13 | 535 | 407 | 244 | 163 | 27 | 0 |
module Web.Heroku.Postgres (
dbConnParams
, parseDatabaseUrl
) where
import Data.Text
import Web.Heroku.Internal (dbConnParams', parseDatabaseUrl')
dbConnParams :: IO [(Text, Text)]
dbConnParams = dbConnParams' "DATABASE_URL" parseDatabaseUrl
parseDatabaseUrl :: String -> [(Text, Text)]
parseDatabaseUrl = ... | thoughtbot/haskell-heroku | Web/Heroku/Postgres.hs | bsd-3-clause | 350 | 0 | 7 | 47 | 87 | 52 | 35 | 9 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | romanb/amazonka | amazonka-s3/gen/Network/AWS/S3/DeleteBucketTagging.hs | mpl-2.0 | 3,016 | 0 | 9 | 646 | 362 | 218 | 144 | 49 | 1 |
module Foreign.JavaScript.Internal.Utils
( synchronously
, freeRequestAnimationFrameCallback
, js_dataView
) where
import GHCJS.DOM.Types (Callback (..), JSM, JSVal, RequestAnimationFrameCallback (..))
import Language.Javascript.JSaddle.Object (freeFunction, jsg, new)
synchronously :: JSM a -> JSM a
synchrono... | reflex-frp/reflex-dom | reflex-dom-core/src-ghc/Foreign/JavaScript/Internal/Utils.hs | bsd-3-clause | 618 | 0 | 9 | 79 | 174 | 99 | 75 | 12 | 1 |
module Distribution.Simple.Test.ExeV10
( runTest
) where
import Distribution.Compat.CreatePipe ( createPipe )
import Distribution.Compat.Environment ( getEnvironment )
import qualified Distribution.PackageDescription as PD
import Distribution.Simple.Build.PathsModule ( pkgPathEnvVar )
import Distribution... | randen/cabal | Cabal/Distribution/Simple/Test/ExeV10.hs | bsd-3-clause | 6,900 | 0 | 19 | 1,954 | 1,482 | 783 | 699 | 119 | 4 |
{-# LANGUAGE TemplateHaskell, OverloadedStrings, QuasiQuotes #-}
{-# LANGUAGE CPP #-}
module Handler.Skills
( postAllSkillsR
, getAllSkillsR
, getSkillR
) where
import Import
import Handler.Admin (requireAdmin)
skillFormlet :: Form Skill
skillFormlet = renderTable $ Skill
<$> areq textField "Skill... | danse/haskellers | Handler/Skills.hs | bsd-2-clause | 2,736 | 0 | 20 | 899 | 903 | 448 | 455 | 69 | 2 |
--
-- Copyright (c) 2012 Citrix Systems, 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 your option) any later version.
--
-- This progra... | jean-edouard/manager | upgrade-db/Migrations/M_17.hs | gpl-2.0 | 1,145 | 0 | 8 | 240 | 90 | 61 | 29 | 9 | 1 |
-- | The function here exploit matches of arity 2 that split the uncovered set
-- in two. Too many for -fmax-pmcheck-models=0!
-- As a result, these functions elicit the symptoms describe in the warnings
-- message, e.g.
-- - False positives on exhaustivity
-- - Turns redundant into inaccessible clauses
-- - Fail... | sdiehl/ghc | testsuite/tests/pmcheck/should_compile/TooManyDeltas.hs | bsd-3-clause | 930 | 0 | 7 | 206 | 172 | 98 | 74 | 13 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveGeneric #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Solver.Types.PackageIndex
-- Copyright : (c) David Himmelstrup 2005,
-- Bjorn Bringert 2007,
-- ... | headprogrammingczar/cabal | cabal-install/Distribution/Solver/Types/PackageIndex.hs | bsd-3-clause | 10,255 | 0 | 13 | 2,289 | 2,256 | 1,230 | 1,026 | 152 | 4 |
{-# LANGUAGE ImpredicativeTypes #-}
module T12644 where
data T a = T1 Int
instance Show (T a) where
show (T1 x) = show x
t1 :: T a
t1 = T1 1
f :: String
f = show t1
| olsner/ghc | testsuite/tests/typecheck/should_compile/T12644.hs | bsd-3-clause | 172 | 0 | 8 | 46 | 75 | 40 | 35 | 9 | 1 |
module SafeRecomp01 where
f :: Int
f = 1
| ghc-android/ghc | testsuite/tests/safeHaskell/safeLanguage/SafeRecomp01.hs | bsd-3-clause | 43 | 0 | 4 | 11 | 14 | 9 | 5 | 3 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module IRTS.CodegenLua(codegenLua) where
import IRTS.CodegenCommon
import IRTS.Lang
import IRTS.Simplified
import Idris.Core.TT as TT
import Data.Bits
import qualified Data.List as DL
import Data.Maybe
import Data.Char
import Data.String(IsString, fromString)
import qualified Data... | melted/idris-lua | src/IRTS/CodegenLua.hs | isc | 12,063 | 0 | 18 | 2,909 | 6,377 | 3,287 | 3,090 | 275 | 5 |
module Main (main) where
import Control.Exception as E
import Text.Pandoc.JSON
import AsciiMath
main :: IO ()
main = E.catch (toJSONFilter asciimath) printAndExit
where asciimath (Math t s) = Math t (run s)
asciimath x = x
| Kerl13/AsciiMath | src/bin/Pandoc-AsciiMath.hs | mit | 236 | 0 | 9 | 49 | 90 | 49 | 41 | 8 | 2 |
{- CIS 194 HW 11
due Monday, 8 April
-}
module SExpr where
import AParser
import Control.Applicative
import Data.Char
------------------------------------------------------------
-- 1. Parsing repetitions
------------------------------------------------------------
zeroOrMore :: Parser a -> Parser [a]
zeroOrMor... | limdauto/learning-haskell | cis194/week10-11/SExpr.hs | mit | 1,620 | 0 | 11 | 286 | 318 | 176 | 142 | 24 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Nauva.Product.Template.App (app) where
import Nauva.App
import Nauva.View
import Language.Haskell.TH
import Language.Haskell.TH.Syntax
app :: App
app = App
{ rootElement = \appH -> constHead (... | wereHamster/nauva | product/template/shared/src/Nauva/Product/Template/App.hs | mit | 1,418 | 0 | 11 | 392 | 277 | 147 | 130 | 32 | 1 |
import Data.Array (Array, bounds, elems, listArray, (!))
import Data.List (intercalate)
import System.Random
data Point = Point Double Double
chaosGame :: RandomGen g => g -> Int -> Array Int (Double, (Point -> Point)) -> [Point]
chaosGame g n hutchinson = take n points
where
(x, g') = random g
(y, g'') = r... | leios/algorithm-archive | contents/barnsley/code/haskell/Barnsley.hs | mit | 1,302 | 0 | 15 | 348 | 614 | 336 | 278 | 29 | 1 |
module Proteome.Test.TagsTest where
import Hedgehog ((===))
import Path (Abs, Dir, File, Path, Rel, parseAbsDir, relfile, (</>))
import Path.IO (doesFileExist)
import Ribosome.Config.Setting (updateSetting)
import Ribosome.Test.Run (UnitTest)
import Ribosome.Test.Unit (tempDir)
import Proteome.Data.Env (Env)
import q... | tek/proteome | packages/test/test/Proteome/Test/TagsTest.hs | mit | 1,631 | 0 | 11 | 189 | 496 | 286 | 210 | -1 | -1 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module System.Process.ByteString where
import Control.Applicative ((<$>))
import Control.Monad
import Data.ByteString (ByteString)
import Data.ListLike.IO (hGetContents)
import Data.Word (Word8)
import Prelude hiding (null)
import System.Proc... | davidlazar/process-extras | src/System/Process/ByteString.hs | mit | 996 | 0 | 9 | 106 | 200 | 121 | 79 | 19 | 1 |
module Text.Mustache.Types
where
import Data.Text (Text)
data Chunk = Var KeyPath
| UnescapedVar KeyPath
| Section KeyPath [Chunk] (Maybe Text) -- separator text
| InvertedSection KeyPath [Chunk]
| SetDelimiter String String -- a stateful operation
| Plain Text
... | danchoi/mustache-haskell | Text/Mustache/Types.hs | mit | 480 | 0 | 8 | 143 | 136 | 80 | 56 | 13 | 0 |
module AssociateTypeSpec (spec) where
import Test.Hspec
import Dicom.Network.Associate.Types
import Data.Binary
buildTestAssociateRQ::AssociateRQPDU
buildTestAssociateRQ = AssociateRQPDU{
arqPDUHeader = PDUHeader A_ASSOCIATE_RQ 0 76
, arqReserved = 0
, arqProtocolVersion = 0
, calledAETitle ... | danplubell/dicom-network | test-suite/AssociateTypeSpec.hs | mit | 1,027 | 0 | 14 | 287 | 215 | 119 | 96 | 26 | 1 |
{-# LANGUAGE PatternSynonyms #-}
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.VTTRegionList
(item, item_, itemUnsafe, itemUnchecked, getRegionById,
getRegionById_, getRegionByIdUnsafe... | ghcjs/jsaddle-dom | src/JSDOM/Generated/VTTRegionList.hs | mit | 4,088 | 0 | 14 | 655 | 974 | 550 | 424 | -1 | -1 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.ErrorEvent
(js_getMessage, getMessage, js_getFilename, getFilename,
js_getLineno, getLineno, js_getColno, getColno, ErrorEvent,
castToErrorEvent, gTypeErrorEvent)
where
import Prelude... | manyoo/ghcjs-dom | ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/ErrorEvent.hs | mit | 2,420 | 24 | 10 | 326 | 588 | 351 | 237 | 38 | 1 |
--
-- Chapter 2, 2.1 Lists
--
module Stack where
import Prelude as P
-- According to the book, methods names in Stack type class use list
-- nomenclature (cons, head, tail) rather then stack ones (push, top, pop),
-- because it regards stacks as an instance of general class of sequences.
class Stack t where
empty ... | mkrauskopf/okasaki-pfds-haskell | src/mk/okasaki/chapter02/Stack.hs | mit | 2,943 | 0 | 20 | 761 | 952 | 496 | 456 | 56 | 1 |
{-|
Module : Control.Monad.Bayes.Traced.Static
Description : Distributions on execution traces of full programs
Copyright : (c) Adam Scibior, 2015-2020
License : MIT
Maintainer : leonhard.markert@tweag.io
Stability : experimental
Portability : GHC
-}
module Control.Monad.Bayes.Traced.Static (
Traced,
... | adscib/monad-bayes | src/Control/Monad/Bayes/Traced/Static.hs | mit | 2,248 | 0 | 12 | 486 | 929 | 472 | 457 | -1 | -1 |
module Irg.Lab3.Lab3 where
import Control.Monad (replicateM)
import Irg.Lab3.Callbacks
import Irg.Lab3.Initialize
import Irg.Lab3.Utility
import Irg.Lab3.Geometry
import Irg.Lab3.ParseFile
import System.Directory
import Linear
coords :: [Float]
coords = [150,250]
myDots :: [[Float]]
myDots = fmap (++ [1]) (replicat... | DominikDitoIvosevic/Uni | IRG/src/Irg/Lab3/Lab3.hs | mit | 1,265 | 0 | 11 | 218 | 426 | 230 | 196 | 31 | 2 |
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
module Gen.Literal
( hexGenLower
, hexGenMixedCase
, octalGen
, decimalGen
, floatGen
, runeGen
, rawStringGen
, interpStringGen
, identGen
, typeGen
) where
import Gen.Core
import Language.GoLite.Lexer.Literal ( commonEscapes, escapedChars )
im... | djeik/goto | test/Gen/Literal.hs | mit | 5,183 | 0 | 16 | 1,358 | 1,317 | 736 | 581 | 94 | 2 |
primo :: Int -> Int -> Bool
primo n 1 = True
primo n m = if (n `rem` m) == 0 then False else primo n (m-1)
main = do
n <- fmap read getLine
putStrLn $ show (primo n (n-1))
| folivetti/PI-UFABC | AULA_04/Haskell/Primo.hs | mit | 187 | 0 | 12 | 57 | 109 | 56 | 53 | 6 | 2 |
module Hage.Geometry.Types where
type Point = (Float, Float)
type Vector = (Float, Float)
type Circle = (Point, Float)
type Size = (Float, Float)
type Rect = (Point, Size)
data Clash = Horizontal | Vertical
deriving (Eq)
getWidth :: Size -> Float
getWidth = fst
getHeight :: Size -> Float
getHeight = snd
| Hinidu/Arkanoid | src/Hage/Geometry/Types.hs | mit | 317 | 0 | 6 | 64 | 112 | 71 | 41 | 12 | 1 |
-- | Implements Figure 8-1.
module Language.TaPL.TypedBoolean (eval, eval', parseString, parseFile, Term(..), typeOf) where
import Language.TaPL.TypedBoolean.Syntax (Term(..))
import Language.TaPL.TypedBoolean.Parser (parseString, parseFile)
import Language.TaPL.TypedBoolean.Eval (eval, eval')
import Language.TaPL.Typ... | zeckalpha/TaPL | src/Language/TaPL/TypedBoolean.hs | mit | 345 | 0 | 6 | 29 | 90 | 61 | 29 | 5 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module StreamMultiplexSpec (main, spec) where
import Test.Hspec
import Test.QuickCheck
import Test.QuickCheck.Monadic (PropertyM, assert, monadicIO, pick, pre, run)
import Data.Conduit as DC
import Data.Conduit.List as DC
import Prelude as P
import Control.Concurrent.Async
import Con... | danoctavian/bit-smuggler | BitSmuggler/test/unit/StreamMultiplexSpec.hs | gpl-2.0 | 5,007 | 0 | 23 | 1,010 | 1,419 | 733 | 686 | 112 | 1 |
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-}
-- | like Maybe, but Nothing is shown as question mark
module String_Matching.Option where
import Autolib.ToDoc
import Autolib.Reader
import Autolib.Set
import Data.Typeable
data Option a = Yes a | No
deriving ( Eq, Ord )
instance ToDoc a => ToDoc ( Opt... | Erdwolf/autotool-bonn | src/String_Matching/Option.hs | gpl-2.0 | 1,218 | 0 | 10 | 371 | 552 | 278 | 274 | 36 | 1 |
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
module Sql where
import Data.List (intercalate)
import DataModel
data Select = Select [SelectExpr] TableExpr (Maybe Expr)
-- , grouping :: GroupBy
-- , ordering :: OrderBy
-- , limi... | benanhalt/haskify | Sql.hs | gpl-2.0 | 6,251 | 0 | 13 | 1,796 | 1,844 | 951 | 893 | 141 | 2 |
{-# language FlexibleContexts, GeneralizedNewtypeDeriving, DeriveFunctor, DeriveGeneric #-}
{-# language OverloadedStrings #-}
{-# language MultiParamTypeClasses #-}
{-# language FlexibleInstances #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Iterative
... | ocramz/sparse-linear-algebra | src/Control/Iterative.hs | gpl-3.0 | 15,134 | 0 | 23 | 4,547 | 3,160 | 1,716 | 1,444 | 191 | 8 |
{-# LANGUAGE Arrows #-}
{-# LANGUAGE FlexibleContexts #-}
module SIR.Event where
import Data.Maybe
import Control.Monad.Random
import Control.Monad.Reader
import Control.Monad.Writer
import Control.Monad.Trans.MSF.Except
import Data.MonadicStreamFunction.InternalCore
import Data.MonadicStreamFunction
import... | thalerjonathan/phd | thesis/code/sir/src/SIR/Event.hs | gpl-3.0 | 11,119 | 3 | 17 | 3,154 | 3,087 | 1,595 | 1,492 | 235 | 5 |
-- | A simple logging service. Based on sub-section "MVar as a Simple Channel:
-- A Logging Service"
module Logger ( initLogger
, logMessage
, logStop
) where
import Control.Concurrent
-- The MVar here is used as a way to communicate with the logger service.
-- The... | capitanbatata/marlows-parconc-exercises | parconc-ch07/src/Logger.hs | gpl-3.0 | 835 | 0 | 8 | 197 | 89 | 55 | 34 | -1 | -1 |
{-|
Module : Css.Constants
Description : Defines the constants for the other CSS modules.
-}
module Css.Constants
(margin0,
padding0,
width100,
height100,
-- * Node and Rectangle Constants
fill,
stroke,
alignCenter,
wideStroke,
faded,
semiVisible,
... | christinem/courseography | app/Css/Constants.hs | gpl-3.0 | 11,290 | 0 | 9 | 2,427 | 1,648 | 985 | 663 | 266 | 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 | source/Game/Grid/GridWorld/Path.hs | gpl-3.0 | 4,634 | 0 | 12 | 1,583 | 742 | 448 | 294 | 112 | 2 |
{-# LANGUAGE DeriveFunctor, DeriveDataTypeable, TemplateHaskell #-}
module Lamdu.Data.Expression.Infer.ImplicitVariables
( add, Payload(..)
) where
import Control.Applicative ((<$>))
import Control.Lens.Operators
import Control.Monad (foldM)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.State ... | Mathnerd314/lamdu | src/Lamdu/Data/Expression/Infer/ImplicitVariables.hs | gpl-3.0 | 4,785 | 0 | 18 | 860 | 1,432 | 761 | 671 | -1 | -1 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE ViewPatterns #-}
module CSVReader
(
readData
) where
import Control.Lens
import Control.Monad
import Data.Maybe
import Data.List
import Text.CSV -- http://hackage.haskell.... | shnarazk/gradcondtools | CSVReader.hs | gpl-3.0 | 5,678 | 0 | 17 | 1,440 | 1,470 | 776 | 694 | 94 | 4 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasks/List.hs | mpl-2.0 | 8,980 | 0 | 28 | 2,483 | 1,540 | 884 | 656 | 208 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.