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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
-- http://www.codewars.com/kata/558ee8415872565824000007
module Codewars.Kata.Divisible where
isDivisible :: Integral n => n -> [n] -> Bool
isDivisible n xs = n `mod` foldl lcm 1 xs == 0 | Bodigrim/katas | src/haskell/7-Is-n-divisible-by-.hs | bsd-2-clause | 187 | 0 | 8 | 27 | 58 | 32 | 26 | 3 | 1 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS -Wall #-}
----------------------------------------------------------------------
-- |
-- Module : Blaze.ByteString.Builder.ZoomCache
-- Copyright : Conrad Parker
-- License : BSD3-style (see LICENSE)
--
-- Maintainer : Conrad Parker <c... | kfish/zoom-cache | Blaze/ByteString/Builder/ZoomCache.hs | bsd-2-clause | 3,882 | 0 | 13 | 919 | 587 | 343 | 244 | 56 | 1 |
import Control.Applicative
import System.Random
import System.Environment
import HW.FloatAdder.Test
main :: IO ()
main = do args <- getArgs
let len = read $ head args
cases <- generateCases len <$> getStdGen
mapM_ (putStrLn . \(x,y,z) -> show x ++ " " ++ show y ++ " " ++ show z) cases
| grafi-tt/Maizul | fpu-misc/original/fadd-grafi/TestData.hs | bsd-2-clause | 319 | 0 | 15 | 84 | 128 | 64 | 64 | 9 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE OverloadedStrings #-}
module Handsontable.JQuery (
newHandsonTable
) where
import Handsontable (marshalCfg, HandsonOptions)
import Handsontable.JQuery.Internal
import JavaScript.JQuery
--------------------------------------------------... | adinapoli/ghcjs-handsontable | src-ghcjs/Handsontable/JQuery.hs | bsd-3-clause | 481 | 0 | 7 | 50 | 73 | 42 | 31 | 10 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Draw.PostListOverlay where
import Prelude ()
import Prelude.MH
import Brick
import Brick.Widgets.Border
import Brick.Widgets.Center
import Control.Monad.Trans.Reader ( withReaderT )
import qualified Data.Text as T
i... | aisamanra/matterhorn | src/Draw/PostListOverlay.hs | bsd-3-clause | 4,200 | 0 | 24 | 1,446 | 935 | 486 | 449 | -1 | -1 |
-- |
-- Module: Database.Migrate
-- Copyright: (c) 2012 Mark Hibberd
-- License: BSD3
-- Maintainer: Mark Hibberd <mark@hibberd.id.au>
-- Portability: portable
--
-- A library to assist with managing database versioning
-- and migration.
--
-- /Note/: This library is under heavy development, currently
-- ... | markhibberd/database-migrate | src/Database/Migrate.hs | bsd-3-clause | 766 | 0 | 4 | 126 | 68 | 54 | 14 | 6 | 0 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE MultiWayIf #-}
module Hans.Tcp.RecvWindow (
-- * Receive Window
Window(),
emptyWindow,
recvSegment,
rcvWnd,
rcvNxt, setRcvNxt,
rcvRight,
moveRcvRight,
-- ** Sequence Numbers
sequenceNumberValid,
) w... | cartazio/HaNS | src/Hans/Tcp/RecvWindow.hs | bsd-3-clause | 9,742 | 7 | 19 | 2,657 | 1,996 | 1,084 | 912 | 157 | 7 |
{-# LANGUAGE TupleSections #-}
module Rho.SessionState where
import Control.Concurrent
import Control.Monad
import Data.IORef
import Data.List (sortOn)
import qualified Data.Map as M
import Data.Maybe (fromJust)
im... | osa1/rho-torrent | src/Rho/SessionState.hs | bsd-3-clause | 5,766 | 0 | 16 | 1,433 | 1,552 | 807 | 745 | -1 | -1 |
{-# LANGUAGE CPP, TypeOperators #-}
-----------------------------------------------------------------------------
-- |
-- Module : Xmobar.Config
-- Copyright : (c) Andrea Rossato
-- License : BSD-style (see LICENSE)
--
-- Maintainer : Jose A. Ortega Ruiz <jao@gnu.org>
-- Stability : unstable
-- Port... | raboof/xmobar | src/Config.hs | bsd-3-clause | 4,741 | 0 | 18 | 1,647 | 605 | 394 | 211 | 74 | 1 |
module System.Console.OptMatch.Popular where
import Control.Applicative
import Control.Monad
import System.Console.OptMatch
import System.Console.OptMatch.Basic
popular :: (Functor m, Monad m) => a -> (a -> OptMatchT m a) -> OptMatchT m a
popular a m = do
r <- m a <|> fixAndRetry
popular r m <|> return r where
... | pasberth/optmatch | System/Console/OptMatch/Popular.hs | bsd-3-clause | 732 | 0 | 10 | 150 | 288 | 143 | 145 | 23 | 1 |
module Blog.BackEnd.ModelChangeListener where
import Blog.Model.Entry ( Model )
class ModelChangeListener c where
handle_model_change :: c -> Model -> IO ()
| prb/perpubplat | src/Blog/BackEnd/ModelChangeListener.hs | bsd-3-clause | 165 | 0 | 10 | 28 | 45 | 25 | 20 | 4 | 0 |
{-# LANGUAGE ScopedTypeVariables #-}
module Application (program, Handles (..))
where
import Common
import Lib
import Data.Either
import Data.Typeable
import Data.Maybe
import Control.Monad
import Control.Applicative
import Control.Concurrent
import Control.Concurrent.STM
import Workers
import Dump
import Restore
da... | paolino/michelle | Application.hs | bsd-3-clause | 2,454 | 34 | 17 | 591 | 935 | 488 | 447 | 71 | 4 |
module Twitch (module M, module Twitch) where
import Twitch.Irc.Client as M
import Twitch.Irc.Parser as M
import Twitch.Irc.Constants as M
import Twitch.Irc.Types as M | Globidev/Twitch-hs | src/Twitch.hs | bsd-3-clause | 168 | 0 | 4 | 23 | 46 | 34 | 12 | 5 | 0 |
{-# LANGUAGE RecordWildCards #-}
module Engine
( engine
) where
import Control.Monad (forever)
import Control.Monad.Reader (ask, liftIO)
import Control.Concurrent (threadDelay)
import Data.IORef (readIORef)
import Display
import Linear.V3
import Render
import Render.Engine
import Render.Mesh
import qualified SDL ... | Lucsanszky/soft-engine | src/Engine.hs | bsd-3-clause | 755 | 0 | 14 | 167 | 232 | 121 | 111 | 26 | 1 |
{-# LANGUAGE DataKinds #-}
module ElmFormat.Parse where
import Elm.Utils ((|>))
import AST.V0_16
import AST.Module (Module)
import AST.Structure ( ASTNS )
import Data.Coapplicative
import qualified Data.Text as Text
import ElmVersion ( ElmVersion )
import qualified Parse.Literal
import qualified Parse.Parse as Parse
... | avh4/elm-format | elm-format-lib/src/ElmFormat/Parse.hs | bsd-3-clause | 1,519 | 0 | 12 | 308 | 473 | 256 | 217 | 41 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_HADDOCK show-extensions #-}
-- |
-- Module : ProcessMining.Model.PetriNet.Graphviz
-- Copyright : Mauro Taraborelli 2015
-- License : BSD3
--
-- Maintainer : maurotaraborelli@gmail.com
-- Stability : experimental
-- Portability : unknown
--
-- Algorithm... | maurotrb/processmining | src/ProcessMining/Model/PetriNet/Graphviz.hs | bsd-3-clause | 3,435 | 0 | 24 | 1,134 | 490 | 284 | 206 | 36 | 1 |
-- |
-- This module implements a service for interfacing with the Interactive
-- Brokers API.
module API.IB
( module API.IB.Connection
, module API.IB.Data
, module API.IB.Enum
, module Currency
)
where
import API.IB.Connection
import API.IB.Data
import API.IB.Enum
import Currency
-------------------... | RobinKrom/interactive-brokers | library/API/IB.hs | bsd-3-clause | 378 | 0 | 5 | 58 | 58 | 41 | 17 | 9 | 0 |
{-# LANGUAGE BangPatterns, OverloadedStrings, TupleSections #-}
module Main where
import Control.Arrow (second)
import Control.Monad.Trans (liftIO)
import Control.Monad.Random (evalRandIO)
import Data.Default.Class (def)
import qualified Data.Text as T
import qualified Data.Text.Lazy as TL
import qualified Data.Text.I... | pzel/slowotok | app/Main.hs | bsd-3-clause | 1,939 | 0 | 17 | 418 | 687 | 362 | 325 | 50 | 2 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE OverloadedStrings #-}
module Configurator.Dsl
where
import Control.Applicative hiding (many, (<|>))
import Control.Monad
import Data.Monoid ... | chemist/fixmon | src/Configurator/Dsl.hs | bsd-3-clause | 6,134 | 0 | 34 | 1,862 | 2,266 | 1,167 | 1,099 | 131 | 6 |
module Main where
import qualified CLI
import qualified API.Main as API
import System.Environment
import System.IO (hPutStrLn, stderr)
main :: IO ()
main = getArgs >>= chooseMode
chooseMode :: [String] -> IO ()
chooseMode [] = hPutStrLn stderr "Invalid arguments. Use --cli or --api"
chooseMode ("--cli":_) = CLI.ma... | robmcl4/Glug | app/Main.hs | bsd-3-clause | 410 | 0 | 7 | 63 | 132 | 73 | 59 | 12 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Language.R.Evaluate
-- Copyright : (c) 2010 David M. Rosenberg
-- License : BSD3
--
-- Maintainer : David Rosenberg <rosenbergdm@uchicago.edu>
-- Stability : experimental
-- Portability : portable
-- Created ... | rosenbergdm/language-r | src/Language/R/Evaluate.hs | bsd-3-clause | 518 | 0 | 4 | 76 | 27 | 23 | 4 | 2 | 0 |
{-|
CRUD functionality for 'TagRel's.
-}
module Database.OrgMode.Internal.Query.TagRel where
import Database.Esqueleto
import qualified Database.Persist as P
import Database.OrgMode.Internal.Import
import Database.OrgMode.Internal.Types
--------------------------------------------------... | rzetterberg/orgmode-sql | lib/Database/OrgMode/Internal/Query/TagRel.hs | bsd-3-clause | 1,478 | 0 | 12 | 376 | 291 | 158 | 133 | 24 | 1 |
{-# LANGUAGE CPP #-}
module Happstack.Server.Internal.Socket
( acceptLite
, sockAddrToPeer
) where
import Data.List (intersperse)
import Data.Word (Word32)
import qualified Network.Socket as S
( Socket
, PortNumber()
, SockAddr(..)
, HostName
, accept
)
import Numeric (showHex)
type HostAddres... | Happstack/happstack-server | src/Happstack/Server/Internal/Socket.hs | bsd-3-clause | 1,806 | 0 | 10 | 425 | 643 | 374 | 269 | 44 | 3 |
{-# LANGUAGE CPP #-}
-- | Ways for the client to use player input via UI to produce server
-- requests, based on the client's view (visualized for the player)
-- of the game state.
module Game.LambdaHack.Client.UI
( -- * Client UI monad
MonadClientUI
-- * Assorted UI operations
, queryUI, pongUI
, display... | beni55/LambdaHack | Game/LambdaHack/Client/UI.hs | bsd-3-clause | 6,828 | 5 | 31 | 1,989 | 1,464 | 793 | 671 | -1 | -1 |
module System.Build.Data
(
module System.Build.Data.KeyPValue
, module System.Build.Data.SourceRelease
) where
import System.Build.Data.KeyPValue
import System.Build.Data.SourceRelease
| tonymorris/lastik | System/Build/Data.hs | bsd-3-clause | 190 | 0 | 5 | 19 | 39 | 28 | 11 | 6 | 0 |
{-# LANGUAGE PatternGuards #-}
module Idris.DataOpts where
-- Forcing, detagging and collapsing
import Idris.AbsSyntax
import Idris.AbsSyntaxTree
import Idris.Core.TT
import Control.Applicative
import Data.List
import Data.Maybe
import Debug.Trace
class Optimisable term where
applyOpts :: term -> Idris term
i... | andyarvanitis/Idris-dev | src/Idris/DataOpts.hs | bsd-3-clause | 4,137 | 1 | 16 | 1,083 | 1,684 | 832 | 852 | 76 | 4 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Turtle.Shell
import Turtle.Line
import Turtle.Prelude hiding (die)
import Data.Aeson
import Data.Text (unpack, pack, Text)
import System.Directory (getAppUserDataDirectory, getDirectoryContents)
import System.FilePath ((</>), dropExtension)
import qualified ... | AlexeyRaga/eta | tests/packages/Test.hs | bsd-3-clause | 3,681 | 0 | 17 | 776 | 1,072 | 533 | 539 | 97 | 2 |
module DayOfWeek where
data DayOfWeek =
Mon | Tue | Weds | Thu | Fri | Sat | Sun
deriving (Ord, Show, Eq)
check' :: Ord a => a -> a -> Bool
check' a a' = a == a' | brodyberg/Notes | ProjectRosalind.hsproj/LearnHaskell/lib/HaskellBook/DayOfWeek.hs | mit | 168 | 0 | 7 | 46 | 78 | 44 | 34 | 6 | 1 |
{- DATX02-17-26, automated assessment of imperative programs.
- Copyright, 2017, see AUTHORS.md.
-
- 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... | Centril/DATX02-17-26 | libsrc/CoreS/ASTUnitypeUtils.hs | gpl-2.0 | 10,697 | 0 | 17 | 4,320 | 3,473 | 1,670 | 1,803 | 207 | 42 |
{-# LANGUAGE DeriveDataTypeable #-}
module Arbre.Path
(
SourcePath(..),
Path(..)
)
where
import Data.Typeable
import Data.Data
import Data.Map as M
import Arbre.Expressions
data SourcePath = SourcePath String Path
data Path = Path [Literal]
-- resolve :: LiteralProgram -> Path ->
| blanu/arbre | Arbre/Path.hs | gpl-2.0 | 290 | 0 | 7 | 48 | 69 | 44 | 25 | 11 | 0 |
import Control.Monad (forM_)
import Data.List
import Test.HUnit
import qualified Portage.Dependency as P
import qualified Portage.Dependency.Normalize as PN
import qualified Portage.PackageId as P
import qualified Portage.Use as P
import qualified RunTests as RT
tests :: Test
tests = TestList [ TestLabel "no... | gentoo-haskell/hackport | tests/normalize_deps.hs | gpl-3.0 | 10,035 | 4 | 21 | 5,586 | 2,056 | 1,108 | 948 | 128 | 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-elasticache/gen/Network/AWS/ElastiCache/CreateCacheSubnetGroup.hs | mpl-2.0 | 5,815 | 0 | 13 | 1,112 | 712 | 429 | 283 | 93 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{- |
Module : Network.MPD.Applicative.PlaybackControl
Copyright : (c) Joachim Fasting 2012
License : MIT
Maintainer : joachifm@fastmail.fm
Stability : stable
Portability : unportable
Controlling playback.
-}
module Network.MPD.Applicative.PlaybackControl
( next
... | bens/libmpd-haskell | src/Network/MPD/Applicative/PlaybackControl.hs | lgpl-2.1 | 2,090 | 0 | 10 | 442 | 457 | 250 | 207 | 38 | 1 |
{-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI, OverloadedStrings #-}
module Reflex.Dom.Xhr.Foreign (
XMLHttpRequest
, XMLHttpRequestResponseType
, module Reflex.Dom.Xhr.Foreign
) where
import Prelude hiding (error)
import Data.Text (Text)
import GHCJS.DOM.Types hiding (Text)
import GHCJS.DOM
import GHC... | hamishmack/reflex-dom | src-ghcjs/Reflex/Dom/Xhr/Foreign.hs | bsd-3-clause | 4,888 | 0 | 13 | 651 | 1,139 | 608 | 531 | 84 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies, DataKinds, UndecidableInstances, PolyKinds #-}
module T6018th where
import Language.Haskell.TH
-- Test that injectivity works correct with TH. This test is not as exhaustive
-- as the original T6018 test.
-- type family F a b c = (result :: k) | result -> ... | mpickering/ghc-exactprint | tests/examples/ghc8/T6018th.hs | bsd-3-clause | 4,142 | 0 | 17 | 1,410 | 1,226 | 629 | 597 | 80 | 0 |
{-# LANGUAGE RebindableSyntax #-}
{-# OPTIONS_GHC -fplugin Control.Supermonad.Plugin #-}
{-
******************************************************************************
* H M T C *
* ... | jbracker/supermonad-plugin | examples/monad/hmtc/supermonad/MTStdEnv.hs | bsd-3-clause | 4,706 | 0 | 10 | 1,595 | 974 | 583 | 391 | 51 | 1 |
-- Use GtkSocket and GtkPlug for cross-process embedded.
-- Just startup program, press 'm' to create tab with new button.
-- Click button for hang to simulate plug hanging process,
-- but socket process still running, can switch to other tab.
module Main where
import System.Process
import System.Environment
import S... | phischu/gtk2hs | gtk/demo/embedded/Embedded.hs | lgpl-3.0 | 2,460 | 0 | 19 | 628 | 454 | 237 | 217 | 52 | 2 |
{-|
Module : Idris.IdrisDoc
Description : Generation of HTML documentation for Idris code
Copyright :
License : BSD3
Maintainer : The Idris Community.
-}
{-# LANGUAGE OverloadedStrings, PatternGuards #-}
{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
module Idris.IdrisDoc (generateDocs) where
import Idris.... | bravit/Idris-dev | src/Idris/IdrisDoc.hs | bsd-3-clause | 30,519 | 0 | 23 | 9,649 | 8,779 | 4,486 | 4,293 | 529 | 19 |
{-# LANGUAGE CPP
, DataKinds
, EmptyCase
, ExistentialQuantification
, FlexibleContexts
, GADTs
, GeneralizedNewtypeDeriving
, KindSignatures
, MultiParamTypeClasses
, OverloadedStrings
, PolyKinds
,... | zachsully/hakaru | haskell/Language/Hakaru/Syntax/CSE.hs | bsd-3-clause | 4,858 | 0 | 14 | 1,340 | 1,280 | 670 | 610 | 93 | 3 |
module Proposal229b ((~), (@)) where
(~) :: a -> b -> (a, b)
x ~ y = (x, y)
(@) :: a -> b -> (a, b)
x @ y = (x, y)
r :: ((Bool, Bool), Bool)
r = True ~ False @ True
| sdiehl/ghc | testsuite/tests/parser/should_compile/proposal-229b.hs | bsd-3-clause | 168 | 7 | 10 | 48 | 129 | 74 | 55 | -1 | -1 |
{-# LANGUAGE MagicHash, NoImplicitPrelude, UnboxedTuples #-}
module GHC.PrimopWrappers where
import qualified GHC.Prim
import GHC.Tuple ()
import GHC.Prim (Char#, Int#, Word#, Float#, Double#, Word64#, Int64#, State#, MutableArray#, Array#, SmallMutableArray#, SmallArray#, MutableByteArray#, ByteArray#, Addr#, StablePt... | jtojnar/haste-compiler | libraries/ghc-7.10/ghc-prim/GHC/PrimopWrappers.hs | bsd-3-clause | 59,078 | 0 | 13 | 8,851 | 18,412 | 9,710 | 8,702 | 1,220 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}
(~#) :: Comonad w => CascadeW w (t ': ts) -> w t -> Last (t ': ts)
(~#) = cascadeW
infixr 0 ~#
| sdiehl/ghc | testsuite/tests/ghc-api/annotations/Test15303.hs | bsd-3-clause | 176 | 0 | 10 | 55 | 66 | 36 | 30 | 5 | 1 |
module Crosscells.Tokens
( Direction(..)
, Token(..)
, parseTokens
) where
import Data.Char
import Data.Foldable
import Data.Vector (Vector)
import qualified Data.Vector as V
import Crosscells.Region
data Token
= Arrow Direction
| Box
| Plus Int
| Times Int
| Bracketed Int
| Number Int
deriving... | glguy/5puzzle | Crosscells/Tokens.hs | isc | 2,899 | 0 | 15 | 701 | 1,384 | 703 | 681 | 64 | 1 |
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
module Futhark.CodeGen.Backends.COpenCL.Boilerplate
( generateBoilerplate
, kernelRuntime
, kernelRuns
) where
import Data.FileEmbed
import qualified Language.C.Syntax as C
import qualified Language.C.Quote.OpenCL as C
import Futhark.CodeGen.ImpCo... | ihc/futhark | src/Futhark/CodeGen/Backends/COpenCL/Boilerplate.hs | isc | 11,189 | 0 | 14 | 3,453 | 1,567 | 892 | 675 | 130 | 5 |
-- Compose
-- ref: https://wiki.haskell.org/Compose
-- compose :: [a -> a] -> (a -> a)
-- chaining function
-- sane solution
compose :: [a -> a] -> a -> a
compose fs v = foldl (flip (.)) id fs $ v
-- using State
composeState :: [a -> a] -> a -> a
composeState = execState . mapM modify
-- consider it in the less et... | Airtnp/Freshman_Simple_Haskell_Lib | Idioms/Compose.hs | mit | 2,656 | 7 | 16 | 898 | 658 | 347 | 311 | -1 | -1 |
module Main where
import Test.DocTest
main :: IO ()
main = doctest ["Hello.hs"]
| kagamilove0707/learn-cabal | test/doctest.hs | mit | 82 | 0 | 6 | 15 | 30 | 17 | 13 | 4 | 1 |
module Import.NoFoundation
( module Import
) where
import Model as Import
import Settings as Import
import Settings.StaticFiles as Import
import Token as Import
import ClassyPrelude.Yesod as Import
import Data.Aeson as Import
import Yesod.Core.Types as Import (loggerSet)
import Yesod.Default.Config2 as Impor... | pbrisbin/tee-io | src/Import/NoFoundation.hs | mit | 322 | 0 | 5 | 51 | 69 | 50 | 19 | 10 | 0 |
{-# LANGUAGE OverloadedStrings, TypeSynonymInstances, FlexibleInstances #-}
module Y2017.M10.D05.Solution where
{--
Yesterday, I said: "Go out to the database, get some data, analyze it and chart
it." Well, that's all good if you can work on the problem when you have access
to the internet at large to retrieve your d... | geophf/1HaskellADay | exercises/HAD/Y2017/M10/D05/Solution.hs | mit | 6,403 | 0 | 14 | 1,380 | 962 | 527 | 435 | 57 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Tile where
import Data.Aeson ((.=), ToJSON, toJSON)
import qualified Data.Aeson as J
import qualified Data.ByteString.Lazy.Char8 as L
import System.FilePath ((</>))
import Geometry.Point
import Geometry.Rect
import RoadLink
import RoadNode
data Tile = T
{ tRoadLinks ... | mietek/map-cutter | src/Tile.hs | mit | 3,147 | 0 | 11 | 901 | 924 | 523 | 401 | 85 | 1 |
import Math.NumberTheory.Primes
main = print . sum . takeWhile (<2000000) $ primes
| chrisfosterelli/euler.hs | solutions/010.hs | mit | 83 | 0 | 8 | 12 | 31 | 17 | 14 | 2 | 1 |
module Database.Kafka (
module Database.Kafka.Core,
module Database.Kafka.Types
) where
import Database.Kafka.Core
import Database.Kafka.Types | yanatan16/haskell-kafka | src/Database/Kafka.hs | mit | 145 | 0 | 5 | 15 | 34 | 23 | 11 | 5 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module JPSubreddits.Source.Newsokur where
import Control.Applicative
import Control.Monad.IO.Class (MonadIO)
import Data.Maybe (listToMaybe, mapMaybe)
import qualified Data.Text as T
import JPSubreddits.Types
import ... | sifisifi/jpsubreddits | src/JPSubreddits/Source/Newsokur.hs | mit | 2,597 | 0 | 15 | 460 | 616 | 352 | 264 | 38 | 1 |
-- | Data type for Mailgun API keys.
module Mailgun.APIKey
( APIKey(..)
) where
import Data.Aeson (FromJSON, parseJSON)
import Data.ByteArray (ByteArrayAccess)
import Data.ByteString (ByteString)
import Data.Text.Encoding (encodeUtf8)
-- | A Mailgun API key.
newtype APIKey = APIKey { unAPIKey :: ByteString }
de... | fusionapp/catcher-in-the-rye | src/Mailgun/APIKey.hs | mit | 447 | 0 | 7 | 70 | 116 | 69 | 47 | 10 | 0 |
{- |
module: $Header$
description: Primitive 16-bit word functions
license: MIT
maintainer: Joe Leslie-Hurd <joe@gilith.com>
stability: provisional
portability: portable
-}
module OpenTheory.Primitive.Word16
( Word16,
and,
bit,
fromBytes,
fromNatural,
not,
or,
shiftLeft,
shiftRight,
... | gilith/opentheory | data/haskell/opentheory-primitive/src/OpenTheory/Primitive/Word16.hs | mit | 1,527 | 0 | 9 | 260 | 474 | 272 | 202 | 37 | 2 |
type Point = (Int, Int)
data Direction = North | South | East | West
origin :: Point
origin = (0, 0)
displacement :: Point -> Point -> Int
displacement (x1, y1) (x2, y2) = xdiff + ydiff
where xdiff = abs (x1 - x2)
ydiff = abs (y1 - y2)
move :: Point -> Direction -> Int -> [Point]
move _ _ 0 = []
move ... | ajm188/advent_of_code | 2016/01/Main.hs | mit | 1,486 | 0 | 16 | 460 | 724 | 388 | 336 | 41 | 4 |
module Interaction.FarmingProperties where
import TestFramework
import TestHelpers
import Rules
import Prelude hiding (lookup)
import Test.Tasty
import Test.Tasty.QuickCheck
import Test.QuickCheck.Monadic
import Data.List ((\\))
import Data.Map (keys, lookup)
import Data.Maybe (listToMaybe)
import Data.Function ((&))... | martin-kolinek/some-board-game-rules | test/Interaction/FarmingProperties.hs | mit | 5,520 | 0 | 17 | 1,063 | 1,546 | 736 | 810 | 104 | 4 |
-- | A minimal Haskbot server can be run via:
--
-- > {-# LANGUAGE OverloadedStrings #-}
-- >
-- > import Network.Haskbot
-- > import Network.Haskbot.Config
-- > import Network.Haskbot.Plugin
-- > import qualified Network.Haskbot.Plugin.Help as Help
-- >
-- > main :: IO ()
-- > main = haskbot config registry
-- >
-- > ... | Jonplussed/haskbot-core | src/Haskbot.hs | mit | 1,536 | 0 | 8 | 324 | 99 | 72 | 27 | 10 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-logconfig.html
module Stratosphere.ResourceProperties.AppSyncGraphQLApiLogConfig where
im... | frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/AppSyncGraphQLApiLogConfig.hs | mit | 2,139 | 0 | 12 | 205 | 264 | 151 | 113 | 27 | 1 |
-- Copyright (c) 2005, 2008 Don Stewart - http://www.cse.unsw.edu.au/~dons
-- Introductory binding for the 'ee' editor
module Yi.Keymap.Ee ( keymap ) where
import Yi.Yi
import Control.Arrow
import Yi.Keymap.Emacs.KillRing
keymap :: Keymap
keymap = comap eventToChar (command +++ insert)
-- Control keys:
-- ^a ascii... | codemac/yi-editor | src/Yi/Keymap/Ee.hs | gpl-2.0 | 1,579 | 0 | 10 | 667 | 288 | 172 | 116 | 22 | 1 |
module Settings.StaticFiles where
import Prelude (IO)
import Yesod.Static
import qualified Yesod.Static as Static
import Settings (staticDir)
import Settings.Development
import Language.Haskell.TH (Q, Exp, Name)
import Data.Default (def)
-- | use this to create your static file serving site
staticSite :: IO Static.St... | marcellussiegburg/autotool | yesod/Settings/StaticFiles.hs | gpl-2.0 | 1,096 | 0 | 8 | 184 | 191 | 108 | 83 | -1 | -1 |
import Control.Monad.Reader
import System.Environment
import System.Console.Haskeline
import FQuoter.Commands
import FQuoter.Config.Config
import FQuoter.Parser.Parser
main :: IO ()
main = runInputT defaultSettings interpreter
interpreter :: InputT IO ()
interpreter = do args <- liftIO getArgs
confi... | Raveline/FQuoter | src/FQuoter/Main.hs | gpl-3.0 | 502 | 0 | 11 | 134 | 138 | 69 | 69 | 14 | 2 |
{-|
Module : Lipid.Parsers.KnownSn.GlycerophospholipidSpec
Description :
Copyright : Michael Thomas
License : GPL-3
Maintainer : Michael Thomas <Michaelt293@gmail.com>
Stability : Experimental
-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TypeApplications #-}
module Lipid.Parsers.KnownSn.Glycerophospholip... | Michaelt293/Lipid-Haskell | test/Lipid/Parsers/KnownSn/GlycerophospholipidSpec.hs | gpl-3.0 | 9,327 | 0 | 17 | 1,649 | 1,948 | 1,079 | 869 | 143 | 1 |
{---------------------------------------------------------------------}
{- Copyright 2015 Nathan Bloomfield -}
{- -}
{- This file is part of Feivel. -}
{- ... | nbloomf/carl | src/Carl/Algebra/Ring.hs | gpl-3.0 | 19,071 | 0 | 18 | 5,319 | 8,267 | 4,247 | 4,020 | -1 | -1 |
module Y2010.Q.C where
import Data.List
import Data.Maybe
solve :: Problem -> Solution
parse :: [String] -> [Problem]
data Solution = Solution Int
deriving Eq
instance Show Solution where
show (Solution x) = show x
data Problem = Problem { rides :: Int
, capacity :: Int
... | joranvar/GoogleCodeJam | Y2010/Q/C.hs | gpl-3.0 | 1,939 | 0 | 16 | 666 | 708 | 361 | 347 | 41 | 1 |
module Test where
import Test.Tasty
import Test.Tasty.SmallCheck as SC
import Test.Tasty.QuickCheck as QC
import Test.Tasty.HUnit
import Environment.Discrete
main :: IO ()
main = defaultMain tests
tests :: TestTree
tests = testGroup "FrABS Tests" [unitTests, propTests]
unitTests :: TestTree
unitTests =
testGrou... | thalerjonathan/phd | coding/libraries/chimera/src/tests/Test.hs | gpl-3.0 | 510 | 0 | 6 | 88 | 111 | 66 | 45 | 20 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-apps-licensing/gen/Network/Google/Resource/Licensing/LicenseAssignments/Get.hs | mpl-2.0 | 6,093 | 0 | 22 | 1,502 | 871 | 508 | 363 | 127 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module NGramCrackers.Parsers.Paragraph
( parseSent
, parseParagraph
, parseMultiPara
, wordString
) where
import Control.Applicative ((<$>), (<*), (*>), (<*>), (<|>), liftA3)
import Data.Functor (void)
import Data.List (concat, unwords)
import Data.Text as T
imp... | R-Morgan/NGramCrackers | testsuite/NGramCrackers/Parsers/Paragraph.hs | agpl-3.0 | 2,528 | 0 | 12 | 714 | 679 | 373 | 306 | 54 | 1 |
module HelperSequences.A001057Spec (main, spec) where
import Test.Hspec
import HelperSequences.A001057 (a001057)
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "A001057" $
it "correctly computes the first 20 elements" $
take 20 (map a001057 [0..]) `shouldBe` expectedValue where
expectedValue... | peterokagey/haskellOEIS | test/HelperSequences/A001057Spec.hs | apache-2.0 | 375 | 0 | 10 | 59 | 178 | 104 | 74 | 10 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE ViewPatterns #-}
-- |
-- XML Signature Syntax and Processing
--
-- <http://www.w3.org/TR/2008/REC-xmldsig-core-20080610/> (selected portions)
module SAML2.XML.Signature
( module SAML2.XML.Signature.Types
, generateReference
, SigningKey(..)
, PublicKeys(..)
, signingKeySignat... | dylex/hsaml2 | SAML2/XML/Signature.hs | apache-2.0 | 9,878 | 0 | 17 | 1,634 | 3,140 | 1,648 | 1,492 | -1 | -1 |
{- |
Module : Data.Time.Zones.Types
Copyright : (C) 2014 Mihaly Barasz
License : Apache-2.0, see LICENSE
Maintainer : Mihaly Barasz <klao@nilcons.com>
Stability : experimental
-}
{-# LANGUAGE DeriveDataTypeable #-}
module Data.Time.Zones.Types (
TZ(..),
utcTZ,
) where
import Control.Dee... | nilcons/haskell-tz | Data/Time/Zones/Types.hs | apache-2.0 | 1,067 | 0 | 12 | 236 | 239 | 140 | 99 | 27 | 1 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE ScopedTypeVariables #-}
module DNA (
-- * Definition of actors
ActorDef
, actor
, simpleOut
, rule
, scatterGather
, producer
, startingState
-- * Definition of dataflow graph
, Dataflow
, A
, buildDataflow
... | SKA-ScienceDataProcessor/RC | MS1/dna/DNA.hs | apache-2.0 | 5,207 | 0 | 16 | 1,264 | 1,607 | 860 | 747 | 107 | 7 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ExistentialQuantification #-}
module Example.Runner where
import System.IO
import Data.IORef
import Control.Monad
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as BL
impor... | Cordite-Studios/solar-continuum | examples/Example/Runner.hs | bsd-2-clause | 7,733 | 3 | 19 | 2,574 | 2,440 | 1,192 | 1,248 | 166 | 19 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Application
( withMovieData
, withDevelAppPort
) where
import Import
import Settings
import Yesod.Static
import Yesod.Auth
import Yesod.Default.Config
import Yesod.Default.Main
import Yesod.Default.Handlers
import Yesod.Logger (Logger)
import Data.Dynamic (Dynam... | axman6/MovieServer | Application.hs | bsd-2-clause | 1,657 | 0 | 14 | 271 | 299 | 166 | 133 | -1 | -1 |
module Propellor.Property.HostingProvider.DigitalOcean (
distroKernel
) where
import Propellor.Base
import qualified Propellor.Property.Apt as Apt
import qualified Propellor.Property.File as File
import qualified Propellor.Property.Reboot as Reboot
import Data.List
-- | Digital Ocean does not provide any way to boo... | np/propellor | src/Propellor/Property/HostingProvider/DigitalOcean.hs | bsd-2-clause | 1,974 | 18 | 10 | 309 | 361 | 204 | 157 | 30 | 1 |
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-| Common helper functions and instances for all Ganeti tests.
-}
{-
Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that t... | mbakke/ganeti | test/hs/Test/Ganeti/TestCommon.hs | bsd-2-clause | 20,889 | 0 | 20 | 4,537 | 4,834 | 2,581 | 2,253 | 362 | 4 |
{-# LANGUAGE FlexibleInstances #-}
module Distribution.Server.Framework.MemSize (
MemSize(..),
memSizeMb, memSizeKb,
memSize0, memSize1, memSize2, memSize3, memSize4,
memSize5, memSize6, memSize7, memSize8, memSize9, memSize10,
memSizeUArray, memSizeUVector
) where
import Data.Word
import qualified Data.Ma... | agrafix/hackage-server | Distribution/Server/Framework/MemSize.hs | bsd-3-clause | 7,902 | 0 | 15 | 2,292 | 3,118 | 1,618 | 1,500 | 167 | 1 |
{-# LANGUAGE CPP, DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
#if __GLASGOW_HASKELL__ < 707
{-# LANGUAGE StandaloneDeriving #-}
#endif
-- Hack approach to support bootstrapping.
-- When MIN_VERSION_binary macro is available, use it. But it's not available
-- during bootstrapping (or anyone else building Setu... | edsko/cabal | Cabal/src/Distribution/Version.hs | bsd-3-clause | 32,803 | 0 | 17 | 8,822 | 6,294 | 3,390 | 2,904 | 455 | 12 |
{-# LANGUAGE FlexibleInstances, FlexibleContexts #-}
-- | This module provides various simple ways to query and manipulate
-- fundamental Futhark terms, such as types and values. The intent is to
-- keep "Futhark.Language.Syntax" simple, and put whatever embellishments
-- we need here.
module Language.Futhark.Attribut... | mrakgr/futhark | src/Language/Futhark/Attributes.hs | bsd-3-clause | 33,874 | 0 | 13 | 7,890 | 10,091 | 5,114 | 4,977 | 647 | 6 |
module Generator where
import Control.Applicative
import Control.Monad
import Data.ByteString (ByteString)
import qualified Data.ByteString as B
import Data.ByteString.Char8 (cons, pack, unpack)
import Data.List as L (drop, length, take)
import ... | thumphries/weather | src/Generator.hs | bsd-3-clause | 5,904 | 0 | 18 | 2,097 | 1,969 | 1,054 | 915 | -1 | -1 |
--------------------------------------------------------------------------------
{-# LANGUAGE OverloadedStrings #-}
module NumberSix.Handlers.Http
( handler
) where
--------------------------------------------------------------------------------
import Control.Exception (SomeException (..), handl... | jaspervdj/number-six | src/NumberSix/Handlers/Http.hs | bsd-3-clause | 2,112 | 0 | 17 | 502 | 495 | 264 | 231 | 38 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Utils.Scotty.MustacheRender(
module Text.Mustache
,hastache
) where
import Data.Text as T
import Data.Maybe
import Text.Mustache
hastache :: (ToMustache k) => [FilePath] ->
FilePath -> k -> IO (Maybe T.Text)
hastache searchSpace tpl ctx = do
eitherTemplate <- automatic... | DavidAlphaFox/sblog | src/Utils/Scotty/MustacheRender.hs | bsd-3-clause | 486 | 0 | 12 | 88 | 142 | 75 | 67 | 15 | 2 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
-- NOTICE: Some of these tests are /unsafe/, and will fail intermittently, since
-- they rely on ordering constraints which the Cloud Haskell runtime does not
-- guarantee.
module Main where
import Control.Concurrent.MVar
( MVar
, newMVar
... | haskell-distributed/distributed-process-platform | tests/TestSupervisor.hs | bsd-3-clause | 57,885 | 1 | 24 | 15,416 | 14,605 | 7,065 | 7,540 | 1,111 | 3 |
module Settings where
import Prelude
import Text.Shakespeare.Text (st)
import Language.Haskell.TH.Syntax
import Database.Persist.Sqlite (SqliteConf)
import Yesod.Default.Config
import Yesod.Default.Util
import Data.Text (Text)
import Data.Yaml
import Data.Default
import Control.Applicative
import Settings.Development
... | pxqr/bitidx | Settings.hs | bsd-3-clause | 2,458 | 0 | 9 | 431 | 287 | 180 | 107 | -1 | -1 |
module Main where
import Test.Hspec
import System.Process
import qualified Spec
main :: IO ()
main = do
_ <- system "cd ../../example/todo && make"
hspec Spec.spec
| nrolland/react-flux | test/spec/Main.hs | bsd-3-clause | 174 | 0 | 8 | 36 | 51 | 27 | 24 | 8 | 1 |
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GADTs, FlexibleContexts #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
import System.GitControl... | NicolasDP/gitcontrol-sqlite | src/GitControlSQLite.hs | bsd-3-clause | 1,969 | 2 | 23 | 530 | 476 | 249 | 227 | -1 | -1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE UnicodeSyntax #-}
{-|
[@ISO639-1@] tr
[@ISO639-2@] tur
[@ISO639-3@] tur
[@Native name@] Türkçe
[@English name@] Turkish
-}
module Text.Numeral.Language.TUR
( --... | telser/numerals | src/Text/Numeral/Language/TUR.hs | bsd-3-clause | 5,957 | 27 | 14 | 2,469 | 1,691 | 957 | 734 | 115 | 13 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Compiler.UniqueFM where
import Data.Monoid
import Data.Maybe
import Data.Traversable
import Data.Foldable hiding (foldl)
import qualified Data.IntMap as I
import Compiler.Unique
newtype UniqueFM a = UFM { unUFM :: I.IntMap a } deriving (Show, Functor, Monoid, Folda... | YoEight/hk-coolc | src/Compiler/UniqueFM.hs | bsd-3-clause | 2,004 | 0 | 9 | 399 | 915 | 460 | 455 | 43 | 1 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Feldspar.Core.Constructs.Switch where
import Language.Syntactic
import Languag... | emwap/feldspar-language | src/Feldspar/Core/Constructs/Switch.hs | bsd-3-clause | 2,183 | 0 | 15 | 508 | 686 | 359 | 327 | 49 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ExtendedDefaultRules #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# OPTIONS_GHC -fno-warn-orphans -fno-warn-missing-signatures -fno-warn-... | pharpend/structured-haskell-mode | src/Main.hs | bsd-3-clause | 10,188 | 0 | 20 | 2,966 | 2,453 | 1,289 | 1,164 | 206 | 4 |
{-# OPTIONS_GHC -fno-warn-tabs #-}
{- $Id: TestsArr.hs,v 1.2 2003/11/10 21:28:58 antony Exp $
******************************************************************************
* Y A M P A *
* ... | ivanperez-keera/Yampa | yampa/tests/TestsArr.hs | bsd-3-clause | 1,697 | 0 | 8 | 606 | 300 | 189 | 111 | 26 | 1 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TemplateHaskell #-}
module Cataskell.Serialize where
import Cataskell.SerializeOpts
import Cataskell.Game
import Cataskell.GameData.Actions
import Cataskell.GameData.Basics
import Cataskell.GameD... | corajr/cataskell | src/Cataskell/Serialize.hs | bsd-3-clause | 2,234 | 0 | 8 | 267 | 597 | 283 | 314 | 61 | 0 |
data X = X { foo :: Int
, bar :: String
} deriving Eq
| itchyny/vim-haskell-indent | test/recordtype/record.out.hs | mit | 76 | 0 | 8 | 37 | 25 | 15 | 10 | 3 | 0 |
{-# LANGUAGE BangPatterns #-}
--
-- Copyright : (c) T.Mishima 2014
-- License : Apache-2.0
--
module GLFWWindow
( GLFWHandle
, UIMode (..)
--
, initGLFW
, pollGLFW
, getDeltTime
, setUIMode
, togleUIMode
, getWindowSize
, swapBuff
, getExitReqGLFW
, exitGLFW
, toggleFullScreenMode
--
... | tmishima/bindings-Oculus | test/case2/GLFWWindow.hs | apache-2.0 | 13,983 | 0 | 19 | 3,485 | 4,311 | 2,178 | 2,133 | 361 | 4 |
{-# LANGUAGE DeriveGeneric, OverloadedStrings, BangPatterns, ScopedTypeVariables #-}
module Main where
-- import Control.Concurrent.Async
import Control.Concurrent.ParallelIO.Global
import Control.DeepSeq
import Control.Exception
import Control.Monad
import qualified Data.ByteString.Lazy.Char8 as LBS
import Data.Csv
i... | ucsd-progsys/nanomaly | bin/CheckAllFrom.hs | bsd-3-clause | 7,381 | 0 | 28 | 2,322 | 2,110 | 1,091 | 1,019 | 180 | 4 |
{-
Teak synthesiser for the Balsa language
Copyright (C) 2007-2010 The University of Manchester
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or... | Mahdi89/eTeak | src/NetParts.hs | bsd-3-clause | 87,647 | 39 | 25 | 27,770 | 24,567 | 12,392 | 12,175 | -1 | -1 |
{-# LANGUAGE Haskell98 #-}
{-# LINE 1 "Network/HTTP/Date/Converter.hs" #-}
{-# LANGUAGE BangPatterns #-}
module Network.HTTP.Date.Converter (epochTimeToHTTPDate) where
import Control.Applicative
import Data.ByteString.Internal
import Data.Word
import Foreign.Marshal.Array
import Foreign.Ptr
import Foreign.Storable
imp... | phischu/fragnix | tests/packages/scotty/Network.HTTP.Date.Converter.hs | bsd-3-clause | 2,811 | 0 | 13 | 706 | 1,002 | 575 | 427 | 73 | 4 |
{-# LANGUAGE PartialTypeSignatures #-}
{-# LANGUAGE TupleSections #-}
module Language.Fixpoint.Solver.Graph (
-- * Remove Constraints that don't affect Targets
slice
-- * Predicate describing Targets
, isTarget
-- * Compute Ranks / SCCs
, graphRanks
-- * Co... | rolph-recto/liquid-fixpoint | src/Language/Fixpoint/Solver/Graph.hs | bsd-3-clause | 6,417 | 0 | 12 | 1,641 | 1,591 | 868 | 723 | 88 | 1 |
{- |
Module : $Header$
Description : keywords used for XML conversion
Copyright : (c) Daniel Calegari Universidad de la Republica, Uruguay 2013
License : GPLv2 or higher, see LICENSE.txt
Maintainer : dcalegar@fing.edu.uy
Stability : provisional
Portability : portable
-}
module CSMOF.XMLKeywords wh... | keithodulaigh/Hets | CSMOF/XMLKeywords.hs | gpl-2.0 | 2,616 | 0 | 7 | 424 | 685 | 431 | 254 | 46 | 1 |
module HaskelineExport where
import System.Console.Haskeline
import System.Console.Haskeline.IO
import Foreign
import Foreign.C.String
foreign export ccall initialize_input :: IO (StablePtr InputState)
foreign export ccall close_input :: StablePtr InputState -> IO ()
foreign export ccall cancel_input :: StablePtr ... | DavidAlphaFox/ghc | libraries/haskeline/examples/export/HaskelineExport.hs | bsd-3-clause | 1,076 | 0 | 10 | 252 | 272 | 130 | 142 | 28 | 2 |
module ShouldCompile where
import Prelude hiding ((<>))
(<>) :: (a -> Maybe b) -> (b -> Maybe c) -> (a -> Maybe c)
(m1 <> m2) a1 = case m1 a1 of
Nothing -> Nothing
Just a2 -> m2 a2
| sdiehl/ghc | testsuite/tests/parser/should_compile/read026.hs | bsd-3-clause | 239 | 0 | 11 | 98 | 102 | 54 | 48 | 6 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.