code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-# LANGUAGE OverloadedStrings #-}
module Main ( main ) where
import Control.Error.Util (hush)
import Control.Monad (void, when)
import Control.Monad.State (StateT, liftIO, get, runStateT, modify)
import Data.Aeson (decode)
import qualified Data.Char as Char
import qualified Data.Configurator as Conf
import Data.Maybe... | bus000/Dikunt | plugins/WordReplacer/Main.hs | bsd-3-clause | 10,292 | 0 | 14 | 2,178 | 2,100 | 1,114 | 986 | 184 | 2 |
{-# LANGUAGE NamedFieldPuns #-}
{- |
Module : Mongo.Pid.Removal
Description : Get Pid from Name
Copyright : (c) Plow Technology 2014
License : MIT
Maintainer : brent.phillips@plowtech.net
Stability : unstable
Portability : portable
<Uses a name to grab the pid to remove old pid alarms from mongo>... | plow-technologies/mongo-pid-removal | src/Mongo/Pid/Removal.hs | bsd-3-clause | 3,380 | 0 | 19 | 1,285 | 650 | 329 | 321 | 41 | 1 |
{-# LANGUAGE FlexibleContexts, DeriveDataTypeable #-}
{-- | Parser for the lambda AST built of parsec. Converts to an intermediate format for antiexpressions -}
module Language.Lambda.Untyped.Parser where
import Text.Parsec
import Text.Parsec.Language
import Text.Parsec.Token
import Language.Lambda.Untyped.Syntax
impo... | jfischoff/LambdaPrettyQuote | src/Language/Lambda/Untyped/Parser.hs | bsd-3-clause | 3,423 | 0 | 11 | 936 | 1,296 | 629 | 667 | 94 | 1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE RankNTypes #-}
-- | UPDATE operations on the wallet-spec state
module Cardano.Wallet.Kernel.DB.Spec.Update (
-- * Errors
NewPendingFailed(..)
, NewForeignFailed(..)
, ApplyBlockFailed(..)
-- * Updates
, newPending
, newForei... | input-output-hk/pos-haskell-prototype | wallet/src/Cardano/Wallet/Kernel/DB/Spec/Update.hs | mit | 16,318 | 0 | 18 | 3,951 | 2,909 | 1,611 | 1,298 | -1 | -1 |
module Grammatik.CF.Chomsky.Generate where
import Grammatik.CF.Chomsky.Type
import Autolib.FiniteMap
import Control.Monad ( guard )
import Data.List ( nub )
main :: Ord a
=> Chomsky a -> [[ String ]]
main ch = let Just ws = lookupFM ( creation ch ) ( start ch ) in ws
-- | compute terminal words derivable from... | Erdwolf/autotool-bonn | src/Grammatik/CF/Chomsky/Generate.hs | gpl-2.0 | 1,429 | 12 | 11 | 685 | 417 | 220 | 197 | 32 | 3 |
{-# LANGUAGE GeneralizedNewtypeDeriving, RankNTypes, TemplateHaskell #-}
{-# LANGUAGE DerivingVia #-}
module Revision.Deltum.Transaction
( Transaction, run
, Store(..), onStoreM
, Changes, fork, merge
, lookupBS, lookup
, insertBS, insert
, delete, deleteIRef
, readIRef, writeIRef
, isE... | lamdu/lamdu | src/Revision/Deltum/Transaction.hs | gpl-3.0 | 6,690 | 0 | 13 | 1,571 | 2,255 | 1,184 | 1,071 | -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/CreatePlacementGroup.hs | mpl-2.0 | 4,418 | 0 | 11 | 829 | 526 | 321 | 205 | 70 | 1 |
{-| PyValue contains instances for the 'PyValue' typeclass.
The typeclass 'PyValue' converts Haskell values to Python values.
This module contains instances of this typeclass for several generic
types. These instances are used in the Haskell to Python generation
of opcodes and constants, for example.
-}
{-
Copyrig... | ganeti/ganeti | src/Ganeti/PyValue.hs | bsd-2-clause | 4,431 | 0 | 13 | 826 | 752 | 408 | 344 | 56 | 0 |
{-# LANGUAGE PatternGuards, ViewPatterns #-}
module Idris.Elab.Record(elabRecord) where
import Idris.AbsSyntax
import Idris.Docstrings
import Idris.Error
import Idris.Delaborate
import Idris.Imports
import Idris.Elab.Term
import Idris.Coverage
import Idris.DataOpts
import Idris.Providers
import Idris.Primitives
import... | aaronc/Idris-dev | src/Idris/Elab/Record.hs | bsd-3-clause | 20,611 | 437 | 22 | 6,180 | 6,332 | 3,445 | 2,887 | 322 | 14 |
-----------------------------------------------------------------------------
-- |
-- License : BSD-3-Clause
-- Maintainer : Oleg Grenrus <oleg.grenrus@iki.fi>
--
-- The Github Repo Contents API, as documented at
-- <https://developer.github.com/v3/repos/contents/>
module GitHub.Endpoints.Repos.Contents (
--... | jwiegley/github | src/GitHub/Endpoints/Repos/Contents.hs | bsd-3-clause | 2,607 | 0 | 14 | 531 | 618 | 332 | 286 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE StandaloneDeriving #-}
-------------------------------... | advancedtelematic/quickcheck-state-machine-model | test/DieHard.hs | bsd-3-clause | 6,644 | 0 | 14 | 1,508 | 1,042 | 606 | 436 | 82 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_HADDOCK show-extensions #-}
-- |
-- Module : Yi.Keymap.Vim.VisualMap
-- License : GPL-2
-- Maintainer : yi-devel@googlegroups.com
-- Stability : experimental
-- Portability : portable
--
-- I'm a module waiting for some kind soul to give me a commentary!
... | TOSPIO/yi | src/library/Yi/Keymap/Vim/VisualMap.hs | gpl-2.0 | 11,009 | 0 | 23 | 4,369 | 2,793 | 1,441 | 1,352 | 232 | 6 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | romanb/amazonka | amazonka-autoscaling/gen/Network/AWS/AutoScaling/UpdateAutoScalingGroup.hs | mpl-2.0 | 11,333 | 0 | 10 | 2,229 | 1,189 | 718 | 471 | 127 | 1 |
{-# LANGUAGE NamedFieldPuns, RecordWildCards #-}
-- | The tar index cache provides generic support for caching a tarball's
-- TarIndex; this is used by various other modules.
module Distribution.Server.Features.TarIndexCache (
TarIndexCacheFeature(..)
, initTarIndexCacheFeature
) where
import Control.Exception... | haskell-infra/hackage-server | Distribution/Server/Features/TarIndexCache.hs | bsd-3-clause | 5,380 | 0 | 21 | 1,411 | 957 | 516 | 441 | 90 | 4 |
module HpcLexer where
import Data.Char
data Token
= ID String
| SYM Char
| INT Int
| STR String
| CAT String
deriving (Eq,Show)
initLexer :: String -> [Token]
initLexer str = [ t | (_,_,t) <- lexer str 1 1 ]
lexer :: String -> Int -> Int -> [(Int,Int,Token)]
lexer (c:cs) line column
|... | nomeata/ghc | utils/hpc/HpcLexer.hs | bsd-3-clause | 1,929 | 4 | 15 | 499 | 953 | 489 | 464 | 46 | 2 |
module Canonicalize.Port (check) where
import qualified Data.Foldable as Foldable
import qualified AST.Declaration as D
import qualified AST.Expression.General as E
import qualified AST.Expression.Canonical as Canonical
import qualified AST.Type as T
import qualified AST.Variable as Var
import qualified Reporting.Ann... | laszlopandy/elm-compiler | src/Canonicalize/Port.hs | bsd-3-clause | 3,449 | 0 | 18 | 1,090 | 1,173 | 588 | 585 | 92 | 11 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
module Language.Haskell.Refact.Refactoring.MoveDef
( liftToTopLevel
, compLiftToTopLevel
, liftOneLevel
, compLiftOneLevel
, demote
, compDemo... | RefactoringTools/HaRe | src/Language/Haskell/Refact/Refactoring/MoveDef.hs | bsd-3-clause | 76,745 | 1 | 30 | 25,582 | 13,857 | 6,895 | 6,962 | 905 | 14 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE TemplateHaskell #-}
module Snap.Snaplet.Internal.Tests
( tests, initTest ) where
------------------------------------------------------------------------------
import Control.Len... | sopvop/snap | test/suite/Snap/Snaplet/Internal/Tests.hs | bsd-3-clause | 4,669 | 0 | 11 | 1,206 | 963 | 520 | 443 | 76 | 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 | xenmgr-core/Vm/ProductProperty.hs | gpl-2.0 | 6,554 | 0 | 14 | 1,511 | 2,039 | 1,071 | 968 | 155 | 13 |
module MapFusion where
import Prelude hiding (map)
{-# RULES "map-fusion" forall f g. map f . map g = map (f . g) #-}
map :: (a -> b) -> [a] -> [b]
map f [] = []
map f (a:as) = f a : map f as
| conal/hermit | examples/map-fusion/MapFusion.hs | bsd-2-clause | 201 | 0 | 7 | 57 | 83 | 46 | 37 | 6 | 1 |
{-# LANGUAGE DeriveGeneric #-}
module GHC.ForeignSrcLang.Type
( ForeignSrcLang(..)
) where
import Prelude -- See note [Why do we import Prelude here?]
import GHC.Generics (Generic)
-- | Foreign formats supported by GHC via TH
data ForeignSrcLang
= LangC -- ^ C
| LangCxx -- ^ C++
| LangObjc -- ^ Ob... | sdiehl/ghc | libraries/ghc-boot-th/GHC/ForeignSrcLang/Type.hs | bsd-3-clause | 470 | 0 | 6 | 108 | 75 | 50 | 25 | 13 | 0 |
module B1 where
import A1
f :: C1 -> [Int]
f (C1 x@[]) = x
f (C1 x@(b_1 : b_2)) = x
f (C1 x) = x | kmate/HaRe | old/testing/subIntroPattern/B1_TokOut.hs | bsd-3-clause | 98 | 0 | 10 | 28 | 76 | 42 | 34 | 6 | 1 |
module ScopeNamesBase where
import ScopeNames
import ScopeNamesBaseStruct
import DefinedNamesBase()
import FreeNamesBase()
import Syntax
instance Eq i => ScopeNames i e (HsExpI i) (HsExpI (i,e)) where
scopeNames = scopeNamesRec
instance Eq i => ScopeNames i e (HsDeclI i) (HsDeclI (i,e)) where
scopeNames = scope... | forste/haReFork | tools/base/defs/ScopeNamesBase.hs | bsd-3-clause | 507 | 0 | 8 | 85 | 187 | 103 | 84 | -1 | -1 |
module Pfe2Cmds where
--import Prelude hiding (putStr,putStrLn)
--import WorkModule(analyzeSCM,expRel,inscpRel,mkWM)
import Relations(applyRel)
import SourceNames(SN(..))
import SrcLoc1(loc0)
import Pfe1Cmds(pfe1Cmds)
import PfeParse(moduleArg,idArgs,runCmds)
import PFE2(runPFE2,getModuleExports,getAllExports)
import... | forste/haReFork | tools/pfe/Pfe2Cmds.hs | bsd-3-clause | 1,444 | 4 | 14 | 263 | 412 | 226 | 186 | 29 | 1 |
{-# LANGUAGE Unsafe #-}
{-# LANGUAGE ExistentialQuantification, NoImplicitPrelude #-}
module GHC.Event.Internal
(
-- * Event back end
Backend
, backend
, delete
, poll
, modifyFd
, modifyFdOnce
-- * Event type
, Event
, evtRead
, evtWrite
, evtClose
, eventIs
... | snoyberg/ghc | libraries/base/GHC/Event/Internal.hs | bsd-3-clause | 6,369 | 0 | 16 | 1,795 | 1,397 | 778 | 619 | 138 | 3 |
module Main where
import X
main :: IO ()
main = print $ case f x of A -> True; B -> False
| ghc-android/ghc | testsuite/tests/driver/recomp010/Main.hs | bsd-3-clause | 93 | 0 | 8 | 26 | 46 | 25 | 21 | 4 | 2 |
module Main where
import Game
main = putStrLn "This game is not yet implemented, so you win by default!"
| PolyglotSymposium/textual-game-hs | Main.hs | mit | 107 | 0 | 5 | 21 | 15 | 9 | 6 | 3 | 1 |
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
import qualified Data.ByteString as BS
import Control.Applicative ((<$>))
import Data.Proxy
import Manifest.Manifest
import Manifest.PureManifest
import Manifest.PostgreSQL
data User = User BS.ByteString
deriving... | avieth/Manifest-PostgreSQL | examples/User.hs | mit | 2,579 | 30 | 17 | 521 | 675 | 353 | 322 | 57 | 3 |
{-# LANGUAGE ExistentialQuantification, MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings, FlexibleInstances #-}
{-# OPTIONS_HADDOCK prune, not-home #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
-- | Provides framework to interact with REST api gateways. Implementations specific to the
-- Discord API are provided ... | jano017/Discord.hs | src/Network/Discord/Rest.hs | mit | 2,346 | 0 | 11 | 490 | 502 | 290 | 212 | 45 | 1 |
{-|
Parse a list of flags supported in any of the front ends.
Returns the flags in a data structure, along with any invalid flags.
Deal with any files/include files in this stage.
-}
module CmdLine.Flag(
CmdFlag(..), flagsHelp,
flagsWebArgs, flagsWebQuery, flagsCmdLine
) where
import Gen... | Pnom/haskell-ast-pretty | Test/examples/RealHoogle.hs | mit | 9,798 | 0 | 16 | 2,836 | 3,182 | 1,733 | 1,449 | 179 | 4 |
import Graphics.UI.SDL
import Graphics.Rendering.OpenGL
import Data.List
import Data.Maybe
import Data.Word
import Control.Monad
import Control.Monad.State
import Formulae
type ARTFVect = (GLfloat, GLfloat, GLfloat)
data Camera = Camera {
pos :: ARTFVect
}
data ARTFFlags = Alive | Dead
deriving (Eq)
data ARTF =... | esjee/hlsystem-artf | Main.hs | mit | 3,626 | 26 | 13 | 784 | 1,713 | 871 | 842 | 96 | 3 |
module Core.LambdaLift.DeBruijn
( deBruijn
) where
import Common
import Core.AST
import Core.AnnotAST
import Core.FreeVars
import Core.Prelude
import qualified Data.Map as M
import qualified Data.Set as S
deBruijn :: Program Name -> AnnotProgram Int (Annot Int Name)
deBruijn = ProgramF . map deBruijnSC . getProgramF... | meimisaki/Rin | src/Core/LambdaLift/DeBruijn.hs | mit | 2,400 | 0 | 16 | 630 | 1,033 | 524 | 509 | 51 | 10 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE CPP #-}
module CorePrelude
( -- * Standard
-- ** Operators
(Prelude.$)
, (Prelude.$!)
, (Prelude.&&)
, (Prelude.||)
, (Control.Category..)
-- ** Functions
, Prelude.not
, Prelude.otherwise
, Prelude.fst
, Prelude.snd
... | snoyberg/basic-prelude | src/CorePrelude.hs | mit | 6,110 | 0 | 9 | 1,397 | 1,555 | 1,011 | 544 | 198 | 2 |
flip f = \a b -> f b a
| scravy/nodash | doc/Function/flip.hs | mit | 23 | 1 | 6 | 9 | 24 | 10 | 14 | 1 | 1 |
module Tools.Mill.Table where
import Data.ByteString
import Text.Parsec.Prim
import Text.Parsec.Char
import Text.Parsec.Combinator
import Text.Parsec.ByteString (GenParser)
import qualified Data.ByteString.Char8 as C
import Control.Applicative ((<$>), (<*>), (*>), (<*))
type Colname = ByteString
type DataLine... | lucasdicioccio/mill | Tools/Mill/Table.hs | mit | 518 | 0 | 12 | 91 | 157 | 98 | 59 | 14 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Data.CmdItemSpec (main, spec) where
#if !MIN_VERSION_base(4,8,0)
import Control.Applicative ((<$>), (<*>))
#endif
import Test.Hspec
import Test.Hspec.Laws
import Test.QuickCheck
import Test.QuickCheck.Instances (... | geraud/cmd-item | test/Data/CmdItemSpec.hs | mit | 551 | 0 | 7 | 81 | 131 | 79 | 52 | 16 | 1 |
module Barycenter where
barTriang :: (Double, Double) -> (Double, Double) -> (Double, Double) -> (Double, Double)
barTriang (a, b) (c, d) (e, f) = (x, y)
where
x = (a + c + e) / 3
y = (b + d + f) / 3 | cojoj/Codewars | Haskell/Codewars.hsproj/Barycenter.hs | mit | 225 | 0 | 10 | 70 | 123 | 73 | 50 | 5 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html
module Stratosphere.Resources.ApiGatewayV2Integration where
import Stratosphere.... | frontrowed/stratosphere | library-gen/Stratosphere/Resources/ApiGatewayV2Integration.hs | mit | 8,500 | 0 | 15 | 825 | 1,256 | 709 | 547 | 86 | 1 |
{-# OPTIONS_GHC -fno-warn-incomplete-patterns #-}
module HyLoRes.Formula.Internal(
module HyLoRes.Formula.TypeLevel,
--
Form(..),
top, bot, nom, negNom, prop, negProp,
conj, disj,
diam, box, at, down,
opaque,
nnfAtFormula, unNNF, eqUnNNF, showDebug,
--
Attrib(..), attrib,
--
... | nevrenato/HyLoRes_Source | src/HyLoRes/Formula/Internal.hs | gpl-2.0 | 25,259 | 0 | 16 | 8,390 | 12,142 | 6,140 | 6,002 | -1 | -1 |
main :: IO ()
main = putStrLn "compiled & run"
| adamwespiser/wespiser.com | my-site/drafts/simple.hs | gpl-3.0 | 47 | 1 | 6 | 10 | 22 | 9 | 13 | 2 | 1 |
{- |
Module : $Header$
Description : Spec for Crypto.Phec.Primes.
Copyright : 2015 Stian Ellingsen <stian@plaimi.net>
License : LGPL-3
Maintainer : Stian Ellingsen <stian@plaimi.net>
-}
module Crypto.Phec.PrimesSpec (spec) where
import Control.Arrow ((>>>))
import Control.Monad (forM_)
import Crypto.P... | stiell/phec | test-suite/Crypto/Phec/PrimesSpec.hs | gpl-3.0 | 3,349 | 0 | 19 | 685 | 1,040 | 568 | 472 | 68 | 1 |
-- | Command-Line driver for compiling Verse documents.
import Control.Applicative
import Control.Monad
import qualified Data.Map as M
import System.IO
import System.Environment (getArgs)
import System.Exit
import Language.Verse.Parser
import Language.Verse.Renderer
import Language.Verse.Renderer.Html
import Languag... | sykora/verse | src/Verse.hs | gpl-3.0 | 1,221 | 1 | 14 | 249 | 320 | 171 | 149 | 29 | 1 |
{-# LANGUAGE ScopedTypeVariables, CPP #-}
{-|
Utilities for top-level modules and ghci. See also Hledger.Read and
Hledger.Utils.
-}
module Hledger.Cli.Utils
(
withJournalDo,
writeOutput,
journalReload,
journalReloadIfChanged,
journalFileIsNewer,
journalSpecifiedFileIsNewer,
fil... | kmels/hledger | hledger/Hledger/Cli/Utils.hs | gpl-3.0 | 7,641 | 0 | 18 | 1,559 | 1,586 | 834 | 752 | 116 | 3 |
module Interpreter (interpreteProgram
,interpreteModule
,repl) where
-- map
import qualified Data.Map as Map
import Data.Map (Map)
-- other
import Data.IORef
import Control.Monad.Except
import Control.Monad.IO.Class (liftIO)
import Control.Monad (unless)
import System.Console.Rea... | Kotolegokot/Underlisp | src/Interpreter.hs | gpl-3.0 | 4,625 | 0 | 21 | 1,401 | 1,283 | 625 | 658 | 93 | 4 |
{-# LANGUAGE NoImplicitPrelude #-}
module ZetaTypeOfRings(
module ZetaTypeOfRings
) where
import TannakianSymbols
import Parsing
import Data.List
import qualified Prelude
import Prelude hiding ((+),(-),(*),(^),(/), negate)
data Zmod = Zmod [Integer]
cleanupZM :: Zmod -> Zmod
cleanupZM (Zmod x) = Zmod . combi... | torstein-vik/zeta-types | src/case studies/ZetaTypeOfRings.hs | gpl-3.0 | 1,073 | 2 | 13 | 340 | 466 | 250 | 216 | 26 | 5 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-storage/gen/Network/Google/Resource/Storage/Objects/List.hs | mpl-2.0 | 5,646 | 0 | 19 | 1,362 | 825 | 481 | 344 | 112 | 1 |
module Main where
import Test.Tasty
import qualified Tests.Data.Predicate as Predicate
import qualified Tests.Wai.Predicate as WaiPredicate
main :: IO ()
main = defaultMain $ testGroup "Tests"
[ Predicate.tests
, WaiPredicate.tests
]
| twittner/wai-predicates | test/TestSuite.hs | mpl-2.0 | 249 | 0 | 8 | 45 | 61 | 38 | 23 | 8 | 1 |
module Problem047 where
import Data.List
main =
print $ head $ dropWhile (not . c) [1..]
where c x = all (== 4) $ map (nods !!) $ map (+ x) [0..3]
nods = map (length . nub . divisors) [0..]
divisors 0 = []
divisors 1 = []
divisors x = divisors' primes [] x
where divisors' _ ds 1 = ds
divisors' (p:ps)... | vasily-kartashov/playground | euler/problem-047.hs | apache-2.0 | 593 | 0 | 10 | 178 | 331 | 174 | 157 | 17 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Model.Service where
import Control.Applicative
import Control.Monad
import Data.Aeson
import Data.ByteString (ByteString)
import qualified Data.ByteString.Char8 as C
import Data.Map (Map)
import ... | alexandrelucchesi/pfec | server-common/src/Model/Service.hs | apache-2.0 | 2,064 | 0 | 21 | 996 | 482 | 273 | 209 | 51 | 2 |
{-# LANGUAGE TemplateHaskell #-}
import HMSTimeSpec
import FFMpegCommandSpec
main :: IO ()
main =
do runHMSTimeSpecTests
runFFMpegCommandTests
return () | connrs/ffsplitgen | out/production/ffsplitgen/test/Spec.hs | apache-2.0 | 167 | 0 | 8 | 33 | 37 | 18 | 19 | 8 | 1 |
import Data.Char
ans :: String -> String
ans [] = []
ans (c:cs)
| isUpper c = (toLower c):(ans cs)
| isLower c = (toUpper c):(ans cs)
| otherwise = c:(ans cs)
main = do
c <- getContents
let i = lines c
o = map ans i
mapM_ putStrLn o
| a143753/AOJ | ITP1_8_A.hs | apache-2.0 | 259 | 0 | 10 | 77 | 156 | 74 | 82 | 12 | 1 |
{-# LANGUAGE TupleSections, OverloadedStrings, ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
module Handler.Asset where
import Import
import qualified Data.Text
import Database.Persist.GenericSql
import Handler.Utils
import Handler.Rent (assetRentFormWidgetM)
import Handler.Review (reviewF... | Tener/personal-library-yesod | Handler/Asset.hs | bsd-2-clause | 8,574 | 0 | 19 | 2,412 | 2,359 | 1,167 | 1,192 | -1 | -1 |
{-# LANGUAGE CPP, DeriveDataTypeable, MagicHash, UnboxedTuples #-}
#if __GLASGOW_HASKELL__ >= 701
{-# LANGUAGE Trustworthy #-}
#endif
-----------------------------------------------------------------------------
-- |
-- Module : Control.Concurrent.STM.TMVar
-- Copyright : (c) The University of Glasgow 2004
-... | gridaphobe/packages-stm | Control/Concurrent/STM/TMVar.hs | bsd-3-clause | 4,893 | 0 | 14 | 1,053 | 1,071 | 542 | 529 | 2 | 0 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
module Snap.Chat.Internal.Types where
------------------------------------------------------------------------------
import Control.... | snapframework/cufp2011 | sample-implementation/Snap/Chat/Internal/Types.hs | bsd-3-clause | 4,997 | 0 | 13 | 1,469 | 921 | 519 | 402 | 117 | 1 |
{-# LANGUAGE ExtendedDefaultRules #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -Wall -fno-warn-orphans -fno-warn-type-defaults #-}
-- | Orphan 'FromJSON' and 'ToJSON' instances for certain Cryptol
-- types. Since the... | ntc2/cryptol | cryptol-server/Cryptol/Aeson.hs | bsd-3-clause | 7,781 | 0 | 21 | 1,259 | 2,294 | 1,195 | 1,099 | 149 | 4 |
{-# LANGUAGE PackageImports ,FlexibleInstances ,MultiParamTypeClasses#-}
module PkgCereal(PkgCereal(..),Data.Serialize.Serialize,sd) where
import Control.Exception
import Types hiding (Serialize)
import qualified Types as T
import Test.Data
import Test.Data.Values
import qualified Data.ByteString.Lazy as L
import "c... | tittoassini/flat | benchmarks/PkgCereal.hs | bsd-3-clause | 5,593 | 0 | 10 | 1,147 | 451 | 247 | 204 | 35 | 1 |
{-# LANGUAGE ExistentialQuantification #-}
module Main where
import Scheme()
import Text.ParserCombinators.Parsec hiding (spaces)
import System.Environment
import Numeric
import GHC.Real
import Data.Char
import Data.Complex
import Data.IORef
import Data.Maybe
import Control.Monad.Except
import System.IO
symbol :: Pa... | wat-aro/scheme | app/Main.hs | bsd-3-clause | 29,792 | 0 | 17 | 8,030 | 10,922 | 5,447 | 5,475 | 643 | 13 |
{-# LANGUAGE FlexibleContexts, RankNTypes #-}
module EC2Tests.AvailabilityZoneTests
( runAvailabilityZoneTests
)
where
import Data.Text (Text)
import Test.Hspec
import Cloud.AWS.EC2
import Util
import EC2Tests.Util
region :: Text
region = "ap-northeast-1"
runAvailabilityZoneTests :: IO ()
runAvailabili... | worksap-ate/aws-sdk | test/EC2Tests/AvailabilityZoneTests.hs | bsd-3-clause | 673 | 0 | 17 | 110 | 128 | 69 | 59 | 18 | 1 |
import Distribution.Simple
import Distribution.Simple.Setup
import Distribution.Simple.LocalBuildInfo
import Distribution.Simple.Program
import qualified Distribution.LV2 as LV2
main = defaultMainWithHooks simpleUserHooks { confHook = LV2.confHook simpleUserHooks }
| mmartin/haskell-lv2 | examples/amp-lv2/Setup.hs | bsd-3-clause | 268 | 0 | 9 | 25 | 53 | 32 | 21 | 6 | 1 |
-- | Description: Applicative order evaluation Krivine machine.
module Rossum.Krivine.Eager where
import Data.Maybe
import Rossum.Krivine.Term
data Sided a = L | V a | R
deriving (Show)
type Configuration = (Env, Maybe Term, Stack (Sided Closure))
-- | Step an applicative order Krivine machin... | thsutton/rossum | src/Rossum/Krivine/Eager.hs | bsd-3-clause | 1,276 | 0 | 17 | 333 | 636 | 339 | 297 | 23 | 7 |
{-# LANGUAGE QuasiQuotes #-}
import LiquidHaskell
import Language.Haskell.Liquid.Prelude
[lq| assume foo :: {v:Bool | (Prop v)} |]
foo = False
bar = liquidAssertB foo
| spinda/liquidhaskell | tests/gsoc15/unknown/pos/Assume.hs | bsd-3-clause | 174 | 0 | 5 | 31 | 32 | 20 | 12 | 6 | 1 |
module MultiLinear.Class where
import Rotation.SO2
import Rotation.SO3
import Exponential.SO3
import qualified Linear.Matrix as M
import Data.Distributive
import Linear.V3
class MultiLinear f where
(!*!) :: Num a => f a -> f a -> f a
transpose :: Num a => f a -> f a
r0 = rotation (V3 0.1 0.1 0.1)
r1 = rotatio... | massudaw/mtk | MultiLinear/Class.hs | bsd-3-clause | 682 | 0 | 10 | 169 | 287 | 144 | 143 | 21 | 1 |
module Genotype.Types where
import Data.Text (Text)
data BasePair = C | T | A | G deriving (Eq, Show)
data Name = Name Text Text (Maybe Char) deriving (Eq, Show)
data Datum
= Missing
| Estimated BasePair
| Certain BasePair
deriving (Eq, Show)
data Genotype = Genotype
{ geno_name :: Name
, geno_subpopLa... | Jonplussed/genotype-parser | src/Genotype/Types.hs | bsd-3-clause | 391 | 0 | 10 | 85 | 148 | 87 | 61 | 14 | 0 |
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{- | Provides a representation for (top-level) integer term rewrite systems.
See <http://aprove.informatik.rwth-aachen.de/help_new/inttrs.html> for details.
Example:
@
outer(x, r) -> inner(1, 1, x, r) [ x >= 0 && r <= 100000 ]
inner(f, i, x, r) -> inner(f + i... | ComputationWithBoundedResources/tct-inttrs | src/Tct/IntTrs.hs | bsd-3-clause | 26,631 | 0 | 19 | 6,383 | 9,635 | 4,981 | 4,654 | -1 | -1 |
{-# LANGUAGE FlexibleContexts #-}
import Plots
import Plots.Axis
import Plots.Types hiding (B)
import Data.List
import Diagrams.Prelude
import Diagrams.Backend.Rasterific
mydata1 = [(1,3), (2,5.5), (3.2, 6), (3.5, 6.1)]
mydata2 = mydata1 & each . _1 *~ 0.5
mydata3 = [V2 1.2 2.7, V2 2 5.1, V2 3.2 2.6, V2 3.5 5]
-- ... | bergey/plots | examples/ribbonopacity.hs | bsd-3-clause | 1,247 | 0 | 16 | 258 | 553 | 301 | 252 | -1 | -1 |
{-# LANGUAGE FlexibleContexts #-}
module Database.Redis.Internal where
import Control.Monad.Trans ( MonadIO, liftIO )
import Control.Failure ( MonadFailure, failure )
import Data.Convertible.Base ( convertUnsafe )
import Data.Convertible.Instances ( )
import Database.Redis.Core
import System.IO... | brandur/redis-haskell | src/Database/Redis/Internal.hs | bsd-3-clause | 3,957 | 0 | 20 | 989 | 1,458 | 742 | 716 | 85 | 6 |
{-# OPTIONS -fglasgow-exts #-}
module LogicExample where
import Language.GroteTrap
import Data.Generics hiding (Prefix)
import Data.Set hiding (map)
-- Logic data structure.
data Logic
= Var String
| Or [Logic]
| And [Logic]
| Impl Logic Logic
| Not Logic
deriving (Show, Eq, Typeable, Data)
type Logi... | MedeaMelana/GroteTrap | LogicExample.hs | bsd-3-clause | 1,566 | 0 | 9 | 410 | 601 | 327 | 274 | 48 | 5 |
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE PatternSynonyms #-}
module Syntax.Internal where
import Control.Lens.Prism
import Data.Map (Map)
import Data.Text (Text)
import Data.Vector (Vector)
import Syntax.Common
-- Would like to merge t... | Danten/lejf | src/Syntax/Internal.hs | bsd-3-clause | 4,829 | 0 | 13 | 1,120 | 1,512 | 804 | 708 | 137 | 2 |
import Distribution.PackageDescription
import Distribution.Simple
import Distribution.Simple.LocalBuildInfo
import Distribution.Simple.UserHooks
import System.Directory
import System.Exit
import System.FilePath
import System.Process
testSuiteExe = "b1-tests"
main :: IO ()
main = defaultMainWithHooks hooks
hooks :: ... | btmura/b1 | Setup.hs | bsd-3-clause | 642 | 0 | 11 | 86 | 162 | 84 | 78 | 19 | 1 |
module Data.MediaBus.Media.SyncStreamSpec
( spec,
)
where
import Control.Lens
import Control.Monad.State
import Data.Function
import Data.MediaBus
import Debug.Trace
import Test.Hspec
import Test.QuickCheck
import FakePayload
spec :: Spec
spec =
describe "setSequenceNumberAndTimestamp" $ do
it "increases th... | lindenbaum/mediabus | specs/Data/MediaBus/Media/SyncStreamSpec.hs | bsd-3-clause | 3,912 | 0 | 34 | 2,021 | 855 | 437 | 418 | 87 | 6 |
{-|
Module : Graphics.Mosaico.Ventana
Description : Ventanas interactivas con distribuciones de rectángulos
Copyright : ⓒ Manuel Gómez, 2015
License : BSD3
Maintainer : targen@gmail.com
Stability : experimental
Portability : portable
Representación orientada a objetos de una ventana interactiva donde se ... | mgomezch/mosaico-lib | src/Graphics/Mosaico/Ventana.hs | bsd-3-clause | 8,806 | 2 | 19 | 2,608 | 1,630 | 940 | 690 | 156 | 6 |
module Exponent where
main = (5 ^ 4, 100 ^ 0, (-3) ^ 3 {- , 10 ^ 25 -} )
| roberth/uu-helium | test/correct/Exponent.hs | gpl-3.0 | 75 | 0 | 8 | 23 | 36 | 22 | 14 | 2 | 1 |
{-| Implementation of the Ganeti confd utilities.
This holds a few utility functions that could be useful in both
clients and servers.
-}
{-
Copyright (C) 2011, 2012 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the fol... | mbakke/ganeti | src/Ganeti/Confd/Utils.hs | bsd-2-clause | 6,028 | 0 | 15 | 1,263 | 1,187 | 626 | 561 | 89 | 5 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ViewPatterns #-}
-- | Main stack tool entry point.
module Main where
import... | lukexi/stack | src/main/Main.hs | bsd-3-clause | 41,959 | 0 | 30 | 15,594 | 8,431 | 4,276 | 4,155 | -1 | -1 |
foo x y =
do c <- getChar
return c
| mpickering/ghc-exactprint | tests/examples/transform/Rename1.hs | bsd-3-clause | 47 | 1 | 7 | 22 | 28 | 10 | 18 | 3 | 1 |
module Main
( main
) where
import Test.Framework
import qualified UnitTests.Distribution.Compat.ReadP
tests :: [Test]
tests = [
testGroup "Distribution.Compat.ReadP"
UnitTests.Distribution.Compat.ReadP.tests
]
main :: IO ()
main = defaultMain tests
| jwiegley/ghc-release | libraries/Cabal/cabal/tests/UnitTests.hs | gpl-3.0 | 277 | 0 | 7 | 57 | 66 | 40 | 26 | 10 | 1 |
module Dotnet.System.Xml.XmlNodeList where
import Dotnet
import qualified Dotnet.System.Object
import Dotnet.System.Collections.IEnumerator
import Dotnet.System.Xml.XmlNodeTy
data XmlNodeList_ a
type XmlNodeList a = Dotnet.System.Object.Object (XmlNodeList_ a)
foreign import dotnet
"method Dotnet.System.Xml.XmlNod... | FranklinChen/Hugs | dotnet/lib/Dotnet/System/Xml/XmlNodeList.hs | bsd-3-clause | 866 | 0 | 11 | 101 | 188 | 109 | 79 | -1 | -1 |
{-# LANGUAGE OverloadedStrings, BangPatterns #-}
{-# LANGUAGE CPP #-}
-- |
-- Module : Crypto.PasswordStore
-- Copyright : (c) Peter Scott, 2011
-- License : BSD-style
--
-- Maintainer : pjscott@iastate.edu
-- Stability : experimental
-- Portability : portable
--
-- Securely store hashed, salted passwords... | MaxGabriel/yesod | yesod-auth/Yesod/PasswordStore.hs | mit | 18,769 | 0 | 18 | 4,578 | 2,382 | 1,360 | 1,022 | 172 | 3 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Rules.Selftest (selftestRules) where
import Hadrian.Haskell.Cabal
import Test.QuickCheck
import Base
import Context
import Oracles.ModuleFiles
import Oracles.Setting
import Packages
import Settings
import Target
import Utilities
instance Arbitrary Way where
arbitrary ... | snowleopard/shaking-up-ghc | src/Rules/Selftest.hs | bsd-3-clause | 3,927 | 0 | 19 | 975 | 1,256 | 629 | 627 | -1 | -1 |
module DoIn1 where
io s
= do s <- getLine
let q = (s ++ s)
putStr q
putStr "foo"
| kmate/HaRe | old/testing/removeDef/DoIn1AST.hs | bsd-3-clause | 121 | 0 | 11 | 60 | 47 | 22 | 25 | 6 | 1 |
module Lit where
{-@ test :: {v:Int | v == 3} @-}
test = length "cat"
| abakst/liquidhaskell | tests/pos/lit.hs | bsd-3-clause | 71 | 0 | 5 | 17 | 13 | 8 | 5 | 2 | 1 |
module Foo
( foo
) where
foo :: IO ()
foo = putStrLn "foo2"
| juhp/stack | test/integration/tests/2781-shadow-bug/files/foo/v2/Foo.hs | bsd-3-clause | 69 | 0 | 6 | 23 | 27 | 15 | 12 | 4 | 1 |
-- (c) The GHC Team
--
-- Functions to evaluate whether or not a string is a valid identifier.
-- There is considerable overlap between the logic here and the logic
-- in Lexer.x, but sadly there seems to be way to merge them.
module Lexeme (
-- * Lexical characteristics of Haskell names
-- | Us... | green-haskell/ghc | compiler/basicTypes/Lexeme.hs | bsd-3-clause | 8,645 | 0 | 10 | 2,491 | 1,566 | 836 | 730 | 136 | 8 |
{-# LANGUAGE OverloadedStrings, BangPatterns #-}
{-# LANGUAGE CPP #-}
-- |
-- Module : Crypto.PasswordStore
-- Copyright : (c) Peter Scott, 2011
-- License : BSD-style
--
-- Maintainer : pjscott@iastate.edu
-- Stability : experimental
-- Portability : portable
--
-- Securely store hashed, salted passwords... | ygale/yesod | yesod-auth/Yesod/PasswordStore.hs | mit | 18,769 | 0 | 18 | 4,578 | 2,382 | 1,360 | 1,022 | 172 | 3 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE GADTs #-}
module T6137 where
data Sum a b = L a | R b
data Sum1 (a :: k1 -> *) (b :: k2 -> *) :: Sum k1 k2 -> * where
LL :: a i -> Sum1 a b (L i)
RR :: b i -> Sum1 a b (R i)
data Code... | urbanslug/ghc | testsuite/tests/polykinds/T6137.hs | bsd-3-clause | 699 | 0 | 13 | 186 | 334 | 184 | 150 | 16 | 0 |
{-# LANGUAGE UndecidableInstances #-}
module Tc173b where
import Tc173a
is :: ()
is = isFormValue (Just "") | urbanslug/ghc | testsuite/tests/typecheck/should_compile/Tc173b.hs | bsd-3-clause | 109 | 0 | 7 | 18 | 29 | 17 | 12 | 5 | 1 |
{-# LANGUAGE FlexibleInstances #-} -- exercise 5
module Calc where
import qualified Data.Map.Strict as M
import qualified ExprT as E -- exercise 1
import Parser -- exercise 2
import qualified StackVM as S -- exercise 5
-- exercise 1
eval :: E.ExprT -> Integer
eval (E.Lit a) = a
eval (E.Add e1 e2) = (eval e1) + (eva... | dirkz/haskell-cis-194 | 05/Calc.hs | isc | 2,867 | 0 | 11 | 843 | 1,150 | 607 | 543 | 92 | 2 |
-- | Defines readers for reading tags of BACnet values
module BACnet.Tag.Reader
(
readNullAPTag,
readNullCSTag,
readBoolAPTag,
readBoolCSTag,
readUnsignedAPTag,
readUnsignedCSTag,
readSignedAPTag,
readSignedCSTag,
readRealAPTag,
readRealCSTag,
readDoubleAPTag,
readDoubl... | michaelgwelch/bacnet | src/BACnet/Tag/Reader.hs | mit | 6,726 | 0 | 19 | 1,524 | 1,897 | 996 | 901 | 155 | 14 |
import Test.Hspec
import Language.Paradocs.Renderer
import Language.Paradocs.RendererState
import Language.Paradocs.MonadStorage
import qualified Data.HashMap.Strict as HashMap
main :: IO ()
main = hspec $ do
describe "%read" $ do
let storage = HashMap.fromList [
... | pasberth/paradocs | test/ReadInstructionSpec.hs | mit | 549 | 0 | 16 | 165 | 127 | 67 | 60 | 13 | 1 |
{-# LANGUAGE CPP #-}
module Language.Haskell.Source.Enumerator
( enumeratePath
) where
import Conduit
import Control.Applicative
import Control.Monad
import Data.List
import Distribution.PackageDescription
import qualified Distribution.Verbosity as... | danstiner/hfmt | src/Language/Haskell/Source/Enumerator.hs | mit | 3,124 | 0 | 13 | 633 | 755 | 393 | 362 | 65 | 4 |
module BinaryTreesSpec (main, spec) where
import Test.Hspec
import BinaryTrees
import Control.Exception (evaluate)
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "Preparering" $ do
it "returns (Branch 1 Empty Empty) when x = 1" $ do
leaf (1 :: Int) `shouldBe` Branch 1 Empty Empty
desc... | yyotti/99Haskell | src/test/BinaryTreesSpec.hs | mit | 41,856 | 0 | 29 | 13,530 | 13,314 | 6,667 | 6,647 | 557 | 1 |
-----------------------------------------------------------------------------
--
-- Module : Main
-- Copyright : (c) 2013-15 Phil Freeman, (c) 2014-15 Gary Burgess
-- License : MIT (http://opensource.org/licenses/MIT)
--
-- Maintainer : Phil Freeman <paf31@cantab.net>
-- Stability : experimental
-- P... | michaelficarra/purescript | psc/Main.hs | mit | 6,388 | 0 | 22 | 1,398 | 1,642 | 844 | 798 | 143 | 3 |
module Text.Docvim.Visitor.Options (extractOptions) where
import Control.Applicative
import Text.Docvim.AST
import Text.Docvim.Visitor
-- | Extracts a list of nodes (if any exist) from the `@options` section(s) of
-- the source code.
--
-- It is not recommended to have multiple `@options` sections in a project. If
--... | wincent/docvim | lib/Text/Docvim/Visitor/Options.hs | mit | 690 | 0 | 9 | 127 | 104 | 63 | 41 | 9 | 2 |
module Main where
import System.Environment
main :: IO ()
main = do
-- args <- getArgs
-- (arg0:arg1:restArgs) <- getArgs
-- putStrLn $ "sum: " ++ show (read arg0 + read arg1)
name <- getLine
putStrLn $ "Your name is: " ++ name
| dreame4/scheme-in-haskell | hello.hs | mit | 236 | 0 | 8 | 51 | 45 | 25 | 20 | 6 | 1 |
module Network.Skype.Protocol.User where
import Data.Typeable (Typeable)
import Network.Skype.Protocol.Types
data UserProperty = UserHandle UserID
| UserFullName UserFullName
| UserBirthday (Maybe UserBirthday)
| UserSex UserSex
| UserLanguage (M... | emonkak/skype4hs | src/Network/Skype/Protocol/User.hs | mit | 3,059 | 0 | 9 | 1,158 | 375 | 227 | 148 | 60 | 0 |
{-# LANGUAGE CPP #-}
module TCDExtra where
import TCD
import Data.Functor ((<$>))
import Data.List
import System.Directory
import System.FilePath
import Text.Printf
-- This is designed to match libtcd's dump_tide_record as closely as possible
formatTideRecord :: TideRecord -> IO String
formatTideRecord r =
unli... | neilmayhew/Tides | TCDExtra.hs | mit | 3,769 | 0 | 11 | 1,555 | 809 | 463 | 346 | 60 | 2 |
{-# LANGUAGE NoImplicitPrelude, OverloadedStrings, DoAndIfThenElse #-}
-- | This module provides a way in which the Haskell standard input may be forwarded to the IPython
-- frontend and thus allows the notebook to use the standard input.
--
-- This relies on the implementation of file handles in GHC, and is generally... | gibiansky/IHaskell | src/IHaskell/IPython/Stdin.hs | mit | 4,526 | 0 | 14 | 954 | 722 | 367 | 355 | 64 | 2 |
{-# LANGUAGE UnicodeSyntax #-}
module Data.BEncode.Parser
( string
, value
)
where
import Control.Applicative ((<|>))
import qualified Data.Attoparsec.ByteString.Char8 as AP
(Parser, char, decimal, take)
import qualified Data.Attoparsec.Combinator as AP (manyTill)
import Data.BEncode.Types
import Data.ByteStr... | drdo/swarm-bencode | Data/BEncode/Parser.hs | mit | 839 | 0 | 17 | 136 | 268 | 152 | 116 | -1 | -1 |
module Code where
type BlockName = String
type BlockId = Int
type BlockCode = String
| christiaanb/SoOSiM | examples/Twente/Code.hs | mit | 88 | 0 | 4 | 18 | 22 | 15 | 7 | 4 | 0 |
{-# LANGUAGE OverloadedStrings #-}
-- You need to `cabal install css`
import Language.CSS hiding (borderRadius, boxShadow, textShadow)
import Data.Text.Lazy (Text,append,intercalate,pack)
import qualified Data.Text.Lazy.IO as LIO
import System (getArgs)
main = do
[path] <- getArgs
LIO.writeFile path style
style... | timjb/eine | public/style.hs | mit | 7,314 | 0 | 16 | 1,578 | 2,230 | 967 | 1,263 | 199 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.