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 CPP #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TupleSections #-}
module URI.ByteString.Internal where
------------------... | Soostone/uri-bytestring | src/URI/ByteString/Internal.hs | bsd-3-clause | 40,268 | 0 | 16 | 7,340 | 6,513 | 3,480 | 3,033 | 454 | 4 |
{-# LANGUAGE TypeOperators, EmptyDataDecls,
MultiParamTypeClasses, FunctionalDependencies,
FlexibleContexts, FlexibleInstances, UndecidableInstances,
TypeFamilies, IncoherentInstances, OverlappingInstances #-}
module Data.Rope.Annotated.Unsafe
( -- * Annotated 'Rope's
... | ekmett/rope | Data/Rope/Annotated/Unsafe.hs | bsd-3-clause | 4,237 | 0 | 16 | 1,189 | 1,576 | 838 | 738 | -1 | -1 |
module Part2.Problem53 where
--
-- Problem 53: Combinatoric selections
--
-- There are exactly ten ways of selecting three from five, 12345:
--
-- 123, 124, 125, 134, 135, 145, 234, 235, 245, and 345
--
-- In combinatorics, we use the notation, 5 C 3 = 10.
--
-- In general,
--
-- n C r = n! / r!(n−r)!
--
-- where r ... | c0deaddict/project-euler | src/Part2/Problem53.hs | bsd-3-clause | 843 | 0 | 10 | 205 | 206 | 118 | 88 | 13 | 1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE TypeFamilies #-}
-- |
module Network.Libtorrent.Types.ArrayLike where
import Control.Monad (forM_)
import Foreign.C.Types (CSize)
import Prelude hiding (foldMap)
class ArrayLike a where
type ElemType a :: *
getElem :: a -> CSize -... | eryx67/haskell-libtorrent | src/Network/Libtorrent/Types/ArrayLike.hs | bsd-3-clause | 1,146 | 0 | 15 | 360 | 483 | 235 | 248 | 36 | 2 |
{- |
Module : SAWScript.LLVMBuiltins
Description : Implementations of LLVM-related SAW-Script primitives.
License : BSD3
Maintainer : atomb
Stability : provisional
-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DoAndIfThenElse #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE De... | GaloisInc/saw-script | src/SAWScript/LLVMBuiltins.hs | bsd-3-clause | 2,368 | 0 | 14 | 414 | 547 | 301 | 246 | 54 | 2 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE DeriveGeneric #-}
{- |
Module : Data.Graph.Simple.Util
Description : Utility functions used in many algorithms in this library
Copyright : Stefan Höck
Maintainer : Stefan Höck
Stability : experimental
Functions for internals use. Many are not total so use w... | stefan-hoeck/labeled-graph | Data/Graph/Simple/Util.hs | bsd-3-clause | 8,250 | 0 | 12 | 2,307 | 2,541 | 1,322 | 1,219 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
-- | SMS posting for carma
--
-- Start process:
-- @
-- carma-sms -u user -p password
-- @
--
-- Then send sms:
-- @
-- redis> hmset sms:1 from me phone 70001234567 msg \"test message\"
-- redis> lpush smspost sms:1
-- @
--
-- | SMS object
--
-- SMS object stored in redis has fol... | mvoidex/carma-sms | src/carma-sms.hs | bsd-3-clause | 4,571 | 0 | 15 | 1,201 | 1,029 | 585 | 444 | 95 | 3 |
module Main where
import Control.Concurrent.Async (forConcurrently_)
import Data.Text (Text)
import Stuff (urls, getUrl, printResult)
main :: IO ()
main = printSources urls
printSources :: [Text] -> IO ()
printSources urlList = do
forConcurrently_ urlList fetchAndPrint
putStrLn "All done!"
fetchAndPrint :: Text... | toddmohney/concurrency-example | concurrent/Main.hs | bsd-3-clause | 381 | 0 | 7 | 60 | 128 | 67 | 61 | 12 | 1 |
{-# LANGUAGE DeriveGeneric #-}
module Budget.Core.Data.ItemTemplate where
import GHC.Generics
import Data.Aeson
import Data.Text (Text)
import qualified Budget.Core.Data.Category as C
data ItemTemplate
= ItemTemplate
{ name :: Text -- ^ Name of item
, category :: C.Category -- ... | utky/budget | src/Budget/Core/Data/ItemTemplate.hs | bsd-3-clause | 754 | 0 | 9 | 158 | 183 | 102 | 81 | 23 | 0 |
module Main where
import Kraken.Web
main :: IO ()
main = run
| zalora/kraken | src/Kraken/Web/Main.hs | bsd-3-clause | 76 | 0 | 6 | 27 | 24 | 14 | 10 | 4 | 1 |
module Location where
import Data.IntMap (IntMap)
import qualified Data.IntMap as I
import Data.Set (Set)
import qualified Data.Set as S
import qualified Data.Foldable as Foldable
import Data.Maybe
type X = Int
type Y = Int
type Position = (X,Y)
type ObjId = Int
data Shape = Rectangle Int Int | Circle Int
newtype ... | ojw/taskpals | src/Location.hs | bsd-3-clause | 3,479 | 0 | 16 | 665 | 1,369 | 715 | 654 | 61 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE UnboxedTuples #-}
{-# LANGUAGE CPP #-}
module System.Random.SFMT
( -- * Gen
Gen
, initializeFromSeed, create, initialize, initializeFromByteString
, withSystemRandom, createSystemRandom
-- ** Type helpers
, ... | philopon/sfmt-hs | System/Random/SFMT.hs | bsd-3-clause | 8,884 | 0 | 15 | 2,021 | 2,859 | 1,548 | 1,311 | 200 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Monad (when)
import qualified Data.Set as S
import qualified Data.Text as T
import Database.PostgreSQL.Simple (close, connect)
import System.Environment (getArgs)
import System.Exit (exitFailure)
import Conf
import DB
import KripkeTypes
import LinkR... | dawedawe/kripkeweb | src/Main.hs | bsd-3-clause | 3,886 | 0 | 19 | 947 | 1,558 | 743 | 815 | 96 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Network.Syncthing.Types.Completion
( Completion(..)
) where
import Control.Applicative ((<$>))
import Control.Monad (MonadPlus (mzero))
import Data.Aeson (FromJSON, Value (..), parseJ... | jetho/syncthing-hs | Network/Syncthing/Types/Completion.hs | bsd-3-clause | 564 | 0 | 8 | 191 | 134 | 83 | 51 | 11 | 0 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
Desugaring exporessions.
-}
{-# LANGUAGE CPP #-}
module DsExpr ( dsExpr, dsLExpr, dsLocalBinds
, dsValBinds, dsLit, dsSyntaxExpr ) where
#include "HsVersions.h"
import Match
import MatchLit
import DsBinds... | oldmanmike/ghc | compiler/deSugar/DsExpr.hs | bsd-3-clause | 42,015 | 107 | 25 | 13,304 | 8,278 | 4,307 | 3,971 | -1 | -1 |
{-# LANGUAGE GADTs, ScopedTypeVariables, FlexibleContexts, TypeFamilies #-}
module Patch (readAndApplyGitEmail) where
import Utils
import Control.Exception as E
import Control.Applicative ( Alternative, (<|>) )
import Control.Monad ( unless, when, forM_ )
import Control.Monad.Trans ( liftIO )
import qualified Data.A... | nh2/darcs-fastconvert | Patch.hs | bsd-3-clause | 14,393 | 8 | 28 | 3,513 | 4,419 | 2,283 | 2,136 | 313 | 17 |
{-# LANGUAGE QuasiQuotes, GADTs #-}
module Main where
import Hydra
import Hydra.Solver.Sundials
type Pin = (Double,Double)
type Time = Double
twoPin :: SR ((Pin,Pin),Double)
twoPin = [rel| (((p_i,p_v),(n_i,n_v)),u) ->
p_v - n_v = u
p_i + n_i = 0
|]
resistor :: Double -> SR (Pin,Pin)
resistor r = [rel| ((p_... | giorgidze/Hydra | examples/Electronics.hs | bsd-3-clause | 6,245 | 0 | 11 | 1,774 | 1,028 | 592 | 436 | 65 | 1 |
-- A significant part of this code has been borrowed from other
-- hakyll users, mostly Jasper through his site and hakyll's,
-- but also skybluetrades.net and chromaticleaves.com
{-# LANGUAGE OverloadedStrings #-}
import Control.Applicative ((<$>))
import Data.Char
import Data.Maybe (catMaybes)
import Data.Monoid (m... | alpmestan/alpmestan.com | site.hs | bsd-3-clause | 8,405 | 15 | 24 | 2,642 | 1,654 | 823 | 831 | 165 | 2 |
----------------------------------------------------
-- --
-- HyLoRes.Clause.SelFunctions: --
-- Selection functions and selection functions --
-- generators --
-- --
--... | nevrenato/HyLoRes_Source | src/HyLoRes/Clause/SelFunction.hs | gpl-2.0 | 4,853 | 0 | 12 | 1,464 | 852 | 463 | 389 | 53 | 12 |
{-# LANGUAGE OverloadedStrings #-}
{- |
Module: TestMaker
Description: Handles command-line parsing.
Copyright: (c) Chris Godbout
License: GPLv3
Maintainer: chris@mathologist.net
Stability: experimental
Portability: portable
-}
module Main where
import qualified Data.Text as T
import Data.Version... | mathologist/hTestMaker | testmaker-cli/src/Main.hs | gpl-3.0 | 2,634 | 0 | 14 | 682 | 455 | 237 | 218 | 40 | 1 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
-}
{-# LANGUAGE CPP #-}
module BuildTyCl (
buildSynonymTyCon,
buildFamilyTyCon,
buildAlgTyCon,
buildDataCon,
buildPatSyn,
TcMethInfo, buildClass,
distinctAbstractTyCo... | TomMD/ghc | compiler/iface/BuildTyCl.hs | bsd-3-clause | 14,742 | 0 | 18 | 5,346 | 2,319 | 1,281 | 1,038 | 204 | 5 |
{-# LANGUAGE Haskell2010 #-}
{-# LINE 1 "Data/Vector/Fusion/Bundle/Size.hs" #-}
-- |
-- Module : Data.Vector.Fusion.Bundle.Size
-- Copyright : (c) Roman Leshchinskiy 2008-2010
-- License : BSD-style
--
-- Maintainer : Roman Leshchinskiy <rl@cse.unsw.edu.au>
-- Stability : experimental
-- Portability : por... | phischu/fragnix | tests/packages/scotty/Data.Vector.Fusion.Bundle.Size.hs | bsd-3-clause | 3,825 | 0 | 10 | 1,093 | 1,276 | 631 | 645 | 79 | 1 |
-- | Simple implementation for limiting the number
-- of active threads during concurrent computations
-- using a semaphore.
{-# LANGUAGE CPP #-}
module Control.Concurrent.Async.Pool
(
mapPool
, mapCapabilityPool
) where
import qualified Control.Exception as E
import Control.Concurrent... | CodyReichert/stack-tag | src/Control/Concurrent/Async/Pool.hs | bsd-3-clause | 1,469 | 0 | 11 | 286 | 274 | 149 | 125 | 19 | 1 |
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
--
-- Generating machine code (instruction selection)
--
-- (c) The University of Glasgow 1996-2013
--
-----------------------------------------------------------------------------
{-# LANGUAGE GADTs #-}
module SPARC.Co... | shlevy/ghc | compiler/nativeGen/SPARC/CodeGen.hs | bsd-3-clause | 22,755 | 0 | 29 | 7,404 | 4,695 | 2,329 | 2,366 | 392 | 54 |
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# OPTIONS_GHC -Wall #-}
module Test40 where
import Data.Generics.Product
import GHC.Generics
class MyClass a where
data AssocData a
instance MyClass Int where
data AssocData Int = SomeData... | kcsongor/generic-lens | generic-optics/test/Test40.hs | bsd-3-clause | 424 | 0 | 9 | 81 | 99 | 56 | 43 | 17 | 1 |
{-# LANGUAGE Haskell2010 #-}
{-# LINE 1 "Network/Wai/Logger/IP.hs" #-}
module Network.Wai.Logger.IP (
NumericAddress, showSockAddr
) where
import Data.Bits (shift, (.&.))
import Data.Word (Word32)
import Network.Socket (SockAddr(..))
import System.ByteOrder (ByteOrder(..), byteOrder)
import Text.Printf (printf)
... | phischu/fragnix | tests/packages/scotty/Network.Wai.Logger.IP.hs | bsd-3-clause | 1,822 | 0 | 12 | 466 | 596 | 325 | 271 | 38 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.Program.HcPkg
-- Copyright : Duncan Coutts 2009, 2013
--
-- Maintainer : cabal-devel@haskell.org
-- Portability : portable
--
-- This module provides an library interface to the @hc-pkg@ progra... | jwiegley/ghc-release | libraries/Cabal/cabal/Distribution/Simple/Program/HcPkg.hs | gpl-3.0 | 14,909 | 0 | 17 | 3,909 | 3,049 | 1,620 | 1,429 | 268 | 5 |
module System.Console.Haskeline.Term where
import System.Console.Haskeline.Monads
import System.Console.Haskeline.LineState
import System.Console.Haskeline.Key
import System.Console.Haskeline.Prefs(Prefs)
import System.Console.Haskeline.Completion(Completion)
import Control.Concurrent
import Data.Word
import Control.... | jwiegley/ghc-release | libraries/haskeline/System/Console/Haskeline/Term.hs | gpl-3.0 | 7,299 | 0 | 15 | 2,032 | 1,926 | 1,013 | 913 | -1 | -1 |
-- do nothing
main = return ()
| nikki-and-the-robots/nikki | src/scripts/Nothing.hs | lgpl-3.0 | 32 | 0 | 6 | 7 | 12 | 6 | 6 | 1 | 1 |
{-# LANGUAGE PatternGuards #-}
{-| The coverage and totality checkers for Idris are in this module.
-}
module Idris.Coverage where
import Idris.Core.TT
import Idris.Core.Evaluate
import Idris.Core.CaseTree
import Idris.AbsSyntax
import Idris.Delaborate
import Idris.Error
import Idris.Output (iWarn, iputStrLn)
import... | mrmonday/Idris-dev | src/Idris/Coverage.hs | bsd-3-clause | 34,337 | 119 | 30 | 13,141 | 11,679 | 5,871 | 5,808 | 586 | 35 |
{-# LANGUAGE DataKinds, PolyKinds, TypeFamilies, TypeOperators,
UndecidableInstances #-}
module T9063 where
import Data.Type.Equality
import Data.Proxy
-- reproduces an issue where type variables in the axiom are in
-- non-deterministic order
class kproxy ~ 'KProxy => PEq (kproxy :: KProxy a) where
t... | ezyang/ghc | testsuite/tests/determinism/determ013/A.hs | bsd-3-clause | 492 | 1 | 8 | 102 | 136 | 76 | 60 | 11 | 1 |
{-# OPTIONS_GHC -XEmptyDataDecls #-}
module Foo where
data Foo
| urbanslug/ghc | testsuite/tests/parser/should_compile/read048.hs | bsd-3-clause | 67 | 0 | 3 | 13 | 8 | 6 | 2 | -1 | -1 |
-- | A module to interface with Haskell compilers.
--
-- You can dynamically run and load code to a running application.
--
-- While the exposed API of this module attempts to be compiler agnostic, no
-- other Haskell compiler but GHC has the needed functionality to implement
-- this. For now.
--
{-# LANGUAGE AutoDeri... | Noeda/dynamically-loaded-haskell | Compiler/HS.hs | mit | 5,587 | 4 | 17 | 1,627 | 1,169 | 611 | 558 | 108 | 2 |
----------------------------------------------
-- CIS 194, Homework 3
-- Author: Glenn R. Fisher
-- Date: April 1, 2016
----------------------------------------------
module Golf where
----------------------------------------------
-- 1. Hopscotch
----------------------------------------------
-- Transform a list in... | glennrfisher/cis194-haskell | 03 Recursion and Polymorphism/Golf.hs | mit | 2,944 | 2 | 12 | 617 | 466 | 279 | 187 | 22 | 2 |
import Data.List
-- ghci > :m + Data.List
numUniques :: (Eq a) => [a] -> Int
numUniques = length . nub
-- selective import
-- import Data.List (nub, sort)
-- import Data List hiding (nub)
-- import qualified Data.Map
-- Data.Map.filter ...
-- import qualified Data.Map as M
-- M.filter ...
| v0lkan/learning-haskell | session-archive/009-import-modules.hs | mit | 297 | 0 | 8 | 58 | 50 | 29 | 21 | 3 | 1 |
{-# htermination listToFM :: Ord a => [([a],b)] -> FiniteMap [a] b #-}
import FiniteMap
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/FiniteMap_listToFM_4.hs | mit | 88 | 0 | 3 | 15 | 5 | 3 | 2 | 1 | 0 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.SQLTransaction
(js_executeSql, executeSql, SQLTransaction, castToSQLTransaction,
gTypeSQLTransaction)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, ... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/JSFFI/Generated/SQLTransaction.hs | mit | 1,992 | 14 | 11 | 390 | 477 | 288 | 189 | 38 | 1 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# Language OverloadedStrings #-}
module Unison.Test.BlockStore where
import Control.Concurrent (forkIO, ThreadId)
import Control.Monad (zipWithM_, foldM, when, replicateM, (>=>))
import Data.ByteString.Char8 (ByteString, pack, unpack)
import Data.Maybe (fromMaybe, catMaybes, is... | nightscape/platform | node/tests/Unison/Test/BlockStore.hs | mit | 8,989 | 0 | 18 | 1,842 | 3,081 | 1,531 | 1,550 | -1 | -1 |
{-# LANGUAGE Trustworthy #-}
-- |
-- Module : Surge.Stage
-- Copyright : (c) 2014 Kyle Van Berendonck
-- License : MIT
--
-- Maintainer : kyle@vanberendonck.com
-- Stability : experimental
-- Portability : portable
--
-- This module provides utilities for defining and composing server `Stage`s. See "Surg... | kvanberendonck/surge | src/Surge/Stage.hs | mit | 518 | 0 | 5 | 132 | 47 | 36 | 11 | 8 | 0 |
module Text.Noise.Compiler.Builtin
( definitions
) where
import Control.Applicative
import qualified Data.Map as Map
import qualified Text.Noise.Compiler.Document.Color as Color
import qualified Text.Noise.Compiler.Document as D
import qualified Text.Noise.Compiler.Function as F
import Text.Noise.Compiler.Function (Fu... | brow/noise | src/Text/Noise/Compiler/Builtin.hs | mit | 3,505 | 0 | 15 | 711 | 1,264 | 669 | 595 | 95 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-instanceipv6address.html
module Stratosphere.ResourceProperties.EC2SpotFleetInstanceIpv6Address... | frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/EC2SpotFleetInstanceIpv6Address.hs | mit | 1,625 | 0 | 13 | 164 | 174 | 100 | 74 | 23 | 1 |
module Strain (keep, discard) where
discard :: (a -> Bool) -> [a] -> [a]
discard f = keep (not . f)
keep :: (a -> Bool) -> [a] -> [a]
keep f (x:xs)
| f x = x : keep f xs
| otherwise = keep f xs
keep _ _ = []
| vaibhav276/exercism_haskell | strain/src/Strain.hs | mit | 224 | 0 | 8 | 69 | 143 | 75 | 68 | 8 | 1 |
module GHCJS.DOM.CSSStyleRule (
) where
| manyoo/ghcjs-dom | ghcjs-dom-webkit/src/GHCJS/DOM/CSSStyleRule.hs | mit | 42 | 0 | 3 | 7 | 10 | 7 | 3 | 1 | 0 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-redshiftdestinationconfiguration.html
module Stratosphere.ResourceProperties.K... | frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/KinesisFirehoseDeliveryStreamRedshiftDestinationConfiguration.hs | mit | 9,293 | 0 | 13 | 540 | 790 | 454 | 336 | 67 | 1 |
-- Avoid to depend on monoidal-containers,
-- which indirectly depends on template-haskell, which prevents me from building with asterius
{-
Copyright (c) 2015, Ben Gamari
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following c... | igrep/igrep-cashbook | hs2/src/Data/Map/Monoidal/Strict.hs | mit | 2,889 | 0 | 8 | 545 | 337 | 188 | 149 | 26 | 1 |
module BadIntel.Console.Menu
(enterMenu
,enterMenu'
,yesNo)
where
import Control.Monad
import Data.Char
import System.Console.Haskeline
import qualified Data.Map as Map
enterMenu :: [String] -> InputT IO Int
enterMenu c = do displayMenu c
input <- getInputChar "> "
let max = length c... | Raveline/BadIntel | src/BadIntel/Console/Menu.hs | gpl-2.0 | 1,860 | 0 | 14 | 780 | 624 | 304 | 320 | 46 | 3 |
module SGF.Data where
data Tree = Empty | Branch {commands :: [Command], tree :: Tree}
newtype Location = L (Int,Int) deriving (Show, Eq)
data MoveCommand = BlackMove Location | WhiteMove Location deriving (Show, Eq)
data MetaCommand = Comment String | BlackPlace Location | WhitePlace Location deriving (Show,Eq)
dat... | JonHarder/haskell-go | SGF/Data.hs | gpl-2.0 | 382 | 0 | 9 | 60 | 130 | 77 | 53 | 6 | 0 |
{-# OPTIONS_HADDOCK show-extensions #-}
-- |
-- Module : Yi.Keymap.Vim.ReplaceSingleCharMap
-- License : GPL-2
-- Maintainer : yi-devel@googlegroups.com
-- Stability : experimental
-- Portability : portable
module Yi.Keymap.Vim.ReplaceSingleCharMap
( defReplaceSingleMap
) where
import ... | atsukotakahashi/wi | src/library/Yi/Keymap/Vim/ReplaceSingleCharMap.hs | gpl-2.0 | 1,897 | 1 | 19 | 622 | 381 | 204 | 177 | 41 | 6 |
{- |
Module : $Header$
Description : Utils extending Data.List and Data.Set
Copyright : (c) Immanuel Normann, Uni Bremen 2007
License : GPLv2 or higher, see LICENSE.txt
Maintainer : inormann@jacobs-university.de
Stability : provisional
Portability : portable
-}
module Search.Data.ListSet where
im... | nevrenato/Hets_Fork | Search/Utils/ListSet.hs | gpl-2.0 | 947 | 0 | 9 | 166 | 253 | 143 | 110 | 14 | 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/Run/File/Write.hs | gpl-3.0 | 1,809 | 0 | 14 | 410 | 260 | 140 | 120 | 26 | 3 |
module Text.Parsec.Applicative
( module Control.Applicative
, module Data.Traversable
, module Text.Parsec.Applicative.Types
, Parser()
, ParseError(..)
, ParseErrorType(..)
, predicate
, eof
, token
, token'
, try
, label
, parse
, parse'
, accept
, accept'
, between
, choice
, op... | ktvoelker/AParsec | src/Text/Parsec/Applicative.hs | gpl-3.0 | 1,198 | 0 | 10 | 262 | 466 | 264 | 202 | 44 | 2 |
module Persist.Message (saveMessage) where
import Database.PostgreSQL.Simple
import Database.PostgreSQL.Simple.SqlQQ
import Data.List (find)
import Data.Maybe (isJust, fromJust)
import Data.Either (isRight)
import Data.Either.Utils (fromRight)
import Data.UUID.Types (UUID)
import qualified Data.Map.Strict as M
import ... | mkawalec/email | src/Persist/Message.hs | gpl-3.0 | 4,005 | 0 | 20 | 914 | 1,031 | 553 | 478 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-
hbot - a simple Haskell chat bot for Hipchat
Copyright (C) 2014 Louis J. Scoras
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... | ljsc/hbot | src/Hbot/Plugins/Whoami.hs | gpl-3.0 | 1,608 | 0 | 14 | 343 | 176 | 102 | 74 | 15 | 1 |
{-# LANGUAGE OverloadedStrings, DuplicateRecordFields,OverloadedLabels #-}
module Ampersand.Input.Xslx.XLSX
(parseXlsxFile)
where
import Ampersand.ADL1
import Ampersand.Basics
import Ampersand.Input.ADL1.CtxError
import Ampersand.Misc
import Ampersand.Prototype.Stati... | AmpersandTarski/ampersand | src/Ampersand/Input/Xslx/XLSX.hs | gpl-3.0 | 13,178 | 0 | 21 | 5,202 | 3,306 | 1,724 | 1,582 | -1 | -1 |
{-# LANGUAGE FlexibleContexts, EmptyDataDecls, FlexibleInstances, MultiParamTypeClasses, FunctionalDependencies #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE UndecidableInstances #-}
module QuadCoordinates.Class
(module Tetrahedron.INormalDisc,
module Data.FormalOps,
module NormalSurfaceBasi... | DanielSchuessler/hstri | QuadCoordinates/Class.hs | gpl-3.0 | 4,938 | 0 | 13 | 1,022 | 1,357 | 734 | 623 | 103 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE Rank2Types #-}
module SNet.Interfaces.C
( C'Handle
, Ptr
, newHandle
, withHandle
, destroyHandle
) where
import Prelude hiding (length)
import Control.Monad.Trans
import Foreign
import Foreign.C.Types
import SNet.Record
import SNet.Pattern
im... | merijn/SNet2.0 | SNet/Interfaces/C.hs | gpl-3.0 | 2,496 | 0 | 12 | 625 | 785 | 383 | 402 | 71 | 1 |
{-# OPTIONS_GHC -Wall #-}
{-# LANGUAGE DeriveDataTypeable #-}
module Main ( main ) where
import Control.Concurrent ( forkIO )
import Control.Monad ( when, forever )
import Data.ByteString.Char8 ( pack )
import Data.ByteString.Lazy ( fromStrict )
import Data.Binary ( decodeOrFail )
import qualified System.ZMQ4 as ZMQ
... | ghorn/dynobud | dynobud/examples/Dynoplot.hs | lgpl-3.0 | 2,008 | 0 | 24 | 487 | 619 | 327 | 292 | 46 | 2 |
module ChapterExercises where
import State
-- 1. Construct a State where the state is also the value you return.
get :: Moi s s
get = Moi (\s -> (s,s))
-- 2. Construct a State where the resulting state is the argument provided and
-- the value is defaulted to unit.
put :: s -> Moi s ()
put s = Moi (\_ -> ((), ... | dmp1ce/Haskell-Programming-Exercises | Chapter 23/Chapter exercises.hs | unlicense | 696 | 0 | 9 | 171 | 225 | 121 | 104 | 12 | 1 |
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -Wno-redundant-constraints #-} -- for the Getter instances
module Pos.Chain.Block.Block
( Block
, getBlockHeader
, blockHeader
, verifyBlockIn... | input-output-hk/cardano-sl | chain/src/Pos/Chain/Block/Block.hs | apache-2.0 | 18,559 | 0 | 26 | 4,167 | 3,232 | 1,809 | 1,423 | -1 | -1 |
{-# LANGUAGE RebindableSyntax, NoMonomorphismRestriction #-}
import Prelude hiding (Monad(..))
import Control.Effect
import Control.Effect.Cond
import Control.Effect.Maybe
headM x = ifM (x == []) (INothing) (IJust (head x))
foo x y = do x' <- headM x
y' <- headM y
return [x', y'] | dorchard/effect-monad | examples/Maybe.hs | bsd-2-clause | 309 | 2 | 9 | 70 | 122 | 60 | 62 | 9 | 1 |
{-# LANGUAGE GADTs #-}
-- This module is going to need a lot of thought. Needs to be very high level
-- to capture what the code needs to do while not using any paradigm specific
-- constructs such that it can be imported to a generic AST of any paradigm
-- Holding off for now, just using imperative OO AST for now
... | JacquesCarette/literate-scientific-software | code/drasil-code/Language/Drasil/Code/AST.hs | bsd-2-clause | 1,087 | 0 | 8 | 247 | 259 | 156 | 103 | 25 | 0 |
module Arrays where
import Data.List (transpose)
window :: Int -> [a] -> [[a]]
window n xs | length xs >= n = take n xs : window n (drop 1 xs)
| otherwise = []
verticalWindow :: Int -> [[a]] -> [[a]]
verticalWindow size grid = concatMap transpose rowGroups
where
rowGroups = window size grid
h... | tyehle/euler-haskell | src/Arrays.hs | bsd-3-clause | 916 | 0 | 18 | 199 | 447 | 236 | 211 | 18 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Main where
import Database.Oracle.Enumerator
main :: IO ()
main = loop 0 $ connect "cpf" "cpf" "oracle/ORA11G"
where loop i dbh = do
(_, newdbh) <- withContinuedSession dbh $ do
execDDL qCre... | paulrzcz/takusen-oracle | Example/Main.hs | bsd-3-clause | 788 | 0 | 14 | 241 | 158 | 78 | 80 | 17 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Main
( main
) where
import qualified Drive as V
import Data.Monoid ((<>))
import Drive ((>--->))
import Drive.Describe
import Drive.File
program :: FileP ()
program
= write "some content"
main :: IO ()
ma... | palf/free-driver | packages/drive-file/src/Main.hs | bsd-3-clause | 634 | 0 | 10 | 192 | 174 | 95 | 79 | 22 | 1 |
{-# LANGUAGE NamedFieldPuns, OverloadedStrings #-}
module MusicPad.Env.Version where
import Prelude ()
import qualified Prelude as P
import MPS.Env
_song_version, _state_version :: Int
_song_version = 1
_state_version = 1 | nfjinjing/level5 | src/MusicPad/Env/Version.hs | bsd-3-clause | 224 | 0 | 4 | 30 | 42 | 29 | 13 | 8 | 1 |
{-# LANGUAGE OverloadedStrings #-}
import Lib (findInsertLength, mergeReads, revComp, qualToChar, charToQual, seqMatch)
import qualified Data.ByteString.Char8 as B
import Test.Tasty (defaultMain, TestTree, testGroup)
import Test.Tasty.HUnit (Assertion, assertEqual, testCase)
main :: IO ()
main = defaultMain tests
t... | stschiff/mergeAndClipFastq | test/Spec.hs | bsd-3-clause | 2,059 | 0 | 12 | 400 | 554 | 278 | 276 | 38 | 1 |
module TestEvaluation
(evaluationTests)
where
import Parsing(readExpr)
import Evaluation
import Data (LispVal(..), IOThrowsError)
import Test.Hspec
import Test.QuickCheck
import Test.QuickCheck.Monadic(monadicIO, assert, pick, run)
import TestArbitraryData()
import Control.Monad.Except(runExceptT, liftIO)
evalua... | davideGiovannini/scheme-repl | test/TestEvaluation.hs | bsd-3-clause | 2,818 | 0 | 12 | 578 | 687 | 347 | 340 | 67 | 1 |
{-# language CPP #-}
-- | = Name
--
-- VK_KHR_multiview - device extension
--
-- == VK_KHR_multiview
--
-- [__Name String__]
-- @VK_KHR_multiview@
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registered Extension Number__]
-- 54
--
-- [__Revision__]
-- 1
--
-- [__Extension and Version Depende... | expipiplus1/vulkan | src/Vulkan/Extensions/VK_KHR_multiview.hs | bsd-3-clause | 8,600 | 0 | 8 | 1,411 | 457 | 342 | 115 | -1 | -1 |
module TestPrinter where
import Test.HUnit
import Text.PrettyPrint.ANSI.Leijen
import Parser
-- Parse a string input into an AST then parse the printing of that AST
-- and check it is equal to the original AST
parsePrintParse :: String -> Assertion
parsePrintParse input =
case parseExpr input of
Left err -> a... | phillipm/mlish-to-llvm | test/TestPrinter.hs | bsd-3-clause | 712 | 0 | 13 | 145 | 161 | 83 | 78 | 18 | 3 |
module Data.SimPOL.Time where
class Zero a where
zero :: a
class Discrete a where
advance :: a -> a
data Timeline = Timeline
{ index :: Int
, events :: [String]
, next :: Maybe Timeline
}
instance Zero Timeline where
zero = Timeline { index = 0
, events = []
... | ZjMNZHgG5jMXw/privacy-option-simpol | Data/SimPOL/Time.hs | bsd-3-clause | 1,631 | 0 | 12 | 748 | 496 | 269 | 227 | 42 | 0 |
------------------------------------------------------------------------------
--- Knowledge-based Autonomic Heterogeneous Networks (KAHN)
--- @author Rajesh Krishnan, Cosocket LLC
--- @version September 2014
------------------------------------------------------------------------------
{-
Copyright (c) 2014, Cosocket... | Cosocket-LLC/kahn | v2.0/src/MEDHA/Medhavi.hs | bsd-3-clause | 12,999 | 0 | 59 | 3,152 | 2,410 | 1,243 | 1,167 | 215 | 3 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.BuildReports.Types
-- Copyright : (c) Duncan Coutts 2009
-- License : BSD-like
--
-- Maintainer : cabal-devel@haskell.org
-- Portability : portable
--
-- Types related to build reporting
-... | yihuang/cabal-install | Distribution/Client/BuildReports/Types.hs | bsd-3-clause | 1,322 | 0 | 11 | 276 | 253 | 147 | 106 | 25 | 1 |
{-# LANGUAGE FlexibleContexts #-}
module CommandLine.Helpers where
import Control.Monad.Error
import System.Directory
import System.IO
import qualified Elm.Utils as Utils
yesOrNo :: IO Bool
yesOrNo =
do hFlush stdout
input <- getLine
case input of
"y" -> return True
"n" -> return Fals... | rtfeldman/elm-package | src/CommandLine/Helpers.hs | bsd-3-clause | 1,086 | 0 | 12 | 289 | 360 | 179 | 181 | 32 | 3 |
import NFAe
import Data.Set (Set)
import qualified Data.Set as Set
ne1 = NFAe {
states = Set.fromList [1, 2, 3, 4],
symbols = Set.fromList [0, 1],
delta = delta',
start = 1,
final = Set.fromList [4]}
where delta' 1 (Just 0) = Set.singleton 4;
delta' 1 Nothing = Set.singleton ... | cameronbwhite/ComputationalStructures | Haskell/nfae_test.hs | bsd-3-clause | 619 | 3 | 8 | 182 | 275 | 142 | 133 | 18 | 4 |
{-|
Module : Servant.Xhr.Path
Description : Definitions for constructing paths from servant types.
Copyright : (c) Alexander Vieth, 2015
Licence : BSD3
Maintainer : aovieth@gmail.com
Stability : experimental
Portability : non-portable (GHC only)
-}
{-# LANGUAGE AutoDeriveTypeable #-}
{-# LANGUAGE TypeFam... | avieth/servant-xhr | Servant/Xhr/Path.hs | bsd-3-clause | 5,594 | 0 | 13 | 1,209 | 1,291 | 703 | 588 | 96 | 1 |
{-# LANGUAGE RankNTypes #-}
import System.IO
import System.Posix.Types
import Foreign.C.Types (CTime)
import qualified Data.ByteString.Lazy as LBS
import Control.Concurrent
import Control.Exception
import Control.Monad
import Data.Attoparsec.Number
import Data.Aeson
import Network.JsonRpc
import Network
tcpProxy :: Rp... | yihuang/haskell-json-rpc | examples/tcp_client.hs | bsd-3-clause | 1,321 | 2 | 21 | 352 | 460 | 225 | 235 | 40 | 1 |
module Index (IdxState, newIdx, resetIdx, getIdx, getIdxs, runIdx) where
import Verilog
import Data.Map
import Control.Monad
import Control.Monad.State
data V = V { idx :: Map Val Int
, old_idx :: Map Val Int
, count :: Int
, inputs :: Map String Int }
type IdxState = State V
startI... | wuerges/vlsi_verification | src/Index.hs | bsd-3-clause | 1,463 | 0 | 15 | 487 | 682 | 343 | 339 | 51 | 3 |
-- ----------------------------------------------------------------------------
--
-- Module : Language.CFamily.Constants
-- Copyright : (c) 2007..2008 Duncan Coutts, Benedikt Huber
-- (c) 2016 Mick Nelso
-- License : BSD3
-- Maintainer : micknelso@gmail.com
-- Stability : experimental
-- P... | micknelso/language-c | src/Language/CFamily/Constants.hs | bsd-3-clause | 22,063 | 0 | 19 | 6,560 | 4,555 | 2,422 | 2,133 | 399 | 13 |
{-# LANGUAGE RecordWildCards #-}
module TokenBufferSpec
( spec
)
where
import TokenBuffer
import Prelude hiding (null)
import Data.Maybe
import qualified Data.Vector as Vector
import Control.Monad
import Test.Hspec
import Test.QuickCheck
newtype T = T (Int, Int)
deriving (Eq, Show)
instance Arbitrary T where
a... | Yuras/tide | spec/TokenBufferSpec.hs | bsd-3-clause | 7,470 | 0 | 26 | 2,080 | 2,858 | 1,423 | 1,435 | 189 | 11 |
-- http://stackoverflow.com/questions/6889715/extending-a-datatype-in-haskell
-- {-# LANGUAGE GeneralizedNewtypeDeriving #-}
-- {-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE Multi... | reuleaux/pire | src/Pire/Syntax/Binder.hs | bsd-3-clause | 2,071 | 0 | 9 | 321 | 270 | 161 | 109 | 34 | 0 |
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
module Main where
import Control.Lens
import Control.Monad (void)
import qualified Data.ByteString.Char8 as BS
import qualified Da... | qmuli/qmuli | examples/fold-s3-content/src/Main.hs | mit | 2,168 | 0 | 20 | 841 | 392 | 220 | 172 | 43 | 1 |
module ListWebhooks where
import qualified Github.Repos.Webhooks as W
import qualified Github.Auth as Auth
import qualified Github.Data.Definitions as Def
import Data.List
main :: IO ()
main = do
let auth = Auth.OAuth "oauthtoken"
possibleWebhooks <- W.webhooksFor' auth "repoOwner" "repoName"
case possibleWebho... | jwiegley/github | samples/Repos/Webhooks/ListWebhooks.hs | bsd-3-clause | 584 | 0 | 12 | 99 | 189 | 100 | 89 | 14 | 2 |
import System.Plugins
import System.Directory
a = "Foo.hs" -- uesr code
b = "Bar.hs" -- trusted code. Result is "Bar.o"
main = do
status <- makeWith a b []
s <- case status of
MakeFailure e -> mapM_ putStrLn e >> error "failed"
MakeSuccess n s -> print n >> re... | abuiles/turbinado-blog | tmp/dependencies/hs-plugins-1.3.1/testsuite/makewith/module_name/Main.hs | bsd-3-clause | 968 | 3 | 12 | 395 | 346 | 155 | 191 | 24 | 5 |
-- -- $Id$
module Language.ABCgleich
( top
)
where
import Language
import Data.Set
import Data.FiniteMap
import Control.Monad ( guard )
top :: String -> Language
top xs = Language
{ abbreviation = "{ w : " ++ concat ( intersperse " = "
[ "|w|_" ++ [x] | x <- xs ] ) ++ " }"
, alphabet = mk... | florianpilz/autotool | src/Language/ABCgleich.hs | gpl-2.0 | 943 | 12 | 14 | 324 | 469 | 242 | 227 | 32 | 2 |
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
-- Module : Network.AWS.Data.Internal.Header
-- Copyright : (c) 2013-2015 Brendan Hay <brendan.g.hay@gmail.com>
-- License : This Source Code Form is subject to the ter... | romanb/amazonka | core/src/Network/AWS/Data/Internal/Header.hs | mpl-2.0 | 3,424 | 0 | 14 | 827 | 871 | 487 | 384 | 71 | 2 |
-- Cmm representations using Hoopl's Graph CmmNode e x.
{-# LANGUAGE CPP, GADTs #-}
module Cmm (
-- * Cmm top-level datatypes
CmmProgram, CmmGroup, GenCmmGroup,
CmmDecl, GenCmmDecl(..),
CmmGraph, GenCmmGraph(..),
CmmBlock,
RawCmmDecl, RawCmmGroup,
Section(..), SectionType(..), CmmSta... | olsner/ghc | compiler/cmm/Cmm.hs | bsd-3-clause | 7,265 | 0 | 9 | 1,665 | 1,036 | 632 | 404 | 113 | 1 |
module Main where
import Distribution.MacOSX
import Distribution.MacOSX.AppBuildInfo
import System.Directory
import System.Environment
import System.FilePath
main = do
pname <- getProgName
xs <- getArgs
exe <- case xs of
[x1] -> return x1
_ -> fail $ "Usage: " ++ pname ++ " <exe>"
... | gimbo/cabal-macosx | macosx-app.hs | bsd-3-clause | 944 | 0 | 13 | 412 | 208 | 114 | 94 | 25 | 3 |
{-|
Module : Idris.Docstrings
Description : Wrapper around Markdown library.
License : BSD3
Maintainer : The Idris Community.
-}
{-# LANGUAGE CPP, DeriveFoldable, DeriveFunctor, DeriveGeneric,
DeriveTraversable, ScopedTypeVariables #-}
{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
module Idri... | kojiromike/Idris-dev | src/Idris/Docstrings.hs | bsd-3-clause | 14,584 | 0 | 14 | 4,172 | 4,716 | 2,378 | 2,338 | 228 | 17 |
{-# LANGUAGE DataKinds
, PolyKinds
, TypeOperators
, TypeFamilies
, StandaloneDeriving
, DeriveDataTypeable
, ScopedTypeVariables
#-}
{-# OPTIONS_GHC -Wall -fwarn-tabs #-}
----------------------------------------------------------------
-- ... | zachsully/hakaru | haskell/Language/Hakaru/Types/DataKind.hs | bsd-3-clause | 6,974 | 0 | 11 | 1,518 | 975 | 576 | 399 | 72 | 0 |
{-# LANGUAGE DeriveDataTypeable #-}
module Distribution.Client.SavedFlags
( readCommandFlags, writeCommandFlags
, readSavedArgs, writeSavedArgs
) where
import Distribution.Simple.Command
import Distribution.Simple.UserHooks ( Args )
import Distribution.Simple.Utils
( createDirectoryIfMissi... | mydaum/cabal | cabal-install/Distribution/Client/SavedFlags.hs | bsd-3-clause | 3,015 | 0 | 14 | 499 | 635 | 330 | 305 | 57 | 4 |
{-# LANGUAGE OverloadedStrings, FlexibleContexts #-}
{- |
Module : Text.Pandoc.Writers.ICML
Copyright : Copyright (C) 2013 github.com/mb21
License : GNU GPL, version 2 or above
Stability : alpha
Conversion of 'Pandoc' documents to Adobe InCopy ICML, a stand-alone XML format
which is a subset... | ddssff/pandoc | src/Text/Pandoc/Writers/ICML.hs | gpl-2.0 | 25,507 | 0 | 23 | 7,556 | 7,209 | 3,816 | 3,393 | 449 | 11 |
{-# LANGUAGE MagicHash #-}
module Main where
import GHC.Ptr
import GHC.Exts
import Foreign.Ptr
main = print (Ptr nullAddr# == nullPtr)
| urbanslug/ghc | testsuite/tests/ghci/should_run/T2589.hs | bsd-3-clause | 137 | 0 | 8 | 22 | 38 | 22 | 16 | 6 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Main (main) where
import Control.Monad (unless)
import qualified Data.Map.Lazy as Map
import qualified Data.Text as T
import Data.Text.IO (readFile)
import Lens.Family2
import Lens.Family2.Stock ... | xngns/lens-toml-parser | tests/Main.hs | isc | 5,228 | 0 | 13 | 1,344 | 1,639 | 858 | 781 | -1 | -1 |
{-
rrdgraph-haskell – Haskell DSL for rendering RRD graphs using RRDtool
Copyright © 2011 Johan Kiviniemi <devel@johan.kiviniemi.name>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission no... | ion1/rrdgraph-haskell | Data/RRDGraph/Tests/VDef.hs | isc | 3,351 | 0 | 14 | 764 | 763 | 439 | 324 | 53 | 1 |
{-# LANGUAGE FlexibleContexts #-}
-- | Facilities for inspecting the data dependencies of a program.
module Futhark.Analysis.DataDependencies
( Dependencies
, dataDependencies
)
where
import Data.Monoid
import qualified Data.Map.Strict as M
import qualified Data.Set as S
import Prelude
import Futhark.Represe... | ihc/futhark | src/Futhark/Analysis/DataDependencies.hs | isc | 2,057 | 0 | 16 | 546 | 547 | 286 | 261 | 37 | 2 |
module Y2020.M10.D26.Exercise where
{--
Great! We have the airbases of the world. At some point we will want to
look at alliances of the world:
https://en.wikipedia.org/wiki/List_of_military_alliances
But FRIST! ... let's export our graph as a set of cypher statements
--}
import Data.Map (Map)
import Data.Set (Set... | geophf/1HaskellADay | exercises/HAD/Y2020/M10/D26/Exercise.hs | mit | 1,998 | 0 | 15 | 367 | 447 | 253 | 194 | 38 | 1 |
module Integration.Model.UserSpec (spec) where
import TestImport hiding (assertEqual)
import Test.HUnit (assertEqual, assertFailure)
import qualified Model.User as UserM
-------------------------------------------------------------------------------
spec :: Spec
spec = withApp $ do
describe ... | rzetterberg/alven | src/test/Integration/Model/UserSpec.hs | mit | 1,167 | 0 | 18 | 317 | 286 | 148 | 138 | 23 | 2 |
-- Sieve of Eratosthenes
-- http://www.codewars.com/kata/55f0b69fe3ef582c4100008a/
module Sieve where
primes :: Int -> [Int]
primes n | n <= 1 = []
| otherwise = filter isPrime $ 2:[3, 5..n]
where isPrime n = all (\d -> n `mod` d /= 0) [2 .. floor . sqrt . fromIntegral $ n]
| gafiatulin/codewars | src/6 kyu/Sieve.hs | mit | 296 | 0 | 11 | 72 | 117 | 63 | 54 | 5 | 1 |
{--
Important
[] Read defaults from template file (JSON)
[] Read data from input file (JSON)
[] Receive more than 1024 bytes
[] Split up in submodules
Nice to have
[] GUI
[] |- Data input: auto-generate a form using
--}
{-# LANGUAGE OverloadedStrings #-}
import Network.Simple.TCP
import qualified Data.Byt... | tinkhaven-organization/hl7-client | src/Main.hs | mit | 7,281 | 19 | 18 | 1,807 | 1,997 | 983 | 1,014 | 160 | 2 |
module Unison.Var where
import Data.Set (Set)
import Data.Text (Text)
import qualified Data.Set as Set
-- | A class for variables. Variables may have auxiliary information which
-- may not form part of their identity according to `Eq` / `Ord`. Laws:
--
-- * `name (named n) == n`:
-- `name` returns the name set ... | nightscape/platform | shared/src/Unison/Var.hs | mit | 1,846 | 0 | 11 | 423 | 389 | 206 | 183 | 23 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.