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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
module Zero.Bitfinex.Internal
(
Ticker(..)
, defaultTicker
) where
import GHC.Generics (Generic)
import Data.Aeson
import Data.Text (Text)
------------------------------------------------------------------------------
--
--------------------------------------------------------... | et4te/zero | src-shared/Zero/Bitfinex/Internal.hs | bsd-3-clause | 1,140 | 0 | 23 | 310 | 321 | 181 | 140 | 40 | 1 |
module Opticover.Geometry.Calc.Box where
import Control.Lens
import Data.AEq
import Opticover.Geometry.Types
import Opticover.Ple
pointInBox :: Box -> Point -> Bool
pointInBox (Box pair) p =
let (p1, p2) = unPair pair
in p1 <= p && p <= p2
-- Hoping derived Ord instance do what we expect here
segmentBorderBox ... | s9gf4ult/opticover | src/Opticover/Geometry/Calc/Box.hs | bsd-3-clause | 381 | 0 | 9 | 67 | 118 | 64 | 54 | 11 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE ExistentialQuantification #-}
module Lib.Exception
( finally
, onException, onExceptionWith
, catch, handle
, bracket, bracket_, bracketOnError
, logErrors
, handleSync
, putLn
, swallowExceptions
) wher... | buildsome/buildsome | src/Lib/Exception.hs | gpl-2.0 | 3,554 | 0 | 18 | 680 | 1,088 | 565 | 523 | 72 | 2 |
--
-- Copyright (c) 2012 Citrix Systems, Inc.
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
--
-- Th... | OpenXT/xclibs | xchutils/Tools/Process.hs | lgpl-2.1 | 7,954 | 0 | 20 | 2,408 | 1,757 | 927 | 830 | 140 | 3 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.PackageDescription.Parse
-- Copyright : Isaac Jones 2003-2005
-- License : BSD3
--
-- Maintainer : cabal-devel@haskell.org
-- Portability :... | DavidAlphaFox/ghc | libraries/Cabal/Cabal/Distribution/PackageDescription/Parse.hs | bsd-3-clause | 54,747 | 321 | 19 | 16,740 | 11,569 | 6,269 | 5,300 | 885 | 25 |
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PolyKi... | dreixel/instant-generics | src/Generics/Instant/Base.hs | bsd-3-clause | 3,468 | 0 | 8 | 944 | 599 | 373 | 226 | -1 | -1 |
{-# LANGUAGE LambdaCase #-}
import Control.Arrow
import Control.Lens
import Data.Char
import Data.List.Split
import qualified Data.Map as M
data ColorDef = ColorDef { colorName :: String, colorValue :: String }
main = interact process
where
process = generateDefs ... | diagrams/diagrams-contrib | src/Diagrams/Color/ProcessXKCDColors.hs | bsd-3-clause | 1,426 | 1 | 15 | 481 | 464 | 243 | 221 | -1 | -1 |
module Deprecated.DiGraph.SampleData where
import PolyGraph.Common
import qualified Instances.SimpleGraph as SG
import qualified SampleInstances.FirstLastWord as FL
import qualified Data.HashSet as HS
-- simple test data (list of pars that will serve as edges)
testEdges = map(OPair) [
("a0", "a01"),
(... | rpeszek/GraphPlay | play/Play/DiGraph/SampleData.hs | bsd-3-clause | 1,095 | 0 | 9 | 292 | 239 | 146 | 93 | 28 | 1 |
{-# LANGUAGE LambdaCase, PatternGuards, ViewPatterns #-}
{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
module Idris.Elab.Term where
import Idris.AbsSyntax
import Idris.AbsSyntaxTree
import Idris.DSL
import Idris.Delaborate
import Idris.Error
import Idris.ProofSearch
import Idris.Output (pshow)
import Idris.Core.Case... | adnelson/Idris-dev | src/Idris/Elab/Term.hs | bsd-3-clause | 119,645 | 1,365 | 62 | 52,758 | 24,158 | 13,969 | 10,189 | 2,107 | 226 |
-- (c) The University of Glasgow, 1997-2006
{-# LANGUAGE BangPatterns, CPP, DeriveDataTypeable, MagicHash, UnboxedTuples #-}
{-# OPTIONS_GHC -O -funbox-strict-fields #-}
-- We always optimise this, otherwise performance of a non-optimised
-- compiler is severely affected
-- |
-- There are two principal string types u... | tjakway/ghcjvm | compiler/utils/FastString.hs | bsd-3-clause | 20,477 | 0 | 26 | 4,726 | 4,085 | 2,107 | 1,978 | 326 | 5 |
module Foo where
{-@ LIQUID "--no-termination" @-}
{-@ LIQUID "--native" @-}
{-@ foo :: {v:a | false} @-}
foo = foo
nat :: Int
{-@ nat :: Nat @-}
nat = 42
| ssaavedra/liquidhaskell | tests/todo/false.hs | bsd-3-clause | 160 | 0 | 4 | 37 | 23 | 16 | 7 | 4 | 1 |
{-# LANGUAGE
MagicHash,
FlexibleInstances,
MultiParamTypeClasses,
TypeFamilies,
PolyKinds,
DataKinds,
FunctionalDependencies,
TypeFamilyDependencies #-}
module T17541 where
import GHC.Prim
import GHC.Exts
type fam... | sdiehl/ghc | testsuite/tests/dependent/should_fail/T17541.hs | bsd-3-clause | 450 | 0 | 9 | 158 | 68 | 42 | 26 | 16 | 0 |
module E4 where
--Any type/data constructor name declared in this module can be renamed.
--Any type variable can be renamed.
--Rename type Constructor 'BTree' to 'MyBTree'
data BTree a = Empty | T a (BTree a) (BTree a)
deriving Show
buildtree :: (Monad m, Ord a) => [a] -> m (BTree a)
buildtree [] = ... | SAdams601/HaRe | old/testing/asPatterns/E4.hs | bsd-3-clause | 1,008 | 0 | 15 | 414 | 348 | 172 | 176 | 21 | 3 |
{-# LANGUAGE TypeInType, GADTs #-}
module T11811 where
import Data.Kind
data Test (a :: x) (b :: x) :: x -> *
where K :: Test Int Bool Double
| olsner/ghc | testsuite/tests/typecheck/should_compile/T11811.hs | bsd-3-clause | 147 | 0 | 6 | 34 | 47 | 30 | 17 | -1 | -1 |
-- Test for Trac #2188
module TH_scope where
f g = [d| f :: Int
f = g
g :: Int
g = 4 |]
| forked-upstream-packages-for-ghcjs/ghc | testsuite/tests/th/TH_scope.hs | bsd-3-clause | 120 | 0 | 5 | 57 | 17 | 12 | 5 | -1 | -1 |
-- read.hs
-- read a file
import System.IO
main = do
withFile "song.txt" ReadMode (\handle -> do
contents <- hGetContents handle
putStr contents)
| doylew/practice | haskell/file.hs | mit | 158 | 1 | 13 | 35 | 50 | 23 | 27 | 5 | 1 |
-- |
-- Module : HGE2D.Time
-- Copyright : (c) 2016 Martin Buck
-- License : see LICENSE
--
-- Containing functions to get the current time or transform times
module HGE2D.Time where
import HGE2D.Types
import Data.Time.Clock
-----------------------------------------------------------------------------... | I3ck/HGE2D | src/HGE2D/Time.hs | mit | 671 | 0 | 8 | 102 | 81 | 49 | 32 | 7 | 1 |
-- Algorithms/Strings/Game of Thrones - I
module HackerRank.Algorithms.GameOfThrones1 where
import Data.Hashable (Hashable)
import qualified Data.HashMap.Strict as M
data Answer = YES | NO deriving (Show)
mkAnswer :: Bool -> Answer
mkAnswer True = YES
mkAnswer False = NO
freqMap :: (Hashable a, Ord a) => [a] -> M... | 4e6/sandbox | haskell/HackerRank/Algorithms/GameOfThrones1.hs | mit | 791 | 0 | 11 | 195 | 328 | 171 | 157 | 21 | 1 |
{-# LANGUAGE RankNTypes #-}
-- | @SkipList@s are comprised of a list and an index on top of it
-- which makes deep indexing into the list more efficient (O(log n)).
-- They achieve this by essentially memoizing the @tail@ function to
-- create a balanced tree.
--
-- NOTE: @SkipList@s are /amortized/ efficient, see the ... | gmalecha/skip-list | src/Data/SkipList.hs | mit | 2,746 | 0 | 14 | 666 | 600 | 318 | 282 | 46 | 1 |
-- A permutation is an ordered arrangement of objects. For example,
-- 3124 is one possible permutation of the digits 1, 2, 3 and 4. If
-- all of the permutations are listed numerically or alphabetically,
-- we call it lexicographic order. The lexicographic permutations of
-- 0, 1 and 2 are:
-- 012 021 102 120 ... | whittle/euler | src/Euler/Problem024.hs | mit | 1,462 | 0 | 10 | 323 | 323 | 174 | 149 | 22 | 1 |
module Data.Streaming.Process.Internal
( StreamingProcessHandle (..)
, InputSource (..)
, OutputSink (..)
) where
import Control.Concurrent.STM (TMVar)
import System.Exit (ExitCode)
import System.IO (Handle)
import System.Process (... | fpco/streaming-commons | Data/Streaming/Process/Internal.hs | mit | 1,213 | 0 | 9 | 279 | 257 | 149 | 108 | 20 | 0 |
module PrintProof where
import Data.IORef
import Control.Monad (liftM)
import NarrowingSearch
import Syntax
prMeta :: MMetavar a -> (a -> IO String) -> IO String
prMeta m prv = do
b <- readIORef $ mbind m
case b of
Nothing -> return $ "?" ++ show (mid m)
Just v -> prv v
prProof :: Int -> MetaProof -> IO Stri... | frelindb/agsyHOL | PrintProof.hs | mit | 10,596 | 0 | 23 | 3,242 | 5,219 | 2,429 | 2,790 | 336 | 10 |
{-# LANGUAGE DeriveDataTypeable #-}
module Development.Duplo.Types.Builder where
import Control.Exception (Exception)
import Data.Typeable (Typeable)
data BuilderException = MissingGithubUserException
| MissingGithubRepoException
| MalformedManifest... | pixbi/duplo | src/Development/Duplo/Types/Builder.hs | mit | 1,003 | 0 | 8 | 270 | 142 | 78 | 64 | 22 | 0 |
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
module Shifts.Types
(
Eng(..)
, Shift(..)
) where
import Control.Monad (liftM)
import Data.Aeson
import Data.Text
import Data.Time
import GHC.Generics
instance Ord Shift where
(Shift s1 _ _) `compare`... | tippenein/shifts | src/Shifts/Types.hs | mit | 824 | 0 | 8 | 169 | 265 | 149 | 116 | 28 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import CoinApi
import qualified CoinApi.Monadic as M
import Data.Time
import Control.Monad.State (liftIO)
key = "73034021-0EBC-493D-8A00-E0F138111F41"
asset_id_base = "BTC"
asset_id_quote = "USD"
symbol_id = "BITSTAMP_SPOT_BTC_USD"
period_id = "1HRS"
time_start = ... | coinapi/coinapi-sdk | data-api/haskell-rest/Main.hs | mit | 11,093 | 0 | 15 | 3,451 | 3,301 | 1,378 | 1,923 | 298 | 24 |
{-# LANGUAGE CPP #-}
module Compat where
import Control.Concurrent (mkWeakThreadId, myThreadId)
import Control.Exception (AsyncException (UserInterrupt), throwTo)
import System.Mem.Weak (deRefWeak)
#if defined(mingw32_HOST_OS)
import qualified GHC.ConsoleHandler as WinSig
#else
import qualified System.Posix.Signals a... | unisonweb/platform | parser-typechecker/unison/Compat.hs | mit | 987 | 0 | 16 | 196 | 208 | 108 | 100 | 18 | 2 |
module Main where
import Haste
main = withElem "root" $ \root -> do
img <- newElem "img"
setAttr img "src" "cat.jpg"
setAttr img "id" "cat"
addChild img root
onEvent img OnMouseOver $ \_ ->
setClass img "foo" True
onEvent img OnMouseOut
$ setClass img "foo" False
| laser/haste-experiment | demos/event-handling/event-handling.hs | mit | 289 | 0 | 11 | 71 | 105 | 48 | 57 | 11 | 1 |
import qualified Data.List
import Kd2nTree
p1 :: Point3d
p1 = list2Point [3.0,-1.0,2.1]
p2 :: Point3d
p2 = list2Point [3.5,2.8,3.1]
p3 :: Point3d
p3 = list2Point [3.5,0.0,2.1]
p4 :: Point3d
p4 = list2Point [3.0,-1.7,3.1]
p5 :: Point3d
p5 = list2Point [3.0,5.1,0.0]
p6 :: Point3d
p6 = list2Point [1.5,8.0,1.5]
p7 :: Poin... | albertsgrc/practica-lp-kd2ntrees | Main.hs | mit | 6,316 | 1 | 13 | 1,611 | 2,681 | 1,550 | 1,131 | 124 | 2 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, InstanceSigs #-}
{--# LANGUAGE DeriveDataTypeable, ScopedTypeVariables, MultiParamTypeClasses
, FlexibleInstances, FunctionalDependencies #-}
module TemplatesUtility (templatesSettings) where
import Control.Applic... | Prinhotels/goog-closure | src/TemplatesUtility.hs | mit | 3,681 | 0 | 14 | 668 | 882 | 457 | 425 | 72 | 1 |
-- Copyright (C) 2009 Petr Rockai
--
-- Permission is hereby granted, free of charge, to any person
-- obtaining a copy of this software and associated documentation
-- files (the "Software"), to deal in the Software without
-- restriction, including without limitation the rights to use, copy,
-- modify, merge, publish... | DavidAlphaFox/darcs | src/Darcs/UI/Commands/ShowIndex.hs | gpl-2.0 | 5,133 | 0 | 22 | 1,285 | 1,140 | 643 | 497 | 90 | 4 |
-- | Partially taken from Hugs AnsiScreen.hs library:
module Language.Haskell.HsColour.ANSI
( highlightOnG,highlightOn
, highlightOff
, highlightG,highlight
, cleareol, clearbol, clearline, clearDown, clearUp, cls
, goto
, cursorUp, cursorDown, cursorLeft, cursorRight
, savePosition, restorePosition
, H... | crackleware/hscolour | Language/Haskell/HsColour/ANSI.hs | gpl-2.0 | 3,849 | 0 | 13 | 870 | 956 | 533 | 423 | 82 | 1 |
{-# LANGUAGE NoMonomorphismRestriction #-}
import System.Console.Haskeline
import Text.ParserCombinators.Parsec
import Control.Applicative hiding (many, optional, (<|>))
import Control.Monad.Trans.State hiding (get, put)
import Control.Monad.State.Class
import Control.Monad.IO.Class
import Control.Monad.Trans
import q... | 5outh/fievel | REPL.hs | gpl-2.0 | 3,269 | 0 | 21 | 953 | 1,154 | 559 | 595 | 94 | 9 |
{-- |
This module is concerned with individual posts.
It adds three new classes of functionality to Hakyll. Firstly,
pages are routed as `/year/month/day/post-title/index.html` instead of
being routed as ``/posts/year-month-day-title.html`. Secondly, it has
code to detect and filter out drafts from built websites. Thi... | budgefeeney/amixtureofmusings | Site/Meta.hs | gpl-3.0 | 3,775 | 0 | 16 | 942 | 763 | 414 | 349 | 61 | 1 |
module BenchmarkScene5 where
{- A scene to highlight glossy reflection -}
import Objects
import Materials
import Types
bench5Lights :: [Light]
bench5Lights = [Light (Vec3 20 0 0)
(Vec3 0 1 0)
(Vec3 0 0 1)
(Color 0.8 0.8 0.8) ]
bench5Objects :: [Obje... | jrraymond/ray-tracer | src/BenchmarkScene5.hs | gpl-3.0 | 540 | 0 | 10 | 183 | 212 | 114 | 98 | 16 | 1 |
{-# Language DoAndIfThenElse #-}
-- | Modulo respectivo a la parte derecha de la interfaz, es decir, el
-- campo de texto.
module GUI.EditBook where
import Graphics.UI.Gtk hiding (get)
import Graphics.UI.Gtk.SourceView
import Control.Lens hiding (set)
import Control.Monad (void)
import Control.Monad.Trans.RWS
impor... | alexgadea/fun-gui | GUI/EditBook.hs | gpl-3.0 | 10,349 | 0 | 19 | 3,396 | 2,361 | 1,147 | 1,214 | 177 | 2 |
{-# OPTIONS_GHC -Wall #-}
-----------------------------------------------------------------------------
-- |
-- Module : Numeric.LATC.SparseIntMap
-- Copyright : (c) Matthew Peddie 2012
-- License : GPLv3 (see the file latc/LICENSE)
--
-- Maintainer : peddie@alum.mit.edu
-- Stability : experimental... | peddie/latc | Numeric/LATC/SparseIntMap.hs | gpl-3.0 | 3,310 | 6 | 11 | 1,530 | 518 | 303 | 215 | -1 | -1 |
-- Copyright 2011 Jared Hance
{-# LANGUAGE FlexibleContexts, TypeOperators #-}
module Data.Binary.Derive
(
derivePut,
deriveGet
)
where
import Control.Applicative
import Data.Binary
import GHC.Generics
data ConsChoice = L | R
instance Binary ConsChoice where
put L = put True
put R = put Fals... | jhance/binary-derive | Data/Binary/Derive.hs | gpl-3.0 | 1,778 | 16 | 16 | 597 | 609 | 301 | 308 | 47 | 1 |
module Chap05.Data.PairingHeap.Exercise08 where
import Chap03.Data.Heap (Heap(..), arbHeap)
import Chap05.Data.BinaryTree
import Test.QuickCheck (Arbitrary(..), sized)
newtype PairingHeap a = C5E8 (BinaryTree a)
deriving (Show)
instance Heap PairingHeap where
empty = C5E8 E
isEmpty (C5E8 ... | stappit/okasaki-pfds | src/Chap05/Data/PairingHeap/Exercise08.hs | gpl-3.0 | 1,085 | 0 | 13 | 332 | 512 | 260 | 252 | 28 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-apps-calendar/gen/Network/Google/Resource/Calendar/CalendarList/Watch.hs | mpl-2.0 | 6,531 | 0 | 21 | 1,574 | 837 | 490 | 347 | 121 | 1 |
-- eidolon -- A simple gallery in Haskell and Yesod
-- Copyright (C) 2015 Amedeo Molnár
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU Affero General Public License as published
-- by the Free Software Foundation, either version 3 of the License, or
-- ... | Mic92/eidolon | Handler/Reactivate.hs | agpl-3.0 | 2,628 | 3 | 30 | 773 | 461 | 232 | 229 | -1 | -1 |
----------------------------------------------------------------------------
-- |
-- Module : Parser
-- Copyright : (c) Masahiro Sakai 2007-2009
-- License : BSD3-style (see LICENSE)
--
-- Maintainer: masahiro.sakai@gmail.com
-- Stability : experimental
-- Portability : non-portable
{-# LANGUAGE ... | msakai/ptq | src/Parser.hs | lgpl-2.1 | 19,831 | 0 | 16 | 5,297 | 7,283 | 3,755 | 3,528 | 513 | 8 |
import Text.VCard.Format.Directory
import qualified Data.ByteString.Lazy.Char8 as B
import qualified Data.ByteString.Lazy.Char8.Caseless as I
import Text.VCard.Format.Directory
import qualified Text.VCard.Query as Q
import Text.Regex.PCRE.ByteString.Lazy
import Control.Monad (when)
import System.IO
import System.IO.Un... | mboes/vCard | t/Mutt.hs | lgpl-3.0 | 1,671 | 0 | 16 | 407 | 583 | 301 | 282 | 41 | 3 |
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="ms-MY">
<title>TLS Debug | ZAP Extension</title>
<maps>
<homeID>top</homeID>
<mapref lo... | secdec/zap-extensions | addOns/tlsdebug/src/main/javahelp/org/zaproxy/zap/extension/tlsdebug/resources/help_ms_MY/helpset_ms_MY.hs | apache-2.0 | 970 | 78 | 66 | 159 | 413 | 209 | 204 | -1 | -1 |
{-
Copyright 2018 The CodeWorld Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicab... | tgdavies/codeworld | codeworld-prediction/src/Data/MultiMap.hs | apache-2.0 | 2,493 | 0 | 13 | 538 | 718 | 384 | 334 | 40 | 1 |
import Data.List
import Data.Char
main = do line' <- fmap reverse getLine
putStrLn $ "You said " ++ line' ++ " backwords!"
-- fmap reverse will give "Just halb" from "Just Blah"
-- getLine gives IO String and mapping it to reverse IO gnirtS kind of :)-
main1 = do line' <- fmap (++ "!") getLine
... | dongarerahul/lyah | chapter11-functorApplicativeMonad/IOFunctor.hs | apache-2.0 | 607 | 0 | 12 | 153 | 127 | 65 | 62 | 8 | 1 |
module Finance.Hqfl.Instrument.Cap
(
Cap
)where
data Cap
| cokleisli/hqfl | src/Finance/Hqfl/Instrument/Cap.hs | apache-2.0 | 66 | 0 | 4 | 16 | 16 | 11 | 5 | -1 | -1 |
{-# LANGUAGE RankNTypes, FlexibleContexts, ScopedTypeVariables #-}
{- fixing resolution. This is a large beast of a module. Sorry.
updated for version 2.0.3 to match protoc's namespace resolution better
updated for version 2.0.4 to differentiate Entity and E'Entity, this makes eName a total selector
updated af... | edahlgren/protocol-buffers | hprotoc/Text/ProtocolBuffers/ProtoCompile/Resolve.hs | apache-2.0 | 78,001 | 733 | 28 | 19,440 | 17,083 | 9,251 | 7,832 | 933 | 54 |
{-# LANGUAGE TypeFamilies, MultiParamTypeClasses, FlexibleInstances,
UndecidableInstances, RebindableSyntax, DataKinds,
TypeOperators, PolyKinds, FlexibleContexts, ConstraintKinds,
IncoherentInstances, GADTs
#-}
module Control.Effect.State (Set(..), get, put, State(... | dorchard/effect-monad | src/Control/Effect/State.hs | bsd-2-clause | 8,221 | 8 | 15 | 2,659 | 3,309 | 1,770 | 1,539 | 125 | 1 |
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE OverloadedStrings #-}
module Duckling.PhoneNumber.AR.Corpus
( corpus
, negativeCorpus
) where... | facebookincubator/duckling | Duckling/PhoneNumber/AR/Corpus.hs | bsd-3-clause | 2,919 | 0 | 9 | 829 | 333 | 198 | 135 | 54 | 1 |
{-# OPTIONS -fglasgow-exts #-}
module GisServer.Data.Common ( LexicalLevel, lexLevel
, fieldTermChar, fieldTerm
, recordTermChar, recordTerm
, getStringN, getStringEncoded, getStringTill
, getInt, getInt... | alios/gisserver | GisServer/Data/Common.hs | bsd-3-clause | 2,485 | 0 | 11 | 641 | 605 | 329 | 276 | 59 | 2 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
-- | Github API: http://developer.github.com/v3/oauth/
module Main where
import Control.Monad (mzero)
import Data.Aeson
import qualified Data.ByteString as BS
import Data... | reactormonk/hoauth2 | example/Github/test.hs | bsd-3-clause | 1,761 | 0 | 13 | 517 | 431 | 233 | 198 | 40 | 2 |
{-# OPTIONS -fno-implicit-prelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.HashTable
-- Copyright : (c) The University of Glasgow 2003
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : libraries@haskell.org
-- ... | OS2World/DEV-UTIL-HUGS | libraries/Data/HashTable.hs | bsd-3-clause | 12,055 | 96 | 19 | 2,369 | 2,681 | 1,461 | 1,220 | 194 | 4 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE LambdaCase #-}
module Zodiac.Cli.TSRP.Env(
tsrpParamsFromEnv
) where
import Control.Monad.IO.Class (liftIO)
import Data.ByteString (ByteString)
import qualified Data.Text as T
import qualified Data.Text.Encod... | ambiata/zodiac | zodiac-cli/src/Zodiac/Cli/TSRP/Env.hs | bsd-3-clause | 1,276 | 0 | 11 | 293 | 351 | 191 | 160 | 31 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Data.Conduit.Succinct.JsonSpec (spec) where
import Control.Monad.Trans.Resource (MonadThrow)
import Data.ByteString
import Data.Conduit
import Data.Conduit.Succinct.Json
import Data.Int
import Data.Succinct
import... | haskell-works/conduit-succinct-json | test/Data/Conduit/Succinct/JsonSpec.hs | bsd-3-clause | 5,764 | 0 | 15 | 1,166 | 1,613 | 850 | 763 | 104 | 2 |
{-# LANGUAGE PatternSynonyms #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.ARB.CullDistance
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability... | haskell-opengl/OpenGLRaw | src/Graphics/GL/ARB/CullDistance.hs | bsd-3-clause | 699 | 0 | 5 | 95 | 52 | 39 | 13 | 8 | 0 |
{-# OPTIONS -XDeriveDataTypeable #-}
-- this program imput numbers and calculate their factorials. The workflow control a record all the inputs and outputs
-- so that when the program restart, all the previous results are shown.
-- if the program abort by a runtime error or a power failure, the program will still work... | agocorona/Workflow | Demos/fact.hs | bsd-3-clause | 1,741 | 6 | 18 | 436 | 385 | 194 | 191 | 39 | 2 |
module FillingJars
( getlines,
startjars
) where
getlines :: Int -> IO Integer
getlines m
| m <= 0 = do return 0
| otherwise = do
x_temp <- getLine
let x_t = words x_temp
let a = read $ x_t!!0 :: Integer
let b = read $ x_t!!1 :: Integer
let k = read $... | zuoqin/hackerrank | src/FillingJars.hs | bsd-3-clause | 741 | 0 | 15 | 299 | 321 | 152 | 169 | 26 | 1 |
module Module3.Task17 where
-- system code
coins :: (Ord a, Num a) => [a]
coins = [2, 3, 7]
-- solution code
change :: (Ord a, Num a) => a -> [[a]]
change 0 = [[]]
change s = [coin:ch | coin <- coins, coin <= s, ch <- (change $ s - coin)]
| dstarcev/stepic-haskell | src/Module3/Task17.hs | bsd-3-clause | 241 | 0 | 10 | 56 | 138 | 78 | 60 | 6 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module CommandLine (readOptions) where
import Control.Applicative ((<$>), (<*>))
import Control.Arrow (first)
import Control.Monad (unless)
import Data.Maybe (fromMaybe)
import System.Console.GetOpt (getOpt, ArgOrder(..), OptDescr(..), ArgDescr(... | YoshikuniJujo/forest | subprojects/tls-analysis/server/CommandLine.hs | bsd-3-clause | 5,968 | 220 | 14 | 978 | 1,935 | 1,045 | 890 | 158 | 10 |
{-# LANGUAGE CPP #-}
-- | HPACK(<https://tools.ietf.org/html/rfc7541>) encoding and decoding a header list.
module Network.HPACK (
-- * Encoding and decoding
encodeHeader
, decodeHeader
-- * Encoding and decoding with token
, encodeTokenHeader
, decodeTokenHeader
-- * DynamicTable
, DynamicTable
, ... | kazu-yamamoto/http2 | Network/HPACK.hs | bsd-3-clause | 1,358 | 0 | 5 | 259 | 186 | 130 | 56 | 42 | 1 |
module Main (main) where
import qualified Data.ByteString as B
--import Language.C
import Language.CIL
import System.Environment
--import Compile
--import Verify
version = "0.2.0"
main :: IO ()
main = do
args <- getArgs
case args of
[] -> help
(a:_) | elem a ["help", "-h", "--help", "-help"] -> help
... | tomahawkins/afv | src/AFV.hs | bsd-3-clause | 3,244 | 0 | 18 | 1,003 | 572 | 329 | 243 | 108 | 8 |
{-# LANGUAGE CPP #-}
module Feldspar.IO.Frontend
( module Feldspar.IO.Frontend
, ExternalCompilerOpts (..)
, defaultExtCompilerOpts
) where
#if __GLASGOW_HASKELL__ < 710
import Control.Applicative
#endif
import Data.Ix
import Data.Monoid
import Data.Proxy
import Text.Printf (PrintfArg)
import qualified Con... | emilaxelsson/feldspar-io | src/Feldspar/IO/Frontend.hs | bsd-3-clause | 14,031 | 0 | 12 | 2,861 | 3,225 | 1,701 | 1,524 | -1 | -1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
-- |
-- Module: $HEADER$
-- Description: Data type that represents name of a SCM (Source Code
-- Management) tool.
-- Copyright: (c) 2016 Peter Trško
-- License: BSD3
--
-- Maintainer: peter.trsko@gmail.com
-- Stability: ... | trskop/yx | src/YX/Type/DbConnection.hs | bsd-3-clause | 1,177 | 0 | 9 | 221 | 136 | 93 | 43 | 12 | 1 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
-}
module VarEnv (
-- * Var, Id and TyVar environments (maps)
VarEnv, IdEnv, TyVarEnv, CoVarEnv, TyCoVarEnv,
-- ** Manipulating these environments
emptyVarEnv, unitVarEnv, mkVarEnv, mkVarEnv... | sdiehl/ghc | compiler/basicTypes/VarEnv.hs | bsd-3-clause | 23,220 | 0 | 14 | 5,678 | 4,845 | 2,694 | 2,151 | 342 | 2 |
module Main where
import qualified Sonos.Main as M
main :: IO ()
main = M.main
| merc1031/haskell-sonos-http-api | app/Main.hs | bsd-3-clause | 81 | 0 | 6 | 17 | 29 | 18 | 11 | 4 | 1 |
module ErrorMessagesSpec where
import TestImport
import Data.List
import qualified Data.Map as M
import qualified Parser
import Codegen
import Err
import Text.RawString.QQ (r)
spec :: Spec
spec = describe "generateDedan" $ context "should show context in errors" $ do
it "in servers" $ do
testErrorMessa... | zyla/rybu | test/ErrorMessagesSpec.hs | bsd-3-clause | 2,683 | 0 | 21 | 1,033 | 426 | 238 | 188 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- Derived from AWS service descriptions, licensed under Apache 2.0.
-- |
-- Module : Network.AWS.DeviceFarm.Types.Sum
-- C... | fmapfmapfmap/amazonka | amazonka-devicefarm/gen/Network/AWS/DeviceFarm/Types/Sum.hs | mpl-2.0 | 18,789 | 0 | 12 | 4,352 | 3,578 | 1,796 | 1,782 | 479 | 0 |
-- Copyright 2014 by Mark Watson. All rights reserved. The software and data in this project can be used under the terms of the GPL version 3 license.
module NamePrefixes (namePrefixes) where
import qualified Data.Set as S
namePrefixes = S.fromList ["Dr", "Premier", "Major", "King", "General", "Ms", "Gen", "Mrs", "S... | mark-watson/kbnlp.hs | NamePrefixes.hs | agpl-3.0 | 435 | 0 | 6 | 63 | 88 | 58 | 30 | 3 | 1 |
--
-- Copyright (c) 2012 Citrix Systems, Inc.
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
--
-- Th... | OpenXT/xclibs | xchutils/Tools/File.hs | lgpl-2.1 | 2,317 | 0 | 10 | 483 | 459 | 248 | 211 | 40 | 2 |
module Even where
{-@ type Even = {v:Int | v mod 2 = 0} @-}
{-@ notEven :: Int -> Even @-}
notEven :: Int -> Int
notEven x = x * 2
| ssaavedra/liquidhaskell | tests/pos/Even.hs | bsd-3-clause | 134 | 0 | 5 | 36 | 27 | 16 | 11 | 3 | 1 |
--
-- Copyright (C) 2012 Parallel Scientific. All rights reserved.
--
-- See the accompanying LICENSE file for license information.
--
import Control.Exception ( finally )
import Control.Monad ( forever, void )
import qualified Data.ByteString.Char8 as B ( putStrLn, pack )
import Network.CCI ( wi... | tkonolige/haskell-cci | examples/Server.hs | bsd-3-clause | 976 | 0 | 21 | 313 | 247 | 131 | 116 | 19 | 3 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeApplications #-}
module Main where
import qualified ... | k0001/haskell-money | safe-money-cereal/test/Main.hs | bsd-3-clause | 8,375 | 0 | 16 | 1,547 | 2,428 | 1,277 | 1,151 | 167 | 1 |
-- | This module provides support for parsing values from ByteString
-- 'InputStream's using @attoparsec@. /Since: 1.4.0.0./
module System.IO.Streams.Attoparsec.ByteString
( -- * Parsing
parseFromStream
, parserToInputStream
, ParseException(..)
) where
----------------------------------------------------... | LukeHoersten/io-streams | src/System/IO/Streams/Attoparsec/ByteString.hs | bsd-3-clause | 3,289 | 0 | 9 | 525 | 229 | 159 | 70 | 19 | 1 |
-- Utility for sending a command to xmonad and have
-- it immediately executed even when xmonad isn't built
-- with -threaded.
module Main () where
import Control.Concurrent
import Control.Monad
import Data.List
import Data.Monoid
import Data.Word
import Graphics.X11.Xlib
import Graphics.X11.Xlib.Event
import Graphics... | LeifW/xmonad-extras | XMonadCmd.hs | bsd-3-clause | 2,902 | 0 | 14 | 874 | 790 | 422 | 368 | 67 | 2 |
{-# LANGUAGE NoImplicitPrelude, CPP #-}
{-| Export Prelude as in base 4.8.0
-}
{-
Copyright (C) 2015 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code mus... | leshchevds/ganeti | src/Ganeti/Prelude.hs | bsd-2-clause | 6,145 | 0 | 5 | 1,603 | 813 | 649 | 164 | 128 | 0 |
module Github.Teams (
teamInfoFor
,teamInfoFor'
,teamsInfo'
,createTeamFor'
,editTeam'
,deleteTeam'
,listTeamsCurrent'
,module Github.Data
) where
import Github.Data
import Github.Private
-- | The information for a single team, by team id.
-- | With authentication
--
-- > teamInfoFor' (Just $ GithubOAuth "token") 10... | beni55/github | Github/Teams.hs | bsd-3-clause | 1,999 | 0 | 10 | 361 | 401 | 220 | 181 | 33 | 1 |
{-# LANGUAGE FlexibleInstances #-}
module MockedProcess where
import MockedEnv
import Control.Monad.IO.Class
import Control.Monad.Trans.Reader
import Tinc.Process
type ReadProcess = FilePath -> [String] -> String -> IO String
type CallProcess = FilePath -> [String] -> IO ()
data Env = Env {
envReadProcess :: Rea... | sol/tinc | test/MockedProcess.hs | mit | 664 | 0 | 11 | 110 | 207 | 118 | 89 | 16 | 1 |
module Util.DocLike(module Util.DocLike, module Data.Monoid) where
-- simplified from Doc.DocLike
import Control.Applicative
import Data.Monoid(Monoid(..),(<>))
import Data.Traversable as T
import qualified Text.PrettyPrint.HughesPJ as P
import qualified Text.PrettyPrint.Leijen as L
--infixr 5 <$> -- ,<//>,<$>,<$$>
... | hvr/jhc | src/Util/DocLike.hs | mit | 4,453 | 10 | 12 | 1,379 | 1,680 | 942 | 738 | 142 | 1 |
{-# LANGUAGE BangPatterns, CPP, OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
module Aeson
(
aeson
, value'
) where
import Data.ByteString.Builder
(Builder, byteString, toLazyByteString, charUtf8, word8)
#if !MIN_VERSION_base(4,8,0)
import Control.Applicative ((*>), (<$>), (<*)... | beni55/attoparsec | benchmarks/Aeson.hs | bsd-3-clause | 11,671 | 10 | 34 | 3,376 | 3,104 | 1,593 | 1,511 | 254 | 7 |
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="sq-AL">
<title>Code Dx | ZAP Extension</title>
<maps>
<homeID>top</homeID>
<mapref loca... | thc202/zap-extensions | addOns/codedx/src/main/javahelp/org/zaproxy/zap/extension/codedx/resources/help_sq_AL/helpset_sq_AL.hs | apache-2.0 | 968 | 83 | 52 | 159 | 396 | 209 | 187 | -1 | -1 |
-- | UTF-8 encode a text
--
-- Tested in this benchmark:
--
-- * Replicating a string a number of times
--
-- * UTF-8 encoding it
--
module Benchmarks.EncodeUtf8
( benchmark
) where
import Criterion (Benchmark, bgroup, bench, whnf)
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as ... | beni55/text | benchmarks/haskell/Benchmarks/EncodeUtf8.hs | bsd-2-clause | 901 | 0 | 14 | 198 | 226 | 135 | 91 | 17 | 1 |
{-# LANGUAGE DeriveDataTypeable, TypeFamilies, TemplateHaskell,
RankNTypes, NamedFieldPuns, RecordWildCards,
RecursiveDo, BangPatterns, CPP #-}
module Distribution.Server.Features.HoogleData (
initHoogleDataFeature,
HoogleDataFeature(..),
) where
import Distribution.Server.Framework... | ocharles/hackage-server | Distribution/Server/Features/HoogleData.hs | bsd-3-clause | 14,928 | 0 | 29 | 4,259 | 3,631 | 1,850 | 1,781 | 290 | 5 |
-- Trac #958
module ShoulFail where
data Succ a = S a -- NB: deriving Show omitted
data Seq a = Cons a (Seq (Succ a)) | Nil deriving Show
| ezyang/ghc | testsuite/tests/typecheck/should_fail/tcfail169.hs | bsd-3-clause | 148 | 0 | 10 | 39 | 46 | 28 | 18 | 3 | 0 |
{-# LANGUAGE Arrows #-}
module Main(main) where
import Control.Arrow
import Control.Category
import Prelude hiding (id, (.))
class ArrowLoop a => ArrowCircuit a where
delay :: b -> a b b
-- stream map instance
data Stream a = Cons a (Stream a)
instance Functor Stream where
fmap f ~(Cons a as) = Cons (f a) (fmap... | wxwxwwxxx/ghc | testsuite/tests/arrows/should_run/arrowrun003.hs | bsd-3-clause | 3,614 | 22 | 17 | 781 | 1,619 | 823 | 796 | 84 | 3 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
module JPSubreddits.Types where
import Control.Applicative
import Control.Monad
import Control.Monad.IO.Class (MonadIO)
import Data.Aeson (FromJSON (..), ToJSON (..), object, (.:), (.=))
import Data.Text (T... | sifisifi/jpsubreddits | src/JPSubreddits/Types.hs | mit | 2,136 | 0 | 13 | 614 | 591 | 333 | 258 | 56 | 0 |
-- prolog engine v1
-- TODO lists and strings
import Prelude hiding (pred)
import Test.Hspec
import Text.ParserCombinators.Parsec
import Text.Parsec.Error
import Control.Applicative hiding ((<|>), many)
import Control.Monad
import System.IO
import Data.List
import Data.Maybe
import qualified Data.Map as Map
--im... | jbalint/banshee-sympatico | meera/prolog_engine1.hs | mit | 13,740 | 0 | 23 | 3,937 | 3,734 | 1,937 | 1,797 | 221 | 5 |
module Operation
( Operation(..)
, operate
, undo
) where
import Data.Ix
data Operation = SwapIndices Int Int
| SwapLetters Char Char
| RotateLeft Int
| RotateRight Int
| RotateAroundLetter Char
| Reverse Int Int
| Move Int Int
... | ajm188/advent_of_code | 2016/21/Operation.hs | mit | 2,988 | 0 | 15 | 842 | 1,548 | 819 | 729 | 61 | 6 |
module Test where
import Nat
import System.Random (newStdGen, randomRs)
import Tree (FoldTree (..), Tree (..))
tOrder = (5,2,10)
tBits = [15..17]
tFirstNat = fromInteger (5) :: Nat
tSecondNat = fromInteger (7) :: Nat
tContains = [[1..5], [2,0], [3,4]]
tList3 = [1..3] :: [Int... | mortum5/programming | haskell/ITMO-Course/hw1/src/Test.hs | mit | 1,068 | 0 | 9 | 276 | 430 | 255 | 175 | 24 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Text.Blaze.Bootstrap where
import qualified Text.Blaze.Html5 as BH
import qualified Text.Blaze.Internal as TBI
nav :: BH.Html -- ^ Inner HTML.
-> BH.Html -- ^ Resulting HTML.
nav = TBI.Parent "nav" "<nav" "</nav>"
-- Bootstrap attributes
dataToggle :: BH.AttributeValu... | lhoghu/happstack | src/Text/Blaze/Bootstrap.hs | mit | 1,444 | 0 | 6 | 310 | 231 | 135 | 96 | 28 | 1 |
module TestHelpers where
import qualified Data.Aeson as AE
import qualified Data.Aeson.Encode.Pretty as AE
import qualified Data.ByteString.Lazy.Char8 as BS
import Data.Maybe (fromJust)
import Data.Text (Text, pack)
import GHC.Generics (Generic)
import Network.JSONApi
import Network.URL (URL, importURL)
prettyEncode ... | toddmohney/json-api | test/TestHelpers.hs | mit | 2,915 | 0 | 11 | 543 | 761 | 416 | 345 | 87 | 1 |
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE RecordWildCards #-}
------------------------------------------------------------------------------
-- |
-- Module : Forecast
-- Copyright : (C) 2014 Samuli Thomasson
-- License : MIT (see the file LICENSE)
-- Ma... | Multi-Axis/habbix | src/Forecast.hs | mit | 4,506 | 0 | 19 | 1,253 | 1,482 | 803 | 679 | 78 | 3 |
module Main where
factorial :: Integer -> Integer
factorial x
| x > 1 = x * factorial(x -1)
| otherwise = 1
| mtraina/seven-languages-seven-weeks | week-7-haskell/day1/factorial_with_guards.hs | mit | 124 | 0 | 9 | 39 | 54 | 27 | 27 | 5 | 1 |
import System.IO
import System.Environment
import Paths_hackertyper
main = do
args <- getArgs
let n = if null args then 3 else read (args !! 0) :: Int
hSetBuffering stdout NoBuffering
hSetBuffering stdin NoBuffering
hSetEcho stdin False
kernelPath <- getDataFileName "kernel.txt"
kernel <- re... | fgaz/hackertyper | hackertyper.hs | mit | 493 | 0 | 13 | 121 | 167 | 75 | 92 | 17 | 2 |
module Numbering where
import URM
piF m n = 2^m*(2*n+1)-1
xiF m n q = piF (piF (m-1) (n-1)) (q-1)
tauF as = (sum $ map (2^) as)-1
tauF' x = f (x+1) 0 where
f 0 _ = []
f b k | m==0 = r
| m==1 = k:r
where
r = f d (k+1)
(d,m) = b `divMod` 2
betaF (Z n) = 4*(n-1)
betaF (S n) = 4*(n-1)+1
betaF (T m... | ducis/URMsim | Numbering.hs | mit | 567 | 0 | 11 | 179 | 444 | 231 | 213 | 20 | 2 |
{-# language DeriveDataTypeable, TemplateHaskell #-}
module Baum.Such.Config where
import Autolib.ToDoc
import Autolib.Reader
import Data.Typeable
data Config a = -- use phantom type for baum
Config { start_size :: Int
, min_key :: a
, max_key :: a
, fixed_insert_ops :: Int
, fixed_dele... | florianpilz/autotool | src/Baum/Such/Config.hs | gpl-2.0 | 675 | 6 | 9 | 168 | 169 | 105 | 64 | 24 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module Main (main) where
import Test.QuickCheck
import Test.Tasty (defaultMain, testGroup)
import Test.Tasty.QuickCheck (testProperty)
import Test.Tasty.TH
import Test.Tasty.HUnit
import Data.List
import ArithmeticPuzzle
prop_size_is_always_one_less x = (length x > 1) ==> length (spl... | aflag/haskell-group | arithmeticPuzzle/Test.hs | gpl-2.0 | 2,170 | 0 | 20 | 538 | 909 | 482 | 427 | 32 | 1 |
module Net.IPv4Link where
-- Routing of IP packets in the simple where there is a single
-- link which has a router.
import Net.Interface as Net
import Net.IPv4
initialize net optRouter link = Interface { rx=rx link, tx=tx }
where
tx = maybe txlocal txr optRouter
txr routerIP ip = Net.tx link $ if sameNet ... | nh2/network-house | Net/IPv4Link.hs | gpl-2.0 | 588 | 8 | 9 | 170 | 175 | 96 | 79 | 13 | 3 |
import System.Environment (getArgs)
data Token = OpenParen | CloseParen deriving (Enum)
type Syntax = (Char, Token)
isToken :: Char -> Token
isToken x =
main = do
args <- getArgs
let filename =
| MichaelShaulskiy/ct_crypt | generate.hs | gpl-3.0 | 212 | 1 | 6 | 51 | 70 | 41 | 29 | -1 | -1 |
{-# LANGUAGE FlexibleInstances #-}
{-|
Module : Minitel
Description : Interface to the Minitel
Copyright : (c) Frédéric BISSON, 2014
License : GPL-3
Maintainer : zigazou@free.fr
Stability : experimental
Portability : POSIX
This module provides to deal with Minitel communications.
-}
module Minitel.Minite... | Zigazou/HaMinitel | src/Minitel/Minitel.hs | gpl-3.0 | 9,769 | 0 | 15 | 2,841 | 2,103 | 1,141 | 962 | 196 | 2 |
{-# LANGUAGE RecordWildCards #-}
module World where
import Debug.Trace
import Data.Monoid
import Data.Maybe
import Control.Arrow
import Control.Applicative
import Linear.V2
import Game.Folivora.TileGrid
import Game.Folivora.Sound
-- enemy: delay to fire next bullet
data PlatformerTile = Empty | Floor | Player | En... | caryoscelus/folivora-ge | demos/platformer/World.hs | gpl-3.0 | 1,971 | 0 | 17 | 755 | 554 | 293 | 261 | 51 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.