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 Scrape (scrapeRippleAddress) where
import Control.Applicative
import Control.Monad
import UnexceptionalIO (fromIO, runUnexceptionalIO)
import Control.Exception (fromException)
import Control.Error (EitherT, fmapLT, throwT, runEitherT)
import Network.URI (URI, uriPath)
import Network.Http.Client (withConnection,... | singpolyma/RippleUnion-Federation | Scrape.hs | isc | 2,900 | 4 | 16 | 401 | 930 | 492 | 438 | 59 | 3 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE TupleSections #-}
-- | Main monad in which the type checker runs, as well as ancillary
-- ... | HIPERFIT/futhark | src/Language/Futhark/TypeChecker/Monad.hs | isc | 16,761 | 0 | 19 | 4,050 | 5,045 | 2,590 | 2,455 | 395 | 12 |
module Parser where
import Control.Monad
import Data.Char
import Expense
newtype Parser a = Parser (String -> Int -> Int ->
Either (String, Int, Int) (a, String, Int, Int))
uncurry3 :: (a, b, c) -> (a -> b -> c -> d) -> d
uncurry3 (x, y, z) f = f x y z
runPar... | fredmorcos/attic | projects/pet/archive/pet_haskell_old_2/Parser.hs | isc | 5,024 | 0 | 14 | 1,661 | 2,031 | 1,052 | 979 | 111 | 4 |
{-# LANGUAGE OverloadedStrings #-}
module Web.Views.DiamondButton where
import Data.Text
import Text.Blaze.Html5 ((!))
import qualified Text.Blaze.Html5 as H
import qualified Text.Blaze.Html5.Attributes as A
diamondBtn :: H.Attribute -> Text -> H.Html
diamondBtn attribute label =
H.a ! attr... | tomleb/portfolio | src/Web/Views/DiamondButton.hs | mit | 626 | 0 | 15 | 142 | 150 | 83 | 67 | 12 | 1 |
{-
CIS-194 (Spring 2013)
Source: http://www.cis.upenn.edu/~cis194/spring13/hw/01-intro.pdf
-}
{-# OPTIONS_GHC -Wall #-}
module LogAnalysis where
import Log
-- Exercise 1
-- Parse a String into a LogMessage
parseMessage :: String -> LogMessage
parseMessage = parseMessageHelper . words
parseMessageHelper :: [Strin... | umairsd/course-haskell-cis194 | hw02/LogAnalysis.hs | mit | 2,292 | 0 | 12 | 561 | 631 | 331 | 300 | 40 | 4 |
module TestLexer where
import Lexer
lexTest str = do
let ts = alexScanTokens str
print $ show ts
lt01 = lexTest "myvar = 12 + 13"
lt02 = lexTest "myvar = 12 + "
lt03 = lexTest "mayvar ^"
| blippy/halc | test/TestLexer.hs | mit | 199 | 0 | 10 | 51 | 61 | 30 | 31 | 8 | 1 |
{-# LANGUAGE ForeignFunctionInterface #-}
module Clingo.Raw.Statistics
(
statisticsRoot,
statisticsType,
-- * Array Access
statisticsArraySize,
statisticsArrayAt,
-- * Map Access
statisticsMapSize,
statisticsMapSubkeyName,
statisticsMapAt,
-- * Value Access
statisticsValue... | tsahyt/clingo-haskell | src/Clingo/Raw/Statistics.hs | mit | 2,929 | 0 | 10 | 669 | 752 | 376 | 376 | 57 | 1 |
import System
clz :: Integral a => a -> [a]
clz i | i == 1 = [1]
| even i = i:clz (div i 2)
| otherwise = i:clz (3*i+1)
lenclz i=length $ clz i
answer i= maximum [(lenclz i,i)|i<-[1000000,999999..i]]
main = do
args <- getArgs
print $ answer $ read (head args)
| yuto-matsum/contest-util-hs | src/Euler/014.hs | mit | 287 | 0 | 10 | 81 | 184 | 90 | 94 | 10 | 1 |
{-# htermination (fromRationalFloat :: Ratio Integer -> Float) #-}
import qualified Prelude
data MyBool = MyTrue | MyFalse
data List a = Cons a (List a) | Nil
data Float = Float MyInt MyInt ;
data Integer = Integer MyInt ;
data MyInt = Pos Nat | Neg Nat ;
data Nat = Succ Nat | Zero ;
data Ratio a = CnPc a a;... | ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/fromRational_2.hs | mit | 605 | 0 | 9 | 120 | 184 | 105 | 79 | 14 | 1 |
{-# LANGUAGE UnicodeSyntax #-}
module Main ( main ) where
import Data.Peano ( PeanoNat )
import Test.QuickCheck ( (==>), Property, quickCheck )
-- From:
-- https://downloads.haskell.org/~ghc/7.8.4/docs/html/libraries/base-4.7.0.2/Prelude.html#v:signum
prop_signum ∷ PeanoNat → Bool
prop_signum x = abs x * signum... | asr/peano | test/Main.hs | mit | 611 | 0 | 11 | 106 | 155 | 86 | 69 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Devil.Config (loadConfig) where
import Control.Applicative
import Control.Monad
import qualified Data.Map.Strict as M
import Data.Yaml
import Devil.Types
instance FromJSON Config where
parseJSON (Object v) =
Config <$> v... | EXio4/devil | src/Devil/Config.hs | mit | 863 | 0 | 10 | 251 | 240 | 127 | 113 | 24 | 1 |
-- Prize Draw
-- http://www.codewars.com/kata/5616868c81a0f281e500005c/
module Codewars.G964.Rank where
import Data.List (sortBy)
import Data.Char (toUpper, ord)
import Data.List.Split (split, dropDelims, oneOf)
rank :: String -> [Int] -> Int -> String
rank "" _ _ = "No participants"
rank st we n = if length pAndR <... | gafiatulin/codewars | src/6 kyu/Rank.hs | mit | 702 | 0 | 26 | 162 | 289 | 158 | 131 | 11 | 3 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Toaster.Http.Core where
import Toaster.Http.Prelude
import Data.ByteString
import qualified Data.ByteString.Char8 as C8
import Data.Maybe
import Data.Pool
import Database.PostgreSQL.Simple
imp... | nhibberd/toaster | src/Toaster/Http/Core.hs | mit | 1,337 | 0 | 8 | 504 | 227 | 134 | 93 | 36 | 1 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
-----------------------------------------------------------------------------
--
-- Module : IDE.Package
-- Copyright : (c) Juergen Nicklisch-Franken, Hamish Mackenzie
-- Li... | JPMoresmau/leksah | src/IDE/Package.hs | gpl-2.0 | 51,608 | 1 | 34 | 16,981 | 12,932 | 6,501 | 6,431 | 967 | 8 |
module SongMaker.Format.Aeson
( JsonStream
, liftJson) where
import GHC.Generics
import Data.Aeson
import SongMaker.Convert.Stream
import SongMaker.Common
import SongMaker.Common.Song
newtype JsonStream = JS Stream
liftJson :: Stream -> JsonStream
liftJson = JS
instance IsStream JsonStream where
to... | firefrorefiddle/songmaker | src/SongMaker/Format/Aeson.hs | gpl-2.0 | 785 | 0 | 8 | 118 | 183 | 98 | 85 | 26 | 1 |
module Ch4 where
import Data.Char (digitToInt, isDigit,isUpper)
--example count the number of word in a string that satisfy a predicate p
numElmSatisfy :: (a->Bool)-> [a] -> Int
numElmSatisfy p = (length . (filter p))
--numWordsSatisfy :: (a->Bool)-> [a] -> Int
numWordsSatisfy p = (length . (filter p) . words)
n... | knotman90/haskell-tutorial | code/realWorldHaskell_ch4.hs | gpl-2.0 | 4,241 | 33 | 15 | 922 | 1,662 | 922 | 740 | 81 | 4 |
module Mescaline.Analysis.Meap (
Meap
, analyser
) where
import Control.Arrow (first)
import Mescaline.Analysis.Types
-- import qualified Mescaline.Application.Logger as Log
import Mescaline.Analysis.Meap.Chain as Chain
import qualified Mescaline.Analysis.Meap.Extractor as Extractor... | kaoskorobase/mescaline | lib/mescaline-database/Mescaline/Analysis/Meap.hs | gpl-3.0 | 3,243 | 0 | 16 | 902 | 727 | 411 | 316 | 60 | 1 |
module Tile (nextWin, prevWin, removeWin, addWin) where
import Debug
import Dir
import Layout
import State
import Types
import X11
import Graphics.X11
nextWin, prevWin :: TileRef -> X11State ()
nextWin = rotateWin popFront pushBack
prevWin = rotateWin popBack pushFront
rotateWin
:: (DQ Window -> (Maybe Window,... | ktvoelker/argon | src/Tile.hs | gpl-3.0 | 1,139 | 0 | 13 | 271 | 440 | 212 | 228 | 43 | 3 |
s = map (\x -> 1 / x^2) [1, 2..]
s' = sum (take 1000000 s) | graninas/Haskell-Algorithms | Tests/InfSum.hs | gpl-3.0 | 61 | 2 | 9 | 18 | 56 | 26 | 30 | 2 | 1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ViewPatterns #-}
-- |
-- Module : Network.AWS.Internal.HTTP
-- Copyright : (c) 2013-... | olorin/amazonka | amazonka/src/Network/AWS/Internal/HTTP.hs | mpl-2.0 | 4,960 | 0 | 16 | 1,725 | 1,485 | 748 | 737 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementStrategies/Get.hs | mpl-2.0 | 5,232 | 0 | 19 | 1,256 | 821 | 474 | 347 | 117 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/WorkItems/ReportStatus.hs | mpl-2.0 | 6,507 | 0 | 20 | 1,485 | 872 | 508 | 364 | 137 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE TemplateHaskell #-}
{-|
This is the entry point for this web server application. It supports
easily switching between interpreting source and running statically
compiled code.
In either mode, the generated program should be run from the root of
the project tree. When it is run, it... | wjt/flitwemmmmm | src/Main.hs | agpl-3.0 | 2,276 | 0 | 14 | 438 | 95 | 58 | 37 | 8 | 1 |
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
module MatsuiCoJp.ScraperSpec (spec) where
import qualified Data.Text.Lazy as TL
import qualified Data.Text.Lazy.IO as TL
import MatsuiCoJp.Scraper
import Test.Hspec
--
-- "ホーム" -> "お知らせ" のページ
--
test01HomeAnnounce =... | ak1211/tractor | test/MatsuiCoJp/ScraperSpec.hs | agpl-3.0 | 4,180 | 0 | 16 | 702 | 532 | 310 | 222 | 77 | 1 |
module System.IO.PhysFS.Internal (PhysFS_FileStruct, PhysFS_File, PhysHandle(PH), PhysIOMode(..), rawOpen) where
import Data.Typeable
import Foreign.Ptr (Ptr)
import Foreign.C (CString, withCString)
data PhysFS_FileStruct
deriving Typeable
type PhysFS_File = Ptr PhysFS_FileStruct
newtype PhysHandle = PH PhysFS_Fi... | d3tucker/physfs | src/System/IO/PhysFS/Internal.hs | lgpl-3.0 | 1,208 | 0 | 12 | 241 | 269 | 153 | 116 | -1 | -1 |
module Data.Sequence (module X) where
import "containers" Data.Sequence as X
| wdanilo/container | src/Data/Sequence.hs | apache-2.0 | 78 | 0 | 4 | 11 | 20 | 14 | 6 | -1 | -1 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE DeriveDataTypeable, DeriveFunctor, DeriveGeneric #-}
{-# LANGUAGE GADTs #-}
-- | DNA monad and actor creation and communication primitives.
--
-- Actors track li... | SKA-ScienceDataProcessor/RC | MS2/lib/DNA/DNA.hs | apache-2.0 | 25,287 | 0 | 20 | 6,873 | 7,164 | 3,604 | 3,560 | 496 | 5 |
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-
Copyright 2020 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:... | google/codeworld | codeworld-base/src/Prelude.hs | apache-2.0 | 1,388 | 0 | 5 | 240 | 108 | 73 | 35 | 17 | 0 |
{-# LANGUAGE FlexibleContexts #-}
module Main where
import Control.Applicative
import Control.Lens
import Text.PrettyPrint.ANSI.Leijen hiding ((<$>))
import Text.Trifecta
import Language.C.Parser
import Language.C.Data.Position
import Language.C.Data.Node
import qualified Language.C.Pretty as CPretty
import Language.... | agrif/gammac | src/Main.hs | apache-2.0 | 1,330 | 0 | 22 | 408 | 425 | 215 | 210 | -1 | -1 |
-- This is the example used in the main .cabal file.
{-# LANGUAGE OverloadedStrings #-}
-- Print all MAC addresses with an active client lease
module Main where
import Data.Ip
import Data.Mac
import qualified Data.Text.IO as T
import System.Win32.DHCP
main :: IO ()
main = do
api <- loadDHCP
clients <- enumC... | mikesteele81/Win32-dhcp-server | examples/cabal.hs | bsd-3-clause | 521 | 0 | 13 | 107 | 124 | 65 | 59 | 14 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module IS.B01
where
import Control.DeepSeq (NFData(rnf))
import Common
import Data.Data
import qualified Data.IxSet as I
import Data.IxSet ((@=), (@>=))
type IS = I.IxSet C01
newtype D1 = D1 Int deriving (Eq, Ord, Typeable)
newtype... | Palmik/data-store | benchmarks/src/IS/B01.hs | bsd-3-clause | 1,538 | 0 | 11 | 392 | 775 | 410 | 365 | 49 | 2 |
{-# LANGUAGE GADTs, ScopedTypeVariables, DataKinds, FlexibleContexts, Rank2Types, ConstraintKinds, TypeFamilies, MultiParamTypeClasses, FlexibleInstances, NoMonomorphismRestriction, RecursiveDo, InstanceSigs, OverloadedStrings #-}
{-# language OverloadedStrings #-}
{-# language OverloadedLists #-}
module UI.Lib wher... | paolino/book-a-visit | client/UI/Lib.hs | bsd-3-clause | 5,205 | 0 | 18 | 1,064 | 1,834 | 988 | 846 | 101 | 2 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveAnyClass #-}
module Hop.Apps.Juno.JsonTypes where
import Control.Applicative
import Control.Monad (mzero)
import Data.Aeson as JSON... | haroldcarr/juno | z-no-longer-used/src/Hop/Apps/Juno/JsonTypes.hs | bsd-3-clause | 12,334 | 0 | 14 | 3,408 | 2,851 | 1,572 | 1,279 | 228 | 1 |
-- vim:set foldenable foldmethod=marker foldcolumn=2:
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE Unde... | liskin/gooddata-haskell | GoodData/REST/Types/Basic.hs | bsd-3-clause | 2,147 | 0 | 10 | 436 | 666 | 370 | 296 | -1 | -1 |
module Environment
(
IOThrowsError,
Env,
nullEnv,
liftThrows,
runIOThrows,
isBound,
getVar,
setVar,
defineVar,
bindVars,
) where
import Data.IORef
import LispVal
import Control.Monad.Except
type Env = IORef [(String, IORef LispVal)]
nullEnv :: IO Env
nullEnv = newIORef []
type IOThrowsError... | mhcurylo/scheme-haskell-tutorial | src/Environment.hs | bsd-3-clause | 2,147 | 0 | 14 | 672 | 657 | 328 | 329 | 52 | 2 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-... | CBMM/CBaaS | cbaas-server/exec/Server/GroundhogAuth.hs | bsd-3-clause | 12,061 | 0 | 22 | 3,371 | 2,428 | 1,277 | 1,151 | 225 | 11 |
module MusicTest where
import Haskore.Music
import Haskore.Melody
import Haskore.Basic.Pitch
import Haskore.Basic.Duration
import Data.List as L
import Snippet
-- goal
arrange_melody 1 m1 m2 = [m1, m2, m2]
arrange_melody 2 m1 m2 = [m2, m1, m2]
arrange_melody 3 m1 m2 = [m2, m2, m1]
combine_melody = line . ... | nfjinjing/haskore-guide | src/music_test.hs | bsd-3-clause | 561 | 0 | 10 | 110 | 225 | 127 | 98 | 14 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Agon.Data(
uuids,
list,
get,
create,
update,
delete
) where
import Agon.Types
import Agon.Instances
import Agon.Agon
import Agon.APIConstructors
import Agon.Data.Types
import Agon.Data.Instances
import Agon.HTTP
import Control.Lens ((&), (.~), set, vi... | Feeniks/Agon | app/Agon/Data.hs | bsd-3-clause | 1,896 | 0 | 12 | 465 | 780 | 395 | 385 | 59 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Snap.Handlers.Param where
import Snap.Core hiding (getParam)
import Control.Monad ((<=<))
--import Control.Exception (throw)
import Data.Functor ((<$>))
import Data.Maybe (listToMaybe)
import Data.Monoid
import Data.Text hiding (head)
import Data.Text.Encoding as T
import Da... | cimmanon/snap-handlers | Snap/Handlers/Param.hs | bsd-3-clause | 1,579 | 2 | 13 | 264 | 636 | 327 | 309 | 32 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Opaleye.Trans.Exception
( OpaleyeT (..)
, runOpaleyeT
, -- * Transactions
Transaction
, transaction
, run
, -- * Queries
query
, queryFirs... | WraithM/opaleye-trans | src/Opaleye/Trans/Exception.hs | bsd-3-clause | 6,446 | 0 | 12 | 1,778 | 1,702 | 899 | 803 | 111 | 1 |
module Entity.Paddle where
import Graphics.Gloss
import Entity
-- Paddle x y w h xv
data Paddle = Paddle Float Float Float Float Float
-- change the direction of the paddle, return a paddle that needs a new x-vel
changeDir :: Paddle -> Float -> Paddle
chan... | jamiltron/GlossPong | Entity/Paddle.hs | bsd-3-clause | 1,074 | 0 | 13 | 408 | 488 | 245 | 243 | 24 | 1 |
{-|
High-Level Event-Log Interface
TODO Effects storage logic is messy.
-}
module Urbit.Vere.Log ( EventLog, identity, nextEv, lastEv
, new, existing
, streamEvents, appendEvents, trimEvents
, streamEffectsRows, writeEffectsRow
... | ngzax/urbit | pkg/hs/urbit-king/lib/Urbit/Vere/Log.hs | mit | 14,287 | 0 | 26 | 3,883 | 4,797 | 2,357 | 2,440 | -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-rds/gen/Network/AWS/RDS/RestoreDBInstanceFromDBSnapshot.hs | mpl-2.0 | 19,048 | 0 | 13 | 3,716 | 2,341 | 1,421 | 920 | 254 | 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-config/gen/Network/AWS/Config/DeliverConfigSnapshot.hs | mpl-2.0 | 5,162 | 0 | 13 | 1,078 | 592 | 358 | 234 | 80 | 1 |
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
-- Derived from AWS service descriptions, licensed under Apache 2.0.
-- |
-- Module : Test.AWS.Gen.Lambda
-- Copyright : (c) 2013-2015 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
-- Maintainer : Brendan ... | fmapfmapfmap/amazonka | amazonka-lambda/test/Test/AWS/Gen/Lambda.hs | mpl-2.0 | 9,749 | 0 | 7 | 1,874 | 979 | 581 | 398 | 169 | 1 |
module Shared.Lifecycle (
withSDL,
withWindow,
createRenderer,
withRenderer,
setHint,
logWarning,
throwSDLError
) where
import qualified Graphics.UI.SDL as SDL
import Data.Bits
import Foreign.C.String
import Foreign.C.Types
import GHC.Word
import Shared.Utilities
type Risky a = Either String a
initiali... | oldmanmike/haskellSDL2Examples | src/shared/lifecycle.hs | gpl-2.0 | 2,295 | 0 | 11 | 428 | 781 | 390 | 391 | 53 | 2 |
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE FlexibleContexts #-}
module Propellor.PrivData (
withPrivData,
withSomePrivData,
addPrivData,
setPrivData,
dumpPrivData,
editPrivData,
filterPrivData,
listPrivDataFields,
makePrivDataDir,
decryptPrivData,
PrivMap,
) where
import Control.Applicative
import System... | avengerpenguin/propellor | src/Propellor/PrivData.hs | bsd-2-clause | 7,060 | 127 | 18 | 1,237 | 1,984 | 1,077 | 907 | 160 | 1 |
<?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="ru-RU">
<title>Общая библиотека </title>
<maps>
<homeID>commonlib</homeID>
<mapref loca... | kingthorin/zap-extensions | addOns/commonlib/src/main/javahelp/help_ru_RU/helpset_ru_RU.hs | apache-2.0 | 1,015 | 77 | 66 | 157 | 489 | 245 | 244 | -1 | -1 |
{-# LANGUAGE ConstraintKinds, TemplateHaskell, PolyKinds, TypeFamilies, RankNTypes #-}
module T7021a where
import GHC.Prim
import Language.Haskell.TH
type IOable a = (Show a, Read a)
type family ALittleSilly :: Constraint
data Proxy a = Proxy
foo :: IOable a => a
foo = undefined
baz :: a b => Proxy a -> b
baz = u... | spacekitteh/smcghc | testsuite/tests/th/T7021a.hs | bsd-3-clause | 652 | 0 | 8 | 150 | 190 | 98 | 92 | -1 | -1 |
module EitherIn1 where
import Prelude
-- test introduce patterns
-- select x on lhs of g and introduce patterns for the list type...
g :: [Int] -> Int
g x = head x + tail (head x) | kmate/HaRe | old/testing/introPattern/EitherIn1.hs | bsd-3-clause | 183 | 0 | 8 | 40 | 45 | 25 | 20 | 4 | 1 |
{-# LANGUAGE CPP #-}
{-# OPTIONS_HADDOCK hide #-}
-- GIMP Toolkit (GTK) FFI extras and version dependencies
--
-- Author : Axel Simon
--
-- Created: 22 June 2001
--
-- Copyright (C) 1999-2005 Axel Simon
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Les... | mimi1vx/gtk2hs | glib/System/Glib/FFI.hs | gpl-3.0 | 2,536 | 0 | 13 | 460 | 423 | 236 | 187 | 31 | 2 |
{-|
Module : Idris.Elab.Quasiquote
Description : Code to elaborate quasiquotations.
License : BSD3
Maintainer : The Idris Community.
-}
module Idris.Elab.Quasiquote (extractUnquotes) where
import Idris.AbsSyntax
import Idris.Core.Elaborate hiding (Tactic(..))
import Idris.Core.TT
extract1 :: Int -> (PTerm... | kojiromike/Idris-dev | src/Idris/Elab/Quasiquote.hs | bsd-3-clause | 8,061 | 0 | 16 | 1,913 | 3,598 | 1,796 | 1,802 | 164 | 2 |
module T14365A where
import {-# SOURCE #-} T14365B
main = return ()
| shlevy/ghc | testsuite/tests/deriving/should_fail/T14365A.hs | bsd-3-clause | 70 | 0 | 6 | 14 | 18 | 11 | 7 | 3 | 1 |
----------------------------------------------------------------------------
--
-- Pretty-printing of common Cmm types
--
-- (c) The University of Glasgow 2004-2006
--
-----------------------------------------------------------------------------
--
-- This is where we walk over Cmm emitting an external representation,... | tjakway/ghcjvm | compiler/cmm/PprCmmExpr.hs | bsd-3-clause | 9,379 | 0 | 18 | 2,676 | 2,408 | 1,189 | 1,219 | 156 | 22 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeOperators #-}
module Math.Hclaws.ConservationLaws (
Vector,
CharField(..),
System(..),
Wave(..),
WaveFan,
Rarefaction(..),
Shock(..),
Linearity(..),
rarefactionWave,
shockWave,
solutionForm,
at... | mikebenfield/hclaws | src/Math/Hclaws/ConservationLaws.hs | isc | 5,055 | 1 | 17 | 1,402 | 1,837 | 995 | 842 | -1 | -1 |
{-# LANGUAGE ExistentialQuantification #-}
module ExpressionProblem3a
(
Area(..)
, Circle(..)
, Shape(..)
, Square(..)
)
where
-- Initial API
-- Two shapes: square and circle
-- One operation: area
data Square = Square Double
deriving Show
data Circle = Circle Double
deriving Show
... | rcook/expression-problem | src/ExpressionProblem3a.hs | mit | 591 | 0 | 8 | 144 | 182 | 102 | 80 | 20 | 0 |
import MissingH.List
main = do
c <- getContents
putStr (unlines(filter (\line -> contains "Haskell" line)
(lines c)))
| haskellbr/missingh | missingh-all/examples/simplegrep.hs | mit | 151 | 0 | 14 | 50 | 57 | 28 | 29 | 5 | 1 |
module Diagram (
getDiagram, transformDiagram
) where
import Types
import Data.List
cube = Diagram {
points = [ Point 1 (-100) 100 (-100) "blue" "A"
, Point 2 100 100 (-100) "green" "B"
, Point 3 100 (-100) (-100) "black" "C"
, Point 4 (-100) (-100) (-100... | BartoszMilewski/ThreeDee | src/Diagram.hs | mit | 3,371 | 0 | 11 | 1,403 | 1,297 | 692 | 605 | 73 | 1 |
{-# Language DeriveFunctor #-}
module Unison.TypeVar where
import Unison.Var (Var)
import qualified Data.Set as Set
import qualified Unison.Var as Var
data TypeVar v = Universal v | Existential v deriving (Eq,Ord,Functor)
underlying :: TypeVar v -> v
underlying (Universal v) = v
underlying (Existential v) = v
inst... | nightscape/platform | shared/src/Unison/TypeVar.hs | mit | 723 | 0 | 10 | 141 | 302 | 155 | 147 | 19 | 1 |
-- file: ch04/InteractWith.hs
-- For command line framework
import System.Environment (getArgs)
interactWith function inputFile outputFile = do
input <- readFile inputFile
writeFile outputFile (function input)
main = mainWith myFunction
where mainWith function = do
args <- getArgs
cas... | imrehg/rwhaskell | ch04/InteractWith.hs | mit | 547 | 0 | 12 | 147 | 115 | 57 | 58 | 11 | 2 |
module Tictactoe.Att.Move
where
import Data.Maybe
import Tictactoe.Base
import Tictactoe.Move.Base
data ExpectedMove a b = NoExp | First | Either a b
deriving (Show, Eq)
type ScenarioMove = (BoardField, ExpectedMove Coords Coords)
att :: ExpectedMove Coords Coords -> Board -> Maybe (BoardField, (ExpectedMove Coo... | viktorasl/tictactoe-bot | src/Tictactoe/Att/Move.hs | mit | 1,665 | 0 | 19 | 648 | 549 | 294 | 255 | 38 | 8 |
module Day15Spec (spec) where
import Day15
import Test.Hspec
main :: IO ()
main = hspec spec
sampleInput :: String
sampleInput = unlines
[ "Disc #1 has 5 positions; at time=0, it is at position 4."
, "Disc #2 has 2 positions; at time=0, it is at position 1."
]
sampleParsed :: [Disc]
sampleParsed = [ Dis... | brianshourd/adventOfCode2016 | test/Day15Spec.hs | mit | 1,608 | 0 | 16 | 478 | 402 | 195 | 207 | 42 | 1 |
{-----------------------------------------------------------------------------------------
Module name: Header.Converter
Made by: Tomas Möre 2015
Conatins functions to convert one header format to another
------------------------------------------------------------------------------------------}
{-# LANGUAGE Ov... | black0range/Smutt | src/Smutt/HTTP/Header/Field.hs | mit | 1,262 | 0 | 12 | 229 | 205 | 125 | 80 | 14 | 2 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
module Config where
-- base
import GHC.Generics (Generic)
import Control.Exception (throwIO)
import Control.Monad.Except (ExceptT, MonadError)
... | tdox/aircraft-service | src/Config.hs | mit | 5,860 | 0 | 17 | 1,833 | 856 | 491 | 365 | 92 | 5 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
module Main where
import Control.Lens ((+~), ix)
import qualified Data.Attoparsec.Text as P
import Data.Bifunctor (first)
import Data.Folda... | genos/online_problems | advent_of_code_2018/day09/src/Main.hs | mit | 2,183 | 0 | 13 | 624 | 818 | 447 | 371 | 55 | 1 |
-- | A DSL for representing qualifies as a matched token
module Text.Tokenify.Regex (Regex(..)) where
-- | An Abstract data type for representing a regex
data Regex s
= Char Char
| String s
| Alt (Regex s) (Regex s)
| Append (Regex s) (Regex s)
| Range Char Char
| Option (Regex s)
| Repeat (Regex s)... | AKST/tokenify | src/Text/Tokenify/Regex.hs | mit | 1,210 | 0 | 15 | 353 | 482 | 243 | 239 | 30 | 3 |
module Main where
import StrawPoll.Types
import Prelude hiding (div)
import Blaze.React
import qualified Text.Blaze.Event as E
import qualified Text.Blaze.Event.Keycode as Keycode
import qualified Text.Blaze.Html5 as H
import qualified Text.Blaze.Html5.Attributes ... | cschneid/strawpollhs | src/client/Main.hs | mit | 622 | 0 | 7 | 146 | 132 | 90 | 42 | 17 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE OverloadedStrings #-}
import Foreign.C.Types
import qualified Language.C.Inline as C
import qualified Language.C.Inline.Unsafe as CU
C.include "<math.h>"
C.include "<stdio.h>"
test_cexp :: CD... | cirquit/Personal-Repository | Haskell/Playground/AdventOfCode/advent-coding/app/Main.hs | mit | 818 | 0 | 8 | 186 | 173 | 97 | 76 | 22 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeFamilies #-}
module Data.Holes
( Hole(..)
, Holes(..)
) where
import Control.Lens hiding (holes)
import Data.Traversable
import Data.Monoid
import Data.Ix
import ... | nickspinale/holes | Data/Holes.hs | mit | 2,143 | 0 | 10 | 586 | 812 | 432 | 380 | 55 | 1 |
{-# LANGUAGE CPP, NoImplicitPrelude #-}
{-# LANGUAGE RankNTypes #-}
#if __GLASGOW_HASKELL__ >= 702
{-# LANGUAGE Trustworthy #-}
#endif
module Data.Type.Equality.Compat (
#if MIN_VERSION_base(4,7,0)
module Base
#endif
) where
#if MIN_VERSION_base(4,7,0)
import Data.Type.Equality as Base
#endif
| haskell-compat/base-compat | base-compat/src/Data/Type/Equality/Compat.hs | mit | 297 | 0 | 4 | 38 | 31 | 25 | 6 | 3 | 0 |
{-# htermination minimumBy :: (a -> a -> Ordering) -> [a] -> a #-}
import List
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/List_minimumBy_1.hs | mit | 79 | 0 | 3 | 16 | 5 | 3 | 2 | 1 | 0 |
module E.FromHs(
convertDecls,
convertRules,
createInstanceRules,
procAllSpecs,
getMainFunction
) where
import Char
import Control.Applicative(Applicative)
import Control.Monad.Error
import Control.Monad.Identity
import Control.Monad.RWS
import List(isPrefixOf,nub)
import Prelude
import Text.Pr... | m-alvarez/jhc | src/E/FromHs.hs | mit | 47,722 | 5 | 33 | 15,159 | 19,025 | 9,574 | 9,451 | -1 | -1 |
main = do
putStrLn "Year of birth?"
yob <- readLn
let age = 2014 - yob
putStrLn $ "You're " ++ (show age) ++ " years old"
| raimohanska/Monads | examples/exercises/4_CalcAge.hs | mit | 133 | 0 | 10 | 37 | 53 | 24 | 29 | 5 | 1 |
import Control.Monad (replicateM)
import Criterion.Main
import qualified Data.Clustering.Hierarchical as C
import qualified Data.Vector as V
import System.Random.MWC
import AI.Clustering.Hierarchical
import AI.Clustering.Hierarchical.Types ((!))
import Bench.Hierarchical (benchHierarchical)
import Bench.KMeans (bench... | kaizhang/clustering | benchmarks/bench.hs | mit | 410 | 0 | 6 | 55 | 103 | 65 | 38 | 13 | 1 |
module Grafs.Cli where
import Protolude hiding ((<>))
import Options.Applicative
data CLIOptions = CLIOptions
{ port :: Int }
cliOptions :: Parser CLIOptions
cliOptions = CLIOptions
<$> option auto
( long "port"
<> short 'p'
<> metavar "PORT"
... | uwap/Grafs | src/Grafs/Cli.hs | mit | 592 | 0 | 12 | 199 | 137 | 72 | 65 | 18 | 1 |
-------------------------------------------------------------------------------
-- Module : Domain.Sign.Type
-- Copyright : (c) 2015 Marcelo Sousa
-------------------------------------------------------------------------------
module Domain.Sign.Type where
import qualified Data.ByteString as BS
import Data.Hashab... | marcelosousa/poet | src/Domain/Sign/Type.hs | gpl-2.0 | 912 | 0 | 7 | 161 | 211 | 129 | 82 | 19 | 0 |
module Language.Dockerfile.FormatCheck (formatCheck) where
import Language.Dockerfile.Rules
import Language.Dockerfile.Syntax
formatCheck :: Check -> String
formatCheck (Check md source ln _) =
formatPos source ln ++ code md ++ " " ++ message md
formatPos :: Filename -> Linenumber -> String
f... | beijaflor-io/haskell-language-dockerfile | src/Language/Dockerfile/FormatCheck.hs | gpl-3.0 | 420 | 0 | 8 | 101 | 130 | 69 | 61 | 11 | 2 |
module Controller.App where
import Control.Monad
import Control.Monad.Trans (lift)
import Control.Monad.Trans.Maybe
import Controller.Bootstrap
import Controller.CLI
import Controller.Fractal
import Controller.GUI
import Data.Maybe (maybe)
import Graphics.UI.SDL as SDL
import Model.Fractal
import Model.Progression
imp... | phaazon/phraskell | src/Controller/App.hs | gpl-3.0 | 4,661 | 0 | 21 | 1,270 | 1,582 | 802 | 780 | -1 | -1 |
module Data.BTree
( BTree(..)
, unfoldTree
, unfoldTreeM
) where
import Control.Applicative
import Data.Maybe (fromMaybe)
data BTree a
= BNode a (BTree a) (BTree a)
| Leaf
deriving (Eq, Show, Read)
instance Functor BTree where
fmap f Leaf = Leaf
fmap f (BNode a lb rb) = BNode (f a) (fmap f lb) (fmap f rb)
... | xaphiriron/maps | Data/BTree.hs | gpl-3.0 | 799 | 12 | 12 | 173 | 431 | 223 | 208 | 24 | 1 |
{-
as3tohaxe - An Actionscript 3 to haXe source file translator
Copyright (C) 2008 Don-Duong Quach
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,... | geekrelief/as3tohaxe | ActionhaXe/CLArgs.hs | gpl-3.0 | 1,838 | 0 | 10 | 397 | 310 | 181 | 129 | 20 | 1 |
{-# LANGUAGE BangPatterns, FlexibleContexts #-}
module Main where
import Control.DeepSeq (force)
import Control.Monad
import Control.Parallel.Strategies (parList, parListChunk, rdeepseq, using)
import qualified Data.ByteString.Lazy as BL
import Data.List (foldl', minimumBy)
import Data.List.Split (chunksOf)
import Da... | pavolzetor/currypath | src/Main.hs | gpl-3.0 | 3,794 | 0 | 17 | 911 | 1,008 | 571 | 437 | 55 | 1 |
<?xml version='1.0' encoding='ISO-8859-1' ?>
<!DOCTYPE helpset
PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 1.0//EN"
"http://java.sun.com/products/javahelp/helpset_1_0.dtd">
<helpset version="1.0">
<title>Wlz Section Viewer - Help</title>
<maps>
<homeID>sv.description</homeID... | ma-tech/JavaWoolz | uk/ac/mrc/hgu/SectionViewer/classes/sectionViewer/help/ViewerHelp.hs | gpl-3.0 | 915 | 72 | 30 | 196 | 344 | 183 | 161 | -1 | -1 |
-- Author: Paul Reiners
-- https://github.com/paul-reiners/a-golden-prime-project
module PrintPairCounts where
import AGPP
import Text.Printf
import Control.Exception
import System.CPUTime
import System.Environment
nums :: Integer -> [Integer]
nums n = [m | m <- [4..n], even m]
primePairCounts :: Integer -> [Int]
... | paul-reiners/a-golden-prime-project | src/PrintPairCounts.hs | gpl-3.0 | 846 | 0 | 12 | 136 | 324 | 175 | 149 | 19 | 1 |
grafo n xs = grafo' n xs [0..(n-1)]
grafo' _ [] _ =[]
grafo' n ((com,a,b):xs) ds= if(com=="une")then True: (grafo' n xs (une a b ds))
else (conectados a b ds):grafo' n xs ds
une a b ds=une' (fs a ds) (fs b ds) ds 0
une' a b (x:xs) c= if(c==a) then (b:xs)
else x:une' a b (xs) (c+1)
conectados a b ds = if((fs a ds)... | SDKE/Programacion-Logica-y-Funcional | Practica5.hs | gpl-3.0 | 491 | 6 | 10 | 115 | 401 | 201 | 200 | 13 | 2 |
module Test.QuickFuzz.Gen.Bnfc
( module Test.QuickFuzz.Gen.Bnfc.Grammar,
) where
import Test.QuickFuzz.Gen.Bnfc.Grammar
| CIFASIS/QuickFuzz | src/Test/QuickFuzz/Gen/Bnfc.hs | gpl-3.0 | 122 | 0 | 5 | 11 | 28 | 21 | 7 | 3 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-genomics/gen/Network/Google/Resource/Genomics/CallSets/Create.hs | mpl-2.0 | 5,429 | 0 | 18 | 1,319 | 864 | 503 | 361 | 121 | 1 |
module Handler.PasteView where
import Import
getPasteViewR :: PasteId -> Handler Html
getPasteViewR pasteId = do
paste <- runDB (get pasteId) >>=
\case
Just x -> return x
Nothing -> notFound
defaultLayout $
$(widgetFile "paste-view")
| learnyou/lypaste | Handler/PasteView.hs | agpl-3.0 | 283 | 0 | 12 | 83 | 83 | 40 | 43 | -1 | -1 |
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -funbox-strict-fields #-}
module Types where
import Control.Lens
import Control.Lens.TH
import Control.Monad
import Control.Monad.List
import Control.Monad.State.Lazy
import Control.Monad.Trans.Class
import ... | benjamin-wagon/homeworld | Types.hs | agpl-3.0 | 4,425 | 0 | 11 | 1,132 | 1,306 | 691 | 615 | -1 | -1 |
letter2int :: Char -> Int
letter2int a = case a of
'I' -> 1
'V' -> 5
'X' -> 10
'D' -> 500
'L' -> 50
'C' -> 100
'M' -> 1000
roman2Int :: (Int,String) -> Int
roman2Int (i,"") = i
roman2Int (0, (x:xs)) = case xs of
[] -> roman2Int ((letter2int x), "")
xs -> roman2Int ((letter2int x), (x:xs))
roman2... | ccqpein/Arithmetic-Exercises | Roman-To-Integer/RTI.hs | apache-2.0 | 763 | 0 | 13 | 157 | 515 | 281 | 234 | 23 | 8 |
{-# LANGUAGE BangPatterns, OverloadedStrings, TemplateHaskell #-}
module Collectors.Cpu where
import Control.Applicative ((<$>), (<*))
import Control.Lens.TH (makeClassy)
import Data.Text (Text(), append, empty, pack, singleton)
import Text.Parsec
import Text.Parsec.Text
data CoreMetric = CoreMetric { _coreName :: !... | muhbaasu/hmon | src/Collectors/Cpu.hs | apache-2.0 | 1,543 | 0 | 15 | 549 | 451 | 241 | 210 | 61 | 2 |
-- | Types and algorithms for Markov logic networks. The module has quite a
-- few 'fromStrings' methods that take strings and parse them into data
-- structure to make it easier to play with Markov logic in the repl.
--
-- For Markov logic, data is often represented with a Set (Predicate a, Bool).
-- This is prefered ... | PhDP/Manticore | Akarui/FOL/MarkovLogic.hs | apache-2.0 | 9,522 | 0 | 16 | 2,098 | 2,395 | 1,290 | 1,105 | 154 | 3 |
module EquationSolver.Solver where
import EquationSolver.Common
import Control.Monad.Error
import Control.Monad.State
import Control.Monad.Identity
import Control.Monad.Writer
import Data.List
newtonReal :: Equation -> Flow [Double]
newtonReal (Equation lhs rhs) =
let lhs' = simplify lhs
r... | janm399/equationsolver | src/EquationSolver/Solver.hs | apache-2.0 | 5,800 | 0 | 17 | 1,611 | 2,544 | 1,273 | 1,271 | 107 | 9 |
{-# OPTIONS_GHC
-fno-warn-missing-signatures -fno-warn-type-defaults #-}
module Blockchain.Colors
( red
, green
, yellow
, blue
, magenta
, cyan
, white2
, white
, black
, bright
, dim
, underline
, blink
, Blockchain.Colors.reverse
, hidden
, setTitle
) where
bright string = "\ES... | zchn/ethereum-analyzer | ethereum-analyzer-deps/src/Blockchain/Colors.hs | apache-2.0 | 1,157 | 0 | 7 | 235 | 336 | 179 | 157 | 35 | 1 |
-- vim: sw=2: ts=2: set expandtab:
{-# LANGUAGE QuasiQuotes, TemplateHaskell,
FlexibleInstances,
MultiParamTypeClasses,
FlexibleContexts,
UndecidableInstances,
CPP
#-}
-----------------------------------------------------------------------------
--
-- M... | kyagrd/mininax | src/Parser.hs | bsd-2-clause | 9,849 | 0 | 23 | 2,657 | 3,592 | 1,788 | 1,804 | 149 | 21 |
module Translate where
import My.Control.Monad
import qualified Data.Map as M
import Data.Maybe
import Data.Bimap as BM
import ID
import PCode
import Context.Types as C
class Translatable t where
translate :: (ID -> ID) -> t -> t
mapTranslate m = \s -> fromMaybe s $ M.lookup s m
instance Translatable ID where
t... | lih/Alpha | src/Translate.hs | bsd-2-clause | 1,419 | 0 | 10 | 273 | 629 | 322 | 307 | 33 | 1 |
module Main where
import Data.Binary
import Data.Binary.Typed
import qualified Data.ByteString.Lazy as BSL
import Data.Typeable (Typeable)
import Data.Int
import Text.Printf
main :: IO ()
main = do
putStrLn "Comparison of message lengths depending on serialization method"
putStrLn "======================... | quchen/binary-typed | benchmark/MessageLength.hs | bsd-2-clause | 3,895 | 0 | 17 | 1,513 | 863 | 450 | 413 | 69 | 1 |
{-# LANGUAGE FlexibleContexts #-}
module Revelation.Utils where
import Pipes
import Linear
import Revelation.Mat
import Revelation.Core
import Control.Monad
import Control.Lens
import Data.Vector.Storable as VS
indexP :: (Storable (ElemT c e), Show (ElemT c e), CVElement (ElemT c e), Storable (Vector (ElemT c e))) => ... | arjuncomar/revelation | Revelation/Utils.hs | bsd-3-clause | 527 | 0 | 12 | 141 | 212 | 109 | 103 | 15 | 1 |
module Network.HTTP.Types.Method
(
Method
, methodGet
, methodPost
, methodHead
, methodPut
, methodDelete
, methodTrace
, methodConnect
, methodOptions
, StdMethod(..)
, parseMethod
, renderMethod
, renderStdMethod
)
where
import Control.Arrow ((|||))
import Data.Array
import qualified D... | kazu-yamamoto/http-types | Network/HTTP/Types/Method.hs | bsd-3-clause | 2,040 | 0 | 9 | 381 | 437 | 260 | 177 | 49 | 1 |
-- Test data
start_v2 = Coordinates 1 1
start_p = Coordinates 15.0 15.0
board = Board 123456 (Paddle 19 "foo") (Paddle 14 "bar") (Ball (Coordinates 100 100)) (Conf 640 480 50 10 5 15)
board' = Board 123471 (Paddle 19 "foo") (Paddle 14 "bar") (Ball (Coordinates 2 2)) (Conf 640 480 50 10 5 15)
losingHistory = [board',b... | timorantalaiho/pong11 | test/TestData.hs | bsd-3-clause | 614 | 2 | 9 | 108 | 298 | 149 | 149 | 8 | 1 |
module Container.Tree.Morph where
import Generics.Fixpoint
import qualified Container.Tree.Abstract as F
import qualified Generics.Morphism.Ana as Ana ()
import qualified Generics.Morphism.Apo as Apo
import qualified Generics.Morphism.Cata as Cata ()
import qualified Generics.Morphism.Para as Para
-- Insert is WRONG!... | sebastiaanvisser/islay | src/Container/Tree/Morph.hs | bsd-3-clause | 1,560 | 0 | 17 | 509 | 762 | 405 | 357 | 43 | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.